widget.qw 1.0.19 → 1.0.20

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-67868eb2] {
820
+ .widget[data-v-09be9e95] {
821
821
  /* 统一字段间距 */
822
822
  }
823
- .widget[data-v-67868eb2] .van-cell {
823
+ .widget[data-v-09be9e95] .van-cell {
824
824
  align-items: center;
825
825
  }
826
- .widget[data-v-67868eb2] .van-field__label {
826
+ .widget[data-v-09be9e95] .van-field__label {
827
827
  width: 90px;
828
828
  flex: none;
829
829
  }
830
- .widget .readonly-field[data-v-67868eb2] {
830
+ .widget .readonly-field[data-v-09be9e95] {
831
831
  /* 添加必填星号对齐 */
832
832
  }
833
- .widget .readonly-field[data-v-67868eb2] .van-field__control {
833
+ .widget .readonly-field[data-v-09be9e95] .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-67868eb2] .van-field__label::before {
838
+ .widget .readonly-field.van-field--required[data-v-09be9e95] .van-field__label::before {
839
839
  margin-right: 4px;
840
840
  }
841
- .widget .readonly-field[data-v-67868eb2] {
841
+ .widget .readonly-field[data-v-09be9e95] {
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-67868eb2] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-67868eb2] .van-cell {\n align-items: center;\n}\n.widget[data-v-67868eb2] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-67868eb2] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-67868eb2] .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-67868eb2] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-67868eb2] {\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-09be9e95] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-09be9e95] .van-cell {\n align-items: center;\n}\n.widget[data-v-09be9e95] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-09be9e95] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-09be9e95] .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-09be9e95] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-09be9e95] {\n margin: 4px 0;\n}')();
20665
20665
  const _hoisted_1 = {
20666
20666
  class: "widget"
20667
20667
  };
@@ -20692,10 +20692,9 @@ const _sfc_main = {
20692
20692
  type: String,
20693
20693
  default: ""
20694
20694
  },
20695
- query: {
20696
- type: Function,
20697
- default: () => {
20698
- }
20695
+ options: {
20696
+ type: Array,
20697
+ default: []
20699
20698
  }
20700
20699
  },
20701
20700
  emits: ["update:modelValue", "select"],
@@ -20711,15 +20710,13 @@ const _sfc_main = {
20711
20710
  isDisabled
20712
20711
  } = util.props2auth(props);
20713
20712
  const data2 = reactive({
20714
- isShow: false,
20715
- options: []
20713
+ isShow: false
20716
20714
  });
20717
20715
  const formatLabel = computed(() => {
20718
- let one = data2.options.find((item) => item.value == modelValue.value);
20716
+ let one = props.options.find((item) => item.value == modelValue.value);
20719
20717
  return one ? one.text : "";
20720
20718
  });
20721
20719
  onMounted(() => __async(this, null, function* () {
20722
- data2.options = yield props.query();
20723
20720
  }));
20724
20721
  const onShow = () => {
20725
20722
  if (isReadonly.value || isDisabled.value || isGone.value)
@@ -20760,7 +20757,7 @@ const _sfc_main = {
20760
20757
  position: "bottom"
20761
20758
  }, {
20762
20759
  default: withCtx(() => [createVNode(_component_van_picker, {
20763
- columns: data2.options,
20760
+ columns: props.options,
20764
20761
  onCancel,
20765
20762
  onConfirm
20766
20763
  }, null, 8, ["columns"])]),
@@ -20769,7 +20766,7 @@ const _sfc_main = {
20769
20766
  };
20770
20767
  }
20771
20768
  };
20772
- var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67868eb2"]]);
20769
+ var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09be9e95"]]);
20773
20770
  const secret_notify = () => {
20774
20771
  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
20772
  };
@@ -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-67868eb2] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-67868eb2] .van-cell {\n align-items: center;\n}\n.widget[data-v-67868eb2] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-67868eb2] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-67868eb2] .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-67868eb2] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-67868eb2] {\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-09be9e95] {\n /* \u7EDF\u4E00\u5B57\u6BB5\u95F4\u8DDD */\n}\n.widget[data-v-09be9e95] .van-cell {\n align-items: center;\n}\n.widget[data-v-09be9e95] .van-field__label {\n width: 90px;\n flex: none;\n}\n.widget .readonly-field[data-v-09be9e95] {\n /* \u6DFB\u52A0\u5FC5\u586B\u661F\u53F7\u5BF9\u9F50 */\n}\n.widget .readonly-field[data-v-09be9e95] .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-09be9e95] .van-field__label::before {\n margin-right: 4px;\n}\n.widget .readonly-field[data-v-09be9e95] {\n margin: 4px 0;\n}')();
20668
20668
  const _hoisted_1 = {
20669
20669
  class: "widget"
20670
20670
  };
