@jetlinks-web/components 3.0.1-rc → 3.0.1
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/AutoComplete/AutoComplete.js +13 -9
- package/es/BadgeStatus/Badge.js +1 -2
- package/es/BadgeStatus/color.js +3 -3
- package/es/CardSelect/CardSelect.js +23 -13
- package/es/CardSelect/style/index.js +25 -1
- package/es/CheckButton/CheckButton.js +12 -4
- package/es/CheckButton/style/index.js +41 -1
- package/es/DragModal/DragModal.js +14 -8
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +13 -7
- package/es/EditTable/FormItem.js +18 -19
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +11 -5
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +23 -18
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.js +53 -0
- package/es/EditTable/style/form.js +24 -0
- package/es/EditTable/style/group.js +25 -0
- package/es/EditTable/style/header.js +58 -0
- package/es/EditTable/style/index.js +42 -1
- package/es/EditTable/style/menu.js +27 -0
- package/es/EditTable/style/table.js +46 -0
- package/es/EditTable/utils.js +30 -3
- package/es/Ellipsis/Ellipsis.js +10 -2
- package/es/Ellipsis/style/index.js +24 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +6 -7
- package/es/ProLayout/Basic/BasicLayout.js +45 -41
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +3 -7
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +21 -17
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +18 -42
- package/es/ProLayout/SiderMenu/SiderMenu.js +24 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +13 -12
- package/es/ProLayout/TopHeader/style.js +126 -0
- package/es/ProLayout/style/index.js +7 -1
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Alert.js +12 -4
- package/es/ProTable/Content.js +108 -28
- package/es/ProTable/Header.js +21 -11
- package/es/ProTable/Pagination.js +12 -4
- package/es/ProTable/ProTable.js +46 -34
- package/es/ProTable/hooks/index.js +2 -0
- package/es/ProTable/hooks/useTableInject.js +5 -0
- package/es/ProTable/hooks/useTableSelection.js +95 -0
- package/es/ProTable/setting.js +1 -1
- package/es/ProTable/style/index.js +109 -1
- package/es/RadioButton/RadioButton.js +10 -4
- package/es/RadioButton/style/index.js +23 -1
- package/es/Scrollbar/Scrollbar.js +10 -3
- package/es/Scrollbar/Thumb.js +36 -25
- package/es/Scrollbar/style/index.js +63 -1
- package/es/Search/Advanced/History.js +23 -16
- package/es/Search/Advanced/SaveHistory.js +1 -2
- package/es/Search/Advanced/index.js +212 -292
- package/es/Search/Item.js +175 -415
- package/es/Search/Search.js +78 -172
- package/es/Search/hooks/index.js +108 -1
- package/es/Search/hooks/useRouteQuery.js +57 -0
- package/es/Search/setting.js +132 -14
- package/es/Search/style/index.js +4 -2
- package/es/Search/style/item.js +28 -0
- package/es/Search/style/search.js +133 -0
- package/es/Search/util.js +116 -124
- package/es/Skeleton/components/DashBoardCard.js +19 -12
- package/es/Skeleton/components/DashBoardChart.js +48 -45
- package/es/Skeleton/components/Detail.js +27 -21
- package/es/Skeleton/components/Drawer.js +23 -14
- package/es/Skeleton/components/Item.js +9 -1
- package/es/Skeleton/components/List.js +0 -1
- package/es/Skeleton/components/ListCard.js +20 -13
- package/es/Skeleton/components/ListCardItem.js +12 -13
- package/es/Skeleton/components/ListTable.js +19 -10
- package/es/Skeleton/components/Page.js +0 -1
- package/es/Skeleton/components/Tree.js +21 -14
- package/es/Skeleton/skeleton.js +17 -8
- package/es/Skeleton/style/index.js +132 -1
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +44 -39
- package/es/components.js +1 -5
- package/es/locale/en-US.js +3 -7
- package/es/locale/zh-CN.js +3 -7
- package/es/style/index.js +0 -3
- package/es/style/styleRegister.js +21 -0
- package/es/style/variable.js +4 -0
- package/es/style.js +0 -13
- package/lib/AutoComplete/AutoComplete.js +13 -9
- package/lib/BadgeStatus/Badge.js +1 -2
- package/lib/BadgeStatus/color.js +3 -3
- package/lib/CardSelect/CardSelect.js +23 -13
- package/lib/CardSelect/style/index.js +30 -1
- package/lib/CheckButton/CheckButton.js +12 -4
- package/lib/CheckButton/style/index.js +46 -1
- package/lib/DragModal/DragModal.js +14 -8
- package/lib/DragModal/style/index.js +69 -1
- package/lib/EditTable/Body.js +10 -3
- package/lib/EditTable/EditTable.js +13 -7
- package/lib/EditTable/FormItem.js +18 -19
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +11 -5
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +23 -18
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.js +60 -0
- package/lib/EditTable/style/form.js +31 -0
- package/lib/EditTable/style/group.js +32 -0
- package/lib/EditTable/style/header.js +65 -0
- package/lib/EditTable/style/index.js +47 -1
- package/lib/EditTable/style/menu.js +33 -0
- package/lib/EditTable/style/table.js +52 -0
- package/lib/EditTable/utils.js +31 -3
- package/lib/Ellipsis/Ellipsis.js +10 -2
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/Icon/icon.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +6 -7
- package/lib/ProLayout/Basic/BasicLayout.js +45 -42
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +2 -6
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +19 -15
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +19 -42
- package/lib/ProLayout/SiderMenu/SiderMenu.js +24 -37
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +14 -12
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +12 -4
- package/lib/ProTable/Content.js +108 -28
- package/lib/ProTable/Header.js +21 -11
- package/lib/ProTable/Pagination.js +12 -4
- package/lib/ProTable/ProTable.js +46 -34
- package/lib/ProTable/hooks/index.js +27 -0
- package/lib/ProTable/hooks/useTableInject.js +11 -0
- package/lib/ProTable/hooks/useTableSelection.js +102 -0
- package/lib/ProTable/setting.js +1 -1
- package/lib/ProTable/style/index.js +114 -1
- package/lib/RadioButton/RadioButton.js +10 -4
- package/lib/RadioButton/style/index.js +28 -1
- package/lib/Scrollbar/Scrollbar.js +10 -3
- package/lib/Scrollbar/Thumb.js +36 -25
- package/lib/Scrollbar/style/index.js +68 -1
- package/lib/Search/Advanced/History.js +23 -16
- package/lib/Search/Advanced/SaveHistory.js +1 -2
- package/lib/Search/Advanced/index.js +212 -292
- package/lib/Search/Item.js +175 -415
- package/lib/Search/Search.js +78 -172
- package/lib/Search/hooks/index.js +130 -1
- package/lib/Search/hooks/useRouteQuery.js +64 -0
- package/lib/Search/setting.js +133 -15
- package/lib/Search/style/index.js +9 -2
- package/lib/Search/style/item.js +35 -0
- package/lib/Search/style/search.js +140 -0
- package/lib/Search/util.js +116 -124
- package/lib/Skeleton/components/DashBoardCard.js +19 -12
- package/lib/Skeleton/components/DashBoardChart.js +48 -45
- package/lib/Skeleton/components/Detail.js +27 -21
- package/lib/Skeleton/components/Drawer.js +23 -14
- package/lib/Skeleton/components/Item.js +9 -1
- package/lib/Skeleton/components/List.js +0 -1
- package/lib/Skeleton/components/ListCard.js +20 -13
- package/lib/Skeleton/components/ListCardItem.js +12 -13
- package/lib/Skeleton/components/ListTable.js +19 -10
- package/lib/Skeleton/components/Page.js +0 -1
- package/lib/Skeleton/components/Tree.js +21 -14
- package/lib/Skeleton/skeleton.js +17 -8
- package/lib/Skeleton/style/index.js +137 -1
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +44 -39
- package/lib/components.js +1 -30
- package/lib/index.js +1 -2
- package/lib/locale/en-US.js +3 -7
- package/lib/locale/zh-CN.js +3 -7
- package/lib/style/components.less +0 -1
- package/lib/style/index.js +1 -4
- package/lib/style/styleRegister.js +28 -0
- package/lib/style/variable.js +10 -0
- package/lib/style.js +1 -15
- package/package.json +170 -173
- package/es/AMap/Map.js +0 -133
- package/es/AMap/index.js +0 -5
- package/es/AMap/util.js +0 -56
- package/es/CardSelect/style/index.css +0 -24
- package/es/CardSelect/style/index.less +0 -26
- package/es/CheckButton/style/index.css +0 -37
- package/es/CheckButton/style/index.less +0 -40
- package/es/DragModal/style/index.css +0 -82
- package/es/DragModal/style/index.less +0 -97
- package/es/Echarts/Echarts.js +0 -48
- package/es/Echarts/index.js +0 -5
- package/es/EditTable/style/body.less +0 -66
- package/es/EditTable/style/form.less +0 -33
- package/es/EditTable/style/group.less +0 -32
- package/es/EditTable/style/header.less +0 -77
- package/es/EditTable/style/index.css +0 -267
- package/es/EditTable/style/index.less +0 -41
- package/es/EditTable/style/menu.less +0 -25
- package/es/EditTable/style/table.less +0 -47
- package/es/Ellipsis/style/index.css +0 -17
- package/es/Ellipsis/style/index.less +0 -20
- package/es/FlameGraph/FlameGraph.js +0 -136
- package/es/FlameGraph/index.js +0 -5
- package/es/FlameGraph/style/index.css +0 -43
- package/es/FlameGraph/style/index.js +0 -1
- package/es/FlameGraph/style/index.less +0 -52
- package/es/ProLayout/Basic/BasicLayout.less +0 -66
- package/es/ProLayout/Basic/Header.less +0 -8
- package/es/ProLayout/PageContainer/index.less +0 -103
- package/es/ProLayout/SiderMenu/index.less +0 -231
- package/es/ProLayout/TopHeader/index.less +0 -174
- package/es/ProLayout/style/default.less +0 -4
- package/es/ProLayout/style/style.less +0 -7
- package/es/ProTable/style/ProTable.less +0 -139
- package/es/RadioButton/style/index.css +0 -20
- package/es/RadioButton/style/index.less +0 -19
- package/es/Scrollbar/style/index.css +0 -65
- package/es/Scrollbar/style/index.less +0 -83
- package/es/Search/style/Item.less +0 -33
- package/es/Search/style/Search.less +0 -179
- package/es/Skeleton/style/Skeleton.less +0 -166
- package/es/Title/style/index.css +0 -27
- package/es/Title/style/index.less +0 -27
- package/es/style/index.css +0 -5375
- package/es/style/index.less +0 -14
- package/es/style/variable.css +0 -4
- package/es/style/variable.less +0 -4
- package/lib/AMap/Map.js +0 -133
- package/lib/AMap/index.js +0 -12
- package/lib/AMap/util.js +0 -62
- package/lib/CardSelect/style/index.css +0 -24
- package/lib/CardSelect/style/index.less +0 -26
- package/lib/CheckButton/style/index.css +0 -37
- package/lib/CheckButton/style/index.less +0 -40
- package/lib/DragModal/style/index.css +0 -82
- package/lib/DragModal/style/index.less +0 -97
- package/lib/Echarts/Echarts.js +0 -48
- package/lib/Echarts/index.js +0 -12
- package/lib/EditTable/style/body.less +0 -66
- package/lib/EditTable/style/form.less +0 -33
- package/lib/EditTable/style/group.less +0 -32
- package/lib/EditTable/style/header.less +0 -77
- package/lib/EditTable/style/index.css +0 -267
- package/lib/EditTable/style/index.less +0 -41
- package/lib/EditTable/style/menu.less +0 -25
- package/lib/EditTable/style/table.less +0 -47
- package/lib/Ellipsis/style/index.css +0 -17
- package/lib/Ellipsis/style/index.less +0 -20
- package/lib/FlameGraph/FlameGraph.js +0 -136
- package/lib/FlameGraph/index.js +0 -12
- package/lib/FlameGraph/style/index.css +0 -43
- package/lib/FlameGraph/style/index.js +0 -3
- package/lib/FlameGraph/style/index.less +0 -52
- package/lib/ProLayout/Basic/BasicLayout.less +0 -66
- package/lib/ProLayout/Basic/Header.less +0 -8
- package/lib/ProLayout/PageContainer/index.less +0 -103
- package/lib/ProLayout/SiderMenu/index.less +0 -231
- package/lib/ProLayout/TopHeader/index.less +0 -174
- package/lib/ProLayout/style/default.less +0 -4
- package/lib/ProLayout/style/style.less +0 -7
- package/lib/ProTable/style/ProTable.less +0 -139
- package/lib/RadioButton/style/index.css +0 -20
- package/lib/RadioButton/style/index.less +0 -19
- package/lib/Scrollbar/style/index.css +0 -65
- package/lib/Scrollbar/style/index.less +0 -83
- package/lib/Search/style/Item.less +0 -33
- package/lib/Search/style/Search.less +0 -179
- package/lib/Skeleton/style/Skeleton.less +0 -166
- package/lib/Title/style/index.css +0 -27
- package/lib/Title/style/index.less +0 -27
- package/lib/style/index.css +0 -5375
- package/lib/style/index.less +0 -14
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
|
@@ -23,13 +23,16 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
23
23
|
"onMounted": "setup-const",
|
|
24
24
|
"ref": "setup-const",
|
|
25
25
|
"nextTick": "setup-const",
|
|
26
|
-
"defineOptions": "setup-const",
|
|
27
26
|
"AIcon": "setup-maybe-ref",
|
|
28
27
|
"Menu": "setup-maybe-ref",
|
|
29
28
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
29
|
+
"useEditTableStyle": "setup-maybe-ref",
|
|
30
30
|
"MenuItem": "setup-maybe-ref",
|
|
31
31
|
"props": "setup-reactive-const",
|
|
32
32
|
"contextMenu": "setup-ref",
|
|
33
|
+
"prefixCls": "setup-maybe-ref",
|
|
34
|
+
"wrapSSR": "setup-maybe-ref",
|
|
35
|
+
"hashId": "setup-maybe-ref",
|
|
33
36
|
"contextLocale": "setup-maybe-ref",
|
|
34
37
|
"showDetail": "setup-maybe-ref",
|
|
35
38
|
"showPaste": "setup-maybe-ref",
|
|
@@ -37,11 +40,12 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
37
40
|
"clickFunc": "setup-const",
|
|
38
41
|
"close": "setup-const"
|
|
39
42
|
} */
|
|
40
|
-
import { unref as _unref, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
41
|
-
import { onMounted, ref, nextTick
|
|
43
|
+
import { unref as _unref, createVNode as _createVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
44
|
+
import { onMounted, ref, nextTick } from "vue";
|
|
42
45
|
import { AIcon } from '../../../components';
|
|
43
46
|
import { Menu } from 'ant-design-vue';
|
|
44
47
|
import { useLocaleReceiver } from "../../../LocaleReciver";
|
|
48
|
+
import useEditTableStyle from '../../style';
|
|
45
49
|
const __sfc_main__ = Object.assign({
|
|
46
50
|
name: 'JEditTableContextMenu'
|
|
47
51
|
}, {
|
|
@@ -56,6 +60,8 @@ const __sfc_main__ = Object.assign({
|
|
|
56
60
|
const MenuItem = Menu.Item;
|
|
57
61
|
const props = __props;
|
|
58
62
|
const contextMenu = ref(null);
|
|
63
|
+
const prefixCls = computed(() => 'jetlinks-edit-table');
|
|
64
|
+
const [wrapSSR, hashId] = useEditTableStyle(prefixCls);
|
|
59
65
|
const [contextLocale] = useLocaleReceiver('EditTable');
|
|
60
66
|
const showDetail = computed(() => {
|
|
61
67
|
return !props.data.id;
|
|
@@ -85,7 +91,7 @@ const __sfc_main__ = Object.assign({
|
|
|
85
91
|
});
|
|
86
92
|
return (_ctx, _cache) => {
|
|
87
93
|
return (_openBlock(), _createElementBlock("div", {
|
|
88
|
-
class:
|
|
94
|
+
class: _normalizeClass(['jetlinks-edit-table-context-menu', _unref(hashId)]),
|
|
89
95
|
ref_key: "contextMenu",
|
|
90
96
|
ref: contextMenu,
|
|
91
97
|
tabindex: "-1",
|
|
@@ -151,7 +157,7 @@ const __sfc_main__ = Object.assign({
|
|
|
151
157
|
]),
|
|
152
158
|
_: 1 /* STABLE */
|
|
153
159
|
})
|
|
154
|
-
],
|
|
160
|
+
], 34 /* CLASS, NEED_HYDRATION */));
|
|
155
161
|
};
|
|
156
162
|
}
|
|
157
163
|
});
|
|
@@ -24,7 +24,6 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
24
24
|
"useGroupOptions": "setup-maybe-ref",
|
|
25
25
|
"ref": "setup-const",
|
|
26
26
|
"computed": "setup-const",
|
|
27
|
-
"defineOptions": "setup-const",
|
|
28
27
|
"Ellipsis": "setup-const",
|
|
29
28
|
"DragModal": "setup-const",
|
|
30
29
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
@@ -68,7 +67,7 @@ const _hoisted_6 = { key: 1 };
|
|
|
68
67
|
const _hoisted_7 = { class: "jetlinks-table-search-result-total" };
|
|
69
68
|
import Table from '../../EditTable.js';
|
|
70
69
|
import { useTableDataSource, useTableOpenGroup, useTableTool, useGroupOptions } from "../../context";
|
|
71
|
-
import { ref, computed
|
|
70
|
+
import { ref, computed } from "vue";
|
|
72
71
|
import Ellipsis from '../../../Ellipsis/Ellipsis.js';
|
|
73
72
|
import DragModal from '../../../DragModal/DragModal.js';
|
|
74
73
|
import { useLocaleReceiver } from "../../../LocaleReciver/index";
|
|
@@ -22,7 +22,6 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
22
22
|
"active": "props",
|
|
23
23
|
"useTableTool": "setup-maybe-ref",
|
|
24
24
|
"useTableWrapper": "setup-maybe-ref",
|
|
25
|
-
"defineOptions": "setup-const",
|
|
26
25
|
"ref": "setup-const",
|
|
27
26
|
"reactive": "setup-const",
|
|
28
27
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
@@ -41,8 +40,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
41
40
|
"onAsc": "setup-const",
|
|
42
41
|
"onDesc": "setup-const"
|
|
43
42
|
} */
|
|
44
|
-
import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass
|
|
45
|
-
const _withScopeId = n => (_pushScopeId("data-v-1747107046068"), n = n(), _popScopeId(), n);
|
|
43
|
+
import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass } from "vue";
|
|
46
44
|
const _hoisted_1 = { class: "jetlinks-table-sort-content" };
|
|
47
45
|
const _hoisted_2 = { class: "jetlinks-table-sort-title" };
|
|
48
46
|
const _hoisted_3 = { class: "table-sort-body" };
|
package/lib/EditTable/group.js
CHANGED
|
@@ -24,8 +24,8 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
24
24
|
"useTableGroupError": "setup-maybe-ref",
|
|
25
25
|
"useTableWrapper": "setup-maybe-ref",
|
|
26
26
|
"ref": "setup-const",
|
|
27
|
-
"defineOptions": "setup-const",
|
|
28
27
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
28
|
+
"genEditTableStyle": "setup-maybe-ref",
|
|
29
29
|
"props": "setup-reactive-const",
|
|
30
30
|
"emit": "setup-const",
|
|
31
31
|
"contextLocale": "setup-maybe-ref",
|
|
@@ -37,6 +37,9 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
37
37
|
"addIndex": "setup-ref",
|
|
38
38
|
"formRef": "setup-ref",
|
|
39
39
|
"formData": "setup-maybe-ref",
|
|
40
|
+
"prefixCls": "setup-maybe-ref",
|
|
41
|
+
"wrapSSR": "setup-maybe-ref",
|
|
42
|
+
"hashId": "setup-maybe-ref",
|
|
40
43
|
"onAdd": "setup-const",
|
|
41
44
|
"onEdit": "setup-const",
|
|
42
45
|
"onCancel": "setup-const",
|
|
@@ -46,23 +49,21 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
46
49
|
"popContainer": "setup-const",
|
|
47
50
|
"modalContainer": "setup-const"
|
|
48
51
|
} */
|
|
49
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock,
|
|
50
|
-
const _hoisted_1 = { class: "jetlinks-table-group-warp" };
|
|
51
|
-
const _hoisted_2 = {
|
|
52
|
-
const _hoisted_3 = {
|
|
53
|
-
const _hoisted_4 = /*#__PURE__*/ _createElementVNode("div", { class: "jetlinks-table-group-error-target" }, null, -1 /* HOISTED */);
|
|
54
|
-
const _hoisted_5 = {
|
|
52
|
+
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, createBlock as _createBlock, createCommentVNode as _createCommentVNode, vShow as _vShow, withDirectives as _withDirectives, normalizeClass as _normalizeClass } from "vue";
|
|
53
|
+
const _hoisted_1 = { class: "jetlinks-table-group-error-warp" };
|
|
54
|
+
const _hoisted_2 = { style: { "color": "#1d2129" } };
|
|
55
|
+
const _hoisted_3 = {
|
|
55
56
|
key: 1,
|
|
56
57
|
class: "jetlinks-table-group-error-warp"
|
|
57
58
|
};
|
|
58
|
-
const
|
|
59
|
-
const _hoisted_7 = /*#__PURE__*/ _createElementVNode("div", { class: "jetlinks-table-group-error-target" }, null, -1 /* HOISTED */);
|
|
59
|
+
const _hoisted_4 = { style: { "color": "#1d2129" } };
|
|
60
60
|
import { Modal } from "ant-design-vue";
|
|
61
61
|
import { randomNumber } from "@jetlinks-web/utils";
|
|
62
62
|
import { isFullScreen } from "./utils";
|
|
63
63
|
import { useTableGroupError, useTableWrapper } from './context';
|
|
64
|
-
import { ref
|
|
64
|
+
import { ref } from 'vue';
|
|
65
65
|
import { useLocaleReceiver } from "../LocaleReciver";
|
|
66
|
+
import genEditTableStyle from './style';
|
|
66
67
|
const __sfc_main__ = Object.assign({
|
|
67
68
|
name: 'JEditTableGroup'
|
|
68
69
|
}, {
|
|
@@ -95,6 +96,8 @@ const __sfc_main__ = Object.assign({
|
|
|
95
96
|
const formData = reactive({
|
|
96
97
|
label: undefined
|
|
97
98
|
});
|
|
99
|
+
const prefixCls = computed(() => 'jetlinks-edit-table');
|
|
100
|
+
const [wrapSSR, hashId] = genEditTableStyle(prefixCls);
|
|
98
101
|
const onAdd = (targetKey, action) => {
|
|
99
102
|
// if(props.readonly) return
|
|
100
103
|
if (action === 'add') {
|
|
@@ -212,7 +215,9 @@ const __sfc_main__ = Object.assign({
|
|
|
212
215
|
const _component_a_button = _resolveComponent("a-button");
|
|
213
216
|
const _component_a_form = _resolveComponent("a-form");
|
|
214
217
|
const _component_a_modal = _resolveComponent("a-modal");
|
|
215
|
-
return (_openBlock(), _createElementBlock("div",
|
|
218
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
219
|
+
class: _normalizeClass(['jetlinks-table-group-warp', _unref(hashId)])
|
|
220
|
+
}, [
|
|
216
221
|
_createVNode(_component_a_tabs, {
|
|
217
222
|
type: "editable-card",
|
|
218
223
|
activeKey: myActiveKey.value,
|
|
@@ -257,7 +262,7 @@ const __sfc_main__ = Object.assign({
|
|
|
257
262
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["onClick"])
|
|
258
263
|
]),
|
|
259
264
|
default: _withCtx(() => [
|
|
260
|
-
_createElementVNode("div",
|
|
265
|
+
_createElementVNode("div", _hoisted_1, [
|
|
261
266
|
_createTextVNode(_toDisplayString(item.label) + " (" + _toDisplayString(item.effective) + ") ", 1 /* TEXT */),
|
|
262
267
|
(_unref(errorMap)[item.value])
|
|
263
268
|
? (_openBlock(), _createBlock(_component_a_tooltip, {
|
|
@@ -267,10 +272,10 @@ const __sfc_main__ = Object.assign({
|
|
|
267
272
|
"get-popup-container": popContainer
|
|
268
273
|
}, {
|
|
269
274
|
title: _withCtx(() => [
|
|
270
|
-
_createElementVNode("span",
|
|
275
|
+
_createElementVNode("span", _hoisted_2, _toDisplayString(_unref(contextLocale).Group.validate), 1 /* TEXT */)
|
|
271
276
|
]),
|
|
272
277
|
default: _withCtx(() => [
|
|
273
|
-
|
|
278
|
+
_cache[2] || (_cache[2] = _createElementVNode("div", { class: "jetlinks-table-group-error-target" }, null, -1 /* CACHED */))
|
|
274
279
|
]),
|
|
275
280
|
_: 1 /* STABLE */
|
|
276
281
|
}))
|
|
@@ -279,7 +284,7 @@ const __sfc_main__ = Object.assign({
|
|
|
279
284
|
]),
|
|
280
285
|
_: 2 /* DYNAMIC */
|
|
281
286
|
}, 1032 /* PROPS, DYNAMIC_SLOTS */, ["getPopupContainer", "disabled"]))
|
|
282
|
-
: (_openBlock(), _createElementBlock("div",
|
|
287
|
+
: (_openBlock(), _createElementBlock("div", _hoisted_3, [
|
|
283
288
|
_createTextVNode(_toDisplayString(item.label) + " (" + _toDisplayString(item.effective) + ") ", 1 /* TEXT */),
|
|
284
289
|
(_unref(errorMap)[item.value])
|
|
285
290
|
? (_openBlock(), _createBlock(_component_a_tooltip, {
|
|
@@ -289,10 +294,10 @@ const __sfc_main__ = Object.assign({
|
|
|
289
294
|
getContainer: popContainer
|
|
290
295
|
}, {
|
|
291
296
|
title: _withCtx(() => [
|
|
292
|
-
_createElementVNode("span",
|
|
297
|
+
_createElementVNode("span", _hoisted_4, _toDisplayString(_unref(contextLocale).Group.validate), 1 /* TEXT */)
|
|
293
298
|
]),
|
|
294
299
|
default: _withCtx(() => [
|
|
295
|
-
|
|
300
|
+
_cache[3] || (_cache[3] = _createElementVNode("div", { class: "jetlinks-table-group-error-target" }, null, -1 /* CACHED */))
|
|
296
301
|
]),
|
|
297
302
|
_: 1 /* STABLE */
|
|
298
303
|
}))
|
|
@@ -348,7 +353,7 @@ const __sfc_main__ = Object.assign({
|
|
|
348
353
|
]),
|
|
349
354
|
_: 1 /* STABLE */
|
|
350
355
|
}, 8 /* PROPS */, ["visible", "title"])
|
|
351
|
-
]));
|
|
356
|
+
], 2 /* CLASS */));
|
|
352
357
|
};
|
|
353
358
|
}
|
|
354
359
|
});
|
|
@@ -25,7 +25,7 @@ var useValidate = exports.useValidate = function useValidate(dataSource, columns
|
|
|
25
25
|
firstFields: true,
|
|
26
26
|
index: index
|
|
27
27
|
}, function (err) {
|
|
28
|
-
if (err
|
|
28
|
+
if (err !== null && err !== void 0 && err.length) {
|
|
29
29
|
reject(err.map(function (item) {
|
|
30
30
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
31
31
|
__serial: data.__serial,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genEditTableBodyStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genEditTableBodyStyle = exports.genEditTableBodyStyle = function genEditTableBodyStyle(config) {
|
|
10
|
+
var componentCls = config.componentCls,
|
|
11
|
+
token = config.token;
|
|
12
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-edit-table-body-viewport', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
13
|
+
maxHeight: '100%',
|
|
14
|
+
width: '100%',
|
|
15
|
+
overflow: 'hidden auto',
|
|
16
|
+
position: 'relative'
|
|
17
|
+
}, '.jetlinks-edit-scrollbar', {
|
|
18
|
+
position: 'absolute',
|
|
19
|
+
left: 0,
|
|
20
|
+
top: 0,
|
|
21
|
+
right: 0,
|
|
22
|
+
zIndex: -1
|
|
23
|
+
}), '.jetlinks-edit-table-body-container', {
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
height: '100%'
|
|
26
|
+
}), '.jetlinks-edit-table-center', (0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
27
|
+
position: 'relative',
|
|
28
|
+
flex: '1 1 auto',
|
|
29
|
+
minWidth: 0,
|
|
30
|
+
height: '100%'
|
|
31
|
+
}, '.jetlinks-edit-table-row', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
32
|
+
width: '100%',
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
transition: 'top .2s, height .2s, background-color .1s',
|
|
36
|
+
borderBottom: '1px solid #eebebeb'
|
|
37
|
+
}, '.jetlinks-edit-table-cell', {
|
|
38
|
+
position: 'absolute',
|
|
39
|
+
minWidth: 0
|
|
40
|
+
}), '&:hover', {
|
|
41
|
+
backgroundColor: 'rgb(248, 248, 248)'
|
|
42
|
+
}), '&.jetlinks-edit-table-row-selected', {
|
|
43
|
+
backgroundColor: 'var(--ant-primary-1)'
|
|
44
|
+
}), '.body-cell-box', {
|
|
45
|
+
padding: '0 12px',
|
|
46
|
+
position: 'relative'
|
|
47
|
+
})), '.readonly-mask', {
|
|
48
|
+
position: 'absolute',
|
|
49
|
+
top: 0,
|
|
50
|
+
left: 0,
|
|
51
|
+
right: 0,
|
|
52
|
+
bottom: 0,
|
|
53
|
+
zIndex: 4
|
|
54
|
+
}))), '.jetlinks-edit-table-body-empty', {
|
|
55
|
+
display: 'flex',
|
|
56
|
+
width: '100%',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
paddingTop: 24
|
|
59
|
+
});
|
|
60
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genEditTableFormItemStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genEditTableFormItemStyle = exports.genEditTableFormItemStyle = function genEditTableFormItemStyle(config) {
|
|
10
|
+
var componentCls = config.componentCls,
|
|
11
|
+
token = config.token;
|
|
12
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-table-form-error-target', {
|
|
13
|
+
position: 'absolute',
|
|
14
|
+
right: '2px',
|
|
15
|
+
top: '-9px',
|
|
16
|
+
border: '16px solid transparent',
|
|
17
|
+
borderTopColor: token.colorError,
|
|
18
|
+
borderRightWidth: 0,
|
|
19
|
+
borderBottomWidth: 0
|
|
20
|
+
}), '.jetlinks-edit-table-form-has-error', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.select-no-value', (0, _defineProperty2.default)({}, '.ant-select-selector', (0, _defineProperty2.default)({
|
|
21
|
+
borderColor: "".concat(token.colorError, " !important")
|
|
22
|
+
}, '&:focus', {
|
|
23
|
+
boxShadow: '0 0 0 2px var(--ant-error-color-outlined) !important'
|
|
24
|
+
}))), '> input', (0, _defineProperty2.default)({
|
|
25
|
+
borderColor: "".concat(token.colorError, " !important")
|
|
26
|
+
}, '&:focus', {
|
|
27
|
+
boxShadow: '0 0 0 2px var(--ant-error-color-outlined) !important'
|
|
28
|
+
})), '.jetlinks-table-form-required-aicon', {
|
|
29
|
+
color: token.colorError
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genEditTableGroupStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genEditTableGroupStyle = exports.genEditTableGroupStyle = function genEditTableGroupStyle(config) {
|
|
10
|
+
var token = config.token;
|
|
11
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-table-group-wrap', (0, _defineProperty2.default)({}, '.ant-tabs-nav', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
12
|
+
marginBottom: 0
|
|
13
|
+
}, '.ant-tabs-tab', {
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
position: 'relative'
|
|
16
|
+
}), '.ant-tabs-tab-active', {
|
|
17
|
+
backgroundColor: '#BAE0FF !important',
|
|
18
|
+
borderColor: '#91CAFF !important'
|
|
19
|
+
}), '.ant-tabs-nav-add', {
|
|
20
|
+
border: 'none'
|
|
21
|
+
}))), '.jetlinks-table-group-error-wrap', (0, _defineProperty2.default)({
|
|
22
|
+
color: '#1a1a1a !important'
|
|
23
|
+
}, '.table-group-error-target', {
|
|
24
|
+
position: 'absolute',
|
|
25
|
+
right: 0,
|
|
26
|
+
top: 0,
|
|
27
|
+
border: '16px solid transparent',
|
|
28
|
+
borderTopColor: token.colorError,
|
|
29
|
+
borderRightWidth: 0,
|
|
30
|
+
borderBottomWidth: 0
|
|
31
|
+
}));
|
|
32
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.genEditTableHeaderStyle = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var genEditTableHeaderStyle = exports.genEditTableHeaderStyle = function genEditTableHeaderStyle(config) {
|
|
10
|
+
var token = config.token;
|
|
11
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-edit-table-header-container', (0, _defineProperty2.default)({
|
|
12
|
+
height: '100%',
|
|
13
|
+
position: 'relative'
|
|
14
|
+
}, '.jetlinks-edit-table-header-cell', (0, _defineProperty2.default)({
|
|
15
|
+
height: '100%',
|
|
16
|
+
display: 'inline-flex',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
float: 'left',
|
|
19
|
+
overflow: 'visible',
|
|
20
|
+
position: 'absolute',
|
|
21
|
+
top: 0
|
|
22
|
+
}, '.jetlinks-edit-table-header-cell-box', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
23
|
+
padding: '0 12px',
|
|
24
|
+
width: '100%'
|
|
25
|
+
}, '&.header-cell-box-tool', {
|
|
26
|
+
display: 'flex',
|
|
27
|
+
justifyContent: 'space-between',
|
|
28
|
+
alignItems: 'center'
|
|
29
|
+
}), '.table-header-cell-title', (0, _defineProperty2.default)({
|
|
30
|
+
flex: 1,
|
|
31
|
+
display: 'flex',
|
|
32
|
+
alignItems: 'center',
|
|
33
|
+
fontWeight: 600,
|
|
34
|
+
gap: 4
|
|
35
|
+
}, '.cell-title-box', {
|
|
36
|
+
flex: '1 1 auto'
|
|
37
|
+
})), '.header-cell-required', {
|
|
38
|
+
color: token.colorError,
|
|
39
|
+
paddingLeft: 8,
|
|
40
|
+
transform: 'translateY(3px)',
|
|
41
|
+
fontWeight: 500
|
|
42
|
+
}), '&::before', {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
top: '50%',
|
|
45
|
+
right: '1px',
|
|
46
|
+
width: '1px',
|
|
47
|
+
height: '1.6em',
|
|
48
|
+
pointerEvents: 'none',
|
|
49
|
+
backgroundColor: 'rgba(0,0,0,.06)',
|
|
50
|
+
transform: 'translateY(-50%)',
|
|
51
|
+
transition: 'background-color .3s',
|
|
52
|
+
content: '""'
|
|
53
|
+
}), '&:not(:last-child)', {
|
|
54
|
+
'&::before': {
|
|
55
|
+
backgroundColor: 'transparent'
|
|
56
|
+
}
|
|
57
|
+
})))), 'jetlinks-table-search', (0, _defineProperty2.default)({}, '.jetlinks-table-search-header', (0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
58
|
+
display: 'flex',
|
|
59
|
+
justifyContent: 'space-between'
|
|
60
|
+
}, '.jetlinks-drag-modal-footer', {
|
|
61
|
+
display: 'none'
|
|
62
|
+
}), '.jetlinks-table-search-result-total', {
|
|
63
|
+
color: '@primary-color'
|
|
64
|
+
})));
|
|
65
|
+
};
|
|
@@ -1,3 +1,49 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
require("
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _body = require("./body");
|
|
9
|
+
var _form = require("./form");
|
|
10
|
+
var _group = require("./group");
|
|
11
|
+
var _header = require("./header");
|
|
12
|
+
var _table = require("./table");
|
|
13
|
+
var _menu = require("./menu");
|
|
14
|
+
var _styleRegister = _interopRequireDefault(require("../../style/styleRegister"));
|
|
15
|
+
var genEditTableStyle = function genEditTableStyle(config) {
|
|
16
|
+
var token = config.token;
|
|
17
|
+
return {
|
|
18
|
+
'.edit-table-search-header': {
|
|
19
|
+
display: 'flex',
|
|
20
|
+
justifyContent: 'space-between'
|
|
21
|
+
},
|
|
22
|
+
'.edit-table-search-result-total': {
|
|
23
|
+
color: token.colorPrimary
|
|
24
|
+
},
|
|
25
|
+
'.jetlinks-edit-table-horizontal-scroll': {
|
|
26
|
+
height: 17,
|
|
27
|
+
width: 100,
|
|
28
|
+
display: 'flex',
|
|
29
|
+
position: 'relative',
|
|
30
|
+
zIndex: 4,
|
|
31
|
+
'.jetlinks-edit-table-horizontal-scroll-viewport': {
|
|
32
|
+
overflowY: 'hidden',
|
|
33
|
+
overflowX: 'scroll',
|
|
34
|
+
position: 'relative',
|
|
35
|
+
flex: '1 1 0',
|
|
36
|
+
height: '17px',
|
|
37
|
+
width: '100%',
|
|
38
|
+
'> div': {
|
|
39
|
+
height: '17px'
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
'.jetlinks-edit-table-horizontal-scroll-hidden': {
|
|
43
|
+
height: '100%',
|
|
44
|
+
overflowX: 'hidden'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
var _default = exports.default = (0, _styleRegister.default)([genEditTableStyle, _body.genEditTableBodyStyle, _form.genEditTableFormItemStyle, _group.genEditTableGroupStyle, _header.genEditTableHeaderStyle, _table.genTableStyle, _menu.genMenuStyle]);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.genMenuStyle = void 0;
|
|
7
|
+
var genMenuStyle = exports.genMenuStyle = function genMenuStyle(config) {
|
|
8
|
+
var token = config.token;
|
|
9
|
+
return {
|
|
10
|
+
'.jetlinks-edit-table-context-menu': {
|
|
11
|
+
position: 'fixed',
|
|
12
|
+
boxShadow: '0 0 12px rgba(0, 0, 0 ,.2)',
|
|
13
|
+
borderRadius: '4px',
|
|
14
|
+
overflow: 'hidden',
|
|
15
|
+
width: '192px',
|
|
16
|
+
padding: '4px',
|
|
17
|
+
backgroundColor: '#fff',
|
|
18
|
+
'.ant-menu': {
|
|
19
|
+
borderRight: 'none',
|
|
20
|
+
'.ant-menu-item': {
|
|
21
|
+
margin: 0,
|
|
22
|
+
height: '32px',
|
|
23
|
+
'&.danger': {
|
|
24
|
+
color: token.colorError
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
'.ant-menu-item-active': {
|
|
29
|
+
backgroundColor: 'var(--ant-primary-1)'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.genTableStyle = void 0;
|
|
7
|
+
var genTableStyle = exports.genTableStyle = function genTableStyle(config) {
|
|
8
|
+
var token = config.token;
|
|
9
|
+
return {
|
|
10
|
+
'.jetlinks-edit-table-wrapper': {
|
|
11
|
+
background: '#fff',
|
|
12
|
+
height: '100%',
|
|
13
|
+
position: 'relative',
|
|
14
|
+
'&.table-full-screen': {
|
|
15
|
+
padding: 24
|
|
16
|
+
},
|
|
17
|
+
'.jetlinks-edit-table': {
|
|
18
|
+
display: 'flex',
|
|
19
|
+
flexDirection: 'column',
|
|
20
|
+
flexGrow: 0,
|
|
21
|
+
flexShrink: 0,
|
|
22
|
+
background: '#fafafa',
|
|
23
|
+
transition: 'background-color .3s ease',
|
|
24
|
+
overflow: 'auto hidden',
|
|
25
|
+
'.jetlinks-edit-table-header': {
|
|
26
|
+
overflow: 'hidden',
|
|
27
|
+
width: '100%'
|
|
28
|
+
},
|
|
29
|
+
'.jetlinks-edit-table-body': {
|
|
30
|
+
backgroundColor: '#fff',
|
|
31
|
+
overflowY: 'hidden',
|
|
32
|
+
position: 'relative',
|
|
33
|
+
height: '100%',
|
|
34
|
+
width: '100%',
|
|
35
|
+
flex: '1 1 auto',
|
|
36
|
+
flexDirection: 'row'
|
|
37
|
+
},
|
|
38
|
+
'.jetlinks-table-horizontal-scroll': {
|
|
39
|
+
width: '100%',
|
|
40
|
+
height: '15px',
|
|
41
|
+
minHeight: '15px',
|
|
42
|
+
maxHeight: '15px',
|
|
43
|
+
display: 'flex',
|
|
44
|
+
'.jetlinks-table-horizontal-scroll-bar': {
|
|
45
|
+
height: '100%',
|
|
46
|
+
overflowX: 'scroll'
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
};
|
package/lib/EditTable/utils.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.isFullScreen = exports.handlePureRecord = exports.handleColumnsWidth = exports.collectValidateRules = void 0;
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
7
9
|
var _lodashEs = require("lodash");
|
|
8
10
|
/**
|
|
9
11
|
* 规则收集器,收集columns中的rules和watch
|
|
@@ -12,9 +14,35 @@ var _lodashEs = require("lodash");
|
|
|
12
14
|
var collectValidateRules = exports.collectValidateRules = function collectValidateRules(columns) {
|
|
13
15
|
var rules = {};
|
|
14
16
|
columns.forEach(function (item) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
var _item$form;
|
|
18
|
+
if ((_item$form = item.form) !== null && _item$form !== void 0 && _item$form.rules) {
|
|
19
|
+
var currentLevel = rules; // 从最顶层开始构建
|
|
20
|
+
var field = item.form.field || item.dataIndex;
|
|
21
|
+
var parts = Array.isArray(field) ? field : String(field).split(',');
|
|
22
|
+
for (var i = 0; i < parts.length; i++) {
|
|
23
|
+
var part = parts[i];
|
|
24
|
+
if (i === parts.length - 1) {
|
|
25
|
+
// 这是最深层的叶子节点
|
|
26
|
+
currentLevel[part] = (0, _toConsumableArray2.default)(item.form.rules);
|
|
27
|
+
} else {
|
|
28
|
+
// 这是中间的父节点(例如 'prop1' 或 'type')
|
|
29
|
+
if (!currentLevel[part]) {
|
|
30
|
+
// 如果当前层级还没有这个属性,就把它定义为一个对象
|
|
31
|
+
currentLevel[part] = {
|
|
32
|
+
type: 'object',
|
|
33
|
+
fields: {}
|
|
34
|
+
};
|
|
35
|
+
} else if (currentLevel[part].type !== 'object') {
|
|
36
|
+
// 如果已经存在但不是对象类型,可能是之前被错误定义为叶子节点,修正它
|
|
37
|
+
console.warn("Warning: '".concat(parts.slice(0, i + 1).join('.'), "' was expected to be an object but has other rules. Overwriting."));
|
|
38
|
+
currentLevel[part] = {
|
|
39
|
+
type: 'object',
|
|
40
|
+
fields: {}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
// 进入下一层级,继续构建 `fields`
|
|
44
|
+
currentLevel = currentLevel[part].fields;
|
|
45
|
+
}
|
|
18
46
|
}
|
|
19
47
|
}
|
|
20
48
|
});
|
package/lib/Ellipsis/Ellipsis.js
CHANGED
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
"mergeProps": "setup-const",
|
|
8
8
|
"ref": "setup-const",
|
|
9
9
|
"useAttrs": "setup-const",
|
|
10
|
+
"useEllipsisStyle": "setup-maybe-ref",
|
|
10
11
|
"props": "setup-reactive-const",
|
|
12
|
+
"prefixCls": "setup-ref",
|
|
13
|
+
"wrapSSR": "setup-maybe-ref",
|
|
14
|
+
"hashId": "setup-maybe-ref",
|
|
11
15
|
"jEllipsis": "literal-const",
|
|
12
16
|
"jEllipsisCursorClass": "literal-const",
|
|
13
17
|
"jEllipsisLineClampClass": "literal-const",
|
|
@@ -25,9 +29,10 @@
|
|
|
25
29
|
"syncCursorStyle": "setup-const",
|
|
26
30
|
"getTooltipDisabled": "setup-const"
|
|
27
31
|
} */
|
|
28
|
-
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps,
|
|
32
|
+
import { unref as _unref, renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps, withCtx as _withCtx, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
29
33
|
import { Tooltip } from 'ant-design-vue';
|
|
30
34
|
import { computed, mergeProps, ref, useAttrs } from 'vue';
|
|
35
|
+
import useEllipsisStyle from './style';
|
|
31
36
|
const jEllipsis = 'j-ellipsis';
|
|
32
37
|
const jEllipsisCursorClass = 'j-ellipsis-cursor';
|
|
33
38
|
const jEllipsisLineClampClass = 'j-ellipsis-line-clamp';
|
|
@@ -51,6 +56,8 @@ const __sfc_main__ = Object.assign({
|
|
|
51
56
|
},
|
|
52
57
|
setup(__props) {
|
|
53
58
|
const props = __props;
|
|
59
|
+
const prefixCls = computed(() => 'j-ellipsis');
|
|
60
|
+
const [wrapSSR, hashId] = useEllipsisStyle(prefixCls);
|
|
54
61
|
// define class name
|
|
55
62
|
const expandedRef = ref(false);
|
|
56
63
|
const tooltipRef = ref(null);
|
|
@@ -72,6 +79,7 @@ const __sfc_main__ = Object.assign({
|
|
|
72
79
|
jEllipsis,
|
|
73
80
|
props.lineClamp !== undefined ? jEllipsisLineClampClass : undefined,
|
|
74
81
|
props.expandTrigger === 'click' ? jEllipsisCursorClass : undefined,
|
|
82
|
+
hashId.value
|
|
75
83
|
],
|
|
76
84
|
style: ellipsisStyleRef.value,
|
|
77
85
|
}),
|
|
@@ -176,7 +184,7 @@ const __sfc_main__ = Object.assign({
|
|
|
176
184
|
name: "title",
|
|
177
185
|
fn: _withCtx(() => [
|
|
178
186
|
_createElementVNode("div", {
|
|
179
|
-
class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep'])
|
|
187
|
+
class: _normalizeClass([jEllipsisLineClampClass, jEllipsis, 'j-ellipsis-deep', _unref(hashId)])
|
|
180
188
|
}, [
|
|
181
189
|
_renderSlot(_ctx.$slots, "default"),
|
|
182
190
|
_renderSlot(_ctx.$slots, "tooltip")
|