@meethive/components 0.0.2 → 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 +38 -31
- 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 +38 -31
- 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
package/lib/FullPage/FullPage.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const fullPage = ref(null)
|
|
11
|
-
const {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
import { defineComponent, ref, inject } from 'vue';
|
|
2
|
+
import { useElementBounding } from '@vueuse/core';
|
|
3
|
+
import { FullPageConfig } from '../utils/constants';
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'JFullPage',
|
|
6
|
+
setup() {
|
|
7
|
+
const config = inject(FullPageConfig, {
|
|
8
|
+
reduceHeight: 24
|
|
9
|
+
});
|
|
10
|
+
const fullPage = ref(null);
|
|
11
|
+
const {
|
|
12
|
+
y
|
|
13
|
+
} = useElementBounding(fullPage);
|
|
14
|
+
return {
|
|
15
|
+
config,
|
|
16
|
+
fullPage,
|
|
17
|
+
y
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
package/lib/Icon/Icon.js
CHANGED
|
@@ -1,49 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
return
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
...props,
|
|
44
|
-
style: attrs.style,
|
|
45
|
-
onClick: click
|
|
46
|
-
})
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
})
|
|
1
|
+
import { defineComponent, watchEffect, inject, h } from 'vue';
|
|
2
|
+
import * as aIcon from '@ant-design/icons-vue';
|
|
3
|
+
import { createFromIconfontCN } from '@ant-design/icons-vue';
|
|
4
|
+
import { ComponentsEnum } from '../utils/constants';
|
|
5
|
+
let MyIcon = createFromIconfontCN({
|
|
6
|
+
scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // 在 iconfont.cn 上生成
|
|
7
|
+
});
|
|
8
|
+
const AntdIcon = props => {
|
|
9
|
+
return h(aIcon[props.type]);
|
|
10
|
+
};
|
|
11
|
+
const Icon = props => {
|
|
12
|
+
return Object.keys(aIcon).includes(props.type) ? h(AntdIcon, props) : h(MyIcon, props);
|
|
13
|
+
};
|
|
14
|
+
export default defineComponent({
|
|
15
|
+
name: 'AIcon',
|
|
16
|
+
props: ['type', 'scriptUrl', 'class'],
|
|
17
|
+
emits: ['click'],
|
|
18
|
+
setup(props, {
|
|
19
|
+
emit,
|
|
20
|
+
attrs
|
|
21
|
+
}) {
|
|
22
|
+
const config = inject(ComponentsEnum.Icon, {});
|
|
23
|
+
watchEffect(() => {
|
|
24
|
+
const url = props.scriptUrl || config.scriptUrl;
|
|
25
|
+
if (url) {
|
|
26
|
+
MyIcon = createFromIconfontCN({
|
|
27
|
+
scriptUrl: url
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const click = () => {
|
|
32
|
+
emit('click');
|
|
33
|
+
};
|
|
34
|
+
return () => {
|
|
35
|
+
return h(Icon, {
|
|
36
|
+
...props,
|
|
37
|
+
style: attrs.style,
|
|
38
|
+
onClick: click
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -1,31 +1,38 @@
|
|
|
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
|
-
})
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { renderSlot as _renderSlot } from "vue";
|
|
3
|
+
import { provide, reactive, watch } from 'vue';
|
|
4
|
+
import defaultLocal from '../locale/zh-CN';
|
|
5
|
+
const __sfc_main__ = _defineComponent({
|
|
6
|
+
...{
|
|
7
|
+
name: 'JLocaleProvider'
|
|
8
|
+
},
|
|
9
|
+
__name: 'LocaleProvider',
|
|
10
|
+
props: {
|
|
11
|
+
locale: {
|
|
12
|
+
type: Object,
|
|
13
|
+
required: false
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
const props = __props;
|
|
18
|
+
const state = reactive({
|
|
19
|
+
antLocale: {
|
|
20
|
+
...(props.locale || defaultLocal || {}),
|
|
21
|
+
exist: true
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
watch(() => props.locale, () => {
|
|
25
|
+
state.antLocale = {
|
|
26
|
+
...(props.locale || defaultLocal || {}),
|
|
27
|
+
exist: true
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
deep: true
|
|
31
|
+
});
|
|
32
|
+
provide('componentLocaleData', state);
|
|
33
|
+
return (_ctx, _cache) => {
|
|
34
|
+
return _renderSlot(_ctx.$slots, "default");
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
export default __sfc_main__;
|
package/lib/Markdown/Markdown.js
CHANGED
|
@@ -1,118 +1,101 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
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
|
-
|
|
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
|
-
.use(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
})
|
|
103
|
-
|
|
104
|
-
props.plugins.forEach(({ plugin, options = {} }) => {
|
|
105
|
-
markdown.use(plugin, options)
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
md.value = markdown.render(props.source)
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
onMounted(() => renderMarkdown())
|
|
112
|
-
onUpdated(() => renderMarkdown())
|
|
113
|
-
|
|
114
|
-
return {
|
|
115
|
-
md
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
})
|
|
1
|
+
import { defineComponent, onMounted, onUpdated, ref } from 'vue';
|
|
2
|
+
import MarkdownIt from 'markdown-it';
|
|
3
|
+
import MarkdownItAbbr from 'markdown-it-abbr';
|
|
4
|
+
import MarkdownItAnchor from 'markdown-it-anchor';
|
|
5
|
+
import MarkdownItDeflist from 'markdown-it-deflist';
|
|
6
|
+
import MarkdownItFootnote from 'markdown-it-footnote';
|
|
7
|
+
import MarkdownItHighlightjs from 'markdown-it-highlightjs';
|
|
8
|
+
import MarkdownItIns from 'markdown-it-ins';
|
|
9
|
+
import MarkdownItMark from 'markdown-it-mark';
|
|
10
|
+
import MarkdownItSub from 'markdown-it-sub';
|
|
11
|
+
import MarkdownItSup from 'markdown-it-sup';
|
|
12
|
+
import MarkdownItTaskLists from 'markdown-it-task-lists';
|
|
13
|
+
import MarkdownItTOC from 'markdown-it-toc-done-right';
|
|
14
|
+
const props = {
|
|
15
|
+
anchor: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
},
|
|
19
|
+
breaks: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: false
|
|
22
|
+
},
|
|
23
|
+
emoji: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: () => ({})
|
|
26
|
+
},
|
|
27
|
+
highlight: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: () => ({})
|
|
30
|
+
},
|
|
31
|
+
html: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
langPrefix: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'language-'
|
|
38
|
+
},
|
|
39
|
+
linkify: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
plugins: {
|
|
44
|
+
type: Array,
|
|
45
|
+
default: () => []
|
|
46
|
+
},
|
|
47
|
+
quotes: {
|
|
48
|
+
type: String,
|
|
49
|
+
default: ''
|
|
50
|
+
},
|
|
51
|
+
source: {
|
|
52
|
+
type: String,
|
|
53
|
+
default: ''
|
|
54
|
+
},
|
|
55
|
+
tasklists: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => ({})
|
|
58
|
+
},
|
|
59
|
+
toc: {
|
|
60
|
+
type: Object,
|
|
61
|
+
default: () => ({})
|
|
62
|
+
},
|
|
63
|
+
typographer: {
|
|
64
|
+
type: Boolean,
|
|
65
|
+
default: false
|
|
66
|
+
},
|
|
67
|
+
xhtmlOut: {
|
|
68
|
+
type: Boolean,
|
|
69
|
+
default: false
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
export default defineComponent({
|
|
73
|
+
name: 'JMarkdown',
|
|
74
|
+
props: props,
|
|
75
|
+
setup(props) {
|
|
76
|
+
const md = ref();
|
|
77
|
+
const renderMarkdown = () => {
|
|
78
|
+
const markdown = new MarkdownIt().use(MarkdownItAbbr).use(MarkdownItAnchor, props.anchor).use(MarkdownItDeflist).use(MarkdownItFootnote).use(MarkdownItHighlightjs, props.highlight).use(MarkdownItIns).use(MarkdownItMark).use(MarkdownItSub).use(MarkdownItSup).use(MarkdownItTaskLists, props.tasklists).use(MarkdownItTOC, props.toc).set({
|
|
79
|
+
breaks: props.breaks,
|
|
80
|
+
html: props.html,
|
|
81
|
+
langPrefix: props.langPrefix,
|
|
82
|
+
linkify: props.linkify,
|
|
83
|
+
quotes: props.quotes,
|
|
84
|
+
typographer: props.typographer,
|
|
85
|
+
xhtmlOut: props.xhtmlOut
|
|
86
|
+
});
|
|
87
|
+
props.plugins.forEach(({
|
|
88
|
+
plugin,
|
|
89
|
+
options = {}
|
|
90
|
+
}) => {
|
|
91
|
+
markdown.use(plugin, options);
|
|
92
|
+
});
|
|
93
|
+
md.value = markdown.render(props.source);
|
|
94
|
+
};
|
|
95
|
+
onMounted(() => renderMarkdown());
|
|
96
|
+
onUpdated(() => renderMarkdown());
|
|
97
|
+
return {
|
|
98
|
+
md
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|