@yoooloo42/joker 1.0.100 → 1.0.102

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.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useRouter } from 'vue-router';
2
- import { reactive, ref, watch, createElementBlock, openBlock, Fragment, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, computed, resolveComponent, createBlock, withCtx, renderList, createTextVNode, createVNode, defineComponent, h, onMounted, onBeforeUnmount, nextTick as nextTick$1, unref } from 'vue';
2
+ import { reactive, ref, watch, createElementBlock, openBlock, Fragment, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, computed, resolveComponent, createBlock, unref, withCtx, renderList, createTextVNode, createVNode, isRef, defineComponent, h, onMounted, onBeforeUnmount, nextTick as nextTick$1 } from 'vue';
3
3
  import { ElMessage } from 'element-plus';
4
4
 
5
5
  function _mergeNamespaces(n, m) {
@@ -22615,6 +22615,7 @@ var script$g = {
22615
22615
 
22616
22616
  const props = __props;
22617
22617
 
22618
+ let formData_box = reactive(props.modelValue);
22618
22619
  const formProps_box = reactive(Object.assign({}, props.myProps));
22619
22620
  const scopeThis_box = reactive(Object.assign({}, props.scopeThis));
22620
22621
  const propsItem_box = reactive(Object.assign({}, props.item));
@@ -22623,7 +22624,7 @@ const input = reactive({
22623
22624
  placeholder: propsItem_box.placeholder || formProps_box.para.placeholder.input,
22624
22625
  showPassword: !!propsItem_box.showPassword,
22625
22626
  hdlCannotInput: value => { // 解决偶发不能输入的问题
22626
- props.modelValue[propsItem_box.fieldName] = value;
22627
+ formData_box[propsItem_box.fieldName] = value;
22627
22628
  }
22628
22629
  });
22629
22630
 
@@ -22633,12 +22634,12 @@ const select = reactive({
22633
22634
  if (propsItem_box.items) {
22634
22635
  return propsItem_box.items
22635
22636
  } else if (propsItem_box.hdlGetItems) {
22636
- return propsItem_box.hdlGetItems({formData: props.modelValue, scopeThis: scopeThis_box})
22637
+ return propsItem_box.hdlGetItems({formData: formData_box, scopeThis: scopeThis_box})
22637
22638
  }
22638
22639
  }),
22639
22640
  hdlChange: value => {
22640
22641
  if (propsItem_box.hdlChange) {
22641
- propsItem_box.hdlChange({formData: props.modelValue, scopeThis: scopeThis_box, value});
22642
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22642
22643
  }
22643
22644
  }
22644
22645
  });
@@ -22670,7 +22671,7 @@ const datePicker = reactive({
22670
22671
  }),
22671
22672
  hdlChange: value => {
22672
22673
  if (propsItem_box.hdlChange) {
22673
- propsItem_box.hdlChange({formData: props.modelValue, scopeThis: scopeThis_box, value});
22674
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22674
22675
  }
22675
22676
  }
22676
22677
  });
