Giter Site home page Giter Site logo

uni-app-poster's Introduction

使用方法(主要看pages/hch-poster页面的例子里面有详细说明)

<hchPoster ref="hchPoster" :canvasFlag.sync="canvasFlag" @cancel="canvasCancel" :posterObj.sync="posterData"/>
<view :hidden="canvasFlag">
	<canvas class="canvas"  canvas-id="myCanvas" ></canvas><!-- 海报 -->
</view>

import hchPoster from '../../wxcomponents/hch-poster/hch-poster.vue'

components:{
	hchPoster,
},

使用方法

createCanvasImageEvn(){
	Object.assign(this.posterData,
	{
		url:'https://img0.zuipin.cn/mp_zuipin/poster/hch-pro.jpg',//商品主图
		icon:'https://img0.zuipin.cn/mp_zuipin/poster/hch-hyj.png',//会员价图标
		title:"诗酒茶系列 武夷大红袍 2018年 花香型中火 一级 体验装 16g",//标题
		discountPrice:"250.00",//折后价格
		orignPrice:"300.00",//原价
		code:'https://img0.zuipin.cn/mp_zuipin/poster/hch-code.png',//小程序码
	})
this.$forceUpdate();//强制渲染数据
setTimeout(()=>{
	this.canvasFlag=false;//显示canvas海报
	this.deliveryFlag = false;//关闭分享弹窗
	this.$refs.hchPoster.createCanvasImage();//调用子组件的方法
},500)
},

uni-app-poster's People

Contributors

huangchunhong avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.