@meethive/components 0.0.3 → 0.0.5
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 +71 -80
- package/es/BadgeStatus/Badge.js +38 -47
- package/es/CardSelect/CardSelect.js +115 -137
- package/es/CheckButton/CheckButton.js +102 -118
- package/es/ConfigProvider/ConfigProvider.js +44 -68
- package/es/DragModal/DragModal.js +191 -212
- package/es/EditTable/Body.js +158 -189
- package/es/EditTable/CellRender.js +10 -12
- package/es/EditTable/EditTable.js +385 -434
- package/es/EditTable/FormItem.js +140 -169
- package/es/EditTable/Group.js +171 -204
- package/es/EditTable/Header.js +57 -63
- package/es/EditTable/HeaderRender.js +10 -12
- package/es/EditTable/components/ContextMenu/Menu.js +78 -86
- package/es/EditTable/components/Search/Search.js +151 -163
- package/es/EditTable/components/Search/Sort.js +104 -119
- package/es/Ellipsis/Ellipsis.js +144 -148
- package/es/Empty/Empty.js +51 -57
- package/es/FullPage/FullPage.js +20 -19
- package/es/Icon/Icon.js +42 -49
- package/es/LocaleProvider/LocaleProvider.js +32 -38
- package/es/Markdown/Markdown.js +101 -118
- package/es/PermissionButton/PermissionButton.js +118 -118
- package/es/ProLayout/Basic/BasicLayout.js +361 -418
- package/es/ProLayout/Basic/Header.js +97 -111
- package/es/ProLayout/PageContainer/index.js +298 -344
- package/es/ProLayout/SiderMenu/BaseMenu.js +233 -240
- package/es/ProTable/Alert.js +39 -40
- package/es/ProTable/Content.js +84 -97
- package/es/ProTable/Header.js +32 -33
- package/es/ProTable/Pagination.js +56 -55
- package/es/ProTable/ProTable.js +256 -276
- package/es/RadioButton/RadioButton.js +48 -53
- package/es/Scrollbar/Bar.js +65 -76
- package/es/Scrollbar/Scrollbar.js +129 -161
- package/es/Scrollbar/Thumb.js +101 -150
- package/es/Search/Item.js +208 -236
- package/es/Search/Search.js +90 -90
- package/es/Skeleton/Skeleton.js +26 -27
- package/es/Skeleton/components/DashBoardCard.js +26 -27
- package/es/Skeleton/components/DashBoardChart.js +26 -27
- package/es/Skeleton/components/Detail.js +26 -27
- package/es/Skeleton/components/Drawer.js +26 -27
- package/es/Skeleton/components/Item.js +55 -54
- package/es/Skeleton/components/List.js +29 -27
- package/es/Skeleton/components/ListCard.js +28 -28
- package/es/Skeleton/components/ListCardItem.js +20 -20
- package/es/Skeleton/components/ListTable.js +26 -27
- package/es/Skeleton/components/Page.js +27 -26
- package/es/Skeleton/components/Search.js +16 -16
- package/es/Skeleton/components/Tree.js +26 -27
- package/es/TimeFormat/TimeFormat.js +32 -36
- package/es/Title/Title.js +23 -26
- package/es/ValueItem/ValueItem.js +100 -113
- package/es/VirtualTable/VirtualTable.js +235 -271
- package/lib/AutoComplete/AutoComplete.js +71 -80
- package/lib/BadgeStatus/Badge.js +38 -47
- package/lib/CardSelect/CardSelect.js +115 -137
- package/lib/CheckButton/CheckButton.js +102 -118
- package/lib/ConfigProvider/ConfigProvider.js +44 -68
- package/lib/DragModal/DragModal.js +191 -212
- package/lib/EditTable/Body.js +158 -189
- package/lib/EditTable/CellRender.js +10 -12
- package/lib/EditTable/EditTable.js +385 -434
- package/lib/EditTable/FormItem.js +140 -169
- package/lib/EditTable/Group.js +171 -204
- package/lib/EditTable/Header.js +57 -63
- package/lib/EditTable/HeaderRender.js +10 -12
- package/lib/EditTable/components/ContextMenu/Menu.js +78 -86
- package/lib/EditTable/components/Search/Search.js +151 -163
- package/lib/EditTable/components/Search/Sort.js +104 -119
- package/lib/Ellipsis/Ellipsis.js +144 -148
- package/lib/Empty/Empty.js +51 -57
- package/lib/FullPage/FullPage.js +20 -19
- package/lib/Icon/Icon.js +42 -49
- package/lib/LocaleProvider/LocaleProvider.js +32 -38
- package/lib/Markdown/Markdown.js +101 -118
- package/lib/PermissionButton/PermissionButton.js +118 -118
- package/lib/ProLayout/Basic/BasicLayout.js +361 -418
- package/lib/ProLayout/Basic/Header.js +97 -111
- package/lib/ProLayout/PageContainer/index.js +298 -344
- package/lib/ProLayout/SiderMenu/BaseMenu.js +233 -240
- package/lib/ProTable/Alert.js +39 -40
- package/lib/ProTable/Content.js +84 -97
- package/lib/ProTable/Header.js +32 -33
- package/lib/ProTable/Pagination.js +56 -55
- package/lib/ProTable/ProTable.js +256 -276
- package/lib/RadioButton/RadioButton.js +48 -53
- package/lib/Scrollbar/Bar.js +65 -76
- package/lib/Scrollbar/Scrollbar.js +129 -161
- package/lib/Scrollbar/Thumb.js +101 -150
- package/lib/Search/Item.js +208 -236
- package/lib/Search/Search.js +90 -90
- package/lib/Skeleton/Skeleton.js +26 -27
- package/lib/Skeleton/components/DashBoardCard.js +26 -27
- package/lib/Skeleton/components/DashBoardChart.js +26 -27
- package/lib/Skeleton/components/Detail.js +26 -27
- package/lib/Skeleton/components/Drawer.js +26 -27
- package/lib/Skeleton/components/Item.js +55 -54
- package/lib/Skeleton/components/List.js +29 -27
- package/lib/Skeleton/components/ListCard.js +28 -28
- package/lib/Skeleton/components/ListCardItem.js +20 -20
- package/lib/Skeleton/components/ListTable.js +26 -27
- package/lib/Skeleton/components/Page.js +27 -26
- package/lib/Skeleton/components/Search.js +16 -16
- package/lib/Skeleton/components/Tree.js +26 -27
- package/lib/TimeFormat/TimeFormat.js +32 -36
- package/lib/Title/Title.js +23 -26
- package/lib/ValueItem/ValueItem.js +100 -113
- package/lib/VirtualTable/VirtualTable.js +235 -271
- package/package.json +1 -1
package/es/EditTable/Group.js
CHANGED
|
@@ -1,204 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
props
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
onMounted(() => {
|
|
174
|
-
myActiveKey.value = _optionalChain([props, 'access', _2 => _2.options, 'access', _3 => _3[0], 'optionalAccess', _4 => _4.value])
|
|
175
|
-
emit('change', myActiveKey.value, _optionalChain([props, 'access', _5 => _5.options, 'access', _6 => _6[0], 'optionalAccess', _7 => _7.label]))
|
|
176
|
-
emit('update:activeKey', myActiveKey.value)
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
watch(
|
|
180
|
-
() => props.activeKey,
|
|
181
|
-
(val) => {
|
|
182
|
-
myActiveKey.value = val
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
|
|
186
|
-
return {
|
|
187
|
-
hashId,
|
|
188
|
-
contextLocale,
|
|
189
|
-
myActiveKey,
|
|
190
|
-
visible,
|
|
191
|
-
errorMap,
|
|
192
|
-
tableWrapperRef,
|
|
193
|
-
formRef,
|
|
194
|
-
formData,
|
|
195
|
-
onAdd,
|
|
196
|
-
onCancel,
|
|
197
|
-
onOk,
|
|
198
|
-
change,
|
|
199
|
-
menuClick,
|
|
200
|
-
popContainer,
|
|
201
|
-
modalContainer
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
})
|
|
1
|
+
import { defineComponent, ref, reactive, computed, watch, onMounted } from 'vue';
|
|
2
|
+
import { Tabs as ATabs, TabPane as ATabPane, Dropdown as ADropdown, Menu as AMenu, MenuItem as AMenuItem, Tooltip as ATooltip, Modal as AModal, Form as AForm, FormItem as AFormItem, Input as AInput, Button as AButton, Modal } from 'ant-design-vue';
|
|
3
|
+
import { randomNumber } from '@meethive/utils';
|
|
4
|
+
import { isFullScreen } from './utils';
|
|
5
|
+
import { useTableGroupError, useTableWrapper } from './context';
|
|
6
|
+
import { useLocaleReceiver } from '../LocaleReciver';
|
|
7
|
+
import genEditTableStyle from './style';
|
|
8
|
+
export default defineComponent({
|
|
9
|
+
name: 'JEditTableGroup',
|
|
10
|
+
components: {
|
|
11
|
+
ATabs,
|
|
12
|
+
ATabPane,
|
|
13
|
+
ADropdown,
|
|
14
|
+
AMenu,
|
|
15
|
+
AMenuItem,
|
|
16
|
+
ATooltip,
|
|
17
|
+
AModal,
|
|
18
|
+
AForm,
|
|
19
|
+
AFormItem,
|
|
20
|
+
AInput,
|
|
21
|
+
AButton
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
options: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => []
|
|
27
|
+
},
|
|
28
|
+
activeKey: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: undefined
|
|
31
|
+
},
|
|
32
|
+
readonly: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ['delete', 'edit', 'add', 'change', 'update:activeKey'],
|
|
38
|
+
setup(props, {
|
|
39
|
+
emit
|
|
40
|
+
}) {
|
|
41
|
+
const [contextLocale] = useLocaleReceiver('EditTable');
|
|
42
|
+
const myActiveKey = ref(props.activeKey);
|
|
43
|
+
const visible = ref(false);
|
|
44
|
+
const type = ref(contextLocale.value.Group.addGroup);
|
|
45
|
+
const errorMap = useTableGroupError();
|
|
46
|
+
const tableWrapperRef = useTableWrapper();
|
|
47
|
+
const addIndex = ref(0);
|
|
48
|
+
const formRef = ref();
|
|
49
|
+
const formData = reactive({
|
|
50
|
+
label: undefined
|
|
51
|
+
});
|
|
52
|
+
const prefixCls = computed(() => 'jetlinks-edit-table');
|
|
53
|
+
const [wrapSSR, hashId] = genEditTableStyle(prefixCls);
|
|
54
|
+
const onAdd = (targetKey, action) => {
|
|
55
|
+
if (action === 'add') {
|
|
56
|
+
type.value = 'add';
|
|
57
|
+
const groupName = props.options.filter(item => item.label.includes(contextLocale.value.Group.one));
|
|
58
|
+
let index = addIndex.value + 1;
|
|
59
|
+
let findStatus = false;
|
|
60
|
+
while (!findStatus) {
|
|
61
|
+
const status = groupName.some(item => {
|
|
62
|
+
const [_, _index] = item.label.split('_');
|
|
63
|
+
if (index === Number(_index)) {
|
|
64
|
+
index = Number(_index) + 1;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
});
|
|
69
|
+
findStatus = !status;
|
|
70
|
+
}
|
|
71
|
+
addIndex.value = index;
|
|
72
|
+
formData.label = contextLocale.value.Group.one + index;
|
|
73
|
+
onOk();
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
const onEdit = record => {
|
|
77
|
+
visible.value = true;
|
|
78
|
+
type.value = 'edit';
|
|
79
|
+
formData.label = record.label;
|
|
80
|
+
};
|
|
81
|
+
const onCancel = () => {
|
|
82
|
+
formRef.value.resetFields();
|
|
83
|
+
visible.value = false;
|
|
84
|
+
};
|
|
85
|
+
const onOk = () => {
|
|
86
|
+
const data = {
|
|
87
|
+
...formData
|
|
88
|
+
};
|
|
89
|
+
if (type.value === 'add') {
|
|
90
|
+
data.value = 'group_' + randomNumber();
|
|
91
|
+
myActiveKey.value = data.value;
|
|
92
|
+
emit(type.value, data);
|
|
93
|
+
emit('change', data.value, data.label);
|
|
94
|
+
emit('update:activeKey', data.value);
|
|
95
|
+
visible.value = false;
|
|
96
|
+
} else {
|
|
97
|
+
formRef.value.validate().then(() => {
|
|
98
|
+
data.value = myActiveKey.value;
|
|
99
|
+
emit(type.value, data);
|
|
100
|
+
emit('change', data.value, data.label);
|
|
101
|
+
visible.value = false;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const change = () => {
|
|
106
|
+
const item = props.options.find(item => item.value === myActiveKey.value);
|
|
107
|
+
emit('change', myActiveKey.value, item.label);
|
|
108
|
+
emit('update:activeKey', myActiveKey.value);
|
|
109
|
+
};
|
|
110
|
+
const menuClick = (e, record) => {
|
|
111
|
+
if (props.readonly) return;
|
|
112
|
+
if (e.key === 'edit') {
|
|
113
|
+
onEdit(record);
|
|
114
|
+
} else {
|
|
115
|
+
Modal.confirm({
|
|
116
|
+
title: contextLocale.value.Group.deleteMessage,
|
|
117
|
+
onOk: () => {
|
|
118
|
+
const index = props.options.findIndex(item => item.value === record.value);
|
|
119
|
+
let label = '';
|
|
120
|
+
if (index !== 0 && index === props.options.length - 1) {
|
|
121
|
+
myActiveKey.value = props.options[index - 1].value;
|
|
122
|
+
label = props.options[index - 1].label;
|
|
123
|
+
} else if (index === 0 && props.options.length === 1) {
|
|
124
|
+
myActiveKey.value = props.options[0].value;
|
|
125
|
+
label = props.options[0].label;
|
|
126
|
+
} else {
|
|
127
|
+
myActiveKey.value = props.options[index + 1].value;
|
|
128
|
+
label = props.options[index + 1].label;
|
|
129
|
+
}
|
|
130
|
+
emit('delete', record.value, index);
|
|
131
|
+
emit('change', myActiveKey.value, label);
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const popContainer = e => {
|
|
137
|
+
return tableWrapperRef.value || e;
|
|
138
|
+
};
|
|
139
|
+
const modalContainer = () => {
|
|
140
|
+
if (isFullScreen()) {
|
|
141
|
+
return tableWrapperRef.value || document.body;
|
|
142
|
+
}
|
|
143
|
+
return document.body;
|
|
144
|
+
};
|
|
145
|
+
onMounted(() => {
|
|
146
|
+
myActiveKey.value = props.options[0]?.value;
|
|
147
|
+
emit('change', myActiveKey.value, props.options[0]?.label);
|
|
148
|
+
emit('update:activeKey', myActiveKey.value);
|
|
149
|
+
});
|
|
150
|
+
watch(() => props.activeKey, val => {
|
|
151
|
+
myActiveKey.value = val;
|
|
152
|
+
});
|
|
153
|
+
return {
|
|
154
|
+
hashId,
|
|
155
|
+
contextLocale,
|
|
156
|
+
myActiveKey,
|
|
157
|
+
visible,
|
|
158
|
+
errorMap,
|
|
159
|
+
tableWrapperRef,
|
|
160
|
+
formRef,
|
|
161
|
+
formData,
|
|
162
|
+
onAdd,
|
|
163
|
+
onCancel,
|
|
164
|
+
onOk,
|
|
165
|
+
change,
|
|
166
|
+
menuClick,
|
|
167
|
+
popContainer,
|
|
168
|
+
modalContainer
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
});
|
package/es/EditTable/Header.js
CHANGED
|
@@ -1,63 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
searchData.visible =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
searchData
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
searchData,
|
|
59
|
-
showFilter,
|
|
60
|
-
sortClick
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
})
|
|
1
|
+
import { defineComponent, reactive, computed } from 'vue';
|
|
2
|
+
import { SearchModal, Sort } from './components/Search';
|
|
3
|
+
import { useHScroll, useTableTool } from './hooks';
|
|
4
|
+
import HeaderItemRender from './HeaderRender.js';
|
|
5
|
+
import useEditTableStyle from './style';
|
|
6
|
+
import AIcon from '../Icon';
|
|
7
|
+
export default defineComponent({
|
|
8
|
+
name: 'JEditTableHeader',
|
|
9
|
+
components: {
|
|
10
|
+
SearchModal,
|
|
11
|
+
Sort,
|
|
12
|
+
HeaderItemRender,
|
|
13
|
+
AIcon
|
|
14
|
+
},
|
|
15
|
+
props: {
|
|
16
|
+
columns: {
|
|
17
|
+
type: Array,
|
|
18
|
+
default: () => []
|
|
19
|
+
},
|
|
20
|
+
searchColumns: {
|
|
21
|
+
type: Array,
|
|
22
|
+
default: undefined
|
|
23
|
+
},
|
|
24
|
+
serial: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
style: {
|
|
29
|
+
type: Object,
|
|
30
|
+
default: undefined
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
setup(props) {
|
|
34
|
+
const prefixCls = computed(() => 'jetlinks-edit-table');
|
|
35
|
+
const [wrapSSR, hashId] = useEditTableStyle(prefixCls);
|
|
36
|
+
const tableTool = useTableTool();
|
|
37
|
+
const hScroll = useHScroll();
|
|
38
|
+
const searchData = reactive({
|
|
39
|
+
visible: false,
|
|
40
|
+
key: undefined
|
|
41
|
+
});
|
|
42
|
+
const showFilter = key => {
|
|
43
|
+
searchData.visible = true;
|
|
44
|
+
searchData.key = key;
|
|
45
|
+
};
|
|
46
|
+
const sortClick = () => {
|
|
47
|
+
searchData.visible = false;
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
hashId,
|
|
51
|
+
tableTool,
|
|
52
|
+
searchData,
|
|
53
|
+
showFilter,
|
|
54
|
+
sortClick
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
})
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
2
|
+
export default defineComponent({
|
|
3
|
+
name: 'HeaderItemRender',
|
|
4
|
+
props: ['renderFn', 'value'],
|
|
5
|
+
setup(props) {
|
|
6
|
+
return () => {
|
|
7
|
+
return props.renderFn(props.value);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
});
|