Skip to content

[mpvue版本]微信小程序上canvas绘制图片助手,一个json就制作分享朋友圈图片

Notifications You must be signed in to change notification settings

kuckboy1994/mpvue_canvas_drawer

Repository files navigation

mpvue_canvas_drawer

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"/>

Build Setup

# 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.

About

[mpvue版本]微信小程序上canvas绘制图片助手,一个json就制作分享朋友圈图片

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published