Created
February 12, 2019 14:11
-
-
Save onefriendaday/7cfc2719671000123359900667c1f198 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 'ef-native-color-picker', | |
color: '' | |
} | |
} | |
}, | |
events: { | |
'plugin:created': function() { | |
console.log('plugin:created') | |
}, | |
'plugin:destroyed': function() { | |
console.log('plugin:destroyed') | |
} | |
}, | |
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