@yoooloo42/joker 1.0.74 → 1.0.77

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.cjs.js CHANGED
@@ -22749,18 +22749,12 @@ const style = vue.reactive({
22749
22749
  });
22750
22750
 
22751
22751
  const hdlGetValue = {
22752
- gbt2260(result) {
22753
- props.dataBox.fieldsValue[props.item.fieldName] = !!result.code6 ? result.code6 : '';
22754
- },
22755
22752
  ly0d7group(result) {
22756
22753
  props.dataBox.fieldsValue[props.item.fieldName] = !!result.value ? result.value : [];
22757
22754
  },
22758
22755
  ly0d7postal(result) {
22759
22756
  props.dataBox.fieldsValue[props.item.fieldName] = !!result.value ? result.value : [];
22760
22757
  },
22761
- ly0d7price(result) {
22762
- props.dataBox.fieldsValue[props.item.fieldName] = !!result.value ? result.value : [];
22763
- },
22764
22758
  ly0d7size(result) {
22765
22759
  props.dataBox.fieldsValue[props.item.fieldName] = !!result.value ? result.value : [];
22766
22760
  },
@@ -23191,12 +23185,10 @@ return (_ctx, _cache) => {
23191
23185
  (__props.item.inputType === 'd3gbt2260')
23192
23186
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
23193
23187
  vue.createVNode(_component_ly0gbt2260, {
23194
- myProps: {
23195
- value: __props.dataBox.fieldsValue[__props.item.fieldName] ? __props.dataBox.fieldsValue[__props.item.fieldName] : '',
23196
- readOnly: __props.item.readOnly
23197
- },
23198
- onGetValue: hdlGetValue.gbt2260
23199
- }, null, 8 /* PROPS */, ["myProps", "onGetValue"])
23188
+ myProps: {readOnly: __props.item.readOnly},
23189
+ modelValue: __props.dataBox.fieldsValue[__props.item.fieldName],
23190
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((__props.dataBox.fieldsValue[__props.item.fieldName]) = $event))
23191
+ }, null, 8 /* PROPS */, ["myProps", "modelValue"])
23200
23192
  ]))
23201
23193
  : vue.createCommentVNode("v-if", true),
23202
23194
  vue.createCommentVNode(" 商品分类 "),
@@ -23228,11 +23220,11 @@ return (_ctx, _cache) => {
23228
23220
  ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, [
23229
23221
  vue.createVNode(_component_ly0d7price, {
23230
23222
  myProps: {
23231
- value: __props.dataBox.fieldsValue[__props.item.fieldName] ? __props.dataBox.fieldsValue[__props.item.fieldName] : [],
23232
- readOnly: __props.item.readOnly,
23223
+ readOnly: __props.item.readOnly
23233
23224
  },
23234
- onGetValue: hdlGetValue.ly0d7price
23235
- }, null, 8 /* PROPS */, ["myProps", "onGetValue"])
23225
+ modelValue: __props.dataBox.fieldsValue[__props.item.fieldName],
23226
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((__props.dataBox.fieldsValue[__props.item.fieldName]) = $event))
23227
+ }, null, 8 /* PROPS */, ["myProps", "modelValue"])
23236
23228
  ]))
23237
23229
  : vue.createCommentVNode("v-if", true),
23238
23230
  vue.createCommentVNode(" 商品规格 "),
