@yoooloo42/joker 1.0.100 → 1.0.101
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 +173 -113
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +174 -114
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -22615,10 +22615,14 @@ var script$g = {
|
|
|
22615
22615
|
default: () => ({})
|
|
22616
22616
|
}
|
|
22617
22617
|
},
|
|
22618
|
-
|
|
22618
|
+
emits: ['update:modelValue', 'change'],
|
|
22619
|
+
setup(__props, { emit: __emit }) {
|
|
22619
22620
|
|
|
22620
22621
|
const props = __props;
|
|
22622
|
+
// 遵循 Vue 3 v-model 规范,使用 update:modelValue 事件
|
|
22623
|
+
const emit = __emit;
|
|
22621
22624
|
|
|
22625
|
+
let formData_box = vue.reactive(props.modelValue);
|
|
22622
22626
|
const formProps_box = vue.reactive(Object.assign({}, props.myProps));
|
|
22623
22627
|
const scopeThis_box = vue.reactive(Object.assign({}, props.scopeThis));
|
|
22624
22628
|
const propsItem_box = vue.reactive(Object.assign({}, props.item));
|
|
@@ -22627,7 +22631,7 @@ const input = vue.reactive({
|
|
|
22627
22631
|
placeholder: propsItem_box.placeholder || formProps_box.para.placeholder.input,
|
|
22628
22632
|
showPassword: !!propsItem_box.showPassword,
|
|
22629
22633
|
hdlCannotInput: value => { // 解决偶发不能输入的问题
|
|
22630
|
-
|
|
22634
|
+
formData_box[propsItem_box.fieldName] = value;
|
|
22631
22635
|
}
|
|
22632
22636
|
});
|
|
22633
22637
|
|
|
@@ -22637,12 +22641,12 @@ const select = vue.reactive({
|
|
|
22637
22641
|
if (propsItem_box.items) {
|
|
22638
22642
|
return propsItem_box.items
|
|
22639
22643
|
} else if (propsItem_box.hdlGetItems) {
|
|
22640
|
-
return propsItem_box.hdlGetItems({formData:
|
|
22644
|
+
return propsItem_box.hdlGetItems({formData: formData_box, scopeThis: scopeThis_box})
|
|
22641
22645
|
}
|
|
22642
22646
|
}),
|
|
22643
22647
|
hdlChange: value => {
|
|
22644
22648
|
if (propsItem_box.hdlChange) {
|
|
22645
|
-
propsItem_box.hdlChange({formData:
|
|
22649
|
+
propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
|
|
22646
22650
|
}
|
|
22647
22651
|
}
|
|
22648
22652
|
});
|
|
@@ -22674,7 +22678,7 @@ const datePicker = vue.reactive({
|
|
|
22674
22678
|
}),
|
|
22675
22679
|
hdlChange: value => {
|
|
22676
22680
|
if (propsItem_box.hdlChange) {
|
|
22677
|
-
propsItem_box.hdlChange({formData:
|
|
22681
|
+
propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
|
|
22678
22682
|
}
|
|
22679
22683
|
}
|
|
22680
22684
|
});
|
|
@@ -22682,7 +22686,7 @@ const datePicker = vue.reactive({
|
|
|
22682
22686
|
const ly0switch = vue.reactive({
|
|
22683
22687
|
hdlChange: value => {
|
|
22684
22688
|
if (propsItem_box.hdlChange) {
|
|
22685
|
-
propsItem_box.hdlChange({formData:
|
|
22689
|
+
propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
|
|
22686
22690
|
}
|
|
22687
22691
|
}
|
|
22688
22692
|
});
|
|
@@ -22690,7 +22694,7 @@ const ly0switch = vue.reactive({
|
|
|
22690
22694
|
const radioGroup = vue.reactive({
|
|
22691
22695
|
hdlChange: value => {
|
|
22692
22696
|
if (propsItem_box.hdlChange) {
|
|
22693
|
-
propsItem_box.hdlChange({formData:
|
|
22697
|
+
propsItem_box.hdlChange({formData: formData_box, scopeThis: scopeThis_box, value});
|
|
22694
22698
|
}
|
|
22695
22699
|
}
|
|
22696
22700
|
});
|
|
@@ -22699,20 +22703,20 @@ const image = vue.reactive({
|
|
|
22699
22703
|
getSrc: vue.computed(() => {
|
|
22700
22704
|
if (
|
|
22701
22705
|
propsItem_box.imageDelete &&
|
|
22702
|
-
|
|
22703
|
-
(
|
|
22704
|
-
|
|
22706
|
+
formData_box[propsItem_box.imageDelete] &&
|
|
22707
|
+
(formData_box[propsItem_box.imageDelete] === true ||
|
|
22708
|
+
formData_box[propsItem_box.imageDelete] === 'true') // 图片已删除
|
|
22705
22709
|
) {
|
|
22706
22710
|
return ['']
|
|
22707
22711
|
}
|
|
22708
|
-
if (
|
|
22709
|
-
return
|
|
22712
|
+
if (formData_box[propsItem_box.fieldName]) {
|
|
22713
|
+
return formData_box[propsItem_box.fieldName]
|
|
22710
22714
|
}
|
|
22711
22715
|
return ['']
|
|
22712
22716
|
}),
|
|
22713
22717
|
delete: ()=>{
|
|
22714
|
-
|
|
22715
|
-
!
|
|
22718
|
+
formData_box[propsItem_box.imageDelete] =
|
|
22719
|
+
!formData_box[propsItem_box.imageDelete];
|
|
22716
22720
|
}
|
|
22717
22721
|
});
|
|
22718
22722
|
|
|
@@ -22720,32 +22724,32 @@ const images = vue.reactive({
|
|
|
22720
22724
|
getSrc: (itemImages, indexImages) => {
|
|
22721
22725
|
if (
|
|
22722
22726
|
!propsItem_box.imageDelete ||
|
|
22723
|
-
!
|
|
22727
|
+
!formData_box[propsItem_box.imageDelete].includes(itemImages)
|
|
22724
22728
|
) {
|
|
22725
22729
|
return itemImages
|
|
22726
22730
|
}
|
|
22727
22731
|
return ''
|
|
22728
22732
|
},
|
|
22729
22733
|
delete: (itemImages, indexImages) => {
|
|
22730
|
-
if (!
|
|
22731
|
-
|
|
22734
|
+
if (!formData_box[propsItem_box.imageDelete].includes(itemImages)) {
|
|
22735
|
+
formData_box[propsItem_box.imageDelete].push(itemImages);
|
|
22732
22736
|
return
|
|
22733
22737
|
}
|
|
22734
22738
|
|
|
22735
|
-
|
|
22739
|
+
formData_box[propsItem_box.imageDelete] = formData_box[propsItem_box.imageDelete].filter(i => {
|
|
22736
22740
|
return i !== itemImages
|
|
22737
22741
|
});
|
|
22738
22742
|
},
|
|
22739
22743
|
show: vue.computed(()=>{
|
|
22740
22744
|
let result = [];
|
|
22741
22745
|
if (!propsItem_box.imageDelete) {
|
|
22742
|
-
|
|
22746
|
+
formData_box[propsItem_box.fieldName].forEach(i => {
|
|
22743
22747
|
result.push(i);
|
|
22744
22748
|
});
|
|
22745
22749
|
} else {
|
|
22746
|
-
|
|
22750
|
+
formData_box[propsItem_box.fieldName]
|
|
22747
22751
|
.filter(i => {
|
|
22748
|
-
return !
|
|
22752
|
+
return !formData_box[propsItem_box.imageDelete].includes(i)
|
|
22749
22753
|
})
|
|
22750
22754
|
.forEach(i => {
|
|
22751
22755
|
result.push(i);
|
|
@@ -22763,49 +22767,49 @@ const video = vue.reactive({
|
|
|
22763
22767
|
src: vue.computed(()=>{
|
|
22764
22768
|
if (
|
|
22765
22769
|
propsItem_box.videoDelete &&
|
|
22766
|
-
|
|
22767
|
-
(
|
|
22768
|
-
|
|
22770
|
+
formData_box[propsItem_box.videoDelete] &&
|
|
22771
|
+
(formData_box[propsItem_box.videoDelete] === true ||
|
|
22772
|
+
formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
|
|
22769
22773
|
) {
|
|
22770
22774
|
return ''
|
|
22771
22775
|
}
|
|
22772
|
-
if (
|
|
22773
|
-
return
|
|
22776
|
+
if (formData_box[propsItem_box.fieldName]) {
|
|
22777
|
+
return formData_box[propsItem_box.fieldName]
|
|
22774
22778
|
}
|
|
22775
22779
|
return ''
|
|
22776
22780
|
}),
|
|
22777
22781
|
poster: vue.computed(()=>{
|
|
22778
22782
|
if (
|
|
22779
22783
|
propsItem_box.videoDelete &&
|
|
22780
|
-
|
|
22781
|
-
(
|
|
22782
|
-
|
|
22784
|
+
formData_box[propsItem_box.videoDelete] &&
|
|
22785
|
+
(formData_box[propsItem_box.videoDelete] === true ||
|
|
22786
|
+
formData_box[propsItem_box.videoDelete] === 'true') // 图片已删除
|
|
22783
22787
|
) {
|
|
22784
22788
|
return ''
|
|
22785
22789
|
}
|
|
22786
|
-
if (
|
|
22787
|
-
return
|
|
22790
|
+
if (formData_box[propsItem_box.poster]) {
|
|
22791
|
+
return formData_box[propsItem_box.poster]
|
|
22788
22792
|
}
|
|
22789
22793
|
return ''
|
|
22790
22794
|
}),
|
|
22791
22795
|
delete: ()=>{
|
|
22792
|
-
|
|
22793
|
-
!
|
|
22796
|
+
formData_box[propsItem_box.videoDelete] =
|
|
22797
|
+
!formData_box[propsItem_box.videoDelete];
|
|
22794
22798
|
},
|
|
22795
22799
|
});
|
|
22796
22800
|
|
|
22797
22801
|
const download = vue.reactive({
|
|
22798
22802
|
fileName: propsItem_box.downloadFileName || formProps_box.para.download.fileName,
|
|
22799
22803
|
downloadLabel: vue.computed(() => {
|
|
22800
|
-
if (!
|
|
22804
|
+
if (!formData_box[propsItem_box.fieldName]) {
|
|
22801
22805
|
return formProps_box.para.download.downloadLabelNoSrc
|
|
22802
22806
|
}
|
|
22803
22807
|
if (propsItem_box.hdlGetDownloadLabel) {
|
|
22804
|
-
return propsItem_box.hdlGetDownloadLabel({formData:
|
|
22808
|
+
return propsItem_box.hdlGetDownloadLabel({formData: formData_box, scopeThis: scopeThis_box})
|
|
22805
22809
|
}
|
|
22806
22810
|
return formProps_box.para.download.downloadLabel
|
|
22807
22811
|
}),
|
|
22808
|
-
downloadSrc:
|
|
22812
|
+
downloadSrc: formData_box[propsItem_box.fieldName] || ''
|
|
22809
22813
|
});
|
|
22810
22814
|
|
|
22811
22815
|
const upload = vue.reactive({
|
|
@@ -22830,6 +22834,22 @@ const style = vue.reactive({
|
|
|
22830
22834
|
download: vue.computed(()=>styleModule.input.download()),
|
|
22831
22835
|
});
|
|
22832
22836
|
|
|
22837
|
+
// 表单数据监听
|
|
22838
|
+
vue.watch(
|
|
22839
|
+
formData_box,
|
|
22840
|
+
(newVal, oldVal) => {
|
|
22841
|
+
|
|
22842
|
+
console.log('测试 000 监听', newVal);
|
|
22843
|
+
console.log('测试 111 监听', oldVal);
|
|
22844
|
+
|
|
22845
|
+
// 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
|
|
22846
|
+
emit("update:modelValue", newVal);
|
|
22847
|
+
},
|
|
22848
|
+
{
|
|
22849
|
+
deep: true, // 深层监听
|
|
22850
|
+
}
|
|
22851
|
+
);
|
|
22852
|
+
|
|
22833
22853
|
return (_ctx, _cache) => {
|
|
22834
22854
|
const _component_el_input = vue.resolveComponent("el-input");
|
|
22835
22855
|
const _component_el_option = vue.resolveComponent("el-option");
|
|
@@ -22867,34 +22887,34 @@ return (_ctx, _cache) => {
|
|
|
22867
22887
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
22868
22888
|
key: 0,
|
|
22869
22889
|
style: vue.normalizeStyle(style.text(propsItem_box, formProps_box))
|
|
22870
|
-
}, vue.toDisplayString(
|
|
22890
|
+
}, vue.toDisplayString(vue.unref(formData_box)[propsItem_box.fieldName] ? vue.unref(formData_box)[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
|
|
22871
22891
|
: vue.createCommentVNode("v-if", true),
|
|
22872
22892
|
(propsItem_box.inputType === 'text0')
|
|
22873
22893
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
22874
22894
|
key: 1,
|
|
22875
22895
|
style: vue.normalizeStyle(style.text0(propsItem_box))
|
|
22876
|
-
}, vue.toDisplayString(
|
|
22896
|
+
}, vue.toDisplayString(vue.unref(formData_box)[propsItem_box.fieldName] ? vue.unref(formData_box)[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
|
|
22877
22897
|
: vue.createCommentVNode("v-if", true),
|
|
22878
22898
|
(!propsItem_box.inputType)
|
|
22879
22899
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
22880
22900
|
key: 2,
|
|
22881
22901
|
style: vue.normalizeStyle(style.text(propsItem_box, formProps_box))
|
|
22882
|
-
}, vue.toDisplayString(
|
|
22902
|
+
}, vue.toDisplayString(vue.unref(formData_box)[propsItem_box.fieldName] ? vue.unref(formData_box)[propsItem_box.fieldName] : ' '), 5 /* TEXT, STYLE */))
|
|
22883
22903
|
: vue.createCommentVNode("v-if", true),
|
|
22884
22904
|
(propsItem_box.inputType === 'expression')
|
|
22885
22905
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
22886
22906
|
key: 3,
|
|
22887
22907
|
style: vue.normalizeStyle(style.text(propsItem_box, formProps_box))
|
|
22888
|
-
}, vue.toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData:
|
|
22889
|
-
? propsItem_box.hdlExpression({formData:
|
|
22908
|
+
}, vue.toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData: vue.unref(formData_box), scopeThis: __props.scopeThis})
|
|
22909
|
+
? propsItem_box.hdlExpression({formData: vue.unref(formData_box), scopeThis: scopeThis_box})
|
|
22890
22910
|
: ' '), 5 /* TEXT, STYLE */))
|
|
22891
22911
|
: vue.createCommentVNode("v-if", true),
|
|
22892
22912
|
(propsItem_box.inputType === 'expression0')
|
|
22893
22913
|
? (vue.openBlock(), vue.createElementBlock("div", {
|
|
22894
22914
|
key: 4,
|
|
22895
22915
|
style: vue.normalizeStyle(style.text0(propsItem_box))
|
|
22896
|
-
}, vue.toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData:
|
|
22897
|
-
? propsItem_box.hdlExpression({formData:
|
|
22916
|
+
}, vue.toDisplayString(propsItem_box.hdlExpression && propsItem_box.hdlExpression({formData: vue.unref(formData_box), scopeThis: scopeThis_box})
|
|
22917
|
+
? propsItem_box.hdlExpression({formData: vue.unref(formData_box), scopeThis: scopeThis_box})
|
|
22898
22918
|
: ' '), 5 /* TEXT, STYLE */))
|
|
22899
22919
|
: vue.createCommentVNode("v-if", true),
|
|
22900
22920
|
(propsItem_box.inputType === 'line')
|
|
@@ -22907,8 +22927,8 @@ return (_ctx, _cache) => {
|
|
|
22907
22927
|
(propsItem_box.inputType === 'input')
|
|
22908
22928
|
? (vue.openBlock(), vue.createBlock(_component_el_input, {
|
|
22909
22929
|
key: 6,
|
|
22910
|
-
modelValue:
|
|
22911
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((
|
|
22930
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
22931
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
22912
22932
|
placeholder: input.placeholder,
|
|
22913
22933
|
style: vue.normalizeStyle(style.input(propsItem_box, formProps_box)),
|
|
22914
22934
|
onInput: input.hdlCannotInput,
|
|
@@ -22919,8 +22939,8 @@ return (_ctx, _cache) => {
|
|
|
22919
22939
|
? (vue.openBlock(), vue.createBlock(_component_el_select, {
|
|
22920
22940
|
key: 7,
|
|
22921
22941
|
class: "deep-input",
|
|
22922
|
-
modelValue:
|
|
22923
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((
|
|
22942
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
22943
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
22924
22944
|
placeholder: select.placeholder,
|
|
22925
22945
|
filterable: "",
|
|
22926
22946
|
style: vue.normalizeStyle(style.input(propsItem_box, formProps_box)),
|
|
@@ -22942,8 +22962,8 @@ return (_ctx, _cache) => {
|
|
|
22942
22962
|
? (vue.openBlock(), vue.createBlock(_component_el_date_picker, {
|
|
22943
22963
|
key: 8,
|
|
22944
22964
|
class: "deep-input",
|
|
22945
|
-
modelValue:
|
|
22946
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((
|
|
22965
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
22966
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
22947
22967
|
type: propsItem_box.type ? propsItem_box.type : 'datetime',
|
|
22948
22968
|
placeholder: datePicker.placeholder,
|
|
22949
22969
|
format: datePicker.format,
|
|
@@ -22954,8 +22974,8 @@ return (_ctx, _cache) => {
|
|
|
22954
22974
|
(propsItem_box.inputType === 'input-number')
|
|
22955
22975
|
? (vue.openBlock(), vue.createBlock(_component_el_input_number, {
|
|
22956
22976
|
key: 9,
|
|
22957
|
-
modelValue:
|
|
22958
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((
|
|
22977
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
22978
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
22959
22979
|
size: style.input_number(propsItem_box).facade.size,
|
|
22960
22980
|
min: 'min' in propsItem_box ? propsItem_box.min : 1,
|
|
22961
22981
|
max: 'max' in propsItem_box ? propsItem_box.max : 100,
|
|
@@ -22966,8 +22986,8 @@ return (_ctx, _cache) => {
|
|
|
22966
22986
|
(propsItem_box.inputType === 'switch')
|
|
22967
22987
|
? (vue.openBlock(), vue.createBlock(_component_el_switch, {
|
|
22968
22988
|
key: 10,
|
|
22969
|
-
modelValue:
|
|
22970
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((
|
|
22989
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
22990
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
22971
22991
|
"active-text": propsItem_box.activeText,
|
|
22972
22992
|
"inactive-text": propsItem_box.inactiveText,
|
|
22973
22993
|
"active-value": propsItem_box.activeValue,
|
|
@@ -22980,8 +23000,8 @@ return (_ctx, _cache) => {
|
|
|
22980
23000
|
(propsItem_box.inputType === 'radio-group')
|
|
22981
23001
|
? (vue.openBlock(), vue.createBlock(_component_el_radio_group, {
|
|
22982
23002
|
key: 11,
|
|
22983
|
-
modelValue:
|
|
22984
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((
|
|
23003
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23004
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
22985
23005
|
disabled: !!propsItem_box.disabled,
|
|
22986
23006
|
onChange: radioGroup.hdlChange
|
|
22987
23007
|
}, {
|
|
@@ -23026,7 +23046,7 @@ return (_ctx, _cache) => {
|
|
|
23026
23046
|
plain: style.button_group(propsItem_box, item0, item1).button.facade.plain,
|
|
23027
23047
|
round: style.button_group(propsItem_box, item0, item1).button.facade.round,
|
|
23028
23048
|
circle: style.button_group(propsItem_box, item0, item1).button.facade.circle,
|
|
23029
|
-
onClick: $event => (item1.hdlClick ? item1.hdlClick({formData:
|
|
23049
|
+
onClick: $event => (item1.hdlClick ? item1.hdlClick({formData: vue.unref(formData_box), scopeThis: scopeThis_box}) : null),
|
|
23030
23050
|
key: index1
|
|
23031
23051
|
}, {
|
|
23032
23052
|
default: vue.withCtx(() => [
|
|
@@ -23060,15 +23080,15 @@ return (_ctx, _cache) => {
|
|
|
23060
23080
|
}, null, 8 /* PROPS */, ["style", "src", "preview-src-list"])
|
|
23061
23081
|
]),
|
|
23062
23082
|
vue.createCommentVNode(" 设置了图片删除功能,同时图片不为空 "),
|
|
23063
|
-
(!!propsItem_box.imageDelete && !!
|
|
23083
|
+
(!!propsItem_box.imageDelete && !!vue.unref(formData_box)[propsItem_box.fieldName])
|
|
23064
23084
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_4$4, [
|
|
23065
23085
|
vue.createVNode(_component_el_button, {
|
|
23066
23086
|
size: "small",
|
|
23067
|
-
icon: !
|
|
23087
|
+
icon: !vue.unref(formData_box)[propsItem_box.imageDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
|
|
23068
23088
|
onClick: image.delete
|
|
23069
23089
|
}, {
|
|
23070
23090
|
default: vue.withCtx(() => [
|
|
23071
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
23091
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(formData_box)[propsItem_box.imageDelete] ? '图片已删除,恢复' : '删除'), 1 /* TEXT */)
|
|
23072
23092
|
]),
|
|
23073
23093
|
_: 1 /* STABLE */
|
|
23074
23094
|
}, 8 /* PROPS */, ["icon", "onClick"])
|
|
@@ -23079,7 +23099,7 @@ return (_ctx, _cache) => {
|
|
|
23079
23099
|
vue.createCommentVNode(" 多个图片 "),
|
|
23080
23100
|
(propsItem_box.inputType === 'images')
|
|
23081
23101
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
|
|
23082
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(
|
|
23102
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(formData_box)[propsItem_box.fieldName], (itemImages, indexImages) => {
|
|
23083
23103
|
return (vue.openBlock(), vue.createElementBlock("div", {
|
|
23084
23104
|
key: indexImages,
|
|
23085
23105
|
style: vue.normalizeStyle(style.images(propsItem_box, formProps_box).itemBox)
|
|
@@ -23099,7 +23119,7 @@ return (_ctx, _cache) => {
|
|
|
23099
23119
|
onClick: $event => (images.delete(itemImages, indexImages))
|
|
23100
23120
|
}, {
|
|
23101
23121
|
default: vue.withCtx(() => [
|
|
23102
|
-
vue.createTextVNode(vue.toDisplayString(
|
|
23122
|
+
vue.createTextVNode(vue.toDisplayString(vue.unref(formData_box)[propsItem_box.imageDelete].includes(itemImages) ? '恢复' : '删除'), 1 /* TEXT */)
|
|
23103
23123
|
]),
|
|
23104
23124
|
_: 2 /* DYNAMIC */
|
|
23105
23125
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])
|
|
@@ -23116,8 +23136,8 @@ return (_ctx, _cache) => {
|
|
|
23116
23136
|
style: vue.normalizeStyle(style.richtext(propsItem_box, formProps_box))
|
|
23117
23137
|
}, [
|
|
23118
23138
|
vue.createVNode(_component_ly0Richtext, {
|
|
23119
|
-
modelValue:
|
|
23120
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((
|
|
23139
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23140
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23121
23141
|
myProps: richtextProps.value
|
|
23122
23142
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23123
23143
|
], 4 /* STYLE */))
|
|
@@ -23126,7 +23146,7 @@ return (_ctx, _cache) => {
|
|
|
23126
23146
|
(propsItem_box.inputType === 'richtextShow')
|
|
23127
23147
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_7, [
|
|
23128
23148
|
vue.createElementVNode("div", {
|
|
23129
|
-
innerHTML:
|
|
23149
|
+
innerHTML: vue.unref(formData_box)[propsItem_box.fieldName]
|
|
23130
23150
|
}, null, 8 /* PROPS */, _hoisted_8)
|
|
23131
23151
|
]))
|
|
23132
23152
|
: vue.createCommentVNode("v-if", true),
|
|
@@ -23158,15 +23178,15 @@ return (_ctx, _cache) => {
|
|
|
23158
23178
|
], 8 /* PROPS */, _hoisted_10)
|
|
23159
23179
|
]),
|
|
23160
23180
|
vue.createCommentVNode(" 设置了视频删除功能,同时视频不为空 "),
|
|
23161
|
-
(!!propsItem_box.videoDelete && !!
|
|
23181
|
+
(!!propsItem_box.videoDelete && !!vue.unref(formData_box)[propsItem_box.fieldName])
|
|
23162
23182
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_14, [
|
|
23163
23183
|
vue.createVNode(_component_el_button, {
|
|
23164
23184
|
size: "small",
|
|
23165
|
-
icon: !
|
|
23185
|
+
icon: !vue.unref(formData_box)[propsItem_box.videoDelete] ? 'el-icon-delete' : 'el-icon-magic-stick',
|
|
23166
23186
|
onClick: video.delete
|
|
23167
23187
|
}, {
|
|
23168
23188
|
default: vue.withCtx(() => [
|
|
23169
|
-
vue.createTextVNode(vue.toDisplayString(!!
|
|
23189
|
+
vue.createTextVNode(vue.toDisplayString(!!vue.unref(formData_box)[propsItem_box.videoDelete] ? '视频已删除,恢复' : '删除'), 1 /* TEXT */)
|
|
23170
23190
|
]),
|
|
23171
23191
|
_: 1 /* STABLE */
|
|
23172
23192
|
}, 8 /* PROPS */, ["icon", "onClick"])
|
|
@@ -23178,7 +23198,7 @@ return (_ctx, _cache) => {
|
|
|
23178
23198
|
vue.createCommentVNode(" 下载 "),
|
|
23179
23199
|
(propsItem_box.inputType === 'download')
|
|
23180
23200
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_15, [
|
|
23181
|
-
(
|
|
23201
|
+
(vue.unref(formData_box)[propsItem_box.fieldName])
|
|
23182
23202
|
? (vue.openBlock(), vue.createElementBlock("a", {
|
|
23183
23203
|
key: 0,
|
|
23184
23204
|
style: vue.normalizeStyle(style.download.style),
|
|
@@ -23197,8 +23217,8 @@ return (_ctx, _cache) => {
|
|
|
23197
23217
|
(propsItem_box.inputType === 'upload')
|
|
23198
23218
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_17, [
|
|
23199
23219
|
vue.createVNode(_component_ly0Upload, {
|
|
23200
|
-
modelValue:
|
|
23201
|
-
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((
|
|
23220
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23221
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23202
23222
|
myProps: {uploadUrl: upload.uploadUrl}
|
|
23203
23223
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23204
23224
|
]))
|
|
@@ -23207,8 +23227,8 @@ return (_ctx, _cache) => {
|
|
|
23207
23227
|
(propsItem_box.inputType === 'upload-drag')
|
|
23208
23228
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_18, [
|
|
23209
23229
|
vue.createVNode(_component_ly0Upload_drag, {
|
|
23210
|
-
modelValue:
|
|
23211
|
-
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((
|
|
23230
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23231
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23212
23232
|
myProps: {uploadUrl: upload.uploadUrl}
|
|
23213
23233
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23214
23234
|
]))
|
|
@@ -23217,8 +23237,8 @@ return (_ctx, _cache) => {
|
|
|
23217
23237
|
(propsItem_box.inputType === 'upload-picture')
|
|
23218
23238
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_19, [
|
|
23219
23239
|
vue.createVNode(_component_ly0Upload_picture, {
|
|
23220
|
-
modelValue:
|
|
23221
|
-
"onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((
|
|
23240
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23241
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23222
23242
|
myProps: {uploadUrl: upload.uploadUrl_image}
|
|
23223
23243
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23224
23244
|
]))
|
|
@@ -23227,8 +23247,8 @@ return (_ctx, _cache) => {
|
|
|
23227
23247
|
(propsItem_box.inputType === 'upload-picture-card')
|
|
23228
23248
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_20, [
|
|
23229
23249
|
vue.createVNode(_component_ly0Upload_pictureCard, {
|
|
23230
|
-
modelValue:
|
|
23231
|
-
"onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((
|
|
23250
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23251
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23232
23252
|
myProps: {uploadUrl: upload.uploadUrl_image}
|
|
23233
23253
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23234
23254
|
]))
|
|
@@ -23237,8 +23257,8 @@ return (_ctx, _cache) => {
|
|
|
23237
23257
|
(propsItem_box.inputType === 'upload-avatar')
|
|
23238
23258
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_21, [
|
|
23239
23259
|
vue.createVNode(_component_ly0Upload_avatar, {
|
|
23240
|
-
modelValue:
|
|
23241
|
-
"onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((
|
|
23260
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23261
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23242
23262
|
myProps: {uploadUrl: upload.uploadUrl_image}
|
|
23243
23263
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23244
23264
|
]))
|
|
@@ -23247,8 +23267,8 @@ return (_ctx, _cache) => {
|
|
|
23247
23267
|
(propsItem_box.inputType === 'upload-carplate')
|
|
23248
23268
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_22, [
|
|
23249
23269
|
vue.createVNode(_component_ly0Upload_carplate, {
|
|
23250
|
-
modelValue:
|
|
23251
|
-
"onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((
|
|
23270
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23271
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23252
23272
|
myProps: {uploadUrl: upload.uploadUrl_carplate}
|
|
23253
23273
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23254
23274
|
]))
|
|
@@ -23257,8 +23277,8 @@ return (_ctx, _cache) => {
|
|
|
23257
23277
|
(propsItem_box.inputType === 'd3gbt2260')
|
|
23258
23278
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_23, [
|
|
23259
23279
|
vue.createVNode(_component_ly0gbt2260, {
|
|
23260
|
-
modelValue:
|
|
23261
|
-
"onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((
|
|
23280
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23281
|
+
"onUpdate:modelValue": _cache[13] || (_cache[13] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23262
23282
|
myProps: {readOnly: propsItem_box.readOnly}
|
|
23263
23283
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23264
23284
|
]))
|
|
@@ -23267,8 +23287,8 @@ return (_ctx, _cache) => {
|
|
|
23267
23287
|
(propsItem_box.inputType === 'd7group')
|
|
23268
23288
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_24, [
|
|
23269
23289
|
vue.createVNode(_component_ly0d7group, {
|
|
23270
|
-
modelValue:
|
|
23271
|
-
"onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((
|
|
23290
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23291
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23272
23292
|
myProps: {readOnly: propsItem_box.readOnly}
|
|
23273
23293
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23274
23294
|
]))
|
|
@@ -23277,8 +23297,8 @@ return (_ctx, _cache) => {
|
|
|
23277
23297
|
(propsItem_box.inputType === 'd7postal')
|
|
23278
23298
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_25, [
|
|
23279
23299
|
vue.createVNode(_component_ly0d7postal, {
|
|
23280
|
-
modelValue:
|
|
23281
|
-
"onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((
|
|
23300
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23301
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23282
23302
|
myProps: {readOnly: propsItem_box.readOnly}
|
|
23283
23303
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23284
23304
|
]))
|
|
@@ -23287,8 +23307,8 @@ return (_ctx, _cache) => {
|
|
|
23287
23307
|
(propsItem_box.inputType === 'd7price')
|
|
23288
23308
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_26, [
|
|
23289
23309
|
vue.createVNode(_component_ly0d7price, {
|
|
23290
|
-
modelValue:
|
|
23291
|
-
"onUpdate:modelValue": _cache[16] || (_cache[16] = $event => ((
|
|
23310
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23311
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23292
23312
|
myProps: {readOnly: propsItem_box.readOnly}
|
|
23293
23313
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23294
23314
|
]))
|
|
@@ -23297,8 +23317,8 @@ return (_ctx, _cache) => {
|
|
|
23297
23317
|
(propsItem_box.inputType === 'd7size')
|
|
23298
23318
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_27, [
|
|
23299
23319
|
vue.createVNode(_component_ly0d7size, {
|
|
23300
|
-
modelValue:
|
|
23301
|
-
"onUpdate:modelValue": _cache[17] || (_cache[17] = $event => ((
|
|
23320
|
+
modelValue: vue.unref(formData_box)[propsItem_box.fieldName],
|
|
23321
|
+
"onUpdate:modelValue": _cache[17] || (_cache[17] = $event => ((vue.unref(formData_box)[propsItem_box.fieldName]) = $event)),
|
|
23302
23322
|
myProps: {readOnly: propsItem_box.readOnly}
|
|
23303
23323
|
}, null, 8 /* PROPS */, ["modelValue", "myProps"])
|
|
23304
23324
|
]))
|
|
@@ -23307,8 +23327,8 @@ return (_ctx, _cache) => {
|
|
|
23307
23327
|
(propsItem_box.inputType === 'd7thumb')
|
|
23308
23328
|
? (vue.openBlock(), vue.createElementBlock("div", _hoisted_28, [
|
|
23309
23329
|
vue.createVNode(_component_ly0d7thumb, {
|
|
23310
|
-
modelValue:
|
|
23311
|
-
"onUpdate:modelValue": _cache[18] || (_cache[18] = $event => ((
|
|
23330
|
+
modelValue: vue.unref(formData_box),
|
|
23331
|
+
"onUpdate:modelValue": _cache[18] || (_cache[18] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23312
23332
|
myProps: {
|
|
23313
23333
|
thumb: {
|
|
23314
23334
|
fieldName: propsItem_box.thumb.fieldName || formProps_box.para.ly0d7thumb.thumb.fieldName,
|
|
@@ -23358,10 +23378,14 @@ var script$f = {
|
|
|
23358
23378
|
default: () => ({})
|
|
23359
23379
|
}
|
|
23360
23380
|
},
|
|
23361
|
-
|
|
23381
|
+
emits: ['update:modelValue', 'change'],
|
|
23382
|
+
setup(__props, { emit: __emit }) {
|
|
23362
23383
|
|
|
23363
23384
|
const props = __props;
|
|
23385
|
+
// 遵循 Vue 3 v-model 规范,使用 update:modelValue 事件
|
|
23386
|
+
const emit = __emit;
|
|
23364
23387
|
|
|
23388
|
+
let formData_box = vue.reactive(props.modelValue);
|
|
23365
23389
|
const formProps_box = vue.reactive(Object.assign({}, props.myProps));
|
|
23366
23390
|
const scopeThis_box = vue.reactive(Object.assign({}, props.scopeThis));
|
|
23367
23391
|
|
|
@@ -23379,7 +23403,7 @@ const hdl = {
|
|
|
23379
23403
|
if(formProps_box.submit.handle){
|
|
23380
23404
|
// 执行用户句柄
|
|
23381
23405
|
const result = await formProps_box.submit.handle({
|
|
23382
|
-
formData:
|
|
23406
|
+
formData: formData_box,
|
|
23383
23407
|
scopeThis: scopeThis_box
|
|
23384
23408
|
});
|
|
23385
23409
|
if(result.code !== 0){
|
|
@@ -23391,7 +23415,7 @@ const hdl = {
|
|
|
23391
23415
|
if(formProps_box.submit.url){
|
|
23392
23416
|
const result = await request.ly0.ly0request({
|
|
23393
23417
|
url: formProps_box.submit.url,
|
|
23394
|
-
data:
|
|
23418
|
+
data: formData_box
|
|
23395
23419
|
});
|
|
23396
23420
|
if(result.code !== 0){
|
|
23397
23421
|
return
|
|
@@ -23402,7 +23426,7 @@ const hdl = {
|
|
|
23402
23426
|
if(formProps_box.submit.storpro){
|
|
23403
23427
|
const result = await request.ly0.storpro({
|
|
23404
23428
|
storproName: formProps_box.submit.storpro,
|
|
23405
|
-
data:
|
|
23429
|
+
data: formData_box
|
|
23406
23430
|
});
|
|
23407
23431
|
if(result.code !== 0){
|
|
23408
23432
|
return
|
|
@@ -23415,10 +23439,26 @@ const hdl = {
|
|
|
23415
23439
|
}
|
|
23416
23440
|
|
|
23417
23441
|
// 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
|
|
23418
|
-
emit("update:modelValue",
|
|
23442
|
+
emit("update:modelValue", formData_box);
|
|
23419
23443
|
}
|
|
23420
23444
|
};
|
|
23421
23445
|
|
|
23446
|
+
// 表单数据监听
|
|
23447
|
+
vue.watch(
|
|
23448
|
+
formData_box,
|
|
23449
|
+
(newVal, oldVal) => {
|
|
23450
|
+
|
|
23451
|
+
console.log('测试 222 监听', newVal);
|
|
23452
|
+
console.log('测试 333 监听', oldVal);
|
|
23453
|
+
|
|
23454
|
+
// 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
|
|
23455
|
+
emit("update:modelValue", newVal);
|
|
23456
|
+
},
|
|
23457
|
+
{
|
|
23458
|
+
deep: true, // 深层监听
|
|
23459
|
+
}
|
|
23460
|
+
);
|
|
23461
|
+
|
|
23422
23462
|
return (_ctx, _cache) => {
|
|
23423
23463
|
const _component_ly0Menu = vue.resolveComponent("ly0Menu");
|
|
23424
23464
|
const _component_el_collapse_item = vue.resolveComponent("el-collapse-item");
|
|
@@ -23444,7 +23484,7 @@ return (_ctx, _cache) => {
|
|
|
23444
23484
|
vue.createElementVNode("tbody", null, [
|
|
23445
23485
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item.items, (item0, index0) => {
|
|
23446
23486
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index0 }, [
|
|
23447
|
-
(item0.hdlVisible ? item0.hdlVisible({formData:
|
|
23487
|
+
(item0.hdlVisible ? item0.hdlVisible({formData: vue.unref(formData_box), scopeThis: scopeThis_box}) : true)
|
|
23448
23488
|
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_1$c, [
|
|
23449
23489
|
(!!item0.label)
|
|
23450
23490
|
? (vue.openBlock(), vue.createElementBlock("td", {
|
|
@@ -23452,8 +23492,8 @@ return (_ctx, _cache) => {
|
|
|
23452
23492
|
style: vue.normalizeStyle(style.field_box.left)
|
|
23453
23493
|
}, [
|
|
23454
23494
|
vue.createVNode(script$h, {
|
|
23455
|
-
modelValue:
|
|
23456
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((
|
|
23495
|
+
modelValue: vue.unref(formData_box),
|
|
23496
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23457
23497
|
myProps: formProps_box,
|
|
23458
23498
|
scopeThis: scopeThis_box,
|
|
23459
23499
|
item: item0
|
|
@@ -23478,7 +23518,7 @@ return (_ctx, _cache) => {
|
|
|
23478
23518
|
default: vue.withCtx(() => [
|
|
23479
23519
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(item0.items, (item1, index1) => {
|
|
23480
23520
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index1 }, [
|
|
23481
|
-
(item1.hdlVisible ? item1.hdlVisible({formData:
|
|
23521
|
+
(item1.hdlVisible ? item1.hdlVisible({formData: vue.unref(formData_box), scopeThis: scopeThis_box}) : true)
|
|
23482
23522
|
? (vue.openBlock(), vue.createBlock(_component_el_collapse_item, {
|
|
23483
23523
|
key: 0,
|
|
23484
23524
|
title: item1.title,
|
|
@@ -23492,7 +23532,7 @@ return (_ctx, _cache) => {
|
|
|
23492
23532
|
return (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: index2 }, [
|
|
23493
23533
|
(
|
|
23494
23534
|
item2.hdlVisible
|
|
23495
|
-
? item2.hdlVisible({formData:
|
|
23535
|
+
? item2.hdlVisible({formData: vue.unref(formData_box), scopeThis: scopeThis_box})
|
|
23496
23536
|
: true
|
|
23497
23537
|
)
|
|
23498
23538
|
? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_3$5, [
|
|
@@ -23502,8 +23542,8 @@ return (_ctx, _cache) => {
|
|
|
23502
23542
|
style: vue.normalizeStyle(style.field_box.left)
|
|
23503
23543
|
}, [
|
|
23504
23544
|
vue.createVNode(script$h, {
|
|
23505
|
-
modelValue:
|
|
23506
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => ((
|
|
23545
|
+
modelValue: vue.unref(formData_box),
|
|
23546
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23507
23547
|
myProps: formProps_box,
|
|
23508
23548
|
scopeThis: scopeThis_box,
|
|
23509
23549
|
item: item2
|
|
@@ -23515,8 +23555,8 @@ return (_ctx, _cache) => {
|
|
|
23515
23555
|
colspan: style.no_field_label(item2)
|
|
23516
23556
|
}, [
|
|
23517
23557
|
vue.createVNode(script$g, {
|
|
23518
|
-
modelValue:
|
|
23519
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((
|
|
23558
|
+
modelValue: vue.unref(formData_box),
|
|
23559
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23520
23560
|
myProps: formProps_box,
|
|
23521
23561
|
scopeThis: scopeThis_box,
|
|
23522
23562
|
item: item2
|
|
@@ -23538,8 +23578,8 @@ return (_ctx, _cache) => {
|
|
|
23538
23578
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["accordion", "modelValue", "onUpdate:modelValue", "style"]))
|
|
23539
23579
|
: vue.createCommentVNode("v-if", true),
|
|
23540
23580
|
vue.createVNode(script$g, {
|
|
23541
|
-
modelValue:
|
|
23542
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => ((
|
|
23581
|
+
modelValue: vue.unref(formData_box),
|
|
23582
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23543
23583
|
myProps: formProps_box,
|
|
23544
23584
|
scopeThis: scopeThis_box,
|
|
23545
23585
|
item: item0
|
|
@@ -23601,13 +23641,33 @@ var script$e = {
|
|
|
23601
23641
|
default: () => ({})
|
|
23602
23642
|
}
|
|
23603
23643
|
},
|
|
23604
|
-
|
|
23644
|
+
emits: ['update:modelValue', 'change'],
|
|
23645
|
+
setup(__props, { emit: __emit }) {
|
|
23605
23646
|
|
|
23606
23647
|
const props = __props;
|
|
23648
|
+
// 遵循 Vue 3 v-model 规范,使用 update:modelValue 事件
|
|
23649
|
+
const emit = __emit;
|
|
23607
23650
|
|
|
23651
|
+
let formData_box = vue.reactive(props.modelValue);
|
|
23608
23652
|
const formProps_box = vue.reactive(Object.assign({}, ly0default$2.myProps, props.myProps));
|
|
23609
23653
|
const scopeThis_box = vue.reactive(Object.assign({}, props.scopeThis));
|
|
23610
23654
|
|
|
23655
|
+
// 表单数据监听
|
|
23656
|
+
vue.watch(
|
|
23657
|
+
formData_box,
|
|
23658
|
+
(newVal, oldVal) => {
|
|
23659
|
+
|
|
23660
|
+
console.log('测试 444 监听', newVal);
|
|
23661
|
+
console.log('测试 555 监听', oldVal);
|
|
23662
|
+
|
|
23663
|
+
// 触发 update:modelValue 事件更新父组件的 v-model 绑定的值
|
|
23664
|
+
emit("update:modelValue", newVal);
|
|
23665
|
+
},
|
|
23666
|
+
{
|
|
23667
|
+
deep: true, // 深层监听
|
|
23668
|
+
}
|
|
23669
|
+
);
|
|
23670
|
+
|
|
23611
23671
|
return (_ctx, _cache) => {
|
|
23612
23672
|
const _component_el_dialog = vue.resolveComponent("el-dialog");
|
|
23613
23673
|
|
|
@@ -23626,8 +23686,8 @@ return (_ctx, _cache) => {
|
|
|
23626
23686
|
}, {
|
|
23627
23687
|
default: vue.withCtx(() => [
|
|
23628
23688
|
vue.createVNode(script$f, {
|
|
23629
|
-
modelValue:
|
|
23630
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((
|
|
23689
|
+
modelValue: vue.unref(formData_box),
|
|
23690
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23631
23691
|
myProps: formProps_box,
|
|
23632
23692
|
scopeThis: scopeThis_box
|
|
23633
23693
|
}, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"])
|
|
@@ -23636,8 +23696,8 @@ return (_ctx, _cache) => {
|
|
|
23636
23696
|
}, 8 /* PROPS */, ["modelValue", "title", "width", "top"]))
|
|
23637
23697
|
: (vue.openBlock(), vue.createBlock(script$f, {
|
|
23638
23698
|
key: 1,
|
|
23639
|
-
modelValue:
|
|
23640
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => ((
|
|
23699
|
+
modelValue: vue.unref(formData_box),
|
|
23700
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => (vue.isRef(formData_box) ? (formData_box).value = $event : formData_box = $event)),
|
|
23641
23701
|
myProps: formProps_box,
|
|
23642
23702
|
scopeThis: scopeThis_box
|
|
23643
23703
|
}, null, 8 /* PROPS */, ["modelValue", "myProps", "scopeThis"]))
|