vxe-pc-ui 0.1.0 → 0.2.0
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/README.md +7 -0
- package/es/anchor/src/anchor-link.js +2 -2
- package/es/anchor/src/util.js +1 -1
- package/es/checkbox/src/checkbox.js +3 -3
- package/es/checkbox/src/group.js +3 -3
- package/es/components.js +6 -0
- package/es/form/src/form-config-item.js +1 -1
- package/es/form/src/form-gather.js +1 -1
- package/es/form/src/form-item.js +4 -4
- package/es/form/src/form.js +3 -3
- package/es/input/src/input.js +3 -3
- package/es/layout-aside/src/layout-aside.js +4 -2
- package/es/layout-aside/style.css +3 -1
- package/es/layout-aside/style.min.css +1 -1
- package/es/layout-body/src/layout-body.js +7 -2
- package/es/layout-body/style.css +2 -0
- package/es/layout-body/style.min.css +1 -1
- package/es/layout-container/src/layout-container.js +2 -1
- package/es/layout-footer/src/layout-footer.js +5 -3
- package/es/layout-footer/style.css +3 -1
- package/es/layout-footer/style.min.css +1 -1
- package/es/layout-header/style.css +0 -1
- package/es/layout-header/style.min.css +1 -1
- package/es/radio/src/button.js +4 -4
- package/es/radio/src/group.js +4 -4
- package/es/radio/src/radio.js +4 -4
- package/es/select/src/optgroup.js +1 -1
- package/es/select/src/option.js +1 -1
- package/es/select/src/select.js +4 -4
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/switch/src/switch.js +3 -3
- package/es/tab-pane/index.js +8 -0
- package/es/tab-pane/style.css +0 -0
- package/es/tab-pane/style.min.css +0 -0
- package/es/tabs/index.js +8 -0
- package/es/tabs/src/tab-pane.js +64 -0
- package/es/tabs/src/tabs.js +195 -0
- package/es/tabs/src/util.js +17 -0
- package/es/tabs/style.css +113 -0
- package/es/tabs/style.min.css +1 -0
- package/es/textarea/src/textarea.js +3 -3
- package/es/ui/src/core.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-layout-aside/style.css +3 -1
- package/es/vxe-layout-aside/style.min.css +1 -1
- package/es/vxe-layout-body/style.css +2 -0
- package/es/vxe-layout-body/style.min.css +1 -1
- package/es/vxe-layout-footer/style.css +3 -1
- package/es/vxe-layout-footer/style.min.css +1 -1
- package/es/vxe-layout-header/style.css +0 -1
- package/es/vxe-layout-header/style.min.css +1 -1
- package/es/vxe-tab-pane/index.js +3 -0
- package/es/vxe-tab-pane/style.css +0 -0
- package/es/vxe-tab-pane/style.min.css +0 -0
- package/es/vxe-tabs/index.js +3 -0
- package/es/vxe-tabs/style.css +113 -0
- package/es/vxe-tabs/style.min.css +1 -0
- package/lib/anchor/src/anchor-link.js +1 -1
- package/lib/anchor/src/anchor-link.min.js +1 -1
- package/lib/anchor/src/util.js +2 -2
- package/lib/anchor/src/util.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +3 -3
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +3 -3
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/components.js +25 -1
- package/lib/components.min.js +1 -1
- package/lib/form/src/form-config-item.js +1 -1
- package/lib/form/src/form-config-item.min.js +1 -1
- package/lib/form/src/form-gather.js +1 -1
- package/lib/form/src/form-gather.min.js +1 -1
- package/lib/form/src/form-item.js +4 -4
- package/lib/form/src/form-item.min.js +1 -1
- package/lib/form/src/form.js +3 -3
- package/lib/form/src/form.min.js +1 -1
- package/lib/index.umd.js +421 -55
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +3 -3
- package/lib/input/src/input.min.js +1 -1
- package/lib/layout-aside/src/layout-aside.js +5 -2
- package/lib/layout-aside/src/layout-aside.min.js +1 -1
- package/lib/layout-aside/style/style.css +3 -1
- package/lib/layout-aside/style/style.min.css +1 -1
- package/lib/layout-body/src/layout-body.js +9 -2
- package/lib/layout-body/src/layout-body.min.js +1 -1
- package/lib/layout-body/style/style.css +2 -0
- package/lib/layout-body/style/style.min.css +1 -1
- package/lib/layout-container/src/layout-container.js +4 -1
- package/lib/layout-container/src/layout-container.min.js +1 -1
- package/lib/layout-footer/src/layout-footer.js +8 -3
- package/lib/layout-footer/src/layout-footer.min.js +1 -1
- package/lib/layout-footer/style/style.css +3 -1
- package/lib/layout-footer/style/style.min.css +1 -1
- package/lib/layout-header/style/style.css +0 -1
- package/lib/layout-header/style/style.min.css +1 -1
- package/lib/radio/src/button.js +4 -4
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +4 -4
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +4 -4
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/select/src/optgroup.js +1 -1
- package/lib/select/src/optgroup.min.js +1 -1
- package/lib/select/src/option.js +1 -1
- package/lib/select/src/option.min.js +1 -1
- package/lib/select/src/select.js +4 -4
- package/lib/select/src/select.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/switch/src/switch.js +3 -3
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/tab-pane/index.js +15 -0
- package/lib/tab-pane/index.min.js +1 -0
- package/lib/tab-pane/style/index.js +1 -0
- package/lib/tab-pane/style/style.css +0 -0
- package/lib/tab-pane/style/style.min.css +0 -0
- package/lib/tabs/index.js +15 -0
- package/lib/tabs/index.min.js +1 -0
- package/lib/tabs/src/tab-pane.js +73 -0
- package/lib/tabs/src/tab-pane.min.js +1 -0
- package/lib/tabs/src/tabs.js +240 -0
- package/lib/tabs/src/tabs.min.js +1 -0
- package/lib/tabs/src/util.js +27 -0
- package/lib/tabs/src/util.min.js +1 -0
- package/lib/tabs/style/index.js +1 -0
- package/lib/tabs/style/style.css +113 -0
- package/lib/tabs/style/style.min.css +1 -0
- package/lib/textarea/src/textarea.js +3 -3
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/ui/src/core.js +1 -1
- package/lib/ui/src/core.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/lib/vxe-layout-aside/style/style.css +3 -1
- package/lib/vxe-layout-aside/style/style.min.css +1 -1
- package/lib/vxe-layout-body/style/style.css +2 -0
- package/lib/vxe-layout-body/style/style.min.css +1 -1
- package/lib/vxe-layout-footer/style/style.css +3 -1
- package/lib/vxe-layout-footer/style/style.min.css +1 -1
- package/lib/vxe-layout-header/style/style.css +0 -1
- package/lib/vxe-layout-header/style/style.min.css +1 -1
- package/lib/vxe-tab-pane/index.js +22 -0
- package/lib/vxe-tab-pane/index.min.js +1 -0
- package/lib/vxe-tab-pane/style/index.js +1 -0
- package/lib/vxe-tab-pane/style/style.css +0 -0
- package/lib/vxe-tab-pane/style/style.min.css +0 -0
- package/lib/vxe-tabs/index.js +22 -0
- package/lib/vxe-tabs/index.min.js +1 -0
- package/lib/vxe-tabs/style/index.js +1 -0
- package/lib/vxe-tabs/style/style.css +113 -0
- package/lib/vxe-tabs/style/style.min.css +1 -0
- package/package.json +1 -1
- package/packages/anchor/src/anchor-link.ts +2 -2
- package/packages/anchor/src/util.ts +1 -1
- package/packages/checkbox/src/checkbox.ts +3 -3
- package/packages/checkbox/src/group.ts +3 -3
- package/packages/components.ts +6 -0
- package/packages/form/src/form-config-item.ts +1 -1
- package/packages/form/src/form-gather.ts +1 -1
- package/packages/form/src/form-item.ts +4 -4
- package/packages/form/src/form.ts +4 -3
- package/packages/input/src/input.ts +3 -3
- package/packages/layout-aside/src/layout-aside.ts +8 -6
- package/packages/layout-body/src/layout-body.ts +9 -4
- package/packages/layout-container/src/layout-container.ts +5 -4
- package/packages/layout-footer/src/layout-footer.ts +7 -5
- package/packages/layout-header/src/layout-header.ts +3 -3
- package/packages/radio/src/button.ts +4 -4
- package/packages/radio/src/group.ts +4 -4
- package/packages/radio/src/radio.ts +4 -4
- package/packages/select/src/optgroup.ts +1 -1
- package/packages/select/src/option.ts +1 -1
- package/packages/select/src/select.ts +4 -4
- package/packages/switch/src/switch.ts +3 -3
- package/packages/tab-pane/index.ts +11 -0
- package/packages/tabs/index.ts +11 -0
- package/packages/tabs/src/tab-pane.ts +85 -0
- package/packages/tabs/src/tabs.ts +223 -0
- package/packages/tabs/src/util.ts +21 -0
- package/packages/textarea/src/textarea.ts +3 -3
- package/styles/all.scss +2 -0
- package/styles/components/layout-aside.scss +3 -1
- package/styles/components/layout-body.scss +3 -1
- package/styles/components/layout-footer.scss +3 -1
- package/styles/components/layout-header.scss +0 -1
- package/styles/components/tab-pane.scss +0 -0
- package/styles/components/tabs.scss +116 -0
- package/types/all.d.ts +2 -0
- package/types/components/layout-aside.d.ts +10 -1
- package/types/components/layout-body.d.ts +4 -1
- package/types/components/layout-container.d.ts +4 -1
- package/types/components/layout-footer.d.ts +7 -2
- package/types/components/layout-header.d.ts +4 -1
- package/types/components/tab-pane.d.ts +84 -0
- package/types/components/tabs.d.ts +80 -0
- package/types/tool/common.d.ts +5 -0
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@ npm install vxe-pc-ui
|
|
|
30
30
|
// ...
|
|
31
31
|
import { createApp } from 'vue'
|
|
32
32
|
import VxeUI from 'vxe-pc-ui'
|
|
33
|
+
import 'vxe-pc-ui/lib/style.css'
|
|
33
34
|
// ...
|
|
34
35
|
|
|
35
36
|
VxeUI.config({
|
|
@@ -43,6 +44,12 @@ app.mount('#app')
|
|
|
43
44
|
// ...
|
|
44
45
|
```
|
|
45
46
|
|
|
47
|
+
## Contributors
|
|
48
|
+
|
|
49
|
+
Thank you to everyone who contributed to this project.
|
|
50
|
+
|
|
51
|
+
[](https://github.com/x-extends/vxe-pc-ui/graphs/contributors)
|
|
52
|
+
|
|
46
53
|
## License
|
|
47
54
|
|
|
48
55
|
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, computed, reactive, inject, createCommentVNode, onMounted, onUnmounted, provide, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import {
|
|
3
|
+
import { assembleAnchorLink, destroyAnchorLink } from './util';
|
|
4
4
|
export default defineComponent({
|
|
5
5
|
name: 'VxeAnchorLink',
|
|
6
6
|
props: {
|
|
@@ -52,7 +52,7 @@ export default defineComponent({
|
|
|
52
52
|
});
|
|
53
53
|
onMounted(() => {
|
|
54
54
|
if ($xeAnchor && refElem.value) {
|
|
55
|
-
|
|
55
|
+
assembleAnchorLink($xeAnchor, refElem.value, linkConfig, $xeParentAnchorLink);
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
58
|
onUnmounted(() => {
|
package/es/anchor/src/util.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
-
export function
|
|
2
|
+
export function assembleAnchorLink($xeAnchor, elem, linkConfig, $xeParentAnchorLink) {
|
|
3
3
|
const staticLinks = $xeAnchor.reactData.staticLinks;
|
|
4
4
|
const parentElem = elem.parentNode;
|
|
5
5
|
const parentLinkConfig = $xeParentAnchorLink ? $xeParentAnchorLink.linkConfig : null;
|
|
@@ -23,7 +23,7 @@ export default defineComponent({
|
|
|
23
23
|
setup(props, context) {
|
|
24
24
|
const { slots, emit } = context;
|
|
25
25
|
const $xeform = inject('$xeForm', null);
|
|
26
|
-
const
|
|
26
|
+
const formItemInfo = inject('xeFormItemInfo', null);
|
|
27
27
|
const xID = XEUtils.uniqueId();
|
|
28
28
|
const $xecheckbox = {
|
|
29
29
|
xID,
|
|
@@ -66,8 +66,8 @@ export default defineComponent({
|
|
|
66
66
|
emit('update:modelValue', value);
|
|
67
67
|
checkboxMethods.dispatchEvent('change', params, evnt);
|
|
68
68
|
// 自动更新校验状态
|
|
69
|
-
if ($xeform &&
|
|
70
|
-
$xeform.triggerItemEvent(evnt,
|
|
69
|
+
if ($xeform && formItemInfo) {
|
|
70
|
+
$xeform.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
}
|
package/es/checkbox/src/group.js
CHANGED
|
@@ -20,7 +20,7 @@ export default defineComponent({
|
|
|
20
20
|
setup(props, context) {
|
|
21
21
|
const { slots, emit } = context;
|
|
22
22
|
const $xeform = inject('$xeForm', null);
|
|
23
|
-
const
|
|
23
|
+
const formItemInfo = inject('xeFormItemInfo', null);
|
|
24
24
|
const xID = XEUtils.uniqueId();
|
|
25
25
|
const computeIsMaximize = computed(() => {
|
|
26
26
|
const { modelValue, max } = props;
|
|
@@ -75,8 +75,8 @@ export default defineComponent({
|
|
|
75
75
|
emit('update:modelValue', checklist);
|
|
76
76
|
$xecheckboxgroup.dispatchEvent('change', Object.assign({ checklist }, params), evnt);
|
|
77
77
|
// 自动更新校验状态
|
|
78
|
-
if ($xeform &&
|
|
79
|
-
$xeform.triggerItemEvent(evnt,
|
|
78
|
+
if ($xeform && formItemInfo) {
|
|
79
|
+
$xeform.triggerItemEvent(evnt, formItemInfo.itemConfig.field, checklist);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
};
|
package/es/components.js
CHANGED
|
@@ -33,6 +33,8 @@ import VxeRadioGroup from './radio-group';
|
|
|
33
33
|
import VxeRow from './row';
|
|
34
34
|
import VxeSelect from './select';
|
|
35
35
|
import VxeSwitch from './switch';
|
|
36
|
+
import VxeTabPane from './tab-pane';
|
|
37
|
+
import VxeTabs from './tabs';
|
|
36
38
|
import VxeTextarea from './textarea';
|
|
37
39
|
import VxeTooltip from './tooltip';
|
|
38
40
|
import zhCN from './locale/lang/zh-CN';
|
|
@@ -74,6 +76,8 @@ const components = [
|
|
|
74
76
|
VxeRow,
|
|
75
77
|
VxeSelect,
|
|
76
78
|
VxeSwitch,
|
|
79
|
+
VxeTabPane,
|
|
80
|
+
VxeTabs,
|
|
77
81
|
VxeTextarea,
|
|
78
82
|
VxeTooltip
|
|
79
83
|
];
|
|
@@ -116,5 +120,7 @@ export * from './radio-group';
|
|
|
116
120
|
export * from './row';
|
|
117
121
|
export * from './select';
|
|
118
122
|
export * from './switch';
|
|
123
|
+
export * from './tab-pane';
|
|
124
|
+
export * from './tabs';
|
|
119
125
|
export * from './textarea';
|
|
120
126
|
export * from './tooltip';
|
|
@@ -15,7 +15,7 @@ const VxeFormConfigItem = defineComponent({
|
|
|
15
15
|
setup(props) {
|
|
16
16
|
const $xeform = inject('$xeForm', {});
|
|
17
17
|
const xeformiteminfo = { itemConfig: props.itemConfig };
|
|
18
|
-
provide('
|
|
18
|
+
provide('xeFormItemInfo', xeformiteminfo);
|
|
19
19
|
const renderVN = () => {
|
|
20
20
|
const { reactData } = $xeform;
|
|
21
21
|
const { data, rules, span: allSpan, align: allAlign, titleAlign: allTitleAlign, titleWidth: allTitleWidth, titleColon: allTitleColon, titleAsterisk: allTitleAsterisk, titleOverflow: allTitleOverflow, vertical: allVertical } = $xeform.props;
|
|
@@ -13,7 +13,7 @@ export default defineComponent({
|
|
|
13
13
|
const formItem = reactive(createItem($xeForm, props));
|
|
14
14
|
formItem.children = [];
|
|
15
15
|
const formItemInfo = { itemConfig: formItem };
|
|
16
|
-
provide('
|
|
16
|
+
provide('xeFormItemInfo', formItemInfo);
|
|
17
17
|
watchItem(props, formItem);
|
|
18
18
|
onMounted(() => {
|
|
19
19
|
assemItem($xeForm, refElem.value, formItem, parentFormGather);
|
package/es/form/src/form-item.js
CHANGED
|
@@ -60,11 +60,11 @@ export default defineComponent({
|
|
|
60
60
|
setup(props, { slots }) {
|
|
61
61
|
const refElem = ref();
|
|
62
62
|
const $xeform = inject('$xeForm', {});
|
|
63
|
-
const formGather = inject('$
|
|
63
|
+
const formGather = inject('$xeFormGather', null);
|
|
64
64
|
const formItem = reactive(createItem($xeform, props));
|
|
65
65
|
formItem.slots = slots;
|
|
66
66
|
const formItemInfo = { itemConfig: formItem };
|
|
67
|
-
provide('
|
|
67
|
+
provide('xeFormItemInfo', formItemInfo);
|
|
68
68
|
watchItem(props, formItem);
|
|
69
69
|
onMounted(() => {
|
|
70
70
|
assemItem($xeform, refElem.value, formItem, formGather);
|
|
@@ -218,8 +218,8 @@ export default defineComponent({
|
|
|
218
218
|
formItem,
|
|
219
219
|
renderVN
|
|
220
220
|
};
|
|
221
|
-
provide('$
|
|
222
|
-
provide('$
|
|
221
|
+
provide('$xeFormItem', $xeformitem);
|
|
222
|
+
provide('$xeFormGather', null);
|
|
223
223
|
return $xeformitem;
|
|
224
224
|
},
|
|
225
225
|
render() {
|
package/es/form/src/form.js
CHANGED
|
@@ -112,6 +112,7 @@ export default defineComponent({
|
|
|
112
112
|
visible: false
|
|
113
113
|
}
|
|
114
114
|
});
|
|
115
|
+
provide('xeFormItemInfo', null);
|
|
115
116
|
const $xegrid = inject('$xegrid', null);
|
|
116
117
|
const refElem = ref();
|
|
117
118
|
const refTooltip = ref();
|
|
@@ -654,9 +655,8 @@ export default defineComponent({
|
|
|
654
655
|
};
|
|
655
656
|
$xeform.renderVN = renderVN;
|
|
656
657
|
provide('$xeForm', $xeform);
|
|
657
|
-
provide('$
|
|
658
|
-
provide('$
|
|
659
|
-
provide('$xeFormItemInfo', null);
|
|
658
|
+
provide('$xeFormGather', null);
|
|
659
|
+
provide('$xeFormItem', null);
|
|
660
660
|
return $xeform;
|
|
661
661
|
},
|
|
662
662
|
render() {
|
package/es/input/src/input.js
CHANGED
|
@@ -89,7 +89,7 @@ export default defineComponent({
|
|
|
89
89
|
setup(props, context) {
|
|
90
90
|
const { slots, emit } = context;
|
|
91
91
|
const $xeform = inject('$xeForm', null);
|
|
92
|
-
const
|
|
92
|
+
const formItemInfo = inject('xeFormItemInfo', null);
|
|
93
93
|
const xID = XEUtils.uniqueId();
|
|
94
94
|
const computeSize = useSize(props);
|
|
95
95
|
const reactData = reactive({
|
|
@@ -581,8 +581,8 @@ export default defineComponent({
|
|
|
581
581
|
if (XEUtils.toValueString(props.modelValue) !== value) {
|
|
582
582
|
inputMethods.dispatchEvent('change', { value }, evnt);
|
|
583
583
|
// 自动更新校验状态
|
|
584
|
-
if ($xeform &&
|
|
585
|
-
$xeform.triggerItemEvent(evnt,
|
|
584
|
+
if ($xeform && formItemInfo) {
|
|
585
|
+
$xeform.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
|
|
586
586
|
}
|
|
587
587
|
}
|
|
588
588
|
};
|
|
@@ -6,7 +6,8 @@ export default defineComponent({
|
|
|
6
6
|
props: {
|
|
7
7
|
width: [String, Number],
|
|
8
8
|
collapsed: Boolean,
|
|
9
|
-
collapseWidth: [String, Number]
|
|
9
|
+
collapseWidth: [String, Number],
|
|
10
|
+
padding: Boolean
|
|
10
11
|
},
|
|
11
12
|
emits: [],
|
|
12
13
|
setup(props, context) {
|
|
@@ -41,12 +42,13 @@ export default defineComponent({
|
|
|
41
42
|
getComputeMaps: () => computeMaps
|
|
42
43
|
};
|
|
43
44
|
const renderVN = () => {
|
|
44
|
-
const { width, collapsed } = props;
|
|
45
|
+
const { width, collapsed, padding } = props;
|
|
45
46
|
const wrapperWidth = computeWrapperWidth.value;
|
|
46
47
|
const defaultSlot = slots.default;
|
|
47
48
|
return h('div', {
|
|
48
49
|
ref: refElem,
|
|
49
50
|
class: ['vxe-layout-aside', {
|
|
51
|
+
'is--padding': padding,
|
|
50
52
|
'is--default-width': !width,
|
|
51
53
|
'is--collapse': collapsed
|
|
52
54
|
}],
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
.vxe-layout-aside {
|
|
2
2
|
flex-shrink: 0;
|
|
3
3
|
transition: width 0.3s;
|
|
4
|
-
padding: var(--vxe-ui-layout-padding-default);
|
|
5
4
|
overflow-y: auto;
|
|
6
5
|
overflow-x: hidden;
|
|
7
6
|
}
|
|
@@ -10,4 +9,7 @@
|
|
|
10
9
|
}
|
|
11
10
|
.vxe-layout-aside.is--collapse {
|
|
12
11
|
width: var(--vxe-ui-layout-aside-collapse-width);
|
|
12
|
+
}
|
|
13
|
+
.vxe-layout-aside.is--padding {
|
|
14
|
+
padding: var(--vxe-ui-layout-padding-default);
|
|
13
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-layout-aside{flex-shrink:0;transition:width .3s;
|
|
1
|
+
.vxe-layout-aside{flex-shrink:0;transition:width .3s;overflow-y:auto;overflow-x:hidden}.vxe-layout-aside.is--default-width{width:var(--vxe-ui-layout-aside-default-width)}.vxe-layout-aside.is--collapse{width:var(--vxe-ui-layout-aside-collapse-width)}.vxe-layout-aside.is--padding{padding:var(--vxe-ui-layout-padding-default)}
|
|
@@ -2,7 +2,9 @@ import { defineComponent, ref, h, reactive } from 'vue';
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
export default defineComponent({
|
|
4
4
|
name: 'VxeLayoutBody',
|
|
5
|
-
props: {
|
|
5
|
+
props: {
|
|
6
|
+
padding: Boolean
|
|
7
|
+
},
|
|
6
8
|
emits: [],
|
|
7
9
|
setup(props, context) {
|
|
8
10
|
const { slots } = context;
|
|
@@ -22,10 +24,13 @@ export default defineComponent({
|
|
|
22
24
|
getComputeMaps: () => computeMaps
|
|
23
25
|
};
|
|
24
26
|
const renderVN = () => {
|
|
27
|
+
const { padding } = props;
|
|
25
28
|
const defaultSlot = slots.default;
|
|
26
29
|
return h('div', {
|
|
27
30
|
ref: refElem,
|
|
28
|
-
class: 'vxe-layout-body'
|
|
31
|
+
class: ['vxe-layout-body', {
|
|
32
|
+
'is--padding': padding
|
|
33
|
+
}]
|
|
29
34
|
}, defaultSlot ? defaultSlot({}) : []);
|
|
30
35
|
};
|
|
31
36
|
$xeLayoutBody.renderVN = renderVN;
|
package/es/layout-body/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-layout-body{flex-grow:1
|
|
1
|
+
.vxe-layout-body{flex-grow:1}.vxe-layout-body.is--padding{padding:var(--vxe-ui-layout-padding-default)}
|
|
@@ -24,11 +24,12 @@ export default defineComponent({
|
|
|
24
24
|
getComputeMaps: () => computeMaps
|
|
25
25
|
};
|
|
26
26
|
const renderVN = () => {
|
|
27
|
+
const { vertical } = props;
|
|
27
28
|
const defaultSlot = slots.default;
|
|
28
29
|
return h('div', {
|
|
29
30
|
ref: refElem,
|
|
30
31
|
class: ['vxe-layout-container', {
|
|
31
|
-
'is--vertical':
|
|
32
|
+
'is--vertical': vertical
|
|
32
33
|
}]
|
|
33
34
|
}, defaultSlot ? defaultSlot({}) : []);
|
|
34
35
|
};
|
|
@@ -3,7 +3,8 @@ import XEUtils from 'xe-utils';
|
|
|
3
3
|
export default defineComponent({
|
|
4
4
|
name: 'VxeLayoutFooter',
|
|
5
5
|
props: {
|
|
6
|
-
fixed: Boolean
|
|
6
|
+
fixed: Boolean,
|
|
7
|
+
align: String
|
|
7
8
|
},
|
|
8
9
|
emits: [],
|
|
9
10
|
setup(props, context) {
|
|
@@ -24,11 +25,12 @@ export default defineComponent({
|
|
|
24
25
|
getComputeMaps: () => computeMaps
|
|
25
26
|
};
|
|
26
27
|
const renderVN = () => {
|
|
28
|
+
const { fixed, align } = props;
|
|
27
29
|
const defaultSlot = slots.default;
|
|
28
30
|
return h('div', {
|
|
29
31
|
ref: refElem,
|
|
30
|
-
class: ['vxe-layout-footer', {
|
|
31
|
-
'is--fixed':
|
|
32
|
+
class: ['vxe-layout-footer', align ? `align--${align}` : '', {
|
|
33
|
+
'is--fixed': fixed
|
|
32
34
|
}]
|
|
33
35
|
}, defaultSlot ? defaultSlot({}) : []);
|
|
34
36
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.vxe-layout-footer {
|
|
2
2
|
flex-shrink: 0;
|
|
3
|
-
padding: var(--vxe-ui-layout-padding-default);
|
|
4
3
|
background-color: var(--vxe-ui-layout-background-color);
|
|
5
4
|
}
|
|
6
5
|
.vxe-layout-footer.is--fixed {
|
|
@@ -8,4 +7,7 @@
|
|
|
8
7
|
bottom: 0;
|
|
9
8
|
left: 0;
|
|
10
9
|
z-index: 9;
|
|
10
|
+
}
|
|
11
|
+
.vxe-layout-footer.align--center {
|
|
12
|
+
text-align: center;
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-layout-footer{flex-shrink:0;
|
|
1
|
+
.vxe-layout-footer{flex-shrink:0;background-color:var(--vxe-ui-layout-background-color)}.vxe-layout-footer.is--fixed{position:sticky;bottom:0;left:0;z-index:9}.vxe-layout-footer.align--center{text-align:center}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.vxe-layout-header{flex-shrink:0;
|
|
1
|
+
.vxe-layout-header{flex-shrink:0;background-color:var(--vxe-ui-layout-background-color)}.vxe-layout-header.is--fixed{position:sticky;top:0;left:0;z-index:9}
|
package/es/radio/src/button.js
CHANGED
|
@@ -21,7 +21,7 @@ export default defineComponent({
|
|
|
21
21
|
setup(props, context) {
|
|
22
22
|
const { slots, emit } = context;
|
|
23
23
|
const $xeform = inject('$xeForm', null);
|
|
24
|
-
const
|
|
24
|
+
const xeFormItemInfo = inject('xeFormItemInfo', null);
|
|
25
25
|
const xID = XEUtils.uniqueId();
|
|
26
26
|
const computeSize = useSize(props);
|
|
27
27
|
const $xeradiobutton = {
|
|
@@ -30,7 +30,7 @@ export default defineComponent({
|
|
|
30
30
|
context
|
|
31
31
|
};
|
|
32
32
|
let radioButtonMethods = {};
|
|
33
|
-
const $xeradiogroup = inject('$
|
|
33
|
+
const $xeradiogroup = inject('$xeRadioGroup', null);
|
|
34
34
|
const computeDisabled = computed(() => {
|
|
35
35
|
return props.disabled || ($xeradiogroup && $xeradiogroup.props.disabled);
|
|
36
36
|
});
|
|
@@ -58,8 +58,8 @@ export default defineComponent({
|
|
|
58
58
|
emit('update:modelValue', label);
|
|
59
59
|
radioButtonMethods.dispatchEvent('change', { label }, evnt);
|
|
60
60
|
// 自动更新校验状态
|
|
61
|
-
if ($xeform &&
|
|
62
|
-
$xeform.triggerItemEvent(evnt,
|
|
61
|
+
if ($xeform && xeFormItemInfo) {
|
|
62
|
+
$xeform.triggerItemEvent(evnt, xeFormItemInfo.itemConfig.field, label);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
};
|
package/es/radio/src/group.js
CHANGED
|
@@ -22,7 +22,7 @@ export default defineComponent({
|
|
|
22
22
|
setup(props, context) {
|
|
23
23
|
const { slots, emit } = context;
|
|
24
24
|
const $xeform = inject('$xeForm', null);
|
|
25
|
-
const
|
|
25
|
+
const formItemInfo = inject('xeFormItemInfo', null);
|
|
26
26
|
const xID = XEUtils.uniqueId();
|
|
27
27
|
const $xeradiogroup = {
|
|
28
28
|
xID,
|
|
@@ -52,8 +52,8 @@ export default defineComponent({
|
|
|
52
52
|
emit('update:modelValue', params.label);
|
|
53
53
|
radioGroupMethods.dispatchEvent('change', params);
|
|
54
54
|
// 自动更新校验状态
|
|
55
|
-
if ($xeform &&
|
|
56
|
-
$xeform.triggerItemEvent(evnt,
|
|
55
|
+
if ($xeform && formItemInfo) {
|
|
56
|
+
$xeform.triggerItemEvent(evnt, formItemInfo.itemConfig.field, params.label);
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
};
|
|
@@ -87,7 +87,7 @@ export default defineComponent({
|
|
|
87
87
|
renderVN,
|
|
88
88
|
dispatchEvent
|
|
89
89
|
});
|
|
90
|
-
provide('$
|
|
90
|
+
provide('$xeRadioGroup', $xeradiogroup);
|
|
91
91
|
return renderVN;
|
|
92
92
|
}
|
|
93
93
|
});
|
package/es/radio/src/radio.js
CHANGED
|
@@ -22,7 +22,7 @@ export default defineComponent({
|
|
|
22
22
|
setup(props, context) {
|
|
23
23
|
const { slots, emit } = context;
|
|
24
24
|
const $xeform = inject('$xeForm', null);
|
|
25
|
-
const
|
|
25
|
+
const formItemInfo = inject('xeFormItemInfo', null);
|
|
26
26
|
const xID = XEUtils.uniqueId();
|
|
27
27
|
const $xeradio = {
|
|
28
28
|
xID,
|
|
@@ -30,7 +30,7 @@ export default defineComponent({
|
|
|
30
30
|
context
|
|
31
31
|
};
|
|
32
32
|
const computeSize = useSize(props);
|
|
33
|
-
const $xeradiogroup = inject('$
|
|
33
|
+
const $xeradiogroup = inject('$xeRadioGroup', null);
|
|
34
34
|
let radioMethods = {};
|
|
35
35
|
const computeDisabled = computed(() => {
|
|
36
36
|
return props.disabled || ($xeradiogroup && $xeradiogroup.props.disabled);
|
|
@@ -53,8 +53,8 @@ export default defineComponent({
|
|
|
53
53
|
emit('update:modelValue', label);
|
|
54
54
|
radioMethods.dispatchEvent('change', { label }, evnt);
|
|
55
55
|
// 自动更新校验状态
|
|
56
|
-
if ($xeform &&
|
|
57
|
-
$xeform.triggerItemEvent(evnt,
|
|
56
|
+
if ($xeform && formItemInfo) {
|
|
57
|
+
$xeform.triggerItemEvent(evnt, formItemInfo.itemConfig.field, label);
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
};
|
|
@@ -10,7 +10,7 @@ export default defineComponent({
|
|
|
10
10
|
},
|
|
11
11
|
setup(props, { slots }) {
|
|
12
12
|
const elem = ref();
|
|
13
|
-
const $xeselect = inject('$
|
|
13
|
+
const $xeselect = inject('$xeSelect', {});
|
|
14
14
|
const option = createOption($xeselect, props);
|
|
15
15
|
const xeoption = { option };
|
|
16
16
|
option.options = [];
|
package/es/select/src/option.js
CHANGED
|
@@ -11,7 +11,7 @@ export default defineComponent({
|
|
|
11
11
|
},
|
|
12
12
|
setup(props, { slots }) {
|
|
13
13
|
const elem = ref();
|
|
14
|
-
const $xeselect = inject('$
|
|
14
|
+
const $xeselect = inject('$xeSelect', {});
|
|
15
15
|
const optgroup = inject('xeoptgroup', null);
|
|
16
16
|
const option = createOption($xeselect, props);
|
|
17
17
|
option.slots = slots;
|
package/es/select/src/select.js
CHANGED
|
@@ -60,7 +60,7 @@ export default defineComponent({
|
|
|
60
60
|
setup(props, context) {
|
|
61
61
|
const { slots, emit } = context;
|
|
62
62
|
const $xeform = inject('$xeForm', null);
|
|
63
|
-
const
|
|
63
|
+
const formItemInfo = inject('xeFormItemInfo', null);
|
|
64
64
|
const xID = XEUtils.uniqueId();
|
|
65
65
|
const computeSize = useSize(props);
|
|
66
66
|
const reactData = reactive({
|
|
@@ -409,8 +409,8 @@ export default defineComponent({
|
|
|
409
409
|
emit('update:modelValue', selectValue);
|
|
410
410
|
selectMethods.dispatchEvent('change', { value: selectValue }, evnt);
|
|
411
411
|
// 自动更新校验状态
|
|
412
|
-
if ($xeform &&
|
|
413
|
-
$xeform.triggerItemEvent(evnt,
|
|
412
|
+
if ($xeform && formItemInfo) {
|
|
413
|
+
$xeform.triggerItemEvent(evnt, formItemInfo.itemConfig.field, selectValue);
|
|
414
414
|
}
|
|
415
415
|
}
|
|
416
416
|
};
|
|
@@ -983,7 +983,7 @@ export default defineComponent({
|
|
|
983
983
|
]);
|
|
984
984
|
};
|
|
985
985
|
$xeselect.renderVN = renderVN;
|
|
986
|
-
provide('$
|
|
986
|
+
provide('$xeSelect', $xeselect);
|
|
987
987
|
return $xeselect;
|
|
988
988
|
},
|
|
989
989
|
render() {
|