@@ -22678,7 +22679,7 @@ const datePicker = reactive({
22678
22679
  const ly0switch = reactive({
22679
22680
  hdlChange: value => {
22680
22681
  if (propsItem_box.hdlChange) {
22681
- propsItem_box.hdlChange({formData: props.modelValue, scopeThis: scopeThis_box, value});
22682
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22682
22683
  }
22683
22684
  }
22684
22685
  });
@@ -22686,7 +22687,7 @@ const ly0switch = reactive({
22686
22687
  const radioGroup = reactive({
22687
22688
  hdlChange: value => {
22688
22689
  if (propsItem_box.hdlChange) {
22689
- propsItem_box.hdlChange({formData: props.modelValue, scopeThis: scopeThis_box, value});
22690
+ propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
22690
22691
  }
22691
22692
  }
22692
22693
  });
@@ -22695,20 +22696,20 @@ const image = reactive({
22695
22696
  getSrc: computed(() => {
22696
22697
  if (
22697
22698
  propsItem_box.imageDelete &&
22698
- props.modelValue[propsItem_box.imageDelete] &&
22699
- (props.modelValue[propsItem_box.imageDelete] === true ||
22700
- props.modelValue[propsItem_box.imageDelete] === 'true') // 图片已删除
22699
+ formData_box[propsItem_box.imageDelete] &&
22700
+ (formData_box[propsItem_box.imageDelete] === true ||
22701
+ formData_box[propsItem_box.imageDelete] === 'true') // 图片已删除
22701
22702
  ) {
22702
22703
  return ['']
22703
22704
  }
22704
- if (props.modelValue[propsItem_box.fieldName]) {
22705
- return props.modelValue[propsItem_box.fieldName]
22705
+ if (formData_box[propsItem_box.fieldName]) {
22706
+ return formData_box[propsItem_box.fieldName]
22706
22707
  }
22707
22708
  return ['']
22708
22709
  }),
22709
22710
  delete: ()=>{
22710
- props.modelValue[propsItem_box.imageDelete] =
22711
- !props.modelValue[propsItem_box.imageDelete];
22711
+ formData_box[propsItem_box.imageDelete] =
22712
+ !formData_box[propsItem_box.imageDelete];
22712
22713
  }
22713
22714
  });
22714
22715
 
@@ -22716,32 +22717,32 @@ const images = reactive({
22716
22717
  getSrc: (itemImages, indexImages) => {
22717
22718
  if (
22718
22719
  !propsItem_box.imageDelete ||
22719
- !props.modelValue[propsItem_box.imageDelete].includes(itemImages)
22720
+ !formData_box[propsItem_box.imageDelete].includes(itemImages)
22720
22721
  ) {
22721
22722
  return itemImages
22722
22723
  }
22723
22724
  return ''
22724
22725
  },
22725
22726
  delete: (itemImages, indexImages) => {
22726
- if (!props.modelValue[propsItem_box.imageDelete].includes(itemImages)) {
22727
- props.modelValue[propsItem_box.imageDelete].push(itemImages);
22727
+ if (!formData_box[propsItem_box.imageDelete].includes(itemImages)) {
22728
+ formData_box[propsItem_box.imageDelete].push(itemImages);
22728
22729
  return
22729
22730
  }
22730
22731
 
22731
- props.modelValue[propsItem_box.imageDelete] = props.modelValue[propsItem_box.imageDelete].filter(i => {
22732
+ formData_box[propsItem_box.imageDelete] = formData_box[propsItem_box.imageDelete].filter(i => {
22732
22733
  return i !== itemImages
22733
22734
  });
22734
22735
  },
22735
22736
  show: computed(()=>{
22736
22737
  let result = [];
22737
22738
  if (!propsItem_box.imageDelete) {
22738
- props.modelValue[propsItem_box.fieldName].forEach(i => {
22739
+ formData_box[propsItem_box.fieldName].forEach(i => {
22739
22740
  result.push(i);
22740
22741
  });
22741
22742
  } else {
22742
- props.modelValue[propsItem_box.fieldName]
22743
+ formData_box[propsItem_box.fieldName]
22743
22744
  .filter(i => {
22744
- return !props.modelValue[propsItem_box.imageDelete].includes(i)
22745
+ return !formData_box[propsItem_box.imageDelete].includes(i)
22745
22746
  })
22746
22747
  .forEach(i => {
22747
22748
  result.push(i);
@@ -22759,49 +22760,49 @@ const video = reactive({
22759
22760
  src: computed(()=>{
22760
22761
  if (
22761
22762
  propsItem_box.videoDelete &&
22762
- props.modelValue[propsItem_box.videoDelete] &&
22763
- (props.modelValue[propsItem_box.videoDelete] === true ||
22764
- props.modelValue[propsItem_box.videoDelete] === 'true') // 图片已删除
22763
+ formData_box[propsItem_box.videoDelete] &&
22764
+ (formData_box[propsItem_box.videoDelete] === true ||
22765
+ formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
22765
22766
  ) {
22766
22767
  return ''
22767
22768
  }
22768
- if (props.modelValue[propsItem_box.fieldName]) {
22769
- return props.modelValue[propsItem_box.fieldName]
22769
+ if (formData_box[propsItem_box.fieldName]) {
22770
+ return formData_box[propsItem_box.fieldName]
22770
22771
  }
22771
22772
  return ''
22772
22773
  }),
22773
22774
  poster: computed(()=>{
22774
22775
  if (
22775
22776
  propsItem_box.videoDelete &&
22776
- props.modelValue[propsItem_box.videoDelete] &&
22777
- (props.modelValue[propsItem_box.videoDelete] === true ||
22778
- props.modelValue[propsItem_box.videoDelete] === 'true') // 图片已删除
22777
+ formData_box[propsItem_box.videoDelete] &&
22778
+ (formData_box[propsItem_box.videoDelete] === true ||
22779
+ formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
22779
22780
  ) {
22780
22781
  return ''
22781
22782
  }
22782
- if (props.modelValue[propsItem_box.poster]) {
22783
- return props.modelValue[propsItem_box.poster]
22783
+ if (formData_box[propsItem_box.poster]) {
22784
+ return formData_box[propsItem_box.poster]
22784
22785
  }
22785
22786
  return ''
22786
22787
  }),
22787
22788
  delete: ()=>{
22788
- props.modelValue[propsItem_box.videoDelete] =
22789
- !props.modelValue[propsItem_box.videoDelete];
22789
+ formData_box[propsItem_box.videoDelete] =
22790
+ !formData_box[propsItem_box.videoDelete];
22790
22791
  },
22791
22792
  });
22792
22793
 
22793
22794
  const download = reactive({
22794
22795
  fileName: propsItem_box.downloadFileName || formProps_box.para.download.fileName,
22795
22796
  downloadLabel: computed(() => {
22796
- if (!props.modelValue[propsItem_box.fieldName]) {
22797
+ if (!formData_box[propsItem_box.fieldName]) {
22797
22798
  return formProps_box.para.download.downloadLabelNoSrc
22798
22799
  }
22799
22800
  if (propsItem_box.hdlGetDownloadLabel) {
22800
- return propsItem_box.hdlGetDownloadLabel({formData: props.modelValue, scopeThis: scopeThis_box})
22801
+ return propsItem_box.hdlGetDownloadLabel({formData: formData_box, scopeThis: scopeThis_box})
22801
22802
  }
22802
22803
  return formProps_box.para.download.downloadLabel
22803
22804
  }),
22804
- downloadSrc: props.modelValue[propsItem_box.fieldName] || ''
22805
+ downloadSrc: formData_box[propsItem_box.fieldName] || ''
22805
22806
  });
22806
22807
 
22807
22808
  const upload = reactive({
@@ -22863,34 +22864,34 @@ return (_ctx, _cache) => {
22863
22864
  ? (openBlock(), createElementBlock("div", {
22864
22865
  key: 0,
22865
22866
  style: normalizeStyle(style.text(propsItem_box, formProps_box))
22866
- }, toDisplayString(props.modelValue[propsItem_box.fieldName] ? props.modelValue[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
22867
+ }, toDisplayString(unref(formData_box)[propsItem_box.fieldName] ? unref(formData_box)[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
22867
22868
  : createCommentVNode("v-if", true),
22868
22869
  (propsItem_box.inputType === 'text0')
22869
22870
  ? (openBlock(), createElementBlock("div", {
22870
22871
  key: 1,
22871
22872
  style: normalizeStyle(style.text0(propsItem_box))
22872
- }, toDisplayString(props.modelValue[propsItem_box.fieldName] ? props.modelValue[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
22873
+ }, toDisplayString(unref(formData_box)[propsItem_box.fieldName] ? unref(formData_box)[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
22873
22874
  : createCommentVNode("v-if", true),
22874
22875
  (!propsItem_box.inputType)
22875
22876
  ? (openBlock(), createElementBlock("div", {
22876
22877
  key: 2,
22877
22878
  style: normalizeStyle(style.text(propsItem_box, formProps_box))
22878
- }, toDisplayString(props.modelValue[propsItem_box.fieldName] ? props.modelValue[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
22879
+ }, toDisplayString(unref(formData_box)[propsItem_box.fieldName] ? unref(formData_box)[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
22879
22880
  : createCommentVNode("v-if", true),
22880
22881
  (propsItem_box.inputType === 'expression')
22881
22882
  ? (openBlock(), createElementBlock("div", {
22882
22883
  key: 3,
22883
22884
  style: normalizeStyle(style.text(propsItem_box, formProps_box))
22884
- }, toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData: props.modelValue, scopeThis: __props.scopeThis})
22885
- ? propsItem_box.hdlExpression({formData: props.modelValue, scopeThis: scopeThis_box})
22885
+ }, toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData: unref(formData_box), scopeThis: __props.scopeThis})
22886
+ ? propsItem_box.hdlExpression({formData: unref(formData_box), scopeThis: scopeThis_box})
22886
22887
  : ' '), 5 /* TEXT, STYLE */))
22887
22888
  : createCommentVNode("v-if", true),
22888
22889
  (propsItem_box.inputType === 'expression0')
22889
22890
  ? (openBlock(), createElementBlock("div", {
22890
22891
  key: 4,
22891
22892
  style: normalizeStyle(style.text0(propsItem_box))
22892
- }, toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData: props.modelValue, scopeThis: scopeThis_box})
22893
- ? propsItem_box.hdlExpression({formData: props.modelValue, scopeThis: scopeThis_box})
22893
+ }, toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData: unref(formData_box), scopeThis: scopeThis_box})
22894
+ ? propsItem_box.hdlExpression({formData: unref(formData_box), scopeThis: scopeThis_box})
22894
22895
  : ' '), 5 /* TEXT, STYLE */))
22895
22896
  : createCommentVNode("v-if", true),
22896
22897
  (propsItem_box.inputType === 'line')
@@ -22903,8 +22904,8 @@ return (_ctx, _cache) => {
22903
22904
  (propsItem_box.inputType === 'input')
22904
22905
  ? (openBlock(), createBlock(_component_el_input, {
22905
22906
  key: 6,
22906
- modelValue: props.modelValue[propsItem_box.fieldName],
22907
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
22907
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
22908
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
22908
22909
  placeholder: input.placeholder,
22909
22910
  style: normalizeStyle(style.input(propsItem_box, formProps_box)),
22910
22911
  onInput: input.hdlCannotInput,
@@ -22915,8 +22916,8 @@ return (_ctx, _cache) => {
22915
22916
  ? (openBlock(), createBlock(_component_el_select, {
22916
22917
  key: 7,
22917
22918
  class: "deep-input",
22918
- modelValue: props.modelValue[propsItem_box.fieldName],
22919
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
22919
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
22920
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
22920
22921
  placeholder: select.placeholder,
22921
22922
  filterable: "",
22922
22923
  style: normalizeStyle(style.input(propsItem_box, formProps_box)),
@@ -22938,8 +22939,8 @@ return (_ctx, _cache) => {
22938
22939
  ? (openBlock(), createBlock(_component_el_date_picker, {
22939
22940
  key: 8,
22940
22941
  class: "deep-input",
22941
- modelValue: props.modelValue[propsItem_box.fieldName],
22942
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
22942
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
22943
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
22943
22944
  type: propsItem_box.type ? propsItem_box.type : 'datetime',
22944
22945
  placeholder: datePicker.placeholder,
22945
22946
  format: datePicker.format,
@@ -22950,8 +22951,8 @@ return (_ctx, _cache) => {
22950
22951
  (propsItem_box.inputType === 'input-number')
22951
22952
  ? (openBlock(), createBlock(_component_el_input_number, {
22952
22953
  key: 9,
22953
- modelValue: props.modelValue[propsItem_box.fieldName],
22954
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
22954
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
22955
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
22955
22956
  size: style.input_number(propsItem_box).facade.size,
22956
22957
  min: 'min' in propsItem_box ? propsItem_box.min : 1,
22957
22958
  max: 'max' in propsItem_box ? propsItem_box.max : 100,
@@ -22962,8 +22963,8 @@ return (_ctx, _cache) => {
22962
22963
  (propsItem_box.inputType === 'switch')
22963
22964
  ? (openBlock(), createBlock(_component_el_switch, {
22964
22965
  key: 10,
22965
- modelValue: props.modelValue[propsItem_box.fieldName],
22966
- "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
22966
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
22967
+ "onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
22967
22968
  "active-text": propsItem_box.activeText,
22968
22969
  "inactive-text": propsItem_box.inactiveText,
22969
22970
  "active-value": propsItem_box.activeValue,
@@ -22976,8 +22977,8 @@ return (_ctx, _cache) => {
22976
22977
  (propsItem_box.inputType === 'radio-group')
22977
22978
  ? (openBlock(), createBlock(_component_el_radio_group, {
22978
22979
  key: 11,
22979
- modelValue: props.modelValue[propsItem_box.fieldName],
22980
- "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
22980
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
22981
+ "onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
22981
22982
  disabled: !!propsItem_box.disabled,
22982
22983
  onChange: radioGroup.hdlChange
22983
22984
  }, {
@@ -23022,7 +23023,7 @@ return (_ctx, _cache) => {
23022
23023
  plain: style.button_group(propsItem_box, item0, item1).button.facade.plain,
23023
23024
  round: style.button_group(propsItem_box, item0, item1).button.facade.round,
23024
23025
  circle: style.button_group(propsItem_box, item0, item1).button.facade.circle,
23025
- onClick: $event => (item1.hdlClick ? item1.hdlClick({formData: props.modelValue, scopeThis: scopeThis_box}) : null),
23026
+ onClick: $event => (item1.hdlClick ? item1.hdlClick({formData: unref(formData_box), scopeThis: scopeThis_box}) : null),
23026
23027
  key: index1
23027
23028
  }, {
23028
23029
  default: withCtx(() => [
@@ -23056,15 +23057,15 @@ return (_ctx, _cache) => {
23056
23057
  }, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
23057
23058
  ]),
23058
23059
  createCommentVNode(" 设置了图片删除功能,同时图片不为空 "),
23059
- (!!propsItem_box.imageDelete && !!props.modelValue[propsItem_box.fieldName])
23060
+ (!!propsItem_box.imageDelete && !!unref(formData_box)[propsItem_box.fieldName])
23060
23061
  ? (openBlock(), createElementBlock("div", _hoisted_4$4, [
23061
23062
  createVNode(_component_el_button, {
23062
23063
  size: "small",
23063
- icon: !props.modelValue[propsItem_box.imageDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23064
+ icon: !unref(formData_box)[propsItem_box.imageDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23064
23065
  onClick: image.delete
23065
23066
  }, {
23066
23067
  default: withCtx(() => [
23067
- createTextVNode(toDisplayString(props.modelValue[propsItem_box.imageDelete] ? '图片已删除,恢复' : '删除'), 1 /* TEXT */)
23068
+ createTextVNode(toDisplayString(unref(formData_box)[propsItem_box.imageDelete] ? '图片已删除,恢复' : '删除'), 1 /* TEXT */)
23068
23069
  ]),
23069
23070
  _: 1 /* STABLE */
23070
23071
  }, 8 /* PROPS */, ["icon", "onClick"])
@@ -23075,7 +23076,7 @@ return (_ctx, _cache) => {
23075
23076
  createCommentVNode(" 多个图片 "),
23076
23077
  (propsItem_box.inputType === 'images')
23077
23078
  ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
23078
- (openBlock(true), createElementBlock(Fragment, null, renderList(props.modelValue[propsItem_box.fieldName], (itemImages, indexImages) => {
23079
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(formData_box)[propsItem_box.fieldName], (itemImages, indexImages) => {
23079
23080
  return (openBlock(), createElementBlock("div", {
23080
23081
  key: indexImages,
23081
23082
  style: normalizeStyle(style.images(propsItem_box, formProps_box).itemBox)
@@ -23095,7 +23096,7 @@ return (_ctx, _cache) => {
23095
23096
  onClick: $event => (images.delete(itemImages, indexImages))
23096
23097
  }, {
23097
23098
  default: withCtx(() => [
23098
- createTextVNode(toDisplayString(props.modelValue[propsItem_box.imageDelete].includes(itemImages) ? '恢复' : '删除'), 1 /* TEXT */)
23099
+ createTextVNode(toDisplayString(unref(formData_box)[propsItem_box.imageDelete].includes(itemImages) ? '恢复' : '删除'), 1 /* TEXT */)
23099
23100
  ]),
23100
23101
  _: 2 /* DYNAMIC */
23101
23102
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])
@@ -23112,8 +23113,8 @@ return (_ctx, _cache) => {
23112
23113
  style: normalizeStyle(style.richtext(propsItem_box, formProps_box))
23113
23114
  }, [
23114
23115
  createVNode(_component_ly0Richtext, {
23115
- modelValue: props.modelValue[propsItem_box.fieldName],
23116
- "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23116
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23117
+ "onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23117
23118
  myProps: richtextProps.value
23118
23119
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23119
23120
  ], 4 /* STYLE */))
@@ -23122,7 +23123,7 @@ return (_ctx, _cache) => {
23122
23123
  (propsItem_box.inputType === 'richtextShow')
23123
23124
  ? (openBlock(), createElementBlock("div", _hoisted_7, [
23124
23125
  createElementVNode("div", {
23125
- innerHTML: props.modelValue[propsItem_box.fieldName]
23126
+ innerHTML: unref(formData_box)[propsItem_box.fieldName]
23126
23127
  }, null, 8 /* PROPS */, _hoisted_8)
23127
23128
  ]))
23128
23129
  : createCommentVNode("v-if", true),
@@ -23154,15 +23155,15 @@ return (_ctx, _cache) => {
23154
23155
  ], 8 /* PROPS */, _hoisted_10)
23155
23156
  ]),
23156
23157
  createCommentVNode(" 设置了视频删除功能,同时视频不为空 "),
23157
- (!!propsItem_box.videoDelete && !!props.modelValue[propsItem_box.fieldName])
23158
+ (!!propsItem_box.videoDelete && !!unref(formData_box)[propsItem_box.fieldName])
23158
23159
  ? (openBlock(), createElementBlock("div", _hoisted_14, [
23159
23160
  createVNode(_component_el_button, {
23160
23161
  size: "small",
23161
- icon: !props.modelValue[propsItem_box.videoDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23162
+ icon: !unref(formData_box)[propsItem_box.videoDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
23162
23163
  onClick: video.delete
23163
23164
  }, {
23164
23165
  default: withCtx(() => [
23165
- createTextVNode(toDisplayString(!!props.modelValue[propsItem_box.videoDelete] ? '视频已删除,恢复' : '删除'), 1 /* TEXT */)
23166
+ createTextVNode(toDisplayString(!!unref(formData_box)[propsItem_box.videoDelete] ? '视频已删除,恢复' : '删除'), 1 /* TEXT */)
23166
23167
  ]),
23167
23168
  _: 1 /* STABLE */
23168
23169
  }, 8 /* PROPS */, ["icon", "onClick"])
@@ -23174,7 +23175,7 @@ return (_ctx, _cache) => {
23174
23175
  createCommentVNode(" 下载 "),
23175
23176
  (propsItem_box.inputType === 'download')
23176
23177
  ? (openBlock(), createElementBlock("div", _hoisted_15, [
23177
- (props.modelValue[propsItem_box.fieldName])
23178
+ (unref(formData_box)[propsItem_box.fieldName])
23178
23179
  ? (openBlock(), createElementBlock("a", {
23179
23180
  key: 0,
23180
23181
  style: normalizeStyle(style.download.style),
@@ -23193,8 +23194,8 @@ return (_ctx, _cache) => {
23193
23194
  (propsItem_box.inputType === 'upload')
23194
23195
  ? (openBlock(), createElementBlock("div", _hoisted_17, [
23195
23196
  createVNode(_component_ly0Upload, {
23196
- modelValue: props.modelValue[propsItem_box.fieldName],
23197
- "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23197
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23198
+ "onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23198
23199
  myProps: {uploadUrl: upload.uploadUrl}
23199
23200
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23200
23201
  ]))
@@ -23203,8 +23204,8 @@ return (_ctx, _cache) => {
23203
23204
  (propsItem_box.inputType === 'upload-drag')
23204
23205
  ? (openBlock(), createElementBlock("div", _hoisted_18, [
23205
23206
  createVNode(_component_ly0Upload_drag, {
23206
- modelValue: props.modelValue[propsItem_box.fieldName],
23207
- "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23207
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23208
+ "onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23208
23209
  myProps: {uploadUrl: upload.uploadUrl}
23209
23210
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23210
23211
  ]))
@@ -23213,8 +23214,8 @@ return (_ctx, _cache) => {
23213
23214
  (propsItem_box.inputType === 'upload-picture')
23214
23215
  ? (openBlock(), createElementBlock("div", _hoisted_19, [
23215
23216
  createVNode(_component_ly0Upload_picture, {
23216
- modelValue: props.modelValue[propsItem_box.fieldName],
23217
- "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23217
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23218
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23218
23219
  myProps: {uploadUrl: upload.uploadUrl_image}
23219
23220
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23220
23221
  ]))
@@ -23223,8 +23224,8 @@ return (_ctx, _cache) => {
23223
23224
  (propsItem_box.inputType === 'upload-picture-card')
23224
23225
  ? (openBlock(), createElementBlock("div", _hoisted_20, [
23225
23226
  createVNode(_component_ly0Upload_pictureCard, {
23226
- modelValue: props.modelValue[propsItem_box.fieldName],
23227
- "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23227
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23228
+ "onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23228
23229
  myProps: {uploadUrl: upload.uploadUrl_image}
23229
23230
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23230
23231
  ]))
@@ -23233,8 +23234,8 @@ return (_ctx, _cache) => {
23233
23234
  (propsItem_box.inputType === 'upload-avatar')
23234
23235
  ? (openBlock(), createElementBlock("div", _hoisted_21, [
23235
23236
  createVNode(_component_ly0Upload_avatar, {
23236
- modelValue: props.modelValue[propsItem_box.fieldName],
23237
- "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23237
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23238
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23238
23239
  myProps: {uploadUrl: upload.uploadUrl_image}
23239
23240
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23240
23241
  ]))
@@ -23243,8 +23244,8 @@ return (_ctx, _cache) => {
23243
23244
  (propsItem_box.inputType === 'upload-carplate')
23244
23245
  ? (openBlock(), createElementBlock("div", _hoisted_22, [
23245
23246
  createVNode(_component_ly0Upload_carplate, {
23246
- modelValue: props.modelValue[propsItem_box.fieldName],
23247
- "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23247
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23248
+ "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23248
23249
  myProps: {uploadUrl: upload.uploadUrl_carplate}
23249
23250
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23250
23251
  ]))
@@ -23253,8 +23254,8 @@ return (_ctx, _cache) => {
23253
23254
  (propsItem_box.inputType === 'd3gbt2260')
23254
23255
  ? (openBlock(), createElementBlock("div", _hoisted_23, [
23255
23256
  createVNode(_component_ly0gbt2260, {
23256
- modelValue: props.modelValue[propsItem_box.fieldName],
23257
- "onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23257
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23258
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23258
23259
  myProps: {readOnly: propsItem_box.readOnly}
23259
23260
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23260
23261
  ]))
@@ -23263,8 +23264,8 @@ return (_ctx, _cache) => {
23263
23264
  (propsItem_box.inputType === 'd7group')
23264
23265
  ? (openBlock(), createElementBlock("div", _hoisted_24, [
23265
23266
  createVNode(_component_ly0d7group, {
23266
- modelValue: props.modelValue[propsItem_box.fieldName],
23267
- "onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23267
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23268
+ "onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23268
23269
  myProps: {readOnly: propsItem_box.readOnly}
23269
23270
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23270
23271
  ]))
@@ -23273,8 +23274,8 @@ return (_ctx, _cache) => {
23273
23274
  (propsItem_box.inputType === 'd7postal')
23274
23275
  ? (openBlock(), createElementBlock("div", _hoisted_25, [
23275
23276
  createVNode(_component_ly0d7postal, {
23276
- modelValue: props.modelValue[propsItem_box.fieldName],
23277
- "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23277
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23278
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23278
23279
  myProps: {readOnly: propsItem_box.readOnly}
23279
23280
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23280
23281
  ]))
@@ -23283,8 +23284,8 @@ return (_ctx, _cache) => {
23283
23284
  (propsItem_box.inputType === 'd7price')
23284
23285
  ? (openBlock(), createElementBlock("div", _hoisted_26, [
23285
23286
  createVNode(_component_ly0d7price, {
23286
- modelValue: props.modelValue[propsItem_box.fieldName],
23287
- "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23287
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23288
+ "onUpdate:modelValue": _cache[16] || (_cache[16] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23288
23289
  myProps: {readOnly: propsItem_box.readOnly}
23289
23290
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23290
23291
  ]))
@@ -23293,8 +23294,8 @@ return (_ctx, _cache) => {
23293
23294
  (propsItem_box.inputType === 'd7size')
23294
23295
  ? (openBlock(), createElementBlock("div", _hoisted_27, [
23295
23296
  createVNode(_component_ly0d7size, {
23296
- modelValue: props.modelValue[propsItem_box.fieldName],
23297
- "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => ((props.modelValue[propsItem_box.fieldName]) = $event)),
23297
+ modelValue: unref(formData_box)[propsItem_box.fieldName],
23298
+ "onUpdate:modelValue": _cache[17] || (_cache[17] = $event => ((unref(formData_box)[propsItem_box.fieldName]) = $event)),
23298
23299
  myProps: {readOnly: propsItem_box.readOnly}
23299
23300
  }, null, 8 /* PROPS */, ["modelValue", "myProps"])
23300
23301
  ]))
@@ -23303,8 +23304,8 @@ return (_ctx, _cache) => {
23303
23304
  (propsItem_box.inputType === 'd7thumb')
23304
23305
  ? (openBlock(), createElementBlock("div", _hoisted_28, [
23305
23306
  createVNode(_component_ly0d7thumb, {
23306
- modelValue: props.modelValue,
23307
- "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => ((props.modelValue) = $event)),
23307
+ modelValue: unref(formData_box),
23308
+ "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23308
23309
  myProps: {
23309
23310
  thumb: {
23310
23311
  fieldName: propsItem_box.thumb.fieldName || formProps_box.para.ly0d7thumb.thumb.fieldName,
@@ -23358,6 +23359,7 @@ var script$f = {
23358
23359
 
23359
23360
  const props = __props;
23360
23361
 
23362
+ let formData_box = reactive(props.modelValue);
23361
23363
  const formProps_box = reactive(Object.assign({}, props.myProps));
23362
23364
  const scopeThis_box = reactive(Object.assign({}, props.scopeThis));
23363
23365
 
@@ -23375,7 +23377,7 @@ const hdl = {
23375
23377
  if(formProps_box.submit.handle){
23376
23378
  // 执行用户句柄
23377
23379
  const result = await formProps_box.submit.handle({
23378
- formData: props.modelValue,
23380
+ formData: formData_box,
23379
23381
  scopeThis: scopeThis_box
23380
23382
  });
23381
23383
  if(result.code !== 0){
@@ -23387,7 +23389,7 @@ const hdl = {
23387
23389
  if(formProps_box.submit.url){
23388
23390
  const result = await request.ly0.ly0request({
23389
23391
  url: formProps_box.submit.url,
23390
- data: props.modelValue
23392
+ data: formData_box
23391
23393
  });
23392
23394
  if(result.code !== 0){
23393
23395
  return
@@ -23398,7 +23400,7 @@ const hdl = {
23398
23400
  if(formProps_box.submit.storpro){
23399
23401
  const result = await request.ly0.storpro({
23400
23402
  storproName: formProps_box.submit.storpro,
23401
- data: props.modelValue
23403
+ data: formData_box
23402
23404
  });
23403
23405
  if(result.code !== 0){
23404
23406
  return
@@ -23409,9 +23411,6 @@ const hdl = {
23409
23411
  // 关闭表单窗口
23410
23412
  formProps_box.popup.visible = false;
23411
23413
  }
23412
-
23413
- // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
23414
- emit("update:modelValue", props.modelValue);
23415
23414
  }
23416
23415
  };
23417
23416
 
@@ -23440,7 +23439,7 @@ return (_ctx, _cache) => {
23440
23439
  createElementVNode("tbody", null, [
23441
23440
  (openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (item0, index0) => {
23442
23441
  return (openBlock(), createElementBlock(Fragment, { key: index0 }, [
23443
- (item0.hdlVisible ? item0.hdlVisible({formData: props.modelValue, scopeThis: scopeThis_box}) : true)
23442
+ (item0.hdlVisible ? item0.hdlVisible({formData: unref(formData_box), scopeThis: scopeThis_box}) : true)
23444
23443
  ? (openBlock(), createElementBlock("tr", _hoisted_1$c, [
23445
23444
  (!!item0.label)
23446
23445
  ? (openBlock(), createElementBlock("td", {
@@ -23448,8 +23447,8 @@ return (_ctx, _cache) => {
23448
23447
  style: normalizeStyle(style.field_box.left)
23449
23448
  }, [
23450
23449
  createVNode(script$h, {
23451
- modelValue: props.modelValue,
23452
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((props.modelValue) = $event)),
23450
+ modelValue: unref(formData_box),
23451
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23453
23452
  myProps: formProps_box,
23454
23453
  scopeThis: scopeThis_box,
23455
23454
  item: item0
@@ -23474,7 +23473,7 @@ return (_ctx, _cache) => {
23474
23473
  default: withCtx(() => [
23475
23474
  (openBlock(true), createElementBlock(Fragment, null, renderList(item0.items, (item1, index1) => {
23476
23475
  return (openBlock(), createElementBlock(Fragment, { key: index1 }, [
23477
- (item1.hdlVisible ? item1.hdlVisible({formData: props.modelValue, scopeThis: scopeThis_box}) : true)
23476
+ (item1.hdlVisible ? item1.hdlVisible({formData: unref(formData_box), scopeThis: scopeThis_box}) : true)
23478
23477
  ? (openBlock(), createBlock(_component_el_collapse_item, {
23479
23478
  key: 0,
23480
23479
  title: item1.title,
@@ -23488,7 +23487,7 @@ return (_ctx, _cache) => {
23488
23487
  return (openBlock(), createElementBlock(Fragment, { key: index2 }, [
23489
23488
  (
23490
23489
  item2.hdlVisible
23491
- ? item2.hdlVisible({formData: props.modelValue, scopeThis: scopeThis_box})
23490
+ ? item2.hdlVisible({formData: unref(formData_box), scopeThis: scopeThis_box})
23492
23491
  : true
23493
23492
  )
23494
23493
  ? (openBlock(), createElementBlock("tr", _hoisted_3$5, [
@@ -23498,8 +23497,8 @@ return (_ctx, _cache) => {
23498
23497
  style: normalizeStyle(style.field_box.left)
23499
23498
  }, [
23500
23499
  createVNode(script$h, {
23501
- modelValue: props.modelValue,
23502
- "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((props.modelValue) = $event)),
23500
+ modelValue: unref(formData_box),
23501
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23503
23502
  myProps: formProps_box,
23504
23503
  scopeThis: scopeThis_box,
23505
23504
  item: item2
@@ -23511,8 +23510,8 @@ return (_ctx, _cache) => {
23511
23510
  colspan: style.no_field_label(item2)
23512
23511
  }, [
23513
23512
  createVNode(script$g, {
23514
- modelValue: props.modelValue,
23515
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((props.modelValue) = $event)),
23513
+ modelValue: unref(formData_box),
23514
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23516
23515
  myProps: formProps_box,
23517
23516
  scopeThis: scopeThis_box,
23518
23517
  item: item2
@@ -23534,8 +23533,8 @@ return (_ctx, _cache) => {
23534
23533
  }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
23535
23534
  : createCommentVNode("v-if", true),
23536
23535
  createVNode(script$g, {
23537
- modelValue: props.modelValue,
23538
- "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((props.modelValue) = $event)),
23536
+ modelValue: unref(formData_box),
23537
+ "onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23539
23538
  myProps: formProps_box,
23540
23539
  scopeThis: scopeThis_box,
23541
23540
  item: item0
@@ -23597,13 +23596,33 @@ var script$e = {
23597
23596
  default: () => ({})
23598
23597
  }
23599
23598
  },
23600
- setup(__props) {
23599
+ emits: ['update:modelValue', 'change'],
23600
+ setup(__props, { emit: __emit }) {
23601
23601
 
23602
23602
  const props = __props;
23603
+ // 遵循 Vue 3 v-model 规范,使用 update:modelValue 事件
23604
+ const emit = __emit;
23603
23605
 
23606
+ let formData_box = reactive(props.modelValue);
23604
23607
  const formProps_box = reactive(Object.assign({}, ly0default$2.myProps, props.myProps));
23605
23608
  const scopeThis_box = reactive(Object.assign({}, props.scopeThis));
23606
23609
 
23610
+ // 表单数据监听
23611
+ watch(
23612
+ formData_box,
23613
+ (newVal, oldVal) => {
23614
+
23615
+ console.log('测试 444 监听', newVal);
23616
+ console.log('测试 555 监听', oldVal);
23617
+
23618
+ // 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
23619
+ emit("update:modelValue", newVal);
23620
+ },
23621
+ {
23622
+ deep: true, // 深层监听
23623
+ }
23624
+ );
23625
+
23607
23626
  return (_ctx, _cache) => {
23608
23627
  const _component_el_dialog = resolveComponent("el-dialog");
23609
23628
 
@@ -23622,8 +23641,8 @@ return (_ctx, _cache) => {
23622
23641
  }, {
23623
23642
  default: withCtx(() => [
23624
23643
  createVNode(script$f, {
23625
- modelValue: props.modelValue,
23626
- "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((props.modelValue) = $event)),
23644
+ modelValue: unref(formData_box),
23645
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23627
23646
  myProps: formProps_box,
23628
23647
  scopeThis: scopeThis_box
23629
23648
  }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"])
@@ -23632,8 +23651,8 @@ return (_ctx, _cache) => {
23632
23651
  }, 8 /* PROPS */, ["modelValue", "title", "width", "top"]))
23633
23652
  : (openBlock(), createBlock(script$f, {
23634
23653
  key: 1,
23635
- modelValue: props.modelValue,
23636
- "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((props.modelValue) = $event)),
23654
+ modelValue: unref(formData_box),
23655
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
23637
23656
  myProps: formProps_box,
23638
23657
  scopeThis: scopeThis_box
23639
23658
  }, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"]))