@dhccmobile/vue3-lo-form 2.0.61 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhccmobile/vue3-lo-form",
3
- "version": "2.0.61",
3
+ "version": "2.1.0",
4
4
  "description": "VUE3动态表单",
5
5
  "private": false,
6
6
  "main": "dist/vue3-lo-form.umd.js",
@@ -321,7 +321,7 @@
321
321
  </template>
322
322
  <template v-if="controlAttr.isDesensitize">
323
323
  <div @click="handlerMasking(formControl)">
324
- <eye-outlined v-if="!isAfterClick" class="addon-icon" />
324
+ <eye-outlined v-if="isAfterClick" class="addon-icon" />
325
325
  <eye-invisible-outlined v-else class="addon-icon" />
326
326
  </div>
327
327
  </template>
@@ -479,6 +479,7 @@ export default class DvFormLayout extends Vue {
479
479
  amountCapitalization = amountCapitalization; // 大写转换
480
480
  zoomMultiple = zoomMultiple; // 缩放
481
481
  isAfterClick = false; // 后缀图标是否被点击了 2026年4月17日 15:21:53
482
+ private lastClickTime = 0; // 上次点击时间戳 2026年5月15日 12:12:53
482
483
  filterOption(value: any, item: any) {
483
484
  if (!item.title) {
484
485
  return false;
@@ -1496,6 +1497,17 @@ export default class DvFormLayout extends Vue {
1496
1497
  * @private 私有方法
1497
1498
  */
1498
1499
  handlerMasking(formControl: any): void {
1500
+ const now = Date.now();
1501
+ // 防止频繁点击,间隔小于1秒则提示
1502
+ if (now - this.lastClickTime < 1000) {
1503
+ notification.open({
1504
+ message: "点击过于频繁,请稍后再试",
1505
+ duration: 2,
1506
+ icon: () => h(ExclamationCircleOutlined, { style: "color: #FBBC05" }),
1507
+ });
1508
+ return;
1509
+ }
1510
+ this.lastClickTime = now;
1499
1511
  const path = this.$qlForm.desApiAddr;
1500
1512
  if (!path) {
1501
1513
  notification.open({
@@ -1661,12 +1673,13 @@ export default class DvFormLayout extends Vue {
1661
1673
  }
1662
1674
  }
1663
1675
  .addon-icon {
1676
+ color: #429eff;
1664
1677
  width: 40px !important;
1665
1678
  user-select: none;
1666
1679
  }
1667
1680
  .addon-icon:hover {
1668
- color: #429eff !important;
1669
1681
  font-weight: bold;
1682
+ opacity: 0.5;
1670
1683
  }
1671
1684
  .addon-icon:active {
1672
1685
  opacity: 0.7;