@@ -41804,22 +41796,32 @@ var upload = {
41804
41796
  const _hoisted_1$5 = { style: {"width":"100%"} };
41805
41797
  const _hoisted_2$5 = { style: {"width":"30%"} };
41806
41798
 
41799
+ // 遵循 Vue 3 v-model 规范,使用 modelValue
41807
41800
 
41808
41801
  var script$5 = {
41809
41802
  __name: 'index',
41810
41803
  props: {
41804
+ // modelValue: 外部 v-model 绑定的值
41805
+ modelValue: {
41806
+ type: String,
41807
+ default: () => ''
41808
+ },
41811
41809
  myProps: {
41812
- type: Object,
41813
- default: () => ({ readOnly: false, value: '', _id: null }) // 提供清晰的默认值
41810
+ readOnly: {
41811
+ type: Boolean,
41812
+ default: false
41813
+ }
41814
41814
  }
41815
+
41815
41816
  },
41816
- emits: ['get-value'],
41817
+ emits: ['update:modelValue', 'change'],
41817
41818
  setup(__props, { emit: __emit }) {
41818
41819
 
41819
41820
  const props = __props;
41821
+ // 遵循 Vue 3 v-model 规范,使用 update:modelValue 事件
41820
41822
  const emit = __emit;
41821
41823
 
41822
- const value = vue.reactive({
41824
+ const value = vue.computed(() => props.modelValue || {
41823
41825
  code2: '',
41824
41826
  text2: '',
41825
41827
  code4: '',
@@ -41827,6 +41829,7 @@ const value = vue.reactive({
41827
41829
  code6: '',
41828
41830
  text6: '',
41829
41831
  });
41832
+
41830
41833
  const popup = vue.reactive({
41831
41834
  visible: false,
41832
41835
  select: {
@@ -41920,16 +41923,8 @@ const hdlSubmit = () => {
41920
41923
  value.code6 = popup.select.code6;
41921
41924
  const foundItem6 = popup.select.arrCode6.find(i => i.code6 === value.code6);
41922
41925
  value.text6 = foundItem6 ? foundItem6.text6 : '';
41923
- emit("get-value", {
41924
- code6: value.code6
41925
- ? value.code6
41926
- : value.code4
41927
- ? value.code4
41928
- : value.code2
41929
- ? value.code2
41930
- : '',
41931
- _id: '_id' in props.myProps ? props.myProps._id : null,
41932
- });
41926
+ // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
41927
+ emit("update:modelValue", value.code6 ?? value.code4 ?? value.code2 ?? '');
41933
41928
  popup.visible = false;
41934
41929
  };
41935
41930
 
@@ -41996,12 +41991,12 @@ return (_ctx, _cache) => {
41996
41991
  vue.createElementVNode("td", null, [
41997
41992
  vue.createElementVNode("span", {
41998
41993
  style: vue.normalizeStyle(style.value.code)
41999
- }, vue.toDisplayString('[' + (value.code2 ? value.code2 : '省') + ']'), 5 /* TEXT, STYLE */)
41994
+ }, vue.toDisplayString('[' + (value.value.code2 ? value.value.code2 : '省') + ']'), 5 /* TEXT, STYLE */)
42000
41995
  ]),
42001
41996
  vue.createElementVNode("td", null, [
42002
41997
  vue.createElementVNode("span", {
42003
41998
  style: vue.normalizeStyle(style.value.text)
42004
- }, vue.toDisplayString(value.text2 ? value.text2 : ''), 5 /* TEXT, STYLE */)
41999
+ }, vue.toDisplayString(value.value.text2 ? value.value.text2 : ''), 5 /* TEXT, STYLE */)
42005
42000
  ])
42006
42001
  ]),
42007
42002
  vue.createElementVNode("tr", null, [
@@ -42009,12 +42004,12 @@ return (_ctx, _cache) => {
42009
42004
  vue.createElementVNode("td", null, [
42010
42005
  vue.createElementVNode("span", {
42011
42006
  style: vue.normalizeStyle(style.value.code)
42012
- }, vue.toDisplayString('[' + (value.code4 ? value.code4 : '市') + ']'), 5 /* TEXT, STYLE */)
42007
+ }, vue.toDisplayString('[' + (value.value.code4 ? value.value.code4 : '市') + ']'), 5 /* TEXT, STYLE */)
42013
42008
  ]),
42014
42009
  vue.createElementVNode("td", null, [
42015
42010
  vue.createElementVNode("span", {
42016
42011
  style: vue.normalizeStyle(style.value.text)
42017
- }, vue.toDisplayString(value.text4 ? value.text4 : ''), 5 /* TEXT, STYLE */)
42012
+ }, vue.toDisplayString(value.value.text4 ? value.value.text4 : ''), 5 /* TEXT, STYLE */)
42018
42013
  ])
42019
42014
  ]),
42020
42015
  vue.createElementVNode("tr", null, [
@@ -42022,12 +42017,12 @@ return (_ctx, _cache) => {
42022
42017
  vue.createElementVNode("td", null, [
42023
42018
  vue.createElementVNode("span", {
42024
42019
  style: vue.normalizeStyle(style.value.code)
42025
- }, vue.toDisplayString('[' + (value.code6 ? value.code6 : '县') + ']'), 5 /* TEXT, STYLE */)
42020
+ }, vue.toDisplayString('[' + (value.value.code6 ? value.value.code6 : '县') + ']'), 5 /* TEXT, STYLE */)
42026
42021
  ]),
42027
42022
  vue.createElementVNode("td", null, [
42028
42023
  vue.createElementVNode("span", {
42029
42024
  style: vue.normalizeStyle(style.value.text)
42030
- }, vue.toDisplayString(value.text6 ? value.text6 : ''), 5 /* TEXT, STYLE */)
42025
+ }, vue.toDisplayString(value.value.text6 ? value.value.text6 : ''), 5 /* TEXT, STYLE */)
42031
42026
  ])
42032
42027
  ])
42033
42028
  ])