mpvue_canvas_drawer
1.0.0
把mp_canvas_drawer
元件移到mpvue
專案的/static/
目錄下
在呼叫頁面的main.js
檔案最後加入如下程式碼
export default {
config: {
// 这儿添加要用的小程序组件
usingComponents: {
'canvasdrawer': '../../../static/canvasdrawer/canvasdrawer'
}
}
}
就可以直接在mpvue
中使用mp_canvas_drawer
<img :src="shareImage" class="share-image" />
<canvasdrawer :painting="painting" class="canvasdrawer" @getImage="eventGetImage"/>
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
For detailed explanation on how things work, checkout the guide and docs for vue-loader.