@opentiny/vue-renderless 3.13.1 → 3.14.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/action-sheet/index.js +20 -13
- package/action-sheet/vue.js +8 -7
- package/amount/index.js +100 -25
- package/amount/vue.js +102 -26
- package/anchor/index.js +1 -0
- package/area/index.js +8 -8
- package/area/vue.js +5 -5
- package/async-flowchart/index.js +16 -3
- package/autocomplete/index.js +58 -14
- package/autocomplete/vue.js +40 -12
- package/badge/index.js +12 -0
- package/badge/vue.js +6 -4
- package/breadcrumb/vue.js +3 -1
- package/breadcrumb-item/vue.js +6 -2
- package/button/index.js +5 -1
- package/calendar/index.js +2 -86
- package/calendar-bar/index.js +18 -4
- package/calendar-view/index.js +5 -1
- package/calendar-view/vue.js +16 -3
- package/card-group/vue.js +4 -2
- package/cascader/index.js +86 -34
- package/cascader/vue.js +61 -20
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +36 -23
- package/cascader-mobile/vue.js +6 -0
- package/cascader-node/index.js +13 -1
- package/cascader-node/vue.js +15 -4
- package/cascader-panel/index.js +1 -1
- package/cascader-select/column-index.js +150 -0
- package/cascader-select/column.js +120 -0
- package/cascader-select/index.js +29 -165
- package/cascader-select/usePicker.js +251 -0
- package/cascader-select/useTouch.js +65 -0
- package/cascader-select/vue.js +35 -47
- package/cell/vue.js +2 -1
- package/chart-bar/index.js +2 -3
- package/chart-core/deps/constants.js +43 -43
- package/chart-core/index.js +1 -1
- package/chart-gauge/index.js +2 -2
- package/chart-heatmap/index.js +17 -10
- package/chart-line/index.js +8 -9
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +4 -6
- package/checkbox/index.js +18 -1
- package/checkbox/vue.js +15 -7
- package/checkbox-group/vue.js +1 -0
- package/col/vue.js +1 -1
- package/collapse/index.js +3 -3
- package/color-select-panel/vue.js +0 -7
- package/column-list-item/index.js +17 -1
- package/column-list-item/vue.js +8 -3
- package/common/date.js +7 -5
- package/common/deps/clickoutside.js +6 -2
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +44 -11
- package/common/deps/resize-event.js +1 -0
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +2 -2
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +38 -20
- package/common/index.js +2 -2
- package/common/runtime.js +1 -1
- package/common/string.js +2 -2
- package/common/type.js +2 -1
- package/common/validate/rules/enum.js +1 -1
- package/common/validate/rules/pattern.js +2 -2
- package/common/validate/rules/range.js +8 -5
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +5 -5
- package/common/validate/rules/whitespace.js +1 -1
- package/common/validate/util.js +15 -16
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/currency/index.js +74 -7
- package/currency/vue.js +21 -5
- package/date-panel/index.js +16 -0
- package/date-panel/vue.js +8 -2
- package/date-picker-mobile/index.js +12 -0
- package/date-picker-mobile/vue.js +7 -1
- package/date-range/vue.js +14 -6
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +46 -14
- package/dialog-box/vue.js +30 -7
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +27 -5
- package/drawer/vue.js +14 -7
- package/dropdown/index.js +7 -7
- package/dropdown/vue.js +6 -2
- package/dropdown-item/index.js +9 -1
- package/dropdown-item/mf.js +6 -10
- package/dropdown-item/vue.js +20 -7
- package/dropdown-menu/index.js +20 -7
- package/dropdown-menu/vue.js +4 -3
- package/exception/index.js +2 -7
- package/exception/vue.js +7 -10
- package/fall-menu/index.js +5 -1
- package/fall-menu/vue.js +13 -2
- package/file-upload/index.js +68 -18
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -0
- package/float-button/index.js +42 -0
- package/float-button/vue.js +101 -0
- package/floating-button/index.js +62 -16
- package/floating-button/vue.js +27 -9
- package/flowchart/index.js +134 -25
- package/flowchart/node.js +13 -4
- package/flowchart/vue.js +16 -4
- package/form/vue.js +8 -0
- package/form-item/index.js +5 -5
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/plugins/export.js +5 -2
- package/grid/utils/column.js +1 -0
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -1
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +81 -20
- package/input/vue.js +44 -18
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/link/vue.js +3 -1
- package/loading/index.js +2 -2
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/menu/index.js +15 -2
- package/menu/vue.js +22 -17
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/modal/index.js +44 -4
- package/modal/vue.js +18 -4
- package/multi-select/index.js +186 -11
- package/multi-select/vue.js +60 -15
- package/multi-select-item/index.js +23 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +46 -12
- package/numeric/vue.js +44 -19
- package/option/index.js +27 -9
- package/option/vue.js +37 -21
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +18 -4
- package/pager/vue.js +16 -5
- package/picker/index.js +258 -49
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/vue.js +3 -0
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +71 -32
- package/popeditor/vue.js +15 -11
- package/popover/index.js +4 -4
- package/popover/vue.js +6 -6
- package/popup/index.js +3 -3
- package/popup/vue.js +5 -5
- package/pull-refresh/index.js +13 -13
- package/pull-refresh/vue.js +5 -4
- package/radio/index.js +0 -17
- package/radio/vue.js +4 -10
- package/rate/index.js +1 -1
- package/rate/vue.js +0 -2
- package/record/index.js +4 -1
- package/rich-text/clipboard.js +54 -0
- package/rich-text/index.js +192 -0
- package/rich-text/module/file-upload.js +107 -0
- package/rich-text/module/image-drop.js +63 -0
- package/rich-text/module/image-upload.js +89 -0
- package/rich-text/options.js +141 -0
- package/rich-text/table-module.js +382 -0
- package/rich-text/vue.js +102 -0
- package/{rich-text-edtior → rich-text-editor}/index.js +2 -2
- package/{rich-text-edtior → rich-text-editor}/vue.js +2 -5
- package/scrollbar/index.js +11 -11
- package/scrollbar/vue-bar.js +3 -3
- package/scrollbar/vue.js +5 -5
- package/search/index.js +9 -9
- package/search/vue.js +8 -6
- package/select/index.js +457 -389
- package/select/vue.js +257 -161
- package/select-dropdown/index.js +61 -3
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- package/selected-box/index.js +2 -0
- package/selected-box/vue.js +6 -3
- package/signature/index.js +241 -0
- package/signature/vue.js +88 -0
- package/skeleton/index.js +14 -0
- package/skeleton/vue.js +15 -0
- package/skeleton-item/vue.js +15 -0
- package/slider/index.js +70 -17
- package/slider/vue.js +16 -7
- package/split/index.js +5 -3
- package/split/vue.js +4 -6
- package/standard-list-item/index.js +15 -1
- package/standard-list-item/vue.js +6 -5
- package/steps/index.js +25 -2
- package/steps/slide-bar.js +8 -1
- package/steps/vue.js +15 -3
- package/tab-item-mf/vue.js +14 -8
- package/tab-nav/index.js +30 -5
- package/tab-nav/vue.js +16 -4
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +16 -4
- package/tabs/vue.js +2 -1
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tabs-mf/wheel.js +1 -0
- package/tag/index.js +1 -1
- package/tag-group/index.js +2 -1
- package/time/index.js +5 -2
- package/time/vue.js +1 -1
- package/time-line/index.js +3 -3
- package/time-line/vue.js +2 -2
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +6 -3
- package/tooltip/vue.js +4 -4
- package/transfer/index.js +20 -22
- package/transfer/vue.js +1 -6
- package/transfer-panel/vue.js +3 -5
- package/tree/index.js +21 -4
- package/tree/vue.js +10 -8
- package/tree-menu/index.js +31 -5
- package/tree-menu/vue.js +28 -15
- package/tree-node/index.js +18 -18
- package/tree-node/vue.js +6 -5
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +1 -1
- package/types/amount.type.d.ts +168 -1
- package/types/area.type.d.ts +134 -1
- package/types/async-flowchart.type.d.ts +72 -0
- package/types/autocomplete.type.d.ts +199 -1
- package/types/badge.type.d.ts +3 -1
- package/types/breadcrumb-item.type.d.ts +2 -0
- package/types/breadcrumb.type.d.ts +2 -0
- package/types/button-group.type.d.ts +3 -3
- package/types/button.type.d.ts +4 -0
- package/types/cascader-menu.type.d.ts +3 -4
- package/types/cascader-node.type.d.ts +5 -2
- package/types/cascader-panel.type-2bd03be3.d.ts +241 -0
- package/types/cascader-panel.type.d.ts +3 -241
- package/types/cascader.type.d.ts +329 -1
- package/types/checkbox.type.d.ts +9 -3
- package/types/collapse.type.d.ts +20 -3
- package/types/date-picker.type.d.ts +37 -0
- package/types/dialog-box.type.d.ts +13 -3
- package/types/drawer.type.d.ts +133 -1
- package/types/{dropdown-item.type-8ea6c633.d.ts → dropdown-item.type-8475a549.d.ts} +7 -13
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +1 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/float-button.type.d.ts +123 -0
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-222799ae.d.ts} +5 -2
- package/types/form.type.d.ts +1 -1
- package/types/{index-e0250f63.d.ts → index-b012f687.d.ts} +9 -0
- package/types/input.type.d.ts +1 -5
- package/types/ip-address.type.d.ts +160 -1
- package/types/link.type.d.ts +6 -3
- package/types/loading.type.d.ts +7 -0
- package/types/milestone.type.d.ts +1 -1
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +29 -2
- package/types/numeric.type.d.ts +41 -10
- package/types/pager.type.d.ts +13 -1
- package/types/picker.type.d.ts +18 -0
- package/types/popconfirm.type.d.ts +86 -1
- package/types/popeditor.type.d.ts +5 -1
- package/types/popover.type.d.ts +3 -3
- package/types/progress.type.d.ts +3 -1
- package/types/radio.type.d.ts +0 -4
- package/types/rate.type.d.ts +236 -1
- package/types/search.type.d.ts +88 -1
- package/types/shared.type.d.ts +1 -1
- package/types/skeleton-item.type.d.ts +38 -0
- package/types/skeleton.type.d.ts +45 -0
- package/types/slider.type.d.ts +49 -10
- package/types/steps.type.d.ts +15 -4
- package/types/switch.type.d.ts +3 -3
- package/types/tab-bar.type.d.ts +1 -1
- package/types/tab-nav.type.d.ts +7 -2
- package/types/tabs.type.d.ts +9 -1
- package/types/tag-group.type.d.ts +64 -1
- package/types/{time-line.type-d7daa669.d.ts → time-line.type-b155cb4f.d.ts} +12 -0
- package/types/time-line.type.d.ts +1 -1
- package/types/timeline-item.type.d.ts +1 -1
- package/types/tooltip.type.d.ts +2 -2
- package/types/transfer.type.d.ts +185 -1
- package/types/tree-menu.type.d.ts +210 -1
- package/types/upload-dragger.type.d.ts +2 -2
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-a29aea50.d.ts} +31 -8
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/user-head.type.d.ts +146 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +64 -34
- package/upload/vue.js +9 -5
- package/upload-dragger/index.js +22 -20
- package/upload-list/index.js +24 -18
- package/upload-list/vue.js +9 -4
- package/user/index.js +34 -25
- package/user/vue.js +1 -1
- package/user-head/index.js +3 -3
- package/watermark/index.js +11 -0
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
- package/common/deps/modal-queue.js +0 -6
- package/common/deps/requestAnimationFrame.js +0 -25
package/tabbar-item/vue.js
CHANGED
|
@@ -2,7 +2,7 @@ import "../chunk-G2ADBYYC.js";
|
|
|
2
2
|
import { getRouteActive, onClick, bindChildren, routeTab, getTabbarItemsWidth } from "./index";
|
|
3
3
|
import { xss } from "../common";
|
|
4
4
|
const api = ["state", "onClick", "getTabbarItemsWidth"];
|
|
5
|
-
const renderless = (props, { computed, onMounted, reactive }, { parent, emit, nextTick, route, router, dispatch, vm }) => {
|
|
5
|
+
const renderless = (props, { computed, onMounted, reactive, inject }, { parent, emit, nextTick, route, router, dispatch, vm }) => {
|
|
6
6
|
const api2 = {};
|
|
7
7
|
const state = reactive({
|
|
8
8
|
index: -1,
|
|
@@ -14,7 +14,8 @@ const renderless = (props, { computed, onMounted, reactive }, { parent, emit, ne
|
|
|
14
14
|
renderColor: computed(() => parent.$parent[state.active ? "activeColor" : "inactiveColor"]),
|
|
15
15
|
showVm: true,
|
|
16
16
|
itemWidth: null,
|
|
17
|
-
childrenNumber: 0
|
|
17
|
+
childrenNumber: 0,
|
|
18
|
+
customIcon: inject("customIcon", null) || props.customIcon
|
|
18
19
|
});
|
|
19
20
|
Object.assign(api2, {
|
|
20
21
|
state,
|
package/tabs/index.js
CHANGED
|
@@ -77,13 +77,25 @@ const handleTabClick = ({ api, emit, props, refs }) => (pane, tabName, event) =>
|
|
|
77
77
|
refs.nav && refs.nav.expandTabHide();
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
const handleTabRemove = (emit) => (pane, event) => {
|
|
80
|
+
const handleTabRemove = ({ emit, props }) => (pane, event) => {
|
|
81
81
|
if (pane.disabled) {
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
event.stopPropagation();
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
const emitEvent = () => {
|
|
86
|
+
emit("edit", pane.name, "remove");
|
|
87
|
+
emit("close", pane.name);
|
|
88
|
+
};
|
|
89
|
+
if (typeof props.beforeClose === "function") {
|
|
90
|
+
const beforeCloseResult = props.beforeClose(pane.name);
|
|
91
|
+
if (beforeCloseResult && beforeCloseResult.then) {
|
|
92
|
+
beforeCloseResult.then((res) => res && emitEvent());
|
|
93
|
+
} else {
|
|
94
|
+
beforeCloseResult && emitEvent();
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
emitEvent();
|
|
98
|
+
}
|
|
87
99
|
};
|
|
88
100
|
const handleTabAdd = (emit) => () => {
|
|
89
101
|
emit("edit", null, "add");
|
|
@@ -97,7 +109,7 @@ const setCurrentName = ({ api, props, refs, state }) => (value) => {
|
|
|
97
109
|
before.then(() => {
|
|
98
110
|
api.changeCurrentName(value);
|
|
99
111
|
refs.nav && refs.nav.removeFocus(value);
|
|
100
|
-
});
|
|
112
|
+
}).catch(() => null);
|
|
101
113
|
} else if (before !== false) {
|
|
102
114
|
api.changeCurrentName(value);
|
|
103
115
|
}
|
package/tabs/vue.js
CHANGED
|
@@ -39,6 +39,7 @@ const initState = ({ reactive, props }) => reactive({
|
|
|
39
39
|
offsetY: 0,
|
|
40
40
|
direction: "",
|
|
41
41
|
expandPanesWidth: "",
|
|
42
|
+
activeIndex: 1,
|
|
42
43
|
separator: props.separator
|
|
43
44
|
});
|
|
44
45
|
const initWatcher = ({
|
|
@@ -77,7 +78,7 @@ const renderless = (props, { onMounted, onUpdated, provide, reactive, watch }, {
|
|
|
77
78
|
Object.assign(api2, {
|
|
78
79
|
state,
|
|
79
80
|
handleTabAdd: handleTabAdd(emit),
|
|
80
|
-
handleTabRemove: handleTabRemove(emit),
|
|
81
|
+
handleTabRemove: handleTabRemove({ emit, props }),
|
|
81
82
|
changeDirection: changeDirection({ props, state }),
|
|
82
83
|
changeCurrentName: changeCurrentName({ emit, state }),
|
|
83
84
|
calcMorePanes: calcMorePanes({ parent, props, state, refs }),
|
package/tabs-mf/index.js
CHANGED
|
@@ -2,11 +2,22 @@ import "../chunk-G2ADBYYC.js";
|
|
|
2
2
|
import { random } from "../common/string";
|
|
3
3
|
import debounce from "../common/deps/debounce";
|
|
4
4
|
import { fastdom } from "../common/deps/fastdom";
|
|
5
|
-
const setActive = ({
|
|
5
|
+
const setActive = ({ state, props, api }) => (name) => {
|
|
6
6
|
const current = state.currentItem ? state.currentItem.name : "";
|
|
7
|
-
if (current && current !== name && props.beforeLeave
|
|
8
|
-
|
|
7
|
+
if (current && current !== name && props.beforeLeave) {
|
|
8
|
+
const before = props.beforeLeave(name, current);
|
|
9
|
+
if (before && before.then) {
|
|
10
|
+
before.then(() => {
|
|
11
|
+
api.changeCurrentName(name);
|
|
12
|
+
}).catch(() => null);
|
|
13
|
+
} else if (before !== false) {
|
|
14
|
+
api.changeCurrentName(name);
|
|
15
|
+
}
|
|
16
|
+
} else {
|
|
17
|
+
api.changeCurrentName(name);
|
|
9
18
|
}
|
|
19
|
+
};
|
|
20
|
+
const changeCurrentName = ({ emit, state }) => (name) => {
|
|
10
21
|
state.items.forEach((item) => item.selected = item.name === name);
|
|
11
22
|
emit("update:activeName", name);
|
|
12
23
|
emit("update:modelValue", name);
|
|
@@ -41,7 +52,7 @@ const clickMore = (api) => (name) => {
|
|
|
41
52
|
api.setActive(name);
|
|
42
53
|
api.scrollTo(name);
|
|
43
54
|
};
|
|
44
|
-
const removeItem = ({ state, emit }) => (name) => {
|
|
55
|
+
const removeItem = ({ state, emit }) => (name, silent = false) => {
|
|
45
56
|
const itemIndex = state.items.findIndex((item) => item.name === name);
|
|
46
57
|
const navIndex = state.navs.findIndex((item) => item.name === name);
|
|
47
58
|
if (~itemIndex) {
|
|
@@ -49,8 +60,10 @@ const removeItem = ({ state, emit }) => (name) => {
|
|
|
49
60
|
state.items = [...state.items];
|
|
50
61
|
state.navs.splice(navIndex, 1);
|
|
51
62
|
state.navs = [...state.navs];
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
if (!silent) {
|
|
64
|
+
emit("edit", name, "remove");
|
|
65
|
+
emit("close", name);
|
|
66
|
+
}
|
|
54
67
|
}
|
|
55
68
|
};
|
|
56
69
|
const wheelListener = ({ vm, api, tabs, state }) => debounce(10, (e) => {
|
|
@@ -99,6 +112,7 @@ const handleNavItemClose = ({ tabs, props }) => (e) => {
|
|
|
99
112
|
export {
|
|
100
113
|
addItem,
|
|
101
114
|
addNav,
|
|
115
|
+
changeCurrentName,
|
|
102
116
|
clickMore,
|
|
103
117
|
emitAdd,
|
|
104
118
|
getBoundRect,
|
package/tabs-mf/vue-nav.js
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
const api = ["state"];
|
|
3
|
-
const renderless = (props, { reactive, inject, computed,
|
|
3
|
+
const renderless = (props, { reactive, inject, computed, onMounted, onBeforeUnmount }, { vm }) => {
|
|
4
4
|
const tabs = inject("tabs", null);
|
|
5
5
|
const state = reactive({
|
|
6
6
|
navItems: computed(() => tabs.state.items),
|
|
7
|
-
currentNav:
|
|
7
|
+
currentNav: computed(() => tabs.state.navs[state.currentIndex]),
|
|
8
8
|
currentIndex: computed(
|
|
9
9
|
() => tabs.state.navs.findIndex((item) => tabs.state.currentItem && tabs.state.currentItem.name === item.name)
|
|
10
10
|
),
|
|
11
11
|
currentWidth: 0,
|
|
12
12
|
currentPosition: 0
|
|
13
13
|
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
() => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
let rafId, observer;
|
|
15
|
+
onMounted(() => {
|
|
16
|
+
observer = new MutationObserver((mutationsList) => {
|
|
17
|
+
for (let mutation of mutationsList) {
|
|
18
|
+
if (mutation.type === "attributes") {
|
|
19
|
+
if (rafId) {
|
|
20
|
+
cancelAnimationFrame(rafId);
|
|
21
|
+
}
|
|
22
|
+
rafId = requestAnimationFrame(() => {
|
|
23
|
+
const nav = state.currentNav;
|
|
24
|
+
state.currentWidth = nav && nav.$el.offsetWidth || 0;
|
|
25
|
+
state.currentPosition = nav && nav.$el.offsetLeft || 0;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
observer.observe(vm.$el, { attributes: true, subtree: true });
|
|
31
|
+
});
|
|
32
|
+
onBeforeUnmount(() => {
|
|
33
|
+
if (rafId) {
|
|
34
|
+
cancelAnimationFrame(rafId);
|
|
22
35
|
}
|
|
23
|
-
|
|
36
|
+
observer.disconnect();
|
|
37
|
+
observer = null;
|
|
38
|
+
});
|
|
24
39
|
return { state };
|
|
25
40
|
};
|
|
26
41
|
export {
|
package/tabs-mf/vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { random } from "../common/string";
|
|
3
|
-
import { setActive, addItem, addNav, scrollTo, clickMore, removeItem } from "./index";
|
|
3
|
+
import { setActive, addItem, addNav, scrollTo, clickMore, removeItem, changeCurrentName } from "./index";
|
|
4
4
|
const api = ["state", "setActive", "addItem", "addNav", "scrollTo", "clickMore", "removeItem"];
|
|
5
5
|
const renderless = (props, { onMounted, onBeforeUnmount, provide, reactive, watch, computed }, { vm, emit }) => {
|
|
6
6
|
const state = reactive({
|
|
@@ -10,15 +10,15 @@ const renderless = (props, { onMounted, onBeforeUnmount, provide, reactive, watc
|
|
|
10
10
|
key: computed(() => state.currentItem ? state.currentItem.name : random()),
|
|
11
11
|
separator: props.separator
|
|
12
12
|
});
|
|
13
|
-
const api2 = {
|
|
14
|
-
|
|
13
|
+
const api2 = {};
|
|
14
|
+
Object.assign(api2, {
|
|
15
|
+
state,
|
|
16
|
+
setActive: setActive({ api: api2, state, props }),
|
|
15
17
|
addItem: addItem(state),
|
|
16
18
|
addNav: addNav(state),
|
|
17
19
|
scrollTo: scrollTo({ vm, state }),
|
|
18
|
-
removeItem: removeItem({ state, emit })
|
|
19
|
-
|
|
20
|
-
Object.assign(api2, {
|
|
21
|
-
state,
|
|
20
|
+
removeItem: removeItem({ state, emit }),
|
|
21
|
+
changeCurrentName: changeCurrentName({ state, emit }),
|
|
22
22
|
clickMore: clickMore(api2)
|
|
23
23
|
});
|
|
24
24
|
provide("tabs", vm);
|
package/tabs-mf/wheel.js
CHANGED
|
@@ -64,6 +64,7 @@ const getWheelListener = ({ addApiName, removeApiName, prefix, support, window }
|
|
|
64
64
|
remove: (elem, eventName, callback, useCapture) => {
|
|
65
65
|
const cb = elemCbMap.get(elem);
|
|
66
66
|
elem[removeApiName](prefix + eventName, cb, useCapture || false);
|
|
67
|
+
elemCbMap.delete(elem);
|
|
67
68
|
}
|
|
68
69
|
});
|
|
69
70
|
export {
|
package/tag/index.js
CHANGED
|
@@ -8,7 +8,7 @@ const handleClose = ({ emit, props, state }) => (event) => {
|
|
|
8
8
|
props.beforeDelete ? props.beforeDelete(close) : close();
|
|
9
9
|
};
|
|
10
10
|
const handleClick = ({ emit, props, parent, state }) => (event) => {
|
|
11
|
-
if (props.selectable
|
|
11
|
+
if (props.selectable || props.disabled)
|
|
12
12
|
return;
|
|
13
13
|
parent.$parent && parent.$parent.tagSelectable && event.stopPropagation();
|
|
14
14
|
state.selected = !state.selected;
|
package/tag-group/index.js
CHANGED
|
@@ -25,7 +25,8 @@ const getHiddenTags = ({ props, vm, state }) => () => {
|
|
|
25
25
|
state.hiddenTags = [];
|
|
26
26
|
Array.from(tags).forEach((el, index) => {
|
|
27
27
|
const item = props.data[index];
|
|
28
|
-
|
|
28
|
+
const element = el;
|
|
29
|
+
if (element.offsetTop >= element.offsetHeight && item) {
|
|
29
30
|
state.hiddenTags.push(__spreadValues({}, item));
|
|
30
31
|
}
|
|
31
32
|
});
|
package/time/index.js
CHANGED
|
@@ -13,10 +13,13 @@ const watchValue = ({ api, nextTick, state }) => (value) => {
|
|
|
13
13
|
state.needInitAdjust = false;
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
const watchVisible = ({ nextTick, vm, state }) => (value) => {
|
|
16
|
+
const watchVisible = ({ nextTick, vm, state, api }) => (value) => {
|
|
17
17
|
if (value) {
|
|
18
18
|
state.oldValue = state.value;
|
|
19
|
-
nextTick(() =>
|
|
19
|
+
nextTick(() => {
|
|
20
|
+
vm.$refs.spinner.emitSelectRange("hours");
|
|
21
|
+
api.adjustSpinners();
|
|
22
|
+
});
|
|
20
23
|
} else {
|
|
21
24
|
state.needInitAdjust = true;
|
|
22
25
|
}
|
package/time/vue.js
CHANGED
|
@@ -45,7 +45,7 @@ const renderless = (props, { computed, onMounted, reactive, watch, nextTick }, {
|
|
|
45
45
|
adjustSpinners: adjustSpinners(vm),
|
|
46
46
|
handleCancel: handleCancel({ state, emit }),
|
|
47
47
|
setSelectionRange: setSelectionRange({ state, emit }),
|
|
48
|
-
watchVisible: watchVisible({ nextTick, vm, state }),
|
|
48
|
+
watchVisible: watchVisible({ nextTick, vm, state, api: api2 }),
|
|
49
49
|
isValidValue: isValidValue({ state }),
|
|
50
50
|
changeSelectionRange: changeSelectionRange({ vm, state }),
|
|
51
51
|
handleConfirm: handleConfirm({ state, emit }),
|
package/time-line/index.js
CHANGED
|
@@ -46,10 +46,10 @@ const computedData = ({ props, state }) => () => {
|
|
|
46
46
|
};
|
|
47
47
|
const computedCurrent = ({ props, state }) => () => state.isReverse ? state.nodes.length - props.active - 1 : props.active;
|
|
48
48
|
const computedIsReverse = (props) => () => props.reverse && props.vertical;
|
|
49
|
-
const computedStackNodes = ({ state,
|
|
50
|
-
if (state.nodes.length >=
|
|
49
|
+
const computedStackNodes = ({ state, props }) => () => {
|
|
50
|
+
if (state.nodes.length >= props.nodeMax && !props.foldDisabled) {
|
|
51
51
|
state.showData = true;
|
|
52
|
-
return state.nodes.slice(0,
|
|
52
|
+
return state.nodes.slice(0, props.limitedNodes);
|
|
53
53
|
}
|
|
54
54
|
return state.nodes;
|
|
55
55
|
};
|
package/time-line/vue.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
toggleFold
|
|
15
15
|
} from "./index";
|
|
16
16
|
const api = ["state", "handleClick", "getStatusCls", "getStatus", "getDate", "changeStatus", "toggleFold"];
|
|
17
|
-
const renderless = (props, { computed, reactive, provide, watch }, { t, emit, constants }) => {
|
|
17
|
+
const renderless = (props, { computed, reactive, provide, watch }, { t, emit, constants, designConfig }) => {
|
|
18
18
|
const api2 = {};
|
|
19
19
|
const state = reactive({
|
|
20
20
|
nodes: computed(() => api2.computedData()),
|
|
@@ -37,7 +37,7 @@ const renderless = (props, { computed, reactive, provide, watch }, { t, emit, co
|
|
|
37
37
|
getStatus: getStatus({ state, t }),
|
|
38
38
|
handleClick: handleClick({ emit, state }),
|
|
39
39
|
getStatusCls: getStatusCls({ constants, state }),
|
|
40
|
-
computedStackNodes: computedStackNodes({ state,
|
|
40
|
+
computedStackNodes: computedStackNodes({ state, props }),
|
|
41
41
|
changeStatus: changeStatus({ state }),
|
|
42
42
|
computedWrapperClass: computedWrapperClass({ props }),
|
|
43
43
|
toggleFold: toggleFold({ props })
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
const optionMethod = (value) => {
|
|
3
3
|
const val = ("0" + value).slice(-2);
|
|
4
|
-
return { id: val, label: val };
|
|
4
|
+
return { id: +val, label: val };
|
|
5
5
|
};
|
|
6
6
|
const watchModelValue = ({ props, state }) => () => {
|
|
7
|
-
const { modelValue } = props;
|
|
8
|
-
|
|
7
|
+
const { modelValue, showSeconds } = props;
|
|
8
|
+
const num = showSeconds ? 3 : 2;
|
|
9
|
+
if (!showSeconds && modelValue.length === 3) {
|
|
10
|
+
state.seconds = modelValue[2];
|
|
11
|
+
}
|
|
12
|
+
state.dateArr = modelValue ? modelValue.slice(0, num) : [];
|
|
9
13
|
};
|
|
10
14
|
const watchVisible = ({ api, state }) => (value) => {
|
|
11
15
|
state.visible = value;
|
|
@@ -18,11 +22,26 @@ const updateVisible = ({ state, emit }) => (value) => {
|
|
|
18
22
|
const confirm = ({ emit, state }) => (value) => {
|
|
19
23
|
const dateArr = value.map((item) => ("0" + item).slice(-2));
|
|
20
24
|
state.dateArr = dateArr;
|
|
21
|
-
emit("update:modelValue",
|
|
22
|
-
emit("confirm",
|
|
25
|
+
emit("update:modelValue", state.value);
|
|
26
|
+
emit("confirm", state.value);
|
|
27
|
+
};
|
|
28
|
+
const getTimePeriod = ({ state, props }) => (unit, length) => {
|
|
29
|
+
const step = props.step || {};
|
|
30
|
+
const value = step[unit] || 1;
|
|
31
|
+
return Array.from({ length }).map((v, key) => key).filter((v) => v % value === 0).map((v) => optionMethod(v));
|
|
32
|
+
};
|
|
33
|
+
const computedOptions = ({ state, api, props }) => () => {
|
|
34
|
+
const { showSeconds } = props;
|
|
35
|
+
const options = [];
|
|
36
|
+
options.push(api.getTimePeriod("hour", 24));
|
|
37
|
+
options.push(api.getTimePeriod("minute", 60));
|
|
38
|
+
showSeconds && options.push(api.getTimePeriod("second", 60));
|
|
39
|
+
return options;
|
|
23
40
|
};
|
|
24
41
|
export {
|
|
42
|
+
computedOptions,
|
|
25
43
|
confirm,
|
|
44
|
+
getTimePeriod,
|
|
26
45
|
optionMethod,
|
|
27
46
|
updateVisible,
|
|
28
47
|
watchModelValue,
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
optionMethod,
|
|
4
|
+
watchModelValue,
|
|
5
|
+
watchVisible,
|
|
6
|
+
confirm,
|
|
7
|
+
updateVisible,
|
|
8
|
+
getTimePeriod,
|
|
9
|
+
computedOptions
|
|
10
|
+
} from "./index";
|
|
3
11
|
const api = ["state", "confirm", "updateVisible"];
|
|
4
|
-
const renderless = (props, { reactive, watch }, { emit }) => {
|
|
12
|
+
const renderless = (props, { reactive, watch, computed }, { emit }) => {
|
|
5
13
|
const api2 = {};
|
|
6
14
|
const state = reactive({
|
|
7
15
|
visible: false,
|
|
8
16
|
dateArr: [],
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
seconds: null,
|
|
18
|
+
options: computed(() => api2.computedOptions()),
|
|
19
|
+
value: computed(
|
|
20
|
+
() => !props.showSeconds && state.seconds !== null ? [...state.dateArr, state.seconds] : state.dateArr
|
|
21
|
+
)
|
|
14
22
|
});
|
|
15
23
|
Object.assign(api2, {
|
|
16
24
|
state,
|
|
@@ -18,6 +26,8 @@ const renderless = (props, { reactive, watch }, { emit }) => {
|
|
|
18
26
|
watchVisible: watchVisible({ api: api2, state }),
|
|
19
27
|
confirm: confirm({ emit, state }),
|
|
20
28
|
updateVisible: updateVisible({ emit, state }),
|
|
29
|
+
getTimePeriod: getTimePeriod({ state, props }),
|
|
30
|
+
computedOptions: computedOptions({ state, api: api2, props }),
|
|
21
31
|
optionMethod
|
|
22
32
|
});
|
|
23
33
|
watch(() => props.visible, api2.watchVisible);
|
package/time-range/index.js
CHANGED
|
@@ -74,6 +74,8 @@ const handleMaxChange = ({ api, state }) => (date) => {
|
|
|
74
74
|
api.handleChange();
|
|
75
75
|
};
|
|
76
76
|
const handleChange = ({ api, emit, vm, state }) => () => {
|
|
77
|
+
if (!vm.$refs.minSpinner || !vm.$refs.maxSpinner || !state.visible)
|
|
78
|
+
return;
|
|
77
79
|
if (api.isValidValue([state.minDate, state.maxDate])) {
|
|
78
80
|
vm.$refs.minSpinner.state.selectableRange = [[api.minTimeOfDay(state.minDate), state.maxDate]];
|
|
79
81
|
vm.$refs.maxSpinner.state.selectableRange = [[state.minDate, api.maxTimeOfDay(state.maxDate)]];
|
package/timeline-item/vue.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
computedItemStyle
|
|
12
12
|
} from "./index";
|
|
13
13
|
const api = ["state", "handleClick", "getStatusCls", "getStatus", "getDate", "rootProps"];
|
|
14
|
-
const renderless = (props, { computed, reactive, inject }, { t, emit, constants }) => {
|
|
14
|
+
const renderless = (props, { computed, reactive, inject }, { t, emit, constants, designConfig }) => {
|
|
15
15
|
const api2 = {};
|
|
16
16
|
const { timelineItems, nodes, props: rootProps } = inject("nodesInject");
|
|
17
17
|
timelineItems.push(props.node);
|
package/tooltip/index.js
CHANGED
|
@@ -75,7 +75,7 @@ const setExpectedState = ({ state }) => (value) => {
|
|
|
75
75
|
}
|
|
76
76
|
state.expectedState = value;
|
|
77
77
|
};
|
|
78
|
-
const destroyed = ({ state, api }) => () => {
|
|
78
|
+
const destroyed = ({ state, api, vm }) => () => {
|
|
79
79
|
const reference = state.referenceElm;
|
|
80
80
|
state.showPopper = false;
|
|
81
81
|
if (reference && reference.nodeType === 1) {
|
|
@@ -86,6 +86,10 @@ const destroyed = ({ state, api }) => () => {
|
|
|
86
86
|
off(reference, "blur", api.handleBlur);
|
|
87
87
|
off(reference, "click", api.removeFocusing);
|
|
88
88
|
}
|
|
89
|
+
if (vm.popperVM) {
|
|
90
|
+
typeof vm.popperVM.$destroy === "function" && vm.popperVM.$destroy();
|
|
91
|
+
vm.popperVM = null;
|
|
92
|
+
}
|
|
89
93
|
};
|
|
90
94
|
const debounceClose = ({ api, props }) => debounce(props.closeDelay, () => {
|
|
91
95
|
api.handleClosePopper();
|
|
@@ -137,7 +141,7 @@ const observeCallback = ({ state, popperVmRef }) => (mutationsList) => {
|
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
};
|
|
140
|
-
const bindPopper = ({ vm,
|
|
144
|
+
const bindPopper = ({ vm, nextTick, popperVmRef }) => (el) => {
|
|
141
145
|
nextTick(() => vm.bindEvent(el));
|
|
142
146
|
let popperVM = vm.popperVM;
|
|
143
147
|
if (!vm.$refs.popper) {
|
|
@@ -145,7 +149,6 @@ const bindPopper = ({ vm, refs, nextTick, popperVmRef }) => (el) => {
|
|
|
145
149
|
} else {
|
|
146
150
|
popperVmRef.popper = vm.$refs.popper;
|
|
147
151
|
}
|
|
148
|
-
refs.popper || (refs.popper = popperVM.$el);
|
|
149
152
|
nextTick(() => {
|
|
150
153
|
if (vm.modelValue) {
|
|
151
154
|
vm.updatePopper();
|
package/tooltip/vue.js
CHANGED
|
@@ -55,10 +55,10 @@ const renderless = (props, {
|
|
|
55
55
|
onMounted,
|
|
56
56
|
onUnmounted,
|
|
57
57
|
inject
|
|
58
|
-
}, { vm, emit,
|
|
58
|
+
}, { vm, emit, slots, nextTick, parent }) => {
|
|
59
59
|
const api2 = {};
|
|
60
|
-
const popperParam = { emit, props, nextTick, toRefs, reactive, parent: parent.$parent, refs };
|
|
61
60
|
const popperVmRef = {};
|
|
61
|
+
const popperParam = { emit, props, nextTick, toRefs, reactive, parent: parent.$parent, vm, popperVmRef };
|
|
62
62
|
Object.assign(popperParam, { slots, onBeforeUnmount, onDeactivated, watch });
|
|
63
63
|
const { showPopper, updatePopper, popperElm, referenceElm, doDestroy } = userPopper(popperParam);
|
|
64
64
|
const state = initState({ reactive, showPopper, popperElm, referenceElm, props, inject });
|
|
@@ -68,8 +68,8 @@ const renderless = (props, {
|
|
|
68
68
|
updatePopper,
|
|
69
69
|
show: show({ api: api2, state, props }),
|
|
70
70
|
hide: hide(api2),
|
|
71
|
-
destroyed: destroyed({ state, api: api2 }),
|
|
72
|
-
bindPopper: bindPopper({ vm,
|
|
71
|
+
destroyed: destroyed({ state, api: api2, vm }),
|
|
72
|
+
bindPopper: bindPopper({ vm, nextTick, popperVmRef }),
|
|
73
73
|
watchFocusing: watchFocusing(state),
|
|
74
74
|
removeFocusing: removeFocusing({ api: api2, state }),
|
|
75
75
|
handleBlur: handleBlur({ api: api2, state }),
|
package/transfer/index.js
CHANGED
|
@@ -27,7 +27,12 @@ const getFlatData = (data, hasChildren) => {
|
|
|
27
27
|
}
|
|
28
28
|
return nodes;
|
|
29
29
|
};
|
|
30
|
-
const getTargetData = ({
|
|
30
|
+
const getTargetData = ({
|
|
31
|
+
props,
|
|
32
|
+
state,
|
|
33
|
+
Tree,
|
|
34
|
+
Table
|
|
35
|
+
}) => () => {
|
|
31
36
|
if (props.render && props.render.plugin.name === Tree) {
|
|
32
37
|
const nodes = getFlatData(copyArray(props.data), true);
|
|
33
38
|
const rightData = nodes.filter((item) => props.modelValue.includes(item[props.props.key]));
|
|
@@ -87,7 +92,13 @@ const addToLeft = ({ emit, props, state }) => (value) => {
|
|
|
87
92
|
};
|
|
88
93
|
props.beforeTransfer ? props.beforeTransfer(change) : change();
|
|
89
94
|
};
|
|
90
|
-
const addToRight = ({
|
|
95
|
+
const addToRight = ({
|
|
96
|
+
emit,
|
|
97
|
+
refs,
|
|
98
|
+
props,
|
|
99
|
+
state,
|
|
100
|
+
Tree
|
|
101
|
+
}) => (value) => {
|
|
91
102
|
const change = () => {
|
|
92
103
|
state.isToLeft = false;
|
|
93
104
|
let currentValue = props.modelValue.slice();
|
|
@@ -154,7 +165,13 @@ const logicFun = ({ props, emit, state }) => ({ event, isAdd, pullMode }) => {
|
|
|
154
165
|
emit("update:modelValue", currentValue);
|
|
155
166
|
emit("change", currentValue, "left", movedKeys);
|
|
156
167
|
};
|
|
157
|
-
const sortableEvent = ({
|
|
168
|
+
const sortableEvent = ({
|
|
169
|
+
api,
|
|
170
|
+
droppanel,
|
|
171
|
+
props,
|
|
172
|
+
queryDom,
|
|
173
|
+
refs
|
|
174
|
+
}) => () => {
|
|
158
175
|
if (props.dropConfig) {
|
|
159
176
|
const leftPanel = refs.leftPanel.$el.querySelector(droppanel);
|
|
160
177
|
const Sortable = props.dropConfig.plugin;
|
|
@@ -187,24 +204,6 @@ const sortableEvent = ({ api, droppanel, props, queryDom, refs }) => () => {
|
|
|
187
204
|
};
|
|
188
205
|
const getLeftCheckedData = ({ props, state }) => () => state.sourceData.filter((item) => !item[props.props.disabled]);
|
|
189
206
|
const getRightCheckedData = ({ props, state }) => () => state.targetData.filter((item) => !item[props.props.disabled]);
|
|
190
|
-
const recursiveData = ({ api, props, state }) => (data, isCasader, sign) => {
|
|
191
|
-
const propChildren = props.treeOp && props.treeOp.props && props.treeOp.props.children || "children";
|
|
192
|
-
const values = props.modelValue.slice();
|
|
193
|
-
const key = props.props.key;
|
|
194
|
-
data.forEach((obj) => {
|
|
195
|
-
const isChecked = ~values.indexOf(obj[key]);
|
|
196
|
-
if (sign && !isCasader) {
|
|
197
|
-
state.treeData.push(obj);
|
|
198
|
-
} else {
|
|
199
|
-
if (isChecked) {
|
|
200
|
-
state.treeData.push(obj);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
if (obj[propChildren] && obj[propChildren].length > 0) {
|
|
204
|
-
api.recursiveData(obj[propChildren], isCasader, !!isChecked);
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
207
|
export {
|
|
209
208
|
addToLeft,
|
|
210
209
|
addToRight,
|
|
@@ -218,6 +217,5 @@ export {
|
|
|
218
217
|
logicFun,
|
|
219
218
|
onSourceCheckedChange,
|
|
220
219
|
onTargetCheckedChange,
|
|
221
|
-
recursiveData,
|
|
222
220
|
sortableEvent
|
|
223
221
|
};
|
package/transfer/vue.js
CHANGED
|
@@ -2,7 +2,6 @@ import "../chunk-G2ADBYYC.js";
|
|
|
2
2
|
import {
|
|
3
3
|
getObj,
|
|
4
4
|
getSourceData,
|
|
5
|
-
recursiveData,
|
|
6
5
|
getLeftCheckedData,
|
|
7
6
|
getRightCheckedData,
|
|
8
7
|
getTargetData,
|
|
@@ -24,8 +23,6 @@ const initState = ({ reactive, computed, api: api2, props, h, slots }) => reacti
|
|
|
24
23
|
sourceData: computed(() => api2.getSourceData()),
|
|
25
24
|
targetData: computed(() => api2.getTargetData()),
|
|
26
25
|
hasButtonTexts: computed(() => props.buttonTexts.length === 2),
|
|
27
|
-
treeData: [],
|
|
28
|
-
sourceTreeData: [],
|
|
29
26
|
isToLeft: false,
|
|
30
27
|
optionRender: computed(() => (option) => {
|
|
31
28
|
if (props.renderContent) {
|
|
@@ -45,7 +42,6 @@ const renderless = (props, { computed, onMounted, reactive, h }, { $prefix, emit
|
|
|
45
42
|
const { DROPPANEL, TRANSFERPANEL } = parent.$constants;
|
|
46
43
|
Object.assign(api2, {
|
|
47
44
|
state,
|
|
48
|
-
$slots: parent.$slots,
|
|
49
45
|
getObj: getObj(props),
|
|
50
46
|
clearQuery: clearQuery(refs),
|
|
51
47
|
getSourceData: getSourceData({ props, Tree }),
|
|
@@ -57,8 +53,7 @@ const renderless = (props, { computed, onMounted, reactive, h }, { $prefix, emit
|
|
|
57
53
|
onSourceCheckedChange: onSourceCheckedChange({ emit, state }),
|
|
58
54
|
logicFun: logicFun({ props, emit, state }),
|
|
59
55
|
getTargetData: getTargetData({ props, state, Tree, Table }),
|
|
60
|
-
|
|
61
|
-
sortableEvent: sortableEvent({ api: api2, droppanel: DROPPANEL, props, queryDom: TRANSFERPANEL, refs, state })
|
|
56
|
+
sortableEvent: sortableEvent({ api: api2, droppanel: DROPPANEL, props, queryDom: TRANSFERPANEL, refs })
|
|
62
57
|
});
|
|
63
58
|
onMounted(api2.sortableEvent);
|
|
64
59
|
return api2;
|
package/transfer-panel/vue.js
CHANGED
|
@@ -113,16 +113,14 @@ const initWatcher = ({ watch, state, api: api2, props, Table }) => {
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
};
|
|
116
|
-
const renderless = (props, { computed, reactive, watch, toRaw
|
|
116
|
+
const renderless = (props, { computed, reactive, watch, toRaw }, { $prefix, emit, parent, vm, slots }) => {
|
|
117
117
|
const api2 = {};
|
|
118
118
|
const Table = $prefix + "Table";
|
|
119
119
|
const Tree = $prefix + "Tree";
|
|
120
120
|
const state = initState({ reactive, props, parent, computed, api: api2, slots });
|
|
121
121
|
Object.assign(api2, {
|
|
122
|
-
t,
|
|
123
122
|
state,
|
|
124
123
|
toRaw,
|
|
125
|
-
markRaw,
|
|
126
124
|
sizesChange: sizesChange(state),
|
|
127
125
|
setPosition: setPosition({ parent, state }),
|
|
128
126
|
selectChange: selectChange(state),
|
|
@@ -131,14 +129,14 @@ const renderless = (props, { computed, reactive, watch, toRaw, markRaw }, { $pre
|
|
|
131
129
|
checkedEvent: checkedEvent(state),
|
|
132
130
|
getDeteminate: getDeteminate(state),
|
|
133
131
|
updateAllChecked: updateAllChecked({ state, Table, Tree }),
|
|
134
|
-
handleAllCheckedChange: handleAllCheckedChange({
|
|
132
|
+
handleAllCheckedChange: handleAllCheckedChange({ state, Table, Tree, vm }),
|
|
135
133
|
getCheckedSummary: getCheckedSummary({ props, state, Tree }),
|
|
136
134
|
getFilterTreeData: getFilterTreeData({ props, state }),
|
|
137
135
|
getTreeCheckableData: getTreeCheckableData(state),
|
|
138
136
|
getStrictData: getStrictData({ props, state }),
|
|
139
137
|
setExpandCache: setExpandCache(state),
|
|
140
138
|
getCheckableData: getCheckableData({ api: api2, state, Tree }),
|
|
141
|
-
getFilterData: getFilterData({ api: api2,
|
|
139
|
+
getFilterData: getFilterData({ api: api2, props, state, Table, Tree }),
|
|
142
140
|
watchData: watchData({ api: api2, props, state, Tree }),
|
|
143
141
|
watchDefaultCheckded: watchDefaultCheckded({ api: api2, props, state, Tree }),
|
|
144
142
|
watchChecked: watchChecked({ api: api2, emit, state })
|