mpvue_canvas_drawer
1.0.0
Move the mp_canvas_drawer
component to the /static/
directory of the mpvue
project
Add the following code at the end of the main.js
file of the calling page
export default {
config: {
// 这儿添加要用的小程序组件
usingComponents: {
'canvasdrawer': '../../../static/canvasdrawer/canvasdrawer'
}
}
}
You can use mp_canvas_drawer
directly in mpvue
<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.