@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.amd.js CHANGED
@@ -7657,7 +7657,10 @@ define((function () { 'use strict';
7657
7657
  },
7658
7658
  init() {
7659
7659
  this.setStatus(this.$data.value);
7660
- if (formConfig.disabled) {
7660
+ let disabled = typeof formConfig.disabled === "function"
7661
+ ? formConfig.disabled()
7662
+ : formConfig.disabled;
7663
+ if (disabled) {
7661
7664
  this.disable();
7662
7665
  }
7663
7666
  this.setClickEvent();
@@ -8394,7 +8397,7 @@ define((function () { 'use strict';
8394
8397
  <div class="pops-panel-item-left-text">
8395
8398
  <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
8396
8399
  <div class="pops-panel-input pops-user-select-none">
8397
- <input type="${inputType}" placeholder="${formConfig.placeholder}">
8400
+ <input type="${inputType}" placeholder="${formConfig.placeholder ?? ""}">
8398
8401
  </div>
8399
8402
  `);
8400
8403
  const PopsPanelInput = {
@@ -8426,7 +8429,11 @@ define((function () { 'use strict';
8426
8429
  }
8427
8430
  }
8428
8431
  this.setInputChangeEvent();
8429
- if (formConfig.disabled) {
8432
+ // 是否禁用复选框
8433
+ let disabled = typeof formConfig.disabled === "function"
8434
+ ? formConfig.disabled()
8435
+ : formConfig.disabled;
8436
+ if (disabled) {
8430
8437
  this.disable();
8431
8438
  }
8432
8439
  if (typeof formConfig.handlerCallBack === "function") {
@@ -8604,7 +8611,10 @@ define((function () { 'use strict';
8604
8611
  init() {
8605
8612
  this.setValue(this.$data.value);
8606
8613
  this.setChangeEvent();
8607
- if (formConfig.disabled) {
8614
+ let disabled = typeof formConfig.disabled === "function"
8615
+ ? formConfig.disabled()
8616
+ : formConfig.disabled;
8617
+ if (disabled) {
8608
8618
  this.disable();
8609
8619
  }
8610
8620
  },
@@ -8683,7 +8693,10 @@ define((function () { 'use strict';
8683
8693
  this.initOption();
8684
8694
  this.setChangeEvent();
8685
8695
  this.setClickEvent();
8686
- if (formConfig.disabled) {
8696
+ let disabled = typeof formConfig.disabled === "function"
8697
+ ? formConfig.disabled()
8698
+ : formConfig.disabled;
8699
+ if (disabled) {
8687
8700
  this.disable();
8688
8701
  }
8689
8702
  },
@@ -11504,7 +11517,7 @@ define((function () { 'use strict';
11504
11517
  /** 配置 */
11505
11518
  config = {
11506
11519
  /** 版本号 */
11507
- version: "2025.7.13",
11520
+ version: "2025.7.15",
11508
11521
  cssText: PopsCSS,
11509
11522
  /** icon图标的svg代码 */
11510
11523
  iconSVG: PopsIcon.$data,