Created
August 27, 2017 16:04
-
-
Save oozman/1ebae6430c296236bcc1dfac461a3cf8 to your computer and use it in GitHub Desktop.
on-load vue component
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
Vue.component('onload', { | |
props: [], | |
template: '<span></span>', | |
created: function () { | |
this.load(); | |
}, | |
methods: { | |
load() { | |
this.$emit('load') | |
} | |
} | |
}); | |
// <onload v-on:load="someFunction()"></onload> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment