@opentiny/vue-renderless 3.13.2 → 3.14.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/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/bigInt.js +2 -2
- package/common/date.js +7 -5
- package/common/deps/clickoutside.js +6 -2
- package/common/deps/date-util.js +4 -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 +15 -6
- package/date-table/index.js +35 -53
- package/date-table/vue.js +4 -2
- 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 +48 -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 +290 -77
- package/picker/mb.js +42 -0
- package/picker/vue.js +76 -20
- 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 +73 -34
- 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 +442 -393
- package/select/vue.js +278 -164
- 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 +29 -3
- 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/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 +6 -0
- package/types/collapse.type.d.ts +19 -2
- package/types/date-picker.type.d.ts +38 -1
- 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-a2dc0099.d.ts} +4 -1
- 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 +2 -6
- 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/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 +12 -0
- package/types/picker.type.d.ts +18 -0
- package/types/popconfirm.type.d.ts +86 -1
- package/types/popeditor.type.d.ts +4 -0
- package/types/popover.type.d.ts +3 -3
- package/types/progress.type.d.ts +2 -0
- 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 +14 -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 +1 -1
- package/types/{upload-list.type-343e8c11.d.ts → upload-list.type-6d6e3d0e.d.ts} +35 -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 +35 -26
- 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/select-dropdown/index.js
CHANGED
|
@@ -1,18 +1,76 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
const mounted = ({ selectEmitter, constants, state, selectVm, updatePopper, destroyPopper, parent }) => () => {
|
|
3
|
-
selectEmitter.on(constants.EVENT_NAME.updatePopper, () => {
|
|
3
|
+
selectEmitter.on(constants.EVENT_NAME.updatePopper, (keepZIndex) => {
|
|
4
4
|
let hideDrop = false;
|
|
5
5
|
if (!state.referenceElm || state.referenceElm.nodeType !== 1) {
|
|
6
6
|
state.referenceElm = selectVm.$refs.reference ? selectVm.$refs.reference.$el : selectVm.$refs.select;
|
|
7
7
|
selectVm.popperElm = selectVm.state.popperElm = state.popperElm = parent.$el;
|
|
8
8
|
}
|
|
9
9
|
if (parent.select.state.visible && !hideDrop) {
|
|
10
|
-
updatePopper();
|
|
10
|
+
updatePopper(keepZIndex);
|
|
11
11
|
hideDrop = true;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
14
|
selectEmitter.on(constants.EVENT_NAME.destroyPopper, destroyPopper);
|
|
15
15
|
};
|
|
16
|
+
const closeModal = ({ selectVm, state, props }) => ($event, isMask) => {
|
|
17
|
+
if (!props.closeByMask && isMask)
|
|
18
|
+
return;
|
|
19
|
+
selectVm.multiple && selectVm.updateModelValue(state.originValue);
|
|
20
|
+
selectVm.state.visible = false;
|
|
21
|
+
selectVm.state.softFocus = false;
|
|
22
|
+
};
|
|
23
|
+
const handleQueryChange = ({ selectVm }) => (value) => {
|
|
24
|
+
selectVm.handleQueryChange(value);
|
|
25
|
+
};
|
|
26
|
+
const toggleSelectedBox = ({ state }) => (show) => {
|
|
27
|
+
if (show) {
|
|
28
|
+
state.selectedArr = state.selected.slice(0);
|
|
29
|
+
state.deletedArr = [];
|
|
30
|
+
}
|
|
31
|
+
state.showSelectedBox = show;
|
|
32
|
+
};
|
|
33
|
+
const deleteSelected = ({ state }) => (option, clear) => {
|
|
34
|
+
if (clear) {
|
|
35
|
+
state.deletedArr = state.selectedArr.slice(0);
|
|
36
|
+
state.selectedArr = [];
|
|
37
|
+
} else {
|
|
38
|
+
state.selectedArr = state.selectedArr.filter((item) => item[state.valueField] !== option[state.valueField]);
|
|
39
|
+
state.deletedArr.push(option);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const selectedBoxConfirm = ({ state, selectVm }) => () => {
|
|
43
|
+
if (state.deletedArr.length) {
|
|
44
|
+
if (state.deletedArr.length === state.selected.length) {
|
|
45
|
+
selectVm.updateModelValue([]);
|
|
46
|
+
} else {
|
|
47
|
+
selectVm.updateModelValue(state.selectedArr.map((item) => item[state.valueField]));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
state.showSelectedBox = false;
|
|
51
|
+
};
|
|
52
|
+
const selectDropdownConfirm = ({ selectVm }) => () => {
|
|
53
|
+
selectVm.multiple && selectVm.updateModelValue(selectVm.state.modelValue, true);
|
|
54
|
+
selectVm.state.visible = false;
|
|
55
|
+
selectVm.state.softFocus = false;
|
|
56
|
+
selectVm.$emit("confirm", selectVm.state.modelValue);
|
|
57
|
+
selectVm.emitChange(selectVm.state.modelValue, true);
|
|
58
|
+
};
|
|
59
|
+
const cancelSearch = ({ api, state }) => () => {
|
|
60
|
+
state.query = "";
|
|
61
|
+
api.debouncedQueryChange("");
|
|
62
|
+
};
|
|
63
|
+
const handleClear = ({ selectVm }) => () => {
|
|
64
|
+
selectVm.deleteSelected();
|
|
65
|
+
};
|
|
16
66
|
export {
|
|
17
|
-
|
|
67
|
+
cancelSearch,
|
|
68
|
+
closeModal,
|
|
69
|
+
deleteSelected,
|
|
70
|
+
handleClear,
|
|
71
|
+
handleQueryChange,
|
|
72
|
+
mounted,
|
|
73
|
+
selectDropdownConfirm,
|
|
74
|
+
selectedBoxConfirm,
|
|
75
|
+
toggleSelectedBox
|
|
18
76
|
};
|
package/select-dropdown/vue.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
mounted,
|
|
4
|
+
closeModal,
|
|
5
|
+
handleQueryChange,
|
|
6
|
+
toggleSelectedBox,
|
|
7
|
+
deleteSelected,
|
|
8
|
+
selectedBoxConfirm,
|
|
9
|
+
selectDropdownConfirm,
|
|
10
|
+
cancelSearch,
|
|
11
|
+
handleClear
|
|
12
|
+
} from "./index";
|
|
3
13
|
import userPopper from "../common/deps/vue-popper";
|
|
4
|
-
|
|
14
|
+
import PopupManager from "../common/deps/popup-manager";
|
|
15
|
+
import debounce from "../common/deps/debounce";
|
|
16
|
+
const api = [
|
|
17
|
+
"state",
|
|
18
|
+
"doDestroy",
|
|
19
|
+
"closeModal",
|
|
20
|
+
"debouncedQueryChange",
|
|
21
|
+
"toggleSelectedBox",
|
|
22
|
+
"deleteSelected",
|
|
23
|
+
"selectedBoxConfirm",
|
|
24
|
+
"selectDropdownConfirm",
|
|
25
|
+
"cancelSearch",
|
|
26
|
+
"handleClear"
|
|
27
|
+
];
|
|
5
28
|
const initState = ({ reactive, computed, popper, selectVm }) => {
|
|
6
29
|
const { showPopper, currentPlacement, popperElm, referenceElm } = popper;
|
|
7
30
|
const state = reactive({
|
|
@@ -10,16 +33,43 @@ const initState = ({ reactive, computed, popper, selectVm }) => {
|
|
|
10
33
|
popperElm,
|
|
11
34
|
referenceElm,
|
|
12
35
|
minWidth: "",
|
|
36
|
+
query: "",
|
|
37
|
+
showSelectedBox: false,
|
|
38
|
+
debounce: 300,
|
|
39
|
+
selectedArr: [],
|
|
40
|
+
deletedArr: [],
|
|
41
|
+
originValue: [],
|
|
42
|
+
showClose: computed(() => selectVm.clearable && !selectVm.multiple && selectVm.modelValue !== ""),
|
|
43
|
+
filterable: computed(() => selectVm.filterable),
|
|
13
44
|
multiple: computed(() => selectVm.multiple),
|
|
14
|
-
popperClass: computed(() => selectVm.popperClass)
|
|
45
|
+
popperClass: computed(() => selectVm.popperClass),
|
|
46
|
+
selected: computed(
|
|
47
|
+
() => selectVm.renderType === "tree" && !selectVm.treeOp.checkStrictly ? selectVm.state.selected.filter((item) => !item.children) : selectVm.state.selected
|
|
48
|
+
),
|
|
49
|
+
device: computed(() => selectVm.state.device),
|
|
50
|
+
visible: false,
|
|
51
|
+
windowScrollTop: 0,
|
|
52
|
+
zIndex: 2e3,
|
|
53
|
+
valueField: computed(() => selectVm.renderType === "tree" ? "id" : "value")
|
|
15
54
|
});
|
|
16
55
|
return state;
|
|
17
56
|
};
|
|
18
|
-
const initApi = ({ api: api2, popper, state, selectEmitter, constants, selectVm, parent }) => {
|
|
57
|
+
const initApi = ({ api: api2, popper, state, selectEmitter, constants, selectVm, parent, nextTick, props }) => {
|
|
19
58
|
const { destroyPopper, doDestroy, updatePopper } = popper;
|
|
20
59
|
Object.assign(api2, {
|
|
21
60
|
state,
|
|
22
61
|
doDestroy,
|
|
62
|
+
handleQueryChange: handleQueryChange({ state, selectVm }),
|
|
63
|
+
debouncedQueryChange: debounce(state.debounce, (value) => {
|
|
64
|
+
api2.handleQueryChange(value);
|
|
65
|
+
}),
|
|
66
|
+
toggleSelectedBox: toggleSelectedBox({ state }),
|
|
67
|
+
deleteSelected: deleteSelected({ state }),
|
|
68
|
+
selectedBoxConfirm: selectedBoxConfirm({ state, selectVm, nextTick }),
|
|
69
|
+
selectDropdownConfirm: selectDropdownConfirm({ state, selectVm }),
|
|
70
|
+
closeModal: closeModal({ state, selectVm, props }),
|
|
71
|
+
cancelSearch: cancelSearch({ api: api2, state, selectVm }),
|
|
72
|
+
handleClear: handleClear({ state, selectVm }),
|
|
23
73
|
mounted: mounted({ selectEmitter, constants, state, selectVm, updatePopper, destroyPopper, parent })
|
|
24
74
|
});
|
|
25
75
|
};
|
|
@@ -33,8 +83,35 @@ const initWatch = ({ watch, selectVm, state, nextTick }) => {
|
|
|
33
83
|
},
|
|
34
84
|
{ immediate: true }
|
|
35
85
|
);
|
|
86
|
+
watch(
|
|
87
|
+
() => state.query,
|
|
88
|
+
(val) => {
|
|
89
|
+
selectVm.state.queryValue = val;
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
watch(
|
|
93
|
+
() => selectVm.state.visible,
|
|
94
|
+
(val) => {
|
|
95
|
+
state.query = "";
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
state.visible = val;
|
|
98
|
+
state.zIndex = PopupManager.nextZIndex();
|
|
99
|
+
}, 0);
|
|
100
|
+
if (val && selectVm.multiple) {
|
|
101
|
+
state.originValue = selectVm.modelValue.slice(0);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
);
|
|
105
|
+
watch(
|
|
106
|
+
() => selectVm.shape,
|
|
107
|
+
() => {
|
|
108
|
+
nextTick(() => {
|
|
109
|
+
state.referenceElm = selectVm.$refs.reference && selectVm.$refs.reference.$el;
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
);
|
|
36
113
|
};
|
|
37
|
-
const renderless = (props, { computed, onBeforeUnmount, onDeactivated, onMounted, reactive, toRefs, watch, inject }, { vm, slots, parent, emit, nextTick }) => {
|
|
114
|
+
const renderless = (props, { computed, onBeforeUnmount, onDeactivated, onMounted, reactive, toRefs, watch, inject }, { vm, slots, parent, emit, nextTick, isMobileFirstMode }) => {
|
|
38
115
|
const api2 = {};
|
|
39
116
|
const constants = parent.select._constants;
|
|
40
117
|
const selectEmitter = inject("selectEmitter");
|
|
@@ -51,9 +128,9 @@ const renderless = (props, { computed, onBeforeUnmount, onDeactivated, onMounted
|
|
|
51
128
|
toRefs,
|
|
52
129
|
watch
|
|
53
130
|
});
|
|
54
|
-
const state = initState({ reactive, computed, popper, selectVm });
|
|
55
|
-
initApi({ api: api2, popper, state, selectEmitter, constants, selectVm, parent });
|
|
56
|
-
initWatch({ watch, selectVm, state, nextTick });
|
|
131
|
+
const state = initState({ reactive, computed, popper, props, selectVm });
|
|
132
|
+
initApi({ api: api2, popper, state, selectEmitter, constants, selectVm, parent, nextTick, props, isMobileFirstMode });
|
|
133
|
+
initWatch({ watch, selectVm, state, nextTick, api: api2 });
|
|
57
134
|
onBeforeUnmount(() => {
|
|
58
135
|
popper.destroyPopper("remove");
|
|
59
136
|
state.popperElm = null;
|
package/select-view/index.js
CHANGED
|
@@ -125,7 +125,9 @@ const load = ({ state, props, api }) => () => {
|
|
|
125
125
|
}
|
|
126
126
|
const list = infiniteScroll.load({ input: search.input, options: search.options });
|
|
127
127
|
if (!list) {
|
|
128
|
-
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
if (typeof list.then === "function") {
|
|
129
131
|
state.search.loading = true;
|
|
130
132
|
list.then((data) => {
|
|
131
133
|
state.search.loading = false;
|
package/selected-box/index.js
CHANGED
|
@@ -194,10 +194,12 @@ const unmount = (state) => () => {
|
|
|
194
194
|
state.dragInstance = null;
|
|
195
195
|
}
|
|
196
196
|
};
|
|
197
|
+
const computedShowClear = (state) => () => Array.isArray(state.select) && state.select.length;
|
|
197
198
|
export {
|
|
198
199
|
arrayMinus,
|
|
199
200
|
batchSubmit,
|
|
200
201
|
computedShowAuxi,
|
|
202
|
+
computedShowClear,
|
|
201
203
|
coverSubmit,
|
|
202
204
|
emitChange,
|
|
203
205
|
getParams,
|
package/selected-box/vue.js
CHANGED
|
@@ -19,7 +19,8 @@ import {
|
|
|
19
19
|
arrayMinus,
|
|
20
20
|
batchSubmit,
|
|
21
21
|
getParams,
|
|
22
|
-
coverSubmit
|
|
22
|
+
coverSubmit,
|
|
23
|
+
computedShowClear
|
|
23
24
|
} from "./index";
|
|
24
25
|
const api = [
|
|
25
26
|
"state",
|
|
@@ -50,7 +51,8 @@ const renderless = (props, { reactive, computed, onBeforeMount, onMounted, onBef
|
|
|
50
51
|
popoverVisible: false,
|
|
51
52
|
popoverContent: "",
|
|
52
53
|
dragInstance: null,
|
|
53
|
-
slotParams: computed(() => ({ inverse: state.inverse, total: state.total, select: state.select }))
|
|
54
|
+
slotParams: computed(() => ({ inverse: state.inverse, total: state.total, select: state.select })),
|
|
55
|
+
showClear: computed(() => api2.computedShowClear())
|
|
54
56
|
});
|
|
55
57
|
const api2 = {
|
|
56
58
|
state,
|
|
@@ -63,7 +65,8 @@ const renderless = (props, { reactive, computed, onBeforeMount, onMounted, onBef
|
|
|
63
65
|
handleMouseleave: handleMouseleave(state),
|
|
64
66
|
keyType: keyType(props),
|
|
65
67
|
unmount: unmount(state),
|
|
66
|
-
getParams: getParams(state)
|
|
68
|
+
getParams: getParams(state),
|
|
69
|
+
computedShowClear: computedShowClear(state)
|
|
67
70
|
};
|
|
68
71
|
Object.assign(api2, {
|
|
69
72
|
submitSelection: submitSelection({ api: api2, state }),
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { preventDefault } from "../common/deps/dom";
|
|
3
|
+
const getOffsetPosition = ({ touch, state }) => {
|
|
4
|
+
let offsetY = 0;
|
|
5
|
+
let offsetX = 0;
|
|
6
|
+
if (state.current === "default" && state.isFullscreen) {
|
|
7
|
+
offsetY = state.canvasRect.width - touch.clientX + (state.canvasRect.left || 0);
|
|
8
|
+
offsetX = touch.clientY - (state.canvasRect.top || 0);
|
|
9
|
+
} else {
|
|
10
|
+
offsetX = touch.clientX - (state.canvasRect.left || 0);
|
|
11
|
+
offsetY = touch.clientY - (state.canvasRect.top || 0);
|
|
12
|
+
}
|
|
13
|
+
return { offsetX, offsetY };
|
|
14
|
+
};
|
|
15
|
+
const redraw = ({ state, props, nextTick }) => ({ oldWidth, oldHeight }) => {
|
|
16
|
+
if (Date.now() - state.lastRedrawDate < 100) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
state.lastRedrawDate = Date.now();
|
|
20
|
+
nextTick(() => {
|
|
21
|
+
const context = state.ctx;
|
|
22
|
+
context.lineWidth = props.lineWidth;
|
|
23
|
+
context.strokeStyle = props.penColor;
|
|
24
|
+
context.beginPath();
|
|
25
|
+
state.ctx.lineJoin = "round";
|
|
26
|
+
state.paths.forEach((point) => {
|
|
27
|
+
point.offsetX *= state.width / oldWidth;
|
|
28
|
+
point.offsetY *= state.height / oldHeight;
|
|
29
|
+
if (point.isStart) {
|
|
30
|
+
context.moveTo(point.offsetX, point.offsetY);
|
|
31
|
+
} else {
|
|
32
|
+
context.lineTo(point.offsetX, point.offsetY);
|
|
33
|
+
context.stroke();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
const touchStart = ({ emit, props, state, vm, api, useRect }) => () => {
|
|
39
|
+
if (!state.ctx) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
if (!state.isBeginWrite) {
|
|
43
|
+
api.rewrite(true);
|
|
44
|
+
}
|
|
45
|
+
state.canvasRect = useRect(vm.$refs.canvasRef);
|
|
46
|
+
state.ctx.lineWidth = props.lineWidth;
|
|
47
|
+
state.ctx.strokeStyle = props.penColor;
|
|
48
|
+
const touch = event.touches[0];
|
|
49
|
+
if (!touch.offsetX) {
|
|
50
|
+
const pos = getOffsetPosition({ touch, state });
|
|
51
|
+
touch.offsetX = pos.offsetX;
|
|
52
|
+
touch.offsetY = pos.offsetY;
|
|
53
|
+
}
|
|
54
|
+
state.isDrawing = true;
|
|
55
|
+
const point = {
|
|
56
|
+
isStart: true,
|
|
57
|
+
offsetX: touch.offsetX,
|
|
58
|
+
offsetY: touch.offsetY
|
|
59
|
+
};
|
|
60
|
+
state.paths.push(point);
|
|
61
|
+
state.ctx.beginPath();
|
|
62
|
+
state.ctx.lineJoin = "round";
|
|
63
|
+
state.ctx.moveTo(touch.offsetX, touch.offsetY);
|
|
64
|
+
emit("start");
|
|
65
|
+
};
|
|
66
|
+
const touchMove = ({ emit, state }) => (e) => {
|
|
67
|
+
if (!state.ctx) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
preventDefault(e);
|
|
71
|
+
const touch = event.touches[0];
|
|
72
|
+
if (state.isDrawing) {
|
|
73
|
+
if (!touch.offsetX) {
|
|
74
|
+
const pos = getOffsetPosition({ touch, state });
|
|
75
|
+
touch.offsetX = pos.offsetX;
|
|
76
|
+
touch.offsetY = pos.offsetY;
|
|
77
|
+
}
|
|
78
|
+
state.ctx.lineTo(touch.offsetX, touch.offsetY);
|
|
79
|
+
state.ctx.stroke();
|
|
80
|
+
const point = {
|
|
81
|
+
isStart: false,
|
|
82
|
+
offsetX: touch.offsetX,
|
|
83
|
+
offsetY: touch.offsetY
|
|
84
|
+
};
|
|
85
|
+
state.paths.push(point);
|
|
86
|
+
}
|
|
87
|
+
emit("signing", event);
|
|
88
|
+
};
|
|
89
|
+
const touchEnd = ({ emit, state }) => (event2) => {
|
|
90
|
+
state.isDrawing = false;
|
|
91
|
+
preventDefault(event2);
|
|
92
|
+
emit("end");
|
|
93
|
+
};
|
|
94
|
+
const isCanvasEmpty = (canvas, props) => {
|
|
95
|
+
const empty = document.createElement("canvas");
|
|
96
|
+
const ctx = empty.getContext("2d");
|
|
97
|
+
empty.width = canvas.width;
|
|
98
|
+
empty.height = canvas.height;
|
|
99
|
+
ctx.font = "16px PingFangSC";
|
|
100
|
+
ctx.textAlign = "center";
|
|
101
|
+
ctx.fillStyle = "#AEAEAE";
|
|
102
|
+
ctx.fillText(props.placeholder, empty.width / 2, empty.height / 2);
|
|
103
|
+
return canvas.toDataURL() === empty.toDataURL();
|
|
104
|
+
};
|
|
105
|
+
const setCanvasBgColor = ({ props, state }) => () => {
|
|
106
|
+
if (state.ctx && props.backgroundColor) {
|
|
107
|
+
state.ctx.fillStyle = props.backgroundColor;
|
|
108
|
+
state.ctx.fillRect(0, 0, state.width, state.height);
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
const setPlaceholder = ({ props, state }) => () => {
|
|
112
|
+
if (state.ctx) {
|
|
113
|
+
state.ctx.font = "16px PingFangSC";
|
|
114
|
+
state.ctx.textAlign = "center";
|
|
115
|
+
state.ctx.fillStyle = "#AEAEAE";
|
|
116
|
+
state.ctx.fillText(props.placeholder, state.width / 2, state.height / 2);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
const getSignatureImage = ({ props, vm, Modal, t }) => () => {
|
|
120
|
+
const canvas = vm.$refs.canvasRef;
|
|
121
|
+
if (!canvas) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const isEmpty = isCanvasEmpty(canvas, props);
|
|
125
|
+
let image = "";
|
|
126
|
+
if (isEmpty) {
|
|
127
|
+
Modal.message(t("ui.signature.tips"));
|
|
128
|
+
} else {
|
|
129
|
+
const types = {
|
|
130
|
+
jpg: () => canvas.toDataURL("image/jpeg", 0.8),
|
|
131
|
+
jpeg: () => canvas.toDataURL("image/jpeg", 0.8)
|
|
132
|
+
};
|
|
133
|
+
let type = types[props.type];
|
|
134
|
+
if (type) {
|
|
135
|
+
image = type();
|
|
136
|
+
} else {
|
|
137
|
+
image = canvas.toDataURL(`image/${props.type}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return { image, canvas };
|
|
141
|
+
};
|
|
142
|
+
const submit = ({ emit, api }) => () => {
|
|
143
|
+
const { image, canvas } = api.getSignatureImage();
|
|
144
|
+
emit("submit", { image, canvas });
|
|
145
|
+
};
|
|
146
|
+
const rewrite = ({ api, emit, state }) => (isBeginWrite) => {
|
|
147
|
+
if (state.ctx) {
|
|
148
|
+
state.value = false;
|
|
149
|
+
state.ctx.clearRect(0, 0, state.width, state.height);
|
|
150
|
+
state.ctx.closePath();
|
|
151
|
+
api.setCanvasBgColor();
|
|
152
|
+
state.isBeginWrite = true;
|
|
153
|
+
if (isBeginWrite === true)
|
|
154
|
+
return;
|
|
155
|
+
api.setPlaceholder();
|
|
156
|
+
state.isBeginWrite = false;
|
|
157
|
+
state.paths.length = 0;
|
|
158
|
+
emit("rewrite");
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const cancel = ({ api, emit }) => () => {
|
|
162
|
+
api.toggleFullscreen();
|
|
163
|
+
emit("cancel");
|
|
164
|
+
};
|
|
165
|
+
const tranformImage = ({ api, vm, props, nextTick }) => ({ oldWidth, oldHeight }) => {
|
|
166
|
+
const canvas = vm.$refs.canvasRef;
|
|
167
|
+
if (isCanvasEmpty(canvas, props)) {
|
|
168
|
+
nextTick(() => {
|
|
169
|
+
api.setPlaceholder();
|
|
170
|
+
});
|
|
171
|
+
} else {
|
|
172
|
+
nextTick(() => {
|
|
173
|
+
api.redraw({ oldWidth, oldHeight });
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const toggleFullscreen = ({ nextTick, api, state }) => () => {
|
|
178
|
+
const clientWidth = document.documentElement.clientWidth;
|
|
179
|
+
const clientHeight = document.documentElement.clientHeight;
|
|
180
|
+
const oldWidth = state.width;
|
|
181
|
+
const oldHeight = state.height;
|
|
182
|
+
state.isFullscreen = !state.isFullscreen;
|
|
183
|
+
nextTick(() => {
|
|
184
|
+
if (state.current.value === "default" && state.isFullscreen) {
|
|
185
|
+
state.width = clientHeight;
|
|
186
|
+
state.height = clientWidth;
|
|
187
|
+
} else {
|
|
188
|
+
api.initCanvas();
|
|
189
|
+
}
|
|
190
|
+
api.tranformImage({ oldWidth, oldHeight });
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
const initCanvas = ({ props, state, vm }) => () => {
|
|
194
|
+
const canvas = vm.$refs.canvasRef;
|
|
195
|
+
const wrap = vm.$refs.wrapRef;
|
|
196
|
+
const width = wrap.offsetWidth || 0;
|
|
197
|
+
const height = wrap.offsetHeight || 0;
|
|
198
|
+
state.ctx = canvas.getContext("2d");
|
|
199
|
+
state.width = width;
|
|
200
|
+
state.height = props.height || height;
|
|
201
|
+
};
|
|
202
|
+
const mounted = ({ vm, state, api, nextTick, markRaw }) => () => {
|
|
203
|
+
const wrap = vm.$refs.wrapRef;
|
|
204
|
+
const resizeObserver = new ResizeObserver((ResizeObserverEntryArr) => {
|
|
205
|
+
const [{ contentRect }] = ResizeObserverEntryArr;
|
|
206
|
+
if (contentRect.width && contentRect.height) {
|
|
207
|
+
api.initCanvas();
|
|
208
|
+
if (state.paths.length) {
|
|
209
|
+
api.redraw({ oldWidth: contentRect.width, oldHeight: contentRect.height });
|
|
210
|
+
} else {
|
|
211
|
+
nextTick(() => {
|
|
212
|
+
api.setCanvasBgColor();
|
|
213
|
+
api.setPlaceholder();
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
state.resizeObserver = markRaw(resizeObserver);
|
|
219
|
+
state.resizeObserver.observe(wrap);
|
|
220
|
+
};
|
|
221
|
+
const beforeUnmount = ({ vm, state }) => () => {
|
|
222
|
+
const wrap = vm.$refs.wrapRef;
|
|
223
|
+
state.resizeObserver.unobserve(wrap);
|
|
224
|
+
};
|
|
225
|
+
export {
|
|
226
|
+
beforeUnmount,
|
|
227
|
+
cancel,
|
|
228
|
+
getSignatureImage,
|
|
229
|
+
initCanvas,
|
|
230
|
+
mounted,
|
|
231
|
+
redraw,
|
|
232
|
+
rewrite,
|
|
233
|
+
setCanvasBgColor,
|
|
234
|
+
setPlaceholder,
|
|
235
|
+
submit,
|
|
236
|
+
toggleFullscreen,
|
|
237
|
+
touchEnd,
|
|
238
|
+
touchMove,
|
|
239
|
+
touchStart,
|
|
240
|
+
tranformImage
|
|
241
|
+
};
|
package/signature/vue.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import emulate from "../common/deps/touch-emulator";
|
|
3
|
+
import { useRect as _useRect } from "../common/deps/useRect";
|
|
4
|
+
import {
|
|
5
|
+
touchStart,
|
|
6
|
+
touchMove,
|
|
7
|
+
touchEnd,
|
|
8
|
+
setCanvasBgColor,
|
|
9
|
+
submit,
|
|
10
|
+
cancel,
|
|
11
|
+
rewrite,
|
|
12
|
+
mounted,
|
|
13
|
+
beforeUnmount,
|
|
14
|
+
setPlaceholder,
|
|
15
|
+
toggleFullscreen,
|
|
16
|
+
initCanvas,
|
|
17
|
+
tranformImage,
|
|
18
|
+
redraw,
|
|
19
|
+
getSignatureImage
|
|
20
|
+
} from "./index";
|
|
21
|
+
emulate();
|
|
22
|
+
const api = [
|
|
23
|
+
"state",
|
|
24
|
+
"touchStart",
|
|
25
|
+
"touchMove",
|
|
26
|
+
"touchEnd",
|
|
27
|
+
"rewrite",
|
|
28
|
+
"submit",
|
|
29
|
+
"toggleFullscreen",
|
|
30
|
+
"initCanvas",
|
|
31
|
+
"cancel",
|
|
32
|
+
"tranformImage",
|
|
33
|
+
"redraw",
|
|
34
|
+
"getSignatureImage"
|
|
35
|
+
];
|
|
36
|
+
const renderless = (props, { unref, reactive, onMounted, onBeforeUnmount, watch, markRaw }, { emit, vm, nextTick, t, useBreakpoint }, { Modal }) => {
|
|
37
|
+
const { current } = useBreakpoint();
|
|
38
|
+
const state = reactive({
|
|
39
|
+
width: 0,
|
|
40
|
+
height: 0,
|
|
41
|
+
ctx: null,
|
|
42
|
+
isBeginWrite: false,
|
|
43
|
+
isFullscreen: false,
|
|
44
|
+
current,
|
|
45
|
+
canvasRect: null,
|
|
46
|
+
isDrawing: false,
|
|
47
|
+
paths: markRaw([]),
|
|
48
|
+
resizeObserver: null,
|
|
49
|
+
value: props.value,
|
|
50
|
+
lastRedrawDate: 0
|
|
51
|
+
});
|
|
52
|
+
watch(
|
|
53
|
+
() => props.value,
|
|
54
|
+
(newValue) => {
|
|
55
|
+
if (newValue) {
|
|
56
|
+
state.value = newValue;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
const useRect = _useRect(unref);
|
|
61
|
+
const api2 = {
|
|
62
|
+
state,
|
|
63
|
+
touchMove: touchMove({ emit, state }),
|
|
64
|
+
touchEnd: touchEnd({ emit, state }),
|
|
65
|
+
setCanvasBgColor: setCanvasBgColor({ props, state }),
|
|
66
|
+
setPlaceholder: setPlaceholder({ props, state }),
|
|
67
|
+
getSignatureImage: getSignatureImage({ props, vm, Modal, t })
|
|
68
|
+
};
|
|
69
|
+
Object.assign(api2, {
|
|
70
|
+
touchStart: touchStart({ emit, props, state, vm, api: api2, useRect }),
|
|
71
|
+
rewrite: rewrite({ api: api2, emit, state }),
|
|
72
|
+
mounted: mounted({ state, api: api2, vm, nextTick, markRaw }),
|
|
73
|
+
onBeforeUnmount: beforeUnmount({ state, vm }),
|
|
74
|
+
initCanvas: initCanvas({ props, state, vm }),
|
|
75
|
+
toggleFullscreen: toggleFullscreen({ api: api2, nextTick, state }),
|
|
76
|
+
cancel: cancel({ api: api2, emit }),
|
|
77
|
+
redraw: redraw({ props, state, nextTick }),
|
|
78
|
+
tranformImage: tranformImage({ api: api2, vm, props, nextTick }),
|
|
79
|
+
submit: submit({ emit, api: api2 })
|
|
80
|
+
});
|
|
81
|
+
onMounted(() => api2.mounted());
|
|
82
|
+
onBeforeUnmount(() => api2.onBeforeUnmount());
|
|
83
|
+
return api2;
|
|
84
|
+
};
|
|
85
|
+
export {
|
|
86
|
+
api,
|
|
87
|
+
renderless
|
|
88
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { isNumber, isNull } from "../common/type";
|
|
3
|
+
const toPxStyle = (value) => {
|
|
4
|
+
if (isNull(value)) {
|
|
5
|
+
return void 0;
|
|
6
|
+
}
|
|
7
|
+
if (isNumber(value)) {
|
|
8
|
+
return `${value}px`;
|
|
9
|
+
}
|
|
10
|
+
return String(value);
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
toPxStyle
|
|
14
|
+
};
|
package/skeleton/vue.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { toPxStyle } from "./index";
|
|
3
|
+
const api = ["toPxStyle"];
|
|
4
|
+
const renderless = (props, { toRefs, provide }) => {
|
|
5
|
+
const { active } = toRefs(props);
|
|
6
|
+
provide("active", active);
|
|
7
|
+
const api2 = {
|
|
8
|
+
toPxStyle
|
|
9
|
+
};
|
|
10
|
+
return api2;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
api,
|
|
14
|
+
renderless
|
|
15
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
const api = ["state"];
|
|
3
|
+
const renderless = (props, { reactive, inject }) => {
|
|
4
|
+
const state = reactive({
|
|
5
|
+
isActive: inject("active", false)
|
|
6
|
+
});
|
|
7
|
+
const api2 = {
|
|
8
|
+
state
|
|
9
|
+
};
|
|
10
|
+
return api2;
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
api,
|
|
14
|
+
renderless
|
|
15
|
+
};
|