@opentiny/vue-renderless 3.12.0 → 3.13.0-alpha.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/alert/index.js +50 -1
- package/alert/vue.js +36 -9
- 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 +20 -6
- package/calendar-view/index.js +10 -12
- package/calendar-view/vue.js +17 -4
- package/cascader/index.js +80 -34
- package/cascader/vue.js +49 -19
- package/cascader-menu/index.js +7 -7
- package/cascader-menu/vue.js +2 -3
- package/cascader-mobile/index.js +37 -24
- package/cascader-mobile/vue.js +7 -1
- 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/cascader-view/index.js +1 -1
- 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 +17 -0
- package/checkbox/vue.js +16 -7
- package/checkbox-group/vue.js +2 -0
- package/col/index.js +7 -2
- 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 +2 -0
- package/common/deps/dom.js +19 -4
- package/common/deps/popper.js +48 -5
- package/common/deps/touch-emulator.js +4 -1
- package/common/deps/tree-model/node.js +1 -1
- package/common/deps/tree-model/tree-store.js +2 -13
- package/common/deps/useRect.js +25 -0
- package/common/deps/vue-popper.js +22 -10
- package/common/index.js +1 -1
- package/common/runtime.js +1 -1
- 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/container/index.js +17 -1
- package/container/vue.js +12 -3
- 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 +12 -5
- package/date-table/index.js +5 -0
- package/date-table/vue.js +3 -1
- package/dialog-box/index.js +17 -6
- package/dialog-select/index.js +6 -3
- package/dialog-select/vue.js +8 -4
- package/drawer/index.js +26 -5
- package/drawer/vue.js +13 -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 +21 -8
- 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 +47 -12
- package/file-upload/vue.js +38 -8
- package/filter-box/index.js +1 -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 +3 -1
- package/form-item/index.js +4 -4
- package/form-item/vue.js +3 -1
- package/fullscreen/index.js +5 -5
- package/fullscreen/vue.js +3 -3
- package/grid/utils/common.js +10 -5
- package/grid/utils/dom.js +7 -1
- package/image/index.js +6 -0
- package/image/vue.js +6 -3
- package/image-viewer/index.js +62 -51
- package/image-viewer/vue.js +17 -5
- package/input/index.js +89 -22
- package/input/vue.js +52 -21
- package/ip-address/index.js +61 -19
- package/ip-address/vue.js +22 -4
- package/label/index.js +56 -0
- package/label/vue.js +26 -0
- package/link/vue.js +3 -1
- package/loading/vue.js +8 -2
- package/logout/index.js +1 -1
- package/mask/index.js +13 -0
- package/mask/vue.js +18 -0
- package/mind-map/index.js +47 -0
- package/mind-map/vue.js +53 -0
- package/multi-select/index.js +150 -10
- package/multi-select/vue.js +46 -11
- package/multi-select-item/index.js +17 -0
- package/multi-select-item/vue.js +31 -0
- package/numeric/index.js +51 -9
- package/numeric/vue.js +44 -14
- package/option/index.js +12 -5
- package/option/vue.js +15 -7
- package/option-group/index.js +3 -3
- package/package.json +1 -1
- package/pager/index.js +372 -0
- package/pager/vue.js +125 -2
- package/picker/index.js +253 -48
- package/picker/mb.js +42 -0
- package/picker/vue.js +70 -17
- package/picker-column/index.js +1 -1
- package/pop-upload/index.js +0 -2
- package/pop-upload/vue.js +3 -4
- package/popconfirm/index.js +3 -6
- package/popconfirm/vue.js +1 -1
- package/popeditor/index.js +55 -24
- 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 +57 -65
- package/pull-refresh/vue.js +23 -7
- 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-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 +1 -1
- package/search/vue.js +3 -1
- package/select/index.js +185 -113
- package/select/vue.js +105 -20
- package/select-dropdown/index.js +62 -4
- package/select-dropdown/vue.js +85 -8
- package/select-view/index.js +3 -1
- 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 +27 -7
- package/slider/vue.js +26 -7
- package/split/index.js +1 -1
- 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 +9 -4
- package/tab-nav/vue.js +6 -2
- package/tabbar/vue.js +9 -3
- package/tabbar-item/vue.js +3 -2
- package/tabs/index.js +1 -1
- package/tabs/vue.js +1 -0
- package/tabs-mf/index.js +20 -6
- package/tabs-mf/vue-nav.js +26 -11
- package/tabs-mf/vue.js +7 -7
- package/tag/index.js +1 -1
- package/tag/vue.js +5 -1
- package/tag-group/index.js +2 -1
- package/tall-storage/index.js +4 -5
- package/time/index.js +4 -1
- package/time/vue.js +1 -1
- package/time-line/vue.js +1 -1
- package/time-picker-mobile/index.js +24 -5
- package/time-picker-mobile/vue.js +17 -7
- package/time-range/index.js +2 -0
- package/time-spinner/index.js +0 -3
- package/time-spinner/vue.js +2 -3
- package/timeline-item/vue.js +1 -1
- package/tooltip/index.js +1 -2
- package/tooltip/vue.js +3 -3
- 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 +27 -3
- package/tree-menu/vue.js +27 -14
- package/tree-node/index.js +12 -10
- package/tree-node/vue.js +6 -5
- package/types/action-menu.type.d.ts +5 -0
- package/types/action-sheet.type.d.ts +118 -1
- package/types/alert.type.d.ts +16 -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.type.d.ts +5 -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 +327 -1
- package/types/checkbox.type.d.ts +9 -0
- package/types/collapse.type.d.ts +19 -2
- package/types/date-picker.type.d.ts +33 -0
- package/types/dialog-box.type.d.ts +5 -1
- package/types/drawer.type.d.ts +132 -1
- package/types/{dropdown-item.type-bf83e929.d.ts → dropdown-item.type-8475a549.d.ts} +8 -14
- package/types/dropdown-item.type.d.ts +1 -1
- package/types/dropdown-menu.type.d.ts +1 -1
- package/types/dropdown.type.d.ts +2 -5
- package/types/fall-menu.type.d.ts +94 -1
- package/types/file-upload.type.d.ts +1 -1
- package/types/form-item.type.d.ts +1 -1
- package/types/{form.type-d0fd42f3.d.ts → form.type-d88482e4.d.ts} +3 -0
- package/types/form.type.d.ts +1 -1
- package/types/input.type.d.ts +23 -9
- package/types/ip-address.type.d.ts +160 -1
- package/types/label.type.d.ts +81 -0
- package/types/link.type.d.ts +6 -3
- package/types/mind-map.type.d.ts +20 -0
- package/types/modal.type.d.ts +4 -2
- package/types/numeric.type.d.ts +36 -9
- package/types/pager.type.d.ts +171 -1
- package/types/picker.type.d.ts +14 -0
- package/types/popconfirm.type.d.ts +85 -1
- package/types/popeditor.type.d.ts +4 -0
- package/types/popover.type.d.ts +3 -3
- 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 +8 -1
- package/types/steps.type.d.ts +14 -3
- package/types/tab-item.type.d.ts +0 -1
- package/types/tab-nav.type.d.ts +6 -1
- package/types/tabs.type.d.ts +5 -0
- package/types/tag-group.type.d.ts +64 -1
- package/types/tag.type.d.ts +12 -0
- package/types/tooltip.type.d.ts +1 -1
- package/types/transfer.type.d.ts +183 -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-1078fba2.d.ts} +27 -6
- package/types/upload-list.type.d.ts +1 -1
- package/types/upload.type.d.ts +1 -1
- package/types/wizard.type.d.ts +1 -0
- package/upload/index.js +59 -29
- package/upload/vue.js +6 -4
- package/upload-list/index.js +14 -14
- package/upload-list/vue.js +5 -2
- package/user/index.js +5 -4
- package/user-head/index.js +1 -1
- package/wheel/index.js +3 -0
- package/wizard/vue.js +4 -2
package/area/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
const fetchDefaultData = ({ emit, fetchArea, nextTick, props,
|
|
2
|
+
const fetchDefaultData = ({ emit, fetchArea, nextTick, props, vm, state }) => () => {
|
|
3
3
|
let parent = "";
|
|
4
4
|
nextTick(() => {
|
|
5
|
-
emit("change-jcr", parent, refs.refInstance.$parent);
|
|
5
|
+
emit("change-jcr", parent, vm.$refs.refInstance.$parent);
|
|
6
6
|
});
|
|
7
7
|
let promise;
|
|
8
8
|
if (props.fetchJcr) {
|
|
@@ -20,10 +20,10 @@ const fetchDefaultData = ({ emit, fetchArea, nextTick, props, refs, state }) =>
|
|
|
20
20
|
state.office = "";
|
|
21
21
|
emit("update:modelValue", [state.jcr, state.region, state.rep, state.office]);
|
|
22
22
|
};
|
|
23
|
-
const getRegion = ({ emit, fetchArea, nextTick, props,
|
|
23
|
+
const getRegion = ({ emit, fetchArea, nextTick, props, vm, state }) => (value) => {
|
|
24
24
|
state.jcr = value;
|
|
25
25
|
nextTick(() => {
|
|
26
|
-
emit("change-region", value, refs.refInstance.$parent);
|
|
26
|
+
emit("change-region", value, vm.$refs.refInstance.$parent);
|
|
27
27
|
});
|
|
28
28
|
let promise;
|
|
29
29
|
if (props.fetchRegion) {
|
|
@@ -40,10 +40,10 @@ const getRegion = ({ emit, fetchArea, nextTick, props, refs, state }) => (value)
|
|
|
40
40
|
state.rep = "";
|
|
41
41
|
emit("update:modelValue", [state.jcr, state.region, state.rep, state.office]);
|
|
42
42
|
};
|
|
43
|
-
const getRep = ({ emit, fetchArea, nextTick, props,
|
|
43
|
+
const getRep = ({ emit, fetchArea, nextTick, props, vm, state }) => (value) => {
|
|
44
44
|
state.region = value;
|
|
45
45
|
nextTick(() => {
|
|
46
|
-
emit("change-rep", value, refs.refInstance.$parent);
|
|
46
|
+
emit("change-rep", value, vm.$refs.refInstance.$parent);
|
|
47
47
|
});
|
|
48
48
|
let promise;
|
|
49
49
|
if (props.fetchRep) {
|
|
@@ -59,10 +59,10 @@ const getRep = ({ emit, fetchArea, nextTick, props, refs, state }) => (value) =>
|
|
|
59
59
|
state.rep = "";
|
|
60
60
|
emit("update:modelValue", [state.jcr, state.region, state.rep, state.office]);
|
|
61
61
|
};
|
|
62
|
-
const getOffice = ({ emit, fetchArea, nextTick, props,
|
|
62
|
+
const getOffice = ({ emit, fetchArea, nextTick, props, vm, state }) => (value) => {
|
|
63
63
|
state.rep = value;
|
|
64
64
|
nextTick(() => {
|
|
65
|
-
emit("change-office", value, refs.refInstance.$parent);
|
|
65
|
+
emit("change-office", value, vm.$refs.refInstance.$parent);
|
|
66
66
|
});
|
|
67
67
|
let promise;
|
|
68
68
|
if (props.fetchOffice) {
|
package/area/vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { getRegion, changeOffice, getRep, getOffice, fetchDefaultData, beforeMount } from "./index";
|
|
3
3
|
const api = ["state", "getRep", "getRegion", "getOffice", "changeOffice"];
|
|
4
|
-
const renderless = (props, { onBeforeMount, reactive }, { emit, service,
|
|
4
|
+
const renderless = (props, { onBeforeMount, reactive }, { emit, service, vm, nextTick }) => {
|
|
5
5
|
const api2 = {};
|
|
6
6
|
const { fetchArea } = service || {};
|
|
7
7
|
const state = reactive({
|
|
@@ -18,10 +18,10 @@ const renderless = (props, { onBeforeMount, reactive }, { emit, service, refs, n
|
|
|
18
18
|
state,
|
|
19
19
|
changeOffice: changeOffice({ emit, state }),
|
|
20
20
|
beforeMount: beforeMount({ api: api2, props }),
|
|
21
|
-
getRep: getRep({ emit, fetchArea, nextTick, props,
|
|
22
|
-
getRegion: getRegion({ emit, fetchArea, nextTick, props,
|
|
23
|
-
getOffice: getOffice({ emit, fetchArea, nextTick, props,
|
|
24
|
-
fetchDefaultData: fetchDefaultData({ emit, fetchArea, nextTick, props,
|
|
21
|
+
getRep: getRep({ emit, fetchArea, nextTick, props, vm, state }),
|
|
22
|
+
getRegion: getRegion({ emit, fetchArea, nextTick, props, vm, state }),
|
|
23
|
+
getOffice: getOffice({ emit, fetchArea, nextTick, props, vm, state }),
|
|
24
|
+
fetchDefaultData: fetchDefaultData({ emit, fetchArea, nextTick, props, vm, state })
|
|
25
25
|
});
|
|
26
26
|
onBeforeMount(api2.beforeMount);
|
|
27
27
|
return api2;
|
package/async-flowchart/index.js
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import ResizeObserver from "../common/deps/ResizeObserver";
|
|
3
|
-
const observeContainerSize = ({
|
|
3
|
+
const observeContainerSize = ({
|
|
4
|
+
nextTick,
|
|
5
|
+
vm,
|
|
6
|
+
state
|
|
7
|
+
}) => () => {
|
|
4
8
|
nextTick(() => {
|
|
5
9
|
const observedElement = vm.$el;
|
|
6
10
|
if (observedElement) {
|
|
7
11
|
state.temporary.observer = new ResizeObserver(() => {
|
|
8
12
|
window.requestAnimationFrame(() => {
|
|
13
|
+
var _a;
|
|
9
14
|
if (vm.$refs.chart) {
|
|
10
15
|
vm.$refs.chart.refresh({
|
|
11
16
|
graphWidth: observedElement.offsetWidth,
|
|
12
|
-
adjustX: -state.config.nodeWrapperSize / 2
|
|
17
|
+
adjustX: -(((_a = state == null ? void 0 : state.config) == null ? void 0 : _a.nodeWrapperSize) || 0) / 2
|
|
13
18
|
});
|
|
14
19
|
}
|
|
15
20
|
});
|
|
@@ -27,7 +32,15 @@ const unobserveContainerSize = (state) => () => {
|
|
|
27
32
|
state.temporary.observed = null;
|
|
28
33
|
}
|
|
29
34
|
};
|
|
30
|
-
const fetchData = ({
|
|
35
|
+
const fetchData = ({
|
|
36
|
+
Loading,
|
|
37
|
+
props,
|
|
38
|
+
state,
|
|
39
|
+
vm,
|
|
40
|
+
markRaw,
|
|
41
|
+
api,
|
|
42
|
+
nextTick
|
|
43
|
+
}) => () => {
|
|
31
44
|
if (typeof props.fetch === "function") {
|
|
32
45
|
api.unobserveContainerSize();
|
|
33
46
|
state.loading = true;
|
package/autocomplete/index.js
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
const getData = ({
|
|
2
|
+
const getData = ({
|
|
3
|
+
props,
|
|
4
|
+
state,
|
|
5
|
+
updatePopper,
|
|
6
|
+
nextTick
|
|
7
|
+
}) => (queryString) => {
|
|
8
|
+
var _a;
|
|
3
9
|
if (state.suggestionDisabled) {
|
|
4
10
|
return;
|
|
5
11
|
}
|
|
6
12
|
state.loading = true;
|
|
7
|
-
props.fetchSuggestions(queryString, (suggestions) => {
|
|
13
|
+
(_a = props == null ? void 0 : props.fetchSuggestions) == null ? void 0 : _a.call(props, queryString, (suggestions) => {
|
|
8
14
|
state.loading = false;
|
|
9
15
|
if (state.suggestionDisabled) {
|
|
10
16
|
return;
|
|
@@ -18,7 +24,12 @@ const getData = ({ props, state, updatePopper, nextTick }) => (queryString) => {
|
|
|
18
24
|
nextTick(updatePopper);
|
|
19
25
|
});
|
|
20
26
|
};
|
|
21
|
-
const handleChange = ({
|
|
27
|
+
const handleChange = ({
|
|
28
|
+
api,
|
|
29
|
+
emit,
|
|
30
|
+
state,
|
|
31
|
+
props
|
|
32
|
+
}) => (value) => {
|
|
22
33
|
state.activated = true;
|
|
23
34
|
emit("update:modelValue", value);
|
|
24
35
|
state.suggestionDisabled = false;
|
|
@@ -29,10 +40,17 @@ const handleChange = ({ api, emit, state, props }) => (value) => {
|
|
|
29
40
|
}
|
|
30
41
|
api.debouncedGetData(value);
|
|
31
42
|
};
|
|
32
|
-
const handleFocus = ({
|
|
43
|
+
const handleFocus = ({
|
|
44
|
+
api,
|
|
45
|
+
emit,
|
|
46
|
+
props,
|
|
47
|
+
state
|
|
48
|
+
}) => (event) => {
|
|
33
49
|
state.activated = true;
|
|
34
50
|
emit("focus", event);
|
|
35
51
|
if (props.triggerOnFocus) {
|
|
52
|
+
state.suggestions = [];
|
|
53
|
+
state.highlightedIndex = -1;
|
|
36
54
|
state.suggestionDisabled = false;
|
|
37
55
|
api.debouncedGetData(props.modelValue);
|
|
38
56
|
}
|
|
@@ -48,7 +66,16 @@ const handleClear = ({ emit, state }) => () => {
|
|
|
48
66
|
const close = (state) => () => {
|
|
49
67
|
state.activated = false;
|
|
50
68
|
};
|
|
51
|
-
const
|
|
69
|
+
const open = (api) => () => {
|
|
70
|
+
api.handleFocus();
|
|
71
|
+
};
|
|
72
|
+
const handleKeyEnter = ({
|
|
73
|
+
api,
|
|
74
|
+
emit,
|
|
75
|
+
nextTick,
|
|
76
|
+
props,
|
|
77
|
+
state
|
|
78
|
+
}) => (event) => {
|
|
52
79
|
if (state.suggestionVisible && state.highlightedIndex >= 0 && state.highlightedIndex < state.suggestions.length) {
|
|
53
80
|
event.preventDefault();
|
|
54
81
|
api.select(state.suggestions[state.highlightedIndex]);
|
|
@@ -60,7 +87,12 @@ const handleKeyEnter = ({ api, emit, nextTick, props, state }) => (event) => {
|
|
|
60
87
|
});
|
|
61
88
|
}
|
|
62
89
|
};
|
|
63
|
-
const select = ({
|
|
90
|
+
const select = ({
|
|
91
|
+
emit,
|
|
92
|
+
nextTick,
|
|
93
|
+
props,
|
|
94
|
+
state
|
|
95
|
+
}) => (item) => {
|
|
64
96
|
emit("update:modelValue", item[props.valueKey]);
|
|
65
97
|
emit("select", item);
|
|
66
98
|
nextTick(() => {
|
|
@@ -69,7 +101,11 @@ const select = ({ emit, nextTick, props, state }) => (item) => {
|
|
|
69
101
|
state.highlightedIndex = -1;
|
|
70
102
|
});
|
|
71
103
|
};
|
|
72
|
-
const highlight = ({
|
|
104
|
+
const highlight = ({
|
|
105
|
+
constants,
|
|
106
|
+
vm,
|
|
107
|
+
state
|
|
108
|
+
}) => (index) => {
|
|
73
109
|
if (!state.suggestionVisible || state.loading) {
|
|
74
110
|
return;
|
|
75
111
|
}
|
|
@@ -80,7 +116,7 @@ const highlight = ({ constants, refs, state }) => (index) => {
|
|
|
80
116
|
if (index >= state.suggestions.length) {
|
|
81
117
|
index = state.suggestions.length - 1;
|
|
82
118
|
}
|
|
83
|
-
const suggestion = refs.popper.querySelector(constants.WARP_CLS);
|
|
119
|
+
const suggestion = vm.$refs.popper.querySelector(constants.WARP_CLS);
|
|
84
120
|
const suggestionList = suggestion.querySelectorAll(constants.ITEM_CLS);
|
|
85
121
|
let highlightItem = suggestionList[index];
|
|
86
122
|
let scrollTop = suggestion.scrollTop;
|
|
@@ -92,7 +128,7 @@ const highlight = ({ constants, refs, state }) => (index) => {
|
|
|
92
128
|
suggestion.scrollTop -= highlightItem.scrollHeight;
|
|
93
129
|
}
|
|
94
130
|
state.highlightedIndex = index;
|
|
95
|
-
let $input = refs.input.getInput();
|
|
131
|
+
let $input = vm.$refs.input.getInput();
|
|
96
132
|
$input.setAttribute("aria-activedescendant", `${state.id}-item-${state.highlightedIndex}`);
|
|
97
133
|
};
|
|
98
134
|
const computedVisible = (state) => {
|
|
@@ -100,17 +136,24 @@ const computedVisible = (state) => {
|
|
|
100
136
|
let isValidData = Array.isArray(suggestions) && suggestions.length > 0;
|
|
101
137
|
return (isValidData || state.loading) && state.activated;
|
|
102
138
|
};
|
|
103
|
-
const watchVisible = ({
|
|
104
|
-
|
|
139
|
+
const watchVisible = ({
|
|
140
|
+
suggestionState,
|
|
141
|
+
vm
|
|
142
|
+
}) => (val) => {
|
|
143
|
+
let $input = vm.$refs.input.getInput();
|
|
105
144
|
if ($input) {
|
|
106
145
|
suggestionState.dropdownWidth = $input.offsetWidth + "px";
|
|
107
146
|
suggestionState.showPopper = val;
|
|
108
147
|
}
|
|
109
148
|
};
|
|
110
|
-
const mounted = ({
|
|
111
|
-
|
|
149
|
+
const mounted = ({
|
|
150
|
+
vm,
|
|
151
|
+
state,
|
|
152
|
+
suggestionState
|
|
153
|
+
}) => () => {
|
|
154
|
+
const input = vm.$refs.input;
|
|
112
155
|
const $input = input.getInput();
|
|
113
|
-
suggestionState.popperElm = refs.popper;
|
|
156
|
+
suggestionState.popperElm = state.popperElm = vm.$refs.popper;
|
|
114
157
|
suggestionState.referenceElm = $input;
|
|
115
158
|
$input.setAttribute("role", "textbox");
|
|
116
159
|
$input.setAttribute("aria-autocomplete", "list");
|
|
@@ -128,6 +171,7 @@ export {
|
|
|
128
171
|
handleKeyEnter,
|
|
129
172
|
highlight,
|
|
130
173
|
mounted,
|
|
174
|
+
open,
|
|
131
175
|
select,
|
|
132
176
|
watchVisible
|
|
133
177
|
};
|
package/autocomplete/vue.js
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
handleBlur,
|
|
13
13
|
handleClear,
|
|
14
14
|
close,
|
|
15
|
+
open,
|
|
15
16
|
handleKeyEnter,
|
|
16
17
|
select,
|
|
17
18
|
highlight
|
|
@@ -23,6 +24,7 @@ const api = [
|
|
|
23
24
|
"getInput",
|
|
24
25
|
"handleChange",
|
|
25
26
|
"close",
|
|
27
|
+
"open",
|
|
26
28
|
"handleFocus",
|
|
27
29
|
"handleBlur",
|
|
28
30
|
"handleClear",
|
|
@@ -31,8 +33,15 @@ const api = [
|
|
|
31
33
|
"select",
|
|
32
34
|
"doDestroy"
|
|
33
35
|
];
|
|
34
|
-
const initState = ({
|
|
36
|
+
const initState = ({
|
|
37
|
+
reactive,
|
|
38
|
+
$prefix,
|
|
39
|
+
computed,
|
|
40
|
+
inject
|
|
41
|
+
}) => {
|
|
35
42
|
const state = reactive({
|
|
43
|
+
showAutoWidth: inject("showAutoWidth", null),
|
|
44
|
+
popperElm: null,
|
|
36
45
|
activated: false,
|
|
37
46
|
suggestions: [],
|
|
38
47
|
loading: false,
|
|
@@ -43,39 +52,57 @@ const initState = ({ reactive, $prefix, computed }) => {
|
|
|
43
52
|
});
|
|
44
53
|
return state;
|
|
45
54
|
};
|
|
46
|
-
const initSuggestionState = ({
|
|
55
|
+
const initSuggestionState = ({
|
|
56
|
+
reactive,
|
|
47
57
|
parent,
|
|
48
|
-
dropdownWidth: "",
|
|
49
58
|
showPopper,
|
|
50
59
|
popperElm,
|
|
51
60
|
referenceElm
|
|
52
|
-
})
|
|
53
|
-
|
|
61
|
+
}) => {
|
|
62
|
+
return reactive({
|
|
63
|
+
parent,
|
|
64
|
+
dropdownWidth: "",
|
|
65
|
+
showPopper,
|
|
66
|
+
popperElm,
|
|
67
|
+
referenceElm
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
const initApi = ({ api: api2, state, doDestroy, suggestionState, emit, vm, props, updatePopper, nextTick, constants }) => {
|
|
54
71
|
api2.getData = getData({ props, state, updatePopper, nextTick });
|
|
55
72
|
Object.assign(api2, {
|
|
56
73
|
state,
|
|
57
74
|
doDestroy,
|
|
58
75
|
suggestionState,
|
|
59
76
|
close: close(state),
|
|
77
|
+
open: open(api2),
|
|
60
78
|
handleBlur: handleBlur({ emit, state }),
|
|
61
|
-
mounted: mounted({
|
|
62
|
-
highlight: highlight({ constants,
|
|
79
|
+
mounted: mounted({ vm, state, suggestionState }),
|
|
80
|
+
highlight: highlight({ constants, vm, state }),
|
|
63
81
|
handleClear: handleClear({ emit, state }),
|
|
64
82
|
select: select({ emit, nextTick, props, state }),
|
|
65
|
-
watchVisible: watchVisible({ suggestionState,
|
|
83
|
+
watchVisible: watchVisible({ suggestionState, vm }),
|
|
66
84
|
handleChange: handleChange({ api: api2, emit, state, props }),
|
|
67
85
|
handleFocus: handleFocus({ api: api2, emit, props, state }),
|
|
68
86
|
handleKeyEnter: handleKeyEnter({ api: api2, emit, nextTick, props, state }),
|
|
69
87
|
debouncedGetData: debounce(props.debounce, api2.getData)
|
|
70
88
|
});
|
|
71
89
|
};
|
|
72
|
-
const renderless = (props, {
|
|
90
|
+
const renderless = (props, {
|
|
91
|
+
computed,
|
|
92
|
+
onBeforeUnmount,
|
|
93
|
+
onMounted,
|
|
94
|
+
reactive,
|
|
95
|
+
watch,
|
|
96
|
+
toRefs,
|
|
97
|
+
onDeactivated,
|
|
98
|
+
inject
|
|
99
|
+
}, { $prefix, vm, parent, emit, constants, nextTick, slots }) => {
|
|
73
100
|
const api2 = {};
|
|
74
|
-
const state = initState({ reactive, $prefix, computed });
|
|
101
|
+
const state = initState({ reactive, $prefix, computed, inject });
|
|
75
102
|
const { showPopper, popperElm, referenceElm, doDestroy, updatePopper } = userPopper({
|
|
76
103
|
reactive,
|
|
77
104
|
watch,
|
|
78
|
-
|
|
105
|
+
vm,
|
|
79
106
|
emit,
|
|
80
107
|
slots,
|
|
81
108
|
nextTick,
|
|
@@ -85,12 +112,13 @@ const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, wat
|
|
|
85
112
|
onDeactivated
|
|
86
113
|
});
|
|
87
114
|
const suggestionState = initSuggestionState({ reactive, parent, showPopper, popperElm, referenceElm });
|
|
88
|
-
initApi({ api: api2, state, doDestroy, suggestionState, emit,
|
|
115
|
+
initApi({ api: api2, state, doDestroy, suggestionState, emit, vm, props, updatePopper, nextTick, constants });
|
|
89
116
|
watch(() => state.suggestionVisible, api2.watchVisible);
|
|
90
117
|
onMounted(api2.mounted);
|
|
91
118
|
return api2;
|
|
92
119
|
};
|
|
93
120
|
export {
|
|
94
121
|
api,
|
|
122
|
+
initSuggestionState,
|
|
95
123
|
renderless
|
|
96
124
|
};
|
package/badge/index.js
CHANGED
|
@@ -6,7 +6,19 @@ const computedValueRef = ({ props }) => () => {
|
|
|
6
6
|
}
|
|
7
7
|
return typeof props.modelValue === "number" ? props.modelValue : void 0;
|
|
8
8
|
};
|
|
9
|
+
const computedTransform = ({ designConfig, props }) => () => {
|
|
10
|
+
if ((designConfig == null ? void 0 : designConfig.transform) === "unset") {
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
return {
|
|
14
|
+
transform: `translate(
|
|
15
|
+
${props.offset[0]}${typeof props.offset[0] === "number" ? "px" : ""},
|
|
16
|
+
${props.offset[1]}${typeof props.offset[1] === "number" ? "px" : ""}
|
|
17
|
+
)`
|
|
18
|
+
};
|
|
19
|
+
};
|
|
9
20
|
export {
|
|
10
21
|
computedContent,
|
|
22
|
+
computedTransform,
|
|
11
23
|
computedValueRef
|
|
12
24
|
};
|
package/badge/vue.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import { computedContent, computedValueRef } from "./index";
|
|
2
|
+
import { computedContent, computedValueRef, computedTransform } from "./index";
|
|
3
3
|
import { xss } from "../common/xss";
|
|
4
4
|
const api = ["state"];
|
|
5
|
-
const renderless = (props, { computed, reactive }) => {
|
|
5
|
+
const renderless = (props, { computed, reactive }, { designConfig }) => {
|
|
6
6
|
const state = reactive({
|
|
7
7
|
isOverstep: false,
|
|
8
8
|
valueRef: computed(() => api2.computedValueRef()),
|
|
9
9
|
content: computed(() => api2.computedContent()),
|
|
10
|
-
href: computed(() => xss.filterUrl(props.href))
|
|
10
|
+
href: computed(() => xss.filterUrl(props.href)),
|
|
11
|
+
transform: computed(() => api2.computedTransform())
|
|
11
12
|
});
|
|
12
13
|
const api2 = {
|
|
13
14
|
state,
|
|
14
15
|
computedValueRef: computedValueRef({ props }),
|
|
15
|
-
computedContent: computedContent({ props, state })
|
|
16
|
+
computedContent: computedContent({ props, state }),
|
|
17
|
+
computedTransform: computedTransform({ props, designConfig })
|
|
16
18
|
};
|
|
17
19
|
return api2;
|
|
18
20
|
};
|
package/breadcrumb/vue.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { breadcrumbItemSelect } from "./index";
|
|
3
|
-
const api = ["breadcrumbItemSelect"];
|
|
3
|
+
const api = ["breadcrumbItemSelect", "state"];
|
|
4
4
|
const renderless = (props, { reactive, provide }, { emit, constants, emitter }) => {
|
|
5
5
|
const state = reactive({
|
|
6
6
|
breadcrumbEmitter: emitter(),
|
|
7
|
+
size: props.size,
|
|
7
8
|
currentBreadcrumbItem: {}
|
|
8
9
|
});
|
|
9
10
|
const api2 = {
|
|
10
11
|
state,
|
|
11
12
|
breadcrumbItemSelect: () => breadcrumbItemSelect({ api: api2, emit, state, constants })
|
|
12
13
|
};
|
|
14
|
+
provide("size", state.size);
|
|
13
15
|
provide("breadcrumbEmitter", state.breadcrumbEmitter);
|
|
14
16
|
api2.breadcrumbItemSelect();
|
|
15
17
|
return api2;
|
package/breadcrumb-item/vue.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { linkClick } from "./index";
|
|
3
|
-
const api = ["linkClick"];
|
|
4
|
-
const renderless = (props, { inject }, { refs, router, emit }) => {
|
|
3
|
+
const api = ["linkClick", "state"];
|
|
4
|
+
const renderless = (props, { reactive, inject }, { refs, router, emit }) => {
|
|
5
5
|
const breadcrumbEmitter = inject("breadcrumbEmitter");
|
|
6
6
|
const breadcrumb = inject("breadcrumb");
|
|
7
7
|
const constants = breadcrumb._constants;
|
|
8
|
+
const state = reactive({
|
|
9
|
+
size: inject("size", null)
|
|
10
|
+
});
|
|
8
11
|
const api2 = {
|
|
12
|
+
state,
|
|
9
13
|
linkClick: linkClick({ props, refs, router, emit, breadcrumbEmitter, constants })
|
|
10
14
|
};
|
|
11
15
|
return api2;
|
package/button/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
+
import { xss } from "../common";
|
|
2
3
|
const handleClick = ({ emit, props, state }) => (event) => {
|
|
3
|
-
|
|
4
|
+
const urlHref = xss.filterUrl(props.href);
|
|
5
|
+
if (urlHref) {
|
|
6
|
+
location.href = urlHref;
|
|
7
|
+
} else if (props.nativeType === "button" && props.resetTime > 0) {
|
|
4
8
|
state.disabled = true;
|
|
5
9
|
state.timer = window.setTimeout(() => {
|
|
6
10
|
state.disabled = false;
|
package/calendar/index.js
CHANGED
|
@@ -1,83 +1,6 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
|
-
import { isLeapYear } from "../common/date";
|
|
3
2
|
import { copyArray } from "../common/object";
|
|
4
|
-
|
|
5
|
-
const getWeek = (year, month, day) => (/* @__PURE__ */ new Date(`${year}/${month}/${day}`)).getDay();
|
|
6
|
-
const lastMonth = (year, month) => {
|
|
7
|
-
year = Number(year);
|
|
8
|
-
month = Number(month);
|
|
9
|
-
if (month === 1) {
|
|
10
|
-
year--;
|
|
11
|
-
month = 12;
|
|
12
|
-
} else {
|
|
13
|
-
month--;
|
|
14
|
-
}
|
|
15
|
-
return { year, month };
|
|
16
|
-
};
|
|
17
|
-
const nextMonth = (year, month) => {
|
|
18
|
-
year = Number(year);
|
|
19
|
-
month = Number(month);
|
|
20
|
-
if (month === 12) {
|
|
21
|
-
year++;
|
|
22
|
-
month = 1;
|
|
23
|
-
} else {
|
|
24
|
-
month++;
|
|
25
|
-
}
|
|
26
|
-
return { year, month };
|
|
27
|
-
};
|
|
28
|
-
const getCalendar = (year, month) => {
|
|
29
|
-
if (year && month && month <= 12) {
|
|
30
|
-
const days = getDays(year, month);
|
|
31
|
-
const firstWeek = getWeek(year, month, 1);
|
|
32
|
-
const lastWeek = getWeek(year, month, days);
|
|
33
|
-
const last = lastMonth(year, month);
|
|
34
|
-
const lastDays = getDays(last.year, last.month);
|
|
35
|
-
let remainDays = 0;
|
|
36
|
-
const totalDays = days + firstWeek + 7 - lastWeek - 1;
|
|
37
|
-
if (totalDays / 7 < 6 && totalDays / 7 >= 5) {
|
|
38
|
-
remainDays = 6 * 7 - totalDays;
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
last: {
|
|
42
|
-
start: lastDays - (firstWeek - 1),
|
|
43
|
-
end: lastDays
|
|
44
|
-
},
|
|
45
|
-
current: {
|
|
46
|
-
start: 1,
|
|
47
|
-
end: days
|
|
48
|
-
},
|
|
49
|
-
next: {
|
|
50
|
-
start: 1,
|
|
51
|
-
end: 7 - lastWeek - 1 + remainDays
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
const transformArray = (array) => {
|
|
57
|
-
const result = [];
|
|
58
|
-
let index = 0;
|
|
59
|
-
if (array && array.length) {
|
|
60
|
-
const length = array.length / 7;
|
|
61
|
-
for (let i = 0; i < length; i++) {
|
|
62
|
-
result[i] = [];
|
|
63
|
-
for (let j = 0; j < 7; j++) {
|
|
64
|
-
result[i][j] = array[index++];
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return result;
|
|
69
|
-
};
|
|
70
|
-
const parseDate = (time) => {
|
|
71
|
-
const date = new Date(time && typeof time === "number" ? time : 0);
|
|
72
|
-
return {
|
|
73
|
-
year: date.getFullYear(),
|
|
74
|
-
month: date.getMonth() + 1,
|
|
75
|
-
day: date.getDate(),
|
|
76
|
-
hours: date.getHours(),
|
|
77
|
-
minutes: date.getMinutes(),
|
|
78
|
-
seconds: date.getSeconds()
|
|
79
|
-
};
|
|
80
|
-
};
|
|
3
|
+
import { lastMonth, nextMonth, getCalendar, transformArray, parseDate } from "../common/calendar/calendar";
|
|
81
4
|
const computedCalendar = ({ state }) => () => {
|
|
82
5
|
const calendar = getCalendar(state.activeYear, state.activeMonth);
|
|
83
6
|
const result = [];
|
|
@@ -223,22 +146,15 @@ export {
|
|
|
223
146
|
computedCalendar,
|
|
224
147
|
computedEventList,
|
|
225
148
|
genMonths,
|
|
226
|
-
getCalendar,
|
|
227
149
|
getCurrentDate,
|
|
228
|
-
getDays,
|
|
229
150
|
getEventByDay,
|
|
230
151
|
getEventByMonth,
|
|
231
152
|
getTime,
|
|
232
|
-
getWeek,
|
|
233
153
|
getYearList,
|
|
234
154
|
isThisMonth,
|
|
235
155
|
isToday,
|
|
236
|
-
lastMonth,
|
|
237
|
-
nextMonth,
|
|
238
|
-
parseDate,
|
|
239
156
|
selectDay,
|
|
240
157
|
selectMonth,
|
|
241
158
|
toToday,
|
|
242
|
-
toggeModel
|
|
243
|
-
transformArray
|
|
159
|
+
toggeModel
|
|
244
160
|
};
|
package/calendar-bar/index.js
CHANGED
|
@@ -53,7 +53,7 @@ const getBuildDay = (args) => (year, month, date) => {
|
|
|
53
53
|
};
|
|
54
54
|
const getPadCalendarDays = ({ calendarDays, buildDay }) => (flag, count, cur) => {
|
|
55
55
|
const sign = flag === "s" ? -1 : 1;
|
|
56
|
-
Array.from({ length: count }).
|
|
56
|
+
Array.from({ length: count }).forEach((v, i) => {
|
|
57
57
|
const d = new Date(cur.getTime() + (i + 1) * sign * 864e5);
|
|
58
58
|
const year = d.getFullYear();
|
|
59
59
|
const month = d.getMonth() + 1;
|
|
@@ -62,7 +62,7 @@ const getPadCalendarDays = ({ calendarDays, buildDay }) => (flag, count, cur) =>
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
const equalArr = (arr1, arr2) => Array.isArray(arr1) && Array.isArray(arr2) && arr1.join(",") === arr2.join(",");
|
|
65
|
-
const setDayRow = ({ calendarDays, state }) => calendarDays.
|
|
65
|
+
const setDayRow = ({ calendarDays, state }) => calendarDays.forEach((day, i) => {
|
|
66
66
|
day.row = Math.floor(i / state.dayOfWeek);
|
|
67
67
|
if (day.isCur) {
|
|
68
68
|
state.activeRow = day.row;
|
|
@@ -192,7 +192,7 @@ const getWeekOfDate = ({ api }) => (type, date) => {
|
|
|
192
192
|
};
|
|
193
193
|
const showWeekChange = ({ state }) => (value) => {
|
|
194
194
|
if (value) {
|
|
195
|
-
|
|
195
|
+
getWeekDatesByActiveRow(state);
|
|
196
196
|
} else {
|
|
197
197
|
state.calendarDays.forEach((date) => {
|
|
198
198
|
if (state.activeDate === date.dateStr) {
|
|
@@ -207,6 +207,13 @@ const formatDate = (date) => {
|
|
|
207
207
|
const newDate = new Date(date);
|
|
208
208
|
return newDate.getFullYear() + "-" + pad0(newDate.getMonth() + 1) + "-" + pad0(newDate.getDate());
|
|
209
209
|
};
|
|
210
|
+
const getWeekDatesByActiveRow = (state) => {
|
|
211
|
+
state.weekDates = state.calendarDays.filter((day) => day.row === state.activeRow);
|
|
212
|
+
if (!state.weekDates.length) {
|
|
213
|
+
state.activeRow = 0;
|
|
214
|
+
state.weekDates = state.calendarDays.filter((day) => day.row === state.activeRow);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
210
217
|
const computedCurrentRow = (state) => () => {
|
|
211
218
|
const { calendarDays } = state;
|
|
212
219
|
if (Array.isArray(calendarDays) && calendarDays.length) {
|
|
@@ -249,10 +256,17 @@ const handleClickDay = ({ api, emit, props, state }) => (day) => {
|
|
|
249
256
|
api.getCalendarDays(day.dateStr, props.config, "next");
|
|
250
257
|
}
|
|
251
258
|
const showCalendarDays = [...state.calendarDays, ...state.weekDates];
|
|
252
|
-
|
|
259
|
+
state.activeRow = day.row;
|
|
260
|
+
showCalendarDays.forEach((date) => {
|
|
261
|
+
if (day.dateStr === date.dateStr) {
|
|
262
|
+
date.isCur = true;
|
|
263
|
+
state.activeRow = date.row;
|
|
264
|
+
} else {
|
|
265
|
+
date.isCur = false;
|
|
266
|
+
}
|
|
267
|
+
});
|
|
253
268
|
state.activeDate = day.dateStr;
|
|
254
269
|
state.currentDate = day.dateArr[2];
|
|
255
|
-
state.activeRow = day.row;
|
|
256
270
|
emit("update:modelValue", day.dateStr);
|
|
257
271
|
}
|
|
258
272
|
};
|
|
@@ -368,7 +382,7 @@ const handleCascaderChange = ({ api, emit, props, state }) => (val) => {
|
|
|
368
382
|
api.getCalendarDays(dateStr, props.config, "last");
|
|
369
383
|
api.getCalendarDays(dateStr, props.config, "next");
|
|
370
384
|
emit("update:modelValue", dateStr);
|
|
371
|
-
|
|
385
|
+
getWeekDatesByActiveRow(state);
|
|
372
386
|
};
|
|
373
387
|
const computeCascaderOptions = (t) => () => [
|
|
374
388
|
{
|