Skip to content

Instantly share code, notes, and snippets.

@DominikAngerer
Created March 20, 2019 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominikAngerer/45c1a35501070750ac44fa45ee1bb3f2 to your computer and use it in GitHub Desktop.
Save DominikAngerer/45c1a35501070750ac44fa45ee1bb3f2 to your computer and use it in GitHub Desktop.
const Fieldtype = {
mixins: [window.Storyblok.plugin],
data() {
return {
ich_bin_eine_state_variable_die_nicht_im_model_beinhaltet_ist: true,
ich_darf_nicht_model_heissen: true
}
},
template: `<div>
<input class="uk-width-1-1" v-model="model.example" />
{{ich_bin_eine_state_variable_die_nicht_im_model_beinhaltet_ist}}
{{ich_darf_nicht_model_heissen}}
</div>`,
methods: {
initWith() {
return {
plugin: 'example_plugin',
example: 'Hello world!'
}
},
pluginCreated() {
console.log('plugin:created')
}
},
watch: {
'model': {
handler: function (value) {
this.$emit('changed-model', value);
},
deep: true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment