daterangepicker 控件的销毁

今天想动态的添加和销毁daterangepicker,添加时很容易,但是销毁时却费劲了,尝试了各种方法,最后发现如下可以:

$(selecter).data('daterangepicker').remove();

希望对大家有用 

把这段代码进行优化,增加批量打印的功能,用户填写打印图片的数量,然后点击打印图片,填写多少打印多少张图片,只优化我给出的代码不需要例子什么的,给出完整的页面代码,这是原代码<template> <view class="body"> <view class="barcode-display"> <text>Barcode: {{ barcode }}</text> </view> <image :src="previewImage" mode="aspectFit" class="preview-image"></image> <view class="uni-list"> <!-- 隐藏画布,用于标签绘制 --> <canvas :id="canvasId" :canvas-id="canvasId" type="2d" :style="{ width: labelWidth + 'px', height: labelHeight + 'px' }" style="position: fixed; left: -9999rpx; top: -9999rpx" /> <!-- 打印机列表 --> <view class="uni-list-cell"> <view class="uni-list-cell-left">打印机:</view> <view class="uni-list-cell-db"> <picker :value="deviceIndex" :range="deviceList" @change="onDeviceChanged" range-key="name"> <view class="uni-input">{{ deviceList[deviceIndex].name }}</view> </picker> </view> </view> </view> <view class="uni-padding-wrap uni-common-mt"> <!-- 设备搜索 --> <button type="primary" @click="startDiscovery">开始搜索打印机</button> <button type="primary" @click="stopDiscovery">停止搜索打印机</button> <!-- 链接打印机 --> <button type="primary" @click="openPrinter">打开打印机</button> <button type="primary" @click="closePrinter">关闭打印机</button> <!-- 标签编辑及打印 --> <button type="primary" plain="true" @click="printImage">打印图片</button> </view> <view style="text-align: center; padding: 10px"> <view style="margin: 10px; border: solid lightgray 1px"> <image v-for="item in previewList" :src="item.value" :key="item.key" class="image" mode="widthFix" style="margin: 10rpx; border: dashed lightgray 1px" /> </view> </view> </view> </template> <script> import { ref } from 'vue'; import { LPAPIFactory, LPA_Result, LPAUtils } from "@/uni_modules/dothan-lpapi-ble/js_sdk/index.js"; export default { setup() { const barcode = ref(''); const previewImage = ref(''); const fetchImageFromBa
最新发布
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值