Commit f65aa435 authored by 姬鋆屾's avatar 姬鋆屾

fix:修改二维码展示添加防抖

parent 79c7da57
......@@ -215,14 +215,15 @@
<a-tag v-else color="blue"> 自建事项 </a-tag>
</template>
<!-- 二维码展示 -->
<template slot="qrCode" slot-scope="{ record }"
><img
class="pointer"
<template slot="qrCode" slot-scope="{ record }">
<img
:class="['pointer', record.disabled == true ? 'none_click' : '']"
width="30"
height="30"
src="@/assets/img/erweima.png"
@click="handlePreview(record)"
/></template>
/>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="{ record }">
......@@ -274,7 +275,7 @@ import YTable from "@/components/YTable.vue";
import local from "@/utils/local";
import { uniqueObjArray } from "@/utils";
import { mapMutations } from "vuex";
import _ from "lodash";
const sourceType = {
0: "一体化添加",
1: "手动添加",
......@@ -411,10 +412,8 @@ export default {
methods: {
...mapMutations("site", ["SET_matterDict"]),
// 预览二维码
async handlePreview(val) {
console.log(val);
handlePreview: _.debounce(async function (val) {
let res = await getQrInfo({ id: val.id });
console.log(res);
let { data, code } = res.data;
if (code == 1) {
data.qrCode
......@@ -423,7 +422,7 @@ export default {
})
: "";
}
},
}, 1000),
// 下载二维码
handleDownload() {
let _this = this;
......@@ -440,7 +439,6 @@ export default {
icon: "exclamation-circle",
maskClosable: true,
async onOk() {
console.log(_this.selectedBaseMatterKeys);
let res = await qrDownload(
{
......@@ -800,6 +798,9 @@ export default {
margin-left: 10px;
}
}
.none_click {
pointer-events: none;
}
// .add-btn {
// background-color: #04cb8f;
// color: #fff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment