ll-plus 2.3.19 → 2.3.20
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/advanced-filtering/index.d.ts +36 -34
- package/es/components/advanced-filtering/index.mjs +1 -1
- package/es/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
- package/es/components/advanced-filtering/src/advanced-filtering.mjs +60 -2
- package/es/components/advanced-filtering/src/advanced-filtering.mjs.map +1 -1
- package/es/components/advanced-filtering/src/advanced-filtering.vue.d.ts +20 -19
- package/es/components/advanced-filtering/src/advanced-filtering.vue2.mjs +4 -3
- package/es/components/advanced-filtering/src/advanced-filtering.vue2.mjs.map +1 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +11 -6
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs +64 -11
- package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs.map +1 -1
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs +33 -61
- package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.mjs.map +1 -1
- package/es/components/api-component/index.d.ts +8 -8
- package/es/components/api-component/src/api-component.vue.d.ts +8 -8
- package/es/components/api-component/src/components/body-component.vue.d.ts +4 -4
- package/es/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
- package/es/components/api-component/src/components/params-table.vue.d.ts +4 -4
- package/es/components/code-editor/index.d.ts +2 -2
- package/es/components/code-editor/src/code-editor.vue.d.ts +2 -2
- package/es/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
- package/es/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
- package/es/components/easy-cron/index.d.ts +5 -5
- package/es/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
- package/es/components/form/src/form.vue2.mjs +12 -0
- package/es/components/form/src/form.vue2.mjs.map +1 -1
- package/es/components/index.mjs +1 -1
- package/es/components/input/index.d.ts +31 -31
- package/es/components/input/src/input.vue.d.ts +31 -31
- package/es/components/number-range/index.d.ts +13 -13
- package/es/components/number-range/src/number-range.d.ts +4 -4
- package/es/components/number-range/src/number-range.mjs +1 -1
- package/es/components/number-range/src/number-range.mjs.map +1 -1
- package/es/components/number-range/src/number-range.vue.d.ts +13 -14
- package/es/components/number-range/src/number-range.vue2.mjs +14 -7
- package/es/components/number-range/src/number-range.vue2.mjs.map +1 -1
- package/es/components/select-group/index.d.ts +1 -1
- package/es/components/select-group/src/select-group.vue.d.ts +1 -1
- package/es/components/textarea/index.d.ts +5 -5
- package/es/components/textarea/src/textarea.vue.d.ts +5 -5
- package/es/index.mjs +1 -1
- package/index.full.js +196 -83
- package/index.full.min.js +17 -17
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +17 -17
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +193 -85
- package/lib/components/advanced-filtering/index.d.ts +36 -34
- package/lib/components/advanced-filtering/index.js +5 -0
- package/lib/components/advanced-filtering/index.js.map +1 -1
- package/lib/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
- package/lib/components/advanced-filtering/src/advanced-filtering.js +64 -1
- package/lib/components/advanced-filtering/src/advanced-filtering.js.map +1 -1
- package/lib/components/advanced-filtering/src/advanced-filtering.vue.d.ts +20 -19
- package/lib/components/advanced-filtering/src/advanced-filtering.vue2.js +3 -2
- package/lib/components/advanced-filtering/src/advanced-filtering.vue2.js.map +1 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +11 -6
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js +62 -9
- package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js.map +1 -1
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js +33 -61
- package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue2.js.map +1 -1
- package/lib/components/api-component/index.d.ts +8 -8
- package/lib/components/api-component/src/api-component.vue.d.ts +8 -8
- package/lib/components/api-component/src/components/body-component.vue.d.ts +4 -4
- package/lib/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
- package/lib/components/api-component/src/components/params-table.vue.d.ts +4 -4
- package/lib/components/code-editor/index.d.ts +2 -2
- package/lib/components/code-editor/src/code-editor.vue.d.ts +2 -2
- package/lib/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
- package/lib/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
- package/lib/components/easy-cron/index.d.ts +5 -5
- package/lib/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
- package/lib/components/form/src/form.vue2.js +12 -0
- package/lib/components/form/src/form.vue2.js.map +1 -1
- package/lib/components/index.js +5 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/input/index.d.ts +31 -31
- package/lib/components/input/src/input.vue.d.ts +31 -31
- package/lib/components/number-range/index.d.ts +13 -13
- package/lib/components/number-range/src/number-range.d.ts +4 -4
- package/lib/components/number-range/src/number-range.js +1 -1
- package/lib/components/number-range/src/number-range.js.map +1 -1
- package/lib/components/number-range/src/number-range.vue.d.ts +13 -14
- package/lib/components/number-range/src/number-range.vue2.js +14 -7
- package/lib/components/number-range/src/number-range.vue2.js.map +1 -1
- package/lib/components/select-group/index.d.ts +1 -1
- package/lib/components/select-group/src/select-group.vue.d.ts +1 -1
- package/lib/components/textarea/index.d.ts +5 -5
- package/lib/components/textarea/src/textarea.vue.d.ts +5 -5
- package/lib/index.js +5 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/theme-chalk/css/index.css +1 -1
- package/theme-chalk/css/operate-icon.css +1 -1
- package/types/packages/components/advanced-filtering/index.d.ts +36 -34
- package/types/packages/components/advanced-filtering/src/advanced-filtering.d.ts +15 -2
- package/types/packages/components/advanced-filtering/src/advanced-filtering.vue.d.ts +20 -19
- package/types/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +11 -6
- package/types/packages/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +5 -9
- package/types/packages/components/api-component/index.d.ts +8 -8
- package/types/packages/components/api-component/src/api-component.vue.d.ts +8 -8
- package/types/packages/components/api-component/src/components/body-component.vue.d.ts +4 -4
- package/types/packages/components/api-component/src/components/params-table-row.vue.d.ts +2 -2
- package/types/packages/components/api-component/src/components/params-table.vue.d.ts +4 -4
- package/types/packages/components/code-editor/index.d.ts +2 -2
- package/types/packages/components/code-editor/src/code-editor.vue.d.ts +2 -2
- package/types/packages/components/drawer/src/components/second-confirmation/index.d.ts +2 -2
- package/types/packages/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +2 -2
- package/types/packages/components/easy-cron/index.d.ts +5 -5
- package/types/packages/components/easy-cron/src/easy-cron.vue.d.ts +5 -5
- package/types/packages/components/input/index.d.ts +31 -31
- package/types/packages/components/input/src/input.vue.d.ts +31 -31
- package/types/packages/components/number-range/index.d.ts +13 -13
- package/types/packages/components/number-range/src/number-range.d.ts +4 -4
- package/types/packages/components/number-range/src/number-range.vue.d.ts +13 -14
- package/types/packages/components/select-group/index.d.ts +1 -1
- package/types/packages/components/select-group/src/select-group.vue.d.ts +1 -1
- package/types/packages/components/textarea/index.d.ts +5 -5
- package/types/packages/components/textarea/src/textarea.vue.d.ts +5 -5
package/index.full.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import require$$0, { warn, defineComponent, ref, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createVNode, createElementVNode, createElementBlock, createTextVNode, createCommentVNode, watchEffect, Fragment, renderList, toDisplayString, withModifiers, inject,
|
|
1
|
+
import require$$0, { warn, defineComponent, ref, computed, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createVNode, createElementVNode, mergeProps, createElementBlock, createTextVNode, createCommentVNode, watchEffect, Fragment, renderList, toDisplayString, withModifiers, inject, useAttrs, withDirectives, vShow, normalizeStyle, provide, normalizeProps, guardReactiveProps, renderSlot, createSlots, onBeforeUnmount, onMounted, createApp, nextTick, reactive, resolveDynamicComponent, getCurrentInstance, h, isRef, toRef, onUnmounted, toRefs } from 'vue';
|
|
2
2
|
import { Form as Form$1, Button as Button$1, Cascader as Cascader$1, Checkbox as Checkbox$1, Row, Col, DatePicker as DatePicker$1, RangePicker, theme, Drawer as Drawer$1, InputNumber as InputNumber$1, RadioGroup as RadioGroup$1, Radio as Radio$1, CheckboxGroup as CheckboxGroup$1, Select as Select$1, Tabs, TabPane, InputSearch, FormItem as FormItem$1, Input as Input$1, Modal as Modal$1, RadioButton as RadioButton$1, Segmented as Segmented$1, SelectOption as SelectOption$1, SelectOptGroup as SelectOptGroup$1, Steps as Steps$1, Switch as Switch$1, Popover, Textarea as Textarea$1, TimePicker as TimePicker$1, TimeRangePicker, Tree as Tree$1, message } from 'ant-design-vue';
|
|
3
3
|
import * as monaco from 'monaco-editor';
|
|
4
4
|
import require$$1$1 from 'fs';
|
|
@@ -744,6 +744,7 @@ var stringToPath = memoizeCapped(function(string) {
|
|
|
744
744
|
});
|
|
745
745
|
return result;
|
|
746
746
|
});
|
|
747
|
+
var stringToPath$1 = stringToPath;
|
|
747
748
|
|
|
748
749
|
function toString(value) {
|
|
749
750
|
return value == null ? "" : baseToString(value);
|
|
@@ -753,7 +754,7 @@ function castPath(value, object) {
|
|
|
753
754
|
if (isArray$1(value)) {
|
|
754
755
|
return value;
|
|
755
756
|
}
|
|
756
|
-
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
757
|
+
return isKey(value, object) ? [value] : stringToPath$1(toString(value));
|
|
757
758
|
}
|
|
758
759
|
|
|
759
760
|
var INFINITY = 1 / 0;
|
|
@@ -1135,9 +1136,9 @@ function baseIsSet(value) {
|
|
|
1135
1136
|
var nodeIsSet = nodeUtil && nodeUtil.isSet;
|
|
1136
1137
|
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
|
|
1137
1138
|
|
|
1138
|
-
var CLONE_DEEP_FLAG$
|
|
1139
|
+
var CLONE_DEEP_FLAG$2 = 1;
|
|
1139
1140
|
var CLONE_FLAT_FLAG$1 = 2;
|
|
1140
|
-
var CLONE_SYMBOLS_FLAG$
|
|
1141
|
+
var CLONE_SYMBOLS_FLAG$2 = 4;
|
|
1141
1142
|
var argsTag = "[object Arguments]";
|
|
1142
1143
|
var arrayTag = "[object Array]";
|
|
1143
1144
|
var boolTag$1 = "[object Boolean]";
|
|
@@ -1168,7 +1169,7 @@ var cloneableTags = {};
|
|
|
1168
1169
|
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag$1] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag$1] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag$1] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
|
1169
1170
|
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
|
|
1170
1171
|
function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
1171
|
-
var result, isDeep = bitmask & CLONE_DEEP_FLAG$
|
|
1172
|
+
var result, isDeep = bitmask & CLONE_DEEP_FLAG$2, isFlat = bitmask & CLONE_FLAT_FLAG$1, isFull = bitmask & CLONE_SYMBOLS_FLAG$2;
|
|
1172
1173
|
if (customizer) {
|
|
1173
1174
|
result = object ? customizer(value, key, object, stack) : customizer(value);
|
|
1174
1175
|
}
|
|
@@ -1228,6 +1229,12 @@ function baseClone(value, bitmask, customizer, key, object, stack) {
|
|
|
1228
1229
|
return result;
|
|
1229
1230
|
}
|
|
1230
1231
|
|
|
1232
|
+
var CLONE_DEEP_FLAG$1 = 1;
|
|
1233
|
+
var CLONE_SYMBOLS_FLAG$1 = 4;
|
|
1234
|
+
function cloneDeep(value) {
|
|
1235
|
+
return baseClone(value, CLONE_DEEP_FLAG$1 | CLONE_SYMBOLS_FLAG$1);
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1231
1238
|
function hasPath(object, path, hasFunc) {
|
|
1232
1239
|
path = castPath(path, object);
|
|
1233
1240
|
var index = -1, length = path.length, result = false;
|
|
@@ -1519,6 +1526,62 @@ function formatFileSize(size) {
|
|
|
1519
1526
|
}
|
|
1520
1527
|
}
|
|
1521
1528
|
|
|
1529
|
+
const ALL_VALUE = "_ALL";
|
|
1530
|
+
const initValue = (column, values) => {
|
|
1531
|
+
let value = has(values, column.key) ? values[column.key] : null;
|
|
1532
|
+
if (has(column, "options") && !column.unUseDefaultOption) {
|
|
1533
|
+
if (column.type === "checkbox-group" || has(column, "mode")) {
|
|
1534
|
+
value = isEmpty(value) || isNil(value) ? [ALL_VALUE] : value;
|
|
1535
|
+
} else {
|
|
1536
|
+
value = isNil(value) ? ALL_VALUE : value;
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
return value;
|
|
1540
|
+
};
|
|
1541
|
+
const filterAllValue = (values) => {
|
|
1542
|
+
let value = null;
|
|
1543
|
+
if (Array.isArray(values)) {
|
|
1544
|
+
value = values.filter((item) => item !== ALL_VALUE);
|
|
1545
|
+
} else {
|
|
1546
|
+
value = values === ALL_VALUE ? null : values;
|
|
1547
|
+
}
|
|
1548
|
+
return value;
|
|
1549
|
+
};
|
|
1550
|
+
const treeDataFormat = (arr = [], fieldNames) => {
|
|
1551
|
+
let options = [];
|
|
1552
|
+
if (!arr)
|
|
1553
|
+
return [];
|
|
1554
|
+
options = arr.map((e) => {
|
|
1555
|
+
const obj = {};
|
|
1556
|
+
obj.label = e[fieldNames.label];
|
|
1557
|
+
obj.value = e[fieldNames.value];
|
|
1558
|
+
if (e[fieldNames.children] && e[fieldNames.children].length) {
|
|
1559
|
+
obj.children = treeDataFormat(e[fieldNames.children], fieldNames);
|
|
1560
|
+
}
|
|
1561
|
+
return obj;
|
|
1562
|
+
});
|
|
1563
|
+
return options;
|
|
1564
|
+
};
|
|
1565
|
+
const findLabelByValue = (tree, value) => {
|
|
1566
|
+
function _findLabel(nodes) {
|
|
1567
|
+
const labels = [];
|
|
1568
|
+
if (!nodes)
|
|
1569
|
+
return [];
|
|
1570
|
+
for (const node of nodes) {
|
|
1571
|
+
if (node.value === value) {
|
|
1572
|
+
labels.push(node.label);
|
|
1573
|
+
}
|
|
1574
|
+
if (node.children && node.children.length > 0) {
|
|
1575
|
+
const childLabels = _findLabel(node.children);
|
|
1576
|
+
if (childLabels) {
|
|
1577
|
+
labels.push(...childLabels);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
return labels.length > 0 ? labels : [];
|
|
1582
|
+
}
|
|
1583
|
+
return _findLabel(tree).join(",");
|
|
1584
|
+
};
|
|
1522
1585
|
const advancedFilteringProps = buildProps({
|
|
1523
1586
|
filterColumns: {
|
|
1524
1587
|
type: definePropType(Array),
|
|
@@ -1564,7 +1627,8 @@ const advancedFilteringEmits = {
|
|
|
1564
1627
|
const advancedFilteringParamsEmits = {
|
|
1565
1628
|
close: () => true,
|
|
1566
1629
|
confirm: () => true,
|
|
1567
|
-
changeValue: (value) => !!value
|
|
1630
|
+
changeValue: (value) => !!value,
|
|
1631
|
+
"update:value": (value) => !!value
|
|
1568
1632
|
};
|
|
1569
1633
|
const advancedFilteringTagsEmits = {
|
|
1570
1634
|
change: (value) => !!value,
|
|
@@ -1590,7 +1654,25 @@ var _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
1590
1654
|
const props = __props;
|
|
1591
1655
|
const emits = __emit;
|
|
1592
1656
|
const bem = createNamespace("advanced-filtering-params");
|
|
1593
|
-
const
|
|
1657
|
+
const innerValue = ref({});
|
|
1658
|
+
const computeFormColumns = computed(() => {
|
|
1659
|
+
return props.filterColumns.map((column) => {
|
|
1660
|
+
if (has(column, "options")) {
|
|
1661
|
+
if (column.options.length && column.options[0].value === ALL_VALUE || column.unUseDefaultOption) {
|
|
1662
|
+
console.log({ column });
|
|
1663
|
+
return column;
|
|
1664
|
+
}
|
|
1665
|
+
column.options = [
|
|
1666
|
+
{
|
|
1667
|
+
label: column?.defaultOptionLabel ?? "\u5168\u90E8",
|
|
1668
|
+
value: ALL_VALUE
|
|
1669
|
+
},
|
|
1670
|
+
...column.options
|
|
1671
|
+
];
|
|
1672
|
+
}
|
|
1673
|
+
return column;
|
|
1674
|
+
});
|
|
1675
|
+
});
|
|
1594
1676
|
const handleClose = () => {
|
|
1595
1677
|
emits("close");
|
|
1596
1678
|
};
|
|
@@ -1598,12 +1680,47 @@ var _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
1598
1680
|
emits("confirm");
|
|
1599
1681
|
};
|
|
1600
1682
|
const handleChange = (val) => {
|
|
1601
|
-
|
|
1683
|
+
setData(val);
|
|
1684
|
+
};
|
|
1685
|
+
const setData = (val) => {
|
|
1686
|
+
const value = cloneDeep(val);
|
|
1687
|
+
const obj = {};
|
|
1688
|
+
for (const i in value) {
|
|
1689
|
+
obj[i] = filterAllValue(value[i]);
|
|
1690
|
+
}
|
|
1691
|
+
emits("update:value", obj);
|
|
1692
|
+
emits("changeValue", obj);
|
|
1602
1693
|
};
|
|
1603
1694
|
watch(
|
|
1604
1695
|
() => props.value,
|
|
1605
|
-
() => {
|
|
1606
|
-
|
|
1696
|
+
(val) => {
|
|
1697
|
+
const value = cloneDeep(val);
|
|
1698
|
+
const cloneInnerValue = cloneDeep(innerValue.value);
|
|
1699
|
+
const obj = {};
|
|
1700
|
+
computeFormColumns.value.forEach((item) => {
|
|
1701
|
+
obj[item.key] = initValue(item, value);
|
|
1702
|
+
});
|
|
1703
|
+
const comparedObj = {};
|
|
1704
|
+
computeFormColumns.value.forEach((item) => {
|
|
1705
|
+
comparedObj[item.key] = initValue(item, cloneInnerValue);
|
|
1706
|
+
});
|
|
1707
|
+
if (JSON.stringify(obj) !== JSON.stringify(comparedObj)) {
|
|
1708
|
+
innerValue.value = cloneDeep(obj);
|
|
1709
|
+
}
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
deep: true,
|
|
1713
|
+
immediate: true
|
|
1714
|
+
}
|
|
1715
|
+
);
|
|
1716
|
+
watch(
|
|
1717
|
+
() => innerValue.value,
|
|
1718
|
+
(val) => {
|
|
1719
|
+
setData(val);
|
|
1720
|
+
},
|
|
1721
|
+
{
|
|
1722
|
+
deep: true,
|
|
1723
|
+
immediate: true
|
|
1607
1724
|
}
|
|
1608
1725
|
);
|
|
1609
1726
|
return (_ctx, _cache) => {
|
|
@@ -1632,13 +1749,12 @@ var _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
1632
1749
|
class: normalizeClass(unref(bem).m("content"))
|
|
1633
1750
|
},
|
|
1634
1751
|
[
|
|
1635
|
-
props.filterColumns.length > 0 ? (openBlock(), createBlock(unref(LlForm), {
|
|
1636
|
-
|
|
1637
|
-
"form-columns": props.filterColumns,
|
|
1752
|
+
props.filterColumns.length > 0 ? (openBlock(), createBlock(unref(LlForm), mergeProps({ key: 0 }, _ctx.$attrs, {
|
|
1753
|
+
"form-columns": computeFormColumns.value,
|
|
1638
1754
|
"form-options": props.formOptions,
|
|
1639
|
-
"form-data":
|
|
1755
|
+
"form-data": innerValue.value,
|
|
1640
1756
|
onChange: handleChange
|
|
1641
|
-
}, null,
|
|
1757
|
+
}), null, 16, ["form-columns", "form-options", "form-data"])) : (openBlock(), createElementBlock(
|
|
1642
1758
|
"div",
|
|
1643
1759
|
{
|
|
1644
1760
|
key: 1,
|
|
@@ -2068,45 +2184,11 @@ var _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
2068
2184
|
emits("update:value", obj);
|
|
2069
2185
|
emits("change", obj);
|
|
2070
2186
|
};
|
|
2071
|
-
const
|
|
2072
|
-
let options = [];
|
|
2073
|
-
if (!arr)
|
|
2074
|
-
return [];
|
|
2075
|
-
options = arr.map((e) => {
|
|
2076
|
-
const obj = {};
|
|
2077
|
-
obj.label = e[fieldNames.label];
|
|
2078
|
-
obj.value = e[fieldNames.value];
|
|
2079
|
-
if (e[fieldNames.children] && e[fieldNames.children].length) {
|
|
2080
|
-
obj.children = treeDataFormat(e[fieldNames.children], fieldNames);
|
|
2081
|
-
}
|
|
2082
|
-
return obj;
|
|
2083
|
-
});
|
|
2084
|
-
return options;
|
|
2085
|
-
};
|
|
2086
|
-
const findLabelByValue = (tree, value) => {
|
|
2087
|
-
function _findLabel(nodes) {
|
|
2088
|
-
const labels = [];
|
|
2089
|
-
if (!nodes)
|
|
2090
|
-
return [];
|
|
2091
|
-
for (const node of nodes) {
|
|
2092
|
-
if (node.value === value) {
|
|
2093
|
-
labels.push(node.label);
|
|
2094
|
-
}
|
|
2095
|
-
if (node.children && node.children.length > 0) {
|
|
2096
|
-
const childLabels = _findLabel(node.children);
|
|
2097
|
-
if (childLabels) {
|
|
2098
|
-
labels.push(...childLabels);
|
|
2099
|
-
}
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
return labels.length > 0 ? labels : [];
|
|
2103
|
-
}
|
|
2104
|
-
return _findLabel(tree).join(",");
|
|
2105
|
-
};
|
|
2106
|
-
const getTags = (filterColumns, value) => {
|
|
2187
|
+
const getTags = (filterColumns, values) => {
|
|
2107
2188
|
const arr = [];
|
|
2108
2189
|
filterColumns.map((item) => {
|
|
2109
|
-
|
|
2190
|
+
const value = filterAllValue(values[item.key]);
|
|
2191
|
+
if (!isNil(value)) {
|
|
2110
2192
|
let tagValue = "";
|
|
2111
2193
|
if (item?.options) {
|
|
2112
2194
|
let options = [];
|
|
@@ -2115,47 +2197,53 @@ var _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
2115
2197
|
} else {
|
|
2116
2198
|
options = item.options;
|
|
2117
2199
|
}
|
|
2118
|
-
if (Array.isArray(value
|
|
2200
|
+
if (Array.isArray(value)) {
|
|
2119
2201
|
let tagArr = [];
|
|
2120
|
-
tagArr = value
|
|
2202
|
+
tagArr = value.map((val) => {
|
|
2121
2203
|
return findLabelByValue(options, val);
|
|
2122
2204
|
});
|
|
2123
2205
|
tagValue = tagArr.join(",");
|
|
2124
2206
|
} else {
|
|
2125
|
-
tagValue = findLabelByValue(options, value
|
|
2207
|
+
tagValue = findLabelByValue(options, value);
|
|
2126
2208
|
}
|
|
2127
2209
|
} else {
|
|
2128
|
-
tagValue = value
|
|
2210
|
+
tagValue = value;
|
|
2129
2211
|
}
|
|
2130
2212
|
if (item.type === "date-picker") {
|
|
2131
|
-
tagValue = dayjs(value
|
|
2213
|
+
tagValue = dayjs(value).format(item?.format ?? "YYYY-MM-DD");
|
|
2132
2214
|
}
|
|
2133
2215
|
if (item.type === "time-picker") {
|
|
2134
|
-
tagValue = dayjs(value
|
|
2135
|
-
item?.format ?? "YYYY/MM/DD hh:mm:ss"
|
|
2136
|
-
);
|
|
2216
|
+
tagValue = dayjs(value).format(item?.format ?? "YYYY/MM/DD hh:mm:ss");
|
|
2137
2217
|
}
|
|
2138
2218
|
if (item.type === "date-range") {
|
|
2139
|
-
tagValue = `${dayjs(value[
|
|
2219
|
+
tagValue = `${dayjs(value[0]).format(
|
|
2140
2220
|
item?.format ?? "YYYY-MM-DD"
|
|
2141
|
-
)}-${dayjs(value[
|
|
2221
|
+
)}-${dayjs(value[1]).format(item?.format ?? "YYYY-MM-DD")}`;
|
|
2142
2222
|
}
|
|
2143
2223
|
if (item.type === "number-range") {
|
|
2144
|
-
tagValue = `${value[
|
|
2224
|
+
tagValue = `${value[0]}${value[1] ? `-${value[1]}` : ""}`;
|
|
2145
2225
|
}
|
|
2146
|
-
if (item.type === "time-
|
|
2147
|
-
tagValue = `${dayjs(value[
|
|
2226
|
+
if (item.type === "time-range") {
|
|
2227
|
+
tagValue = `${dayjs(value[0]).format(
|
|
2148
2228
|
item?.format ?? "YYYY/MM/DD HH:mm:ss"
|
|
2149
|
-
)}-${dayjs(value[
|
|
2150
|
-
|
|
2151
|
-
|
|
2229
|
+
)}-${dayjs(value[1]).format(item?.format ?? "YYYY/MM/DD HH:mm:ss")}`;
|
|
2230
|
+
}
|
|
2231
|
+
if (item.type === "switch") {
|
|
2232
|
+
if (has(item, "checkedChildren") && has(item, "checkedValue") && has(item, "unCheckedChildren") && has(item, "unCheckedValue")) {
|
|
2233
|
+
tagValue = value === item.checkedValue ? item.checkedChildren : item.unCheckedChildren;
|
|
2234
|
+
}
|
|
2235
|
+
if (has(item, "checkedChildren") && !has(item, "checkedValue")) {
|
|
2236
|
+
tagValue = value ? item.checkedChildren : false;
|
|
2237
|
+
}
|
|
2238
|
+
}
|
|
2239
|
+
if (tagValue) {
|
|
2240
|
+
arr.push({
|
|
2241
|
+
label: item.label || "",
|
|
2242
|
+
key: item.key,
|
|
2243
|
+
value,
|
|
2244
|
+
showValue: tagValue
|
|
2245
|
+
});
|
|
2152
2246
|
}
|
|
2153
|
-
arr.push({
|
|
2154
|
-
label: item.label || "",
|
|
2155
|
-
key: item.key,
|
|
2156
|
-
value: value[item.key],
|
|
2157
|
-
showValue: tagValue
|
|
2158
|
-
});
|
|
2159
2247
|
}
|
|
2160
2248
|
});
|
|
2161
2249
|
return arr;
|
|
@@ -2299,8 +2387,9 @@ var _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
2299
2387
|
watch(
|
|
2300
2388
|
filterValue,
|
|
2301
2389
|
(n) => {
|
|
2302
|
-
|
|
2303
|
-
emits("
|
|
2390
|
+
const value = filterAllValue(n);
|
|
2391
|
+
emits("update:value", value);
|
|
2392
|
+
emits("change", value);
|
|
2304
2393
|
},
|
|
2305
2394
|
{
|
|
2306
2395
|
deep: true
|
|
@@ -57251,6 +57340,18 @@ var _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
57251
57340
|
deep: true
|
|
57252
57341
|
}
|
|
57253
57342
|
);
|
|
57343
|
+
watch(
|
|
57344
|
+
() => props.formData,
|
|
57345
|
+
async (val) => {
|
|
57346
|
+
for (const i in val) {
|
|
57347
|
+
formData[i] = val[i];
|
|
57348
|
+
}
|
|
57349
|
+
},
|
|
57350
|
+
{
|
|
57351
|
+
deep: true,
|
|
57352
|
+
immediate: true
|
|
57353
|
+
}
|
|
57354
|
+
);
|
|
57254
57355
|
__expose({
|
|
57255
57356
|
validate,
|
|
57256
57357
|
resetFields
|
|
@@ -59190,7 +59291,7 @@ const LlModal = withInstall(Modal);
|
|
|
59190
59291
|
|
|
59191
59292
|
const numberRangeProps = buildProps({
|
|
59192
59293
|
value: {
|
|
59193
|
-
type: definePropType(Array),
|
|
59294
|
+
type: definePropType([Array, null]),
|
|
59194
59295
|
default: () => []
|
|
59195
59296
|
},
|
|
59196
59297
|
min: Number,
|
|
@@ -59221,18 +59322,18 @@ var _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
59221
59322
|
const props = __props;
|
|
59222
59323
|
const emits = __emit;
|
|
59223
59324
|
const bem = createNamespace("number-range");
|
|
59224
|
-
const minValue = ref(
|
|
59225
|
-
const maxValue = ref(
|
|
59325
|
+
const minValue = ref(void 0);
|
|
59326
|
+
const maxValue = ref(void 0);
|
|
59226
59327
|
const setValue = () => {
|
|
59227
59328
|
const arr = [minValue.value, maxValue.value];
|
|
59228
|
-
emits("change", arr);
|
|
59229
59329
|
emits("update:value", arr);
|
|
59330
|
+
emits("change", arr);
|
|
59230
59331
|
};
|
|
59231
59332
|
const handleMinChange = (e) => {
|
|
59232
59333
|
if (!!e || e.value === 0) {
|
|
59233
59334
|
minValue.value = e;
|
|
59234
59335
|
} else {
|
|
59235
|
-
minValue.value =
|
|
59336
|
+
minValue.value = void 0;
|
|
59236
59337
|
}
|
|
59237
59338
|
setValue();
|
|
59238
59339
|
};
|
|
@@ -59240,7 +59341,7 @@ var _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
59240
59341
|
if (!!e || e.value === 0) {
|
|
59241
59342
|
maxValue.value = e;
|
|
59242
59343
|
} else {
|
|
59243
|
-
minValue.value =
|
|
59344
|
+
minValue.value = void 0;
|
|
59244
59345
|
}
|
|
59245
59346
|
setValue();
|
|
59246
59347
|
};
|
|
@@ -59267,14 +59368,21 @@ var _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
59267
59368
|
if (n[0] || n[0] === 0) {
|
|
59268
59369
|
minValue.value = n[0];
|
|
59269
59370
|
} else {
|
|
59270
|
-
minValue.value =
|
|
59371
|
+
minValue.value = void 0;
|
|
59271
59372
|
}
|
|
59272
59373
|
if (n[1] || n[1] === 0) {
|
|
59273
59374
|
maxValue.value = n[1];
|
|
59274
59375
|
} else {
|
|
59275
|
-
maxValue.value =
|
|
59376
|
+
maxValue.value = void 0;
|
|
59276
59377
|
}
|
|
59378
|
+
} else {
|
|
59379
|
+
minValue.value = void 0;
|
|
59380
|
+
maxValue.value = void 0;
|
|
59277
59381
|
}
|
|
59382
|
+
},
|
|
59383
|
+
{
|
|
59384
|
+
immediate: true,
|
|
59385
|
+
deep: true
|
|
59278
59386
|
}
|
|
59279
59387
|
);
|
|
59280
59388
|
return (_ctx, _cache) => {
|
|
@@ -77300,4 +77408,4 @@ var installer = makeInstaller([...Components]);
|
|
|
77300
77408
|
|
|
77301
77409
|
const install = installer.install;
|
|
77302
77410
|
|
|
77303
|
-
export { DEFAULT_METHOD, DEFAULT_TYPE, HEADER_SRARCH_HEIGHT, ILlUploadDragProps, ImenuSwitchType, LEFT_SELECT_MIN_WIDTH, LlAdvancedFiltering, LlAdvancedFilteringParams, LlAdvancedFilteringTags, LlApiComponent, LlAvatar, LlButton, LlCascader, LlCheckbox, LlCheckboxGroup, LlCodeEditor, LlConfigProvider, LlDatePicker, LlDateRange, LlDescriptions, LlDescriptionsItem, LlDrawer, LlDropdown, LlDropdownButton, LlEasyCron, LlEmpty, LlForm, LlFormComponent, LlFormItem, LlIcon, LlIconBase, LlIconPicker, LlInput, LlInputNumber, LlKeyValue, LlModal, LlNumberRange, LlOperateIcon, LlOperateTree, LlRadio, LlRadioButton, LlRadioGroup, LlSecondConfirmation, LlSegmented, LlSelect, LlSelectGroup, LlSelectOptGroup, LlSelectOption, LlSpace, LlSteps, LlSwitch, LlTable, LlTabsSimple, LlTagGroup, LlTextarea, LlTimePicker, LlTimeRange, LlTooltip, LlTree, LlTreeSearch, LlUploadDrag, LlUploadImage, LlUriInput, OperateTreeEmits, PAGINATION_HEIGHT, TypeEnum, advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits, apiComponentEmits, apiComponentProps, apiModalEmits, apiModalProps, apiUrlEmits, apiUrlProps, avatarEmits, avatarProps, avatarType, batchEditingEmits, batchEditingOptions, batchEditingProps, bodyEmits, bodyList, bodyProps, buttonProps, checkboxGroupProps, checkboxProps, checkedType, clickInputEmits, clickInputProps, codeEditorEmits, codeEditorProps, codeThemeList, contentTypeOptions, customOverlay, dateUtil, installer as default, defaultOptions, descriptionsItemProps, descriptionsProps, drawerEmits, drawerOptions, drawerProps, dropdownButtonEmits, dropdownButtonProps, dropdownEmits, dropdownProps, easyCronEmits, easyCronProps, emptyProps, formColumns, formComponentProps, formEmits, formOptions, formProps, formatToDate, formatToDateTime, formdataTableColumns, getHttpMethodUri, getKeyValueItem, headersTableColumns, httpUriOptions, iconBaseProps, iconPickerModalEmits, iconPickerModalProps, iconPickerProps, iconPickerSearchEmits, iconPickerSearchProps, iconProps, iconTypes, inputNumberEmits, inputNumberProps, inputProps, install, jsonTableColumns, jsonXmlEmits, jsonXmlOptions, jsonXmlProps, jsonXmlTableEmits, jsonXmlTableProps, jsonXmlTableRowEmits, jsonXmlTableRowProps, jsonXmlTypeOptions, keyValueEmits, keyValueItemEmits, keyValueItemProps, keyValueProps, mainTableEmits, mainTableProps, menuSwitchRadioList, methods, modalEmits, modalProps, numberRangeEmits, numberRangeProps, operateIconEmits, operateIconProps, operateTreeEmits, operateTreeProps, paramsOptions, paramsTableColumns, paramsTableEmits, paramsTableProps, paramsTableRowProps, placement, requestList, secondConfirmationProps, selectGroupData, selectGroupEmits, selectGroupFormType, selectGroupProps, selectOptGroupProps, selectOptionProps, tableContentType, tableHeaderSearchEmits, tableHeaderSearchProps, tablePaginationProps, tableProps, tabsSimpleEmits, tabsSimpleProps, tagGroupEmits, tagGroupProps, tooltipProps, treeEmits, treeProps, treeSearchEmits, treeSearchEmits1, treeSearchOperateWayType, treeSearchProps, treeSelectDirectoryTitleEmits, treeSelectDirectoryTitleProps, treeSelectHeaderSearchEmits, treeSelectHeaderSearchProps, typeRules, uploadImageEmits, uploadImageProps, uriInputEmits, uriInputProps, url, useSecondConfirmation, useTabEmits, useTabProps, useTabSetup };
|
|
77411
|
+
export { ALL_VALUE, DEFAULT_METHOD, DEFAULT_TYPE, HEADER_SRARCH_HEIGHT, ILlUploadDragProps, ImenuSwitchType, LEFT_SELECT_MIN_WIDTH, LlAdvancedFiltering, LlAdvancedFilteringParams, LlAdvancedFilteringTags, LlApiComponent, LlAvatar, LlButton, LlCascader, LlCheckbox, LlCheckboxGroup, LlCodeEditor, LlConfigProvider, LlDatePicker, LlDateRange, LlDescriptions, LlDescriptionsItem, LlDrawer, LlDropdown, LlDropdownButton, LlEasyCron, LlEmpty, LlForm, LlFormComponent, LlFormItem, LlIcon, LlIconBase, LlIconPicker, LlInput, LlInputNumber, LlKeyValue, LlModal, LlNumberRange, LlOperateIcon, LlOperateTree, LlRadio, LlRadioButton, LlRadioGroup, LlSecondConfirmation, LlSegmented, LlSelect, LlSelectGroup, LlSelectOptGroup, LlSelectOption, LlSpace, LlSteps, LlSwitch, LlTable, LlTabsSimple, LlTagGroup, LlTextarea, LlTimePicker, LlTimeRange, LlTooltip, LlTree, LlTreeSearch, LlUploadDrag, LlUploadImage, LlUriInput, OperateTreeEmits, PAGINATION_HEIGHT, TypeEnum, advancedFilteringEmits, advancedFilteringParamsEmits, advancedFilteringParamsProps, advancedFilteringProps, advancedFilteringTagsEmits, apiComponentEmits, apiComponentProps, apiModalEmits, apiModalProps, apiUrlEmits, apiUrlProps, avatarEmits, avatarProps, avatarType, batchEditingEmits, batchEditingOptions, batchEditingProps, bodyEmits, bodyList, bodyProps, buttonProps, checkboxGroupProps, checkboxProps, checkedType, clickInputEmits, clickInputProps, codeEditorEmits, codeEditorProps, codeThemeList, contentTypeOptions, customOverlay, dateUtil, installer as default, defaultOptions, descriptionsItemProps, descriptionsProps, drawerEmits, drawerOptions, drawerProps, dropdownButtonEmits, dropdownButtonProps, dropdownEmits, dropdownProps, easyCronEmits, easyCronProps, emptyProps, filterAllValue, findLabelByValue, formColumns, formComponentProps, formEmits, formOptions, formProps, formatToDate, formatToDateTime, formdataTableColumns, getHttpMethodUri, getKeyValueItem, headersTableColumns, httpUriOptions, iconBaseProps, iconPickerModalEmits, iconPickerModalProps, iconPickerProps, iconPickerSearchEmits, iconPickerSearchProps, iconProps, iconTypes, initValue, inputNumberEmits, inputNumberProps, inputProps, install, jsonTableColumns, jsonXmlEmits, jsonXmlOptions, jsonXmlProps, jsonXmlTableEmits, jsonXmlTableProps, jsonXmlTableRowEmits, jsonXmlTableRowProps, jsonXmlTypeOptions, keyValueEmits, keyValueItemEmits, keyValueItemProps, keyValueProps, mainTableEmits, mainTableProps, menuSwitchRadioList, methods, modalEmits, modalProps, numberRangeEmits, numberRangeProps, operateIconEmits, operateIconProps, operateTreeEmits, operateTreeProps, paramsOptions, paramsTableColumns, paramsTableEmits, paramsTableProps, paramsTableRowProps, placement, requestList, secondConfirmationProps, selectGroupData, selectGroupEmits, selectGroupFormType, selectGroupProps, selectOptGroupProps, selectOptionProps, tableContentType, tableHeaderSearchEmits, tableHeaderSearchProps, tablePaginationProps, tableProps, tabsSimpleEmits, tabsSimpleProps, tagGroupEmits, tagGroupProps, tooltipProps, treeDataFormat, treeEmits, treeProps, treeSearchEmits, treeSearchEmits1, treeSearchOperateWayType, treeSearchProps, treeSelectDirectoryTitleEmits, treeSelectDirectoryTitleProps, treeSelectHeaderSearchEmits, treeSelectHeaderSearchProps, typeRules, uploadImageEmits, uploadImageProps, uriInputEmits, uriInputProps, url, useSecondConfirmation, useTabEmits, useTabProps, useTabSetup };
|