@vipl520/dk-ui 1.0.61 → 1.0.63

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.
@@ -5,7 +5,7 @@ import PreviewPhone from './components/PreviewPhone.vue.mjs';
5
5
  import { webRuleList, createWebMenu } from './config/rule/web/index.mjs';
6
6
  import { minRuleList, createMinMenu } from './config/rule/min/index.mjs';
7
7
  import './utils/index.mjs';
8
- import { defineComponent, toRefs, getCurrentInstance, ref, provide, toRef, computed, reactive, watch, nextTick, markRaw, createElementVNode, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createCommentVNode, createVNode, normalizeStyle, createElementBlock, Fragment, renderList, toDisplayString, normalizeClass, createTextVNode, withModifiers, renderSlot, withDirectives, vShow } from 'vue';
8
+ import { defineComponent, toRefs, getCurrentInstance, ref, provide, toRef, computed, reactive, watch, nextTick, markRaw, resolveComponent, resolveDirective, openBlock, createBlock, withCtx, createCommentVNode, createVNode, normalizeStyle, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, normalizeClass, createTextVNode, withModifiers, renderSlot, withDirectives, vShow } from 'vue';
9
9
  import './config/base/index.mjs';
10
10
  import { isArray } from '@vipl520/utils';
11
11
  import { ElNotification } from 'element-plus';
@@ -230,6 +230,7 @@ const _sfc_main = defineComponent({
230
230
  hide: true,
231
231
  treeData: [],
232
232
  },
233
+ leftTabsName: 'component',
233
234
  });
234
235
 
