Created
March 20, 2019 17:46
-
-
Save DominikAngerer/45c1a35501070750ac44fa45ee1bb3f2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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], | |
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