widget.qw 1.0.16 → 1.0.18

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/build/style.css CHANGED
@@ -817,27 +817,27 @@
817
817
  /* 防止压缩 */
818
818
  }
819
819
 
820
- .widget[data-v-11b655b2] {
820
+ .widget[data-v-116c9e42] {
821
821
  /* 统一字段间距 */
822
822
  }
823
- .widget[data-v-11b655b2] .van-cell {
823
+ .widget[data-v-116c9e42] .van-cell {
824
824
  align-items: center;
825
825
  }
826
- .widget[data-v-11b655b2] .van-field__label {
826
+ .widget[data-v-116c9e42] .van-field__label {
827
827
  width: 90px;
828
828
  flex: none;
829
829
  }
830
- .widget .readonly-field[data-v-11b655b2] {
830
+ .widget .readonly-field[data-v-116c9e42] {
831
831
  /* 添加必填星号对齐 */
832
832
  }
833
- .widget .readonly-field[data-v-11b655b2] .van-field__control {
833
+ .widget .readonly-field[data-v-116c9e42] .van-field__control {
834
834
  color: #323233;
835
835
  /* 修改文字颜色与普通字段一致 */
836
836
  padding-right: 16px;
837
837
  }
838
- .widget .readonly-field.van-field--required[data-v-11b655b2] .van-field__label::before {
838
+ .widget .readonly-field.van-field--required[data-v-116c9e42] .van-field__label::before {
839
839
  margin-right: 4px;
840
840
  }
841
- .widget .readonly-field[data-v-11b655b2] {
841
+ .widget .readonly-field[data-v-116c9e42] {
842
842
  margin: 4px 0;
843
843
  }
@@ -20661,7 +20661,7 @@ const _sfc_main$1 = {
20661
20661
  };
20662
20662
  }
20663
20663
  };
20664
- var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-11b655b2] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-11b655b2] .van-cell {\n align-items: center;\n}\n.widget[data-v-11b655b2] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-11b655b2] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-11b655b2] .van-field__control {\n color: #323233;\n /* \u4FEE\u6539\u6587\u5B57\u989C\u8272\u4E0E\u666E\u901A\u5B57\u6BB5\u4E00\u81F4 */\n padding-right: 16px;\n}\n.widget .readonly-field.van-field--required[data-v-11b655b2] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-11b655b2] {\n margin: 4px 0;\n}')();
20664
+ var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-116c9e42] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-116c9e42] .van-cell {\n align-items: center;\n}\n.widget[data-v-116c9e42] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-116c9e42] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-116c9e42] .van-field__control {\n color: #323233;\n /* \u4FEE\u6539\u6587\u5B57\u989C\u8272\u4E0E\u666E\u901A\u5B57\u6BB5\u4E00\u81F4 */\n padding-right: 16px;\n}\n.widget .readonly-field.van-field--required[data-v-116c9e42] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-116c9e42] {\n margin: 4px 0;\n}')();
20665
20665
  const _hoisted_1 = {
20666
20666
  class: "widget"
20667
20667
  };
@@ -20723,6 +20723,11 @@ const _sfc_main = {
20723
20723
  data2.options = options;
20724
20724
  });
20725
20725
  }));
20726
+ const onShow = () => {
20727
+ if (isReadonly.value || isDisabled.value || isGone.value)
20728
+ return;
20729
+ data2.isShow = true;
20730
+ };
20726
20731
  const onConfirm = ({
20727
20732
  selectedOptions
20728
20733
  }) => {
@@ -20748,10 +20753,10 @@ const _sfc_main = {
20748
20753
  readonly: "",
20749
20754
  required: unref(isRequired),
20750
20755
  disabled: unref(isDisabled),
20751
- onClick: _cache[1] || (_cache[1] = ($event) => data2.isShow = true)
20756
+ onClick: onShow
20752
20757
  }, null, 8, ["modelValue", "label", "placeholder", "required", "disabled"]), createVNode(_component_van_popup, {
20753
20758
  show: data2.isShow,
20754
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => data2.isShow = $event),
20759
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => data2.isShow = $event),
20755
20760
  "destroy-on-close": "",
20756
20761
  round: "",
20757
20762
  position: "bottom"
@@ -20766,7 +20771,7 @@ const _sfc_main = {
20766
20771
  };
20767
20772
  }
20768
20773
  };
20769
- var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-11b655b2"]]);
20774
+ var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-116c9e42"]]);
20770
20775
  const secret_notify = () => {
20771
20776
  showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
20772
20777
  };
@@ -20664,7 +20664,7 @@ var __async = (__this, __arguments, generator) => {
20664
20664
  };