235
236
  function cleanTreeData(node) {
@@ -1083,20 +1084,23 @@ const _hoisted_5 = {
1083
1084
  class: "_fc-l-count",
1084
1085
  style: {}
1085
1086
  };
1086
- const _hoisted_6 = /*#__PURE__*/createElementVNode("span", null, "结构", -1 /* HOISTED */);
1087
- const _hoisted_7 = { key: 0 };
1087
+ const _hoisted_6 = { class: "children-list" };
1088
+ const _hoisted_7 = {
1089
+ key: 0,
1090
+ class: "_fc-tree-node"
1091
+ };
1088
1092
 
1089
1093
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1090
1094
  const _component_dk_icon = resolveComponent("dk-icon");
1091
1095
  const _component_draggable = resolveComponent("draggable");
1096
+ const _component_el_tab_pane = resolveComponent("el-tab-pane");
1092
1097
  const _component_el_tree = resolveComponent("el-tree");
1098
+ const _component_el_tabs = resolveComponent("el-tabs");
1093
1099
  const _component_el_aside = resolveComponent("el-aside");
1094
1100
  const _component_el_header = resolveComponent("el-header");
1095
1101
  const _component_DragForm = resolveComponent("DragForm");
1096
1102
  const _component_preview_phone = resolveComponent("preview-phone");
1097
1103
  const _component_el_container = resolveComponent("el-container");
1098
- const _component_el_tab_pane = resolveComponent("el-tab-pane");
1099
- const _component_el_tabs = resolveComponent("el-tabs");
1100
1104
  const _component_el_dialog = resolveComponent("el-dialog");
1101
1105
  const _component_diy_cloud = resolveComponent("diy-cloud");
1102
1106
  const _component_dk_dialog = resolveComponent("dk-dialog");
@@ -1110,108 +1114,115 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1110
1114
  style: normalizeStyle(_ctx.leftAside.style)
1111
1115
  }, {
1112
1116
  default: withCtx(() => [
1113
- createElementVNode("div", _hoisted_1, [
1114
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (item, index) => {
1115
- return (openBlock(), createElementBlock("div", {
1116
- key: index,
1117
- class: "_fc-l-group"
1118
- }, [
1119
- createElementVNode("h4", _hoisted_2, toDisplayString(item.title), 1 /* TEXT */),
1120
- createVNode(_component_draggable, {
1121
- group: { name: 'default', pull: 'clone', put: false },
1122
- sort: false,
1123
- list: item.list,
1124
- "item-key": "icon",
1125
- filter: ".not-drag",
1126
- class: "_fc-l-items"
1127
- }, {
1128
- item: withCtx(({ element }) => [
1129
- (openBlock(), createElementBlock("div", {
1130
- key: element.id,
1131
- class: normalizeClass(["_fc-l-item", element.count - (_ctx.countObj[element.name] || 0) <= 0 ? 'not-drag' : ''])
1132
- }, [
1133
- createElementVNode("div", _hoisted_3, [
1134
- createVNode(_component_dk_icon, {
1135
- icon: element.icon,
1136
- size: 24
1137
- }, null, 8 /* PROPS */, ["icon"])
1117
+ createVNode(_component_el_tabs, {
1118
+ modelValue: _ctx.leftTabsName,
1119
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.leftTabsName) = $event))
1120
+ }, {
1121
+ default: withCtx(() => [
1122
+ createVNode(_component_el_tab_pane, {
1123
+ label: "组件列表",
1124
+ name: "component"
1125
+ }, {
1126
+ default: withCtx(() => [
1127
+ createElementVNode("div", _hoisted_1, [
1128
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.menuList, (item, index) => {
1129
+ return (openBlock(), createElementBlock("div", {
1130
+ key: index,
1131
+ class: "_fc-l-group"
1132
+ }, [
1133
+ createElementVNode("h4", _hoisted_2, toDisplayString(item.title), 1 /* TEXT */),
1134
+ createVNode(_component_draggable, {
1135
+ group: { name: 'default', pull: 'clone', put: false },
1136
+ sort: false,
1137
+ list: item.list,
1138
+ "item-key": "icon",
1139
+ filter: ".not-drag",
1140
+ class: "_fc-l-items"
1141
+ }, {
1142
+ item: withCtx(({ element }) => [
1143
+ (openBlock(), createElementBlock("div", {
1144
+ key: element.id,
1145
+ class: normalizeClass(["_fc-l-item", element.count - (_ctx.countObj[element.name] || 0) <= 0 ? 'not-drag' : ''])
1146
+ }, [
1147
+ createElementVNode("div", _hoisted_3, [
1148
+ createVNode(_component_dk_icon, {
1149
+ icon: element.icon,
1150
+ size: 24
1151
+ }, null, 8 /* PROPS */, ["icon"])
1152
+ ]),
1153
+ createElementVNode("span", _hoisted_4, toDisplayString(element.label), 1 /* TEXT */),
1154
+ (element.count)
1155
+ ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(element.count - (_ctx.countObj[element.name] || 0)), 1 /* TEXT */))
1156
+ : createCommentVNode("v-if", true)
1157
+ ], 2 /* CLASS */))
1158
+ ]),
1159
+ _: 2 /* DYNAMIC */
1160
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["list"])
1161
+ ]))
1162
+ }), 128 /* KEYED_FRAGMENT */))
1163
+ ])
1164
+ ]),
1165
+ _: 1 /* STABLE */
1166
+ }),
1167
+ createVNode(_component_el_tab_pane, {
1168
+ label: "结构大纲",
1169
+ name: "tree"
1170
+ }, {
1171
+ default: withCtx(() => [
1172
+ createElementVNode("div", _hoisted_6, [
1173
+ createVNode(_component_el_tree, {
1174
+ draggable: "",
1175
+ "highlight-current": "",
1176
+ data: _ctx.treeAside.treeData,
1177
+ props: { value: 'type', label: 'type' },
1178
+ "allow-drop": _ctx.allowDrop,
1179
+ "default-expand-all": true,
1180
+ onNodeDrop: _ctx.nodeDrop,
1181
+ onNodeClick: _ctx.nodeClick
1182
+ }, {
1183
+ default: withCtx(({ data }) => [
1184
+ createElementVNode("div", {
1185
+ class: "el-tree-node-content",
1186
+ style: normalizeStyle(_ctx.activeRule && _ctx.activeRule._id === data._id ? 'color:#409eff' : '')
1187
+ }, [
1188
+ (data.config?.config.label)
1189
+ ? (openBlock(), createElementBlock("div", _hoisted_7, [
1190
+ createVNode(_component_dk_icon, {
1191
+ icon: data.config?.config.icon,
1192
+ class: "_fc-tree-icon"
1193
+ }, null, 8 /* PROPS */, ["icon"]),
1194
+ createTextVNode(" " + toDisplayString(data.config?.config.label), 1 /* TEXT */)
1195
+ ]))
1196
+ : createCommentVNode("v-if", true),
1197
+ createVNode(_component_dk_icon, {
1198
+ icon: "Close",
1199
+ class: "close-rule",
1200
+ onClick: withModifiers($event => (_ctx.delRule(data._id)), ["stop"])
1201
+ }, null, 8 /* PROPS */, ["onClick"])
1202
+ ], 4 /* STYLE */)
1138
1203
  ]),
1139
- createElementVNode("span", _hoisted_4, toDisplayString(element.label), 1 /* TEXT */),
1140
- (element.count)
1141
- ? (openBlock(), createElementBlock("span", _hoisted_5, toDisplayString(element.count - (_ctx.countObj[element.name] || 0)), 1 /* TEXT */))
1142
- : createCommentVNode("v-if", true)
1143
- ], 2 /* CLASS */))
1144
- ]),
1145
- _: 2 /* DYNAMIC */
1146
- }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["list"])
1147
- ]))
1148
- }), 128 /* KEYED_FRAGMENT */))
1149
- ]),
1150
- createElementVNode("div", {
1151
- class: "children-list",
1152
- style: normalizeStyle(_ctx.treeAside.style)
1153
- }, [
1154
- createElementVNode("div", {
1155
- class: "child-title",
1156
- onClick: _cache[0] || (_cache[0] = $event => (_ctx.hideAside('tree')))
1157
- }, [
1158
- _hoisted_6,
1159
- createVNode(_component_dk_icon, {
1160
- icon: _ctx.treeAside.hide ? 'ArrowUp' : 'ArrowDown'
1161
- }, null, 8 /* PROPS */, ["icon"])
1204
+ _: 1 /* STABLE */
1205
+ }, 8 /* PROPS */, ["data", "allow-drop", "onNodeDrop", "onNodeClick"])
1206
+ ])
1207
+ ]),
1208
+ _: 1 /* STABLE */
1209
+ })
1162
1210
  ]),
1163
- createCommentVNode(" <textarea style=\"width: 100%\">{{ treeAside.treeData }}</textarea>"),
1164
- createVNode(_component_el_tree, {
1165
- draggable: "",
1166
- "highlight-current": "",
1167
- data: _ctx.treeAside.treeData,
1168
- props: { value: 'type', label: 'type' },
1169
- "allow-drop": _ctx.allowDrop,
1170
- "default-expand-all": true,
1171
- onNodeDrop: _ctx.nodeDrop,
1172
- onNodeClick: _ctx.nodeClick
1173
- }, {
1174
- default: withCtx(({ data }) => [
1175
- createElementVNode("div", {
1176
- class: "el-tree-node-content",
1177
- style: normalizeStyle(_ctx.activeRule && _ctx.activeRule._id === data._id ? 'color:red' : '')
1178
- }, [
1179
- createTextVNode(toDisplayString(data.type) + " ", 1 /* TEXT */),
1180
- (data.config?.config.label)
1181
- ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(data.config?.config.label), 1 /* TEXT */))
1182
- : createCommentVNode("v-if", true),
1183
- createVNode(_component_dk_icon, {
1184
- icon: "Close",
1185
- class: "close-rule",
1186
- onClick: withModifiers($event => (_ctx.delRule(data._id)), ["stop"])
1187
- }, null, 8 /* PROPS */, ["onClick"])
1188
- ], 4 /* STYLE */)
1189
- ]),
1190
- _: 1 /* STABLE */
1191
- }, 8 /* PROPS */, ["data", "allow-drop", "onNodeDrop", "onNodeClick"]),
1192
- (!_ctx.treeAside.hide)
1193
- ? (openBlock(), createElementBlock("div", {
1194
- key: 0,
1195
- class: "aside-resizer",
1196
- onMousedown: _cache[1] || (_cache[1] = $event => (_ctx.onResizerMouseDown('tree', $event))),
1197
- onMouseup: _cache[2] || (_cache[2] = $event => (_ctx.onResizerMouseUp('tree'))),
1198
- onMousemove: _cache[3] || (_cache[3] = $event => (_ctx.onResizerMouseMove('tree')))
1199
- }, null, 32 /* HYDRATE_EVENTS */))
1200
- : createCommentVNode("v-if", true)
1201
- ], 4 /* STYLE */),
1211
+ _: 1 /* STABLE */
1212
+ }, 8 /* PROPS */, ["modelValue"]),
1202
1213
  (!_ctx.leftAside.hide)
