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