@vipl520/dk-ui 1.0.61 → 1.0.63
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.css +1 -1
- package/dist/index.js +133 -109
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +3 -3
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +133 -109
- package/dist/web-types.json +1 -1
- package/es/dialog/src/dialog.vue2.mjs +1 -1
- package/es/dialog/src/dialog.vue2.mjs.map +1 -1
- package/es/form/src/form.vue2.mjs +15 -2
- package/es/form/src/form.vue2.mjs.map +1 -1
- package/es/page-diy/index.d.ts +1 -0
- package/es/page-diy/src/page-diy.vue.d.ts +1 -0
- package/es/page-diy/src/page-diy.vue.mjs +118 -107
- package/es/page-diy/src/page-diy.vue.mjs.map +1 -1
- package/es/page-diy/style/dk-page-diy.css +1 -1
- package/es/page-diy/style/dk-page-diy.scss +30 -26
- package/es/page-diy/style/index.css +1 -1
- package/lib/dialog/src/dialog.vue2.js +1 -1
- package/lib/dialog/src/dialog.vue2.js.map +1 -1
- package/lib/form/src/form.vue2.js +15 -2
- package/lib/form/src/form.vue2.js.map +1 -1
- package/lib/page-diy/index.d.ts +1 -0
- package/lib/page-diy/src/page-diy.vue.d.ts +1 -0
- package/lib/page-diy/src/page-diy.vue.js +117 -106
- package/lib/page-diy/src/page-diy.vue.js.map +1 -1
- package/lib/page-diy/style/dk-page-diy.css +1 -1
- package/lib/page-diy/style/dk-page-diy.scss +30 -26
- package/lib/page-diy/style/index.css +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -2225,7 +2225,7 @@ var _sfc_main$1a = /* @__PURE__ */ defineComponent({
|
|
2225
2225
|
);
|
2226
2226
|
const dialogStyle = computed(() => {
|
2227
2227
|
return {
|
2228
|
-
maxHeight: unref(dialogHeight)
|
2228
|
+
maxHeight: props.maxHeight === "auto" ? "auto" : unref(dialogHeight)
|
2229
2229
|
};
|
2230
2230
|
});
|
2231
2231
|
return (_ctx, _cache) => {
|
@@ -2429,8 +2429,18 @@ var _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
2429
2429
|
const loading = ref(true);
|
2430
2430
|
const buttonLoading = ref(false);
|
2431
2431
|
const showDialog = ref(false);
|
2432
|
-
const formConfig = computed(() => ({ ...config, ...props.extraConfig }));
|
2433
2432
|
const { width } = useWindowSize();
|
2433
|
+
const formConfig = computed(() => {
|
2434
|
+
const _config2 = config;
|
2435
|
+
if (width.value < 768) {
|
2436
|
+
_config2.form.labelPosition = "top";
|
2437
|
+
_config2.form.size = "small";
|
2438
|
+
} else {
|
2439
|
+
_config2.form.labelPosition = "left";
|
2440
|
+
_config2.form.size = "default";
|
2441
|
+
}
|
2442
|
+
return { ..._config2, ...props.extraConfig };
|
2443
|
+
});
|
2434
2444
|
const value = ref(null);
|
2435
2445
|
const _formData = ref(props.formData || {});
|
2436
2446
|
watch(
|
@@ -2582,7 +2592,10 @@ var _sfc_main$19 = /* @__PURE__ */ defineComponent({
|
|
2582
2592
|
width: dialogWidth.value,
|
2583
2593
|
"default-fullscreen": isFullscreen.value,
|
2584
2594
|
"min-height": "200px"
|
2585
|
-
}, dialogProps.value, {
|
2595
|
+
}, dialogProps.value, {
|
2596
|
+
"max-height": "auto",
|
2597
|
+
"append-to-body": ""
|
2598
|
+
}), {
|
2586
2599
|
default: withCtx(() => [
|
2587
2600
|
createElementVNode(
|
2588
2601
|
"div",
|
@@ -14206,6 +14219,7 @@ const _sfc_main$p = defineComponent({
|
|
14206
14219
|
hide: true,
|
14207
14220
|
treeData: [],
|
14208
14221
|
},
|
14222
|
+
leftTabsName: 'component',
|
14209
14223
|
});
|
14210
14224
|
|
14211
14225
|
function cleanTreeData(node) {
|
@@ -15059,20 +15073,23 @@ const _hoisted_5$7 = {
|
|
15059
15073
|
class: "_fc-l-count",
|
15060
15074
|
style: {}
|
15061
15075
|
};
|
15062
|
-
const _hoisted_6$7 =
|
15063
|
-
const _hoisted_7$7 = {
|
15076
|
+
const _hoisted_6$7 = { class: "children-list" };
|
15077
|
+
const _hoisted_7$7 = {
|
15078
|
+
key: 0,
|
15079
|
+
class: "_fc-tree-node"
|
15080
|
+
};
|
15064
15081
|
|
15065
15082
|
function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
15066
15083
|
const _component_dk_icon = resolveComponent("dk-icon");
|
15067
15084
|
const _component_draggable = resolveComponent("draggable");
|
15085
|
+
const _component_el_tab_pane = resolveComponent("el-tab-pane");
|
15068
15086
|
const _component_el_tree = resolveComponent("el-tree");
|
15087
|
+
const _component_el_tabs = resolveComponent("el-tabs");
|
15069
15088
|
const _component_el_aside = resolveComponent("el-aside");
|
15070
15089
|
const _component_el_header = resolveComponent("el-header");
|
15071
15090
|
const _component_DragForm = resolveComponent("DragForm");
|
15072
15091
|
const _component_preview_phone = resolveComponent("preview-phone");
|
15073
15092
|
const _component_el_container = resolveComponent("el-container");
|
15074
|
-
const _component_el_tab_pane = resolveComponent("el-tab-pane");
|
15075
|
-
const _component_el_tabs = resolveComponent("el-tabs");
|
15076
15093
|
const _component_el_dialog = resolveComponent("el-dialog");
|
15077
15094
|
const _component_diy_cloud = resolveComponent("diy-cloud");
|
15078
15095
|
const _component_dk_dialog = resolveComponent("dk-dialog");
|
@@ -15086,108 +15103,115 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15086
15103
|
style: normalizeStyle(_ctx.leftAside.style)
|
15087
15104
|
}, {
|
15088
15105
|
default: withCtx(() => [
|
15089
|
-
|
15090
|
-
|
15091
|
-
|
15092
|
-
|
15093
|
-
|
15094
|
-
|
15095
|
-
|
15096
|
-
|
15097
|
-
|
15098
|
-
|
15099
|
-
|
15100
|
-
|
15101
|
-
|
15102
|
-
|
15103
|
-
|
15104
|
-
|
15105
|
-
|
15106
|
-
|
15107
|
-
|
15108
|
-
|
15109
|
-
|
15110
|
-
|
15111
|
-
|
15112
|
-
|
15113
|
-
},
|
15106
|
+
createVNode(_component_el_tabs, {
|
15107
|
+
modelValue: _ctx.leftTabsName,
|
15108
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.leftTabsName) = $event))
|
15109
|
+
}, {
|
15110
|
+
default: withCtx(() => [
|
15111
|
+
createVNode(_component_el_tab_pane, {
|
15112
|
+
label: "组件列表",
|
15113
|
+
name: "component"
|
15114
|
+
}, {
|
15115
|
+
default: withCtx(() => [
|
15116
|
+
createElementVNode("div", _hoisted_1$i, [
|
15117
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (item, index) => {
|
15118
|
+
return (openBlock(), createElementBlock("div", {
|
15119
|
+
key: index,
|
15120
|
+
class: "_fc-l-group"
|
15121
|
+
}, [
|
15122
|
+
createElementVNode("h4", _hoisted_2$e, toDisplayString(item.title), 1 /* TEXT */),
|
15123
|
+
createVNode(_component_draggable, {
|
15124
|
+
group: { name: 'default', pull: 'clone', put: false },
|
15125
|
+
sort: false,
|
15126
|
+
list: item.list,
|
15127
|
+
"item-key": "icon",
|
15128
|
+
filter: ".not-drag",
|
15129
|
+
class: "_fc-l-items"
|
15130
|
+
}, {
|
15131
|
+
item: withCtx(({ element }) => [
|
15132
|
+
(openBlock(), createElementBlock("div", {
|
15133
|
+
key: element.id,
|
15134
|
+
class: normalizeClass(["_fc-l-item", element.count - (_ctx.countObj[element.name] || 0) <= 0 ? 'not-drag' : ''])
|
15135
|
+
}, [
|
15136
|
+
createElementVNode("div", _hoisted_3$b, [
|
15137
|
+
createVNode(_component_dk_icon, {
|
15138
|
+
icon: element.icon,
|
15139
|
+
size: 24
|
15140
|
+
}, null, 8 /* PROPS */, ["icon"])
|
15141
|
+
]),
|
15142
|
+
createElementVNode("span", _hoisted_4$9, toDisplayString(element.label), 1 /* TEXT */),
|
15143
|
+
(element.count)
|
15144
|
+
? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(element.count - (_ctx.countObj[element.name] || 0)), 1 /* TEXT */))
|
15145
|
+
: createCommentVNode("v-if", true)
|
15146
|
+
], 2 /* CLASS */))
|
15147
|
+
]),
|
15148
|
+
_: 2 /* DYNAMIC */
|
15149
|
+
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["list"])
|
15150
|
+
]))
|
15151
|
+
}), 128 /* KEYED_FRAGMENT */))
|
15152
|
+
])
|
15153
|
+
]),
|
15154
|
+
_: 1 /* STABLE */
|
15155
|
+
}),
|
15156
|
+
createVNode(_component_el_tab_pane, {
|
15157
|
+
label: "结构大纲",
|
15158
|
+
name: "tree"
|
15159
|
+
}, {
|
15160
|
+
default: withCtx(() => [
|
15161
|
+
createElementVNode("div", _hoisted_6$7, [
|
15162
|
+
createVNode(_component_el_tree, {
|
15163
|
+
draggable: "",
|
15164
|
+
"highlight-current": "",
|
15165
|
+
data: _ctx.treeAside.treeData,
|
15166
|
+
props: { value: 'type', label: 'type' },
|
15167
|
+
"allow-drop": _ctx.allowDrop,
|
15168
|
+
"default-expand-all": true,
|
15169
|
+
onNodeDrop: _ctx.nodeDrop,
|
15170
|
+
onNodeClick: _ctx.nodeClick
|
15171
|
+
}, {
|
15172
|
+
default: withCtx(({ data }) => [
|
15173
|
+
createElementVNode("div", {
|
15174
|
+
class: "el-tree-node-content",
|
15175
|
+
style: normalizeStyle(_ctx.activeRule && _ctx.activeRule._id === data._id ? 'color:#409eff' : '')
|
15176
|
+
}, [
|
15177
|
+
(data.config?.config.label)
|
15178
|
+
? (openBlock(), createElementBlock("div", _hoisted_7$7, [
|
15179
|
+
createVNode(_component_dk_icon, {
|
15180
|
+
icon: data.config?.config.icon,
|
15181
|
+
class: "_fc-tree-icon"
|
15182
|
+
}, null, 8 /* PROPS */, ["icon"]),
|
15183
|
+
createTextVNode(" " + toDisplayString(data.config?.config.label), 1 /* TEXT */)
|
15184
|
+
]))
|
15185
|
+
: createCommentVNode("v-if", true),
|
15186
|
+
createVNode(_component_dk_icon, {
|
15187
|
+
icon: "Close",
|
15188
|
+
class: "close-rule",
|
15189
|
+
onClick: withModifiers($event => (_ctx.delRule(data._id)), ["stop"])
|
15190
|
+
}, null, 8 /* PROPS */, ["onClick"])
|
15191
|
+
], 4 /* STYLE */)
|
15114
15192
|
]),
|
15115
|
-
|
15116
|
-
|
15117
|
-
|
15118
|
-
|
15119
|
-
|
15120
|
-
|
15121
|
-
_: 2 /* DYNAMIC */
|
15122
|
-
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["list"])
|
15123
|
-
]))
|
15124
|
-
}), 128 /* KEYED_FRAGMENT */))
|
15125
|
-
]),
|
15126
|
-
createElementVNode("div", {
|
15127
|
-
class: "children-list",
|
15128
|
-
style: normalizeStyle(_ctx.treeAside.style)
|
15129
|
-
}, [
|
15130
|
-
createElementVNode("div", {
|
15131
|
-
class: "child-title",
|
15132
|
-
onClick: _cache[0] || (_cache[0] = $event => (_ctx.hideAside('tree')))
|
15133
|
-
}, [
|
15134
|
-
_hoisted_6$7,
|
15135
|
-
createVNode(_component_dk_icon, {
|
15136
|
-
icon: _ctx.treeAside.hide ? 'ArrowUp' : 'ArrowDown'
|
15137
|
-
}, null, 8 /* PROPS */, ["icon"])
|
15193
|
+
_: 1 /* STABLE */
|
15194
|
+
}, 8 /* PROPS */, ["data", "allow-drop", "onNodeDrop", "onNodeClick"])
|
15195
|
+
])
|
15196
|
+
]),
|
15197
|
+
_: 1 /* STABLE */
|
15198
|
+
})
|
15138
15199
|
]),
|
15139
|
-
|
15140
|
-
|
15141
|
-
draggable: "",
|
15142
|
-
"highlight-current": "",
|
15143
|
-
data: _ctx.treeAside.treeData,
|
15144
|
-
props: { value: 'type', label: 'type' },
|
15145
|
-
"allow-drop": _ctx.allowDrop,
|
15146
|
-
"default-expand-all": true,
|
15147
|
-
onNodeDrop: _ctx.nodeDrop,
|
15148
|
-
onNodeClick: _ctx.nodeClick
|
15149
|
-
}, {
|
15150
|
-
default: withCtx(({ data }) => [
|
15151
|
-
createElementVNode("div", {
|
15152
|
-
class: "el-tree-node-content",
|
15153
|
-
style: normalizeStyle(_ctx.activeRule && _ctx.activeRule._id === data._id ? 'color:red' : '')
|
15154
|
-
}, [
|
15155
|
-
createTextVNode(toDisplayString(data.type) + " ", 1 /* TEXT */),
|
15156
|
-
(data.config?.config.label)
|
15157
|
-
? (openBlock(), createElementBlock("span", _hoisted_7$7, toDisplayString(data.config?.config.label), 1 /* TEXT */))
|
15158
|
-
: createCommentVNode("v-if", true),
|
15159
|
-
createVNode(_component_dk_icon, {
|
15160
|
-
icon: "Close",
|
15161
|
-
class: "close-rule",
|
15162
|
-
onClick: withModifiers($event => (_ctx.delRule(data._id)), ["stop"])
|
15163
|
-
}, null, 8 /* PROPS */, ["onClick"])
|
15164
|
-
], 4 /* STYLE */)
|
15165
|
-
]),
|
15166
|
-
_: 1 /* STABLE */
|
15167
|
-
}, 8 /* PROPS */, ["data", "allow-drop", "onNodeDrop", "onNodeClick"]),
|
15168
|
-
(!_ctx.treeAside.hide)
|
15169
|
-
? (openBlock(), createElementBlock("div", {
|
15170
|
-
key: 0,
|
15171
|
-
class: "aside-resizer",
|
15172
|
-
onMousedown: _cache[1] || (_cache[1] = $event => (_ctx.onResizerMouseDown('tree', $event))),
|
15173
|
-
onMouseup: _cache[2] || (_cache[2] = $event => (_ctx.onResizerMouseUp('tree'))),
|
15174
|
-
onMousemove: _cache[3] || (_cache[3] = $event => (_ctx.onResizerMouseMove('tree')))
|
15175
|
-
}, null, 32 /* HYDRATE_EVENTS */))
|
15176
|
-
: createCommentVNode("v-if", true)
|
15177
|
-
], 4 /* STYLE */),
|
15200
|
+
_: 1 /* STABLE */
|
15201
|
+
}, 8 /* PROPS */, ["modelValue"]),
|
15178
15202
|
(!_ctx.leftAside.hide)
|
15179
15203
|
? (openBlock(), createElementBlock("div", {
|
15180
15204
|
key: 0,
|
15181
15205
|
class: "aside-resizer",
|
15182
|
-
onMousedown: _cache[
|
15183
|
-
onMouseup: _cache[
|
15184
|
-
onMousemove: _cache[
|
15206
|
+
onMousedown: _cache[1] || (_cache[1] = $event => (_ctx.onResizerMouseDown('left', $event))),
|
15207
|
+
onMouseup: _cache[2] || (_cache[2] = $event => (_ctx.onResizerMouseUp('left'))),
|
15208
|
+
onMousemove: _cache[3] || (_cache[3] = $event => (_ctx.onResizerMouseMove('left')))
|
15185
15209
|
}, null, 32 /* HYDRATE_EVENTS */))
|
15186
15210
|
: createCommentVNode("v-if", true),
|
15187
15211
|
createElementVNode("div", {
|
15188
15212
|
class: "aside-toggle left-99%",
|
15189
15213
|
style: normalizeStyle(_ctx.leftAside.hide ? 'display:block' : ''),
|
15190
|
-
onClick: _cache[
|
15214
|
+
onClick: _cache[4] || (_cache[4] = $event => (_ctx.hideAside('left')))
|
15191
15215
|
}, [
|
15192
15216
|
createVNode(_component_dk_icon, {
|
15193
15217
|
icon: _ctx.leftAside.hide ? 'ArrowRight' : 'ArrowLeft'
|
@@ -15215,7 +15239,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15215
15239
|
default: withCtx(() => [
|
15216
15240
|
withDirectives(createVNode(_component_DragForm, {
|
15217
15241
|
api: _ctx.dragForm.api,
|
15218
|
-
"onUpdate:api": _cache[
|
15242
|
+
"onUpdate:api": _cache[5] || (_cache[5] = $event => ((_ctx.dragForm.api) = $event)),
|
15219
15243
|
rule: _ctx.dragForm.rule,
|
15220
15244
|
option: _ctx.dragForm.option
|
15221
15245
|
}, null, 8 /* PROPS */, ["api", "rule", "option"]), [
|
@@ -15236,7 +15260,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15236
15260
|
default: withCtx(() => [
|
15237
15261
|
withDirectives(createVNode(_component_el_tabs, {
|
15238
15262
|
modelValue: _ctx.activeTab,
|
15239
|
-
"onUpdate:modelValue": _cache[
|
15263
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((_ctx.activeTab) = $event))
|
15240
15264
|
}, {
|
15241
15265
|
default: withCtx(() => [
|
15242
15266
|
(!!_ctx.activeRule)
|
@@ -15248,7 +15272,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15248
15272
|
default: withCtx(() => [
|
15249
15273
|
createVNode(_component_DragForm, {
|
15250
15274
|
api: _ctx.propsForm.api,
|
15251
|
-
"onUpdate:api": _cache[
|
15275
|
+
"onUpdate:api": _cache[6] || (_cache[6] = $event => ((_ctx.propsForm.api) = $event)),
|
15252
15276
|
rule: _ctx.propsForm.rule,
|
15253
15277
|
option: _ctx.propsForm.options,
|
15254
15278
|
"model-value": _ctx.propsForm.value,
|
@@ -15268,7 +15292,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15268
15292
|
default: withCtx(() => [
|
15269
15293
|
withDirectives(createVNode(_component_DragForm, {
|
15270
15294
|
api: _ctx.dkSettingForm.api,
|
15271
|
-
"onUpdate:api": _cache[
|
15295
|
+
"onUpdate:api": _cache[7] || (_cache[7] = $event => ((_ctx.dkSettingForm.api) = $event)),
|
15272
15296
|
rule: _ctx.dkSettingForm.rule,
|
15273
15297
|
option: _ctx.dkSettingForm.options,
|
15274
15298
|
"model-value": _ctx.dkSettingForm.value,
|
@@ -15287,7 +15311,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15287
15311
|
default: withCtx(() => [
|
15288
15312
|
createVNode(_component_DragForm, {
|
15289
15313
|
api: _ctx.dkPageForm.api,
|
15290
|
-
"onUpdate:api": _cache[
|
15314
|
+
"onUpdate:api": _cache[8] || (_cache[8] = $event => ((_ctx.dkPageForm.api) = $event)),
|
15291
15315
|
rule: _ctx.dkPageForm.rule,
|
15292
15316
|
option: _ctx.dkPageForm.options,
|
15293
15317
|
onChange: _ctx.dkPageChange
|
@@ -15304,15 +15328,15 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15304
15328
|
? (openBlock(), createElementBlock("div", {
|
15305
15329
|
key: 0,
|
15306
15330
|
class: "aside-resizer left-0",
|
15307
|
-
onMousedown: _cache[
|
15308
|
-
onMouseup: _cache[
|
15309
|
-
onMousemove: _cache[
|
15331
|
+
onMousedown: _cache[10] || (_cache[10] = $event => (_ctx.onResizerMouseDown('right', $event))),
|
15332
|
+
onMouseup: _cache[11] || (_cache[11] = $event => (_ctx.onResizerMouseUp('right'))),
|
15333
|
+
onMousemove: _cache[12] || (_cache[12] = $event => (_ctx.onResizerMouseMove('right')))
|
15310
15334
|
}, null, 32 /* HYDRATE_EVENTS */))
|
15311
15335
|
: createCommentVNode("v-if", true),
|
15312
15336
|
createElementVNode("div", {
|
15313
15337
|
class: "aside-toggle right-99%",
|
15314
15338
|
style: normalizeStyle(_ctx.rightAside.hide ? 'display:block' : ''),
|
15315
|
-
onClick: _cache[
|
15339
|
+
onClick: _cache[13] || (_cache[13] = $event => (_ctx.hideAside('right')))
|
15316
15340
|
}, [
|
15317
15341
|
createVNode(_component_dk_icon, {
|
15318
15342
|
icon: _ctx.rightAside.hide ? 'ArrowLeft' : 'ArrowRight'
|
@@ -15324,7 +15348,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15324
15348
|
createCommentVNode(" 右边操作区结束"),
|
15325
15349
|
createVNode(_component_el_dialog, {
|
15326
15350
|
visible: _ctx.preview.state,
|
15327
|
-
"onUpdate:visible": _cache[
|
15351
|
+
"onUpdate:visible": _cache[14] || (_cache[14] = $event => ((_ctx.preview.state) = $event)),
|
15328
15352
|
width: "375px",
|
15329
15353
|
"append-to-body": "",
|
15330
15354
|
style: {"min-height":"700px"}
|
@@ -15340,7 +15364,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15340
15364
|
}, 8 /* PROPS */, ["visible"]),
|
15341
15365
|
createVNode(_component_dk_dialog, {
|
15342
15366
|
modelValue: _ctx.diyCloud.show,
|
15343
|
-
"onUpdate:modelValue": _cache[
|
15367
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((_ctx.diyCloud.show) = $event)),
|
15344
15368
|
width: "1200px",
|
15345
15369
|
"append-to-body": "",
|
15346
15370
|
title: "DIY模板市场",
|
package/dist/web-types.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dialog.vue2.mjs","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"props.draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\">\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'\"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)\
|
1
|
+
{"version":3,"file":"dialog.vue2.mjs","sources":["../../../src/dialog/src/dialog.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkDialog',\n});\n</script>\n<template>\n <ElDialog\n v-bind=\"getBindValue\"\n :fullscreen=\"isFullscreen\"\n destroy-on-close\n append-to-body\n lock-scroll\n :draggable=\"props.draggable\"\n :close-on-click-modal=\"false\"\n :show-close=\"false\"\n class=\"dk-dialog\"\n :z-index=\"props.zIndex\"\n >\n <template #header=\"{ close }\">\n <slot name=\"header\">\n <div class=\"flex justify-between items-center relative\">\n <span>{{ props.title }}</span>\n <div class=\"flex justify-between items-center absolute top-[50%] right-0 translate-y-[-50%]\">\n <dk-icon\n v-if=\"fullscreen\"\n class=\"cursor-pointer is-hover mr-10px\"\n :icon=\"isFullscreen ? 'radix-icons:exit-full-screen' : 'radix-icons:enter-full-screen'\"\n color=\"var(--el-color-info)\"\n hover-color=\"var(--el-color-primary)\"\n @click=\"toggleFull\"\n />\n <dk-icon\n class=\"cursor-pointer is-hover\"\n icon=\"ep:close\"\n hover-color=\"var(--el-color-primary)\"\n color=\"var(--el-color-info)\"\n @click=\"close\"\n />\n </div>\n </div>\n </slot>\n </template>\n\n <ElScrollbar :style=\"dialogStyle\">\n <slot></slot>\n </ElScrollbar>\n\n <template v-if=\"slots.footer\" #footer>\n <slot name=\"footer\"></slot>\n </template>\n </ElDialog>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isNumber } from '@vipl520/utils'\nimport { dialogProps } from './props'\nimport { computed, useAttrs, ref, unref, useSlots, watch, nextTick } from 'vue'\n\nconst [_, bem] = createNamespace('dialog')\n\n\nconst slots = useSlots()\n\nconst props = defineProps(dialogProps)\n\nconst getBindValue = computed(() => {\n const delArr: string[] = ['fullscreen', 'title', 'maxHeight']\n const attrs = useAttrs()\n const obj: { [key: string]: any } = { ...attrs, ...props }\n for (const key in obj) {\n if (delArr.indexOf(key) !== -1) {\n delete obj[key] as any\n }\n }\n return obj\n})\nconst isFullscreen = ref(props.defaultFullscreen)\n\nwatch(\n () => props.defaultFullscreen,\n () => {\n isFullscreen.value = props.defaultFullscreen\n }\n)\n\nconst toggleFull = () => {\n isFullscreen.value = !unref(isFullscreen)\n}\n\nconst dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)\nwatch(\n () => isFullscreen.value,\n async (val: boolean) => {\n await nextTick()\n if (val) {\n const windowHeight = document.documentElement.offsetHeight\n dialogHeight.value = `${windowHeight - 55 - 60 - (slots.footer ? 63 : 0)}px`\n } else {\n dialogHeight.value = isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight\n }\n },\n {\n immediate: true,\n }\n)\n\nconst dialogStyle = computed(() => {\n return {\n maxHeight: props.maxHeight === 'auto' ? 'auto' : unref(dialogHeight),\n }\n})\n</script>\n"],"names":["__MACROS_defineComponent"],"mappings":";;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,UAAA;AACR,CAAC,CAAA,CAAA;;;;;;AAuDD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,QAAQ,CAAA,CAAA;AAGzC,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAIvB,IAAM,MAAA,YAAA,GAAe,SAAS,MAAM;AAClC,M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,GAAK,MAAM,KAAM,CAAA,MAAA,GAAS,KAAK,CAAE,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,SACnE,MAAA;AACL,UAAa,YAAA,CAAA,KAAA,GAAQ,SAAS,KAAM,CAAA,SAAS,IAAI,CAAG,EAAA,KAAA,CAAM,SAAS,CAAA,EAAA,CAAA,GAAO,KAAM,CAAA,SAAA,CAAA;AAAA,SAClF;AAAA,OACF;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,WAAA,GAAc,SAAS,MAAM;AACjC,MAAO,OAAA;AAAA,QACL,WAAW,KAAM,CAAA,SAAA,KAAc,MAAS,GAAA,MAAA,GAAS,MAAM,YAAY,CAAA;AAAA,OACrE,CAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
@@ -36,8 +36,18 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
36
36
|
const loading = ref(true);
|
37
37
|
const buttonLoading = ref(false);
|
38
38
|
const showDialog = ref(false);
|
39
|
-
const formConfig = computed(() => ({ ...config$1, ...props.extraConfig }));
|
40
39
|
const { width } = useWindowSize();
|
40
|
+
const formConfig = computed(() => {
|
41
|
+
const _config2 = config$1;
|
42
|
+
if (width.value < 768) {
|
43
|
+
_config2.form.labelPosition = "top";
|
44
|
+
_config2.form.size = "small";
|
45
|
+
} else {
|
46
|
+
_config2.form.labelPosition = "left";
|
47
|
+
_config2.form.size = "default";
|
48
|
+
}
|
49
|
+
return { ..._config2, ...props.extraConfig };
|
50
|
+
});
|
41
51
|
const value = ref(null);
|
42
52
|
const _formData = ref(props.formData || {});
|
43
53
|
watch(
|
@@ -189,7 +199,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
189
199
|
width: dialogWidth.value,
|
190
200
|
"default-fullscreen": isFullscreen.value,
|
191
201
|
"min-height": "200px"
|
192
|
-
}, dialogProps.value, {
|
202
|
+
}, dialogProps.value, {
|
203
|
+
"max-height": "auto",
|
204
|
+
"append-to-body": ""
|
205
|
+
}), {
|
193
206
|
default: withCtx(() => [
|
194
207
|
createElementVNode(
|
195
208
|
"div",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"form.vue2.mjs","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form p10px\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst formConfig = computed(() => ({ ...config, ...props.extraConfig }))\nconst { width } = useWindowSize()\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","value","config","_config"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA4DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAAC,OAAQA,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MAAAA,GAAQ,CAACA,MAAK,CAAA,CAAA;AAAA,SAChB;AACA,QAAA,IAAA,CAAK,MAAS,GAAA;AAAA,UACZ,IAAM,EAAA,GAAA;AAAA,UACN,QAAUA,EAAAA,MAAAA;AAAA,UACV,KAAO,EAAA,WAAA;AAAA,SACT,CAAA;AAAA,OACF;AAAA,KACD,CAAA,CAAA;AAGD,IAAM,MAAA,UAAA,GAAa,WAAW,KAAM,EAAA,CAAA;AAIpC,IAAM,MAAAC,QAAA,GAAS,SAASC,MAAO,CAAA,CAAA;AAC/B,IAAA,MAAM,OAAO,GAAI,EAAA,CAAA;AACjB,IAAM,MAAA,OAAA,GAAU,IAAI,IAAI,CAAA,CAAA;AACxB,IAAM,MAAA,aAAA,GAAgB,IAAI,KAAK,CAAA,CAAA;AAE/B,IAAM,MAAA,UAAA,GAAa,IAAI,KAAK,CAAA,CAAA;AAC5B,IAAM,MAAA,UAAA,GAAa,SAAS,OAAO,EAAE,GAAGD,QAAQ,EAAA,GAAG,KAAM,CAAA,WAAA,EAAc,CAAA,CAAA,CAAA;AACvE,IAAM,MAAA,EAA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ACE,MAAA;AACL,QAAA,IAAA,CAAK,UAAU,IAAI,CAAA,CAAA;AACnB,QAAA,aAAA,CAAc,KAAQ,GAAA,KAAA,CAAA;AAAA,OACxB;AACA,MAAA,UAAA,CAAW,KAAQ,GAAA,KAAA,CAAA;AAAA,KACrB,CAAA;AAEA,IAAA,MAAM,OAAO,MAAM;AACjB,MAAA,UAAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,KACrB,CAAA;AACA,IAAA,SAAA,CAAU,MAAM;AACd,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
1
|
+
{"version":3,"file":"form.vue2.mjs","sources":["../../../src/form/src/form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkForm',\n});\n</script>\n<template>\n <DkDialog\n v-if=\"props.isDialog\"\n v-model=\"showDialog\"\n :title=\"_formData?.title ? _formData?.title : '表单'\"\n :width=\"dialogWidth\"\n :default-fullscreen=\"isFullscreen\"\n min-height=\"200px\"\n v-bind=\"dialogProps\"\n max-height=\"auto\"\n append-to-body\n >\n <div :style=\"dialogStyle\" class=\"dk-form p10px\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n </DkDialog>\n <div v-else>\n <div :style=\"{ minHeight }\" class=\"dk-form\">\n <FormCreate\n v-model=\"value\"\n :option=\"formConfig\"\n :rule=\"_formData.rules\"\n :handle-icon=\"false\"\n class=\"formBox\"\n @update:api=\"fApi = $event\"\n @update:value=\"value = $event\"\n />\n <div :style=\"{ marginLeft: config.form.labelWidth }\" class=\"m-t-10px\">\n <slot name=\"buttons\">\n <el-button type=\"primary\" :loading=\"buttonLoading\" @click=\"checkForm\"> 提交</el-button>\n </slot>\n </div>\n </div>\n <!-- <div v-else :style=\"{ minHeight }\"></div>-->\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { createNamespace, isArray, isObject, request } from '@vipl520/utils'\nimport formCreate from '@form-create/element-ui'\nimport { formProps } from './props'\nimport { computed, onMounted, reactive, ref, watch } from 'vue'\nimport _config from './config'\nimport { ElButton, ElMessage } from 'element-plus'\nimport { useWindowSize } from '@vueuse/core'\n\nconst [_, bem] = createNamespace('form')\n\nformCreate.register({\n name: 'help',\n init({ value }, rule) {\n // 判断value是字符串还是数组,如果是字符串则转换为数组,如果是数组则不变\n if (!isArray(value)) {\n value = [value]\n }\n rule.suffix = {\n type: 'p',\n children: value,\n class: 'form-help',\n }\n },\n})\n\n\nconst FormCreate = formCreate.$form()\n\nconst props = defineProps(formProps)\n\nconst config = reactive(_config)\nconst fApi = ref()\nconst loading = ref(true)\nconst buttonLoading = ref(false)\n\nconst showDialog = ref(false)\nconst { width } = useWindowSize()\n\nconst formConfig = computed(() => {\n const _config = config\n if (width.value < 768) {\n _config.form.labelPosition = 'top'\n _config.form.size = 'small'\n } else {\n _config.form.labelPosition = 'left'\n _config.form.size = 'default'\n }\n return { ..._config, ...props.extraConfig }\n})\nconst value = ref(null)\nconst _formData = ref(props.formData || {})\n\nconst emit = defineEmits(['submit', 'fail', 'update:modelValue'])\nwatch(\n () => props.formData,\n () => {\n _formData.value = props.formData\n },\n {\n deep: true,\n }\n)\nwatch(\n () => value.value,\n (val) => {\n emit('update:modelValue', val || {})\n }\n)\n// 弹窗宽度\nconst dialogWidth = computed(() => {\n let defaultWidth = '800px'\n const config = _formData.value?.config || {}\n if (config?.width) {\n return config?.width\n }\n if (props.dialog?.width) {\n defaultWidth = props.dialog?.width\n }\n if (config?.defaultWidth) {\n defaultWidth = config?.defaultWidth\n }\n let minWidth = 768\n // 判断是否为百分比\n if (!defaultWidth.endsWith('%')) {\n minWidth = parseInt(defaultWidth)\n }\n return width.value < minWidth ? '100%' : defaultWidth\n})\n// 弹窗内样式\nconst dialogStyle = computed(() => {\n if (_formData.value?.config?.style) {\n return _formData.value?.config?.style\n }\n if (props.dialog?.style) {\n return props.dialog?.style\n }\n return {}\n})\n// const draggable = computed(() => {\n// let draggable = false\n// if (props.dialog?.draggable) {\n// draggable = props.dialog?.draggable\n// }\n// if (_formData.value?.config?.draggable !== undefined) {\n// draggable = _formData.value?.config?.draggable\n// }\n// return draggable\n// })\n// 是否全屏\nconst isFullscreen = computed(() => {\n let defaultFullscreen = false\n const autoFullscreen = _formData.value?.config?.autoFullscreen !== false\n if (props.dialog?.width) {\n defaultFullscreen = props.dialog?.fullscreen\n }\n if (_formData.value?.config?.fullscreen) {\n defaultFullscreen = _formData.value?.config?.fullscreen\n }\n\n if (width.value < 768 && autoFullscreen) {\n defaultFullscreen = true\n }\n\n return defaultFullscreen\n})\n\nconst dialogProps = computed(() => {\n return Object.assign(props.dialog, _formData.value?.config?.dialog)\n})\nconst setFormData = (formData: any) => {\n value.value = null\n _formData.value = formData\n}\n\nconst initFormData = (formUrl?: string | object) => {\n if (!formUrl) {\n formUrl = props.formUrl\n }\n\n if (props.formData) {\n loading.value = false\n } else if (formUrl) {\n let data: {}\n if (isObject(formUrl)) {\n data = formUrl\n } else {\n data = {\n url: formUrl,\n method: 'post',\n }\n }\n request(data)\n .then((res) => {\n _formData.value = res.data\n loading.value = false\n })\n .catch((res) => {\n loading.value = false\n })\n }\n}\n\nconst checkForm = () => {\n fApi.value\n .validate()\n .then(() => {\n fApi.value\n .submit((data: any) => {\n onSubmit(data)\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n })\n .catch((fail: object) => {\n ElMessage.warning(Object.values(fail)[0][0].message)\n })\n}\n\nconst onSubmit = (data: any) => {\n if (props.isLoading) {\n buttonLoading.value = true\n }\n if (props.isSubmit) {\n request({\n url: props.path + _formData.value.action,\n method: _formData.value.method,\n data: { formData: data },\n })\n .then((res) => {\n ElMessage.success(res.msg)\n emit('submit', data, res)\n buttonLoading.value = false\n })\n .catch((res) => {\n ElMessage.error(res.msg)\n emit('fail', data, res)\n buttonLoading.value = false\n })\n } else {\n emit('submit', data)\n buttonLoading.value = false\n }\n showDialog.value = false\n}\n\nconst show = () => {\n showDialog.value = true\n}\nonMounted(() => {\n initFormData()\n})\n// 导出\ndefineExpose({\n showDialog,\n buttonLoading,\n fApi,\n value,\n show,\n checkForm,\n onSubmit,\n initFormData,\n setFormData,\n})\n</script>\n"],"names":["__MACROS_defineComponent","value","config","_config"],"mappings":";;;;;;;;;AAEA,MAA6B,cAAAA,eAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,QAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AA6DD,IAAA,MAAM,CAAC,CAAA,EAAG,GAAG,CAAA,GAAI,gBAAgB,MAAM,CAAA,CAAA;AAEvC,IAAA,UAAA,CAAW,QAAS,CAAA;AAAA,MAClB,IAAM,EAAA,MAAA;AAAA,MACN,IAAK,CAAA,EAAE,KAAAC,EAAAA,MAAAA,IAAS,IAAM,EAAA;AAEpB,QAAI,IAAA,CAAC,OAAQA,CAAAA,MAAK,CAAG,EAAA;AACnB,UAAAA,MAAAA,GAAQ,CAACA,MAAK,CAAA,CAAA;AAAA,SAChB;AACA,QAAA,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AAA,CAAW,KAAQ,GAAA,IAAA,CAAA;AAAA,KACrB,CAAA;AACA,IAAA,SAAA,CAAU,MAAM;AACd,MAAa,YAAA,EAAA,CAAA;AAAA,KACd,CAAA,CAAA;AAED,IAAa,QAAA,CAAA;AAAA,MACX,UAAA;AAAA,MACA,aAAA;AAAA,MACA,IAAA;AAAA,MACA,KAAA;AAAA,MACA,IAAA;AAAA,MACA,SAAA;AAAA,MACA,QAAA;AAAA,MACA,YAAA;AAAA,MACA,WAAA;AAAA,KACD,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/es/page-diy/index.d.ts
CHANGED
@@ -322,6 +322,7 @@ export declare const PageDiy: import("@vipl520/utils").WithInstall<import("vue")
|
|
322
322
|
hide: boolean;
|
323
323
|
treeData: never[];
|
324
324
|
}>;
|
325
|
+
leftTabsName: import("vue").Ref<string>;
|
325
326
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
326
327
|
type: {
|
327
328
|
type: StringConstructor;
|
@@ -322,6 +322,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
322
322
|
hide: boolean;
|
323
323
|
treeData: never[];
|
324
324
|
}>;
|
325
|
+
leftTabsName: import("vue").Ref<string>;
|
325
326
|
}, any, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
326
327
|
type: {
|
327
328
|
type: StringConstructor;
|