1203
1214
  ? (openBlock(), createElementBlock("div", {
1204
1215
  key: 0,
1205
1216
  class: "aside-resizer",
1206
- onMousedown: _cache[4] || (_cache[4] = $event => (_ctx.onResizerMouseDown('left', $event))),
1207
- onMouseup: _cache[5] || (_cache[5] = $event => (_ctx.onResizerMouseUp('left'))),
1208
- onMousemove: _cache[6] || (_cache[6] = $event => (_ctx.onResizerMouseMove('left')))
1217
+ onMousedown: _cache[1] || (_cache[1] = $event => (_ctx.onResizerMouseDown('left', $event))),
1218
+ onMouseup: _cache[2] || (_cache[2] = $event => (_ctx.onResizerMouseUp('left'))),
1219
+ onMousemove: _cache[3] || (_cache[3] = $event => (_ctx.onResizerMouseMove('left')))
1209
1220
  }, null, 32 /* HYDRATE_EVENTS */))
1210
1221
  : createCommentVNode("v-if", true),
1211
1222
  createElementVNode("div", {
1212
1223
  class: "aside-toggle left-99%",
1213
1224
  style: normalizeStyle(_ctx.leftAside.hide ? 'display:block' : ''),
1214
- onClick: _cache[7] || (_cache[7] = $event => (_ctx.hideAside('left')))
1225
+ onClick: _cache[4] || (_cache[4] = $event => (_ctx.hideAside('left')))
1215
1226
  }, [
1216
1227
  createVNode(_component_dk_icon, {
1217
1228
  icon: _ctx.leftAside.hide ? 'ArrowRight' : 'ArrowLeft'
@@ -1239,7 +1250,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1239
1250
  default: withCtx(() => [
1240
1251
  withDirectives(createVNode(_component_DragForm, {
1241
1252
  api: _ctx.dragForm.api,
1242
- "onUpdate:api": _cache[8] || (_cache[8] = $event => ((_ctx.dragForm.api) = $event)),
1253
+ "onUpdate:api": _cache[5] || (_cache[5] = $event => ((_ctx.dragForm.api) = $event)),
1243
1254
  rule: _ctx.dragForm.rule,
1244
1255
  option: _ctx.dragForm.option
1245
1256
  }, null, 8 /* PROPS */, ["api", "rule", "option"]), [
@@ -1260,7 +1271,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1260
1271
  default: withCtx(() => [
1261
1272
  withDirectives(createVNode(_component_el_tabs, {
1262
1273
  modelValue: _ctx.activeTab,
1263
- "onUpdate:modelValue": _cache[12] || (_cache[12] = $event => ((_ctx.activeTab) = $event))
1274
+ "onUpdate:modelValue": _cache[9] || (_cache[9] = $event => ((_ctx.activeTab) = $event))
1264
1275
  }, {
1265
1276
  default: withCtx(() => [
1266
1277
  (!!_ctx.activeRule)
@@ -1272,7 +1283,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1272
1283
  default: withCtx(() => [
1273
1284
  createVNode(_component_DragForm, {
1274
1285
  api: _ctx.propsForm.api,
1275
- "onUpdate:api": _cache[9] || (_cache[9] = $event => ((_ctx.propsForm.api) = $event)),
1286
+ "onUpdate:api": _cache[6] || (_cache[6] = $event => ((_ctx.propsForm.api) = $event)),
1276
1287
  rule: _ctx.propsForm.rule,
1277
1288
  option: _ctx.propsForm.options,
1278
1289
  "model-value": _ctx.propsForm.value,
@@ -1292,7 +1303,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1292
1303
  default: withCtx(() => [
1293
1304
  withDirectives(createVNode(_component_DragForm, {
1294
1305
  api: _ctx.dkSettingForm.api,
1295
- "onUpdate:api": _cache[10] || (_cache[10] = $event => ((_ctx.dkSettingForm.api) = $event)),
1306
+ "onUpdate:api": _cache[7] || (_cache[7] = $event => ((_ctx.dkSettingForm.api) = $event)),
1296
1307
  rule: _ctx.dkSettingForm.rule,
1297
1308
  option: _ctx.dkSettingForm.options,
1298
1309
  "model-value": _ctx.dkSettingForm.value,
@@ -1311,7 +1322,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1311
1322
  default: withCtx(() => [
1312
1323
  createVNode(_component_DragForm, {
1313
1324
  api: _ctx.dkPageForm.api,
1314
- "onUpdate:api": _cache[11] || (_cache[11] = $event => ((_ctx.dkPageForm.api) = $event)),
1325
+ "onUpdate:api": _cache[8] || (_cache[8] = $event => ((_ctx.dkPageForm.api) = $event)),
1315
1326
  rule: _ctx.dkPageForm.rule,
1316
1327
  option: _ctx.dkPageForm.options,
1317
1328
  onChange: _ctx.dkPageChange
@@ -1328,15 +1339,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1328
1339
  ? (openBlock(), createElementBlock("div", {
1329
1340
  key: 0,
1330
1341
  class: "aside-resizer left-0",
1331
- onMousedown: _cache[13] || (_cache[13] = $event => (_ctx.onResizerMouseDown('right', $event))),
1332
- onMouseup: _cache[14] || (_cache[14] = $event => (_ctx.onResizerMouseUp('right'))),
1333
- onMousemove: _cache[15] || (_cache[15] = $event => (_ctx.onResizerMouseMove('right')))
1342
+ onMousedown: _cache[10] || (_cache[10] = $event => (_ctx.onResizerMouseDown('right', $event))),
1343
+ onMouseup: _cache[11] || (_cache[11] = $event => (_ctx.onResizerMouseUp('right'))),
1344
+ onMousemove: _cache[12] || (_cache[12] = $event => (_ctx.onResizerMouseMove('right')))
1334
1345
  }, null, 32 /* HYDRATE_EVENTS */))
1335
1346
  : createCommentVNode("v-if", true),
1336
1347
  createElementVNode("div", {
1337
1348
  class: "aside-toggle right-99%",
1338
1349
  style: normalizeStyle(_ctx.rightAside.hide ? 'display:block' : ''),
1339
- onClick: _cache[16] || (_cache[16] = $event => (_ctx.hideAside('right')))
1350
+ onClick: _cache[13] || (_cache[13] = $event => (_ctx.hideAside('right')))
1340
1351
  }, [
1341
1352
  createVNode(_component_dk_icon, {
1342
1353
  icon: _ctx.rightAside.hide ? 'ArrowLeft' : 'ArrowRight'
@@ -1348,7 +1359,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1348
1359
  createCommentVNode(" 右边操作区结束"),
1349
1360
  createVNode(_component_el_dialog, {
1350
1361
  visible: _ctx.preview.state,
1351
- "onUpdate:visible": _cache[17] || (_cache[17] = $event => ((_ctx.preview.state) = $event)),
1362
+ "onUpdate:visible": _cache[14] || (_cache[14] = $event => ((_ctx.preview.state) = $event)),
1352
1363
  width: "375px",
1353
1364
  "append-to-body": "",
1354
1365
  style: {"min-height":"700px"}
@@ -1364,7 +1375,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1364
1375
  }, 8 /* PROPS */, ["visible"]),
1365
1376
  createVNode(_component_dk_dialog, {
1366
1377
  modelValue: _ctx.diyCloud.show,
1367
- "onUpdate:modelValue": _cache[18] || (_cache[18] = $event => ((_ctx.diyCloud.show) = $event)),
1378
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = $event => ((_ctx.diyCloud.show) = $event)),
1368
1379
  width: "1200px",
1369
1380
  "append-to-body": "",
1370
1381
  title: "DIY模板市场",