@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.
Files changed (111) hide show
  1. package/es/AutoComplete/AutoComplete.js +71 -80
  2. package/es/BadgeStatus/Badge.js +38 -47
  3. package/es/CardSelect/CardSelect.js +115 -137
  4. package/es/CheckButton/CheckButton.js +102 -118
  5. package/es/ConfigProvider/ConfigProvider.js +44 -68
  6. package/es/DragModal/DragModal.js +191 -212
  7. package/es/EditTable/Body.js +158 -189
  8. package/es/EditTable/CellRender.js +10 -12
  9. package/es/EditTable/EditTable.js +385 -434
  10. package/es/EditTable/FormItem.js +140 -169
  11. package/es/EditTable/Group.js +171 -204
  12. package/es/EditTable/Header.js +57 -63
  13. package/es/EditTable/HeaderRender.js +10 -12
  14. package/es/EditTable/components/ContextMenu/Menu.js +78 -86
  15. package/es/EditTable/components/Search/Search.js +151 -163
  16. package/es/EditTable/components/Search/Sort.js +104 -119
  17. package/es/Ellipsis/Ellipsis.js +144 -148
  18. package/es/Empty/Empty.js +51 -57
  19. package/es/FullPage/FullPage.js +20 -19
  20. package/es/Icon/Icon.js +42 -49
  21. package/es/LocaleProvider/LocaleProvider.js +38 -31
  22. package/es/Markdown/Markdown.js +101 -118
  23. package/es/PermissionButton/PermissionButton.js +118 -118
  24. package/es/ProLayout/Basic/BasicLayout.js +301 -418
  25. package/es/ProLayout/Basic/Header.js +91 -111
  26. package/es/ProLayout/PageContainer/index.js +267 -344
  27. package/es/ProLayout/SiderMenu/BaseMenu.js +186 -240
  28. package/es/ProTable/Alert.js +39 -40
  29. package/es/ProTable/Content.js +84 -97
  30. package/es/ProTable/Header.js +32 -33
  31. package/es/ProTable/Pagination.js +56 -55
  32. package/es/ProTable/ProTable.js +256 -276
  33. package/es/RadioButton/RadioButton.js +48 -53
  34. package/es/Scrollbar/Bar.js +65 -76
  35. package/es/Scrollbar/Scrollbar.js +129 -161
  36. package/es/Scrollbar/Thumb.js +101 -150
  37. package/es/Search/Item.js +208 -236
  38. package/es/Search/Search.js +90 -90
  39. package/es/Skeleton/Skeleton.js +26 -27
  40. package/es/Skeleton/components/DashBoardCard.js +26 -27
  41. package/es/Skeleton/components/DashBoardChart.js +26 -27
  42. package/es/Skeleton/components/Detail.js +26 -27
  43. package/es/Skeleton/components/Drawer.js +26 -27
  44. package/es/Skeleton/components/Item.js +55 -54
  45. package/es/Skeleton/components/List.js +29 -27
  46. package/es/Skeleton/components/ListCard.js +28 -28
  47. package/es/Skeleton/components/ListCardItem.js +20 -20
  48. package/es/Skeleton/components/ListTable.js +26 -27
  49. package/es/Skeleton/components/Page.js +27 -26
  50. package/es/Skeleton/components/Search.js +16 -16
  51. package/es/Skeleton/components/Tree.js +26 -27
  52. package/es/TimeFormat/TimeFormat.js +32 -36
  53. package/es/Title/Title.js +23 -26
  54. package/es/ValueItem/ValueItem.js +100 -113
  55. package/es/VirtualTable/VirtualTable.js +235 -271
  56. package/lib/AutoComplete/AutoComplete.js +71 -80
  57. package/lib/BadgeStatus/Badge.js +38 -47
  58. package/lib/CardSelect/CardSelect.js +115 -137
  59. package/lib/CheckButton/CheckButton.js +102 -118
  60. package/lib/ConfigProvider/ConfigProvider.js +44 -68
  61. package/lib/DragModal/DragModal.js +191 -212
  62. package/lib/EditTable/Body.js +158 -189
  63. package/lib/EditTable/CellRender.js +10 -12
  64. package/lib/EditTable/EditTable.js +385 -434
  65. package/lib/EditTable/FormItem.js +140 -169
  66. package/lib/EditTable/Group.js +171 -204
  67. package/lib/EditTable/Header.js +57 -63
  68. package/lib/EditTable/HeaderRender.js +10 -12
  69. package/lib/EditTable/components/ContextMenu/Menu.js +78 -86
  70. package/lib/EditTable/components/Search/Search.js +151 -163
  71. package/lib/EditTable/components/Search/Sort.js +104 -119
  72. package/lib/Ellipsis/Ellipsis.js +144 -148
  73. package/lib/Empty/Empty.js +51 -57
  74. package/lib/FullPage/FullPage.js +20 -19
  75. package/lib/Icon/Icon.js +42 -49
  76. package/lib/LocaleProvider/LocaleProvider.js +38 -31
  77. package/lib/Markdown/Markdown.js +101 -118
  78. package/lib/PermissionButton/PermissionButton.js +118 -118
  79. package/lib/ProLayout/Basic/BasicLayout.js +301 -418
  80. package/lib/ProLayout/Basic/Header.js +91 -111
  81. package/lib/ProLayout/PageContainer/index.js +267 -344
  82. package/lib/ProLayout/SiderMenu/BaseMenu.js +186 -240
  83. package/lib/ProTable/Alert.js +39 -40
  84. package/lib/ProTable/Content.js +84 -97
  85. package/lib/ProTable/Header.js +32 -33
  86. package/lib/ProTable/Pagination.js +56 -55
  87. package/lib/ProTable/ProTable.js +256 -276
  88. package/lib/RadioButton/RadioButton.js +48 -53
  89. package/lib/Scrollbar/Bar.js +65 -76
  90. package/lib/Scrollbar/Scrollbar.js +129 -161
  91. package/lib/Scrollbar/Thumb.js +101 -150
  92. package/lib/Search/Item.js +208 -236
  93. package/lib/Search/Search.js +90 -90
  94. package/lib/Skeleton/Skeleton.js +26 -27
  95. package/lib/Skeleton/components/DashBoardCard.js +26 -27
  96. package/lib/Skeleton/components/DashBoardChart.js +26 -27
  97. package/lib/Skeleton/components/Detail.js +26 -27
  98. package/lib/Skeleton/components/Drawer.js +26 -27
  99. package/lib/Skeleton/components/Item.js +55 -54
  100. package/lib/Skeleton/components/List.js +29 -27
  101. package/lib/Skeleton/components/ListCard.js +28 -28
  102. package/lib/Skeleton/components/ListCardItem.js +20 -20
  103. package/lib/Skeleton/components/ListTable.js +26 -27
  104. package/lib/Skeleton/components/Page.js +27 -26
  105. package/lib/Skeleton/components/Search.js +16 -16
  106. package/lib/Skeleton/components/Tree.js +26 -27
  107. package/lib/TimeFormat/TimeFormat.js +32 -36
  108. package/lib/Title/Title.js +23 -26
  109. package/lib/ValueItem/ValueItem.js +100 -113
  110. package/lib/VirtualTable/VirtualTable.js +235 -271
  111. package/package.json +1 -1
