Skip to content

Instantly share code, notes, and snippets.

@onefriendaday
Created July 21, 2018 19:46
Show Gist options
  • Save onefriendaday/34ab93d3c6a415700a9328b2bd1cf606 to your computer and use it in GitHub Desktop.
Save onefriendaday/34ab93d3c6a415700a9328b2bd1cf606 to your computer and use it in GitHub Desktop.
const Fieldtype = {
mixins: [window.Storyblok.plugin],
template: `<div class="uk-flex">
<input class="uk-margin-right" v-model="model.color" type="color" />
<input class="uk-width-1-1" v-model="model.color" /></div>`,
methods: {
initWith() {
return {
plugin: 'example_plugin',
color: '#f40000'
}
},
pluginCreated() {
console.log('plugin:created')
}
},
watch: {
'model': {
handler: function (value) {
this.$emit('changed-model', value);
},
deep: true
}
}
}
@DominikAngerer
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment