@jetlinks-web/components 2.7.0 → 3.0.0
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 +2 -3
- package/es/BadgeStatus/Badge.js +2 -3
- package/es/CardSelect/CardSelect.js +23 -18
- 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/ConfigProvider/index.js +1 -1
- package/es/DragModal/DragModal.js +15 -9
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +14 -8
- package/es/EditTable/FormItem.js +15 -10
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +12 -6
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +24 -19
- 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 +1 -1
- package/es/Ellipsis/Ellipsis.js +11 -3
- package/es/Ellipsis/style/index.js +24 -1
- package/es/Empty/Empty.js +1 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +4 -5
- package/es/ProLayout/Basic/BasicLayout.js +46 -42
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +4 -8
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +20 -16
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +14 -37
- package/es/ProLayout/SiderMenu/SiderMenu.js +25 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +12 -11
- 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 +13 -5
- package/es/ProTable/Content.js +22 -14
- package/es/ProTable/Header.js +22 -12
- package/es/ProTable/Pagination.js +13 -5
- package/es/ProTable/ProTable.js +43 -27
- 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 +24 -17
- package/es/Search/Advanced/SaveHistory.js +2 -3
- package/es/Search/Advanced/index.js +213 -293
- 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 +64 -0
- package/es/Skeleton/components/DashBoardChart.js +96 -0
- package/es/Skeleton/components/Detail.js +110 -0
- package/es/Skeleton/components/Drawer.js +91 -0
- package/es/Skeleton/components/Item.js +68 -0
- package/es/Skeleton/components/List.js +45 -0
- package/es/Skeleton/components/ListCard.js +63 -0
- package/es/Skeleton/components/ListCardItem.js +86 -0
- package/es/Skeleton/components/ListTable.js +76 -0
- package/es/Skeleton/components/Page.js +62 -0
- package/es/Skeleton/components/Search.js +54 -0
- package/es/Skeleton/components/Tree.js +72 -0
- package/es/Skeleton/index.js +15 -0
- package/es/Skeleton/skeleton.js +58 -0
- package/es/Skeleton/style/index.js +132 -0
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +29 -72
- package/es/components.js +0 -3
- package/es/locale/en-US.js +0 -7
- package/es/locale/zh-CN.js +0 -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 -12
- package/lib/AutoComplete/AutoComplete.js +1 -2
- package/lib/BadgeStatus/Badge.js +2 -3
- package/lib/CardSelect/CardSelect.js +23 -18
- 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/ConfigProvider/context.js +1 -1
- package/lib/ConfigProvider/index.js +3 -3
- package/lib/DragModal/DragModal.js +15 -9
- 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 +16 -11
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +12 -6
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +24 -19
- 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 +1 -1
- package/lib/Ellipsis/Ellipsis.js +11 -3
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/Empty/Empty.js +1 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +9 -10
- package/lib/ProLayout/Basic/BasicLayout.js +55 -51
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +6 -10
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +24 -20
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +18 -40
- package/lib/ProLayout/SiderMenu/SiderMenu.js +28 -39
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +12 -10
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/defaultSettings.js +1 -1
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +13 -5
- package/lib/ProTable/Content.js +22 -14
- package/lib/ProTable/Header.js +22 -12
- package/lib/ProTable/Pagination.js +13 -5
- package/lib/ProTable/ProTable.js +43 -27
- package/lib/ProTable/setting.js +3 -3
- 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 +24 -17
- package/lib/Search/Advanced/SaveHistory.js +2 -3
- package/lib/Search/Advanced/index.js +213 -293
- 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 +64 -0
- package/lib/Skeleton/components/DashBoardChart.js +96 -0
- package/lib/Skeleton/components/Detail.js +110 -0
- package/lib/Skeleton/components/Drawer.js +91 -0
- package/lib/Skeleton/components/Item.js +68 -0
- package/lib/Skeleton/components/List.js +45 -0
- package/lib/Skeleton/components/ListCard.js +63 -0
- package/lib/Skeleton/components/ListCardItem.js +86 -0
- package/lib/Skeleton/components/ListTable.js +76 -0
- package/lib/Skeleton/components/Page.js +62 -0
- package/lib/Skeleton/components/Search.js +54 -0
- package/lib/Skeleton/components/Tree.js +72 -0
- package/lib/Skeleton/index.js +75 -0
- package/lib/Skeleton/skeleton.js +58 -0
- package/lib/Skeleton/style/index.js +139 -0
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +29 -72
- package/lib/components.js +0 -21
- package/lib/locale/en-US.js +0 -7
- package/lib/locale/zh-CN.js +0 -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 -14
- package/package.json +13 -14
- 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/MonacoEditor/Monaco.js +0 -242
- package/es/MonacoEditor/index.js +0 -5
- package/es/MonacoEditor/style/index.css +0 -4
- package/es/MonacoEditor/style/index.js +0 -1
- package/es/MonacoEditor/style/index.less +0 -4
- 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 -141
- 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/Title/style/index.css +0 -23
- package/es/Title/style/index.less +0 -25
- package/es/style/index.css +0 -5197
- package/es/style/index.less +0 -13
- 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/MonacoEditor/Monaco.js +0 -242
- package/lib/MonacoEditor/index.js +0 -12
- package/lib/MonacoEditor/style/index.css +0 -4
- package/lib/MonacoEditor/style/index.js +0 -3
- package/lib/MonacoEditor/style/index.less +0 -4
- 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 -141
- 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/Title/style/index.css +0 -23
- package/lib/Title/style/index.less +0 -25
- package/lib/style/index.css +0 -5197
- package/lib/style/index.less +0 -13
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
package/es/ProTable/Content.js
CHANGED
|
@@ -24,10 +24,14 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
24
24
|
"omit": "setup-maybe-ref",
|
|
25
25
|
"Empty": "setup-maybe-ref",
|
|
26
26
|
"useTableInject": "setup-maybe-ref",
|
|
27
|
+
"useProTableStyle": "setup-maybe-ref",
|
|
27
28
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
28
29
|
"props": "setup-reactive-const",
|
|
29
30
|
"slots": "setup-maybe-ref",
|
|
30
31
|
"contextLocale": "setup-maybe-ref",
|
|
32
|
+
"prefixCls": "setup-ref",
|
|
33
|
+
"wrapSSR": "setup-maybe-ref",
|
|
34
|
+
"hashId": "setup-maybe-ref",
|
|
31
35
|
"_rowSelection": "setup-maybe-ref",
|
|
32
36
|
"_columns": "setup-ref",
|
|
33
37
|
"_slots": "setup-ref",
|
|
@@ -40,27 +44,27 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
40
44
|
"handleCheckedAllChange": "setup-const"
|
|
41
45
|
} */
|
|
42
46
|
import { defineComponent as _defineComponent } from 'vue';
|
|
43
|
-
import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment,
|
|
44
|
-
const _hoisted_1 = {
|
|
45
|
-
const _hoisted_2 = {
|
|
47
|
+
import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, normalizeProps as _normalizeProps, createSlots as _createSlots, createBlock as _createBlock } from "vue";
|
|
48
|
+
const _hoisted_1 = {
|
|
46
49
|
key: 0,
|
|
47
50
|
class: "jtable-card"
|
|
48
51
|
};
|
|
49
|
-
const
|
|
52
|
+
const _hoisted_2 = {
|
|
50
53
|
key: 0,
|
|
51
54
|
style: { "margin-bottom": "10px" }
|
|
52
55
|
};
|
|
53
|
-
const
|
|
54
|
-
const
|
|
56
|
+
const _hoisted_3 = ["onClick"];
|
|
57
|
+
const _hoisted_4 = {
|
|
55
58
|
key: 2,
|
|
56
59
|
class: "j-table-empty"
|
|
57
60
|
};
|
|
58
61
|
import { useSlots, computed } from 'vue';
|
|
59
62
|
import { _contentProps } from "./setting";
|
|
60
|
-
import { Table } from 'ant-design-vue
|
|
63
|
+
import { Table } from 'ant-design-vue';
|
|
61
64
|
import { get, omit } from 'lodash-es';
|
|
62
65
|
import Empty from '../Empty';
|
|
63
66
|
import { useTableInject } from './hooks';
|
|
67
|
+
import useProTableStyle from './style';
|
|
64
68
|
import { useLocaleReceiver } from "../LocaleReciver";
|
|
65
69
|
const __sfc_main__ = _defineComponent({
|
|
66
70
|
...{
|
|
@@ -77,6 +81,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
77
81
|
const props = __props;
|
|
78
82
|
const slots = useSlots();
|
|
79
83
|
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
84
|
+
const prefixCls = computed(() => 'pro-table');
|
|
85
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
80
86
|
const _rowSelection = useTableInject();
|
|
81
87
|
const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
|
|
82
88
|
const _slots = computed(() => {
|
|
@@ -118,11 +124,13 @@ const __sfc_main__ = _defineComponent({
|
|
|
118
124
|
};
|
|
119
125
|
return (_ctx, _cache) => {
|
|
120
126
|
const _component_a_checkbox = _resolveComponent("a-checkbox");
|
|
121
|
-
return (_openBlock(), _createElementBlock("div",
|
|
127
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
128
|
+
class: _normalizeClass(['jtable-box', _unref(hashId)])
|
|
129
|
+
}, [
|
|
122
130
|
(_ctx.mode === 'CARD')
|
|
123
|
-
? (_openBlock(), _createElementBlock("div",
|
|
131
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
124
132
|
(__rowSelection.value && __rowSelection.value.type === 'checkbox')
|
|
125
|
-
? (_openBlock(), _createElementBlock("div",
|
|
133
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_2, [
|
|
126
134
|
_createVNode(_component_a_checkbox, {
|
|
127
135
|
indeterminate: indeterminate.value,
|
|
128
136
|
checked: checkedAll.value,
|
|
@@ -147,11 +155,11 @@ const __sfc_main__ = _defineComponent({
|
|
|
147
155
|
key: item[props.rowKey],
|
|
148
156
|
onClick: ($event) => (onClick(item))
|
|
149
157
|
}, [
|
|
150
|
-
_renderSlot(_ctx.$slots, "card",
|
|
151
|
-
], 10 /* CLASS, PROPS */,
|
|
158
|
+
_renderSlot(_ctx.$slots, "card", _mergeProps({ ref_for: true }, item))
|
|
159
|
+
], 10 /* CLASS, PROPS */, _hoisted_3));
|
|
152
160
|
}), 128 /* KEYED_FRAGMENT */))
|
|
153
161
|
], 4 /* STYLE */))
|
|
154
|
-
: (_openBlock(), _createElementBlock("div",
|
|
162
|
+
: (_openBlock(), _createElementBlock("div", _hoisted_4, [
|
|
155
163
|
_renderSlot(_ctx.$slots, "emptyText", {}, () => [
|
|
156
164
|
_createVNode(_unref(Empty))
|
|
157
165
|
])
|
|
@@ -193,7 +201,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
193
201
|
};
|
|
194
202
|
})
|
|
195
203
|
]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["row-selection", "dataSource", "columns", "scroll", "class"]))
|
|
196
|
-
]));
|
|
204
|
+
], 2 /* CLASS */));
|
|
197
205
|
};
|
|
198
206
|
}
|
|
199
207
|
});
|
package/es/ProTable/Header.js
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
/* Analyzed bindings: {
|
|
2
2
|
"initMode": "props",
|
|
3
|
+
"computed": "setup-const",
|
|
3
4
|
"RadioGroup": "setup-maybe-ref",
|
|
4
5
|
"RadioButton": "setup-maybe-ref",
|
|
5
6
|
"AIcon": "setup-maybe-ref",
|
|
6
7
|
"_headerProps": "setup-maybe-ref",
|
|
8
|
+
"useProTableStyle": "setup-maybe-ref",
|
|
7
9
|
"props": "setup-reactive-const",
|
|
8
|
-
"emits": "setup-const"
|
|
10
|
+
"emits": "setup-const",
|
|
11
|
+
"prefixCls": "setup-ref",
|
|
12
|
+
"wrapSSR": "setup-maybe-ref",
|
|
13
|
+
"hashId": "setup-maybe-ref"
|
|
9
14
|
} */
|
|
10
15
|
import { defineComponent as _defineComponent } from 'vue';
|
|
11
|
-
import {
|
|
12
|
-
const _hoisted_1 = { class: "jtable-body-header" };
|
|
13
|
-
const _hoisted_2 = { class: "jtable-body-header-
|
|
14
|
-
const _hoisted_3 = {
|
|
15
|
-
const _hoisted_4 = {
|
|
16
|
+
import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass } from "vue";
|
|
17
|
+
const _hoisted_1 = { class: "jtable-body-header-left" };
|
|
18
|
+
const _hoisted_2 = { class: "jtable-body-header-right" };
|
|
19
|
+
const _hoisted_3 = {
|
|
16
20
|
key: 0,
|
|
17
21
|
class: "table-body-header-right-button"
|
|
18
22
|
};
|
|
19
|
-
import {
|
|
23
|
+
import { computed } from 'vue';
|
|
24
|
+
import { RadioGroup, RadioButton } from 'ant-design-vue';
|
|
20
25
|
import AIcon from '../Icon';
|
|
21
26
|
import { _headerProps } from './setting';
|
|
27
|
+
import useProTableStyle from './style';
|
|
22
28
|
const __sfc_main__ = _defineComponent({
|
|
23
29
|
...{
|
|
24
30
|
name: 'Header'
|
|
@@ -34,15 +40,19 @@ const __sfc_main__ = _defineComponent({
|
|
|
34
40
|
setup(__props, { emit: __emit }) {
|
|
35
41
|
const props = __props;
|
|
36
42
|
const emits = __emit;
|
|
43
|
+
const prefixCls = computed(() => 'pro-table');
|
|
44
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
37
45
|
return (_ctx, _cache) => {
|
|
38
|
-
return (_openBlock(), _createElementBlock("div",
|
|
39
|
-
|
|
46
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
47
|
+
class: _normalizeClass(['jtable-body-header', _unref(hashId)])
|
|
48
|
+
}, [
|
|
49
|
+
_createElementVNode("div", _hoisted_1, [
|
|
40
50
|
_renderSlot(_ctx.$slots, "headerLeftRender")
|
|
41
51
|
]),
|
|
42
|
-
_createElementVNode("div",
|
|
52
|
+
_createElementVNode("div", _hoisted_2, [
|
|
43
53
|
_renderSlot(_ctx.$slots, "headerRightRender"),
|
|
44
54
|
(!__props.initMode)
|
|
45
|
-
? (_openBlock(), _createElementBlock("div",
|
|
55
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_3, [
|
|
46
56
|
_createVNode(_unref(RadioGroup), {
|
|
47
57
|
value: _ctx.mode,
|
|
48
58
|
onChange: _cache[0] || (_cache[0] = (e) => emits('change', e))
|
|
@@ -66,7 +76,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
66
76
|
]))
|
|
67
77
|
: _createCommentVNode("v-if", true)
|
|
68
78
|
])
|
|
69
|
-
]));
|
|
79
|
+
], 2 /* CLASS */));
|
|
70
80
|
};
|
|
71
81
|
}
|
|
72
82
|
});
|
|
@@ -19,20 +19,24 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
19
19
|
"_paginationProps": "setup-maybe-ref",
|
|
20
20
|
"computed": "setup-const",
|
|
21
21
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
22
|
+
"useProTableStyle": "setup-maybe-ref",
|
|
22
23
|
"props": "setup-reactive-const",
|
|
23
24
|
"emits": "setup-const",
|
|
24
25
|
"contextLocale": "setup-maybe-ref",
|
|
26
|
+
"prefixCls": "setup-ref",
|
|
27
|
+
"wrapSSR": "setup-maybe-ref",
|
|
28
|
+
"hashId": "setup-maybe-ref",
|
|
25
29
|
"className": "setup-ref",
|
|
26
30
|
"_showTotal": "setup-const",
|
|
27
31
|
"onChange": "setup-const"
|
|
28
32
|
} */
|
|
29
33
|
import { defineComponent as _defineComponent } from 'vue';
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
import { Pagination } from 'ant-design-vue/es/';
|
|
34
|
+
import { unref as _unref, renderSlot as _renderSlot, mergeProps as _mergeProps, createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
35
|
+
import { Pagination } from 'ant-design-vue';
|
|
33
36
|
import { _paginationProps } from "./setting";
|
|
34
37
|
import { computed } from 'vue';
|
|
35
38
|
import { useLocaleReceiver } from "../LocaleReciver";
|
|
39
|
+
import useProTableStyle from './style';
|
|
36
40
|
const __sfc_main__ = _defineComponent({
|
|
37
41
|
...{
|
|
38
42
|
name: 'JPagination'
|
|
@@ -43,6 +47,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
43
47
|
const props = __props;
|
|
44
48
|
const emits = __emit;
|
|
45
49
|
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
50
|
+
const prefixCls = computed(() => 'pro-table');
|
|
51
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
46
52
|
const className = computed(() => {
|
|
47
53
|
return {
|
|
48
54
|
'hide-content': !props.isShowContent,
|
|
@@ -62,7 +68,9 @@ const __sfc_main__ = _defineComponent({
|
|
|
62
68
|
emits('change', page, size);
|
|
63
69
|
};
|
|
64
70
|
return (_ctx, _cache) => {
|
|
65
|
-
return (_openBlock(), _createElementBlock("div",
|
|
71
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
72
|
+
class: _normalizeClass(['jtable-pagination', _unref(hashId)])
|
|
73
|
+
}, [
|
|
66
74
|
_renderSlot(_ctx.$slots, "default", {}, () => [
|
|
67
75
|
_createVNode(_unref(Pagination), _mergeProps(props, {
|
|
68
76
|
total: _ctx.total,
|
|
@@ -73,7 +81,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
73
81
|
onChange: onChange
|
|
74
82
|
}), null, 16 /* FULL_PROPS */, ["total", "pageSize", "current", "show-total", "class"])
|
|
75
83
|
])
|
|
76
|
-
]));
|
|
84
|
+
], 2 /* CLASS */));
|
|
77
85
|
};
|
|
78
86
|
}
|
|
79
87
|
});
|
package/es/ProTable/ProTable.js
CHANGED
|
@@ -37,6 +37,8 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
37
37
|
"inject": "setup-const",
|
|
38
38
|
"debounce": "setup-maybe-ref",
|
|
39
39
|
"TableConfig": "setup-maybe-ref",
|
|
40
|
+
"useTableInject": "setup-maybe-ref",
|
|
41
|
+
"useProTableStyle": "setup-maybe-ref",
|
|
40
42
|
"tableConfig": "setup-maybe-ref",
|
|
41
43
|
"props": "setup-reactive-const",
|
|
42
44
|
"slots": "setup-maybe-ref",
|
|
@@ -46,7 +48,11 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
46
48
|
"_mode": "setup-ref",
|
|
47
49
|
"column": "setup-ref",
|
|
48
50
|
"page": "setup-reactive-const",
|
|
51
|
+
"prefixCls": "setup-ref",
|
|
52
|
+
"wrapSSR": "setup-maybe-ref",
|
|
53
|
+
"hashId": "setup-maybe-ref",
|
|
49
54
|
"extraSlots": "setup-const",
|
|
55
|
+
"_rowSelection": "setup-maybe-ref",
|
|
50
56
|
"showAlert": "setup-ref",
|
|
51
57
|
"showPagination": "setup-ref",
|
|
52
58
|
"onCheck": "setup-const",
|
|
@@ -60,10 +66,10 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
60
66
|
"windowChange": "setup-const"
|
|
61
67
|
} */
|
|
62
68
|
import { defineComponent as _defineComponent } from 'vue';
|
|
63
|
-
import { renderSlot as _renderSlot, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode,
|
|
69
|
+
import { unref as _unref, renderSlot as _renderSlot, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeProps as _normalizeProps, mergeProps as _mergeProps, renderList as _renderList, createSlots as _createSlots, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementBlock as _createElementBlock } from "vue";
|
|
64
70
|
const _hoisted_1 = { class: "jtable-body" };
|
|
65
71
|
import { proTableProps } from "./setting";
|
|
66
|
-
import { Spin } from 'ant-design-vue
|
|
72
|
+
import { Spin } from 'ant-design-vue';
|
|
67
73
|
import Header from './Header.js';
|
|
68
74
|
import Alert from './Alert.js';
|
|
69
75
|
import Content from './Content.js';
|
|
@@ -71,6 +77,8 @@ import Pagination from './Pagination.js';
|
|
|
71
77
|
import { useSlots, watch, onMounted, onUnmounted, computed, ref, reactive, inject } from "vue";
|
|
72
78
|
import { debounce } from 'lodash-es';
|
|
73
79
|
import { TableConfig } from "../utils/constants";
|
|
80
|
+
import { useTableInject } from "./hooks";
|
|
81
|
+
import useProTableStyle from "./style";
|
|
74
82
|
const __sfc_main__ = _defineComponent({
|
|
75
83
|
...{
|
|
76
84
|
name: 'JProTable'
|
|
@@ -98,16 +106,19 @@ const __sfc_main__ = _defineComponent({
|
|
|
98
106
|
});
|
|
99
107
|
const loading = ref(false);
|
|
100
108
|
const _dataSource = ref([]);
|
|
101
|
-
const _mode = ref(
|
|
109
|
+
const _mode = ref(props.mode || props.modeValue || 'CARD');
|
|
102
110
|
const column = ref(4);
|
|
103
111
|
const page = reactive({
|
|
104
112
|
pageIndex: 0,
|
|
105
113
|
pageSize: 12,
|
|
106
114
|
total: 0
|
|
107
115
|
});
|
|
116
|
+
const prefixCls = computed(() => 'pro-table');
|
|
117
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
108
118
|
const extraSlots = ['headerRightRender', 'headerLeftRender', 'paginationRender', 'alertRender'];
|
|
119
|
+
const _rowSelection = useTableInject();
|
|
109
120
|
const showAlert = computed(() => {
|
|
110
|
-
return props.alertShow && _optionalChain([props, '
|
|
121
|
+
return props.alertShow && (_optionalChain([props, 'access', _2 => _2.rowSelection, 'optionalAccess', _3 => _3.selectedRowKeys, 'optionalAccess', _4 => _4.length]) || _optionalChain([_rowSelection, 'optionalAccess', _5 => _5.value, 'optionalAccess', _6 => _6.selectedRowKeys, 'optionalAccess', _7 => _7.length]));
|
|
111
122
|
});
|
|
112
123
|
const showPagination = computed(() => {
|
|
113
124
|
return !!_dataSource.value.length && !props.noPagination && props.type === 'PAGE';
|
|
@@ -118,17 +129,17 @@ const __sfc_main__ = _defineComponent({
|
|
|
118
129
|
const handleData = (result) => {
|
|
119
130
|
if (props.type === 'PAGE') {
|
|
120
131
|
// 判断如果是最后一页且最后一页为空,就跳转到前一页
|
|
121
|
-
if (_optionalChain([result, 'optionalAccess',
|
|
122
|
-
_optionalChain([result, 'optionalAccess',
|
|
123
|
-
_optionalChain([result, 'optionalAccess',
|
|
124
|
-
_optionalChain([result, 'optionalAccess',
|
|
132
|
+
if (_optionalChain([result, 'optionalAccess', _8 => _8.total]) &&
|
|
133
|
+
_optionalChain([result, 'optionalAccess', _9 => _9.pageSize]) &&
|
|
134
|
+
_optionalChain([result, 'optionalAccess', _10 => _10.pageIndex]) &&
|
|
135
|
+
_optionalChain([result, 'optionalAccess', _11 => _11.data, 'optionalAccess', _12 => _12.length]) === 0) {
|
|
125
136
|
return true;
|
|
126
137
|
}
|
|
127
138
|
else {
|
|
128
|
-
_dataSource.value = _optionalChain([result, 'optionalAccess',
|
|
129
|
-
page.pageIndex = _optionalChain([result, 'optionalAccess',
|
|
130
|
-
page.pageSize = _optionalChain([result, 'optionalAccess',
|
|
131
|
-
page.total = _optionalChain([result, 'optionalAccess',
|
|
139
|
+
_dataSource.value = _optionalChain([result, 'optionalAccess', _13 => _13.data]) || [];
|
|
140
|
+
page.pageIndex = _optionalChain([result, 'optionalAccess', _14 => _14.pageIndex]) || 0;
|
|
141
|
+
page.pageSize = _optionalChain([result, 'optionalAccess', _15 => _15.pageSize]) || 12;
|
|
142
|
+
page.total = _optionalChain([result, 'optionalAccess', _16 => _16.total]) || 0;
|
|
132
143
|
}
|
|
133
144
|
}
|
|
134
145
|
else {
|
|
@@ -147,8 +158,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
147
158
|
...props.defaultParams,
|
|
148
159
|
..._params,
|
|
149
160
|
terms: [
|
|
150
|
-
...(_optionalChain([props, 'access',
|
|
151
|
-
...(_optionalChain([_params, 'optionalAccess',
|
|
161
|
+
...(_optionalChain([props, 'access', _17 => _17.defaultParams, 'optionalAccess', _18 => _18.terms]) || []),
|
|
162
|
+
...(_optionalChain([_params, 'optionalAccess', _19 => _19.terms]) || []),
|
|
152
163
|
],
|
|
153
164
|
};
|
|
154
165
|
loading.value = true;
|
|
@@ -183,8 +194,13 @@ const __sfc_main__ = _defineComponent({
|
|
|
183
194
|
});
|
|
184
195
|
};
|
|
185
196
|
const onClose = () => {
|
|
186
|
-
|
|
187
|
-
|
|
197
|
+
if (props.rowSelection) {
|
|
198
|
+
_optionalChain([props, 'access', _20 => _20.rowSelection, 'access', _21 => _21.onChange, 'optionalCall', _22 => _22([], [])]);
|
|
199
|
+
_optionalChain([props, 'access', _23 => _23.rowSelection, 'access', _24 => _24.onSelectNone, 'optionalCall', _25 => _25()]);
|
|
200
|
+
}
|
|
201
|
+
else if (_optionalChain([_rowSelection, 'optionalAccess', _26 => _26.value])) {
|
|
202
|
+
_optionalChain([_rowSelection, 'access', _27 => _27.value, 'optionalAccess', _28 => _28.onSelectNone, 'optionalCall', _29 => _29()]);
|
|
203
|
+
}
|
|
188
204
|
};
|
|
189
205
|
/**
|
|
190
206
|
* 刷新数据
|
|
@@ -199,10 +215,10 @@ const __sfc_main__ = _defineComponent({
|
|
|
199
215
|
});
|
|
200
216
|
};
|
|
201
217
|
const _gridColumns = computed(() => {
|
|
202
|
-
if (_optionalChain([props, 'access',
|
|
218
|
+
if (_optionalChain([props, 'access', _30 => _30.gridColumns, 'optionalAccess', _31 => _31.length])) {
|
|
203
219
|
const arr = props.gridColumns;
|
|
204
|
-
const lastValue = _optionalChain([arr, 'access',
|
|
205
|
-
if (_optionalChain([arr, 'optionalAccess',
|
|
220
|
+
const lastValue = _optionalChain([arr, 'access', _32 => _32.slice, 'call', _33 => _33(-1), 'optionalAccess', _34 => _34[0]]);
|
|
221
|
+
if (_optionalChain([arr, 'optionalAccess', _35 => _35.length]) < 4) {
|
|
206
222
|
while (arr.length < 4) {
|
|
207
223
|
arr.push(lastValue);
|
|
208
224
|
}
|
|
@@ -223,16 +239,16 @@ const __sfc_main__ = _defineComponent({
|
|
|
223
239
|
const styles = window.getComputedStyle(ele);
|
|
224
240
|
const width = parseFloat(styles.width);
|
|
225
241
|
if (width <= 992) {
|
|
226
|
-
column.value = _optionalChain([_gridColumns, 'access',
|
|
242
|
+
column.value = _optionalChain([_gridColumns, 'access', _36 => _36.value, 'optionalAccess', _37 => _37[0]]) || 1;
|
|
227
243
|
}
|
|
228
244
|
else if (width > 992 && width <= 1440) {
|
|
229
|
-
column.value = _optionalChain([_gridColumns, 'access',
|
|
245
|
+
column.value = _optionalChain([_gridColumns, 'access', _38 => _38.value, 'optionalAccess', _39 => _39[1]]) || 2;
|
|
230
246
|
}
|
|
231
247
|
else if (width > 1440 && width <= 1600) {
|
|
232
|
-
column.value = _optionalChain([_gridColumns, 'access',
|
|
248
|
+
column.value = _optionalChain([_gridColumns, 'access', _40 => _40.value, 'optionalAccess', _41 => _41[2]]) || 3;
|
|
233
249
|
}
|
|
234
250
|
else if (width > 1600) {
|
|
235
|
-
column.value = _optionalChain([_gridColumns, 'access',
|
|
251
|
+
column.value = _optionalChain([_gridColumns, 'access', _42 => _42.value, 'optionalAccess', _43 => _43[3]]) || 4;
|
|
236
252
|
}
|
|
237
253
|
}
|
|
238
254
|
};
|
|
@@ -256,7 +272,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
256
272
|
__expose({ reload, dataSource: _dataSource });
|
|
257
273
|
return (_ctx, _cache) => {
|
|
258
274
|
return (_openBlock(), _createElementBlock("div", {
|
|
259
|
-
class:
|
|
275
|
+
class: _normalizeClass(['jtable-body-spin', _unref(hashId)]),
|
|
260
276
|
style: _normalizeStyle(_ctx.bodyStyle),
|
|
261
277
|
id: "jtable-body-spin"
|
|
262
278
|
}, [
|
|
@@ -280,12 +296,12 @@ const __sfc_main__ = _defineComponent({
|
|
|
280
296
|
(showAlert.value)
|
|
281
297
|
? (_openBlock(), _createBlock(Alert, {
|
|
282
298
|
key: 0,
|
|
283
|
-
rowSelection: _ctx.rowSelection,
|
|
299
|
+
rowSelection: _ctx.rowSelection || _unref(_rowSelection),
|
|
284
300
|
onClose: onClose
|
|
285
301
|
}, {
|
|
286
302
|
default: _withCtx(() => [
|
|
287
303
|
_renderSlot(_ctx.$slots, "alertRender", {
|
|
288
|
-
rowSelection: _ctx.rowSelection,
|
|
304
|
+
rowSelection: _ctx.rowSelection || _unref(_rowSelection),
|
|
289
305
|
onClose: onClose
|
|
290
306
|
})
|
|
291
307
|
]),
|
|
@@ -332,7 +348,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
332
348
|
]),
|
|
333
349
|
_: 3 /* FORWARDED */
|
|
334
350
|
}, 8 /* PROPS */, ["spinning"])
|
|
335
|
-
],
|
|
351
|
+
], 6 /* CLASS, STYLE */));
|
|
336
352
|
};
|
|
337
353
|
}
|
|
338
354
|
});
|
package/es/ProTable/setting.js
CHANGED
|
@@ -2,7 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
|
2
2
|
import { tableProps } from "ant-design-vue/es/table/Table";
|
|
3
3
|
import "vue";
|
|
4
4
|
import "ant-design-vue/es/table";
|
|
5
|
-
import { paginationProps } from
|
|
5
|
+
import { paginationProps } from 'ant-design-vue/es/pagination/Pagination';
|
|
6
6
|
import { omit } from 'lodash-es';
|
|
7
7
|
export var _headerProps = {
|
|
8
8
|
mode: {
|
|
@@ -1 +1,109 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import genCompoentStyle from "../../style/styleRegister";
|
|
3
|
+
var genProTableStyle = function genProTableStyle(config) {
|
|
4
|
+
var token = config.token;
|
|
5
|
+
return {
|
|
6
|
+
'.jtable-body-spin': {
|
|
7
|
+
height: '100%',
|
|
8
|
+
width: '100%',
|
|
9
|
+
backgroundColor: '#fff',
|
|
10
|
+
'.ant-spin-nested-loading': {
|
|
11
|
+
height: '100%',
|
|
12
|
+
'.ant-spin-container': {
|
|
13
|
+
height: '100%'
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
'.jtable-body': {
|
|
17
|
+
width: '100%',
|
|
18
|
+
boxSizing: 'border-box',
|
|
19
|
+
height: '100%',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column'
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
'.jtable-body-header': {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
justifyContent: 'space-between',
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
marginBottom: '16px',
|
|
29
|
+
width: '100%',
|
|
30
|
+
gap: '8px',
|
|
31
|
+
'.jtable-body-header-left': {
|
|
32
|
+
flex: 1,
|
|
33
|
+
minWidth: 0
|
|
34
|
+
},
|
|
35
|
+
'.jtable-body-header-right': {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
gap: '8px',
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
'.jtable-body-header-right-button': {
|
|
40
|
+
width: '62px',
|
|
41
|
+
'.right-button-icon': {
|
|
42
|
+
fontSize: '16px',
|
|
43
|
+
color: '#d9d9d9'
|
|
44
|
+
},
|
|
45
|
+
'.ant-radio-button-wrapper': {
|
|
46
|
+
padding: '0 8px'
|
|
47
|
+
},
|
|
48
|
+
'.ant-radio-button-wrapper-checked': {
|
|
49
|
+
color: token.colorPrimary
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
'.jtable-box': {
|
|
55
|
+
flex: 1,
|
|
56
|
+
minHeight: 0,
|
|
57
|
+
'.jtable-card': _defineProperty({
|
|
58
|
+
height: '100%',
|
|
59
|
+
overflowY: 'auto',
|
|
60
|
+
'.jtable-card-items': {
|
|
61
|
+
display: 'grid',
|
|
62
|
+
gridGap: '26px',
|
|
63
|
+
'.jtable-card-item': {
|
|
64
|
+
display: 'flex',
|
|
65
|
+
minWidth: 0
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, "j-table-empty", {
|
|
69
|
+
marginTop: '100px'
|
|
70
|
+
}),
|
|
71
|
+
'.ant-table-wrapper': {
|
|
72
|
+
height: '100%',
|
|
73
|
+
'.ant-table': {
|
|
74
|
+
height: '100%',
|
|
75
|
+
'.ant-table-container': {
|
|
76
|
+
height: '100%',
|
|
77
|
+
'.ant-table-content': {
|
|
78
|
+
height: '100%'
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
'.j-table-scroll': {
|
|
84
|
+
'.ant-table-container': {
|
|
85
|
+
display: 'flex',
|
|
86
|
+
flexDirection: 'column'
|
|
87
|
+
},
|
|
88
|
+
'.ant-table-body': {
|
|
89
|
+
flex: 1,
|
|
90
|
+
minHeight: 0,
|
|
91
|
+
overflowY: 'auto'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
'.jtable-alert': {
|
|
96
|
+
marginBottom: '16px'
|
|
97
|
+
},
|
|
98
|
+
'.jtable-pagination': {
|
|
99
|
+
width: '100%',
|
|
100
|
+
display: 'flex',
|
|
101
|
+
justifyContent: 'flex-end',
|
|
102
|
+
marginTop: '16px',
|
|
103
|
+
'.hide-content': _defineProperty({}, "".concat(token.antCls, "-pagination-item,& ").concat(token.antCls, "-pagination-jump-prev, & ").concat(token.antCls, "-pagination-jump-next"), {
|
|
104
|
+
display: 'none'
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
export default genCompoentStyle([genProTableStyle]);
|
|
@@ -2,19 +2,23 @@
|
|
|
2
2
|
"value": "props",
|
|
3
3
|
"options": "props",
|
|
4
4
|
"columns": "props",
|
|
5
|
-
"defineOptions": "setup-const",
|
|
6
5
|
"ref": "setup-const",
|
|
7
6
|
"computed": "setup-const",
|
|
8
7
|
"watch": "setup-const",
|
|
8
|
+
"useRadioButtonStyle": "setup-maybe-ref",
|
|
9
9
|
"props": "setup-reactive-const",
|
|
10
10
|
"emit": "setup-const",
|
|
11
|
+
"prefixCls": "setup-ref",
|
|
12
|
+
"wrapSSR": "setup-maybe-ref",
|
|
13
|
+
"hashId": "setup-maybe-ref",
|
|
11
14
|
"myValue": "setup-ref",
|
|
12
15
|
"styles": "setup-ref",
|
|
13
16
|
"onClick": "setup-const"
|
|
14
17
|
} */
|
|
15
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
|
|
18
|
+
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
|
|
16
19
|
const _hoisted_1 = ["onClick"];
|
|
17
20
|
import { ref, computed, watch } from 'vue';
|
|
21
|
+
import useRadioButtonStyle from './style';
|
|
18
22
|
const __sfc_main__ = Object.assign({
|
|
19
23
|
name: 'JRadioButton',
|
|
20
24
|
}, {
|
|
@@ -36,6 +40,8 @@ const __sfc_main__ = Object.assign({
|
|
|
36
40
|
setup(__props, { emit: __emit }) {
|
|
37
41
|
const props = __props;
|
|
38
42
|
const emit = __emit;
|
|
43
|
+
const prefixCls = computed(() => 'j-radio-button');
|
|
44
|
+
const [wrapSSR, hashId] = useRadioButtonStyle(prefixCls);
|
|
39
45
|
const myValue = ref(props.value);
|
|
40
46
|
const styles = computed(() => {
|
|
41
47
|
return {
|
|
@@ -54,7 +60,7 @@ const __sfc_main__ = Object.assign({
|
|
|
54
60
|
});
|
|
55
61
|
return (_ctx, _cache) => {
|
|
56
62
|
return (_openBlock(), _createElementBlock("div", {
|
|
57
|
-
class:
|
|
63
|
+
class: _normalizeClass(['j-radio-button', _unref(hashId)]),
|
|
58
64
|
style: _normalizeStyle(styles.value)
|
|
59
65
|
}, [
|
|
60
66
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(__props.options, (item) => {
|
|
@@ -63,7 +69,7 @@ const __sfc_main__ = Object.assign({
|
|
|
63
69
|
class: _normalizeClass(["j-radio-button-item", { 'active': myValue.value === item.value }])
|
|
64
70
|
}, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1));
|
|
65
71
|
}), 256 /* UNKEYED_FRAGMENT */))
|
|
66
|
-
],
|
|
72
|
+
], 6 /* CLASS, STYLE */));
|
|
67
73
|
};
|
|
68
74
|
}
|
|
69
75
|
});
|
|
@@ -1 +1,23 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import genCompoentStyle from '../../style/styleRegister';
|
|
2
|
+
var genRadioButtonStyle = function genRadioButtonStyle(config) {
|
|
3
|
+
var token = config.token;
|
|
4
|
+
return {
|
|
5
|
+
'.j-radio-button': {
|
|
6
|
+
display: 'grid',
|
|
7
|
+
gap: '16px',
|
|
8
|
+
'.j-radio-button-item': {
|
|
9
|
+
padding: '6px 12px',
|
|
10
|
+
textAlign: 'center',
|
|
11
|
+
height: '100%',
|
|
12
|
+
borderRadius: '2px',
|
|
13
|
+
backgroundColor: '#f5f5f5',
|
|
14
|
+
cursor: 'pointer',
|
|
15
|
+
'&.active': {
|
|
16
|
+
color: '#fff',
|
|
17
|
+
backgroundColor: token.colorPrimary
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default genCompoentStyle([genRadioButtonStyle]);
|