@opentiny/vue-renderless 3.6.8 → 3.8.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 +28 -1
- package/action-sheet/vue.js +10 -4
- package/alert/index.js +24 -2
- package/alert/vue.js +15 -11
- package/amount/index.js +4 -4
- package/anchor/index.js +1 -1
- package/autocomplete/vue.js +3 -3
- package/autonavi-map/index.js +1 -1
- package/badge/vue.js +6 -6
- package/baidu-map/index.js +1 -1
- package/bulletin-board/index.js +1 -1
- package/calendar/index.js +2 -2
- package/calendar-bar/index.js +268 -0
- package/calendar-bar/vue.js +87 -0
- package/card/index.js +84 -0
- package/card/vue.js +70 -0
- package/card-group/index.js +16 -0
- package/card-group/vue.js +21 -0
- package/card-template/index.js +1 -1
- package/carousel/index.js +89 -2
- package/carousel/vue.js +14 -5
- package/carousel-item/index.js +8 -0
- package/carousel-item/vue.js +7 -3
- package/cascader/index.js +6 -6
- package/cascader/vue.js +3 -3
- package/cascader-menu/vue.js +2 -2
- package/cascader-panel/index.js +4 -4
- package/cascader-panel/node.js +4 -4
- package/cascader-panel/vue.js +2 -2
- package/cascader-select/index.js +179 -0
- package/cascader-select/vue.js +74 -0
- package/cell/vue.js +16 -0
- package/chart-bar/index.js +3 -3
- package/chart-boxplot/index.js +2 -2
- package/chart-candle/index.js +3 -3
- package/chart-core/deps/utils.js +7 -7
- package/chart-core/index.js +2 -2
- package/chart-funnel/index.js +3 -3
- package/chart-gauge/index.js +3 -3
- package/chart-graph/index.js +1 -1
- package/chart-heatmap/index.js +2 -2
- package/chart-line/index.js +3 -3
- package/chart-liquidfill/index.js +2 -2
- package/chart-map/index.js +3 -3
- package/chart-pie/index.js +3 -3
- package/chart-radar/index.js +3 -3
- package/chart-sankey/index.js +3 -3
- package/chart-scatter/index.js +4 -4
- package/chart-sunburst/index.js +1 -1
- package/chart-tree/index.js +2 -2
- package/chart-waterfall/index.js +3 -3
- package/chart-wordcloud/index.js +2 -2
- package/checkbox/index.js +21 -0
- package/checkbox/vue.js +16 -3
- package/checkbox-button/vue.js +1 -1
- package/collapse-item/vue.js +1 -1
- package/column-list-group/index.js +0 -0
- package/column-list-group/vue.js +14 -0
- package/column-list-item/index.js +50 -0
- package/column-list-item/vue.js +39 -0
- package/common/array.js +3 -3
- package/common/bigInt.js +5 -2
- package/common/dataset/index.js +3 -3
- package/common/date.js +2 -2
- package/common/deps/ResizeObserver.js +1 -1
- package/common/deps/clickoutside.js +1 -1
- package/common/deps/date-util.js +4 -4
- package/common/deps/date.js +2 -2
- package/common/deps/debounce.js +1 -1
- package/common/deps/dom.js +1 -1
- package/common/deps/fullscreen/apis.js +3 -3
- package/common/deps/fullscreen/screenfull.js +1 -1
- package/common/deps/infinite-scroll.js +176 -0
- package/common/deps/letter-only.js +1 -1
- package/common/deps/number-only.js +1 -1
- package/common/deps/observe-visibility.js +106 -0
- package/common/deps/popper.js +20 -22
- package/common/deps/popup-manager.js +2 -2
- package/common/deps/repeat-click.js +1 -1
- package/common/deps/resize-event.js +1 -1
- package/common/deps/tree-model/node.js +5 -5
- package/common/deps/tree-model/tree-store.js +3 -3
- package/common/deps/upload-ajax.js +2 -2
- package/common/deps/vue-popper.js +4 -4
- package/common/deps/vue-popup.js +4 -4
- package/common/index.js +2 -2
- package/common/object.js +1 -1
- package/common/runtime.js +24 -24
- package/common/string.js +23 -4
- package/common/validate/rules/range.js +2 -2
- package/common/validate/rules/required.js +1 -1
- package/common/validate/rules/type.js +3 -3
- package/common/validate/schema.js +1 -1
- package/common/validate/util.js +1 -1
- package/common/validate/validations/array.js +1 -1
- package/common/validate/validations/date.js +1 -1
- package/common/validate/validations/enum.js +1 -1
- package/common/validate/validations/float.js +1 -1
- package/common/validate/validations/integer.js +1 -1
- package/common/validate/validations/method.js +1 -1
- package/common/validate/validations/number.js +1 -1
- package/common/validate/validations/pattern.js +1 -1
- package/common/validate/validations/string.js +1 -1
- package/common/validate/validations/type.js +1 -1
- package/container/index.js +1 -1
- package/crop/index.js +2 -2
- package/currency/index.js +2 -2
- package/date-panel/index.js +7 -7
- package/date-panel/vue.js +3 -2
- package/date-picker-mobile/index.js +250 -0
- package/date-picker-mobile/vue.js +86 -0
- package/date-range/index.js +1 -1
- package/date-range/vue.js +1 -1
- package/date-table/index.js +3 -3
- package/date-table/vue.js +1 -1
- package/dialog-box/index.js +6 -4
- package/dialog-box/vue.js +1 -1
- package/dialog-select/index.js +345 -0
- package/dialog-select/vue.js +110 -0
- package/drawer/index.js +83 -0
- package/drawer/vue.js +51 -0
- package/drop-times/index.js +1 -1
- package/dropdown/index.js +2 -2
- package/dropdown/vue.js +1 -1
- package/dropdown-item/index.js +1 -1
- package/dropdown-item/mf.js +79 -0
- package/dropdown-menu/index.js +30 -1
- package/dropdown-menu/vue.js +17 -7
- package/dynamic-scroller/index.js +117 -0
- package/dynamic-scroller/vue.js +88 -0
- package/dynamic-scroller-item/index.js +147 -0
- package/dynamic-scroller-item/vue.js +92 -0
- package/espace/index.js +1 -1
- package/espace/vue.js +1 -1
- package/exception/vue.js +3 -1
- package/fall-menu/index.js +4 -4
- package/file-upload/index.js +872 -408
- package/file-upload/vue.js +87 -36
- package/filter/index.js +131 -0
- package/filter/tag-group.js +43 -0
- package/filter/vue.js +73 -0
- package/filter-bar/index.js +9 -0
- package/filter-bar/vue.js +16 -0
- package/filter-box/index.js +17 -0
- package/filter-box/vue.js +19 -0
- package/filter-panel/index.js +42 -0
- package/filter-panel/vue.js +33 -0
- package/floatbar/index.js +1 -1
- package/flowchart/index.js +721 -0
- package/flowchart/vue.js +81 -0
- package/form/index.js +15 -1
- package/form/vue.js +10 -4
- package/form-item/index.js +46 -6
- package/form-item/vue.js +27 -3
- package/fullscreen/index.js +1 -1
- package/fullscreen/vue.js +1 -1
- package/grid/plugins/export.js +2 -2
- package/grid/plugins/exportExcel.js +2 -2
- package/grid/plugins/resize.js +1 -1
- package/grid/static/base/helperEqualCompare.js +1 -1
- package/grid/static/base/isPlainObject.js +1 -1
- package/grid/utils/common.js +3 -3
- package/grid/utils/dom.js +3 -3
- package/grid/utils/event.js +2 -2
- package/guide/index.js +168 -0
- package/guide/vue.js +36 -0
- package/hrapprover/index.js +1 -1
- package/image/index.js +8 -4
- package/image/vue.js +12 -6
- package/image-viewer/index.js +3 -3
- package/image-viewer/vue.js +16 -6
- package/input/index.js +34 -1
- package/input/vue.js +22 -6
- package/ip-address/index.js +1 -1
- package/ip-address/vue.js +1 -1
- package/link-menu/index.js +2 -2
- package/link-menu/vue.js +2 -2
- package/loading/index.js +2 -2
- package/loading/vue.js +2 -1
- package/locales/index.js +1 -1
- package/logout/index.js +1 -1
- package/milestone/index.js +5 -1
- package/modal/index.js +68 -39
- package/modal/vue.js +15 -12
- package/month-range/index.js +1 -1
- package/month-range/vue.js +1 -1
- package/month-table/index.js +5 -5
- package/month-table/vue.js +1 -1
- package/multi-select/index.js +5 -2
- package/multi-select/vue.js +4 -5
- package/nav-menu/index.js +6 -6
- package/notify/index.js +3 -3
- package/numeric/index.js +15 -5
- package/numeric/vue.js +15 -6
- package/option/index.js +1 -1
- package/package.json +2 -1
- package/pager-item/index.js +1 -1
- package/panel/index.js +1 -1
- package/picker/index.js +7 -7
- package/picker/vue.js +1 -1
- package/picker-column/index.js +1 -1
- package/popconfirm/index.js +25 -0
- package/popconfirm/vue.js +22 -0
- package/popeditor/index.js +7 -7
- package/popeditor/vue.js +2 -2
- package/popover/index.js +11 -3
- package/popover/vue.js +33 -10
- package/popup/index.js +4 -4
- package/pull-refresh/index.js +8 -11
- package/pull-refresh/vue.js +7 -7
- package/radio/index.js +17 -0
- package/radio/vue.js +18 -3
- package/radio-button/index.js +8 -0
- package/radio-button/vue.js +19 -4
- package/radio-group/index.js +1 -1
- package/radio-group/vue.js +5 -2
- package/rate/index.js +4 -2
- package/rate/vue.js +1 -1
- package/record/index.js +190 -0
- package/record/vue.js +44 -0
- package/recycle-scroller/index.js +470 -0
- package/recycle-scroller/vue.js +135 -0
- package/river/index.js +371 -0
- package/river/river.js +352 -0
- package/river/vue.js +77 -0
- package/roles/index.js +1 -1
- package/scrollbar/vue-bar.js +1 -1
- package/scrollbar/vue.js +1 -1
- package/search/index.js +3 -3
- package/select/index.js +17 -14
- package/select/vue.js +14 -8
- package/select-dropdown/vue.js +1 -1
- package/select-mobile/index.js +111 -0
- package/select-mobile/vue.js +58 -0
- package/select-view/index.js +170 -0
- package/select-view/vue.js +82 -0
- package/selected-box/index.js +216 -0
- package/selected-box/vue.js +98 -0
- package/slide-bar/index.js +1 -1
- package/slider/index.js +49 -4
- package/slider/vue.js +15 -4
- package/split/vue.js +1 -1
- package/standard-list-item/index.js +18 -0
- package/standard-list-item/vue.js +22 -0
- package/steps/index.js +30 -0
- package/steps/slide-bar.js +122 -0
- package/steps/vue.js +15 -3
- package/switch/index.js +1 -1
- package/switch/vue.js +2 -1
- package/tab-bar/index.js +2 -2
- package/tab-item/index.js +2 -2
- package/tab-item/vue.js +1 -1
- package/tab-item-mf/index.js +0 -0
- package/tab-item-mf/vue.js +16 -0
- package/tab-nav/index.js +78 -4
- package/tab-nav/vue.js +11 -3
- package/tabbar-item/index.js +1 -1
- package/tabbar-item/vue.js +1 -1
- package/tabs/index.js +8 -9
- package/tabs/vue.js +1 -1
- package/tabs-mf/index.js +109 -0
- package/tabs-mf/vue-bar.js +49 -0
- package/tabs-mf/vue-nav-item.js +22 -0
- package/tabs-mf/vue-nav.js +13 -0
- package/tabs-mf/vue.js +45 -0
- package/tabs-mf/wheel.js +71 -0
- package/tag/index.js +8 -2
- package/tag/vue.js +13 -5
- package/tag-group/index.js +24 -0
- package/tag-group/vue.js +29 -0
- package/tall-storage/index.js +1 -1
- package/tall-storage/vue.js +1 -1
- package/time/index.js +1 -1
- package/time/vue.js +2 -2
- package/time-line/index.js +28 -7
- package/time-line/vue.js +9 -4
- package/time-panel/index.js +2 -2
- package/time-panel/vue.js +1 -1
- package/time-picker-mobile/index.js +30 -0
- package/time-picker-mobile/vue.js +30 -0
- package/time-range/index.js +1 -1
- package/time-range/vue.js +1 -1
- package/time-spinner/index.js +2 -2
- package/time-spinner/vue.js +1 -1
- package/toggle-menu/index.js +2 -2
- package/toggle-menu/vue.js +1 -1
- package/tooltip/index.js +30 -3
- package/tooltip/vue.js +33 -12
- package/top-box/index.js +3 -3
- package/transfer/index.js +1 -1
- package/transfer-panel/index.js +2 -2
- package/tree/index.js +6 -6
- package/tree/vue.js +1 -1
- package/tree-node/index.js +1 -1
- package/upload/index.js +1 -1
- package/upload/vue.js +2 -2
- package/upload-dragger/index.js +5 -1
- package/upload-dragger/vue.js +9 -3
- package/upload-list/index.js +158 -8
- package/upload-list/vue.js +77 -25
- package/user/index.js +86 -70
- package/user/vue.js +15 -5
- package/user-account/vue.js +1 -1
- package/user-contact/index.js +49 -3
- package/user-contact/vue.js +17 -8
- package/user-head-group/vue.js +17 -0
- package/user-link/index.js +10 -2
- package/user-link/vue.js +11 -6
- package/wheel/index.js +1 -1
- package/wizard/index.js +3 -3
- package/year-range/index.js +125 -0
- package/year-range/vue.js +88 -0
- package/year-table/index.js +175 -11
- package/year-table/vue.js +17 -5
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import {
|
|
3
|
+
init,
|
|
4
|
+
submitSelection,
|
|
5
|
+
getSelection,
|
|
6
|
+
i18nSelected,
|
|
7
|
+
computedShowAuxi,
|
|
8
|
+
textPrimary,
|
|
9
|
+
textAuxi,
|
|
10
|
+
handleMouseenter,
|
|
11
|
+
handleMouseleave,
|
|
12
|
+
handleClear,
|
|
13
|
+
handleDelete,
|
|
14
|
+
emitChange,
|
|
15
|
+
keyOption,
|
|
16
|
+
keyType,
|
|
17
|
+
initDrag,
|
|
18
|
+
unmount,
|
|
19
|
+
arrayMinus,
|
|
20
|
+
batchSubmit,
|
|
21
|
+
getParams,
|
|
22
|
+
coverSubmit
|
|
23
|
+
} from "./index";
|
|
24
|
+
const api = [
|
|
25
|
+
"state",
|
|
26
|
+
"init",
|
|
27
|
+
"submitSelection",
|
|
28
|
+
"getSelection",
|
|
29
|
+
"i18nSelected",
|
|
30
|
+
"textPrimary",
|
|
31
|
+
"textAuxi",
|
|
32
|
+
"handleMouseenter",
|
|
33
|
+
"handleMouseleave",
|
|
34
|
+
"handleClear",
|
|
35
|
+
"handleDelete",
|
|
36
|
+
"keyOption",
|
|
37
|
+
"keyType",
|
|
38
|
+
"batchSubmit",
|
|
39
|
+
"coverSubmit"
|
|
40
|
+
];
|
|
41
|
+
const renderless = (props, { reactive, computed, onBeforeMount, onMounted, onBeforeUnmount, watch, markRaw }, { emit, t, vm }) => {
|
|
42
|
+
const state = reactive({
|
|
43
|
+
inverse: false,
|
|
44
|
+
total: 0,
|
|
45
|
+
select: [],
|
|
46
|
+
refresh: 0,
|
|
47
|
+
optionSelector: '[data-tag="tiny-selected-box-item"]',
|
|
48
|
+
dragAnimation: 100,
|
|
49
|
+
showAuxi: computed(() => api2.computedShowAuxi()),
|
|
50
|
+
popoverVisible: false,
|
|
51
|
+
popoverContent: "",
|
|
52
|
+
dragInstance: null,
|
|
53
|
+
slotParams: computed(() => ({ inverse: state.inverse, total: state.total, select: state.select }))
|
|
54
|
+
});
|
|
55
|
+
const api2 = {
|
|
56
|
+
state,
|
|
57
|
+
init: init({ props, state }),
|
|
58
|
+
i18nSelected: i18nSelected({ state, t }),
|
|
59
|
+
computedShowAuxi: computedShowAuxi(props),
|
|
60
|
+
textPrimary: textPrimary(props),
|
|
61
|
+
textAuxi: textAuxi(props),
|
|
62
|
+
handleMouseenter: handleMouseenter({ state, vm }),
|
|
63
|
+
handleMouseleave: handleMouseleave(state),
|
|
64
|
+
keyType: keyType(props),
|
|
65
|
+
unmount: unmount(state),
|
|
66
|
+
getParams: getParams(state)
|
|
67
|
+
};
|
|
68
|
+
Object.assign(api2, {
|
|
69
|
+
submitSelection: submitSelection({ api: api2, state }),
|
|
70
|
+
handleClear: handleClear({ api: api2, emit, props, state }),
|
|
71
|
+
handleDelete: handleDelete({ api: api2, emit, state }),
|
|
72
|
+
emitChange: emitChange({ api: api2, emit }),
|
|
73
|
+
initDrag: initDrag({ api: api2, emit, markRaw, props, state, vm }),
|
|
74
|
+
arrayMinus: arrayMinus(api2),
|
|
75
|
+
batchSubmit: batchSubmit({ api: api2, state }),
|
|
76
|
+
getSelection: getSelection({ api: api2, state }),
|
|
77
|
+
coverSubmit: coverSubmit({ api: api2, props, state }),
|
|
78
|
+
keyOption: keyOption({ api: api2, props })
|
|
79
|
+
});
|
|
80
|
+
onBeforeMount(() => {
|
|
81
|
+
api2.init();
|
|
82
|
+
});
|
|
83
|
+
onMounted(() => {
|
|
84
|
+
api2.initDrag();
|
|
85
|
+
});
|
|
86
|
+
onBeforeUnmount(() => {
|
|
87
|
+
api2.unmount();
|
|
88
|
+
});
|
|
89
|
+
watch(
|
|
90
|
+
() => props.inverse,
|
|
91
|
+
() => api2.init()
|
|
92
|
+
);
|
|
93
|
+
return api2;
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
api,
|
|
97
|
+
renderless
|
|
98
|
+
};
|
package/slide-bar/index.js
CHANGED
package/slider/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { KEY_CODE } from "
|
|
3
|
-
import { emitEvent } from "
|
|
4
|
-
import { on, off, hasClass } from "
|
|
5
|
-
import { toNumber } from "
|
|
2
|
+
import { KEY_CODE } from "../common";
|
|
3
|
+
import { emitEvent } from "../common/event";
|
|
4
|
+
import { on, off, hasClass } from "../common/deps/dom";
|
|
5
|
+
import { toNumber } from "../common/string";
|
|
6
6
|
const bindEvent = (api) => () => {
|
|
7
7
|
on(window, "resize", api.bindResize);
|
|
8
8
|
api.bindResize();
|
|
@@ -314,6 +314,48 @@ const watchModelValue = ({ api, state }) => (value) => {
|
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
316
|
};
|
|
317
|
+
const getPoints = ({ props, state }) => () => {
|
|
318
|
+
if (props.showSteps && props.step > 0) {
|
|
319
|
+
state.points = [];
|
|
320
|
+
const num = parseInt(props.max / props.step);
|
|
321
|
+
for (let i = 1; i < num; i++) {
|
|
322
|
+
const point = {
|
|
323
|
+
position: i / num * 100 + "%",
|
|
324
|
+
value: i / num * props.max
|
|
325
|
+
};
|
|
326
|
+
state.points.push(point);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
const getLabels = ({ props, state }) => () => {
|
|
331
|
+
if (props.showLabel) {
|
|
332
|
+
state.labels = [];
|
|
333
|
+
const isFunction = props.formatLabel instanceof Function;
|
|
334
|
+
const num = parseInt(props.max / props.step);
|
|
335
|
+
for (let i = 0; i <= num; i++) {
|
|
336
|
+
const val = i / num * props.max;
|
|
337
|
+
const label = {
|
|
338
|
+
position: i / num * 100 + "%",
|
|
339
|
+
label: isFunction ? props.formatLabel(val, i) : val,
|
|
340
|
+
value: val
|
|
341
|
+
};
|
|
342
|
+
state.labels.push(label);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
};
|
|
346
|
+
const inputValueChange = ({ props, state, api }) => ($event, pos) => {
|
|
347
|
+
if (props.disabled || !state.isDouble)
|
|
348
|
+
return;
|
|
349
|
+
if (!/^\d+$/.test($event.target.value)) {
|
|
350
|
+
if (pos === "left") {
|
|
351
|
+
state.inputValue.splice(0, 1, state.leftBtnValue);
|
|
352
|
+
} else {
|
|
353
|
+
state.inputValue.splice(1, 1, state.rightBtnValue);
|
|
354
|
+
}
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
api.initSlider([Math.min(...state.inputValue), Math.max(...state.inputValue)]);
|
|
358
|
+
};
|
|
317
359
|
export {
|
|
318
360
|
autoSlider,
|
|
319
361
|
bindEvent,
|
|
@@ -330,8 +372,11 @@ export {
|
|
|
330
372
|
formatTipValue,
|
|
331
373
|
getActiveButtonIndex,
|
|
332
374
|
getActiveButtonValue,
|
|
375
|
+
getLabels,
|
|
376
|
+
getPoints,
|
|
333
377
|
hideTip,
|
|
334
378
|
initSlider,
|
|
379
|
+
inputValueChange,
|
|
335
380
|
setActiveButtonValue,
|
|
336
381
|
setBarStyle,
|
|
337
382
|
setButtonStyle,
|
package/slider/vue.js
CHANGED
|
@@ -23,7 +23,10 @@ import {
|
|
|
23
23
|
customBeforeAppearHook,
|
|
24
24
|
customAfterAppearHook,
|
|
25
25
|
watchActiveValue,
|
|
26
|
-
watchModelValue
|
|
26
|
+
watchModelValue,
|
|
27
|
+
getPoints,
|
|
28
|
+
getLabels,
|
|
29
|
+
inputValueChange
|
|
27
30
|
} from "./index";
|
|
28
31
|
const api = [
|
|
29
32
|
"state",
|
|
@@ -48,7 +51,8 @@ const api = [
|
|
|
48
51
|
"hideTip",
|
|
49
52
|
"autoSlider",
|
|
50
53
|
"customBeforeAppearHook",
|
|
51
|
-
"customAfterAppearHook"
|
|
54
|
+
"customAfterAppearHook",
|
|
55
|
+
"inputValueChange"
|
|
52
56
|
];
|
|
53
57
|
const initState = ({ reactive, computed, props, api: api2, parent }) => {
|
|
54
58
|
const state = reactive({
|
|
@@ -108,11 +112,18 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, wat
|
|
|
108
112
|
setActiveButtonValue: setActiveButtonValue({ api: api2, emit, props, state }),
|
|
109
113
|
initSlider: initSlider({ api: api2, props, state }),
|
|
110
114
|
watchModelValue: watchModelValue({ api: api2, state }),
|
|
111
|
-
watchActiveValue: watchActiveValue({ api: api2, emit, props, state })
|
|
115
|
+
watchActiveValue: watchActiveValue({ api: api2, emit, props, state }),
|
|
116
|
+
getPoints: getPoints({ props, state }),
|
|
117
|
+
getLabels: getLabels({ props, state }),
|
|
118
|
+
inputValueChange: inputValueChange({ props, api: api2, state })
|
|
112
119
|
});
|
|
113
120
|
watch(() => props.modelValue, api2.watchModelValue, { immediate: true });
|
|
114
121
|
watch(() => state.activeValue, api2.watchActiveValue, { immediate: true });
|
|
115
|
-
onMounted(
|
|
122
|
+
onMounted(() => {
|
|
123
|
+
api2.bindEvent();
|
|
124
|
+
api2.getPoints();
|
|
125
|
+
api2.getLabels();
|
|
126
|
+
});
|
|
116
127
|
onBeforeUnmount(api2.unBindEvent);
|
|
117
128
|
return api2;
|
|
118
129
|
};
|
package/split/vue.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
computeOffset,
|
|
15
15
|
handleCollapse
|
|
16
16
|
} from "./index";
|
|
17
|
-
import { on, off } from "
|
|
17
|
+
import { on, off } from "../common/deps/dom";
|
|
18
18
|
const api = ["state", "handleMousedown", "handleCollapse"];
|
|
19
19
|
const useOffset = ({ nextTick, props, refs, constants, hooks }) => {
|
|
20
20
|
const api2 = {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
const handleEnterDesc = ({ state, props }) => ($event) => {
|
|
3
|
+
const target = $event.target;
|
|
4
|
+
if (target && target.scrollHeight > target.offsetHeight) {
|
|
5
|
+
state.descTooltip = props.data.desc;
|
|
6
|
+
} else {
|
|
7
|
+
state.descTooltip = "";
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
const handelIconClick = ({ emit }) => (item, index) => {
|
|
11
|
+
if (item.disabled)
|
|
12
|
+
return;
|
|
13
|
+
emit("icon-click", item, index);
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
handelIconClick,
|
|
17
|
+
handleEnterDesc
|
|
18
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import { handleEnterDesc, handelIconClick } from "./index";
|
|
3
|
+
const api = ["state", "handelIconClick", "handleEnterDesc"];
|
|
4
|
+
const renderless = (props, { computed, reactive }, { emit }) => {
|
|
5
|
+
const state = reactive({
|
|
6
|
+
descTooltip: "",
|
|
7
|
+
sliceNum: 2,
|
|
8
|
+
iconNum: 3,
|
|
9
|
+
effectOptions: computed(() => props.options.filter((item) => !item.hidden))
|
|
10
|
+
});
|
|
11
|
+
const api2 = {};
|
|
12
|
+
Object.assign(api2, {
|
|
13
|
+
state,
|
|
14
|
+
handelIconClick: handelIconClick({ emit }),
|
|
15
|
+
handleEnterDesc: handleEnterDesc({ state, props })
|
|
16
|
+
});
|
|
17
|
+
return api2;
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
api,
|
|
21
|
+
renderless
|
|
22
|
+
};
|
package/steps/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
const updateStartIndex = ({ state, props }) => () => {
|
|
3
|
+
const { visibleNum, active } = props;
|
|
4
|
+
const maxStartIndex = Math.min(props.data.length - visibleNum, active - Math.floor(visibleNum / 2));
|
|
5
|
+
state.startIndex = Math.max(0, maxStartIndex);
|
|
6
|
+
};
|
|
7
|
+
const isVisibleHandler = ({ state, props }) => (index) => {
|
|
8
|
+
if (index < state.startIndex) {
|
|
9
|
+
return "hidden-left";
|
|
10
|
+
} else if (index >= state.startIndex + props.visibleNum) {
|
|
11
|
+
return "hidden-right";
|
|
12
|
+
} else {
|
|
13
|
+
return "visible";
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const computedRightNodePos = ({ state, props }) => () => {
|
|
17
|
+
const { data } = props;
|
|
18
|
+
const { endIndex } = state;
|
|
19
|
+
const dataLength = data.length;
|
|
20
|
+
const nodesLength = dataLength - 1 - endIndex;
|
|
21
|
+
return Array.from({ length: nodesLength }).map((item, index) => ({
|
|
22
|
+
zIndex: dataLength - index,
|
|
23
|
+
right: -(index + 1) * 4 + "px"
|
|
24
|
+
}));
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
computedRightNodePos,
|
|
28
|
+
isVisibleHandler,
|
|
29
|
+
updateStartIndex
|
|
30
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
import debounce from "../common/deps/debounce";
|
|
3
|
+
import { on, off } from "../common/deps/dom";
|
|
4
|
+
const getBoundingPosition = ({ state }) => () => {
|
|
5
|
+
const { slideMainPostion, positionList } = state;
|
|
6
|
+
const list = positionList.slice();
|
|
7
|
+
const len = list.length;
|
|
8
|
+
state.boundingIndex = {
|
|
9
|
+
left: -1,
|
|
10
|
+
right: -1
|
|
11
|
+
};
|
|
12
|
+
for (let i = 0; i < len; i++) {
|
|
13
|
+
if (list[i].right > slideMainPostion.right + 2) {
|
|
14
|
+
state.boundingIndex.right = i;
|
|
15
|
+
break;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
for (let i = len - 1; i >= 0; i--) {
|
|
19
|
+
if (list[i].left < slideMainPostion.left) {
|
|
20
|
+
state.boundingIndex.left = i;
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const leftSlideHandler = ({ state, api: api2 }) => () => {
|
|
26
|
+
const { canLeftScroll, slideMainPostion, positionList, boundingIndex } = state;
|
|
27
|
+
if (!canLeftScroll || state.timer) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const position = boundingIndex.left !== -1 && positionList[boundingIndex.left];
|
|
31
|
+
if (position) {
|
|
32
|
+
api2.animationHandler(position.left - slideMainPostion.left);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
const rightSlideHandler = ({ state, api: api2 }) => () => {
|
|
36
|
+
const { canRightScroll, slideMainPostion, positionList, boundingIndex } = state;
|
|
37
|
+
if (!canRightScroll || state.timer) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const position = boundingIndex.right !== -1 && positionList[boundingIndex.right];
|
|
41
|
+
if (position) {
|
|
42
|
+
api2.animationHandler(position.right - slideMainPostion.right);
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
const updatePosition = ({ state, vm, props, api: api2 }) => debounce(10, (isInit) => {
|
|
46
|
+
state.positionList = props.data.map((item, index) => {
|
|
47
|
+
const blockRef = vm.$refs["block" + index];
|
|
48
|
+
const position = blockRef && blockRef[0].getBoundingClientRect() || {};
|
|
49
|
+
return Object.assign(position, { index });
|
|
50
|
+
});
|
|
51
|
+
state.slideMainPostion = vm.$refs.slideMain.getBoundingClientRect();
|
|
52
|
+
api2.getBoundingPosition();
|
|
53
|
+
isInit === true && api2.updatePosition();
|
|
54
|
+
});
|
|
55
|
+
const animationLoop = ({ state, api: api2, vm }) => (offset, delay, scorllLeft, cb) => {
|
|
56
|
+
const elScrollLeft = vm.$refs.slideMain.scrollLeft;
|
|
57
|
+
clearTimeout(state.timer);
|
|
58
|
+
if (elScrollLeft !== state.oldScrollLeft && Math.abs(elScrollLeft - scorllLeft) > Math.abs(offset)) {
|
|
59
|
+
state.timer = setTimeout(() => {
|
|
60
|
+
vm.$refs.slideMain.scrollLeft += offset;
|
|
61
|
+
state.oldScrollLeft = elScrollLeft;
|
|
62
|
+
api2.animationLoop(offset, delay, scorllLeft, cb);
|
|
63
|
+
}, delay);
|
|
64
|
+
} else {
|
|
65
|
+
state.timer = null;
|
|
66
|
+
vm.$refs.slideMain.scrollLeft = scorllLeft;
|
|
67
|
+
cb && cb();
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
const animationHandler = ({ api: api2, vm, props }) => (allOffset) => {
|
|
71
|
+
const { duration, delay } = props;
|
|
72
|
+
const mathFn = allOffset > 0 ? Math.ceil : Math.floor;
|
|
73
|
+
const offsetInt = mathFn(allOffset);
|
|
74
|
+
if (!duration) {
|
|
75
|
+
vm.$refs.slideMain.scrollLeft += offsetInt;
|
|
76
|
+
api2.updatePosition();
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const offset = mathFn(offsetInt / (duration / delay));
|
|
80
|
+
const scorllLeft = vm.$refs.slideMain.scrollLeft + offsetInt;
|
|
81
|
+
api2.animationLoop(offset, delay, scorllLeft, () => {
|
|
82
|
+
api2.updatePosition();
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
const api = ["slideBarState", "leftSlideHandler", "rightSlideHandler", "updatePosition"];
|
|
86
|
+
const renderless = (props, { reactive, onMounted, onUnmounted, computed }, { vm }) => {
|
|
87
|
+
const state = reactive({
|
|
88
|
+
timer: null,
|
|
89
|
+
oldScrollLeft: -1,
|
|
90
|
+
slideMainPostion: {},
|
|
91
|
+
positionList: [],
|
|
92
|
+
canLeftScroll: computed(() => !props.noArrow && state.boundingIndex.left !== -1),
|
|
93
|
+
canRightScroll: computed(() => !props.noArrow && state.boundingIndex.right !== -1),
|
|
94
|
+
boundingIndex: {
|
|
95
|
+
left: -1,
|
|
96
|
+
right: -1
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
const api2 = {};
|
|
100
|
+
Object.assign(api2, {
|
|
101
|
+
slideBarState: state,
|
|
102
|
+
// 内部 state 重命名,避免使用插槽时 state 覆盖问题
|
|
103
|
+
leftSlideHandler: leftSlideHandler({ state, api: api2 }),
|
|
104
|
+
rightSlideHandler: rightSlideHandler({ state, api: api2 }),
|
|
105
|
+
animationHandler: animationHandler({ api: api2, vm, props }),
|
|
106
|
+
animationLoop: animationLoop({ state, api: api2, vm }),
|
|
107
|
+
getBoundingPosition: getBoundingPosition({ state, api: api2, vm }),
|
|
108
|
+
updatePosition: updatePosition({ state, vm, props, api: api2 })
|
|
109
|
+
});
|
|
110
|
+
onMounted(() => {
|
|
111
|
+
api2.updatePosition(true);
|
|
112
|
+
on(window, "resize", api2.updatePosition);
|
|
113
|
+
});
|
|
114
|
+
onUnmounted(() => {
|
|
115
|
+
off(window, "resize", api2.updatePosition);
|
|
116
|
+
});
|
|
117
|
+
return api2;
|
|
118
|
+
};
|
|
119
|
+
export {
|
|
120
|
+
api,
|
|
121
|
+
renderless
|
|
122
|
+
};
|
package/steps/vue.js
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
|
|
2
|
+
import { updateStartIndex, isVisibleHandler, computedRightNodePos } from "./index";
|
|
3
|
+
const api = ["state", "isVisibleHandler"];
|
|
4
|
+
const renderless = (props, { reactive, watch, computed }) => {
|
|
5
|
+
const state = reactive({
|
|
6
|
+
startIndex: 0,
|
|
7
|
+
endIndex: computed(() => state.startIndex + props.visibleNum),
|
|
8
|
+
rightNodePositions: computed(() => api2.computedRightNodePos())
|
|
9
|
+
});
|
|
10
|
+
const api2 = {
|
|
11
|
+
updateStartIndex: updateStartIndex({ state, props }),
|
|
12
|
+
isVisibleHandler: isVisibleHandler({ state, props }),
|
|
13
|
+
computedRightNodePos: computedRightNodePos({ state, props })
|
|
14
|
+
};
|
|
15
|
+
watch(() => props.active, api2.updateStartIndex, { immediate: true });
|
|
16
|
+
return Object.assign(api2, { state });
|
|
5
17
|
};
|
|
6
18
|
export {
|
|
7
19
|
api,
|
package/switch/index.js
CHANGED
package/switch/vue.js
CHANGED
|
@@ -13,7 +13,8 @@ const renderless = (props, { computed, watch, reactive, inject }, { parent, cons
|
|
|
13
13
|
wrapClasses: computed(() => api2.computedWarpClasses()),
|
|
14
14
|
style: computed(() => api2.computedStyle()),
|
|
15
15
|
formDisabled: computed(() => (parent.tinyForm || {}).disabled),
|
|
16
|
-
disabled: computed(() => props.disabled || state.formDisabled)
|
|
16
|
+
disabled: computed(() => props.disabled || state.formDisabled),
|
|
17
|
+
isDisplayOnly: computed(() => props.displayOnly || (parent.tinyForm || {}).displayOnly)
|
|
17
18
|
});
|
|
18
19
|
Object.assign(api2, {
|
|
19
20
|
state,
|
package/tab-bar/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { POSITION } from "
|
|
3
|
-
import { capitalize } from "
|
|
2
|
+
import { POSITION } from "../common";
|
|
3
|
+
import { capitalize } from "../common/string";
|
|
4
4
|
const computedBarStyle = (parent) => (props, state) => {
|
|
5
5
|
const style = {};
|
|
6
6
|
let offset = 0;
|
package/tab-item/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
2
|
const computedIsClosable = ({ parent, props }) => () => props.withClose || parent.withClose;
|
|
3
|
-
const computedActive = ({
|
|
4
|
-
const active =
|
|
3
|
+
const computedActive = ({ nextTick, props, state }) => () => {
|
|
4
|
+
const active = state.rootTabs.state.currentName === (props.name || state.index);
|
|
5
5
|
if (active) {
|
|
6
6
|
state.loaded = true;
|
|
7
7
|
nextTick(() => {
|
package/tab-item/vue.js
CHANGED
|
@@ -17,7 +17,7 @@ const renderless = (props, { computed, inject, reactive, watch }, { parent, next
|
|
|
17
17
|
});
|
|
18
18
|
Object.assign(api2, {
|
|
19
19
|
state,
|
|
20
|
-
computedActive: computedActive({
|
|
20
|
+
computedActive: computedActive({ nextTick, props, state }),
|
|
21
21
|
computedPaneName: computedPaneName({ props, state })
|
|
22
22
|
});
|
|
23
23
|
watch(() => props.title, api2.watchTitle);
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "../chunk-PKUHTIDK.js";
|
|
2
|
+
const renderless = (props, { inject }, { slots }) => {
|
|
3
|
+
const tabs = inject("tabs", null);
|
|
4
|
+
const { title, name } = props;
|
|
5
|
+
const item = { title, name, slotDefault: slots.default, slotTitle: slots.title, slotSetting: slots.setting };
|
|
6
|
+
if (props.renderTitle)
|
|
7
|
+
item.slotTitle = props.renderTitle;
|
|
8
|
+
if (props.renderSetting)
|
|
9
|
+
item.slotSetting = props.renderSetting;
|
|
10
|
+
item.selected = (tabs.activeName || tabs.modelValue) === name;
|
|
11
|
+
tabs.addItem(item);
|
|
12
|
+
return {};
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
renderless
|
|
16
|
+
};
|
package/tab-nav/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { KEY_CODE, POSITION } from "
|
|
3
|
-
import { capitalize } from "
|
|
4
|
-
import { addResizeListener, removeResizeListener } from "
|
|
5
|
-
import { on, off } from "
|
|
2
|
+
import { KEY_CODE, POSITION } from "../common";
|
|
3
|
+
import { capitalize } from "../common/string";
|
|
4
|
+
import { addResizeListener, removeResizeListener } from "../common/deps/resize-event";
|
|
5
|
+
import { on, off } from "../common/deps/dom";
|
|
6
6
|
const computedNavStyle = (state) => {
|
|
7
7
|
const dir = ~[POSITION.Top, POSITION.Bottom].indexOf(state.rootTabs.position) ? "X" : "Y";
|
|
8
8
|
if (state.mode === "mobile") {
|
|
@@ -75,6 +75,7 @@ const mounted = ({ api, parent }) => {
|
|
|
75
75
|
on(window, "focus", api.windowFocusHandler);
|
|
76
76
|
api.scrollToActiveTab();
|
|
77
77
|
api.scrollIntoView();
|
|
78
|
+
api.sortableEvent();
|
|
78
79
|
};
|
|
79
80
|
const beforeUnmount = ({ api, parent }) => {
|
|
80
81
|
const el = parent.$refs.nav && parent.$refs.nav.$el;
|
|
@@ -208,6 +209,75 @@ const computedHeaderStyle = ({ refs, state }) => () => {
|
|
|
208
209
|
}
|
|
209
210
|
return state.expandHeaderStyle;
|
|
210
211
|
};
|
|
212
|
+
const handleTabDragStart = ({ state, vm, emit }) => (event) => {
|
|
213
|
+
state.dragging = true;
|
|
214
|
+
if ([POSITION.Top, POSITION.Bottom].indexOf(state.rootTabs.position) === -1) {
|
|
215
|
+
emit("tab-drag-start", event);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const navContainer = vm.$refs.navScroll;
|
|
219
|
+
const nav = vm.$refs.nav;
|
|
220
|
+
const containerWidth = navContainer.offsetWidth;
|
|
221
|
+
const navWidth = nav.offsetWidth;
|
|
222
|
+
if (navWidth > containerWidth) {
|
|
223
|
+
const navHeight = nav.offsetHeight;
|
|
224
|
+
navContainer.style.height = navHeight + "px";
|
|
225
|
+
nav.style.transition = "none";
|
|
226
|
+
nav.style.transform = "";
|
|
227
|
+
nav.style.width = containerWidth + "px";
|
|
228
|
+
nav.style.overflowX = "scroll";
|
|
229
|
+
nav.scrollTo(state.navOffset, 0);
|
|
230
|
+
}
|
|
231
|
+
emit("tab-drag-start", event);
|
|
232
|
+
};
|
|
233
|
+
const handleTabDragEnd = ({ vm, state, nextTick }) => () => {
|
|
234
|
+
state.dragging = false;
|
|
235
|
+
if ([POSITION.Top, POSITION.Bottom].indexOf(state.rootTabs.position) === -1) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const nav = vm.$refs.nav;
|
|
239
|
+
if (nav.style.width) {
|
|
240
|
+
const navOffset = nav.scrollLeft;
|
|
241
|
+
const navContainer = vm.$refs.navScroll;
|
|
242
|
+
navContainer.style.height = "";
|
|
243
|
+
nav.style.width = "";
|
|
244
|
+
nav.style.overflowX = "";
|
|
245
|
+
state.navOffset = navOffset;
|
|
246
|
+
nextTick(() => {
|
|
247
|
+
nav.style.transition = "";
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
const sortableEvent = ({ api, props, state, vm, emit, markRaw }) => () => {
|
|
252
|
+
if (!props.dropConfig || typeof props.dropConfig.plugin !== "function") {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
const navSortableObj = new props.dropConfig.plugin(vm.$refs.nav, {
|
|
256
|
+
sort: true,
|
|
257
|
+
draggable: ".tiny-tabs__item",
|
|
258
|
+
onUpdate(event) {
|
|
259
|
+
emit("tab-drag-end", event);
|
|
260
|
+
},
|
|
261
|
+
onMove(event) {
|
|
262
|
+
emit("tab-drag-over", event);
|
|
263
|
+
},
|
|
264
|
+
onStart(event) {
|
|
265
|
+
api.handleTabDragStart(event);
|
|
266
|
+
},
|
|
267
|
+
onEnd(event) {
|
|
268
|
+
api.handleTabDragEnd(event);
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
state.navSortableObj = markRaw(navSortableObj);
|
|
272
|
+
};
|
|
273
|
+
const watchCurrentName = ({ nextTick, vm, state }) => () => {
|
|
274
|
+
nextTick(() => {
|
|
275
|
+
const tabBarVnode = vm.$refs.tabBar;
|
|
276
|
+
if (tabBarVnode) {
|
|
277
|
+
tabBarVnode.state.barStyle = tabBarVnode.computedBarStyle(tabBarVnode, state);
|
|
278
|
+
}
|
|
279
|
+
});
|
|
280
|
+
};
|
|
211
281
|
export {
|
|
212
282
|
beforeUnmount,
|
|
213
283
|
changeTab,
|
|
@@ -216,6 +286,8 @@ export {
|
|
|
216
286
|
computedSizeName,
|
|
217
287
|
expandTabHide,
|
|
218
288
|
expandTabShow,
|
|
289
|
+
handleTabDragEnd,
|
|
290
|
+
handleTabDragStart,
|
|
219
291
|
moreTabShow,
|
|
220
292
|
mounted,
|
|
221
293
|
removeFocus,
|
|
@@ -224,8 +296,10 @@ export {
|
|
|
224
296
|
scrollPrev,
|
|
225
297
|
scrollToActiveTab,
|
|
226
298
|
setFocus,
|
|
299
|
+
sortableEvent,
|
|
227
300
|
updated,
|
|
228
301
|
visibilityChangeHandler,
|
|
302
|
+
watchCurrentName,
|
|
229
303
|
windowBlurHandler,
|
|
230
304
|
windowFocusHandler
|
|
231
305
|
};
|
package/tab-nav/vue.js
CHANGED
|
@@ -18,7 +18,11 @@ import {
|
|
|
18
18
|
scrollNext,
|
|
19
19
|
changeTab,
|
|
20
20
|
setFocus,
|
|
21
|
-
removeFocus
|
|
21
|
+
removeFocus,
|
|
22
|
+
sortableEvent,
|
|
23
|
+
handleTabDragStart,
|
|
24
|
+
handleTabDragEnd,
|
|
25
|
+
watchCurrentName
|
|
22
26
|
} from "./index";
|
|
23
27
|
const api = [
|
|
24
28
|
"state",
|
|
@@ -35,7 +39,7 @@ const api = [
|
|
|
35
39
|
"computedHeaderStyle",
|
|
36
40
|
"swiperHandle"
|
|
37
41
|
];
|
|
38
|
-
const renderless = (props, { computed, inject, onBeforeUnmount, onMounted, onUpdated, reactive }, { parent, refs, mode: tinyMode }) => {
|
|
42
|
+
const renderless = (props, { computed, inject, onBeforeUnmount, onMounted, onUpdated, reactive, markRaw }, { parent, vm, nextTick, refs, mode: tinyMode, emit }) => {
|
|
39
43
|
const api2 = { mounted, beforeUnmount, computedNavStyle, computedSizeName };
|
|
40
44
|
const state = reactive({
|
|
41
45
|
navOffset: 0,
|
|
@@ -68,7 +72,11 @@ const renderless = (props, { computed, inject, onBeforeUnmount, onMounted, onUpd
|
|
|
68
72
|
visibilityChangeHandler: visibilityChangeHandler(state),
|
|
69
73
|
scrollToActiveTab: scrollToActiveTab({ props, parent, refs, state }),
|
|
70
74
|
scrollIntoView: scrollIntoView({ props, parent, refs, state }),
|
|
71
|
-
computedHeaderStyle: computedHeaderStyle({ refs, state })
|
|
75
|
+
computedHeaderStyle: computedHeaderStyle({ refs, state }),
|
|
76
|
+
watchCurrentName: watchCurrentName({ nextTick, vm, state }),
|
|
77
|
+
handleTabDragStart: handleTabDragStart({ state, vm, emit }),
|
|
78
|
+
handleTabDragEnd: handleTabDragEnd({ state, vm, nextTick }),
|
|
79
|
+
sortableEvent: sortableEvent({ api: api2, props, state, vm, emit, markRaw })
|
|
72
80
|
});
|
|
73
81
|
Object.assign(api2, { updated: updated({ api: api2, props, refs, state }), changeTab: changeTab(api2) });
|
|
74
82
|
onUpdated(() => api2.updated());
|
package/tabbar-item/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { isObject, isNull } from "
|
|
2
|
+
import { isObject, isNull } from "../common/type";
|
|
3
3
|
const getRouteActive = ({ props, route }) => () => {
|
|
4
4
|
if (props.to && route) {
|
|
5
5
|
const config = isObject(props.to) ? props.to : { path: props.to };
|