vue-canvas-poster
Version:
A lightweight vue components use canvas draw image by css properties.(一个通过css属性画canvas图片的轻量级的vue组件)
21 lines (19 loc) • 451 B
JavaScript
import VueCanvasPoster from './canvas-poster'
export function install(Vue) {
Vue.component('vue-canvas-poster', VueCanvasPoster)
}
export { VueCanvasPoster }
const myPlugin = {
install
}
export default myPlugin
// Auto-install
let GlobalVue = null
if (typeof window !== 'undefined') {
GlobalVue = window.Vue
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue
}
if (GlobalVue) {
GlobalVue.use(myPlugin)
}