@@ -20695,10 +20695,9 @@ var __async = (__this, __arguments, generator) => {
20695
20695
  type: String,
20696
20696
  default: ""
20697
20697
  },
20698
- query: {
20699
- type: Function,
20700
- default: () => {
20701
- }
20698
+ options: {
20699
+ type: Array,
20700
+ default: []
20702
20701
  }
20703
20702
  },
20704
20703
  emits: ["update:modelValue", "select"],
@@ -20714,15 +20713,13 @@ var __async = (__this, __arguments, generator) => {
20714
20713
  isDisabled
20715
20714
  } = util.props2auth(props);
20716
20715
  const data2 = vue.reactive({
20717
- isShow: false,
20718
- options: []
20716
+ isShow: false
20719
20717
  });
20720
20718
  const formatLabel = vue.computed(() => {
20721
- let one = data2.options.find((item) => item.value == modelValue.value);
20719
+ let one = props.options.find((item) => item.value == modelValue.value);
20722
20720
  return one ? one.text : "";
20723
20721
  });
20724
20722
  vue.onMounted(() => __async(this, null, function* () {
20725
- data2.options = yield props.query();
20726
20723
  }));
20727
20724
  const onShow = () => {
20728
20725
  if (isReadonly.value || isDisabled.value || isGone.value)
@@ -20763,7 +20760,7 @@ var __async = (__this, __arguments, generator) => {
20763
20760
  position: "bottom"
20764
20761
  }, {
20765
20762
  default: vue.withCtx(() => [vue.createVNode(_component_van_picker, {
20766
- columns: data2.options,
20763
+ columns: props.options,
20767
20764
  onCancel,
20768
20765
  onConfirm
20769
20766
  }, null, 8, ["columns"])]),
@@ -20772,7 +20769,7 @@ var __async = (__this, __arguments, generator) => {
20772
20769
  };
20773
20770
  }
20774
20771
  };
20775
- var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-67868eb2"]]);
20772
+ var SingleApiPicker = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-09be9e95"]]);
20776
20773
  const secret_notify = () => {
20777
20774
  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 });
20778
20775
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "widget.qw",
3
3
  "private": false,
4
- "version": "1.0.19",
4
+ "version": "1.0.20",
5
5
  "description": "marqstree Vue3组件库",
6
6
  "main": "build/widget.qw.es.js",
7
7
  "keywords": [
@@ -3,7 +3,7 @@
3
3
  <van-field v-model="formatLabel" is-link :label="props.label" :placeholder="props.placeholder" readonly
4
4
  :required="isRequired" :disabled="isDisabled" @click="onShow" />
5
5
  <van-popup v-model:show="data.isShow" destroy-on-close round position="bottom">
6
- <van-picker :columns="data.options" @cancel="onCancel" @confirm="onConfirm" />
6
+ <van-picker :columns="props.options" @cancel="onCancel" @confirm="onConfirm" />
7
7
  </van-popup>
8
8
  </div>
9
9
  </template>
@@ -38,9 +38,9 @@ const props = defineProps({
38
38
  type: String,
39
39
  default: "",
40
40
  },
41
- query: {
42
- type: Function,
43
- default: () => { }
41
+ options: {
42
+ type:Array,
43
+ default: []
44
44
  }
45
45
  })
46
46
 
@@ -48,16 +48,14 @@ const emit = defineEmits(['update:modelValue', 'select'])
48
48
  const modelValue = useVModel(props, 'modelValue', emit)
49
49
  const { isRequired, isReadonly, isGone, isDisabled } = util.props2auth(props);
50
50
  const data = reactive({
51
- isShow: false,
52
- options: []
51
+ isShow: false
53
52
  })
54
53
  const formatLabel = computed(() => {
55
- let one = data.options.find(item => item.value == modelValue.value)
54
+ let one = props.options.find(item => item.value == modelValue.value)
56
55
  return one ? one.text : ''
57
56
  })
58
57
 
59
58
  onMounted(async () => {
60
- data.options = await props.query()
61
59
  })
62
60
 
63
61
  const onShow=()=>{