@jetlinks-web/components 3.3.11 → 3.3.13
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/CardSelect/style/index.js +3 -3
- package/es/CheckButton/style/index.js +9 -9
- package/es/DragModal/style/index.js +6 -6
- package/es/EditTable/FormItem.js +18 -15
- package/es/EditTable/components/Search/sort.js +15 -1
- package/es/EditTable/style/body.js +8 -6
- package/es/EditTable/style/group.js +3 -3
- package/es/EditTable/style/header.js +3 -3
- package/es/EditTable/style/menu.js +3 -3
- package/es/EditTable/style/table.js +3 -3
- package/es/FullPage/FullPage.js +15 -5
- package/es/ProLayout/SiderMenu/style.js +105 -26
- package/es/ProLayout/TopHeader/style.js +55 -11
- package/es/ProTable/ProTable.js +2 -4
- package/es/ProTable/style/index.js +11 -8
- package/es/RadioButton/style/index.js +3 -2
- package/es/Scrollbar/style/index.js +9 -9
- package/es/Search/Item.js +25 -19
- package/es/Search/style/search.js +5 -5
- package/es/Skeleton/components/Page.js +18 -5
- package/es/Skeleton/style/index.js +12 -6
- package/es/Title/style/index.js +2 -2
- package/es/VirtualTable/style/index.js +7 -4
- package/es/style/scrollbar.js +24 -0
- package/es/style/styleRegister.js +45 -11
- package/es/style/variable.js +1 -4
- package/lib/CardSelect/style/index.js +3 -3
- package/lib/CheckButton/style/index.js +9 -9
- package/lib/DragModal/style/index.js +6 -6
- package/lib/EditTable/FormItem.js +18 -15
- package/lib/EditTable/components/Search/sort.js +15 -1
- package/lib/EditTable/style/body.js +8 -6
- package/lib/EditTable/style/group.js +3 -3
- package/lib/EditTable/style/header.js +3 -3
- package/lib/EditTable/style/menu.js +3 -3
- package/lib/EditTable/style/table.js +3 -3
- package/lib/FullPage/FullPage.js +15 -5
- package/lib/ProLayout/SiderMenu/style.js +104 -25
- package/lib/ProLayout/TopHeader/style.js +55 -11
- package/lib/ProTable/ProTable.js +2 -4
- package/lib/ProTable/style/index.js +10 -7
- package/lib/RadioButton/style/index.js +3 -2
- package/lib/Scrollbar/style/index.js +8 -8
- package/lib/Search/Item.js +25 -19
- package/lib/Search/style/search.js +5 -5
- package/lib/Skeleton/components/Page.js +18 -5
- package/lib/Skeleton/style/index.js +12 -6
- package/lib/Title/style/index.js +2 -2
- package/lib/VirtualTable/style/index.js +6 -3
- package/lib/style/scrollbar.js +30 -0
- package/lib/style/styleRegister.js +44 -10
- package/lib/style/variable.js +1 -4
- package/package.json +1 -1
|
@@ -6,9 +6,6 @@ var JSkeletonSizeLg = '36px';
|
|
|
6
6
|
var JSkeletonSizeSm = '16px';
|
|
7
7
|
var JSkeletonSize = '24px';
|
|
8
8
|
var JSkeletonBorderRadius = '8px';
|
|
9
|
-
var JSkeletonBg = '#f0f2f5';
|
|
10
|
-
var JSkeletonBg1 = '#e6e8eb';
|
|
11
|
-
var JSkeletonBorder = "4px solid ".concat(JSkeletonBg);
|
|
12
9
|
var JSkeletonFlex = {
|
|
13
10
|
display: 'flex',
|
|
14
11
|
gap: '24px',
|
|
@@ -27,6 +24,10 @@ var genSkeletonStyle = function genSkeletonStyle(config) {
|
|
|
27
24
|
var _$concat6;
|
|
28
25
|
var componentCls = config.componentCls,
|
|
29
26
|
token = config.token;
|
|
27
|
+
var JSkeletonBg = token.colorFillQuaternary;
|
|
28
|
+
var JSkeletonBg1 = token.colorFillSecondary;
|
|
29
|
+
var JSkeletonBorder = "".concat(token.lineWidth * 4, "px solid ").concat(JSkeletonBg);
|
|
30
|
+
var JSkeletonCardBorder = "".concat(token.lineWidth * 2, "px solid ").concat(token.colorBorderSecondary);
|
|
30
31
|
return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-flex"), JSkeletonFlex), "".concat(componentCls, "-flex-between"), _objectSpread(_objectSpread({}, JSkeletonFlex), {}, {
|
|
31
32
|
background: JSkeletonBg,
|
|
32
33
|
height: JSkeletonSize,
|
|
@@ -34,7 +35,12 @@ var genSkeletonStyle = function genSkeletonStyle(config) {
|
|
|
34
35
|
})), "".concat(componentCls, "-flex-column"), _objectSpread(_objectSpread({}, JSkeletonFlex), {}, {
|
|
35
36
|
justifyContent: 'space-between'
|
|
36
37
|
})), "".concat(componentCls), (_$concat6 = {
|
|
37
|
-
height: '100%'
|
|
38
|
+
height: '100%',
|
|
39
|
+
'--j-skeleton-bg': JSkeletonBg,
|
|
40
|
+
'--j-skeleton-bg-active': JSkeletonBg1,
|
|
41
|
+
'--j-skeleton-border': JSkeletonBorder,
|
|
42
|
+
'--j-skeleton-card-border': JSkeletonCardBorder,
|
|
43
|
+
'--j-skeleton-table-header-bg': token.colorFillTertiary
|
|
38
44
|
}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat6, "".concat(componentCls, "-item"), {
|
|
39
45
|
background: "linear-gradient(90deg, ".concat(JSkeletonBg, " 25%, ").concat(JSkeletonBg1, " 50%, ").concat(JSkeletonBg, " 75%)"),
|
|
40
46
|
backgroundSize: '400% 100%',
|
|
@@ -83,7 +89,7 @@ var genSkeletonStyle = function genSkeletonStyle(config) {
|
|
|
83
89
|
padding: '12px 6px',
|
|
84
90
|
borderRadius: '8px'
|
|
85
91
|
}), "".concat(componentCls, "-table-header"), {
|
|
86
|
-
backgroundColor:
|
|
92
|
+
backgroundColor: token.colorFillTertiary
|
|
87
93
|
}), _defineProperty(_defineProperty(_defineProperty(_$concat6, "".concat(componentCls, "-table-action"), {
|
|
88
94
|
width: '200px',
|
|
89
95
|
display: 'grid',
|
|
@@ -96,7 +102,7 @@ var genSkeletonStyle = function genSkeletonStyle(config) {
|
|
|
96
102
|
}), "".concat(componentCls, "-card"), _defineProperty(_defineProperty({}, "".concat(componentCls, "-card-content"), _defineProperty(_defineProperty({
|
|
97
103
|
display: 'flex',
|
|
98
104
|
gap: '16px',
|
|
99
|
-
border:
|
|
105
|
+
border: JSkeletonCardBorder,
|
|
100
106
|
borderRadius: '8px',
|
|
101
107
|
padding: '24px',
|
|
102
108
|
marginBottom: '16px'
|
package/es/Title/style/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var genTitleStyle = function genTitleStyle(config) {
|
|
|
11
11
|
}, "".concat(componentCls, "-content"), {
|
|
12
12
|
position: 'relative',
|
|
13
13
|
paddingLeft: '10px',
|
|
14
|
-
color:
|
|
14
|
+
color: token.colorTextHeading,
|
|
15
15
|
fontWeight: 600,
|
|
16
16
|
lineHeight: 1,
|
|
17
17
|
'&::before': {
|
|
@@ -20,7 +20,7 @@ var genTitleStyle = function genTitleStyle(config) {
|
|
|
20
20
|
left: 0,
|
|
21
21
|
width: 4,
|
|
22
22
|
height: '100%',
|
|
23
|
-
background:
|
|
23
|
+
background: token.colorPrimary,
|
|
24
24
|
borderRadius: '0 3px 3px 0',
|
|
25
25
|
content: '""'
|
|
26
26
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import genCompoentStyle from '../../style/styleRegister';
|
|
3
|
+
import { genTokenScrollbarStyle } from '../../style/scrollbar';
|
|
4
|
+
var genVirtualTableStyle = function genVirtualTableStyle(config) {
|
|
5
|
+
var token = config.token;
|
|
3
6
|
return {
|
|
4
7
|
'.virtual-table-wrapper': {
|
|
5
8
|
display: 'flex',
|
|
@@ -17,11 +20,11 @@ var genVirtualTableStyle = function genVirtualTableStyle() {
|
|
|
17
20
|
}
|
|
18
21
|
}
|
|
19
22
|
},
|
|
20
|
-
'.virtual-table-body': {
|
|
23
|
+
'.virtual-table-body': _objectSpread({
|
|
21
24
|
'overflow-y': 'auto',
|
|
22
25
|
position: 'relative',
|
|
23
26
|
'min-height': '100px'
|
|
24
|
-
},
|
|
27
|
+
}, genTokenScrollbarStyle(token)),
|
|
25
28
|
'.virtual-table-header-fixed': {
|
|
26
29
|
// 位移的容器,提升位移动画性能
|
|
27
30
|
'will-change': 'transform'
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export var genTokenScrollbarStyle = function genTokenScrollbarStyle(token) {
|
|
2
|
+
return {
|
|
3
|
+
scrollbarWidth: 'thin',
|
|
4
|
+
scrollbarColor: "".concat(token.colorFillSecondary, " ").concat(token.colorFillQuaternary),
|
|
5
|
+
'&::-webkit-scrollbar': {
|
|
6
|
+
width: 10,
|
|
7
|
+
height: 10
|
|
8
|
+
},
|
|
9
|
+
'&::-webkit-scrollbar-track': {
|
|
10
|
+
backgroundColor: token.colorFillQuaternary
|
|
11
|
+
},
|
|
12
|
+
'&::-webkit-scrollbar-thumb': {
|
|
13
|
+
backgroundColor: token.colorFillSecondary,
|
|
14
|
+
borderRadius: token.borderRadiusLG,
|
|
15
|
+
border: "".concat(token.lineWidth * 2, "px solid ").concat(token.colorFillQuaternary)
|
|
16
|
+
},
|
|
17
|
+
'&::-webkit-scrollbar-thumb:hover': {
|
|
18
|
+
backgroundColor: token.colorFill
|
|
19
|
+
},
|
|
20
|
+
'&::-webkit-scrollbar-corner': {
|
|
21
|
+
backgroundColor: token.colorFillQuaternary
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,17 +1,51 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import {
|
|
3
|
+
import { computed, unref } from 'vue';
|
|
4
|
+
import { theme } from 'ant-design-vue';
|
|
5
|
+
import { useStyleRegister } from 'ant-design-vue/es/theme/internal';
|
|
6
|
+
import { useConfigContextInject } from 'ant-design-vue/es/config-provider/context';
|
|
7
|
+
import { genCommonStyle } from 'ant-design-vue/es/style';
|
|
4
8
|
import variableToken from './variable';
|
|
5
9
|
var genCompoentStyle = function genCompoentStyle(styleFn) {
|
|
6
|
-
return
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
return function (_prefixCls) {
|
|
11
|
+
var prefixCls = computed(function () {
|
|
12
|
+
return unref(_prefixCls);
|
|
13
|
+
});
|
|
14
|
+
var _theme$useToken = theme.useToken(),
|
|
15
|
+
themeRef = _theme$useToken.theme,
|
|
16
|
+
token = _theme$useToken.token,
|
|
17
|
+
hashId = _theme$useToken.hashId;
|
|
18
|
+
var _useConfigContextInje = useConfigContextInject(),
|
|
19
|
+
getPrefixCls = _useConfigContextInje.getPrefixCls,
|
|
20
|
+
iconPrefixCls = _useConfigContextInje.iconPrefixCls;
|
|
21
|
+
var rootPrefixCls = computed(function () {
|
|
22
|
+
return getPrefixCls();
|
|
23
|
+
});
|
|
24
|
+
var componentInfo = computed(function () {
|
|
25
|
+
return {
|
|
26
|
+
theme: themeRef.value,
|
|
27
|
+
token: token.value,
|
|
28
|
+
hashId: hashId.value,
|
|
29
|
+
path: ['jetlinks-components', prefixCls.value, rootPrefixCls.value, iconPrefixCls.value]
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
var wrapSSR = useStyleRegister(componentInfo, function () {
|
|
33
|
+
var componentCls = ".".concat(prefixCls.value);
|
|
34
|
+
var componentToken = {
|
|
35
|
+
token: _objectSpread(_objectSpread(_objectSpread({}, token.value), variableToken), {}, {
|
|
36
|
+
componentCls: componentCls,
|
|
37
|
+
prefixCls: prefixCls.value,
|
|
38
|
+
iconCls: ".".concat(iconPrefixCls.value),
|
|
39
|
+
antCls: ".".concat(rootPrefixCls.value)
|
|
40
|
+
}),
|
|
41
|
+
hashId: hashId.value,
|
|
42
|
+
componentCls: componentCls
|
|
43
|
+
};
|
|
44
|
+
return [genCommonStyle(token.value, prefixCls.value)].concat(_toConsumableArray(styleFn.map(function (item) {
|
|
45
|
+
return item(componentToken);
|
|
46
|
+
})));
|
|
47
|
+
});
|
|
48
|
+
return [wrapSSR, hashId];
|
|
49
|
+
};
|
|
16
50
|
};
|
|
17
51
|
export default genCompoentStyle;
|
package/es/style/variable.js
CHANGED
|
@@ -15,8 +15,8 @@ var genCardSelectStyle = function genCardSelectStyle(config) {
|
|
|
15
15
|
gap: '12px'
|
|
16
16
|
}, "".concat(componentCls, "-item"), (0, _defineProperty2.default)({
|
|
17
17
|
padding: '12px',
|
|
18
|
-
border:
|
|
19
|
-
borderRadius:
|
|
18
|
+
border: "".concat(token.lineWidth, "px solid ").concat(token.colorBorderSecondary),
|
|
19
|
+
borderRadius: token.borderRadius,
|
|
20
20
|
cursor: 'pointer',
|
|
21
21
|
'&.active': {
|
|
22
22
|
borderColor: token.colorPrimary
|
|
@@ -26,7 +26,7 @@ var genCardSelectStyle = function genCardSelectStyle(config) {
|
|
|
26
26
|
opacity: 0.7
|
|
27
27
|
}
|
|
28
28
|
}, "".concat(componentCls, "-describe"), {
|
|
29
|
-
color: token.
|
|
29
|
+
color: token.colorTextDescription
|
|
30
30
|
})));
|
|
31
31
|
};
|
|
32
32
|
var _default = exports.default = (0, _styleRegister.default)([genCardSelectStyle]);
|
|
@@ -19,27 +19,27 @@ var genCheckButtonStyle = function genCheckButtonStyle(config) {
|
|
|
19
19
|
minWidth: 0,
|
|
20
20
|
padding: '8px',
|
|
21
21
|
borderRadius: token.borderRadius,
|
|
22
|
-
backgroundColor:
|
|
22
|
+
backgroundColor: token.colorFillTertiary,
|
|
23
23
|
transition: 'all 0.3s',
|
|
24
|
-
color:
|
|
24
|
+
color: token.colorText,
|
|
25
25
|
textAlign: 'center',
|
|
26
26
|
cursor: 'pointer',
|
|
27
27
|
'&:hover': {
|
|
28
|
-
backgroundColor: token.
|
|
28
|
+
backgroundColor: token.colorPrimaryHover,
|
|
29
29
|
opacity: 0.85,
|
|
30
|
-
color:
|
|
30
|
+
color: token.colorTextLightSolid
|
|
31
31
|
},
|
|
32
32
|
'&.selected': {
|
|
33
33
|
backgroundColor: token.colorPrimary,
|
|
34
|
-
color:
|
|
34
|
+
color: token.colorTextLightSolid
|
|
35
35
|
},
|
|
36
36
|
'&.disabled': {
|
|
37
|
-
backgroundColor:
|
|
38
|
-
color:
|
|
37
|
+
backgroundColor: token.colorBgContainerDisabled,
|
|
38
|
+
color: token.colorTextDisabled,
|
|
39
39
|
cursor: 'not-allowed',
|
|
40
40
|
'&:hover': {
|
|
41
|
-
backgroundColor:
|
|
42
|
-
color:
|
|
41
|
+
backgroundColor: token.colorBgContainerDisabled,
|
|
42
|
+
color: token.colorTextDisabled,
|
|
43
43
|
opacity: 1
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -21,19 +21,19 @@ var genDragModalStyle = function genDragModalStyle(config) {
|
|
|
21
21
|
flexDirection: 'column',
|
|
22
22
|
overflow: 'hidden',
|
|
23
23
|
zIndex: 23456765435,
|
|
24
|
-
backgroundColor:
|
|
24
|
+
backgroundColor: token.colorBgElevated,
|
|
25
25
|
borderRadius: 4,
|
|
26
|
-
border:
|
|
27
|
-
boxShadow:
|
|
26
|
+
border: "".concat(token.lineWidth, "px solid ").concat(token.colorPrimaryBorder),
|
|
27
|
+
boxShadow: token.boxShadowSecondary,
|
|
28
28
|
header: {
|
|
29
29
|
padding: '5px 15px',
|
|
30
30
|
fontSize: 18,
|
|
31
31
|
fontWeight: 700,
|
|
32
|
-
color:
|
|
32
|
+
color: token.colorTextHeading,
|
|
33
33
|
display: 'flex',
|
|
34
34
|
justifyContent: 'space-between',
|
|
35
35
|
alignItems: 'center',
|
|
36
|
-
borderBottom:
|
|
36
|
+
borderBottom: "".concat(token.lineWidth, "px solid ").concat(token.colorSplit),
|
|
37
37
|
cursor: 'move'
|
|
38
38
|
}
|
|
39
39
|
}, "".concat(componentCls, "-body"), {
|
|
@@ -42,7 +42,7 @@ var genDragModalStyle = function genDragModalStyle(config) {
|
|
|
42
42
|
overflowY: 'auto',
|
|
43
43
|
padding: '24px 20px'
|
|
44
44
|
}), "".concat(componentCls, "-footer"), {
|
|
45
|
-
borderTop:
|
|
45
|
+
borderTop: "".concat(token.lineWidth, "px solid ").concat(token.colorSplit),
|
|
46
46
|
padding: '5px 15px'
|
|
47
47
|
})), "".concat(componentCls, "-range"), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
48
48
|
position: 'absolute',
|
|
@@ -30,6 +30,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
30
30
|
"Schema": "setup-maybe-ref",
|
|
31
31
|
"useInjectError": "setup-maybe-ref",
|
|
32
32
|
"useInjectForm": "setup-maybe-ref",
|
|
33
|
+
"useTableWrapper": "setup-maybe-ref",
|
|
33
34
|
"TABLE_FORM_ITEM_ERROR": "setup-maybe-ref",
|
|
34
35
|
"genEditTableStyle": "setup-maybe-ref",
|
|
35
36
|
"fieldPool": "setup-maybe-ref",
|
|
@@ -41,6 +42,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
41
42
|
"visible": "setup-ref",
|
|
42
43
|
"context": "setup-maybe-ref",
|
|
43
44
|
"globalErrorMessage": "setup-maybe-ref",
|
|
45
|
+
"tableWrapperRef": "setup-maybe-ref",
|
|
44
46
|
"hideTimer": "setup-let",
|
|
45
47
|
"cachedSchema": "setup-let",
|
|
46
48
|
"cachedRulesHash": "setup-let",
|
|
@@ -76,7 +78,7 @@ import { onBeforeUnmount, computed, shallowReactive, watch, provide, toRaw, onMo
|
|
|
76
78
|
import { get, isArray } from 'lodash-es';
|
|
77
79
|
import { useProvideFormItemContext } from 'ant-design-vue/lib/form/FormItemContext';
|
|
78
80
|
import Schema from 'async-validator';
|
|
79
|
-
import { useInjectError, useInjectForm } from "./hooks";
|
|
81
|
+
import { useInjectError, useInjectForm, useTableWrapper } from "./hooks";
|
|
80
82
|
import { TABLE_FORM_ITEM_ERROR } from "./consts";
|
|
81
83
|
import genEditTableStyle from './style';
|
|
82
84
|
import { fieldPool } from './fieldPool';
|
|
@@ -98,6 +100,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
98
100
|
const visible = ref(false);
|
|
99
101
|
const context = useInjectForm();
|
|
100
102
|
const globalErrorMessage = useInjectError();
|
|
103
|
+
const tableWrapperRef = useTableWrapper();
|
|
101
104
|
let hideTimer = null;
|
|
102
105
|
// 缓存 Schema 实例,避免重复创建
|
|
103
106
|
let cachedSchema = null;
|
|
@@ -145,7 +148,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
145
148
|
});
|
|
146
149
|
// 向下提供错误状态
|
|
147
150
|
provide(TABLE_FORM_ITEM_ERROR, errorState);
|
|
148
|
-
const popContainer = (e) => e;
|
|
151
|
+
const popContainer = (e) => _optionalChain([tableWrapperRef, 'optionalAccess', _4 => _4.value]) || e.parentElement || document.body;
|
|
149
152
|
const removeTimer = () => {
|
|
150
153
|
if (hideTimer) {
|
|
151
154
|
clearTimeout(hideTimer);
|
|
@@ -171,7 +174,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
171
174
|
return props.rules;
|
|
172
175
|
}
|
|
173
176
|
// 从 context 中获取规则
|
|
174
|
-
if (_optionalChain([context, 'access',
|
|
177
|
+
if (_optionalChain([context, 'access', _5 => _5.rules, 'optionalAccess', _6 => _6.value]) && fieldName.value) {
|
|
175
178
|
const rules = context.rules.value[fieldName.value];
|
|
176
179
|
if (Array.isArray(rules)) {
|
|
177
180
|
return rules;
|
|
@@ -210,7 +213,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
210
213
|
const schema = getSchema();
|
|
211
214
|
if (!schema) {
|
|
212
215
|
hideErrorTip();
|
|
213
|
-
_optionalChain([context, 'access',
|
|
216
|
+
_optionalChain([context, 'access', _7 => _7.removeFieldError, 'optionalCall', _8 => _8(eventKey.value)]);
|
|
214
217
|
resolve();
|
|
215
218
|
return;
|
|
216
219
|
}
|
|
@@ -221,12 +224,12 @@ const __sfc_main__ = _defineComponent({
|
|
|
221
224
|
if (errors && errors.length > 0) {
|
|
222
225
|
const errorMsg = errors[0].message || '校验失败';
|
|
223
226
|
showErrorTip(errorMsg);
|
|
224
|
-
_optionalChain([context, 'access',
|
|
227
|
+
_optionalChain([context, 'access', _9 => _9.addFieldError, 'optionalCall', _10 => _10(eventKey.value, errorMsg)]);
|
|
225
228
|
reject(errors);
|
|
226
229
|
}
|
|
227
230
|
else {
|
|
228
231
|
hideErrorTip();
|
|
229
|
-
_optionalChain([context, 'access',
|
|
232
|
+
_optionalChain([context, 'access', _11 => _11.removeFieldError, 'optionalCall', _12 => _12(eventKey.value)]);
|
|
230
233
|
resolve();
|
|
231
234
|
}
|
|
232
235
|
});
|
|
@@ -239,18 +242,18 @@ const __sfc_main__ = _defineComponent({
|
|
|
239
242
|
const promise = context.validateItem({ [fieldName.value]: fieldValue.value }, rowIndex.value);
|
|
240
243
|
promise.then(() => {
|
|
241
244
|
hideErrorTip();
|
|
242
|
-
_optionalChain([context, 'access',
|
|
245
|
+
_optionalChain([context, 'access', _13 => _13.removeFieldError, 'optionalCall', _14 => _14(eventKey.value)]);
|
|
243
246
|
}).catch((res) => {
|
|
244
|
-
const error = _optionalChain([res, 'optionalAccess',
|
|
247
|
+
const error = _optionalChain([res, 'optionalAccess', _15 => _15.filter, 'call', _16 => _16((item) => item.field === fieldName.value)]) || [];
|
|
245
248
|
if (error.length === 0) {
|
|
246
249
|
hideErrorTip();
|
|
247
|
-
_optionalChain([context, 'access',
|
|
250
|
+
_optionalChain([context, 'access', _17 => _17.removeFieldError, 'optionalCall', _18 => _18(eventKey.value)]);
|
|
248
251
|
}
|
|
249
252
|
else {
|
|
250
253
|
removeTimer();
|
|
251
|
-
errorState.message = _optionalChain([error, 'access',
|
|
254
|
+
errorState.message = _optionalChain([error, 'access', _19 => _19[0], 'optionalAccess', _20 => _20.message]) || errorState.message;
|
|
252
255
|
errorState.visible = !!error.length;
|
|
253
|
-
_optionalChain([context, 'access',
|
|
256
|
+
_optionalChain([context, 'access', _21 => _21.addFieldError, 'optionalCall', _22 => _22(eventKey.value, errorState.message)]);
|
|
254
257
|
}
|
|
255
258
|
});
|
|
256
259
|
return promise;
|
|
@@ -272,7 +275,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
272
275
|
}, { immediate: true });
|
|
273
276
|
watch(() => {
|
|
274
277
|
const key = currentEventKey.value;
|
|
275
|
-
return key ? _optionalChain([globalErrorMessage, 'optionalAccess',
|
|
278
|
+
return key ? _optionalChain([globalErrorMessage, 'optionalAccess', _23 => _23.value, 'optionalAccess', _24 => _24[key]]) : undefined;
|
|
276
279
|
}, (errorMsg) => {
|
|
277
280
|
if (errorMsg) {
|
|
278
281
|
showErrorTip(errorMsg);
|
|
@@ -294,7 +297,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
294
297
|
onFieldChange,
|
|
295
298
|
onFieldBlur,
|
|
296
299
|
}, computed(() => {
|
|
297
|
-
return get(_optionalChain([context, 'access',
|
|
300
|
+
return get(_optionalChain([context, 'access', _25 => _25.dataSource, 'optionalAccess', _26 => _26.value]), props.name);
|
|
298
301
|
}));
|
|
299
302
|
// 注册字段到父组件 - 使用字段池复用
|
|
300
303
|
let isRegistered = false;
|
|
@@ -307,7 +310,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
307
310
|
validateRules,
|
|
308
311
|
showErrorTip
|
|
309
312
|
});
|
|
310
|
-
_optionalChain([context, 'access',
|
|
313
|
+
_optionalChain([context, 'access', _27 => _27.addField, 'optionalCall', _28 => _28(eventKey.value, fieldInfo)]);
|
|
311
314
|
isRegistered = true;
|
|
312
315
|
}
|
|
313
316
|
};
|
|
@@ -318,7 +321,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
318
321
|
onBeforeUnmount(() => {
|
|
319
322
|
removeTimer();
|
|
320
323
|
if (isRegistered) {
|
|
321
|
-
_optionalChain([context, 'access',
|
|
324
|
+
_optionalChain([context, 'access', _29 => _29.removeField, 'optionalCall', _30 => _30(eventKey.value)]);
|
|
322
325
|
fieldPool.release(eventKey.value);
|
|
323
326
|
isRegistered = false;
|
|
324
327
|
}
|
|
@@ -22,16 +22,21 @@ 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
|
+
"computed": "setup-const",
|
|
25
26
|
"ref": "setup-const",
|
|
26
27
|
"reactive": "setup-const",
|
|
28
|
+
"theme": "setup-maybe-ref",
|
|
27
29
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
28
30
|
"props": "setup-reactive-const",
|
|
29
31
|
"emit": "setup-const",
|
|
30
32
|
"contextLocale": "setup-maybe-ref",
|
|
31
33
|
"tableWrapperRef": "setup-maybe-ref",
|
|
32
34
|
"tableTool": "setup-maybe-ref",
|
|
35
|
+
"token": "setup-maybe-ref",
|
|
33
36
|
"visible": "setup-ref",
|
|
34
37
|
"mySelectedRowKeys": "setup-ref",
|
|
38
|
+
"sortIconColor": "setup-ref",
|
|
39
|
+
"sortIconActiveColor": "setup-ref",
|
|
35
40
|
"columns": "setup-reactive-const",
|
|
36
41
|
"visibleChange": "setup-const",
|
|
37
42
|
"onSelectChange": "setup-const",
|
|
@@ -40,13 +45,15 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
40
45
|
"onAsc": "setup-const",
|
|
41
46
|
"onDesc": "setup-const"
|
|
42
47
|
} */
|
|
48
|
+
import { useCssVars as _useCssVars } from 'vue';
|
|
43
49
|
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";
|
|
44
50
|
const _hoisted_1 = { class: "jetlinks-table-sort-content" };
|
|
45
51
|
const _hoisted_2 = { class: "jetlinks-table-sort-title" };
|
|
46
52
|
const _hoisted_3 = { class: "table-sort-body" };
|
|
47
53
|
const _hoisted_4 = { class: "jetlinks-table-sort-footer" };
|
|
48
54
|
import { useTableTool, useTableWrapper } from "../../context";
|
|
49
|
-
import { ref, reactive } from 'vue';
|
|
55
|
+
import { computed, ref, reactive } from 'vue';
|
|
56
|
+
import { theme } from 'ant-design-vue';
|
|
50
57
|
import { useLocaleReceiver } from "../../../LocaleReciver";
|
|
51
58
|
const __sfc_main__ = Object.assign({
|
|
52
59
|
name: 'JEditTableSearchSort'
|
|
@@ -75,14 +82,21 @@ const __sfc_main__ = Object.assign({
|
|
|
75
82
|
},
|
|
76
83
|
emits: ['click'],
|
|
77
84
|
setup(__props, { emit: __emit }) {
|
|
85
|
+
_useCssVars(_ctx => ({
|
|
86
|
+
"1787815589180-sortIconColor": (sortIconColor.value),
|
|
87
|
+
"1787815589180-sortIconActiveColor": (sortIconActiveColor.value)
|
|
88
|
+
}));
|
|
78
89
|
const props = __props;
|
|
79
90
|
const emit = __emit;
|
|
80
91
|
const [contextLocale] = useLocaleReceiver('EditTable');
|
|
81
92
|
const tableWrapperRef = useTableWrapper();
|
|
82
93
|
const tableTool = useTableTool();
|
|
94
|
+
const { token } = theme.useToken();
|
|
83
95
|
const visible = ref(false);
|
|
84
96
|
const dataSource = ref([]);
|
|
85
97
|
const mySelectedRowKeys = ref([]);
|
|
98
|
+
const sortIconColor = computed(() => token.value.colorTextDisabled);
|
|
99
|
+
const sortIconActiveColor = computed(() => token.value.colorPrimary);
|
|
86
100
|
const columns = reactive([
|
|
87
101
|
{
|
|
88
102
|
dataIndex: 'name',
|
|
@@ -6,15 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.genEditTableBodyStyle = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
10
|
+
var _scrollbar = require("../../style/scrollbar");
|
|
9
11
|
var genEditTableBodyStyle = exports.genEditTableBodyStyle = function genEditTableBodyStyle(config) {
|
|
10
12
|
var componentCls = config.componentCls,
|
|
11
13
|
token = config.token;
|
|
12
|
-
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-edit-table-body-viewport', (0,
|
|
14
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-edit-table-body-viewport', (0, _objectSpread3.default)((0, _objectSpread3.default)({
|
|
13
15
|
maxHeight: '100%',
|
|
14
16
|
width: '100%',
|
|
15
17
|
overflow: 'hidden auto',
|
|
16
18
|
position: 'relative'
|
|
17
|
-
}, '.jetlinks-edit-scrollbar', {
|
|
19
|
+
}, (0, _scrollbar.genTokenScrollbarStyle)(token)), {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, '.jetlinks-edit-scrollbar', {
|
|
18
20
|
position: 'absolute',
|
|
19
21
|
left: 0,
|
|
20
22
|
top: 0,
|
|
@@ -33,14 +35,14 @@ var genEditTableBodyStyle = exports.genEditTableBodyStyle = function genEditTabl
|
|
|
33
35
|
display: 'flex',
|
|
34
36
|
alignItems: 'center',
|
|
35
37
|
transition: 'top .2s, height .2s, background-color .1s',
|
|
36
|
-
borderBottom:
|
|
38
|
+
borderBottom: "".concat(token.lineWidth, "px solid ").concat(token.colorBorderSecondary)
|
|
37
39
|
}, '.jetlinks-edit-table-cell', {
|
|
38
40
|
position: 'absolute',
|
|
39
41
|
minWidth: 0
|
|
40
42
|
}), '&:hover', {
|
|
41
|
-
backgroundColor:
|
|
43
|
+
backgroundColor: token.colorFillQuaternary
|
|
42
44
|
}), '&.jetlinks-edit-table-row-selected', {
|
|
43
|
-
backgroundColor:
|
|
45
|
+
backgroundColor: token.colorPrimaryBg
|
|
44
46
|
}), '.body-cell-box', {
|
|
45
47
|
padding: '0 12px',
|
|
46
48
|
position: 'relative'
|
|
@@ -51,7 +53,7 @@ var genEditTableBodyStyle = exports.genEditTableBodyStyle = function genEditTabl
|
|
|
51
53
|
right: 0,
|
|
52
54
|
bottom: 0,
|
|
53
55
|
zIndex: 4
|
|
54
|
-
}))), '.jetlinks-edit-table-body-empty', {
|
|
56
|
+
})))), '.jetlinks-edit-table-body-empty', {
|
|
55
57
|
display: 'flex',
|
|
56
58
|
width: '100%',
|
|
57
59
|
justifyContent: 'center',
|
|
@@ -14,12 +14,12 @@ var genEditTableGroupStyle = exports.genEditTableGroupStyle = function genEditTa
|
|
|
14
14
|
overflow: 'hidden',
|
|
15
15
|
position: 'relative'
|
|
16
16
|
}), '.ant-tabs-tab-active', {
|
|
17
|
-
backgroundColor:
|
|
18
|
-
borderColor:
|
|
17
|
+
backgroundColor: "".concat(token.colorPrimaryBg, " !important"),
|
|
18
|
+
borderColor: "".concat(token.colorPrimaryBorder, " !important")
|
|
19
19
|
}), '.ant-tabs-nav-add', {
|
|
20
20
|
border: 'none'
|
|
21
21
|
}))), '.jetlinks-table-group-error-wrap', (0, _defineProperty2.default)({
|
|
22
|
-
color:
|
|
22
|
+
color: "".concat(token.colorText, " !important")
|
|
23
23
|
}, '.table-group-error-target', {
|
|
24
24
|
position: 'absolute',
|
|
25
25
|
right: 0,
|
|
@@ -17,7 +17,7 @@ var genEditTableHeaderStyle = exports.genEditTableHeaderStyle = function genEdit
|
|
|
17
17
|
float: 'left',
|
|
18
18
|
overflow: 'visible',
|
|
19
19
|
position: 'absolute',
|
|
20
|
-
background:
|
|
20
|
+
background: token.colorFillQuaternary,
|
|
21
21
|
top: 0
|
|
22
22
|
}, '.jetlinks-edit-table-header-cell-box', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({
|
|
23
23
|
padding: '0 12px',
|
|
@@ -46,7 +46,7 @@ var genEditTableHeaderStyle = exports.genEditTableHeaderStyle = function genEdit
|
|
|
46
46
|
width: '1px',
|
|
47
47
|
height: '1.6em',
|
|
48
48
|
pointerEvents: 'none',
|
|
49
|
-
backgroundColor:
|
|
49
|
+
backgroundColor: token.colorSplit,
|
|
50
50
|
transform: 'translateY(-50%)',
|
|
51
51
|
transition: 'background-color .3s',
|
|
52
52
|
content: '""'
|
|
@@ -60,6 +60,6 @@ var genEditTableHeaderStyle = exports.genEditTableHeaderStyle = function genEdit
|
|
|
60
60
|
}, '.jetlinks-drag-modal-footer', {
|
|
61
61
|
display: 'none'
|
|
62
62
|
}), '.jetlinks-table-search-result-total', {
|
|
63
|
-
color:
|
|
63
|
+
color: token.colorPrimary
|
|
64
64
|
})));
|
|
65
65
|
};
|
|
@@ -9,12 +9,12 @@ var genMenuStyle = exports.genMenuStyle = function genMenuStyle(config) {
|
|
|
9
9
|
return {
|
|
10
10
|
'.jetlinks-edit-table-context-menu': {
|
|
11
11
|
position: 'fixed',
|
|
12
|
-
boxShadow: '0 0 12px rgba(0, 0, 0 ,.2)',
|
|
13
12
|
borderRadius: '4px',
|
|
14
13
|
overflow: 'hidden',
|
|
15
14
|
width: '192px',
|
|
16
15
|
padding: '4px',
|
|
17
|
-
backgroundColor:
|
|
16
|
+
backgroundColor: token.colorBgElevated,
|
|
17
|
+
boxShadow: token.boxShadowSecondary,
|
|
18
18
|
'.ant-menu': {
|
|
19
19
|
borderRight: 'none',
|
|
20
20
|
'.ant-menu-item': {
|
|
@@ -26,7 +26,7 @@ var genMenuStyle = exports.genMenuStyle = function genMenuStyle(config) {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
'.ant-menu-item-active': {
|
|
29
|
-
backgroundColor:
|
|
29
|
+
backgroundColor: token.colorPrimaryBg
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
};
|
|
@@ -8,7 +8,7 @@ var genTableStyle = exports.genTableStyle = function genTableStyle(config) {
|
|
|
8
8
|
var token = config.token;
|
|
9
9
|
return {
|
|
10
10
|
'.jetlinks-edit-table-wrapper': {
|
|
11
|
-
background:
|
|
11
|
+
background: token.colorBgContainer,
|
|
12
12
|
height: '100%',
|
|
13
13
|
position: 'relative',
|
|
14
14
|
'&.table-full-screen': {
|
|
@@ -19,7 +19,7 @@ var genTableStyle = exports.genTableStyle = function genTableStyle(config) {
|
|
|
19
19
|
flexDirection: 'column',
|
|
20
20
|
flexGrow: 0,
|
|
21
21
|
flexShrink: 0,
|
|
22
|
-
background:
|
|
22
|
+
background: token.colorFillQuaternary,
|
|
23
23
|
transition: 'background-color .3s ease',
|
|
24
24
|
overflow: 'auto hidden',
|
|
25
25
|
'.jetlinks-edit-table-header': {
|
|
@@ -28,7 +28,7 @@ var genTableStyle = exports.genTableStyle = function genTableStyle(config) {
|
|
|
28
28
|
position: 'relative'
|
|
29
29
|
},
|
|
30
30
|
'.jetlinks-edit-table-body': {
|
|
31
|
-
backgroundColor:
|
|
31
|
+
backgroundColor: token.colorBgContainer,
|
|
32
32
|
overflowY: 'hidden',
|
|
33
33
|
position: 'relative',
|
|
34
34
|
height: '100%',
|