@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/ProTable/Content.js
CHANGED
|
@@ -1,97 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
const [
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
_columns,
|
|
86
|
-
_slots,
|
|
87
|
-
_scroll,
|
|
88
|
-
gridTemplateColumns,
|
|
89
|
-
__rowSelection,
|
|
90
|
-
indeterminate,
|
|
91
|
-
checkedAll,
|
|
92
|
-
onClick,
|
|
93
|
-
handleCheckedAllChange,
|
|
94
|
-
get
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
})
|
|
1
|
+
import { defineComponent, computed, useSlots } from 'vue';
|
|
2
|
+
import { Table, Checkbox as ACheckbox } from 'ant-design-vue';
|
|
3
|
+
import { get, omit } from 'lodash-es';
|
|
4
|
+
import Empty from '../Empty';
|
|
5
|
+
import { useTableInject } from './hooks';
|
|
6
|
+
import useProTableStyle from './style';
|
|
7
|
+
import { useLocaleReceiver } from '../LocaleReciver';
|
|
8
|
+
import JVirtualTable from '../VirtualTable';
|
|
9
|
+
import { _contentProps } from './setting';
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'Content',
|
|
12
|
+
components: {
|
|
13
|
+
Table,
|
|
14
|
+
ACheckbox,
|
|
15
|
+
Empty,
|
|
16
|
+
JVirtualTable
|
|
17
|
+
},
|
|
18
|
+
props: {
|
|
19
|
+
..._contentProps,
|
|
20
|
+
column: {
|
|
21
|
+
type: Number,
|
|
22
|
+
default: 4
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
setup(props) {
|
|
26
|
+
const slots = useSlots();
|
|
27
|
+
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
28
|
+
const prefixCls = computed(() => 'pro-table');
|
|
29
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
30
|
+
const _rowSelection = useTableInject();
|
|
31
|
+
const _columns = computed(() => props.columns.filter(i => !i?.hideInTable));
|
|
32
|
+
const _slots = computed(() => {
|
|
33
|
+
return omit(slots, ['emptyText', 'bodyCell']);
|
|
34
|
+
});
|
|
35
|
+
const _scroll = computed(() => {
|
|
36
|
+
if (props.scroll === false) {
|
|
37
|
+
return {
|
|
38
|
+
x: undefined,
|
|
39
|
+
y: undefined
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
x: props.scroll.x === false ? undefined : props.scroll.x || '100%',
|
|
44
|
+
y: props.scroll.y === false ? undefined : props.scroll.y || '100%'
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const gridTemplateColumns = computed(() => {
|
|
48
|
+
return `repeat(${props.column}, 1fr)`;
|
|
49
|
+
});
|
|
50
|
+
const __rowSelection = computed(() => {
|
|
51
|
+
return props.rowSelection || _rowSelection?.value;
|
|
52
|
+
});
|
|
53
|
+
const indeterminate = computed(() => {
|
|
54
|
+
return __rowSelection.value?.selectedRowKeys?.length > 0 && __rowSelection.value?.selectedRowKeys?.length < props.dataSource.length;
|
|
55
|
+
});
|
|
56
|
+
const checkedAll = computed(() => {
|
|
57
|
+
return __rowSelection.value?.selectedRowKeys?.length > 0 && __rowSelection.value?.selectedRowKeys?.length === props.dataSource.length;
|
|
58
|
+
});
|
|
59
|
+
const onClick = item => {
|
|
60
|
+
if (_rowSelection && _rowSelection.value) {
|
|
61
|
+
const _selected = _rowSelection.value.selectedRowKeys?.includes(item[props.rowKey]);
|
|
62
|
+
_rowSelection.value.onSelect?.(item, !_selected);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
const handleCheckedAllChange = e => {
|
|
66
|
+
const flag = e.target.checked;
|
|
67
|
+
__rowSelection.value?.onSelectAll?.(flag, props.dataSource, props.dataSource);
|
|
68
|
+
};
|
|
69
|
+
return {
|
|
70
|
+
hashId,
|
|
71
|
+
contextLocale,
|
|
72
|
+
_columns,
|
|
73
|
+
_slots,
|
|
74
|
+
_scroll,
|
|
75
|
+
gridTemplateColumns,
|
|
76
|
+
__rowSelection,
|
|
77
|
+
indeterminate,
|
|
78
|
+
checkedAll,
|
|
79
|
+
onClick,
|
|
80
|
+
handleCheckedAllChange,
|
|
81
|
+
get
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
});
|
package/es/ProTable/Header.js
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const emits = emit
|
|
25
|
-
const prefixCls = computed(() => 'pro-table')
|
|
26
|
-
const [wrapSSR, hashId] = useProTableStyle(prefixCls)
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
1
|
+
import { defineComponent, computed } from 'vue';
|
|
2
|
+
import { RadioGroup, RadioButton } from 'ant-design-vue';
|
|
3
|
+
import AIcon from '../Icon';
|
|
4
|
+
import { _headerProps } from './setting';
|
|
5
|
+
import useProTableStyle from './style';
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
name: 'Header',
|
|
8
|
+
components: {
|
|
9
|
+
RadioGroup,
|
|
10
|
+
RadioButton,
|
|
11
|
+
AIcon
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
..._headerProps,
|
|
15
|
+
initMode: {
|
|
16
|
+
type: [String, undefined],
|
|
17
|
+
default: undefined
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
emits: ['change'],
|
|
21
|
+
setup(props, {
|
|
22
|
+
emit
|
|
23
|
+
}) {
|
|
24
|
+
const emits = emit;
|
|
25
|
+
const prefixCls = computed(() => 'pro-table');
|
|
26
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
27
|
+
return {
|
|
28
|
+
hashId,
|
|
29
|
+
emits
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
emits: ['change'],
|
|
15
|
-
setup(props, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const [
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const _showTotal =
|
|
27
|
-
const minSize = props.pageIndex * props.pageSize + 1
|
|
28
|
-
const MaxSize = (props.pageIndex + 1) * props.pageSize
|
|
29
|
-
let localePage =
|
|
30
|
-
let localeTotal =
|
|
31
|
-
const _maxSize = props.totalLoading ? MaxSize :
|
|
32
|
-
|
|
33
|
-
localePage = localePage.replace(`{${index}}`, item)
|
|
34
|
-
})
|
|
35
|
-
return h('span', {}, [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
1
|
+
import { defineComponent, computed, h } from 'vue';
|
|
2
|
+
import { Pagination, Spin } from 'ant-design-vue';
|
|
3
|
+
import { _paginationProps } from './setting';
|
|
4
|
+
import { useLocaleReceiver } from '../LocaleReciver';
|
|
5
|
+
import useProTableStyle from './style';
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
name: 'JPagination',
|
|
8
|
+
components: {
|
|
9
|
+
Pagination
|
|
10
|
+
},
|
|
11
|
+
props: {
|
|
12
|
+
..._paginationProps
|
|
13
|
+
},
|
|
14
|
+
emits: ['change'],
|
|
15
|
+
setup(props, {
|
|
16
|
+
emit
|
|
17
|
+
}) {
|
|
18
|
+
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
19
|
+
const prefixCls = computed(() => 'pro-table');
|
|
20
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
21
|
+
const className = computed(() => {
|
|
22
|
+
return {
|
|
23
|
+
'hide-content': !props.isShowContent
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const _showTotal = num => {
|
|
27
|
+
const minSize = props.pageIndex * props.pageSize + 1;
|
|
28
|
+
const MaxSize = (props.pageIndex + 1) * props.pageSize;
|
|
29
|
+
let localePage = contextLocale.value.pagination?.page || '';
|
|
30
|
+
let localeTotal = contextLocale.value.pagination?.total || '';
|
|
31
|
+
const _maxSize = props.totalLoading ? MaxSize : MaxSize > num ? num : MaxSize;
|
|
32
|
+
[minSize, _maxSize].forEach((item, index) => {
|
|
33
|
+
localePage = localePage.replace(`{${index}}`, item);
|
|
34
|
+
});
|
|
35
|
+
return h('span', {}, [localePage, props.totalLoading ? h(Spin, {
|
|
36
|
+
size: 'small',
|
|
37
|
+
style: {
|
|
38
|
+
margin: '0 4px'
|
|
39
|
+
}
|
|
40
|
+
}) : h('span', {
|
|
41
|
+
style: {
|
|
42
|
+
margin: '0 4px'
|
|
43
|
+
}
|
|
44
|
+
}, num), localeTotal]);
|
|
45
|
+
};
|
|
46
|
+
const onChange = (page, size) => {
|
|
47
|
+
emit('change', page, size);
|
|
48
|
+
};
|
|
49
|
+
return {
|
|
50
|
+
hashId,
|
|
51
|
+
className,
|
|
52
|
+
_showTotal,
|
|
53
|
+
onChange
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|