vxe-pc-ui 1.1.0 → 1.1.1
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/anchor/src/anchor.js +2 -1
- package/es/button/src/button-group.js +2 -2
- package/es/button/src/button.js +4 -4
- package/es/checkbox/src/checkbox.js +2 -2
- package/es/checkbox/src/group.js +2 -2
- package/es/drawer/src/drawer.js +5 -5
- package/es/form/src/form.js +2 -2
- package/es/form-design/src/form-design.js +2 -2
- package/es/form-design/src/form-view.js +2 -2
- package/es/icon/src/icon.js +2 -1
- package/es/input/src/input.js +2 -2
- package/es/list/src/list.js +2 -2
- package/es/menu/src/menu.js +2 -2
- package/es/modal/src/modal.js +6 -6
- package/es/pager/src/pager.js +3 -3
- package/es/pulldown/src/pulldown.js +2 -2
- package/es/radio/src/button.js +2 -2
- package/es/radio/src/group.js +3 -3
- package/es/radio/src/radio.js +2 -2
- package/es/row/src/row.js +2 -1
- package/es/select/src/select.js +19 -19
- package/es/switch/src/switch.js +2 -2
- package/es/tabs/src/tabs.js +8 -0
- package/es/textarea/src/textarea.js +2 -2
- package/es/tooltip/src/tooltip.js +2 -2
- package/es/ui/index.js +2 -0
- package/lib/anchor/src/anchor.js +3 -3
- package/lib/anchor/src/anchor.min.js +1 -1
- package/lib/button/src/button-group.js +2 -3
- package/lib/button/src/button-group.min.js +1 -1
- package/lib/button/src/button.js +4 -9
- package/lib/button/src/button.min.js +1 -1
- package/lib/checkbox/src/checkbox.js +2 -3
- package/lib/checkbox/src/checkbox.min.js +1 -1
- package/lib/checkbox/src/group.js +2 -3
- package/lib/checkbox/src/group.min.js +1 -1
- package/lib/drawer/src/drawer.js +5 -6
- package/lib/drawer/src/drawer.min.js +1 -1
- package/lib/form/src/form.js +2 -3
- package/lib/form/src/form.min.js +1 -1
- package/lib/form-design/src/form-design.js +2 -3
- package/lib/form-design/src/form-design.min.js +1 -1
- package/lib/form-design/src/form-view.js +2 -3
- package/lib/form-design/src/form-view.min.js +1 -1
- package/lib/icon/src/icon.js +2 -3
- package/lib/icon/src/icon.min.js +1 -1
- package/lib/index.umd.js +125 -111
- package/lib/index.umd.min.js +1 -1
- package/lib/input/src/input.js +2 -3
- package/lib/input/src/input.min.js +1 -1
- package/lib/list/src/list.js +2 -3
- package/lib/list/src/list.min.js +1 -1
- package/lib/menu/src/menu.js +3 -4
- package/lib/menu/src/menu.min.js +1 -1
- package/lib/modal/src/modal.js +8 -10
- package/lib/modal/src/modal.min.js +1 -1
- package/lib/pager/src/pager.js +3 -4
- package/lib/pager/src/pager.min.js +1 -1
- package/lib/pulldown/src/pulldown.js +2 -3
- package/lib/pulldown/src/pulldown.min.js +1 -1
- package/lib/radio/src/button.js +2 -3
- package/lib/radio/src/button.min.js +1 -1
- package/lib/radio/src/group.js +3 -4
- package/lib/radio/src/group.min.js +1 -1
- package/lib/radio/src/radio.js +2 -3
- package/lib/radio/src/radio.min.js +1 -1
- package/lib/row/src/row.js +2 -3
- package/lib/row/src/row.min.js +1 -1
- package/lib/select/src/select.js +19 -20
- package/lib/select/src/select.min.js +1 -1
- package/lib/switch/src/switch.js +2 -3
- package/lib/switch/src/switch.min.js +1 -1
- package/lib/tabs/src/tabs.js +10 -0
- package/lib/tabs/src/tabs.min.js +1 -1
- package/lib/textarea/src/textarea.js +2 -3
- package/lib/textarea/src/textarea.min.js +1 -1
- package/lib/tooltip/src/tooltip.js +2 -3
- package/lib/tooltip/src/tooltip.min.js +1 -1
- package/lib/ui/index.js +2 -0
- package/lib/ui/index.min.js +1 -1
- package/package.json +2 -2
- package/packages/anchor/src/anchor-link.ts +1 -1
- package/packages/anchor/src/anchor.ts +3 -2
- package/packages/anchor/src/util.ts +1 -1
- package/packages/breadcrumb/src/breadcrumb.ts +1 -1
- package/packages/breadcrumb-item/src/breadcrumb-item.ts +1 -1
- package/packages/button/src/button-group.ts +3 -3
- package/packages/button/src/button.ts +5 -5
- package/packages/calendar/src/calendar.ts +1 -1
- package/packages/card/src/card.ts +1 -1
- package/packages/checkbox/src/checkbox.ts +3 -3
- package/packages/checkbox/src/group.ts +3 -3
- package/packages/collapse/src/collapse.ts +1 -1
- package/packages/collapse-pane/src/collapse-pane.ts +1 -1
- package/packages/date-input/src/date-input.ts +1 -1
- package/packages/drawer/src/drawer.ts +6 -6
- package/packages/dynamics/index.ts +1 -1
- package/packages/form/render/index.ts +1 -1
- package/packages/form/src/form-config-item.ts +2 -2
- package/packages/form/src/form-gather.ts +1 -1
- package/packages/form/src/form-item.ts +2 -2
- package/packages/form/src/form.ts +3 -3
- package/packages/form/src/render.ts +1 -1
- package/packages/form/src/util.ts +1 -1
- package/packages/form-design/render/hooks.ts +1 -1
- package/packages/form-design/render/index.ts +1 -1
- package/packages/form-design/src/form-design.ts +3 -3
- package/packages/form-design/src/form-view.ts +3 -3
- package/packages/form-design/src/layout-setting.ts +1 -1
- package/packages/form-design/src/layout-view-item.ts +1 -1
- package/packages/form-design/src/layout-view.ts +2 -2
- package/packages/form-design/src/layout-widget.ts +1 -1
- package/packages/form-design/src/setting-form.ts +1 -1
- package/packages/form-design/src/util.ts +1 -1
- package/packages/form-design/src/widget-info.ts +2 -2
- package/packages/form-design/widget-input/input-data.ts +1 -1
- package/packages/form-design/widget-input/input-form.ts +1 -1
- package/packages/form-design/widget-input/input-view.ts +1 -1
- package/packages/form-design/widget-row/row-data.ts +1 -1
- package/packages/form-design/widget-row/row-form.ts +1 -1
- package/packages/form-design/widget-row/row-view.ts +1 -1
- package/packages/form-design/widget-select/select-data.ts +1 -1
- package/packages/form-design/widget-select/select-form.ts +1 -1
- package/packages/form-design/widget-select/select-view.ts +1 -1
- package/packages/form-design/widget-textarea/textarea-data.ts +1 -1
- package/packages/form-design/widget-textarea/textarea-form.ts +1 -1
- package/packages/form-design/widget-textarea/textarea-view.ts +1 -1
- package/packages/hooks/size.ts +3 -3
- package/packages/icon/src/icon.ts +4 -2
- package/packages/input/src/date.ts +1 -1
- package/packages/input/src/input.ts +6 -6
- package/packages/layout-aside/src/layout-aside.ts +1 -1
- package/packages/layout-body/src/layout-body.ts +1 -1
- package/packages/layout-container/src/layout-container.ts +1 -1
- package/packages/layout-footer/src/layout-footer.ts +1 -1
- package/packages/layout-header/src/layout-header.ts +1 -1
- package/packages/list/src/list.ts +3 -3
- package/packages/list-design/src/list-design.ts +1 -1
- package/packages/list-design/src/list-view.ts +1 -1
- package/packages/loading/src/loading.ts +1 -1
- package/packages/menu/src/menu.ts +3 -3
- package/packages/modal/src/modal.ts +7 -7
- package/packages/number-input/src/number-input.ts +1 -1
- package/packages/pager/src/pager.ts +4 -4
- package/packages/password-input/src/password-input.ts +1 -1
- package/packages/pulldown/src/pulldown.ts +4 -4
- package/packages/radio/src/button.ts +3 -3
- package/packages/radio/src/group.ts +4 -4
- package/packages/radio/src/radio.ts +3 -3
- package/packages/row/src/col.ts +1 -1
- package/packages/row/src/row.ts +3 -2
- package/packages/select/src/optgroup.ts +1 -1
- package/packages/select/src/option.ts +1 -1
- package/packages/select/src/select.ts +21 -21
- package/packages/select/src/util.ts +1 -1
- package/packages/switch/src/switch.ts +3 -3
- package/packages/tabs/src/tab-pane.ts +1 -1
- package/packages/tabs/src/tabs.ts +13 -1
- package/packages/tabs/src/util.ts +1 -1
- package/packages/textarea/src/textarea.ts +3 -3
- package/packages/tooltip/src/tooltip.ts +3 -3
- package/packages/tree/src/tree.ts +1 -1
- package/packages/tree-select/src/tree-select.ts +1 -1
- package/packages/ui/index.ts +3 -0
- package/packages/ui/src/vn.ts +2 -2
- package/packages/upload/src/upload.ts +1 -1
- package/types/all.d.ts +1 -4
- package/types/components/anchor-link.d.ts +3 -3
- package/types/components/anchor.d.ts +4 -4
- package/types/components/breadcrumb-item.d.ts +3 -3
- package/types/components/breadcrumb.d.ts +4 -3
- package/types/components/button-group.d.ts +15 -7
- package/types/components/button.d.ts +53 -12
- package/types/components/calendar.d.ts +3 -3
- package/types/components/card.d.ts +3 -3
- package/types/components/checkbox-group.d.ts +8 -6
- package/types/components/checkbox.d.ts +5 -5
- package/types/components/col.d.ts +3 -3
- package/types/components/collapse-pane.d.ts +3 -3
- package/types/components/collapse.d.ts +3 -3
- package/types/components/date-input.d.ts +4 -3
- package/types/components/drawer.d.ts +11 -11
- package/types/components/form-design.d.ts +4 -4
- package/types/components/form-gather.d.ts +3 -3
- package/types/components/form-item.d.ts +5 -6
- package/types/components/form-view.d.ts +3 -3
- package/types/components/form.d.ts +5 -5
- package/types/components/icon.d.ts +16 -6
- package/types/components/input.d.ts +6 -6
- package/types/components/layout-aside.d.ts +4 -3
- package/types/components/layout-body.d.ts +4 -3
- package/types/components/layout-container.d.ts +4 -3
- package/types/components/layout-footer.d.ts +5 -4
- package/types/components/layout-header.d.ts +4 -3
- package/types/components/list-design.d.ts +5 -5
- package/types/components/list-view.d.ts +4 -3
- package/types/components/list.d.ts +5 -5
- package/types/components/loading.d.ts +3 -3
- package/types/components/menu.d.ts +4 -3
- package/types/components/modal.d.ts +10 -10
- package/types/components/number-input.d.ts +3 -3
- package/types/components/optgroup.d.ts +3 -3
- package/types/components/option.d.ts +3 -3
- package/types/components/pager.d.ts +5 -5
- package/types/components/password-input.d.ts +3 -3
- package/types/components/pulldown.d.ts +9 -7
- package/types/components/radio-button.d.ts +4 -4
- package/types/components/radio-group.d.ts +5 -5
- package/types/components/radio.d.ts +5 -5
- package/types/components/row.d.ts +4 -3
- package/types/components/select.d.ts +6 -7
- package/types/components/switch.d.ts +5 -5
- package/types/components/tab-pane.d.ts +5 -5
- package/types/components/tabs.d.ts +4 -3
- package/types/components/textarea.d.ts +5 -5
- package/types/components/tooltip.d.ts +7 -7
- package/types/components/tree-select.d.ts +4 -3
- package/types/components/tree.d.ts +4 -3
- package/types/components/upload.d.ts +4 -3
- package/types/ui/global-config.d.ts +42 -40
- package/types/ui/global-icon.d.ts +63 -59
- package/types/ui/index.d.ts +4 -5
- package/types/ui/renderer.d.ts +14 -14
- package/es/locale/lang/en-US.d.ts +0 -2
- package/es/locale/lang/en-US.js +0 -480
- package/es/locale/lang/es-ES.d.ts +0 -2
- package/es/locale/lang/es-ES.js +0 -480
- package/es/locale/lang/ja-JP.d.ts +0 -2
- package/es/locale/lang/ja-JP.js +0 -480
- package/es/locale/lang/pt-BR.d.ts +0 -2
- package/es/locale/lang/pt-BR.js +0 -480
- package/es/locale/lang/zh-CN.d.ts +0 -2
- package/es/locale/lang/zh-CN.js +0 -480
- package/es/locale/lang/zh-HK.d.ts +0 -2
- package/es/locale/lang/zh-HK.js +0 -2
- package/es/locale/lang/zh-MO.d.ts +0 -2
- package/es/locale/lang/zh-MO.js +0 -2
- package/es/locale/lang/zh-TC.d.ts +0 -2
- package/es/locale/lang/zh-TC.js +0 -480
- package/es/locale/lang/zh-TW.d.ts +0 -2
- package/es/locale/lang/zh-TW.js +0 -2
- package/lib/locale/lang/en-US.d.ts +0 -2
- package/lib/locale/lang/en-US.js +0 -486
- package/lib/locale/lang/en-US.min.js +0 -1
- package/lib/locale/lang/en-US.umd.js +0 -500
- package/lib/locale/lang/es-ES.d.ts +0 -2
- package/lib/locale/lang/es-ES.js +0 -486
- package/lib/locale/lang/es-ES.min.js +0 -1
- package/lib/locale/lang/es-ES.umd.js +0 -500
- package/lib/locale/lang/ja-JP.d.ts +0 -2
- package/lib/locale/lang/ja-JP.js +0 -486
- package/lib/locale/lang/ja-JP.min.js +0 -1
- package/lib/locale/lang/ja-JP.umd.js +0 -500
- package/lib/locale/lang/pt-BR.d.ts +0 -2
- package/lib/locale/lang/pt-BR.js +0 -486
- package/lib/locale/lang/pt-BR.min.js +0 -1
- package/lib/locale/lang/pt-BR.umd.js +0 -500
- package/lib/locale/lang/zh-CN.d.ts +0 -2
- package/lib/locale/lang/zh-CN.js +0 -486
- package/lib/locale/lang/zh-CN.min.js +0 -1
- package/lib/locale/lang/zh-CN.umd.js +0 -500
- package/lib/locale/lang/zh-HK.d.ts +0 -2
- package/lib/locale/lang/zh-HK.js +0 -9
- package/lib/locale/lang/zh-HK.min.js +0 -1
- package/lib/locale/lang/zh-HK.umd.js +0 -500
- package/lib/locale/lang/zh-MO.d.ts +0 -2
- package/lib/locale/lang/zh-MO.js +0 -9
- package/lib/locale/lang/zh-MO.min.js +0 -1
- package/lib/locale/lang/zh-MO.umd.js +0 -500
- package/lib/locale/lang/zh-TC.d.ts +0 -2
- package/lib/locale/lang/zh-TC.js +0 -486
- package/lib/locale/lang/zh-TC.min.js +0 -1
- package/lib/locale/lang/zh-TC.umd.js +0 -500
- package/lib/locale/lang/zh-TW.d.ts +0 -2
- package/lib/locale/lang/zh-TW.js +0 -9
- package/lib/locale/lang/zh-TW.min.js +0 -1
- package/lib/locale/lang/zh-TW.umd.js +0 -500
- package/packages/locale/lang/en-US.ts +0 -482
- package/packages/locale/lang/es-ES.ts +0 -482
- package/packages/locale/lang/ja-JP.ts +0 -482
- package/packages/locale/lang/pt-BR.ts +0 -482
- package/packages/locale/lang/zh-CN.ts +0 -482
- package/packages/locale/lang/zh-HK.ts +0 -3
- package/packages/locale/lang/zh-MO.ts +0 -3
- package/packages/locale/lang/zh-TC.ts +0 -482
- package/packages/locale/lang/zh-TW.ts +0 -3
- package/types/tool/common.d.ts +0 -62
- package/types/tool/index.d.ts +0 -6
package/es/anchor/src/anchor.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, provide, nextTick, onBeforeUnmount, onMounted, watch, createCommentVNode, computed } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
+
import { createEvent } from '@vxe-ui/core';
|
|
3
4
|
import { getOffsetPos } from '../../ui/src/dom';
|
|
4
5
|
import VxeAnchorLinkComponent from './anchor-link';
|
|
5
6
|
export default defineComponent({
|
|
@@ -49,7 +50,7 @@ export default defineComponent({
|
|
|
49
50
|
};
|
|
50
51
|
const anchorMethods = {
|
|
51
52
|
dispatchEvent(type, params, evnt) {
|
|
52
|
-
emit(type,
|
|
53
|
+
emit(type, createEvent(evnt, { $xeAnchor }, params));
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
const getContainerElem = () => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, h, provide } from 'vue';
|
|
2
|
-
import { getConfig } from '@vxe-ui/core';
|
|
2
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import VxeButtonComponent from '../../button/src/button';
|
|
@@ -31,7 +31,7 @@ export default defineComponent({
|
|
|
31
31
|
useSize(props);
|
|
32
32
|
const buttonGroupMethods = {
|
|
33
33
|
dispatchEvent(type, params, evnt) {
|
|
34
|
-
emit(type,
|
|
34
|
+
emit(type, createEvent(evnt, { $buttonGroup: $xeButtonGroup }, params));
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
const buttonGroupPrivateMethods = {
|
package/es/button/src/button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, ref, computed, Teleport, onUnmounted, reactive, nextTick, onMounted, inject } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, globalEvents, log, getIcon } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, globalEvents, log, getIcon, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { getAbsolutePos, getEventTargetNode } from '../../ui/src/dom';
|
|
6
6
|
import { getFuncText, getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
@@ -299,10 +299,10 @@ export default defineComponent({
|
|
|
299
299
|
mouseleaveEvent(evnt);
|
|
300
300
|
};
|
|
301
301
|
const mouseenterEvent = (evnt) => {
|
|
302
|
-
emit('mouseenter',
|
|
302
|
+
emit('mouseenter', createEvent(evnt, {}));
|
|
303
303
|
};
|
|
304
304
|
const mouseleaveEvent = (evnt) => {
|
|
305
|
-
emit('mouseleave',
|
|
305
|
+
emit('mouseleave', createEvent(evnt, {}));
|
|
306
306
|
};
|
|
307
307
|
const closePanel = () => {
|
|
308
308
|
const panelElem = refBtnPanel.value;
|
|
@@ -360,7 +360,7 @@ export default defineComponent({
|
|
|
360
360
|
};
|
|
361
361
|
buttonMethods = {
|
|
362
362
|
dispatchEvent(type, params, evnt) {
|
|
363
|
-
emit(type,
|
|
363
|
+
emit(type, createEvent(evnt, { $button: $xeButton }, params));
|
|
364
364
|
},
|
|
365
365
|
focus() {
|
|
366
366
|
const btnElem = refButton.value;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h, computed, inject } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getFuncText } from '../../ui/src/utils';
|
|
4
|
-
import { getConfig } from '@vxe-ui/core';
|
|
4
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
5
5
|
import { useSize } from '../../hooks/size';
|
|
6
6
|
export default defineComponent({
|
|
7
7
|
name: 'VxeCheckbox',
|
|
@@ -74,7 +74,7 @@ export default defineComponent({
|
|
|
74
74
|
};
|
|
75
75
|
checkboxMethods = {
|
|
76
76
|
dispatchEvent(type, params, evnt) {
|
|
77
|
-
emit(type,
|
|
77
|
+
emit(type, createEvent(evnt, { $checkbox: $xecheckbox }, params));
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
80
|
Object.assign($xecheckbox, checkboxMethods);
|
package/es/checkbox/src/group.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, h, provide, computed, inject } from 'vue';
|
|
2
|
-
import { getConfig } from '@vxe-ui/core';
|
|
2
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
3
3
|
import XEUtils from 'xe-utils';
|
|
4
4
|
import VxeCheckboxComponent from './checkbox';
|
|
5
5
|
import { useSize } from '../../hooks/size';
|
|
@@ -56,7 +56,7 @@ export default defineComponent({
|
|
|
56
56
|
useSize(props);
|
|
57
57
|
const checkboxGroupMethods = {
|
|
58
58
|
dispatchEvent(type, params, evnt) {
|
|
59
|
-
emit(type,
|
|
59
|
+
emit(type, createEvent(evnt, { $checkboxGroup: $xeCheckboxGroup }, params));
|
|
60
60
|
}
|
|
61
61
|
};
|
|
62
62
|
const checkboxGroupPrivateMethods = {
|
package/es/drawer/src/drawer.js
CHANGED
|
@@ -2,7 +2,7 @@ import { defineComponent, h, Teleport, ref, reactive, nextTick, watch, onMounted
|
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { useSize } from '../../hooks/size';
|
|
4
4
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils';
|
|
5
|
-
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS } from '@vxe-ui/core';
|
|
5
|
+
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent } from '@vxe-ui/core';
|
|
6
6
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
7
7
|
import VxeButtonComponent from '../../button/src/button';
|
|
8
8
|
import VxeLoadingComponent from '../../loading/index';
|
|
@@ -109,11 +109,11 @@ export default defineComponent({
|
|
|
109
109
|
if (!XEUtils.isError(rest)) {
|
|
110
110
|
reactData.contentVisible = false;
|
|
111
111
|
XEUtils.remove(allActiveDrawers, item => item === $xeDrawer);
|
|
112
|
-
drawerMethods.dispatchEvent('before-hide', params);
|
|
112
|
+
drawerMethods.dispatchEvent('before-hide', params, null);
|
|
113
113
|
setTimeout(() => {
|
|
114
114
|
reactData.visible = false;
|
|
115
115
|
emit('update:modelValue', false);
|
|
116
|
-
drawerMethods.dispatchEvent('hide', params);
|
|
116
|
+
drawerMethods.dispatchEvent('hide', params, null);
|
|
117
117
|
}, 200);
|
|
118
118
|
}
|
|
119
119
|
}).catch(e => e);
|
|
@@ -161,7 +161,7 @@ export default defineComponent({
|
|
|
161
161
|
const type = '';
|
|
162
162
|
const params = { type };
|
|
163
163
|
emit('update:modelValue', true);
|
|
164
|
-
drawerMethods.dispatchEvent('show', params);
|
|
164
|
+
drawerMethods.dispatchEvent('show', params, null);
|
|
165
165
|
});
|
|
166
166
|
}, 10);
|
|
167
167
|
nextTick(() => {
|
|
@@ -180,7 +180,7 @@ export default defineComponent({
|
|
|
180
180
|
};
|
|
181
181
|
const drawerMethods = {
|
|
182
182
|
dispatchEvent(type, params, evnt) {
|
|
183
|
-
emit(type,
|
|
183
|
+
emit(type, createEvent(evnt, { $drawer: $xeDrawer }, params));
|
|
184
184
|
},
|
|
185
185
|
open: openDrawer,
|
|
186
186
|
close() {
|
package/es/form/src/form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, ref, provide, computed, inject, reactive, watch, nextTick, onMounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, validators, renderer, log } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, validators, renderer, log, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { getFuncText, isEnableConf, eqEmptyValue } from '../../ui/src/utils';
|
|
5
5
|
import { scrollToView } from '../../ui/src/dom';
|
|
6
6
|
import { createItem, handleFieldOrItem, isHiddenItem, isActivetem } from './util';
|
|
@@ -551,7 +551,7 @@ export default defineComponent({
|
|
|
551
551
|
};
|
|
552
552
|
formMethods = {
|
|
553
553
|
dispatchEvent(type, params, evnt) {
|
|
554
|
-
emit(type,
|
|
554
|
+
emit(type, createEvent(evnt, { $form: $xeForm, $grid: $xeGrid }, params));
|
|
555
555
|
},
|
|
556
556
|
reset,
|
|
557
557
|
validate,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, provide, watch, nextTick } from 'vue';
|
|
2
|
-
import { getConfig, getI18n, renderer } from '@vxe-ui/core';
|
|
2
|
+
import { getConfig, getI18n, renderer, createEvent } from '@vxe-ui/core';
|
|
3
3
|
import { toCssUnit } from '../../ui/src/dom';
|
|
4
4
|
import { FormDesignWidgetInfo } from './widget-info';
|
|
5
5
|
import XEUtils from 'xe-utils';
|
|
@@ -86,7 +86,7 @@ export default defineComponent({
|
|
|
86
86
|
};
|
|
87
87
|
const formDesignMethods = {
|
|
88
88
|
dispatchEvent(type, params, evnt) {
|
|
89
|
-
emit(type,
|
|
89
|
+
emit(type, createEvent(evnt, { $xeFormDesign }, params));
|
|
90
90
|
},
|
|
91
91
|
createWidget,
|
|
92
92
|
createEmptyWidget,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, nextTick, provide, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { renderer } from '@vxe-ui/core';
|
|
3
|
+
import { renderer, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
5
|
import VxeFormComponent from '../../form/src/form';
|
|
6
6
|
export default defineComponent({
|
|
@@ -105,7 +105,7 @@ export default defineComponent({
|
|
|
105
105
|
return null;
|
|
106
106
|
};
|
|
107
107
|
const dispatchEvent = (type, params, evnt) => {
|
|
108
|
-
emit(type,
|
|
108
|
+
emit(type, createEvent(evnt, { $xeFormView }, params));
|
|
109
109
|
};
|
|
110
110
|
const formViewMethods = {
|
|
111
111
|
dispatchEvent,
|
package/es/icon/src/icon.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, h } from 'vue';
|
|
2
|
+
import { createEvent } from '@vxe-ui/core';
|
|
2
3
|
export default defineComponent({
|
|
3
4
|
name: 'VxeIcon',
|
|
4
5
|
props: {
|
|
@@ -11,7 +12,7 @@ export default defineComponent({
|
|
|
11
12
|
],
|
|
12
13
|
setup(props, { emit }) {
|
|
13
14
|
const clickEvent = (evnt) => {
|
|
14
|
-
emit('click',
|
|
15
|
+
emit('click', createEvent(evnt, {}));
|
|
15
16
|
};
|
|
16
17
|
return () => {
|
|
17
18
|
const { name, roll, status } = props;
|
package/es/input/src/input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, ref, computed, reactive, inject, nextTick, watch, onUnmounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { getFuncText, getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { hasClass, getAbsolutePos, getEventTargetNode } from '../../ui/src/dom';
|
|
@@ -2183,7 +2183,7 @@ export default defineComponent({
|
|
|
2183
2183
|
};
|
|
2184
2184
|
inputMethods = {
|
|
2185
2185
|
dispatchEvent(type, params, evnt) {
|
|
2186
|
-
emit(type,
|
|
2186
|
+
emit(type, createEvent(evnt, { $input: $xeInput }, params));
|
|
2187
2187
|
},
|
|
2188
2188
|
focus() {
|
|
2189
2189
|
const inputElem = refInputTarget.value;
|
package/es/list/src/list.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, ref, computed, onUnmounted, watch, reactive, nextTick, onActivated } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, globalEvents, globalResize } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, globalEvents, globalResize, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { browse } from '../../ui/src/dom';
|
|
6
6
|
import VxeLoadingComponent from '../../loading/src/loading';
|
|
@@ -214,7 +214,7 @@ export default defineComponent({
|
|
|
214
214
|
};
|
|
215
215
|
listMethods = {
|
|
216
216
|
dispatchEvent(type, params, evnt) {
|
|
217
|
-
emit(type,
|
|
217
|
+
emit(type, createEvent(evnt, { $list: $xeList }, params));
|
|
218
218
|
},
|
|
219
219
|
/**
|
|
220
220
|
* 加载数据
|
package/es/menu/src/menu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, resolveComponent, createCommentVNode, nextTick, watch, onMounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getIcon } from '@vxe-ui/core';
|
|
3
|
+
import { getIcon, createEvent } from '@vxe-ui/core';
|
|
4
4
|
export default defineComponent({
|
|
5
5
|
name: 'VxeMenu',
|
|
6
6
|
props: {
|
|
@@ -108,7 +108,7 @@ export default defineComponent({
|
|
|
108
108
|
handleClickIconCollapse(evnt, item);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
emit('click', { $menu: $xeMenu, menu: item
|
|
111
|
+
emit('click', createEvent(evnt, { $menu: $xeMenu, menu: item }));
|
|
112
112
|
};
|
|
113
113
|
const renderMenuTitle = (item) => {
|
|
114
114
|
const { icon, isExpand, hasChild } = item;
|
package/es/modal/src/modal.js
CHANGED
|
@@ -3,7 +3,7 @@ import XEUtils from 'xe-utils';
|
|
|
3
3
|
import { useSize } from '../../hooks/size';
|
|
4
4
|
import { getDomNode, getEventTargetNode } from '../../ui/src/dom';
|
|
5
5
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils';
|
|
6
|
-
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, log } from '@vxe-ui/core';
|
|
6
|
+
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, log, createEvent } from '@vxe-ui/core';
|
|
7
7
|
import VxeButtonComponent from '../../button/src/button';
|
|
8
8
|
import VxeLoadingComponent from '../../loading/index';
|
|
9
9
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
@@ -185,11 +185,11 @@ export default defineComponent({
|
|
|
185
185
|
reactData.zoomLocat = null;
|
|
186
186
|
}
|
|
187
187
|
XEUtils.remove(allActiveModals, item => item === $xeModal);
|
|
188
|
-
modalMethods.dispatchEvent('before-hide', params);
|
|
188
|
+
modalMethods.dispatchEvent('before-hide', params, null);
|
|
189
189
|
setTimeout(() => {
|
|
190
190
|
reactData.visible = false;
|
|
191
191
|
emit('update:modelValue', false);
|
|
192
|
-
modalMethods.dispatchEvent('hide', params);
|
|
192
|
+
modalMethods.dispatchEvent('hide', params, null);
|
|
193
193
|
}, 200);
|
|
194
194
|
}
|
|
195
195
|
}).catch(e => e);
|
|
@@ -329,7 +329,7 @@ export default defineComponent({
|
|
|
329
329
|
const type = '';
|
|
330
330
|
const params = { type };
|
|
331
331
|
emit('update:modelValue', true);
|
|
332
|
-
modalMethods.dispatchEvent('show', params);
|
|
332
|
+
modalMethods.dispatchEvent('show', params, null);
|
|
333
333
|
});
|
|
334
334
|
}, 10);
|
|
335
335
|
if (isMsg) {
|
|
@@ -488,7 +488,7 @@ export default defineComponent({
|
|
|
488
488
|
boxElem.style.left = `${left}px`;
|
|
489
489
|
boxElem.style.top = `${top}px`;
|
|
490
490
|
boxElem.className = boxElem.className.replace(/\s?is--drag/, '') + ' is--drag';
|
|
491
|
-
emit('move', { type: 'move'
|
|
491
|
+
emit('move', createEvent(evnt, { type: 'move' }));
|
|
492
492
|
};
|
|
493
493
|
document.onmouseup = () => {
|
|
494
494
|
document.onmousemove = domMousemove;
|
|
@@ -656,7 +656,7 @@ export default defineComponent({
|
|
|
656
656
|
};
|
|
657
657
|
modalMethods = {
|
|
658
658
|
dispatchEvent(type, params, evnt) {
|
|
659
|
-
emit(type,
|
|
659
|
+
emit(type, createEvent(evnt, { $modal: $xeModal }, params));
|
|
660
660
|
},
|
|
661
661
|
open: openModal,
|
|
662
662
|
close() {
|
package/es/pager/src/pager.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, computed, inject, ref, reactive, nextTick, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, log } from '@vxe-ui/core';
|
|
3
|
+
import { getIcon, getConfig, getI18n, globalEvents, GLOBAL_EVENT_KEYS, log, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import VxeSelectComponent from '../../select';
|
|
5
5
|
import { useSize } from '../../hooks/size';
|
|
6
6
|
export default defineComponent({
|
|
@@ -165,7 +165,7 @@ export default defineComponent({
|
|
|
165
165
|
emit('update:currentPage', pageCount);
|
|
166
166
|
}
|
|
167
167
|
emit('update:pageSize', pageSize);
|
|
168
|
-
pagerMethods.dispatchEvent('page-change', { type: 'size', pageSize, currentPage });
|
|
168
|
+
pagerMethods.dispatchEvent('page-change', { type: 'size', pageSize, currentPage }, params.$event);
|
|
169
169
|
};
|
|
170
170
|
const jumpInputEvent = (evnt) => {
|
|
171
171
|
const inputElem = evnt.target;
|
|
@@ -405,7 +405,7 @@ export default defineComponent({
|
|
|
405
405
|
};
|
|
406
406
|
pagerMethods = {
|
|
407
407
|
dispatchEvent(type, params, evnt) {
|
|
408
|
-
emit(type,
|
|
408
|
+
emit(type, createEvent(evnt, { $pager: $xepager }, params));
|
|
409
409
|
},
|
|
410
410
|
homePage() {
|
|
411
411
|
handleHomePage();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, ref, onUnmounted, reactive, nextTick, watch, createCommentVNode } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, globalEvents } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, globalEvents, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { getAbsolutePos, getEventTargetNode } from '../../ui/src/dom';
|
|
6
6
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
@@ -231,7 +231,7 @@ export default defineComponent({
|
|
|
231
231
|
};
|
|
232
232
|
pulldownMethods = {
|
|
233
233
|
dispatchEvent(type, params, evnt) {
|
|
234
|
-
emit(type,
|
|
234
|
+
emit(type, createEvent(evnt, { $pulldown: $xepulldown }, params));
|
|
235
235
|
},
|
|
236
236
|
isPanelVisible,
|
|
237
237
|
togglePanel,
|
package/es/radio/src/button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h, computed, inject } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getFuncText } from '../../ui/src/utils';
|
|
4
|
-
import { getConfig } from '@vxe-ui/core';
|
|
4
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
5
5
|
import { useSize } from '../../hooks/size';
|
|
6
6
|
export default defineComponent({
|
|
7
7
|
name: 'VxeRadioButton',
|
|
@@ -46,7 +46,7 @@ export default defineComponent({
|
|
|
46
46
|
});
|
|
47
47
|
radioButtonMethods = {
|
|
48
48
|
dispatchEvent(type, params, evnt) {
|
|
49
|
-
emit(type,
|
|
49
|
+
emit(type, createEvent(evnt, { $radioButton: $xeradiobutton }, params));
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
Object.assign($xeradiobutton, radioButtonMethods);
|
package/es/radio/src/group.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, provide, inject, computed } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import VxeRadioComponent from './radio';
|
|
5
5
|
import VxeRadioButtonComponent from './button';
|
|
6
6
|
import { useSize } from '../../hooks/size';
|
|
@@ -50,7 +50,7 @@ export default defineComponent({
|
|
|
50
50
|
const radioGroupPrivateMethods = {
|
|
51
51
|
handleChecked(params, evnt) {
|
|
52
52
|
emit('update:modelValue', params.label);
|
|
53
|
-
radioGroupMethods.dispatchEvent('change', params);
|
|
53
|
+
radioGroupMethods.dispatchEvent('change', params, evnt);
|
|
54
54
|
// 自动更新校验状态
|
|
55
55
|
if ($xeForm && formItemInfo) {
|
|
56
56
|
$xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, params.label);
|
|
@@ -59,7 +59,7 @@ export default defineComponent({
|
|
|
59
59
|
};
|
|
60
60
|
radioGroupMethods = {
|
|
61
61
|
dispatchEvent(type, params, evnt) {
|
|
62
|
-
emit(type,
|
|
62
|
+
emit(type, createEvent(evnt, { $radioGroup: $xeradiogroup }, params));
|
|
63
63
|
}
|
|
64
64
|
};
|
|
65
65
|
const renderVN = () => {
|
package/es/radio/src/radio.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h, computed, inject } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
3
|
import { getFuncText } from '../../ui/src/utils';
|
|
4
|
-
import { getConfig } from '@vxe-ui/core';
|
|
4
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
5
5
|
import { useSize } from '../../hooks/size';
|
|
6
6
|
export default defineComponent({
|
|
7
7
|
name: 'VxeRadio',
|
|
@@ -75,7 +75,7 @@ export default defineComponent({
|
|
|
75
75
|
};
|
|
76
76
|
radioMethods = {
|
|
77
77
|
dispatchEvent(type, params, evnt) {
|
|
78
|
-
emit(type,
|
|
78
|
+
emit(type, createEvent(evnt, { $radio: $xeradio }, params));
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
Object.assign($xeradio, radioMethods);
|
package/es/row/src/row.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, provide, computed } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
+
import { createEvent } from '@vxe-ui/core';
|
|
3
4
|
import { toCssUnit } from '../../ui/src/dom';
|
|
4
5
|
export default defineComponent({
|
|
5
6
|
name: 'VxeRow',
|
|
@@ -54,7 +55,7 @@ export default defineComponent({
|
|
|
54
55
|
getComputeMaps: () => computeMaps
|
|
55
56
|
};
|
|
56
57
|
const handleDefaultEvent = (evnt) => {
|
|
57
|
-
emit(evnt.type,
|
|
58
|
+
emit(evnt.type, createEvent(evnt, {}));
|
|
58
59
|
};
|
|
59
60
|
const renderVN = () => {
|
|
60
61
|
const { vertical } = props;
|
package/es/select/src/select.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, Teleport, ref, inject, computed, provide, onUnmounted, reactive, nextTick, watch, onMounted, createCommentVNode } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, getIcon, getI18n, globalEvents, GLOBAL_EVENT_KEYS, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { getEventTargetNode, getAbsolutePos } from '../../ui/src/dom';
|
|
6
6
|
import { getLastZIndex, nextZIndex, getFuncText } from '../../ui/src/utils';
|
|
@@ -87,7 +87,7 @@ export default defineComponent({
|
|
|
87
87
|
const refMaps = {
|
|
88
88
|
refElem
|
|
89
89
|
};
|
|
90
|
-
const $
|
|
90
|
+
const $xeSelect = {
|
|
91
91
|
xID,
|
|
92
92
|
props,
|
|
93
93
|
context,
|
|
@@ -691,7 +691,7 @@ export default defineComponent({
|
|
|
691
691
|
const isDisabled = checkOptionDisabled(isSelected, option, group);
|
|
692
692
|
const optid = getOptid(option);
|
|
693
693
|
const defaultSlot = slots ? slots.default : null;
|
|
694
|
-
const optParams = { option, group: null, $select: $
|
|
694
|
+
const optParams = { option, group: null, $select: $xeSelect };
|
|
695
695
|
return isVisible
|
|
696
696
|
? h('div', {
|
|
697
697
|
key: useKey || optionKey ? optid : cIndex,
|
|
@@ -736,7 +736,7 @@ export default defineComponent({
|
|
|
736
736
|
const optid = getOptid(group);
|
|
737
737
|
const isGroupDisabled = group.disabled;
|
|
738
738
|
const defaultSlot = slots ? slots.default : null;
|
|
739
|
-
const optParams = { option: group, group, $select: $
|
|
739
|
+
const optParams = { option: group, group, $select: $xeSelect };
|
|
740
740
|
return h('div', {
|
|
741
741
|
key: useKey || optionKey ? optid : gIndex,
|
|
742
742
|
class: ['vxe-optgroup', className ? (XEUtils.isFunction(className) ? className(optParams) : className) : '', {
|
|
@@ -789,7 +789,7 @@ export default defineComponent({
|
|
|
789
789
|
};
|
|
790
790
|
selectMethods = {
|
|
791
791
|
dispatchEvent(type, params, evnt) {
|
|
792
|
-
emit(type,
|
|
792
|
+
emit(type, createEvent(evnt, { $select: $xeSelect }, params));
|
|
793
793
|
},
|
|
794
794
|
isPanelVisible() {
|
|
795
795
|
return reactData.visiblePanel;
|
|
@@ -829,7 +829,7 @@ export default defineComponent({
|
|
|
829
829
|
return nextTick();
|
|
830
830
|
}
|
|
831
831
|
};
|
|
832
|
-
Object.assign($
|
|
832
|
+
Object.assign($xeSelect, selectMethods);
|
|
833
833
|
watch(() => reactData.staticOptions, (value) => {
|
|
834
834
|
if (value.some((item) => item.options && item.options.length)) {
|
|
835
835
|
reactData.fullOptionList = [];
|
|
@@ -862,16 +862,16 @@ export default defineComponent({
|
|
|
862
862
|
}
|
|
863
863
|
cacheItemMap();
|
|
864
864
|
});
|
|
865
|
-
globalEvents.on($
|
|
866
|
-
globalEvents.on($
|
|
867
|
-
globalEvents.on($
|
|
868
|
-
globalEvents.on($
|
|
865
|
+
globalEvents.on($xeSelect, 'mousewheel', handleGlobalMousewheelEvent);
|
|
866
|
+
globalEvents.on($xeSelect, 'mousedown', handleGlobalMousedownEvent);
|
|
867
|
+
globalEvents.on($xeSelect, 'keydown', handleGlobalKeydownEvent);
|
|
868
|
+
globalEvents.on($xeSelect, 'blur', handleGlobalBlurEvent);
|
|
869
869
|
});
|
|
870
870
|
onUnmounted(() => {
|
|
871
|
-
globalEvents.off($
|
|
872
|
-
globalEvents.off($
|
|
873
|
-
globalEvents.off($
|
|
874
|
-
globalEvents.off($
|
|
871
|
+
globalEvents.off($xeSelect, 'mousewheel');
|
|
872
|
+
globalEvents.off($xeSelect, 'mousedown');
|
|
873
|
+
globalEvents.off($xeSelect, 'keydown');
|
|
874
|
+
globalEvents.off($xeSelect, 'blur');
|
|
875
875
|
});
|
|
876
876
|
const renderVN = () => {
|
|
877
877
|
const { className, popupClassName, transfer, disabled, loading, filterable } = props;
|
|
@@ -884,7 +884,7 @@ export default defineComponent({
|
|
|
884
884
|
const prefixSlot = slots.prefix;
|
|
885
885
|
return h('div', {
|
|
886
886
|
ref: refElem,
|
|
887
|
-
class: ['vxe-select', className ? (XEUtils.isFunction(className) ? className({ $select: $
|
|
887
|
+
class: ['vxe-select', className ? (XEUtils.isFunction(className) ? className({ $select: $xeSelect }) : className) : '', {
|
|
888
888
|
[`size--${vSize}`]: vSize,
|
|
889
889
|
'is--visivle': visiblePanel,
|
|
890
890
|
'is--disabled': disabled,
|
|
@@ -923,7 +923,7 @@ export default defineComponent({
|
|
|
923
923
|
}, [
|
|
924
924
|
h('div', {
|
|
925
925
|
ref: refOptionPanel,
|
|
926
|
-
class: ['vxe-table--ignore-clear vxe-select--panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $select: $
|
|
926
|
+
class: ['vxe-table--ignore-clear vxe-select--panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $select: $xeSelect }) : popupClassName) : '', {
|
|
927
927
|
[`size--${vSize}`]: vSize,
|
|
928
928
|
'is--transfer': transfer,
|
|
929
929
|
'animat--leave': !loading && reactData.animatVisible,
|
|
@@ -979,9 +979,9 @@ export default defineComponent({
|
|
|
979
979
|
])
|
|
980
980
|
]);
|
|
981
981
|
};
|
|
982
|
-
$
|
|
983
|
-
provide('$xeSelect', $
|
|
984
|
-
return $
|
|
982
|
+
$xeSelect.renderVN = renderVN;
|
|
983
|
+
provide('$xeSelect', $xeSelect);
|
|
984
|
+
return $xeSelect;
|
|
985
985
|
},
|
|
986
986
|
render() {
|
|
987
987
|
return this.renderVN();
|
package/es/switch/src/switch.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, ref, computed, reactive, nextTick, createCommentVNode, inject } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { getFuncText } from '../../ui/src/utils';
|
|
6
6
|
export default defineComponent({
|
|
@@ -80,7 +80,7 @@ export default defineComponent({
|
|
|
80
80
|
};
|
|
81
81
|
switchMethods = {
|
|
82
82
|
dispatchEvent(type, params, evnt) {
|
|
83
|
-
emit(type,
|
|
83
|
+
emit(type, createEvent(evnt, { $switch: $xeSwitch }, params));
|
|
84
84
|
},
|
|
85
85
|
focus() {
|
|
86
86
|
const btnElem = refButton.value;
|
package/es/tabs/src/tabs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, h, reactive, provide, computed, createCommentVNode, watch, nextTick, onMounted } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
+
import { createEvent } from '@vxe-ui/core';
|
|
3
4
|
import VxeTabPaneComponent from './tab-pane';
|
|
4
5
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
5
6
|
export default defineComponent({
|
|
@@ -111,6 +112,13 @@ export default defineComponent({
|
|
|
111
112
|
emit('tab-load', { name, $event: evnt });
|
|
112
113
|
}
|
|
113
114
|
};
|
|
115
|
+
const tabsMethods = {
|
|
116
|
+
dispatchEvent(type, params, evnt) {
|
|
117
|
+
emit(type, createEvent(evnt, { $tabs: $xeTabs }, params));
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const tabsPrivateMethods = {};
|
|
121
|
+
Object.assign($xeTabs, tabsMethods, tabsPrivateMethods);
|
|
114
122
|
const renderTabHeader = (list) => {
|
|
115
123
|
const { type } = props;
|
|
116
124
|
const { activeName, lintLeft, lintWidth } = reactData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, ref, computed, nextTick, watch, reactive, inject } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig, getI18n } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, getI18n, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { getFuncText } from '../../ui/src/utils';
|
|
5
5
|
import { useSize } from '../../hooks/size';
|
|
6
6
|
let autoTxtElem;
|
|
@@ -160,7 +160,7 @@ export default defineComponent({
|
|
|
160
160
|
};
|
|
161
161
|
textareaMethods = {
|
|
162
162
|
dispatchEvent(type, params, evnt) {
|
|
163
|
-
emit(type,
|
|
163
|
+
emit(type, createEvent(evnt, { $textarea: $xeTextarea }, params));
|
|
164
164
|
},
|
|
165
165
|
focus() {
|
|
166
166
|
const textElem = refTextarea.value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h, ref, nextTick, onBeforeUnmount, onMounted, reactive, watch } from 'vue';
|
|
2
2
|
import XEUtils from 'xe-utils';
|
|
3
|
-
import { getConfig } from '@vxe-ui/core';
|
|
3
|
+
import { getConfig, createEvent } from '@vxe-ui/core';
|
|
4
4
|
import { useSize } from '../../hooks/size';
|
|
5
5
|
import { getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
6
6
|
import { getAbsolutePos, getDomNode } from '../../ui/src/dom';
|
|
@@ -152,7 +152,7 @@ export default defineComponent({
|
|
|
152
152
|
}, props.enterDelay, { leading: false, trailing: true });
|
|
153
153
|
tooltipMethods = {
|
|
154
154
|
dispatchEvent(type, params, evnt) {
|
|
155
|
-
emit(type,
|
|
155
|
+
emit(type, createEvent(evnt, { $tooltip: $xetooltip }, params));
|
|
156
156
|
},
|
|
157
157
|
open(target, content) {
|
|
158
158
|
return tooltipMethods.toVisible(target || reactData.target, content);
|