Emit the events from the components
This commit is contained in:
parent
4a28d5d628
commit
0265a984c0
|
@ -56,7 +56,7 @@ THE SOFTWARE.
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="control" v-if="incorrectEnding">
|
<div v-if="incorrectEnding" class="control">
|
||||||
<label class="text message is-warning">
|
<label class="text message is-warning">
|
||||||
<span class="message-body">
|
<span class="message-body">
|
||||||
{{ $t('templates.domainSections.onion.onionLocationExpectedToEndWithOnion') }}
|
{{ $t('templates.domainSections.onion.onionLocationExpectedToEndWithOnion') }}
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div @copied="copied">
|
||||||
<pre><code class="language-bash">{{ cmd }}</code></pre>
|
<pre><code class="language-bash">{{ cmd }}</code></pre>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -42,5 +42,10 @@ THE SOFTWARE.
|
||||||
console.info(`Highlighting ${this.$props.cmd}...`);
|
console.info(`Highlighting ${this.$props.cmd}...`);
|
||||||
Prism.highlightAllUnder(this.$el);
|
Prism.highlightAllUnder(this.$el);
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
copied(event) {
|
||||||
|
this.$emit('copied', event.detail.text);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`">
|
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||||
<h3 v-html="name"></h3>
|
<h3 v-html="name"></h3>
|
||||||
<pre><code class="language-docker" v-html="conf"></code></pre>
|
<pre><code class="language-docker" v-html="conf"></code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,5 +46,10 @@ THE SOFTWARE.
|
||||||
console.info(`Highlighting ${this.$props.name}...`);
|
console.info(`Highlighting ${this.$props.name}...`);
|
||||||
Prism.highlightAllUnder(this.$el);
|
Prism.highlightAllUnder(this.$el);
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
copied(event) {
|
||||||
|
this.$emit('copied', event.detail.text);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`">
|
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||||
<h3 v-html="name"></h3>
|
<h3 v-html="name"></h3>
|
||||||
<pre><code class="language-nginx" v-html="conf"></code></pre>
|
<pre><code class="language-nginx" v-html="conf"></code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,5 +45,10 @@ THE SOFTWARE.
|
||||||
console.info(`Highlighting ${this.$props.name}...`);
|
console.info(`Highlighting ${this.$props.name}...`);
|
||||||
Prism.highlightAllUnder(this.$el);
|
Prism.highlightAllUnder(this.$el);
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
copied(event) {
|
||||||
|
this.$emit('copied', event.detail.text);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`">
|
<div :class="`column ${half ? 'is-half' : 'is-full'} is-full-mobile is-full-tablet`" @copied="copied">
|
||||||
<h3 v-html="name"></h3>
|
<h3 v-html="name"></h3>
|
||||||
<pre><code class="language-yaml" v-html="conf"></code></pre>
|
<pre><code class="language-yaml" v-html="conf"></code></pre>
|
||||||
</div>
|
</div>
|
||||||
|
@ -46,5 +46,10 @@ THE SOFTWARE.
|
||||||
console.info(`Highlighting ${this.$props.name}...`);
|
console.info(`Highlighting ${this.$props.name}...`);
|
||||||
Prism.highlightAllUnder(this.$el);
|
Prism.highlightAllUnder(this.$el);
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
copied(event) {
|
||||||
|
this.$emit('copied', event.detail.text);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue