mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-11-30 06:13:34 +08:00
fix(上传): 避免单图选择重复触发
背景与目的:单图选择会关闭弹窗,过渡期间快速重复点击可能重复写入。 主要改动:仅对单选弹窗实例增加一次性选择状态,多图仍按每次点击切换。 影响范围与兼容性:后台图片选择弹窗;多图快速连续选择行为保持不变。 验证入口及实际结果:本地定向单选/多选行为检查通过,远端代码提交成功。未进行真实浏览器弹窗交互回归。
This commit is contained in:
parent
e051c1405a
commit
5a2999c7ca
@ -35,7 +35,7 @@
|
||||
var app = new vue({
|
||||
el: '#ImageDialog',
|
||||
data: {
|
||||
didx: 0,
|
||||
didx: 0, selecting: false,
|
||||
page: 1, limit: 15, show: false, mult: false,
|
||||
keys: '', list: [], data: [], idxs: {}, urls: [],
|
||||
},
|
||||
@ -78,6 +78,8 @@
|
||||
// 设置单项数据
|
||||
setItem: function (item) {
|
||||
if (!this.mult) {
|
||||
if (this.selecting) return;
|
||||
this.selecting = true;
|
||||
this.setValue(item.xurl).setInput();
|
||||
} else if ((item.checked = !this.idxs[item.id])) {
|
||||
(this.idxs[item.id] = item) && this.data.push(item);
|
||||
@ -162,4 +164,4 @@
|
||||
></button>
|
||||
{/if}
|
||||
<!-- 图片上传组件 结束 -->
|
||||
</label>
|
||||
</label>
|
||||
Loading…
x
Reference in New Issue
Block a user