Vue+html传值

1.vue文件

	<el-dialog
      :close-on-click-modal="false"
      title="绘制签到手势"
      width="30%"
      :visible="showCavGesture"
      :destroy-on-close="true"
      @close="cancel"
    >
      <iframe class="ifram" src="signin.html" @getpointList="getpointList"></iframe>// 位于public目录下
      <!-- <CavGesture v-model="gestureData" :show-gesture="showCavGesture" /> -->
      <div>
        <li v-for="(item,index) in newSignInItem.gesture" :key="index"></li>
      </div>
      {{ newSignInItem.gesture }}
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" size="small" @click="sure">确 定</el-button>
        <el-button size="small" @click="cancel">取 消</el-button>
      </div>
    </el-dialog>

	created() {
	    window.getpointList = this.getpointList // 把vue实例中的方法引用给window对象
	}

2.html文件

	touchEnd(e) {
	    if(!this.isDownOnPoint) return;
	    this.isDownOnPoint = false;
	    this.draw();
	    if(this.points.length > 1) {
	      // alert("点击的顺序是:" + this.points.join(","));
	      parent.getpointList(this.points)
	      this.points = [];
	      this.draw();
	    }
	}
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值