@whitesev/pops 2.2.2 → 2.2.3

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/dist/index.umd.js CHANGED
@@ -7661,7 +7661,10 @@
7661
7661
  },
7662
7662
  init() {
7663
7663
  this.setStatus(this.$data.value);
7664
- if (formConfig.disabled) {
7664
+ let disabled = typeof formConfig.disabled === "function"
7665
+ ? formConfig.disabled()
7666
+ : formConfig.disabled;
7667
+ if (disabled) {
7665
7668
  this.disable();
7666
7669
  }
7667
7670
  this.setClickEvent();
@@ -8398,7 +8401,7 @@
8398
8401
  <div class="pops-panel-item-left-text">
8399
8402
  <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
8400
8403
  <div class="pops-panel-input pops-user-select-none">
8401
- <input type="${inputType}" placeholder="${formConfig.placeholder}">
8404
+ <input type="${inputType}" placeholder="${formConfig.placeholder ?? ""}">
8402
8405
  </div>
8403
8406
  `);
8404
8407
  const PopsPanelInput = {
@@ -8430,7 +8433,11 @@
8430
8433
  }
8431
8434
  }
8432
8435
  this.setInputChangeEvent();
8433
- if (formConfig.disabled) {
8436
+ // 是否禁用复选框
8437
+ let disabled = typeof formConfig.disabled === "function"
8438
+ ? formConfig.disabled()
8439
+ : formConfig.disabled;
8440
+ if (disabled) {
8434
8441
  this.disable();
8435
8442
  }
8436
8443
  if (typeof formConfig.handlerCallBack === "function") {
@@ -8608,7 +8615,10 @@
8608
8615
  init() {
8609
8616
  this.setValue(this.$data.value);
8610
8617
  this.setChangeEvent();
8611
- if (formConfig.disabled) {
8618
+ let disabled = typeof formConfig.disabled === "function"
8619
+ ? formConfig.disabled()
8620
+ : formConfig.disabled;
8621
+ if (disabled) {
8612
8622
  this.disable();
8613
8623
  }
8614
8624
  },
@@ -8687,7 +8697,10 @@
8687
8697
  this.initOption();
8688
8698
  this.setChangeEvent();
8689
8699
  this.setClickEvent();
8690
- if (formConfig.disabled) {
8700
+ let disabled = typeof formConfig.disabled === "function"
8701
+ ? formConfig.disabled()
8702
+ : formConfig.disabled;
8703
+ if (disabled) {
8691
8704
  this.disable();
8692
8705
  }
8693
8706
  },
@@ -11508,7 +11521,7 @@
11508
11521
  /** 配置 */
11509
11522
  config = {
11510
11523
  /** 版本号 */
11511
- version: "2025.7.13",
11524
+ version: "2025.7.15",
11512
11525
  cssText: PopsCSS,
11513
11526
  /** icon图标的svg代码 */
11514
11527
  iconSVG: PopsIcon.$data,