bm-admin-ui 1.0.92-alpha → 1.0.93-alpha
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/es/components/cascader/index.js +2 -2
- package/es/components/form-create/index.js +389 -98
- package/es/components/form-designer/index.js +180 -122
- package/es/components/search-filter/index.d.ts +28 -0
- package/es/components/search-filter/index.js +70 -17
- package/es/components/search-filter/src/form-select-all.vue.d.ts +15 -0
- package/es/components/search-filter/src/search-filter.d.ts +16 -0
- package/es/components/search-filter/src/search-filter.vue.d.ts +28 -0
- package/es/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
- package/es/components/select-all/index.d.ts +2 -0
- package/es/components/select-all/index.js +33 -15
- package/es/components/select-all/src/selectAll.vue.d.ts +2 -0
- package/es/utils/uniqueId.js +2 -2
- package/lib/components/cascader/index.js +2 -2
- package/lib/components/form-create/index.js +389 -98
- package/lib/components/form-designer/index.js +174 -116
- package/lib/components/search-filter/index.d.ts +28 -0
- package/lib/components/search-filter/index.js +71 -17
- package/lib/components/search-filter/src/form-select-all.vue.d.ts +15 -0
- package/lib/components/search-filter/src/search-filter.d.ts +16 -0
- package/lib/components/search-filter/src/search-filter.vue.d.ts +28 -0
- package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
- package/lib/components/select-all/index.d.ts +2 -0
- package/lib/components/select-all/index.js +32 -14
- package/lib/components/select-all/src/selectAll.vue.d.ts +2 -0
- package/lib/utils/uniqueId.js +2 -2
- package/package.json +1 -1
- package/theme-chalk/form-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/select-all.css +1 -1
- package/types/components/search-filter/index.d.ts +28 -0
- package/types/components/search-filter/src/form-select-all.vue.d.ts +15 -0
- package/types/components/search-filter/src/search-filter.d.ts +16 -0
- package/types/components/search-filter/src/search-filter.vue.d.ts +28 -0
- package/types/components/search-filter/src/search-reset-btn.vue.d.ts +26 -0
- package/types/components/select-all/index.d.ts +2 -0
- package/types/components/select-all/src/selectAll.vue.d.ts +2 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { defineComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, computed, resolveComponent, normalizeClass, unref, createBlock, createCommentVNode, withDirectives, createVNode, withCtx, createTextVNode, withModifiers, vShow, ref, watch, createElementVNode, nextTick, Fragment, isRef, renderList, renderSlot, createStaticVNode, reactive, resolveDynamicComponent } from 'vue';
|
|
2
|
+
import { defineComponent, openBlock, createElementBlock, normalizeStyle, toDisplayString, computed, resolveComponent, normalizeClass, unref, createBlock, createCommentVNode, withDirectives, createVNode, withCtx, createTextVNode, withModifiers, vShow, ref, watch, createElementVNode, nextTick as nextTick$1, Fragment, isRef, renderList, renderSlot, createStaticVNode, reactive, resolveDynamicComponent } from 'vue';
|
|
3
3
|
import uniqueId from 'bm-admin-ui/es/utils/uniqueId';
|
|
4
4
|
import Draggable from 'vuedraggable';
|
|
5
5
|
import { Tooltip, FormItemRest, Input, Button, RadioGroup, Radio, DatePicker, Checkbox, Tabs, TabPane, Row, Col, Dropdown, Menu, CheckboxGroup, MenuItem, Divider, Switch, Select, Layout, LayoutSider, LayoutContent, message } from 'ant-design-vue';
|
|
@@ -68,7 +68,7 @@ var _export_sfc = (sfc, props) => {
|
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const _sfc_main$
|
|
71
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
72
72
|
__name: "widget-instruction",
|
|
73
73
|
props: ["rule"],
|
|
74
74
|
setup(__props) {
|
|
@@ -79,13 +79,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
|
-
var WidgetInstruction = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
82
|
+
var WidgetInstruction = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "widget-instruction.vue"]]);
|
|
83
83
|
|
|
84
84
|
const _hoisted_1$f = {
|
|
85
85
|
key: 2,
|
|
86
86
|
class: "bm-drag-tool-mask"
|
|
87
87
|
};
|
|
88
|
-
const _sfc_main$
|
|
88
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
89
89
|
__name: "drag-tool",
|
|
90
90
|
props: ["rule", "activeRuleField", "parentRule"],
|
|
91
91
|
emits: [
|
|
@@ -226,16 +226,16 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
226
226
|
]),
|
|
227
227
|
_: 1
|
|
228
228
|
}, 512), [
|
|
229
|
-
[vShow, __props.rule.config.isHover || unref(isActive)]
|
|
229
|
+
[vShow, !__props.rule.config?.immutable && (__props.rule.config.isHover || unref(isActive))]
|
|
230
230
|
])
|
|
231
231
|
], 34);
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
|
-
var DragTool = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
235
|
+
var DragTool = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "drag-tool.vue"]]);
|
|
236
236
|
|
|
237
237
|
const _hoisted_1$e = { class: "bm-drag-placeholder" };
|
|
238
|
-
const _sfc_main$
|
|
238
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
239
239
|
__name: "drag-placeholder",
|
|
240
240
|
props: {},
|
|
241
241
|
setup(__props) {
|
|
@@ -244,14 +244,14 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
244
244
|
};
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
|
-
var DragPlaceholder = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
247
|
+
var DragPlaceholder = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "drag-placeholder.vue"]]);
|
|
248
248
|
|
|
249
249
|
const _hoisted_1$d = { class: "bm-widget-row-wrap" };
|
|
250
250
|
const _hoisted_2$a = {
|
|
251
251
|
key: 0,
|
|
252
252
|
class: "bm-widget-row-tip"
|
|
253
253
|
};
|
|
254
|
-
const _sfc_main$
|
|
254
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
255
255
|
__name: "widget-row",
|
|
256
256
|
props: ["activeRuleField", "formCreateInject"],
|
|
257
257
|
emits: [
|
|
@@ -356,7 +356,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
});
|
|
359
|
-
var WidgetRow = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
359
|
+
var WidgetRow = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "widget-row.vue"]]);
|
|
360
360
|
|
|
361
361
|
const label$h = '分栏';
|
|
362
362
|
const fieldsMap$h = {
|
|
@@ -702,10 +702,14 @@ var numInput = {
|
|
|
702
702
|
placeholder: '请输入',
|
|
703
703
|
},
|
|
704
704
|
config: {
|
|
705
|
+
format: '',
|
|
705
706
|
propsFields: Object.values(fieldsMap$e),
|
|
706
707
|
},
|
|
707
708
|
style: {
|
|
708
709
|
width: '100%',
|
|
710
|
+
overflow: 'hidden',
|
|
711
|
+
textOverflow: 'ellipsis',
|
|
712
|
+
marginBottom: '0',
|
|
709
713
|
},
|
|
710
714
|
};
|
|
711
715
|
},
|
|
@@ -794,7 +798,7 @@ const _hoisted_2$9 = {
|
|
|
794
798
|
key: 0,
|
|
795
799
|
class: "bm-handle-options__error-tip"
|
|
796
800
|
};
|
|
797
|
-
const _sfc_main$
|
|
801
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
798
802
|
__name: "handle-options",
|
|
799
803
|
props: ["options", "disabled"],
|
|
800
804
|
emits: ["setValue"],
|
|
@@ -965,7 +969,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
965
969
|
};
|
|
966
970
|
}
|
|
967
971
|
});
|
|
968
|
-
var HandleOptionsCom = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
972
|
+
var HandleOptionsCom = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "handle-options.vue"]]);
|
|
969
973
|
|
|
970
974
|
const label$d = '单选框';
|
|
971
975
|
const ruleType$1 = {
|
|
@@ -1246,7 +1250,7 @@ var checkbox = {
|
|
|
1246
1250
|
};
|
|
1247
1251
|
|
|
1248
1252
|
const _hoisted_1$b = { class: "bm-default-date" };
|
|
1249
|
-
const _sfc_main$
|
|
1253
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1250
1254
|
__name: "default-date",
|
|
1251
1255
|
props: [
|
|
1252
1256
|
"defaultRadioValue",
|
|
@@ -1335,7 +1339,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
1335
1339
|
};
|
|
1336
1340
|
}
|
|
1337
1341
|
});
|
|
1338
|
-
var DefaultDate = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1342
|
+
var DefaultDate = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "default-date.vue"]]);
|
|
1339
1343
|
|
|
1340
1344
|
const label$b = '日期';
|
|
1341
1345
|
const fieldsMap$b = {
|
|
@@ -1683,7 +1687,7 @@ var instruction = {
|
|
|
1683
1687
|
},
|
|
1684
1688
|
on: {
|
|
1685
1689
|
change({ api, self }, list) {
|
|
1686
|
-
nextTick(() => {
|
|
1690
|
+
nextTick$1(() => {
|
|
1687
1691
|
api.refresh();
|
|
1688
1692
|
});
|
|
1689
1693
|
},
|
|
@@ -1843,7 +1847,7 @@ const _hoisted_15 = { class: "bm-widget-table__operateColumn__content" };
|
|
|
1843
1847
|
const _hoisted_16 = /* @__PURE__ */ createElementVNode("a", null, "\u590D\u5236", -1);
|
|
1844
1848
|
const _hoisted_17 = /* @__PURE__ */ createElementVNode("span", null, null, -1);
|
|
1845
1849
|
const _hoisted_18 = /* @__PURE__ */ createElementVNode("a", null, "\u5220\u9664", -1);
|
|
1846
|
-
const _sfc_main$
|
|
1850
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
1847
1851
|
__name: "widget-table",
|
|
1848
1852
|
props: ["formCreateInject", "activeRuleField"],
|
|
1849
1853
|
emits: [
|
|
@@ -1860,6 +1864,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1860
1864
|
const childRules = computed(() => tableRule.value.config.childRules);
|
|
1861
1865
|
const showDelete = computed(() => showFeature("delete"));
|
|
1862
1866
|
const showImport = computed(() => showFeature("import"));
|
|
1867
|
+
const showExport = computed(() => showFeature("export"));
|
|
1863
1868
|
const showCopy = computed(() => showFeature("copy"));
|
|
1864
1869
|
function showFeature(featureId) {
|
|
1865
1870
|
return tableRule.value.config.tableAdvancedFeatures.includes(featureId);
|
|
@@ -1877,6 +1882,8 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1877
1882
|
emits("set-active-rule", rule, tableRule.value);
|
|
1878
1883
|
}
|
|
1879
1884
|
function handleClick(element) {
|
|
1885
|
+
if (element?.config.immutable)
|
|
1886
|
+
return;
|
|
1880
1887
|
emitSetActiveRuleEvt(element);
|
|
1881
1888
|
}
|
|
1882
1889
|
function handleUpdate({ newIndex }) {
|
|
@@ -1917,6 +1924,12 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
1917
1924
|
createTextVNode(" \u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F ")
|
|
1918
1925
|
]),
|
|
1919
1926
|
_: 1
|
|
1927
|
+
})) : createCommentVNode("v-if", true),
|
|
1928
|
+
unref(showExport) ? (openBlock(), createBlock(unref(Button), { key: 3 }, {
|
|
1929
|
+
default: withCtx(() => [
|
|
1930
|
+
createTextVNode(" \u5BFC\u51FA ")
|
|
1931
|
+
]),
|
|
1932
|
+
_: 1
|
|
1920
1933
|
})) : createCommentVNode("v-if", true)
|
|
1921
1934
|
]),
|
|
1922
1935
|
createElementVNode("div", _hoisted_3$5, [
|
|
@@ -2005,7 +2018,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
2005
2018
|
};
|
|
2006
2019
|
}
|
|
2007
2020
|
});
|
|
2008
|
-
var WidgetTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2021
|
+
var WidgetTable = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "widget-table.vue"]]);
|
|
2009
2022
|
|
|
2010
2023
|
const label$7 = '表格';
|
|
2011
2024
|
const fieldsMap$7 = {
|
|
@@ -2081,7 +2094,7 @@ var table = {
|
|
|
2081
2094
|
value: rule.config.childRules,
|
|
2082
2095
|
on: {
|
|
2083
2096
|
change({ api, self }, list) {
|
|
2084
|
-
nextTick(() => {
|
|
2097
|
+
nextTick$1(() => {
|
|
2085
2098
|
setTimeout(() => {
|
|
2086
2099
|
api.validate();
|
|
2087
2100
|
});
|
|
@@ -2446,7 +2459,7 @@ const _hoisted_1$9 = { style: { "margin-top": "16px", "line-height": "32px" } };
|
|
|
2446
2459
|
const _hoisted_2$7 = { style: { "float": "right" } };
|
|
2447
2460
|
const _hoisted_3$4 = /* @__PURE__ */ createElementVNode("div", { class: "bm-material-temp__table-tip" }, "\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u8868\u683C\u5B57\u6BB5", -1);
|
|
2448
2461
|
const _hoisted_4$3 = { class: "bm-material-temp__add" };
|
|
2449
|
-
const _sfc_main$
|
|
2462
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
2450
2463
|
__name: "widget-material-temp",
|
|
2451
2464
|
props: ["formCreateInject"],
|
|
2452
2465
|
setup(__props) {
|
|
@@ -2629,11 +2642,11 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
2629
2642
|
};
|
|
2630
2643
|
}
|
|
2631
2644
|
});
|
|
2632
|
-
var WidgetMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2645
|
+
var WidgetMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "widget-material-temp.vue"]]);
|
|
2633
2646
|
|
|
2634
2647
|
const _hoisted_1$8 = { class: "bm-use-instruction" };
|
|
2635
2648
|
const _hoisted_2$6 = { class: "bm-use-instruction__title" };
|
|
2636
|
-
const _sfc_main$
|
|
2649
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
2637
2650
|
__name: "use-instruction",
|
|
2638
2651
|
setup(__props) {
|
|
2639
2652
|
return (_ctx, _cache) => {
|
|
@@ -2647,7 +2660,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
2647
2660
|
};
|
|
2648
2661
|
}
|
|
2649
2662
|
});
|
|
2650
|
-
var UseInstruction = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2663
|
+
var UseInstruction = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "use-instruction.vue"]]);
|
|
2651
2664
|
|
|
2652
2665
|
const label$3 = '素材模板';
|
|
2653
2666
|
const fieldsMap$3 = {
|
|
@@ -2769,7 +2782,7 @@ const _hoisted_1$7 = /* @__PURE__ */ createElementVNode("div", { class: "bm-prod
|
|
|
2769
2782
|
const _hoisted_2$5 = { class: "bm-product-info-item__content" };
|
|
2770
2783
|
const _hoisted_3$3 = { class: "bm-product-info-item__title" };
|
|
2771
2784
|
const _hoisted_4$2 = /* @__PURE__ */ createElementVNode("div", { class: "bm-product-info-item__content" }, "\u7CFB\u7EDF\u81EA\u52A8\u5E26\u51FA", -1);
|
|
2772
|
-
const _sfc_main$
|
|
2785
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
2773
2786
|
__name: "product-info",
|
|
2774
2787
|
props: ["formCreateInject"],
|
|
2775
2788
|
setup(__props) {
|
|
@@ -2814,90 +2827,70 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
2814
2827
|
};
|
|
2815
2828
|
}
|
|
2816
2829
|
});
|
|
2817
|
-
var ProductInfo = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2830
|
+
var ProductInfo = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "product-info.vue"]]);
|
|
2818
2831
|
|
|
2819
|
-
const _hoisted_1$6 =
|
|
2820
|
-
/* @__PURE__ */ createElementVNode("span", { class: "bm-associated-fields-item__content" }, "\u5546\u54C1\u7F16\u53F7")
|
|
2821
|
-
], -1);
|
|
2832
|
+
const _hoisted_1$6 = { class: "bm-associated-fields-item__content" };
|
|
2822
2833
|
const _hoisted_2$4 = { class: "bm-associated-fields-item__content" };
|
|
2823
2834
|
const _hoisted_3$2 = { style: { "text-align": "right", "margin": "6px 0 4px", "padding-right": "8px" } };
|
|
2824
|
-
const _sfc_main$
|
|
2825
|
-
__name: "associated-fields",
|
|
2826
|
-
props: ["associatedFields"],
|
|
2835
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2836
|
+
__name: "pure-associated-fields",
|
|
2837
|
+
props: ["associatedFields", "options", "defaultOptions"],
|
|
2827
2838
|
emits: ["change"],
|
|
2828
2839
|
setup(__props, { emit: emits }) {
|
|
2829
2840
|
const props = __props;
|
|
2830
2841
|
const visible = ref(false);
|
|
2831
2842
|
const checkList = ref([]);
|
|
2832
|
-
const options = [
|
|
2833
|
-
{
|
|
2834
|
-
value: "\u5546\u54C1\u540D\u79F0",
|
|
2835
|
-
label: "\u5546\u54C1\u540D\u79F0"
|
|
2836
|
-
},
|
|
2837
|
-
{
|
|
2838
|
-
value: "\u5546\u54C1\u7B80\u79F0",
|
|
2839
|
-
label: "\u5546\u54C1\u7B80\u79F0"
|
|
2840
|
-
},
|
|
2841
|
-
{
|
|
2842
|
-
value: "\u5546\u54C1\u56FE\u7247",
|
|
2843
|
-
label: "\u5546\u54C1\u56FE\u7247"
|
|
2844
|
-
},
|
|
2845
|
-
{
|
|
2846
|
-
value: "\u5EFA\u8BAE\u96F6\u552E\u4EF7",
|
|
2847
|
-
label: "\u5EFA\u8BAE\u96F6\u552E\u4EF7"
|
|
2848
|
-
},
|
|
2849
|
-
{
|
|
2850
|
-
value: "\u5546\u54C1\u7BB1\u89C4",
|
|
2851
|
-
label: "\u5546\u54C1\u7BB1\u89C4"
|
|
2852
|
-
},
|
|
2853
|
-
{
|
|
2854
|
-
value: "\u5546\u54C1\u5355\u4F4D",
|
|
2855
|
-
label: "\u5546\u54C1\u5355\u4F4D"
|
|
2856
|
-
}
|
|
2857
|
-
];
|
|
2858
|
-
function emitChangeEvt() {
|
|
2859
|
-
emits(
|
|
2860
|
-
"change",
|
|
2861
|
-
options.filter((op) => checkList.value.includes(op.value))
|
|
2862
|
-
);
|
|
2863
|
-
}
|
|
2864
2843
|
function handOk() {
|
|
2865
2844
|
visible.value = false;
|
|
2866
2845
|
emitChangeEvt();
|
|
2867
2846
|
}
|
|
2868
2847
|
function init() {
|
|
2869
|
-
checkList.value = props.associatedFields
|
|
2848
|
+
checkList.value = props.associatedFields?.map((item) => item.value);
|
|
2870
2849
|
}
|
|
2871
|
-
function
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2850
|
+
function emitChangeEvt() {
|
|
2851
|
+
emits(
|
|
2852
|
+
"change",
|
|
2853
|
+
props.options.filter((op) => checkList.value.includes(op.value))
|
|
2854
|
+
);
|
|
2875
2855
|
}
|
|
2876
2856
|
function handleDel(value) {
|
|
2877
2857
|
checkList.value = checkList.value.filter((cl) => cl !== value);
|
|
2878
2858
|
emitChangeEvt();
|
|
2879
2859
|
}
|
|
2880
2860
|
init();
|
|
2861
|
+
function visibleChange(visible2) {
|
|
2862
|
+
if (visible2) {
|
|
2863
|
+
init();
|
|
2864
|
+
}
|
|
2865
|
+
}
|
|
2881
2866
|
watch(visible, (val) => {
|
|
2882
2867
|
visibleChange(val);
|
|
2883
2868
|
});
|
|
2884
2869
|
return (_ctx, _cache) => {
|
|
2885
2870
|
const _component_Delete = resolveComponent("Delete");
|
|
2886
2871
|
return openBlock(), createElementBlock("div", null, [
|
|
2887
|
-
|
|
2872
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.defaultOptions, (option) => {
|
|
2873
|
+
return openBlock(), createElementBlock("div", {
|
|
2874
|
+
key: `defaultOption${option?.value}`,
|
|
2875
|
+
class: "bm-associated-fields-item"
|
|
2876
|
+
}, [
|
|
2877
|
+
createElementVNode("span", _hoisted_1$6, toDisplayString(option?.label), 1)
|
|
2878
|
+
]);
|
|
2879
|
+
}), 128)),
|
|
2888
2880
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.associatedFields, (item) => {
|
|
2889
2881
|
return openBlock(), createElementBlock("div", {
|
|
2890
2882
|
key: item.value,
|
|
2891
2883
|
class: "bm-associated-fields-item"
|
|
2892
2884
|
}, [
|
|
2893
|
-
createElementVNode("span", _hoisted_2$4, toDisplayString(item
|
|
2885
|
+
createElementVNode("span", _hoisted_2$4, toDisplayString(item?.label), 1),
|
|
2894
2886
|
createVNode(_component_Delete, {
|
|
2895
2887
|
class: "bm-associated-fields-item__icon",
|
|
2896
2888
|
onClick: ($event) => handleDel(item.value)
|
|
2897
2889
|
}, null, 8, ["onClick"])
|
|
2898
2890
|
]);
|
|
2899
2891
|
}), 128)),
|
|
2900
|
-
|
|
2892
|
+
__props.associatedFields?.length ? (openBlock(), createBlock(unref(Dropdown), {
|
|
2893
|
+
key: 0,
|
|
2901
2894
|
visible: visible.value,
|
|
2902
2895
|
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => visible.value = $event),
|
|
2903
2896
|
trigger: ["click"]
|
|
@@ -2913,8 +2906,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2913
2906
|
style: { "width": "100%" }
|
|
2914
2907
|
}, {
|
|
2915
2908
|
default: withCtx(() => [
|
|
2916
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(options, (item) => {
|
|
2917
|
-
return
|
|
2909
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => {
|
|
2910
|
+
return openBlock(), createBlock(unref(MenuItem), {
|
|
2918
2911
|
key: item.value
|
|
2919
2912
|
}, {
|
|
2920
2913
|
default: withCtx(() => [
|
|
@@ -2930,7 +2923,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2930
2923
|
]),
|
|
2931
2924
|
_: 2
|
|
2932
2925
|
}, 1024);
|
|
2933
|
-
}),
|
|
2926
|
+
}), 128))
|
|
2934
2927
|
]),
|
|
2935
2928
|
_: 1
|
|
2936
2929
|
}, 8, ["value"])
|
|
@@ -2963,28 +2956,25 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
2963
2956
|
})
|
|
2964
2957
|
]),
|
|
2965
2958
|
default: withCtx(() => [
|
|
2966
|
-
createVNode(unref(Button), {
|
|
2967
|
-
style: { "margin-top": "8px" },
|
|
2968
|
-
block: ""
|
|
2969
|
-
}, {
|
|
2959
|
+
createVNode(unref(Button), { style: { "margin-top": "8px" } }, {
|
|
2970
2960
|
default: withCtx(() => [
|
|
2971
2961
|
createVNode(unref(PlusOutlined)),
|
|
2972
|
-
createTextVNode("
|
|
2962
|
+
createTextVNode("\u6DFB\u52A0\u5B50\u5B57\u6BB5")
|
|
2973
2963
|
]),
|
|
2974
2964
|
_: 1
|
|
2975
2965
|
})
|
|
2976
2966
|
]),
|
|
2977
2967
|
_: 1
|
|
2978
|
-
}, 8, ["visible"])
|
|
2968
|
+
}, 8, ["visible"])) : createCommentVNode("v-if", true)
|
|
2979
2969
|
]);
|
|
2980
2970
|
};
|
|
2981
2971
|
}
|
|
2982
2972
|
});
|
|
2983
|
-
var
|
|
2973
|
+
var pureAssociatedFields = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "pure-associated-fields.vue"]]);
|
|
2984
2974
|
|
|
2985
2975
|
const _hoisted_1$5 = /* @__PURE__ */ createElementVNode("div", { style: { "margin": "18px 0 6px" } }, "\u4EC5\u83B7\u53D6", -1);
|
|
2986
2976
|
const _hoisted_2$3 = /* @__PURE__ */ createElementVNode("div", { style: { "margin-top": "7px" } }, "\u4E2D\u53EF\u5206\u9500\u7684\u5546\u54C1\u6570\u636E", -1);
|
|
2987
|
-
const _sfc_main$
|
|
2977
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
2988
2978
|
__name: "shop-data-filter",
|
|
2989
2979
|
props: ["widgetFormRules", "defaultSelectValue"],
|
|
2990
2980
|
emits: ["change"],
|
|
@@ -3078,7 +3068,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
3078
3068
|
};
|
|
3079
3069
|
}
|
|
3080
3070
|
});
|
|
3081
|
-
var ShopDataFilter = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
3071
|
+
var ShopDataFilter = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "shop-data-filter.vue"]]);
|
|
3082
3072
|
|
|
3083
3073
|
const label$2 = '商品';
|
|
3084
3074
|
const fieldsMap$2 = {
|
|
@@ -3117,12 +3107,64 @@ var product = {
|
|
|
3117
3107
|
props(rule, parentRule, widgetFormRules) {
|
|
3118
3108
|
return [
|
|
3119
3109
|
{
|
|
3120
|
-
type: '
|
|
3121
|
-
component:
|
|
3110
|
+
type: 'pureAssociatedFields',
|
|
3111
|
+
component: pureAssociatedFields,
|
|
3122
3112
|
title: '关联字段',
|
|
3123
3113
|
field: fieldsMap$2['config.associatedFields'],
|
|
3124
3114
|
props: {
|
|
3125
3115
|
associatedFields: rule.config.associatedFields,
|
|
3116
|
+
defaultOptions: [
|
|
3117
|
+
{
|
|
3118
|
+
value: '商品编号',
|
|
3119
|
+
label: '商品编号',
|
|
3120
|
+
},
|
|
3121
|
+
],
|
|
3122
|
+
options: [
|
|
3123
|
+
{
|
|
3124
|
+
value: '商品名称',
|
|
3125
|
+
label: '商品名称',
|
|
3126
|
+
},
|
|
3127
|
+
{
|
|
3128
|
+
value: '商品简称',
|
|
3129
|
+
label: '商品简称',
|
|
3130
|
+
},
|
|
3131
|
+
{
|
|
3132
|
+
value: '商品图片',
|
|
3133
|
+
label: '商品图片',
|
|
3134
|
+
},
|
|
3135
|
+
{
|
|
3136
|
+
value: '建议零售价',
|
|
3137
|
+
label: '建议零售价',
|
|
3138
|
+
},
|
|
3139
|
+
{
|
|
3140
|
+
value: '商品箱规',
|
|
3141
|
+
label: '商品箱规',
|
|
3142
|
+
},
|
|
3143
|
+
{
|
|
3144
|
+
value: '商品单位',
|
|
3145
|
+
label: '商品单位',
|
|
3146
|
+
},
|
|
3147
|
+
{
|
|
3148
|
+
value: '一级分类',
|
|
3149
|
+
label: '一级分类',
|
|
3150
|
+
},
|
|
3151
|
+
{
|
|
3152
|
+
value: '二级分类',
|
|
3153
|
+
label: '二级分类',
|
|
3154
|
+
},
|
|
3155
|
+
{
|
|
3156
|
+
value: '三级分类',
|
|
3157
|
+
label: '三级分类',
|
|
3158
|
+
},
|
|
3159
|
+
{
|
|
3160
|
+
value: '商品类型',
|
|
3161
|
+
label: '商品类型',
|
|
3162
|
+
},
|
|
3163
|
+
{
|
|
3164
|
+
value: '商品标签',
|
|
3165
|
+
label: '商品标签',
|
|
3166
|
+
},
|
|
3167
|
+
],
|
|
3126
3168
|
},
|
|
3127
3169
|
effect: {
|
|
3128
3170
|
required: true,
|
|
@@ -3132,7 +3174,7 @@ var product = {
|
|
|
3132
3174
|
change({ api, self }, list) {
|
|
3133
3175
|
api.emit('change', self.field, list, self, api, true);
|
|
3134
3176
|
self.props.associatedFields = list;
|
|
3135
|
-
nextTick(() => {
|
|
3177
|
+
nextTick$1(() => {
|
|
3136
3178
|
api.refresh();
|
|
3137
3179
|
});
|
|
3138
3180
|
},
|
|
@@ -3155,7 +3197,7 @@ var product = {
|
|
|
3155
3197
|
change({ api, self }, value) {
|
|
3156
3198
|
api.emit('change', self.field, value, self, api, true);
|
|
3157
3199
|
self.props.defaultSelectValue = value;
|
|
3158
|
-
nextTick(() => {
|
|
3200
|
+
nextTick$1(() => {
|
|
3159
3201
|
api.refresh();
|
|
3160
3202
|
});
|
|
3161
3203
|
},
|
|
@@ -3184,33 +3226,6 @@ var product = {
|
|
|
3184
3226
|
},
|
|
3185
3227
|
};
|
|
3186
3228
|
|
|
3187
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3188
|
-
__name: "shop-associated-fields",
|
|
3189
|
-
setup(__props) {
|
|
3190
|
-
const associatedFields = [
|
|
3191
|
-
{
|
|
3192
|
-
value: "\u5E97\u94FA\u7F16\u53F7",
|
|
3193
|
-
label: "\u5E97\u94FA\u7F16\u53F7"
|
|
3194
|
-
},
|
|
3195
|
-
{
|
|
3196
|
-
value: "\u5E97\u94FA\u540D\u79F0",
|
|
3197
|
-
label: "\u5E97\u94FA\u540D\u79F0"
|
|
3198
|
-
}
|
|
3199
|
-
];
|
|
3200
|
-
return (_ctx, _cache) => {
|
|
3201
|
-
return openBlock(), createElementBlock("div", null, [
|
|
3202
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(associatedFields, (item) => {
|
|
3203
|
-
return createElementVNode("span", {
|
|
3204
|
-
key: item.value,
|
|
3205
|
-
class: "bm-shop-associated-fields-item"
|
|
3206
|
-
}, toDisplayString(item.label), 1);
|
|
3207
|
-
}), 64))
|
|
3208
|
-
]);
|
|
3209
|
-
};
|
|
3210
|
-
}
|
|
3211
|
-
});
|
|
3212
|
-
var ShopAssociatedFields = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "shop-associated-fields.vue"]]);
|
|
3213
|
-
|
|
3214
3229
|
let i = 0;
|
|
3215
3230
|
const label$1 = '店铺';
|
|
3216
3231
|
const fieldsMap$1 = {
|
|
@@ -3250,13 +3265,37 @@ var shop = {
|
|
|
3250
3265
|
props(rule, parentRule) {
|
|
3251
3266
|
return [
|
|
3252
3267
|
{
|
|
3253
|
-
type: '
|
|
3254
|
-
component:
|
|
3268
|
+
type: 'pureAssociatedFields',
|
|
3269
|
+
component: pureAssociatedFields,
|
|
3255
3270
|
title: '关联字段',
|
|
3256
3271
|
field: 'config.associatedFields',
|
|
3272
|
+
props: {
|
|
3273
|
+
associatedFields: rule.config.associatedFields,
|
|
3274
|
+
defaultOptions: [
|
|
3275
|
+
{
|
|
3276
|
+
value: '店铺编号',
|
|
3277
|
+
label: '店铺编号',
|
|
3278
|
+
},
|
|
3279
|
+
{
|
|
3280
|
+
value: '店铺名称',
|
|
3281
|
+
label: '店铺名称',
|
|
3282
|
+
},
|
|
3283
|
+
],
|
|
3284
|
+
options: [],
|
|
3285
|
+
},
|
|
3257
3286
|
effect: {
|
|
3258
3287
|
required: true,
|
|
3259
3288
|
},
|
|
3289
|
+
inject: true,
|
|
3290
|
+
on: {
|
|
3291
|
+
change({ api, self }, list) {
|
|
3292
|
+
api.emit('change', self.field, list, self, api, true);
|
|
3293
|
+
self.props.associatedFields = list;
|
|
3294
|
+
nextTick(() => {
|
|
3295
|
+
api.refresh();
|
|
3296
|
+
});
|
|
3297
|
+
},
|
|
3298
|
+
},
|
|
3260
3299
|
},
|
|
3261
3300
|
{
|
|
3262
3301
|
type: 'checkbox',
|
|
@@ -3305,8 +3344,8 @@ var shop = {
|
|
|
3305
3344
|
required: rule.effect.required,
|
|
3306
3345
|
},
|
|
3307
3346
|
config: {
|
|
3308
|
-
dataFiltering: rule.config.dataFiltering,
|
|
3309
3347
|
isMain: rule.config.isMain,
|
|
3348
|
+
associatedFields: rule.config.associatedFields,
|
|
3310
3349
|
},
|
|
3311
3350
|
};
|
|
3312
3351
|
},
|
|
@@ -3524,6 +3563,18 @@ const formDesignerProps = {
|
|
|
3524
3563
|
type: Boolean,
|
|
3525
3564
|
default: false,
|
|
3526
3565
|
},
|
|
3566
|
+
dragCheckFunc: {
|
|
3567
|
+
type: Function,
|
|
3568
|
+
default: (underlying_vm) => true,
|
|
3569
|
+
},
|
|
3570
|
+
formRulePipe: {
|
|
3571
|
+
type: Function,
|
|
3572
|
+
default: (obj) => obj,
|
|
3573
|
+
},
|
|
3574
|
+
addWidgetFunc: {
|
|
3575
|
+
type: Function,
|
|
3576
|
+
default: (pushRowWidget, pushTableWidgets) => null,
|
|
3577
|
+
},
|
|
3527
3578
|
};
|
|
3528
3579
|
|
|
3529
3580
|
const _hoisted_1$3 = {
|
|
@@ -3625,6 +3676,12 @@ const widgetNamesRowAccept = [
|
|
|
3625
3676
|
shop.name,
|
|
3626
3677
|
materialType.name,
|
|
3627
3678
|
];
|
|
3679
|
+
function pushTableWidgets(key, config) {
|
|
3680
|
+
widgetsTableAccept[key] = config;
|
|
3681
|
+
}
|
|
3682
|
+
function pushRowWidgets(key) {
|
|
3683
|
+
widgetNamesRowAccept.push(key);
|
|
3684
|
+
}
|
|
3628
3685
|
var ruleList = {
|
|
3629
3686
|
[row.name]: row,
|
|
3630
3687
|
[input.name]: input,
|
|
@@ -3839,7 +3896,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3839
3896
|
if (rule?.props?.type === "textarea" && parentType === WidgetType.TableWidget) {
|
|
3840
3897
|
rule.props.autoSize = true;
|
|
3841
3898
|
}
|
|
3842
|
-
if (rule.config
|
|
3899
|
+
if (rule.config?.config?.name === "product" && parentType === WidgetType.TableWidget) {
|
|
3843
3900
|
rule.title.title = "\u5546\u54C1\u7F16\u53F7";
|
|
3844
3901
|
}
|
|
3845
3902
|
}
|
|
@@ -3853,7 +3910,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3853
3910
|
people: "\u9664\u201C\u5FC5\u586B\u3001\u9009\u9879\u201D\u5185\u5BB9\u8BBE\u7F6E\u4E0D\u53EF\u4FEE\u6539\uFF0C\u5176\u4ED6\u4FE1\u606F\u53EF\u4FEE\u6539",
|
|
3854
3911
|
department: "\u9664\u201C\u5FC5\u586B\u3001\u9009\u9879\u201D\u5185\u5BB9\u8BBE\u7F6E\u4E0D\u53EF\u4FEE\u6539\uFF0C\u5176\u4ED6\u4FE1\u606F\u53EF\u4FEE\u6539"
|
|
3855
3912
|
};
|
|
3856
|
-
const tabData = createTab();
|
|
3913
|
+
const tabData = typeof props.formRulePipe === "function" ? props.formRulePipe(createTab()) : [];
|
|
3914
|
+
typeof props.addWidgetFunc === "function" && props.addWidgetFunc(pushRowWidgets, pushTableWidgets);
|
|
3857
3915
|
const activeKey = ref("controlLibrary");
|
|
3858
3916
|
const widgetFormRules = reactive([]);
|
|
3859
3917
|
const activeRule = ref({});
|
|
@@ -3861,7 +3919,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3861
3919
|
const fApi = ref();
|
|
3862
3920
|
const activeParentRule = ref();
|
|
3863
3921
|
const menuList = computed(
|
|
3864
|
-
() => tabData.find((tab) => tab.key === activeKey.value)
|
|
3922
|
+
() => tabData.find((tab) => tab.key === activeKey.value)?.menuList
|
|
3865
3923
|
);
|
|
3866
3924
|
const activeProps = computed(() => cacheProps[activeRule.value.field]);
|
|
3867
3925
|
const activeRuleInList = computed(
|
|
@@ -3892,10 +3950,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3892
3950
|
}
|
|
3893
3951
|
}
|
|
3894
3952
|
function moveMenuItem(evt) {
|
|
3895
|
-
return checkDragMove(evt);
|
|
3953
|
+
return props?.dragCheckFunc(evt?.dragged?._underlying_vm_) && checkDragMove(evt);
|
|
3896
3954
|
}
|
|
3897
3955
|
function moveFormItem(evt) {
|
|
3898
|
-
return checkDragMove(evt);
|
|
3956
|
+
return props?.dragCheckFunc(evt?.dragged?._underlying_vm_) && checkDragMove(evt);
|
|
3899
3957
|
}
|
|
3900
3958
|
function handleMenuItemDragStart(evt) {
|
|
3901
3959
|
const item = evt.item.children[0];
|
|
@@ -4163,7 +4221,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4163
4221
|
}
|
|
4164
4222
|
}
|
|
4165
4223
|
if (!pass) {
|
|
4166
|
-
nextTick(() => {
|
|
4224
|
+
nextTick$1(() => {
|
|
4167
4225
|
fApi.value.validate();
|
|
4168
4226
|
});
|
|
4169
4227
|
break;
|