@meethive/components 0.0.3 → 0.0.4
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 +301 -418
- package/es/ProLayout/Basic/Header.js +91 -111
- package/es/ProLayout/PageContainer/index.js +267 -344
- package/es/ProLayout/SiderMenu/BaseMenu.js +186 -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 +301 -418
- package/lib/ProLayout/Basic/Header.js +91 -111
- package/lib/ProLayout/PageContainer/index.js +267 -344
- package/lib/ProLayout/SiderMenu/BaseMenu.js +186 -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
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
props: {
|
|
8
|
-
active: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: true
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
setup(props) {
|
|
14
|
-
return {}
|
|
15
|
-
}
|
|
16
|
-
})
|
|
1
|
+
import { defineComponent } from 'vue';
|
|
2
|
+
import Item from './Item.js';
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
components: {
|
|
5
|
+
Item
|
|
6
|
+
},
|
|
7
|
+
props: {
|
|
8
|
+
active: {
|
|
9
|
+
type: Boolean,
|
|
10
|
+
default: true
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(props) {
|
|
14
|
+
return {};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
@@ -1,27 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
props: {
|
|
10
|
-
active: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: true
|
|
13
|
-
},
|
|
14
|
-
loading: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
setup(props) {
|
|
20
|
-
const prefixCls = computed(() => 'j-skeleton')
|
|
21
|
-
const [wrapSSR, hashId] = useSkeletonStyle(prefixCls)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
})
|
|
1
|
+
import { defineComponent, computed } from 'vue';
|
|
2
|
+
import Item from './Item.js';
|
|
3
|
+
import useSkeletonStyle from '../style';
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'JSkeletonTree',
|
|
6
|
+
components: {
|
|
7
|
+
Item
|
|
8
|
+
},
|
|
9
|
+
props: {
|
|
10
|
+
active: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true
|
|
13
|
+
},
|
|
14
|
+
loading: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: true
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(props) {
|
|
20
|
+
const prefixCls = computed(() => 'j-skeleton');
|
|
21
|
+
const [wrapSSR, hashId] = useSkeletonStyle(prefixCls);
|
|
22
|
+
return {
|
|
23
|
+
hashId
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
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
|
-
timeFormat
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
})
|
|
1
|
+
import { defineComponent, computed } from 'vue';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: 'JTimeFormat',
|
|
5
|
+
props: {
|
|
6
|
+
time: {
|
|
7
|
+
type: [String, Number, undefined]
|
|
8
|
+
},
|
|
9
|
+
format: {
|
|
10
|
+
type: String
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
setup(props) {
|
|
14
|
+
const handleValue = (time, format) => {
|
|
15
|
+
const value = Number(time);
|
|
16
|
+
const _format = format || 'YYYY-MM-DD HH:mm:ss';
|
|
17
|
+
if (!isNaN(value)) {
|
|
18
|
+
return dayjs(value).format(_format);
|
|
19
|
+
}
|
|
20
|
+
return time;
|
|
21
|
+
};
|
|
22
|
+
const timeFormat = computed(() => {
|
|
23
|
+
if (props.time) {
|
|
24
|
+
return handleValue(props.time, props.format);
|
|
25
|
+
}
|
|
26
|
+
return props.time;
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
timeFormat
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
});
|
package/es/Title/Title.js
CHANGED
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
})
|
|
1
|
+
import { defineComponent, computed } from 'vue';
|
|
2
|
+
import useTitleStyle from './style';
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: 'JTitle',
|
|
5
|
+
props: {
|
|
6
|
+
data: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: ''
|
|
9
|
+
},
|
|
10
|
+
style: {
|
|
11
|
+
type: Object,
|
|
12
|
+
default: () => ({})
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
setup(props) {
|
|
16
|
+
const prefixCls = computed(() => 'j-title');
|
|
17
|
+
const [wrapSSR, hashId] = useTitleStyle(prefixCls);
|
|
18
|
+
return {
|
|
19
|
+
prefixCls,
|
|
20
|
+
hashId
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -1,113 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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
|
-
type:
|
|
30
|
-
default:
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
return {
|
|
103
|
-
typeMap,
|
|
104
|
-
myValue,
|
|
105
|
-
objectValue,
|
|
106
|
-
bindProps,
|
|
107
|
-
handleItemModalSubmit,
|
|
108
|
-
onChange,
|
|
109
|
-
monacoCancel,
|
|
110
|
-
handleFileChangeInternal,
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
})
|
|
1
|
+
import { defineComponent, ref, watch, computed } from 'vue';
|
|
2
|
+
import { componentsType } from './util';
|
|
3
|
+
import { Select, DatePicker, TimePicker, Input, InputNumber, InputPassword, Upload } from 'ant-design-vue';
|
|
4
|
+
import { omit } from 'lodash-es';
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'JValueItem',
|
|
7
|
+
components: {
|
|
8
|
+
Select,
|
|
9
|
+
DatePicker,
|
|
10
|
+
TimePicker,
|
|
11
|
+
Input,
|
|
12
|
+
InputNumber,
|
|
13
|
+
InputPassword,
|
|
14
|
+
Upload
|
|
15
|
+
},
|
|
16
|
+
props: {
|
|
17
|
+
// 组件双向绑定的值
|
|
18
|
+
modelValue: {
|
|
19
|
+
type: [Number, String],
|
|
20
|
+
default: ''
|
|
21
|
+
},
|
|
22
|
+
// 组件类型
|
|
23
|
+
itemType: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'string'
|
|
26
|
+
},
|
|
27
|
+
// 多选框
|
|
28
|
+
mode: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: undefined
|
|
31
|
+
},
|
|
32
|
+
placeholder: String,
|
|
33
|
+
options: Array,
|
|
34
|
+
style: Object,
|
|
35
|
+
class: String,
|
|
36
|
+
valueFormat: String,
|
|
37
|
+
action: [String, Promise],
|
|
38
|
+
headers: Object,
|
|
39
|
+
disabled: Boolean,
|
|
40
|
+
extraProps: {
|
|
41
|
+
type: Object,
|
|
42
|
+
default: () => ({})
|
|
43
|
+
},
|
|
44
|
+
handleFileChange: {
|
|
45
|
+
type: Function
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
emits: ['update:modelValue', 'change'],
|
|
49
|
+
setup(props, {
|
|
50
|
+
emit
|
|
51
|
+
}) {
|
|
52
|
+
const typeMap = new Map(Object.entries(componentsType));
|
|
53
|
+
const myValue = ref(undefined);
|
|
54
|
+
const objectValue = ref('');
|
|
55
|
+
const bindProps = computed(() => {
|
|
56
|
+
return Object.assign(omit(props, ['extraProps']), props.extraProps);
|
|
57
|
+
});
|
|
58
|
+
const handleItemModalSubmit = () => {
|
|
59
|
+
myValue.value = objectValue.value.replace(/[\r\n]\s*/g, '');
|
|
60
|
+
emit('update:modelValue', objectValue.value);
|
|
61
|
+
emit('change', objectValue.value);
|
|
62
|
+
};
|
|
63
|
+
const onChange = e => {
|
|
64
|
+
emit('update:modelValue', myValue.value);
|
|
65
|
+
emit('change', e && e.target ? e.target.value : e);
|
|
66
|
+
};
|
|
67
|
+
const monacoCancel = () => {
|
|
68
|
+
objectValue.value = props.modelValue;
|
|
69
|
+
};
|
|
70
|
+
const handleFileChangeInternal = async info => {
|
|
71
|
+
if (info.file.status === 'done') {
|
|
72
|
+
let url = info?.file?.response?.result?.accessUrl;
|
|
73
|
+
if (props.handleFileChange) {
|
|
74
|
+
url = await props.handleFileChange(info, info.file.response);
|
|
75
|
+
}
|
|
76
|
+
myValue.value = url;
|
|
77
|
+
emit('update:modelValue', url);
|
|
78
|
+
emit('change', url);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
watch(() => props.modelValue, () => {
|
|
82
|
+
myValue.value = props.modelValue;
|
|
83
|
+
if (props.itemType === 'object') {
|
|
84
|
+
objectValue.value = props.modelValue;
|
|
85
|
+
}
|
|
86
|
+
}, {
|
|
87
|
+
immediate: true
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
typeMap,
|
|
91
|
+
myValue,
|
|
92
|
+
objectValue,
|
|
93
|
+
bindProps,
|
|
94
|
+
handleItemModalSubmit,
|
|
95
|
+
onChange,
|
|
96
|
+
monacoCancel,
|
|
97
|
+
handleFileChangeInternal
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
});
|