@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
|
@@ -1,122 +1,106 @@
|
|
|
1
|
-
import { defineComponent as _defineComponent } from 'vue'
|
|
2
|
-
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import useCheckButtonStyle from './style'
|
|
9
|
-
import { Form } from 'ant-design-vue'
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle } from "vue";
|
|
3
|
+
const _hoisted_1 = ["onClick"];
|
|
4
|
+
import { computed, ref, watch } from 'vue';
|
|
5
|
+
import { isArray } from '@meethive/utils';
|
|
6
|
+
import useCheckButtonStyle from './style';
|
|
7
|
+
import { Form } from 'ant-design-vue';
|
|
12
8
|
const __sfc_main__ = _defineComponent({
|
|
13
|
-
...{
|
|
14
|
-
|
|
15
|
-
},
|
|
9
|
+
...{
|
|
10
|
+
name: 'JCheckButton'
|
|
11
|
+
},
|
|
16
12
|
__name: 'CheckButton',
|
|
17
|
-
props: {
|
|
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
|
-
},
|
|
13
|
+
props: {
|
|
14
|
+
value: {
|
|
15
|
+
type: [String, Array],
|
|
16
|
+
default: undefined
|
|
17
|
+
},
|
|
18
|
+
options: {
|
|
19
|
+
type: Array,
|
|
20
|
+
default: () => []
|
|
21
|
+
},
|
|
22
|
+
multiple: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
disabled: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: false
|
|
29
|
+
},
|
|
30
|
+
class: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: undefined
|
|
33
|
+
},
|
|
34
|
+
style: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: () => ({})
|
|
37
|
+
}
|
|
38
|
+
},
|
|
43
39
|
emits: ['update:value', 'change', 'select'],
|
|
44
|
-
setup(__props, {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
const
|
|
53
|
-
const
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
myValue.value.includes(item.value) ? 'selected' : '',
|
|
111
|
-
item.disabled ? 'disabled' : '',
|
|
112
|
-
_unref(hashId)
|
|
113
|
-
]),
|
|
114
|
-
onClick: () => { selected(item.value, item.disabled) }
|
|
115
|
-
}, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1))
|
|
116
|
-
}), 128 /* KEYED_FRAGMENT */))
|
|
117
|
-
], 6 /* CLASS, STYLE */))
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
})
|
|
40
|
+
setup(__props, {
|
|
41
|
+
emit: __emit
|
|
42
|
+
}) {
|
|
43
|
+
const props = __props;
|
|
44
|
+
const emit = __emit;
|
|
45
|
+
const prefixCls = computed(() => 'j-check-button');
|
|
46
|
+
const [wrapSSR, hashId] = useCheckButtonStyle(prefixCls);
|
|
47
|
+
const formItemContext = Form.useInjectFormItemContext();
|
|
48
|
+
const myValue = ref();
|
|
49
|
+
const optionsMap = ref(new Map());
|
|
50
|
+
const _options = computed(() => {
|
|
51
|
+
props.options.forEach(item => {
|
|
52
|
+
if (props.disabled) {
|
|
53
|
+
item.disabled = props.disabled;
|
|
54
|
+
}
|
|
55
|
+
optionsMap.value.set(item.value, item);
|
|
56
|
+
});
|
|
57
|
+
return props.options;
|
|
58
|
+
});
|
|
59
|
+
watch(() => props.value, () => {
|
|
60
|
+
if (props.value) {
|
|
61
|
+
myValue.value = isArray(props.value) ? props.value : [props.value];
|
|
62
|
+
} else {
|
|
63
|
+
myValue.value = [];
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
immediate: true,
|
|
67
|
+
deep: true
|
|
68
|
+
});
|
|
69
|
+
const selected = (key, disabled) => {
|
|
70
|
+
if (disabled) return;
|
|
71
|
+
const values = new Set(myValue.value);
|
|
72
|
+
if (values.has(key)) {
|
|
73
|
+
values.delete(key);
|
|
74
|
+
} else {
|
|
75
|
+
if (!props.multiple) {
|
|
76
|
+
values.clear();
|
|
77
|
+
}
|
|
78
|
+
values.add(key);
|
|
79
|
+
}
|
|
80
|
+
myValue.value = [...values.values()];
|
|
81
|
+
const optionsItems = myValue.value.map(_key => {
|
|
82
|
+
return optionsMap.value.get(_key);
|
|
83
|
+
});
|
|
84
|
+
const _value = props.multiple ? myValue.value : myValue.value[0];
|
|
85
|
+
emit('update:value', _value);
|
|
86
|
+
emit('change', _value, props.multiple ? optionsItems : optionsItems[0]);
|
|
87
|
+
emit('select', _value, props.multiple ? optionsItems : optionsItems[0]);
|
|
88
|
+
formItemContext.onFieldChange();
|
|
89
|
+
};
|
|
90
|
+
return (_ctx, _cache) => {
|
|
91
|
+
return _openBlock(), _createElementBlock("div", {
|
|
92
|
+
class: _normalizeClass(['j-check-button', props.class, _unref(hashId)]),
|
|
93
|
+
style: _normalizeStyle(props.style)
|
|
94
|
+
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_options.value, item => {
|
|
95
|
+
return _openBlock(), _createElementBlock("div", {
|
|
96
|
+
key: item.value,
|
|
97
|
+
class: _normalizeClass(['j-check-button-item', myValue.value.includes(item.value) ? 'selected' : '', item.disabled ? 'disabled' : '', _unref(hashId)]),
|
|
98
|
+
onClick: () => {
|
|
99
|
+
selected(item.value, item.disabled);
|
|
100
|
+
}
|
|
101
|
+
}, _toDisplayString(item.label), 11 /* TEXT, CLASS, PROPS */, _hoisted_1);
|
|
102
|
+
}), 128 /* KEYED_FRAGMENT */))], 6 /* CLASS, STYLE */);
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
});
|
|
122
106
|
export default __sfc_main__;
|
|
@@ -1,73 +1,49 @@
|
|
|
1
|
-
import { defineComponent as _defineComponent } from 'vue'
|
|
2
|
-
import { unref as _unref, renderSlot as _renderSlot, createVNode as _createVNode, withCtx as _withCtx, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createBlock as _createBlock } from "vue"
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
PermissionButtonConfig,
|
|
12
|
-
SearchConfig,
|
|
13
|
-
FullPageConfig,
|
|
14
|
-
TableConfig
|
|
15
|
-
} from '../utils/constants'
|
|
16
|
-
import LocaleProvider from '../LocaleProvider/index'
|
|
17
|
-
import Empty from '../Empty/index'
|
|
18
|
-
import zh from '../locale/zh-CN'
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
2
|
+
import { unref as _unref, renderSlot as _renderSlot, createVNode as _createVNode, withCtx as _withCtx, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, openBlock as _openBlock, createBlock as _createBlock } from "vue";
|
|
3
|
+
import { provide, reactive } from 'vue';
|
|
4
|
+
import { ConfigProvider as AConfigProvider } from 'ant-design-vue';
|
|
5
|
+
import { omit } from 'lodash-es';
|
|
6
|
+
import { configProps } from './context';
|
|
7
|
+
import { ComponentsEnum, MAPConfig, PermissionButtonConfig, SearchConfig, FullPageConfig, TableConfig } from '../utils/constants';
|
|
8
|
+
import LocaleProvider from '../LocaleProvider/index';
|
|
9
|
+
import Empty from '../Empty/index';
|
|
10
|
+
import zh from '../locale/zh-CN';
|
|
21
11
|
const __sfc_main__ = _defineComponent({
|
|
22
|
-
...{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
12
|
+
...{
|
|
13
|
+
name: 'JConfigProvider',
|
|
14
|
+
inheritAttrs: false
|
|
15
|
+
},
|
|
26
16
|
__name: 'ConfigProvider',
|
|
27
|
-
props: {
|
|
17
|
+
props: {
|
|
18
|
+
...configProps()
|
|
19
|
+
},
|
|
28
20
|
setup(__props) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
provide(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
default: _withCtx(() => [
|
|
53
|
-
_createVNode(_unref(LocaleProvider), {
|
|
54
|
-
locale: _ctx.componentsLocale || _unref(zh)
|
|
55
|
-
}, {
|
|
56
|
-
default: _withCtx(() => [
|
|
57
|
-
_renderSlot(_ctx.$slots, "default")
|
|
58
|
-
]),
|
|
59
|
-
renderEmpty: _withCtx(() => [
|
|
60
|
-
_renderSlot(_ctx.$slots, "renderEmpty", {}, () => [
|
|
61
|
-
_createVNode(_unref(Empty))
|
|
62
|
-
])
|
|
63
|
-
]),
|
|
21
|
+
const props = __props;
|
|
22
|
+
const _iconConfig = reactive(props.IconConfig || {});
|
|
23
|
+
const _mapConfig = reactive(props.MapConfig || {});
|
|
24
|
+
const _searchConfig = reactive(props.SearchConfig || {});
|
|
25
|
+
const _PermissionButtonConfig = reactive(props.PermissionButtonConfig || {});
|
|
26
|
+
const _FullPageConfig = reactive(props.FullPageConfig || {});
|
|
27
|
+
const _TableConfig = reactive(props.TableConfig || {});
|
|
28
|
+
provide(ComponentsEnum.Icon, _iconConfig);
|
|
29
|
+
provide(MAPConfig, _mapConfig);
|
|
30
|
+
provide(SearchConfig, _searchConfig);
|
|
31
|
+
provide(PermissionButtonConfig, _PermissionButtonConfig);
|
|
32
|
+
provide(FullPageConfig, _FullPageConfig);
|
|
33
|
+
provide(TableConfig, _TableConfig);
|
|
34
|
+
const configProviderProps = omit(props, ['IconConfig', 'MapConfig', 'SearchConfig']);
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return _openBlock(), _createBlock(_unref(AConfigProvider), _normalizeProps(_guardReactiveProps(_unref(configProviderProps))), {
|
|
37
|
+
default: _withCtx(() => [_createVNode(_unref(LocaleProvider), {
|
|
38
|
+
locale: _ctx.componentsLocale || _unref(zh)
|
|
39
|
+
}, {
|
|
40
|
+
default: _withCtx(() => [_renderSlot(_ctx.$slots, "default")]),
|
|
41
|
+
renderEmpty: _withCtx(() => [_renderSlot(_ctx.$slots, "renderEmpty", {}, () => [_createVNode(_unref(Empty))])]),
|
|
42
|
+
_: 3 /* FORWARDED */
|
|
43
|
+
}, 8 /* PROPS */, ["locale"])]),
|
|
64
44
|
_: 3 /* FORWARDED */
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
})
|
|
45
|
+
}, 16 /* FULL_PROPS */);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
73
49
|
export default __sfc_main__;
|