@@ -1,19 +1,20 @@
1
-
2
- import { defineComponent, ref, inject } from 'vue'
3
- import { useElementBounding } from '@vueuse/core'
4
- import { FullPageConfig } from '../utils/constants'
5
-
6
- export default defineComponent({
7
- name: 'JFullPage',
8
- setup() {
9
- const config = inject(FullPageConfig, { reduceHeight: 24 })
10
- const fullPage = ref(null)
11
- const { y } = useElementBounding(fullPage)
12
-
13
- return {
14
- config,
15
- fullPage,
16
- y
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 { defineComponent, watchEffect, inject, h } from 'vue'
3
- import * as aIcon from '@ant-design/icons-vue'
4
- import { createFromIconfontCN } from '@ant-design/icons-vue'
5
- import { ComponentsEnum } from '../utils/constants'
6
-
7
- let MyIcon = createFromIconfontCN({
8
- scriptUrl: '//at.alicdn.com/t/c/font_3183515_i7oma42he.js' // iconfont.cn 上生成
9
- })
10
-
11
- const AntdIcon = (props) => {
12
- return h((aIcon )[props.type])
13
- }
14
-
15
- const Icon = (props) => {
16
- return Object.keys(aIcon).includes(props.type)
17
- ? h(AntdIcon, props)
18
- : h(MyIcon, props)
19
- }
20
-
21
- export default defineComponent({
22
- name: 'AIcon',
23
- props: ['type', 'scriptUrl', 'class'],
24
- emits: ['click'],
25
- setup(props, { emit, attrs }) {
26
- const config = inject(ComponentsEnum.Icon, {})
27
-
28
- watchEffect(() => {
29
- const url = props.scriptUrl || config.scriptUrl
30
- if (url) {
31
- MyIcon = createFromIconfontCN({
32
- scriptUrl: url
33
- })
34
- }
35
- })
36
-
37
- const click = () => {
38
- emit('click')
39
- }
40
-
41
- return () => {
42
- return h(Icon, {
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 { defineComponent, provide, reactive, watch } from 'vue'
3
- import defaultLocal from '../locale/zh-CN'
4
-
5
- export default defineComponent({
6
- name: 'JLocaleProvider',
7
- props: {
8
- locale: {
9
- type: Object
10
- }
11
- },
12
- setup(props) {
13
- const state = reactive({
14
- antLocale: {
15
- ...props.locale || defaultLocal || {},
16
- exist: true
17
- }
18
- })
19
-
20
- watch(() => props.locale, () => {
21
- state.antLocale = {
22
- ...props.locale || defaultLocal || {},
23
- exist: true
24
- }
25
- }, { deep: true })
26
-
27
- provide('componentLocaleData', state)
28
-
29
- return {}
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__;
@@ -1,118 +1,101 @@
1
-
2
- import { defineComponent, onMounted, onUpdated, ref } from 'vue'
3
- import MarkdownIt from 'markdown-it'
4
- import MarkdownItAbbr from 'markdown-it-abbr'
5
- import MarkdownItAnchor from 'markdown-it-anchor'
6
- import MarkdownItDeflist from 'markdown-it-deflist'
7
- import MarkdownItFootnote from 'markdown-it-footnote'
8
- import MarkdownItHighlightjs from 'markdown-it-highlightjs'
9
- import MarkdownItIns from 'markdown-it-ins'
10
- import MarkdownItMark from 'markdown-it-mark'
11
- import MarkdownItSub from 'markdown-it-sub'
12
- import MarkdownItSup from 'markdown-it-sup'
13
- import MarkdownItTaskLists from 'markdown-it-task-lists'
14
- import MarkdownItTOC from 'markdown-it-toc-done-right'
15
-
16
- const props = {
17
- anchor: {
18
- type: Object,
19
- default: () => ({})
20
- },
21
- breaks: {
22
- type: Boolean,
23
- default: false
24
- },
25
- emoji: {
26
- type: Object,
27
- default: () => ({})
28
- },
29
- highlight: {
30
- type: Object,
31
- default: () => ({})
32
- },
33
- html: {
34
- type: Boolean,
35
- default: false
36
- },
37
- langPrefix: {
38
- type: String,
39
- default: 'language-'
40
- },
41
- linkify: {
42
- type: Boolean,
43
- default: false
44
- },
45
- plugins: {
46
- type: Array,
47
- default: () => []
48
- },
49
- quotes: {
50
- type: String,
51
- default: ''
52
- },
53
- source: {
54
- type: String,
55
- default: ''
56
- },
57
- tasklists: {
58
- type: Object,
59
- default: () => ({})
60
- },
61
- toc: {
62
- type: Object,
63
- default: () => ({})
64
- },
65
- typographer: {
66
- type: Boolean,
67
- default: false
68
- },
69
- xhtmlOut: {
70
- type: Boolean,
71
- default: false
72
- }
73
- }
74
-
75
- export default defineComponent({
76
- name: 'JMarkdown',
77
- props: props ,
78
- setup(props) {
79
- const md = ref()
80
-
81
- const renderMarkdown = () => {
82
- const markdown = new MarkdownIt()
83
- .use(MarkdownItAbbr)
84
- .use(MarkdownItAnchor, props.anchor)
85
- .use(MarkdownItDeflist)
86
- .use(MarkdownItFootnote)
87
- .use(MarkdownItHighlightjs, props.highlight)
88
- .use(MarkdownItIns)
89
- .use(MarkdownItMark)
90
- .use(MarkdownItSub)
91
- .use(MarkdownItSup)
92
- .use(MarkdownItTaskLists, props.tasklists)
93
- .use(MarkdownItTOC, props.toc)
94
- .set({
95
- breaks: props.breaks,
96
- html: props.html,
97
- langPrefix: props.langPrefix,
98
- linkify: props.linkify,
99
- quotes: props.quotes,
100
- typographer: props.typographer,
101
- xhtmlOut: props.xhtmlOut
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
+ });