@tmagic/form 1.7.0-beta.2 → 1.7.0-beta.3
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/style.css +20 -7
- package/dist/tmagic-form.js +444 -417
- package/dist/tmagic-form.umd.cjs +443 -416
- package/package.json +4 -4
- package/src/FormDialog.vue +1 -1
- package/src/FormDrawer.vue +1 -1
- package/src/containers/GroupList.vue +16 -11
- package/src/containers/GroupListItem.vue +72 -70
- package/src/fields/Link.vue +3 -2
- package/src/fields/Text.vue +22 -4
- package/src/table/Table.vue +13 -8
- package/src/table/useAdd.ts +1 -0
- package/src/table/useFullscreen.ts +1 -11
- package/src/theme/group-list.scss +15 -0
- package/src/theme/table.scss +6 -3
- package/types/index.d.ts +2 -2
package/dist/tmagic-form.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { toRaw, defineComponent, inject, ref, computed, watchEffect, watch, resolveComponent, createElementBlock, openBlock, normalizeStyle, normalizeClass, createBlock, createCommentVNode, mergeProps, resolveDynamicComponent, Fragment, createVNode, unref, withCtx, createElementVNode, renderList, createTextVNode, toDisplayString, readonly, withDirectives, vShow, renderSlot, getCurrentInstance, createSlots, onUnmounted, reactive, onBeforeUnmount, vModelText, useTemplateRef, provide, shallowRef, onBeforeMount, nextTick, resolveDirective, withModifiers, Teleport, h } from 'vue';
|
|
2
2
|
import { WarningFilled, CaretBottom, CaretRight, Delete, DocumentCopy, CaretTop, Position, Grid, ArrowUp, ArrowDown, FullScreen } from '@element-plus/icons-vue';
|
|
3
3
|
import { cloneDeep, isEqual, isEmpty, debounce } from 'lodash-es';
|
|
4
|
-
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicPopover, TMagicInputNumber,
|
|
4
|
+
import { TMagicFormItem, TMagicTooltip, TMagicIcon, TMagicButton, TMagicCheckbox, TMagicCard, TMagicPopover, TMagicInputNumber, TMagicCol, TMagicRow, TMagicSteps, TMagicStep, getDesignConfig, TMagicBadge, TMagicCascader, TMagicCheckboxGroup, TMagicColorPicker, TMagicDatePicker, TMagicForm, TMagicInput, tMagicMessage, tMagicMessageBox, TMagicDialog, TMagicRadioButton, TMagicRadio, TMagicRadioGroup, TMagicSelect, TMagicSwitch, TMagicTimePicker, useZIndex, TMagicTable, TMagicUpload, TMagicPagination, TMagicDrawer, TMagicScrollbar } from '@tmagic/design';
|
|
5
5
|
import { getValueByKeyPath, setValueByKeyPath, isNumber, asyncLoadJs } from '@tmagic/utils';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import utc from 'dayjs/plugin/utc';
|
|
@@ -227,8 +227,8 @@ const sortChange = (data, { prop, order }) => {
|
|
|
227
227
|
|
|
228
228
|
const _hoisted_1$d = ["data-tmagic-id", "data-tmagic-form-item-prop"];
|
|
229
229
|
const _hoisted_2$7 = ["innerHTML", "title"];
|
|
230
|
-
const _hoisted_3$
|
|
231
|
-
const _hoisted_4$
|
|
230
|
+
const _hoisted_3$5 = ["innerHTML"];
|
|
231
|
+
const _hoisted_4$4 = ["innerHTML"];
|
|
232
232
|
const _hoisted_5$3 = ["innerHTML", "title"];
|
|
233
233
|
const _hoisted_6$1 = ["innerHTML"];
|
|
234
234
|
const _hoisted_7$1 = ["innerHTML"];
|
|
@@ -495,7 +495,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
495
495
|
content: withCtx(() => [
|
|
496
496
|
createElementVNode("div", {
|
|
497
497
|
innerHTML: tooltip.value.text
|
|
498
|
-
}, null, 8, _hoisted_3$
|
|
498
|
+
}, null, 8, _hoisted_3$5)
|
|
499
499
|
]),
|
|
500
500
|
default: withCtx(() => [
|
|
501
501
|
(openBlock(), createBlock(resolveDynamicComponent(tagName.value), mergeProps(fieldsProps.value, {
|
|
@@ -524,7 +524,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
524
524
|
content: withCtx(() => [
|
|
525
525
|
createElementVNode("div", {
|
|
526
526
|
innerHTML: __props.config.tip
|
|
527
|
-
}, null, 8, _hoisted_4$
|
|
527
|
+
}, null, 8, _hoisted_4$4)
|
|
528
528
|
]),
|
|
529
529
|
default: withCtx(() => [
|
|
530
530
|
createVNode(unref(TMagicIcon), { style: { "line-height": "40px", "margin-left": "5px" } }, {
|
|
@@ -721,8 +721,8 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
721
721
|
|
|
722
722
|
const _hoisted_1$c = ["innerHTML"];
|
|
723
723
|
const _hoisted_2$6 = ["innerHTML"];
|
|
724
|
-
const _hoisted_3$
|
|
725
|
-
const _hoisted_4$
|
|
724
|
+
const _hoisted_3$4 = { key: 1 };
|
|
725
|
+
const _hoisted_4$3 = ["innerHTML"];
|
|
726
726
|
const _hoisted_5$2 = ["innerHTML"];
|
|
727
727
|
const _hoisted_6 = {
|
|
728
728
|
key: 2,
|
|
@@ -822,10 +822,10 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
822
822
|
]),
|
|
823
823
|
_: 1
|
|
824
824
|
/* STABLE */
|
|
825
|
-
})) : (openBlock(), createElementBlock("legend", _hoisted_3$
|
|
825
|
+
})) : (openBlock(), createElementBlock("legend", _hoisted_3$4, [
|
|
826
826
|
createElementVNode("span", {
|
|
827
827
|
innerHTML: __props.config.legend
|
|
828
|
-
}, null, 8, _hoisted_4$
|
|
828
|
+
}, null, 8, _hoisted_4$3),
|
|
829
829
|
__props.config.extra ? (openBlock(), createElementBlock("span", {
|
|
830
830
|
key: 0,
|
|
831
831
|
innerHTML: __props.config.extra,
|
|
@@ -954,9 +954,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
954
954
|
}
|
|
955
955
|
});
|
|
956
956
|
|
|
957
|
-
const _hoisted_1$b = {
|
|
958
|
-
const _hoisted_2$5 =
|
|
959
|
-
const _hoisted_3$4 = ["innerHTML"];
|
|
957
|
+
const _hoisted_1$b = { style: { "text-align": "right", "margin-top": "20px" } };
|
|
958
|
+
const _hoisted_2$5 = ["innerHTML"];
|
|
960
959
|
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
961
960
|
...{
|
|
962
961
|
name: "MFormGroupListItem"
|
|
@@ -1035,211 +1034,220 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1035
1034
|
emit("swap-item", props.index, moveSpecifyLocationIndex.value - 1);
|
|
1036
1035
|
};
|
|
1037
1036
|
return (_ctx, _cache) => {
|
|
1038
|
-
return openBlock(),
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
withDirectives(createVNode(unref(TMagicButton), {
|
|
1063
|
-
type: "danger",
|
|
1064
|
-
size: "small",
|
|
1065
|
-
link: "",
|
|
1066
|
-
icon: unref(Delete),
|
|
1067
|
-
disabled: __props.disabled,
|
|
1068
|
-
onClick: removeHandler
|
|
1069
|
-
}, null, 8, ["icon", "disabled"]), [
|
|
1070
|
-
[vShow, showDelete.value]
|
|
1071
|
-
]),
|
|
1072
|
-
copyable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1073
|
-
key: 0,
|
|
1074
|
-
link: "",
|
|
1075
|
-
size: "small",
|
|
1076
|
-
type: "primary",
|
|
1077
|
-
icon: unref(DocumentCopy),
|
|
1078
|
-
disabled: __props.disabled,
|
|
1079
|
-
onClick: copyHandler
|
|
1080
|
-
}, {
|
|
1081
|
-
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
1082
|
-
createTextVNode(
|
|
1083
|
-
"复制",
|
|
1084
|
-
-1
|
|
1085
|
-
/* CACHED */
|
|
1086
|
-
)
|
|
1087
|
-
])]),
|
|
1088
|
-
_: 1
|
|
1089
|
-
/* STABLE */
|
|
1090
|
-
}, 8, ["icon", "disabled"])) : createCommentVNode("v-if", true),
|
|
1091
|
-
movable.value ? (openBlock(), createElementBlock(
|
|
1092
|
-
Fragment,
|
|
1093
|
-
{ key: 1 },
|
|
1094
|
-
[
|
|
1095
|
-
withDirectives(createVNode(unref(TMagicButton), {
|
|
1096
|
-
link: "",
|
|
1097
|
-
size: "small",
|
|
1098
|
-
disabled: __props.disabled,
|
|
1099
|
-
icon: unref(CaretTop),
|
|
1100
|
-
onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
|
|
1101
|
-
}, {
|
|
1102
|
-
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
1103
|
-
createTextVNode(
|
|
1104
|
-
"上移",
|
|
1105
|
-
-1
|
|
1106
|
-
/* CACHED */
|
|
1107
|
-
)
|
|
1108
|
-
])]),
|
|
1109
|
-
_: 1
|
|
1110
|
-
/* STABLE */
|
|
1111
|
-
}, 8, ["disabled", "icon"]), [
|
|
1112
|
-
[vShow, __props.index !== 0]
|
|
1037
|
+
return openBlock(), createBlock(unref(TMagicCard), {
|
|
1038
|
+
class: "m-fields-group-list-item",
|
|
1039
|
+
"body-style": { display: expand.value ? "block" : "none" }
|
|
1040
|
+
}, {
|
|
1041
|
+
header: withCtx(() => [
|
|
1042
|
+
createElementVNode("div", null, [
|
|
1043
|
+
createVNode(unref(TMagicButton), {
|
|
1044
|
+
link: "",
|
|
1045
|
+
disabled: __props.disabled,
|
|
1046
|
+
onClick: expandHandler
|
|
1047
|
+
}, {
|
|
1048
|
+
default: withCtx(() => [
|
|
1049
|
+
createVNode(unref(TMagicIcon), null, {
|
|
1050
|
+
default: withCtx(() => [
|
|
1051
|
+
expand.value ? (openBlock(), createBlock(unref(CaretBottom), { key: 0 })) : (openBlock(), createBlock(unref(CaretRight), { key: 1 }))
|
|
1052
|
+
]),
|
|
1053
|
+
_: 1
|
|
1054
|
+
/* STABLE */
|
|
1055
|
+
}),
|
|
1056
|
+
createTextVNode(
|
|
1057
|
+
toDisplayString(title.value),
|
|
1058
|
+
1
|
|
1059
|
+
/* TEXT */
|
|
1060
|
+
)
|
|
1113
1061
|
]),
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
)
|
|
1127
|
-
])]),
|
|
1128
|
-
_: 1
|
|
1129
|
-
/* STABLE */
|
|
1130
|
-
}, 8, ["disabled", "icon"]), [
|
|
1131
|
-
[vShow, __props.index !== length.value - 1]
|
|
1132
|
-
])
|
|
1133
|
-
],
|
|
1134
|
-
64
|
|
1135
|
-
/* STABLE_FRAGMENT */
|
|
1136
|
-
)) : createCommentVNode("v-if", true),
|
|
1137
|
-
__props.config.moveSpecifyLocation ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
1138
|
-
key: 2,
|
|
1139
|
-
trigger: "click",
|
|
1140
|
-
placement: "top",
|
|
1141
|
-
width: "200",
|
|
1142
|
-
visible: moveSpecifyLocationVisible.value
|
|
1143
|
-
}, {
|
|
1144
|
-
reference: withCtx(() => [
|
|
1145
|
-
createVNode(unref(TMagicButton), {
|
|
1146
|
-
link: "",
|
|
1147
|
-
size: "small",
|
|
1148
|
-
type: "primary",
|
|
1149
|
-
icon: unref(Position),
|
|
1150
|
-
disabled: __props.disabled,
|
|
1151
|
-
onClick: _cache[2] || (_cache[2] = ($event) => moveSpecifyLocationVisible.value = true)
|
|
1152
|
-
}, {
|
|
1153
|
-
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
1154
|
-
createTextVNode(
|
|
1155
|
-
"移动至",
|
|
1156
|
-
-1
|
|
1157
|
-
/* CACHED */
|
|
1158
|
-
)
|
|
1159
|
-
])]),
|
|
1160
|
-
_: 1
|
|
1161
|
-
/* STABLE */
|
|
1162
|
-
}, 8, ["icon", "disabled"])
|
|
1062
|
+
_: 1
|
|
1063
|
+
/* STABLE */
|
|
1064
|
+
}, 8, ["disabled"]),
|
|
1065
|
+
withDirectives(createVNode(unref(TMagicButton), {
|
|
1066
|
+
type: "danger",
|
|
1067
|
+
size: "small",
|
|
1068
|
+
link: "",
|
|
1069
|
+
icon: unref(Delete),
|
|
1070
|
+
disabled: __props.disabled,
|
|
1071
|
+
onClick: removeHandler
|
|
1072
|
+
}, null, 8, ["icon", "disabled"]), [
|
|
1073
|
+
[vShow, showDelete.value]
|
|
1163
1074
|
]),
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1075
|
+
copyable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1076
|
+
key: 0,
|
|
1077
|
+
link: "",
|
|
1078
|
+
size: "small",
|
|
1079
|
+
type: "primary",
|
|
1080
|
+
icon: unref(DocumentCopy),
|
|
1081
|
+
disabled: __props.disabled,
|
|
1082
|
+
onClick: copyHandler
|
|
1083
|
+
}, {
|
|
1084
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
1085
|
+
createTextVNode(
|
|
1086
|
+
"复制",
|
|
1087
|
+
-1
|
|
1088
|
+
/* CACHED */
|
|
1089
|
+
)
|
|
1090
|
+
])]),
|
|
1091
|
+
_: 1
|
|
1092
|
+
/* STABLE */
|
|
1093
|
+
}, 8, ["icon", "disabled"])) : createCommentVNode("v-if", true),
|
|
1094
|
+
movable.value ? (openBlock(), createElementBlock(
|
|
1095
|
+
Fragment,
|
|
1096
|
+
{ key: 1 },
|
|
1097
|
+
[
|
|
1098
|
+
withDirectives(createVNode(unref(TMagicButton), {
|
|
1099
|
+
link: "",
|
|
1100
|
+
size: "small",
|
|
1101
|
+
disabled: __props.disabled,
|
|
1102
|
+
icon: unref(CaretTop),
|
|
1103
|
+
onClick: _cache[0] || (_cache[0] = ($event) => changeOrder(-1))
|
|
1104
|
+
}, {
|
|
1105
|
+
default: withCtx(() => [..._cache[7] || (_cache[7] = [
|
|
1106
|
+
createTextVNode(
|
|
1107
|
+
"上移",
|
|
1108
|
+
-1
|
|
1109
|
+
/* CACHED */
|
|
1110
|
+
)
|
|
1111
|
+
])]),
|
|
1112
|
+
_: 1
|
|
1113
|
+
/* STABLE */
|
|
1114
|
+
}, 8, ["disabled", "icon"]), [
|
|
1115
|
+
[vShow, __props.index !== 0]
|
|
1185
1116
|
]),
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
type: "primary",
|
|
1205
|
-
onClick: moveSpecifyLocationHandler
|
|
1206
|
-
}, {
|
|
1207
|
-
default: withCtx(() => [..._cache[13] || (_cache[13] = [
|
|
1208
|
-
createTextVNode(
|
|
1209
|
-
"确认",
|
|
1210
|
-
-1
|
|
1211
|
-
/* CACHED */
|
|
1212
|
-
)
|
|
1213
|
-
])]),
|
|
1214
|
-
_: 1
|
|
1215
|
-
/* STABLE */
|
|
1216
|
-
})
|
|
1117
|
+
withDirectives(createVNode(unref(TMagicButton), {
|
|
1118
|
+
link: "",
|
|
1119
|
+
size: "small",
|
|
1120
|
+
disabled: __props.disabled,
|
|
1121
|
+
icon: unref(CaretBottom),
|
|
1122
|
+
onClick: _cache[1] || (_cache[1] = ($event) => changeOrder(1))
|
|
1123
|
+
}, {
|
|
1124
|
+
default: withCtx(() => [..._cache[8] || (_cache[8] = [
|
|
1125
|
+
createTextVNode(
|
|
1126
|
+
"下移",
|
|
1127
|
+
-1
|
|
1128
|
+
/* CACHED */
|
|
1129
|
+
)
|
|
1130
|
+
])]),
|
|
1131
|
+
_: 1
|
|
1132
|
+
/* STABLE */
|
|
1133
|
+
}, 8, ["disabled", "icon"]), [
|
|
1134
|
+
[vShow, __props.index !== length.value - 1]
|
|
1217
1135
|
])
|
|
1218
|
-
]
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1136
|
+
],
|
|
1137
|
+
64
|
|
1138
|
+
/* STABLE_FRAGMENT */
|
|
1139
|
+
)) : createCommentVNode("v-if", true),
|
|
1140
|
+
__props.config.moveSpecifyLocation ? (openBlock(), createBlock(unref(TMagicPopover), {
|
|
1141
|
+
key: 2,
|
|
1142
|
+
trigger: "click",
|
|
1143
|
+
placement: "top",
|
|
1144
|
+
width: "200",
|
|
1145
|
+
visible: moveSpecifyLocationVisible.value
|
|
1146
|
+
}, {
|
|
1147
|
+
reference: withCtx(() => [
|
|
1148
|
+
createVNode(unref(TMagicButton), {
|
|
1149
|
+
link: "",
|
|
1150
|
+
size: "small",
|
|
1151
|
+
type: "primary",
|
|
1152
|
+
icon: unref(Position),
|
|
1153
|
+
disabled: __props.disabled,
|
|
1154
|
+
onClick: _cache[2] || (_cache[2] = ($event) => moveSpecifyLocationVisible.value = true)
|
|
1155
|
+
}, {
|
|
1156
|
+
default: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
1157
|
+
createTextVNode(
|
|
1158
|
+
"移动至",
|
|
1159
|
+
-1
|
|
1160
|
+
/* CACHED */
|
|
1161
|
+
)
|
|
1162
|
+
])]),
|
|
1163
|
+
_: 1
|
|
1164
|
+
/* STABLE */
|
|
1165
|
+
}, 8, ["icon", "disabled"])
|
|
1166
|
+
]),
|
|
1167
|
+
default: withCtx(() => [
|
|
1168
|
+
createElementVNode("div", null, [
|
|
1169
|
+
createElementVNode("div", null, [
|
|
1170
|
+
_cache[10] || (_cache[10] = createTextVNode(
|
|
1171
|
+
" 第",
|
|
1172
|
+
-1
|
|
1173
|
+
/* CACHED */
|
|
1174
|
+
)),
|
|
1175
|
+
createVNode(unref(TMagicInputNumber), {
|
|
1176
|
+
style: { "margin": "0 5px" },
|
|
1177
|
+
modelValue: moveSpecifyLocationIndex.value,
|
|
1178
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => moveSpecifyLocationIndex.value = $event),
|
|
1179
|
+
size: "small",
|
|
1180
|
+
min: 1,
|
|
1181
|
+
disabled: __props.disabled
|
|
1182
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
1183
|
+
_cache[11] || (_cache[11] = createTextVNode(
|
|
1184
|
+
"行 ",
|
|
1185
|
+
-1
|
|
1186
|
+
/* CACHED */
|
|
1187
|
+
))
|
|
1188
|
+
]),
|
|
1189
|
+
createElementVNode("div", _hoisted_1$b, [
|
|
1190
|
+
createVNode(unref(TMagicButton), {
|
|
1191
|
+
size: "small",
|
|
1192
|
+
text: "",
|
|
1193
|
+
onClick: _cache[4] || (_cache[4] = ($event) => moveSpecifyLocationVisible.value = false)
|
|
1194
|
+
}, {
|
|
1195
|
+
default: withCtx(() => [..._cache[12] || (_cache[12] = [
|
|
1196
|
+
createTextVNode(
|
|
1197
|
+
"取消",
|
|
1198
|
+
-1
|
|
1199
|
+
/* CACHED */
|
|
1200
|
+
)
|
|
1201
|
+
])]),
|
|
1202
|
+
_: 1
|
|
1203
|
+
/* STABLE */
|
|
1204
|
+
}),
|
|
1205
|
+
createVNode(unref(TMagicButton), {
|
|
1206
|
+
size: "small",
|
|
1207
|
+
type: "primary",
|
|
1208
|
+
onClick: moveSpecifyLocationHandler
|
|
1209
|
+
}, {
|
|
1210
|
+
default: withCtx(() => [..._cache[13] || (_cache[13] = [
|
|
1211
|
+
createTextVNode(
|
|
1212
|
+
"确认",
|
|
1213
|
+
-1
|
|
1214
|
+
/* CACHED */
|
|
1215
|
+
)
|
|
1216
|
+
])]),
|
|
1217
|
+
_: 1
|
|
1218
|
+
/* STABLE */
|
|
1219
|
+
})
|
|
1220
|
+
])
|
|
1221
|
+
])
|
|
1222
|
+
]),
|
|
1223
|
+
_: 1
|
|
1224
|
+
/* STABLE */
|
|
1225
|
+
}, 8, ["visible"])) : createCommentVNode("v-if", true),
|
|
1226
|
+
itemExtra.value ? (openBlock(), createElementBlock("span", {
|
|
1227
|
+
key: 3,
|
|
1228
|
+
innerHTML: itemExtra.value,
|
|
1229
|
+
class: "m-form-tip"
|
|
1230
|
+
}, null, 8, _hoisted_2$5)) : createCommentVNode("v-if", true)
|
|
1231
|
+
])
|
|
1228
1232
|
]),
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1233
|
+
default: withCtx(() => [
|
|
1234
|
+
expand.value ? (openBlock(), createBlock(_sfc_main$A, {
|
|
1235
|
+
key: 0,
|
|
1236
|
+
config: rowConfig.value,
|
|
1237
|
+
model: __props.model,
|
|
1238
|
+
lastValues: __props.lastValues,
|
|
1239
|
+
"is-compare": __props.isCompare,
|
|
1240
|
+
labelWidth: __props.labelWidth,
|
|
1241
|
+
prop: `${__props.prop}${__props.prop ? "." : ""}${String(__props.index)}`,
|
|
1242
|
+
size: __props.size,
|
|
1243
|
+
disabled: __props.disabled,
|
|
1244
|
+
onChange: changeHandler,
|
|
1245
|
+
onAddDiffCount: _cache[5] || (_cache[5] = ($event) => onAddDiffCount())
|
|
1246
|
+
}, null, 8, ["config", "model", "lastValues", "is-compare", "labelWidth", "prop", "size", "disabled"])) : createCommentVNode("v-if", true)
|
|
1247
|
+
]),
|
|
1248
|
+
_: 1
|
|
1249
|
+
/* STABLE */
|
|
1250
|
+
}, 8, ["body-style"]);
|
|
1243
1251
|
};
|
|
1244
1252
|
}
|
|
1245
1253
|
});
|
|
@@ -1250,6 +1258,8 @@ const _hoisted_3$3 = {
|
|
|
1250
1258
|
key: 1,
|
|
1251
1259
|
class: "el-table__empty-block"
|
|
1252
1260
|
};
|
|
1261
|
+
const _hoisted_4$2 = { class: "m-fields-group-list-footer" };
|
|
1262
|
+
const _hoisted_5$1 = { style: { "display": "flex", "justify-content": "flex-end", "flex": "1" } };
|
|
1253
1263
|
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
1254
1264
|
...{
|
|
1255
1265
|
name: "MFormGroupList"
|
|
@@ -1349,7 +1359,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1349
1359
|
!__props.model[__props.name] || !__props.model[__props.name].length ? (openBlock(), createElementBlock("div", _hoisted_3$3, [..._cache[1] || (_cache[1] = [
|
|
1350
1360
|
createElementVNode(
|
|
1351
1361
|
"span",
|
|
1352
|
-
{ class: "el-table__empty-text" },
|
|
1362
|
+
{ class: "el-table__empty-text t-table__empty" },
|
|
1353
1363
|
"暂无数据",
|
|
1354
1364
|
-1
|
|
1355
1365
|
/* CACHED */
|
|
@@ -1380,39 +1390,43 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
1380
1390
|
128
|
|
1381
1391
|
/* KEYED_FRAGMENT */
|
|
1382
1392
|
)),
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1393
|
+
createElementVNode("div", _hoisted_4$2, [
|
|
1394
|
+
__props.config.enableToggleMode ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1395
|
+
key: 0,
|
|
1396
|
+
icon: unref(Grid),
|
|
1397
|
+
size: "small",
|
|
1398
|
+
onClick: toggleMode
|
|
1399
|
+
}, {
|
|
1400
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
1401
|
+
createTextVNode(
|
|
1402
|
+
"切换为表格",
|
|
1403
|
+
-1
|
|
1404
|
+
/* CACHED */
|
|
1405
|
+
)
|
|
1406
|
+
])]),
|
|
1407
|
+
_: 1
|
|
1408
|
+
/* STABLE */
|
|
1409
|
+
}, 8, ["icon"])) : createCommentVNode("v-if", true),
|
|
1410
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
1411
|
+
addable.value ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
1412
|
+
key: 0,
|
|
1413
|
+
type: "primary",
|
|
1414
|
+
size: __props.config.enableToggleMode ? "small" : "default",
|
|
1415
|
+
disabled: __props.disabled,
|
|
1416
|
+
onClick: addHandler
|
|
1417
|
+
}, {
|
|
1418
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
1419
|
+
createTextVNode(
|
|
1420
|
+
"新增",
|
|
1421
|
+
-1
|
|
1422
|
+
/* CACHED */
|
|
1423
|
+
)
|
|
1424
|
+
])]),
|
|
1425
|
+
_: 1
|
|
1426
|
+
/* STABLE */
|
|
1427
|
+
}, 8, ["size", "disabled"])) : createCommentVNode("v-if", true)
|
|
1428
|
+
])
|
|
1429
|
+
])
|
|
1416
1430
|
]);
|
|
1417
1431
|
};
|
|
1418
1432
|
}
|
|
@@ -1425,7 +1439,7 @@ const _hoisted_3$2 = {
|
|
|
1425
1439
|
style: { "display": "flex" }
|
|
1426
1440
|
};
|
|
1427
1441
|
const _hoisted_4$1 = { style: { "flex": "1" } };
|
|
1428
|
-
const _hoisted_5
|
|
1442
|
+
const _hoisted_5 = ["src"];
|
|
1429
1443
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
1430
1444
|
...{
|
|
1431
1445
|
name: "MFormPanel"
|
|
@@ -1512,7 +1526,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
1512
1526
|
createElementVNode("img", {
|
|
1513
1527
|
class: "m-form-schematic",
|
|
1514
1528
|
src: __props.config.schematic
|
|
1515
|
-
}, null, 8, _hoisted_5
|
|
1529
|
+
}, null, 8, _hoisted_5)
|
|
1516
1530
|
])) : (openBlock(true), createElementBlock(
|
|
1517
1531
|
Fragment,
|
|
1518
1532
|
{ key: 1 },
|
|
@@ -3037,7 +3051,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
3037
3051
|
default: withCtx(() => [
|
|
3038
3052
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
3039
3053
|
createVNode(unref(TMagicButton), {
|
|
3040
|
-
type: "default",
|
|
3041
3054
|
onClick: cancel,
|
|
3042
3055
|
size: "small"
|
|
3043
3056
|
}, {
|
|
@@ -3190,7 +3203,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
3190
3203
|
if (typeof props.config.form === "function") {
|
|
3191
3204
|
return props.config.form(mForm, {
|
|
3192
3205
|
model: props.model || {},
|
|
3193
|
-
values:
|
|
3206
|
+
values: mForm ? readonly(mForm.initValues) : null,
|
|
3207
|
+
formValue: props.values || {}
|
|
3194
3208
|
});
|
|
3195
3209
|
}
|
|
3196
3210
|
return props.config.form;
|
|
@@ -4047,10 +4061,25 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4047
4061
|
const buttonClickHandler = () => {
|
|
4048
4062
|
if (!appendConfig.value) return;
|
|
4049
4063
|
if (typeof appendConfig.value.handler === "function") {
|
|
4064
|
+
const newChangeRecords = [];
|
|
4065
|
+
const setModel = (key, value) => {
|
|
4066
|
+
newChangeRecords.push({ propPath: props.prop.replace(`${props.name}`, key), value });
|
|
4067
|
+
};
|
|
4068
|
+
const setFormValue = (key, value) => {
|
|
4069
|
+
newChangeRecords.push({ propPath: key, value });
|
|
4070
|
+
};
|
|
4050
4071
|
appendConfig.value.handler(mForm, {
|
|
4051
4072
|
model: props.model,
|
|
4052
|
-
values: mForm
|
|
4073
|
+
values: mForm ? readonly(mForm.initValues) : null,
|
|
4074
|
+
formValue: props.values || {},
|
|
4075
|
+
setModel,
|
|
4076
|
+
setFormValue
|
|
4053
4077
|
});
|
|
4078
|
+
if (newChangeRecords.length > 0) {
|
|
4079
|
+
emit("change", props.model[props.name], {
|
|
4080
|
+
changeRecords: newChangeRecords
|
|
4081
|
+
});
|
|
4082
|
+
}
|
|
4054
4083
|
}
|
|
4055
4084
|
};
|
|
4056
4085
|
const keyUpHandler = ($event) => {
|
|
@@ -4472,6 +4501,7 @@ const useAdd = (props, emit) => {
|
|
|
4472
4501
|
if (typeof props.config.defaultAdd === "function") {
|
|
4473
4502
|
inputs = await props.config.defaultAdd(mForm, {
|
|
4474
4503
|
model: props.model[modelName],
|
|
4504
|
+
prop: props.prop,
|
|
4475
4505
|
formValue: mForm?.values
|
|
4476
4506
|
});
|
|
4477
4507
|
} else if (props.config.defaultAdd) {
|
|
@@ -4502,16 +4532,10 @@ const useAdd = (props, emit) => {
|
|
|
4502
4532
|
|
|
4503
4533
|
const useFullscreen = () => {
|
|
4504
4534
|
const isFullscreen = ref(false);
|
|
4505
|
-
const mTableEl = useTemplateRef("mTable");
|
|
4506
|
-
const { nextZIndex } = useZIndex();
|
|
4507
4535
|
const toggleFullscreen = () => {
|
|
4508
|
-
if (!mTableEl.value) return;
|
|
4509
4536
|
if (isFullscreen.value) {
|
|
4510
|
-
mTableEl.value.classList.remove("fixed");
|
|
4511
4537
|
isFullscreen.value = false;
|
|
4512
4538
|
} else {
|
|
4513
|
-
mTableEl.value.classList.add("fixed");
|
|
4514
|
-
mTableEl.value.style.zIndex = `${nextZIndex()}`;
|
|
4515
4539
|
isFullscreen.value = true;
|
|
4516
4540
|
}
|
|
4517
4541
|
};
|
|
@@ -4997,11 +5021,10 @@ const useTableColumns = (props, emit, currentPage, pageSize, modelName) => {
|
|
|
4997
5021
|
};
|
|
4998
5022
|
};
|
|
4999
5023
|
|
|
5000
|
-
const _hoisted_1$1 =
|
|
5001
|
-
const _hoisted_2 =
|
|
5002
|
-
const _hoisted_3 = { style: { "display": "flex"
|
|
5003
|
-
const _hoisted_4 = {
|
|
5004
|
-
const _hoisted_5 = {
|
|
5024
|
+
const _hoisted_1$1 = ["innerHTML"];
|
|
5025
|
+
const _hoisted_2 = { style: { "display": "flex", "justify-content": "space-between", "margin": "10px 0" } };
|
|
5026
|
+
const _hoisted_3 = { style: { "display": "flex" } };
|
|
5027
|
+
const _hoisted_4 = {
|
|
5005
5028
|
key: 1,
|
|
5006
5029
|
class: "bottom",
|
|
5007
5030
|
style: { "text-align": "right" }
|
|
@@ -5037,6 +5060,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5037
5060
|
props,
|
|
5038
5061
|
modelName
|
|
5039
5062
|
);
|
|
5063
|
+
const { nextZIndex } = useZIndex();
|
|
5040
5064
|
const { addable, newHandler } = useAdd(props, emit);
|
|
5041
5065
|
const { columns } = useTableColumns(props, emit, currentPage, pageSize, modelName);
|
|
5042
5066
|
useSortable(props, emit, tMagicTableRef, modelName);
|
|
@@ -5074,170 +5098,176 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
5074
5098
|
toggleRowSelection
|
|
5075
5099
|
});
|
|
5076
5100
|
return (_ctx, _cache) => {
|
|
5077
|
-
return openBlock(),
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
{
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5101
|
+
return openBlock(), createBlock(Teleport, {
|
|
5102
|
+
to: "body",
|
|
5103
|
+
disabled: !unref(isFullscreen)
|
|
5104
|
+
}, [
|
|
5105
|
+
createElementVNode(
|
|
5106
|
+
"div",
|
|
5107
|
+
mergeProps(_ctx.$attrs, {
|
|
5108
|
+
class: ["m-fields-table-wrap", { fixed: unref(isFullscreen) }],
|
|
5109
|
+
style: unref(isFullscreen) ? `z-index: ${unref(nextZIndex)()}` : ""
|
|
5110
|
+
}),
|
|
5111
|
+
[
|
|
5112
|
+
createElementVNode(
|
|
5113
|
+
"div",
|
|
5114
|
+
{
|
|
5115
|
+
class: normalizeClass(["m-fields-table", { "m-fields-table-item-extra": __props.config.itemExtra }])
|
|
5116
|
+
},
|
|
5117
|
+
[
|
|
5118
|
+
__props.config.extra ? (openBlock(), createElementBlock("span", {
|
|
5119
|
+
key: 0,
|
|
5120
|
+
style: { "color": "rgba(0, 0, 0, 0.45)" },
|
|
5121
|
+
innerHTML: __props.config.extra
|
|
5122
|
+
}, null, 8, _hoisted_1$1)) : createCommentVNode("v-if", true),
|
|
5123
|
+
createVNode(unref(TMagicTooltip), {
|
|
5124
|
+
content: "拖拽可排序",
|
|
5125
|
+
placement: "left-start",
|
|
5126
|
+
disabled: __props.config.dropSort !== true
|
|
5127
|
+
}, {
|
|
5128
|
+
default: withCtx(() => [
|
|
5129
|
+
__props.model[modelName.value] ? (openBlock(), createBlock(unref(TMagicTable), {
|
|
5130
|
+
ref: "tMagicTable",
|
|
5131
|
+
style: { "width": "100%" },
|
|
5132
|
+
"show-header": "",
|
|
5133
|
+
"row-key": __props.config.rowKey || "id",
|
|
5134
|
+
columns: unref(columns),
|
|
5135
|
+
data: data.value,
|
|
5136
|
+
border: __props.config.border,
|
|
5137
|
+
"max-height": __props.config.maxHeight,
|
|
5138
|
+
"default-expand-all": true,
|
|
5139
|
+
key: updateKey.value,
|
|
5140
|
+
onSelect: unref(selectHandle),
|
|
5141
|
+
onSortChange: sortChangeHandler
|
|
5142
|
+
}, null, 8, ["row-key", "columns", "data", "border", "max-height", "onSelect"])) : createCommentVNode("v-if", true)
|
|
5143
|
+
]),
|
|
5144
|
+
_: 1
|
|
5145
|
+
/* STABLE */
|
|
5146
|
+
}, 8, ["disabled"]),
|
|
5147
|
+
renderSlot(_ctx.$slots, "default"),
|
|
5148
|
+
createElementVNode("div", _hoisted_2, [
|
|
5149
|
+
createElementVNode("div", _hoisted_3, [
|
|
5150
|
+
__props.enableToggleMode && __props.config.enableToggleMode !== false && !unref(isFullscreen) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5151
|
+
key: 0,
|
|
5152
|
+
icon: unref(Grid),
|
|
5153
|
+
size: "small",
|
|
5154
|
+
onClick: toggleMode
|
|
5155
|
+
}, {
|
|
5156
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5157
|
+
createTextVNode(
|
|
5158
|
+
"展开配置",
|
|
5159
|
+
-1
|
|
5160
|
+
/* CACHED */
|
|
5161
|
+
)
|
|
5162
|
+
])]),
|
|
5163
|
+
_: 1
|
|
5164
|
+
/* STABLE */
|
|
5165
|
+
}, 8, ["icon"])) : createCommentVNode("v-if", true),
|
|
5166
|
+
__props.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5167
|
+
key: 1,
|
|
5168
|
+
icon: unref(FullScreen),
|
|
5169
|
+
size: "small",
|
|
5170
|
+
onClick: unref(toggleFullscreen)
|
|
5171
|
+
}, {
|
|
5172
|
+
default: withCtx(() => [
|
|
5173
|
+
createTextVNode(
|
|
5174
|
+
toDisplayString(unref(isFullscreen) ? "退出全屏" : "全屏编辑"),
|
|
5175
|
+
1
|
|
5176
|
+
/* TEXT */
|
|
5177
|
+
)
|
|
5178
|
+
]),
|
|
5179
|
+
_: 1
|
|
5180
|
+
/* STABLE */
|
|
5181
|
+
}, 8, ["icon", "onClick"])) : createCommentVNode("v-if", true),
|
|
5182
|
+
unref(importable) ? (openBlock(), createBlock(unref(TMagicUpload), {
|
|
5183
|
+
key: 2,
|
|
5184
|
+
style: { "display": "inline-block" },
|
|
5185
|
+
ref: "excelBtn",
|
|
5186
|
+
action: "/noop",
|
|
5187
|
+
disabled: __props.disabled,
|
|
5188
|
+
"on-change": unref(excelHandler),
|
|
5189
|
+
"auto-upload": false
|
|
5190
|
+
}, {
|
|
5191
|
+
default: withCtx(() => [
|
|
5192
|
+
createVNode(unref(TMagicButton), {
|
|
5193
|
+
size: "small",
|
|
5194
|
+
type: "success",
|
|
5195
|
+
disabled: __props.disabled,
|
|
5196
|
+
plain: ""
|
|
5197
|
+
}, {
|
|
5198
|
+
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
5199
|
+
createTextVNode(
|
|
5200
|
+
"导入EXCEL",
|
|
5201
|
+
-1
|
|
5202
|
+
/* CACHED */
|
|
5203
|
+
)
|
|
5204
|
+
])]),
|
|
5205
|
+
_: 1
|
|
5206
|
+
/* STABLE */
|
|
5207
|
+
}, 8, ["disabled"])
|
|
5208
|
+
]),
|
|
5209
|
+
_: 1
|
|
5210
|
+
/* STABLE */
|
|
5211
|
+
}, 8, ["disabled", "on-change"])) : createCommentVNode("v-if", true),
|
|
5212
|
+
unref(importable) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5213
|
+
key: 3,
|
|
5214
|
+
size: "small",
|
|
5215
|
+
type: "warning",
|
|
5216
|
+
disabled: __props.disabled,
|
|
5217
|
+
plain: "",
|
|
5218
|
+
onClick: unref(clearHandler)
|
|
5219
|
+
}, {
|
|
5220
|
+
default: withCtx(() => [..._cache[3] || (_cache[3] = [
|
|
5221
|
+
createTextVNode(
|
|
5222
|
+
"清空",
|
|
5223
|
+
-1
|
|
5224
|
+
/* CACHED */
|
|
5225
|
+
)
|
|
5226
|
+
])]),
|
|
5227
|
+
_: 1
|
|
5228
|
+
/* STABLE */
|
|
5229
|
+
}, 8, ["disabled", "onClick"])) : createCommentVNode("v-if", true)
|
|
5230
|
+
]),
|
|
5231
|
+
unref(addable) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5122
5232
|
key: 0,
|
|
5123
|
-
icon: unref(Grid),
|
|
5124
5233
|
size: "small",
|
|
5125
|
-
type: "
|
|
5126
|
-
onClick: toggleMode
|
|
5127
|
-
}, {
|
|
5128
|
-
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5129
|
-
createTextVNode(
|
|
5130
|
-
"展开配置",
|
|
5131
|
-
-1
|
|
5132
|
-
/* CACHED */
|
|
5133
|
-
)
|
|
5134
|
-
])]),
|
|
5135
|
-
_: 1
|
|
5136
|
-
/* STABLE */
|
|
5137
|
-
}, 8, ["icon"])) : createCommentVNode("v-if", true),
|
|
5138
|
-
__props.config.enableFullscreen !== false ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5139
|
-
key: 1,
|
|
5140
|
-
icon: unref(FullScreen),
|
|
5141
|
-
size: "small",
|
|
5142
|
-
type: "defalut",
|
|
5143
|
-
onClick: unref(toggleFullscreen)
|
|
5144
|
-
}, {
|
|
5145
|
-
default: withCtx(() => [
|
|
5146
|
-
createTextVNode(
|
|
5147
|
-
toDisplayString(unref(isFullscreen) ? "退出全屏" : "全屏编辑"),
|
|
5148
|
-
1
|
|
5149
|
-
/* TEXT */
|
|
5150
|
-
)
|
|
5151
|
-
]),
|
|
5152
|
-
_: 1
|
|
5153
|
-
/* STABLE */
|
|
5154
|
-
}, 8, ["icon", "onClick"])) : createCommentVNode("v-if", true),
|
|
5155
|
-
unref(importable) ? (openBlock(), createBlock(unref(TMagicUpload), {
|
|
5156
|
-
key: 2,
|
|
5157
|
-
style: { "display": "inline-block" },
|
|
5158
|
-
ref: "excelBtn",
|
|
5159
|
-
action: "/noop",
|
|
5160
|
-
disabled: __props.disabled,
|
|
5161
|
-
"on-change": unref(excelHandler),
|
|
5162
|
-
"auto-upload": false
|
|
5163
|
-
}, {
|
|
5164
|
-
default: withCtx(() => [
|
|
5165
|
-
createVNode(unref(TMagicButton), {
|
|
5166
|
-
size: "small",
|
|
5167
|
-
type: "success",
|
|
5168
|
-
disabled: __props.disabled,
|
|
5169
|
-
plain: ""
|
|
5170
|
-
}, {
|
|
5171
|
-
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
5172
|
-
createTextVNode(
|
|
5173
|
-
"导入EXCEL",
|
|
5174
|
-
-1
|
|
5175
|
-
/* CACHED */
|
|
5176
|
-
)
|
|
5177
|
-
])]),
|
|
5178
|
-
_: 1
|
|
5179
|
-
/* STABLE */
|
|
5180
|
-
}, 8, ["disabled"])
|
|
5181
|
-
]),
|
|
5182
|
-
_: 1
|
|
5183
|
-
/* STABLE */
|
|
5184
|
-
}, 8, ["disabled", "on-change"])) : createCommentVNode("v-if", true),
|
|
5185
|
-
unref(importable) ? (openBlock(), createBlock(unref(TMagicButton), {
|
|
5186
|
-
key: 3,
|
|
5187
|
-
size: "small",
|
|
5188
|
-
type: "warning",
|
|
5234
|
+
type: "primary",
|
|
5189
5235
|
disabled: __props.disabled,
|
|
5190
5236
|
plain: "",
|
|
5191
|
-
onClick: unref(
|
|
5237
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(newHandler)())
|
|
5192
5238
|
}, {
|
|
5193
|
-
default: withCtx(() => [..._cache[
|
|
5239
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
5194
5240
|
createTextVNode(
|
|
5195
|
-
"
|
|
5241
|
+
"新增一行",
|
|
5196
5242
|
-1
|
|
5197
5243
|
/* CACHED */
|
|
5198
5244
|
)
|
|
5199
5245
|
])]),
|
|
5200
5246
|
_: 1
|
|
5201
5247
|
/* STABLE */
|
|
5202
|
-
}, 8, ["disabled"
|
|
5248
|
+
}, 8, ["disabled"])) : createCommentVNode("v-if", true)
|
|
5203
5249
|
]),
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
layout: "total, sizes, prev, pager, next, jumper",
|
|
5226
|
-
"hide-on-single-page": __props.model[modelName.value].length < unref(pageSize),
|
|
5227
|
-
"current-page": unref(currentPage) + 1,
|
|
5228
|
-
"page-sizes": [unref(pageSize), 60, 120, 300],
|
|
5229
|
-
"page-size": unref(pageSize),
|
|
5230
|
-
total: __props.model[modelName.value].length,
|
|
5231
|
-
onSizeChange: unref(handleSizeChange),
|
|
5232
|
-
onCurrentChange: unref(handleCurrentChange)
|
|
5233
|
-
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total", "onSizeChange", "onCurrentChange"])
|
|
5234
|
-
])) : createCommentVNode("v-if", true)
|
|
5235
|
-
],
|
|
5236
|
-
2
|
|
5237
|
-
/* CLASS */
|
|
5238
|
-
)
|
|
5239
|
-
], 8, ["disabled"]))
|
|
5240
|
-
]);
|
|
5250
|
+
__props.config.pagination ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
5251
|
+
createVNode(unref(TMagicPagination), {
|
|
5252
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
5253
|
+
"hide-on-single-page": __props.model[modelName.value].length < unref(pageSize),
|
|
5254
|
+
"current-page": unref(currentPage) + 1,
|
|
5255
|
+
"page-sizes": [unref(pageSize), 60, 120, 300],
|
|
5256
|
+
"page-size": unref(pageSize),
|
|
5257
|
+
total: __props.model[modelName.value].length,
|
|
5258
|
+
onSizeChange: unref(handleSizeChange),
|
|
5259
|
+
onCurrentChange: unref(handleCurrentChange)
|
|
5260
|
+
}, null, 8, ["hide-on-single-page", "current-page", "page-sizes", "page-size", "total", "onSizeChange", "onCurrentChange"])
|
|
5261
|
+
])) : createCommentVNode("v-if", true)
|
|
5262
|
+
],
|
|
5263
|
+
2
|
|
5264
|
+
/* CLASS */
|
|
5265
|
+
)
|
|
5266
|
+
],
|
|
5267
|
+
16
|
|
5268
|
+
/* FULL_PROPS */
|
|
5269
|
+
)
|
|
5270
|
+
], 8, ["disabled"]);
|
|
5241
5271
|
};
|
|
5242
5272
|
}
|
|
5243
5273
|
});
|
|
@@ -5358,10 +5388,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5358
5388
|
createVNode(unref(TMagicCol), { span: 12 }, {
|
|
5359
5389
|
default: withCtx(() => [
|
|
5360
5390
|
renderSlot(_ctx.$slots, "footer", {}, () => [
|
|
5361
|
-
createVNode(unref(TMagicButton), {
|
|
5362
|
-
type: "default",
|
|
5363
|
-
onClick: handleClose
|
|
5364
|
-
}, {
|
|
5391
|
+
createVNode(unref(TMagicButton), { onClick: handleClose }, {
|
|
5365
5392
|
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
5366
5393
|
createTextVNode(
|
|
5367
5394
|
"关闭",
|