20665
20665
  }
20666
20666
  };
20667
- var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-11b655b2] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-11b655b2] .van-cell {\n align-items: center;\n}\n.widget[data-v-11b655b2] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-11b655b2] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-11b655b2] .van-field__control {\n color: #323233;\n /* \u4FEE\u6539\u6587\u5B57\u989C\u8272\u4E0E\u666E\u901A\u5B57\u6BB5\u4E00\u81F4 */\n padding-right: 16px;\n}\n.widget .readonly-field.van-field--required[data-v-11b655b2] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-11b655b2] {\n margin: 4px 0;\n}')();
20667
+ var SingleApiPicker_vue_vue_type_style_index_0_scoped_true_lang = /* @__PURE__ */ (() => '@charset "UTF-8";\n.widget[data-v-116c9e42] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-116c9e42] .van-cell {\n align-items: center;\n}\n.widget[data-v-116c9e42] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-116c9e42] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-116c9e42] .van-field__control {\n color: #323233;\n /* \u4FEE\u6539\u6587\u5B57\u989C\u8272\u4E0E\u666E\u901A\u5B57\u6BB5\u4E00\u81F4 */\n padding-right: 16px;\n}\n.widget .readonly-field.van-field--required[data-v-116c9e42] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-116c9e42] {\n margin: 4px 0;\n}')();
20668
20668
  const _hoisted_1 = {
20669
20669
  class: "widget"
20670
20670
  };
@@ -20726,6 +20726,11 @@ var __async = (__this, __arguments, generator) => {
20726
20726
  data2.options = options;
20727
20727
  });
20728
20728
  }));
20729
+ const onShow = () => {
20730
+ if (isReadonly.value || isDisabled.value || isGone.value)
20731
+ return;
20732
+ data2.isShow = true;
20733
+ };
20729
20734
  const onConfirm = ({
20730
20735
  selectedOptions
20731
20736
  }) => {
@@ -20751,10 +20756,10 @@ var __async = (__this, __arguments, generator) => {
20751
20756
  readonly: "",
20752
20757
  required: vue.unref(isRequired),
20753
20758
  disabled: vue.unref(isDisabled),
20754
- onClick: _cache[1] || (_cache[1] = ($event) => data2.isShow = true)
20759
+ onClick: onShow
20755
20760
  }, null, 8, ["modelValue", "label", "placeholder", "required", "disabled"]), vue.createVNode(_component_van_popup, {
20756
20761
  show: data2.isShow,
20757
- "onUpdate:show": _cache[2] || (_cache[2] = ($event) => data2.isShow = $event),
20762
+ "onUpdate:show": _cache[1] || (_cache[1] = ($event) => data2.isShow = $event),
20758
20763
  "destroy-on-close": "",
20759
20764
  round: "",
20760
20765
  position: "bottom"
@@ -20769,7 +20774,7 @@ var __async = (__this, __arguments, generator) => {
20769
20774
  };
20770
20775
  }
20771
20776
  };
20772
- var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-11b655b2"]]);
20777
+ var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-116c9e42"]]);
20773
20778
  const secret_notify = () => {
20774
20779
  showNotify({ type: "danger", message: "\u4E25\u683C\u6267\u884C\u4FE1\u606F\u4FDD\u5BC6\u8981\u6C42\uFF0C\u5207\u5B9E\u9632\u8303\u4F01\u4E1A\u6CC4\u5BC6\u98CE\u9669", duration: 3e3 });
20775
20780
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.16",
4
+ "version": "1.0.18",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="widget">
3
3
  <van-field v-model="formatLabel" is-link :label="props.label" :placeholder="props.placeholder" readonly
4
- :required="isRequired" :disabled="isDisabled" @click="data.isShow = true" />
4
+ :required="isRequired" :disabled="isDisabled" @click="onShow" />
5
5
  <van-popup v-model:show="data.isShow" destroy-on-close round position="bottom">
6
6
  <van-picker :columns="data.options" @cancel="onCancel" @confirm="onConfirm" />
7
7
  </van-popup>
@@ -62,6 +62,13 @@ onMounted(async () => {
62
62
  })
63
63
  })
64
64
 
65
+ const onShow=()=>{
66
+ if(isReadonly.value || isDisabled.value || isGone.value)
67
+ return
68
+
69
+ data.isShow = true
70
+ }
71
+
65
72
  const onConfirm = ({ selectedOptions }) => {
66
73
  console.log("selectedOptions: " + selectedOptions)
67
74
  let selectOption = selectedOptions[selectedOptions.length - 1]