@opentiny/vue-renderless 3.6.8 → 3.8.2
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/button-group/vue.js +5 -4
- 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 +6 -6
- 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 +4 -3
- package/dropdown-item/index.js +5 -1
- package/dropdown-item/mf.js +79 -0
- package/dropdown-item/vue.js +9 -6
- 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/vue.js +10 -0
- 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 +21 -14
- package/select/vue.js +38 -15
- 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 +3 -3
- package/tab-item/vue.js +4 -3
- 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 +34 -13
- 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
package/image/vue.js
CHANGED
|
@@ -12,11 +12,14 @@ import {
|
|
|
12
12
|
getImageStyle,
|
|
13
13
|
clickHandler,
|
|
14
14
|
closeViewer,
|
|
15
|
-
mounted
|
|
15
|
+
mounted,
|
|
16
|
+
deleteHander
|
|
16
17
|
} from "./index";
|
|
17
|
-
const api = ["state", "src", "zIndex", "previewSrcList", "loadImage", "clickHandler", "closeViewer", "handleLoad", "handleError"];
|
|
18
|
-
const initState = ({ reactive, computed, api: api2, props }) => {
|
|
18
|
+
const api = ["state", "src", "zIndex", "previewSrcList", "loadImage", "clickHandler", "closeViewer", "handleLoad", "handleError", "deleteHander"];
|
|
19
|
+
const initState = ({ reactive, computed, api: api2, props, images }) => {
|
|
19
20
|
const state = reactive({
|
|
21
|
+
mfPreviewVisible: props.previewVisible,
|
|
22
|
+
images,
|
|
20
23
|
error: false,
|
|
21
24
|
loading: true,
|
|
22
25
|
imageWidth: 0,
|
|
@@ -44,7 +47,8 @@ const initApi = ({ api: api2, state, emit, props, vm, constants, nextTick, attrs
|
|
|
44
47
|
handleLazyLoad: handleLazyLoad({ api: api2, state, vm, nextTick }),
|
|
45
48
|
loadImage: loadImage({ api: api2, state, props, attrs }),
|
|
46
49
|
computedGetImageStyle: computedGetImageStyle({ api: api2, props }),
|
|
47
|
-
addLazyLoadListener: addLazyLoadListener({ api: api2, props, state, vm })
|
|
50
|
+
addLazyLoadListener: addLazyLoadListener({ api: api2, props, state, vm }),
|
|
51
|
+
deleteHander: deleteHander(emit)
|
|
48
52
|
});
|
|
49
53
|
};
|
|
50
54
|
const initWatch = ({ watch, state, api: api2, props }) => {
|
|
@@ -57,13 +61,15 @@ const initWatch = ({ watch, state, api: api2, props }) => {
|
|
|
57
61
|
(value) => value && api2.loadImage()
|
|
58
62
|
);
|
|
59
63
|
};
|
|
60
|
-
const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, watch }, { vm, emit, constants, nextTick, attrs }) => {
|
|
64
|
+
const renderless = (props, { computed, onBeforeUnmount, onMounted, reactive, watch, provide }, { vm, emit, constants, nextTick, attrs }, { images }) => {
|
|
61
65
|
const api2 = {};
|
|
62
|
-
const state = initState({ reactive, computed, api: api2, props });
|
|
66
|
+
const state = initState({ reactive, computed, api: api2, props, images });
|
|
63
67
|
initApi({ api: api2, state, emit, props, vm, constants, nextTick, attrs });
|
|
64
68
|
initWatch({ watch, state, api: api2, props });
|
|
65
69
|
onMounted(api2.mounted);
|
|
66
70
|
onBeforeUnmount(() => props.lazy && api2.removeLazyLoadListener());
|
|
71
|
+
provide("mfPreviewVisible", state.mfPreviewVisible);
|
|
72
|
+
provide("urlList", props.previewSrcList);
|
|
67
73
|
return api2;
|
|
68
74
|
};
|
|
69
75
|
export {
|
package/image-viewer/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__spreadValues
|
|
3
3
|
} from "../chunk-PKUHTIDK.js";
|
|
4
|
-
import { on, off } from "
|
|
5
|
-
import { KEY_CODE } from "
|
|
6
|
-
import PopupManager from "
|
|
4
|
+
import { on, off } from "../common/deps/dom";
|
|
5
|
+
import { KEY_CODE } from "../common";
|
|
6
|
+
import PopupManager from "../common/deps/popup-manager";
|
|
7
7
|
const isFirefox = () => !!window.navigator.userAgent.match(/firefox/i);
|
|
8
8
|
const mousewheelEventName = isFirefox() ? "DOMMouseScroll" : "mousewheel";
|
|
9
9
|
const rafThrottle = (fn) => {
|
package/image-viewer/vue.js
CHANGED
|
@@ -47,14 +47,24 @@ const api = [
|
|
|
47
47
|
"swipeRight",
|
|
48
48
|
"handleDelete"
|
|
49
49
|
];
|
|
50
|
-
const initState = ({ reactive, computed, api: api2, mode, props, constants }) => {
|
|
50
|
+
const initState = ({ reactive, computed, api: api2, mode, props, constants, inject }) => {
|
|
51
51
|
const state = reactive({
|
|
52
|
-
|
|
52
|
+
originScale: "",
|
|
53
|
+
moveable: false,
|
|
54
|
+
pageX: "",
|
|
55
|
+
pageY: "",
|
|
56
|
+
pageY2: "",
|
|
57
|
+
pageX2: "",
|
|
58
|
+
mfPreviewVisible: inject("mfPreviewVisible", null),
|
|
59
|
+
scale: 1,
|
|
60
|
+
time: null,
|
|
61
|
+
index: mode === "pc" || mode === "mobile-first" ? 0 : props.startPosition,
|
|
62
|
+
imageName: "",
|
|
53
63
|
isShow: false,
|
|
54
64
|
infinite: true,
|
|
55
65
|
loading: false,
|
|
56
66
|
transform: { scale: 1, deg: 0, offsetX: 0, offsetY: 0, objfit: "contain", enableTransition: false },
|
|
57
|
-
urlList: props.urlList,
|
|
67
|
+
urlList: inject("urlList", null) || props.urlList,
|
|
58
68
|
mode: constants.MODE.CONTAIN,
|
|
59
69
|
previewVisible: props.previewVisible,
|
|
60
70
|
fullScreen: props.imageFullCurrent,
|
|
@@ -120,7 +130,7 @@ const initWatch = ({ watch, state, api: api2, props, nextTick, vm }) => {
|
|
|
120
130
|
() => props.previewVisible,
|
|
121
131
|
(value) => {
|
|
122
132
|
api2.watchVisible(value);
|
|
123
|
-
if (props.previewVisible) {
|
|
133
|
+
if (props.previewVisible || state.mfPreviewVisible) {
|
|
124
134
|
nextTick(() => {
|
|
125
135
|
state.urlList = props.urlList;
|
|
126
136
|
api2.getImageWidth();
|
|
@@ -146,9 +156,9 @@ const initWatch = ({ watch, state, api: api2, props, nextTick, vm }) => {
|
|
|
146
156
|
{ immediate: true }
|
|
147
157
|
);
|
|
148
158
|
};
|
|
149
|
-
const renderless = (props, { computed, onMounted, onUpdated, reactive, watch }, { t, parent, nextTick, emit, constants, vm, mode }) => {
|
|
159
|
+
const renderless = (props, { computed, onMounted, onUpdated, reactive, watch, inject }, { t, parent, nextTick, emit, constants, vm, mode }) => {
|
|
150
160
|
const api2 = {};
|
|
151
|
-
const state = initState({ reactive, computed, api: api2, mode, props, constants });
|
|
161
|
+
const state = initState({ reactive, computed, api: api2, mode, props, constants, inject });
|
|
152
162
|
initApi({ api: api2, state, props, parent, nextTick, emit, t, constants });
|
|
153
163
|
initWatch({ watch, state, api: api2, props, nextTick, vm });
|
|
154
164
|
onMounted(api2.deviceSupportInstall);
|
package/input/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { isSame } from "
|
|
2
|
+
import { isSame } from "../common/type";
|
|
3
3
|
const HIDDEN_STYLE = `
|
|
4
4
|
height:0 !important;visibility:hidden !important;overflow:hidden !important;
|
|
5
5
|
position:absolute !important;z-index:-1000 !important;top:0 !important;right:0 !important
|
|
@@ -221,13 +221,44 @@ const hasSelection = (api) => () => {
|
|
|
221
221
|
const input = api.getInput();
|
|
222
222
|
return input && input.selectionStart !== input.selectionEnd;
|
|
223
223
|
};
|
|
224
|
+
const handleEnterDisplayOnlyContent = ({ state, props }) => ($event, type) => {
|
|
225
|
+
const target = $event.target;
|
|
226
|
+
if (target && (target.scrollWidth > target.offsetWidth || type === "textarea" && target.scrollHeight > target.offsetHeight)) {
|
|
227
|
+
state.displayOnlyTooltip = props.displayOnlyContent || state.nativeInputValue;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
const hiddenPassword = ({ state, props }) => () => {
|
|
231
|
+
let str = "";
|
|
232
|
+
const password = props.displayOnlyContent || state.nativeInputValue;
|
|
233
|
+
for (let i = 0; i < password.length; i++) {
|
|
234
|
+
str += "*";
|
|
235
|
+
}
|
|
236
|
+
return str;
|
|
237
|
+
};
|
|
238
|
+
const dispatchDisplayedValue = ({ state, props, dispatch, api }) => () => {
|
|
239
|
+
if (state.isDisplayOnly) {
|
|
240
|
+
dispatch("FormItem", "displayed-value-changed", {
|
|
241
|
+
type: props.type || "text",
|
|
242
|
+
val: api.getDisplayedValue()
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const getDisplayedValue = ({ state, props }) => () => {
|
|
247
|
+
if (props.type === "password") {
|
|
248
|
+
return state.hiddenPassword || "-";
|
|
249
|
+
} else {
|
|
250
|
+
return props.displayOnlyContent || state.nativeInputValue || "-";
|
|
251
|
+
}
|
|
252
|
+
};
|
|
224
253
|
export {
|
|
225
254
|
blur,
|
|
226
255
|
calcIconOffset,
|
|
227
256
|
calcTextareaHeight,
|
|
228
257
|
calculateNodeStyling,
|
|
229
258
|
clear,
|
|
259
|
+
dispatchDisplayedValue,
|
|
230
260
|
focus,
|
|
261
|
+
getDisplayedValue,
|
|
231
262
|
getInput,
|
|
232
263
|
getSuffixVisible,
|
|
233
264
|
handleBlur,
|
|
@@ -235,10 +266,12 @@ export {
|
|
|
235
266
|
handleCompositionEnd,
|
|
236
267
|
handleCompositionStart,
|
|
237
268
|
handleCompositionUpdate,
|
|
269
|
+
handleEnterDisplayOnlyContent,
|
|
238
270
|
handleFocus,
|
|
239
271
|
handleInput,
|
|
240
272
|
handlePasswordVisible,
|
|
241
273
|
hasSelection,
|
|
274
|
+
hiddenPassword,
|
|
242
275
|
resizeTextarea,
|
|
243
276
|
select,
|
|
244
277
|
setNativeInputValue,
|
package/input/vue.js
CHANGED
|
@@ -26,9 +26,13 @@ import {
|
|
|
26
26
|
handlePasswordVisible,
|
|
27
27
|
handleCompositionStart,
|
|
28
28
|
handleCompositionUpdate,
|
|
29
|
-
hasSelection
|
|
29
|
+
hasSelection,
|
|
30
|
+
handleEnterDisplayOnlyContent,
|
|
31
|
+
hiddenPassword,
|
|
32
|
+
dispatchDisplayedValue,
|
|
33
|
+
getDisplayedValue
|
|
30
34
|
} from "./index";
|
|
31
|
-
import useStorageBox from "
|
|
35
|
+
import useStorageBox from "../tall-storage/vue-storage-box";
|
|
32
36
|
const api = [
|
|
33
37
|
"blur",
|
|
34
38
|
"showBox",
|
|
@@ -57,7 +61,9 @@ const api = [
|
|
|
57
61
|
"selectedMemory",
|
|
58
62
|
"storageData",
|
|
59
63
|
"isMemoryStorage",
|
|
60
|
-
"hasSelection"
|
|
64
|
+
"hasSelection",
|
|
65
|
+
"handleEnterDisplayOnlyContent",
|
|
66
|
+
"hiddenPassword"
|
|
61
67
|
];
|
|
62
68
|
const initState = ({ reactive, computed, mode, props, parent, constants }) => {
|
|
63
69
|
const state = reactive({
|
|
@@ -88,7 +94,12 @@ const initState = ({ reactive, computed, mode, props, parent, constants }) => {
|
|
|
88
94
|
nativeInputValue: computed(() => props.modelValue === null || props.modelValue === void 0 ? "" : String(props.modelValue)),
|
|
89
95
|
isWordLimitVisible: computed(
|
|
90
96
|
() => (props.showWordLimit && parent.$attrs.maxlength || props.counter) && (parent.type === "text" || parent.type === "textarea") && !state.inputDisabled && !props.readonly && !props.showPassword
|
|
91
|
-
)
|
|
97
|
+
),
|
|
98
|
+
isDisplayOnly: computed(
|
|
99
|
+
() => (props.displayOnly || (parent.tinyForm || {}).displayOnly) && ["text", "textarea", "password", "number"].includes(props.type)
|
|
100
|
+
),
|
|
101
|
+
displayOnlyTooltip: "",
|
|
102
|
+
hiddenPassword: computed(() => api.hiddenPassword())
|
|
92
103
|
});
|
|
93
104
|
return state;
|
|
94
105
|
};
|
|
@@ -106,7 +117,9 @@ const initApi = ({ api: api2, state, dispatch, broadcast, emit, refs, props, CLA
|
|
|
106
117
|
getSuffixVisible: getSuffixVisible({ parent, props, state }),
|
|
107
118
|
calculateNodeStyling: calculateNodeStyling(),
|
|
108
119
|
handleCompositionStart: handleCompositionStart(state),
|
|
109
|
-
handleCompositionUpdate: handleCompositionUpdate(state)
|
|
120
|
+
handleCompositionUpdate: handleCompositionUpdate(state),
|
|
121
|
+
dispatchDisplayedValue: dispatchDisplayedValue({ state, props, dispatch, api: api2 }),
|
|
122
|
+
getDisplayedValue: getDisplayedValue({ state, props })
|
|
110
123
|
});
|
|
111
124
|
};
|
|
112
125
|
const mergeApi = ({ storages, api: api2, componentName, props, emit, eventName, nextTick, parent, state, refs }) => {
|
|
@@ -140,7 +153,9 @@ const mergeApi = ({ storages, api: api2, componentName, props, emit, eventName,
|
|
|
140
153
|
setNativeInputValue: setNativeInputValue({ api: api2, state }),
|
|
141
154
|
handleCompositionEnd: handleCompositionEnd({ api: api2, state }),
|
|
142
155
|
handlePasswordVisible: handlePasswordVisible({ api: api2, nextTick, state }),
|
|
143
|
-
hasSelection: hasSelection(api2)
|
|
156
|
+
hasSelection: hasSelection(api2),
|
|
157
|
+
handleEnterDisplayOnlyContent: handleEnterDisplayOnlyContent({ state, props }),
|
|
158
|
+
hiddenPassword: hiddenPassword({ state, props })
|
|
144
159
|
});
|
|
145
160
|
};
|
|
146
161
|
const initWatch = ({ watch, state, api: api2, props, nextTick, emit, componentName, eventName }) => {
|
|
@@ -202,6 +217,7 @@ const renderless = (props, { computed, onMounted, onUpdated, reactive, toRefs, w
|
|
|
202
217
|
api2.setNativeInputValue();
|
|
203
218
|
api2.resizeTextarea();
|
|
204
219
|
api2.updateIconOffset();
|
|
220
|
+
api2.dispatchDisplayedValue();
|
|
205
221
|
dispatch("Select", "input-mounted", vm.$el);
|
|
206
222
|
dispatch("Tooltip", "tooltip-update", vm.$el);
|
|
207
223
|
});
|
package/ip-address/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { KEY_CODE, IPTHRESHOLD } from "
|
|
2
|
+
import { KEY_CODE, IPTHRESHOLD } from "../common";
|
|
3
3
|
const isIP6 = (str) => /^IPv6$/i.test(str);
|
|
4
4
|
const isIP4 = (str) => /^IPv4$/i.test(str);
|
|
5
5
|
const ipValidator = ({ props, api }) => (value) => {
|
package/ip-address/vue.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
keydown,
|
|
19
19
|
getHeightOfSize
|
|
20
20
|
} from "./index";
|
|
21
|
-
import { KEY_CODE } from "
|
|
21
|
+
import { KEY_CODE } from "../common";
|
|
22
22
|
const api = ["state", "focus", "inputEvent", "blur", "keyup", "keydown", "change", "select"];
|
|
23
23
|
const initState = ({ reactive, computed, handleValue, parent, props }) => {
|
|
24
24
|
const state = reactive(__spreadProps(__spreadValues({}, handleValue.state), {
|
package/link-menu/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
__spreadProps,
|
|
3
3
|
__spreadValues
|
|
4
4
|
} from "../chunk-PKUHTIDK.js";
|
|
5
|
-
import { mapTree } from "
|
|
6
|
-
import { copyArray } from "
|
|
5
|
+
import { mapTree } from "../grid/static";
|
|
6
|
+
import { copyArray } from "../common/object";
|
|
7
7
|
const dialogTitle = ({ constants, props, t }) => () => props.title || t(constants.DIALOG_TITLE);
|
|
8
8
|
const showDialog = (state) => () => state.boxVisibility = true;
|
|
9
9
|
const hideDialog = ({ api, state, vm, props }) => () => {
|
package/link-menu/vue.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
2
|
import { initData, dialogTitle, disabledParentNode, filterNode, getValue, hideDialog, showDialog, sureNodevalue, disabledTreeNode, initService } from "./index";
|
|
3
|
-
import { copyArray } from "
|
|
4
|
-
import { setMenuKey } from "
|
|
3
|
+
import { copyArray } from "../common/object";
|
|
4
|
+
import { setMenuKey } from "../tree-menu";
|
|
5
5
|
const api = ["state", "initData", "filterNode", "getValue", "hideDialog", "setMenuKey", "showDialog", "sureNodevalue"];
|
|
6
6
|
const initState = ({ reactive, computed, api: api2 }) => {
|
|
7
7
|
const state = reactive({
|
package/loading/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import afterLeave from "
|
|
3
|
-
import { removeClass } from "
|
|
2
|
+
import afterLeave from "../common/deps/after-leave";
|
|
3
|
+
import { removeClass } from "../common/deps/dom";
|
|
4
4
|
const handleAfterLeave = (emit) => () => {
|
|
5
5
|
emit("after-leave");
|
|
6
6
|
};
|
package/loading/vue.js
CHANGED
package/locales/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { xss } from "
|
|
2
|
+
import { xss } from "../common";
|
|
3
3
|
const getLocales = ({ api, service, state }) => () => {
|
|
4
4
|
Promise.all([service.getLocale(), service.getCurrentLocale()]).then(([locales, current]) => {
|
|
5
5
|
state.locales = locales || ["zhCN"];
|
package/logout/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { xss } from "
|
|
2
|
+
import { xss } from "../common";
|
|
3
3
|
const logout = ({ service, state, props }) => () => {
|
|
4
4
|
let { isMock, isLocal, redirectUrl = "", getLogoutUrl, showLogin } = service;
|
|
5
5
|
if (typeof props.beforeLogout === "function") {
|
package/milestone/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
2
|
const hexToRgb = (hex) => {
|
|
3
|
-
|
|
3
|
+
if (hex.includes("var")) {
|
|
4
|
+
hex = hex.replace(/var\(|\)/g, "");
|
|
5
|
+
hex = getComputedStyle(document.documentElement).getPropertyValue(hex);
|
|
6
|
+
}
|
|
7
|
+
hex = hex.replace(/\s*#/g, "");
|
|
4
8
|
if (hex.length == 3) {
|
|
5
9
|
hex = hex[0] + hex[0] + hex[1] + hex[1] + hex[2] + hex[2];
|
|
6
10
|
}
|
package/modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { KEY_CODE } from "
|
|
3
|
-
import { on, off, addClass, hasClass, removeClass } from "
|
|
4
|
-
import PopupManager from "
|
|
5
|
-
import { getDomNode } from "
|
|
2
|
+
import { KEY_CODE } from "../common";
|
|
3
|
+
import { on, off, addClass, hasClass, removeClass } from "../common/deps/dom";
|
|
4
|
+
import PopupManager from "../common/deps/popup-manager";
|
|
5
|
+
import { getDomNode } from "../common/deps/dom";
|
|
6
6
|
const DragClass = "is__drag";
|
|
7
7
|
const emitZoom = ({ params, parent, emit, event }) => {
|
|
8
8
|
let { $listeners, events = {} } = parent;
|
|
@@ -21,18 +21,23 @@ const created = ({ api, props, state }) => () => {
|
|
|
21
21
|
}
|
|
22
22
|
state.modalZindex = props.zIndex || PopupManager.nextZIndex();
|
|
23
23
|
};
|
|
24
|
-
const mounted = ({ api, parent, props }) => () => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
const mounted = ({ api, parent, props, isMobileFirstMode }) => () => {
|
|
25
|
+
if (!isMobileFirstMode) {
|
|
26
|
+
let modalBoxElem = api.getBox();
|
|
27
|
+
Object.assign(modalBoxElem.style, {
|
|
28
|
+
width: props.width ? isNaN(props.width) ? props.width : `${props.width}px` : null,
|
|
29
|
+
height: props.height ? isNaN(props.height) ? props.height : `${props.height}px` : null
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
on(window, "resize", api.resetDragStyle);
|
|
33
|
+
}
|
|
30
34
|
if (props.escClosable) {
|
|
31
35
|
on(document, "keydown", api.handleGlobalKeydownEvent);
|
|
32
36
|
}
|
|
33
37
|
document.body.appendChild(parent.$el);
|
|
34
38
|
};
|
|
35
|
-
const beforeUnmouted = ({ api, parent }) => () => {
|
|
39
|
+
const beforeUnmouted = ({ api, parent, isMobileFirstMode }) => () => {
|
|
40
|
+
isMobileFirstMode && off(window, "resize", api.resetDragStyle);
|
|
36
41
|
off(document, "keydown", api.handleGlobalKeydownEvent);
|
|
37
42
|
api.removeMsgQueue();
|
|
38
43
|
if (parent.$el.parentNode) {
|
|
@@ -47,7 +52,7 @@ const selfClickEvent = ({ api, parent, props }) => (event) => {
|
|
|
47
52
|
const updateZindex = ({ state, props }) => () => {
|
|
48
53
|
state.modalZindex = props.zIndex || PopupManager.nextZIndex();
|
|
49
54
|
};
|
|
50
|
-
const handleEvent = ({ api, emit, parent, props }) => (type, event) => {
|
|
55
|
+
const handleEvent = ({ api, emit, parent, props, isMobileFirstMode }) => (type, event, options) => {
|
|
51
56
|
if (~["close", "confirm", "cancel"].indexOf(type) && typeof props.beforeClose === "function" && props.beforeClose(type) === false) {
|
|
52
57
|
return;
|
|
53
58
|
}
|
|
@@ -56,6 +61,9 @@ const handleEvent = ({ api, emit, parent, props }) => (type, event) => {
|
|
|
56
61
|
type,
|
|
57
62
|
$modal: parent
|
|
58
63
|
};
|
|
64
|
+
if (isMobileFirstMode && type === "confirm") {
|
|
65
|
+
params.options = options;
|
|
66
|
+
}
|
|
59
67
|
emit(type, params, event);
|
|
60
68
|
events[type] && events[type].call(parent, params);
|
|
61
69
|
api.close(type);
|
|
@@ -69,7 +77,7 @@ const confirmEvent = (api) => (event) => {
|
|
|
69
77
|
const cancelEvent = (api) => (event) => {
|
|
70
78
|
api.handleEvent("cancel", event);
|
|
71
79
|
};
|
|
72
|
-
const open = ({ api, emit, nextTick, parent, props, state }) => () => {
|
|
80
|
+
const open = ({ api, emit, nextTick, parent, props, state, isMobileFirstMode }) => () => {
|
|
73
81
|
let { $listeners, events = {} } = parent;
|
|
74
82
|
if (!state.visible) {
|
|
75
83
|
let params = { type: "show", $modal: parent };
|
|
@@ -95,12 +103,14 @@ const open = ({ api, emit, nextTick, parent, props, state }) => () => {
|
|
|
95
103
|
}, parseFloat(props.duration));
|
|
96
104
|
} else {
|
|
97
105
|
nextTick(() => {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
modalBoxElem.
|
|
106
|
+
if (!isMobileFirstMode) {
|
|
107
|
+
let modalBoxElem = api.getBox();
|
|
108
|
+
let clientVisibleWidth = document.documentElement.clientWidth || document.body.clientWidth;
|
|
109
|
+
let clientVisibleHeight = document.documentElement.clientHeight || document.body.clientHeight;
|
|
110
|
+
modalBoxElem.style.left = `${clientVisibleWidth / 2 - modalBoxElem.offsetWidth / 2}px`;
|
|
111
|
+
if (modalBoxElem.offsetHeight + modalBoxElem.offsetTop + props.marginSize > clientVisibleHeight) {
|
|
112
|
+
modalBoxElem.style.top = `${props.marginSize}px`;
|
|
113
|
+
}
|
|
104
114
|
}
|
|
105
115
|
if (props.fullscreen) {
|
|
106
116
|
nextTick(api.maximize);
|
|
@@ -159,7 +169,7 @@ const handleGlobalKeydownEvent = (api) => (event) => {
|
|
|
159
169
|
}
|
|
160
170
|
};
|
|
161
171
|
const getBox = (refs) => () => refs.modalBox;
|
|
162
|
-
const maximize = ({ api, nextTick, props, state }) => () => nextTick().then(() => {
|
|
172
|
+
const maximize = ({ api, nextTick, props, state, isMobileFirstMode }) => () => nextTick().then(() => {
|
|
163
173
|
if (!state.zoomLocat) {
|
|
164
174
|
let marginSize = props.marginSize;
|
|
165
175
|
let modalBoxElement = api.getBox();
|
|
@@ -170,32 +180,37 @@ const maximize = ({ api, nextTick, props, state }) => () => nextTick().then(() =
|
|
|
170
180
|
width: modalBoxElement.clientWidth,
|
|
171
181
|
height: modalBoxElement.clientHeight
|
|
172
182
|
};
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
183
|
+
if (!isMobileFirstMode) {
|
|
184
|
+
Object.assign(modalBoxElement.style, {
|
|
185
|
+
width: `${visibleWidth - marginSize * 2}px`,
|
|
186
|
+
height: `${visibleHeight - marginSize * 2}px`,
|
|
187
|
+
top: `${marginSize}px`,
|
|
188
|
+
left: `${marginSize}px`
|
|
189
|
+
});
|
|
190
|
+
}
|
|
179
191
|
state.emitter.emit("boxdrag");
|
|
180
192
|
}
|
|
181
193
|
});
|
|
182
|
-
const revert = ({ api, nextTick, state }) => () => nextTick().then(() => {
|
|
194
|
+
const revert = ({ api, nextTick, state, isMobileFirstMode }) => () => nextTick().then(() => {
|
|
183
195
|
let zoomLocat = state.zoomLocat;
|
|
184
196
|
if (zoomLocat) {
|
|
185
197
|
let modalBoxElement = api.getBox();
|
|
186
198
|
state.zoomLocat = null;
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
199
|
+
if (!isMobileFirstMode) {
|
|
200
|
+
Object.assign(modalBoxElement.style, {
|
|
201
|
+
width: `${zoomLocat.width}px`,
|
|
202
|
+
height: `${zoomLocat.height}px`,
|
|
203
|
+
top: `${zoomLocat.top}px`,
|
|
204
|
+
left: `${zoomLocat.left}px`
|
|
205
|
+
});
|
|
206
|
+
}
|
|
193
207
|
state.emitter.emit("boxdrag");
|
|
194
208
|
}
|
|
195
209
|
});
|
|
196
|
-
const toggleZoomEvent = ({ api, emit, parent, state }) => (event) => {
|
|
210
|
+
const toggleZoomEvent = ({ api, emit, parent, state, isMobileFirstMode }) => (event) => {
|
|
197
211
|
let params = { type: state.zoomLocat ? "min" : "max", $modal: parent };
|
|
198
212
|
const callback = state.zoomLocat ? api.revert : api.maximize;
|
|
213
|
+
isMobileFirstMode && api.resetDragStyle();
|
|
199
214
|
return callback().then(() => {
|
|
200
215
|
emitZoom({ params, parent, emit, event });
|
|
201
216
|
});
|
|
@@ -217,7 +232,7 @@ function getEventTargetNode(event, container, queryCls) {
|
|
|
217
232
|
}
|
|
218
233
|
return { flag: false };
|
|
219
234
|
}
|
|
220
|
-
const mousedownEvent = ({ api, nextTick, props, state, emit }) => (event) => {
|
|
235
|
+
const mousedownEvent = ({ api, nextTick, props, state, emit, isMobileFirstMode }) => (event) => {
|
|
221
236
|
let modalBoxElement = api.getBox();
|
|
222
237
|
if (!state.zoomLocat && event.button === 0 && !getEventTargetNode(event, modalBoxElement, "trigger__btn").flag) {
|
|
223
238
|
event.preventDefault();
|
|
@@ -231,12 +246,20 @@ const mousedownEvent = ({ api, nextTick, props, state, emit }) => (event) => {
|
|
|
231
246
|
state.emitter.emit("boxdrag");
|
|
232
247
|
let offsetWidth = modalBoxElement.offsetWidth;
|
|
233
248
|
let offsetHeight = modalBoxElement.offsetHeight;
|
|
234
|
-
let minX = props.marginSize;
|
|
235
|
-
let maxX = visibleWidth - offsetWidth - props.marginSize;
|
|
236
|
-
let minY = props.marginSize;
|
|
237
|
-
let maxY = visibleHeight - offsetHeight - props.marginSize;
|
|
238
249
|
let left = event2.clientX - disX;
|
|
239
250
|
let top = event2.clientY - disY;
|
|
251
|
+
let minX, maxX, minY, maxY;
|
|
252
|
+
if (isMobileFirstMode) {
|
|
253
|
+
minX = offsetWidth / 2 + props.marginSize;
|
|
254
|
+
maxX = visibleWidth - offsetWidth / 2 - props.marginSize;
|
|
255
|
+
minY = offsetHeight / 2 + props.marginSize;
|
|
256
|
+
maxY = visibleHeight - offsetHeight / 2 - props.marginSize;
|
|
257
|
+
} else {
|
|
258
|
+
minX = props.marginSize;
|
|
259
|
+
maxX = visibleWidth - offsetWidth - props.marginSize;
|
|
260
|
+
minY = props.marginSize;
|
|
261
|
+
maxY = visibleHeight - offsetHeight - props.marginSize;
|
|
262
|
+
}
|
|
240
263
|
if (left < minX) {
|
|
241
264
|
left = minX;
|
|
242
265
|
}
|
|
@@ -489,6 +512,11 @@ const resetFormTip = (parent, isFormReset = true) => {
|
|
|
489
512
|
});
|
|
490
513
|
}
|
|
491
514
|
};
|
|
515
|
+
const resetDragStyle = (api) => () => {
|
|
516
|
+
const modalBoxElement = api.getBox();
|
|
517
|
+
modalBoxElement.style.left = null;
|
|
518
|
+
modalBoxElement.style.top = null;
|
|
519
|
+
};
|
|
492
520
|
export {
|
|
493
521
|
MsgQueue,
|
|
494
522
|
addMsgQueue,
|
|
@@ -508,6 +536,7 @@ export {
|
|
|
508
536
|
mousedownEvent,
|
|
509
537
|
open,
|
|
510
538
|
removeMsgQueue,
|
|
539
|
+
resetDragStyle,
|
|
511
540
|
resetFormTip,
|
|
512
541
|
revert,
|
|
513
542
|
selfClickEvent,
|
package/modal/vue.js
CHANGED
|
@@ -22,7 +22,8 @@ import {
|
|
|
22
22
|
closeEvent,
|
|
23
23
|
confirmEvent,
|
|
24
24
|
cancelEvent,
|
|
25
|
-
open
|
|
25
|
+
open,
|
|
26
|
+
resetDragStyle
|
|
26
27
|
} from "./index";
|
|
27
28
|
const api = [
|
|
28
29
|
"state",
|
|
@@ -40,9 +41,10 @@ const api = [
|
|
|
40
41
|
"confirmEvent",
|
|
41
42
|
"cancelEvent",
|
|
42
43
|
"open",
|
|
43
|
-
"beforeUnmouted"
|
|
44
|
+
"beforeUnmouted",
|
|
45
|
+
"resetDragStyle"
|
|
44
46
|
];
|
|
45
|
-
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch }, { refs, emit, emitter, nextTick, broadcast, vm: parent }) => {
|
|
47
|
+
const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, watch }, { refs, emit, emitter, nextTick, broadcast, vm: parent }, { isMobileFirstMode }) => {
|
|
46
48
|
const api2 = {};
|
|
47
49
|
const state = reactive({
|
|
48
50
|
emitter: emitter(),
|
|
@@ -63,24 +65,25 @@ const renderless = (props, { computed, onMounted, onBeforeUnmount, reactive, wat
|
|
|
63
65
|
getBox: getBox(refs),
|
|
64
66
|
watchValue: watchValue(api2),
|
|
65
67
|
created: created({ api: api2, props, state }),
|
|
66
|
-
mounted: mounted({ api: api2, parent, props }),
|
|
67
|
-
beforeUnmouted: beforeUnmouted({ api: api2, parent }),
|
|
68
|
+
mounted: mounted({ api: api2, parent, props, isMobileFirstMode }),
|
|
69
|
+
beforeUnmouted: beforeUnmouted({ api: api2, parent, isMobileFirstMode }),
|
|
68
70
|
selfClickEvent: selfClickEvent({ api: api2, parent, props }),
|
|
69
71
|
updateZindex: updateZindex({ state, props }),
|
|
70
|
-
handleEvent: handleEvent({ api: api2, emit, parent, props }),
|
|
72
|
+
handleEvent: handleEvent({ api: api2, emit, parent, props, isMobileFirstMode }),
|
|
71
73
|
closeEvent: closeEvent(api2),
|
|
72
74
|
confirmEvent: confirmEvent(api2),
|
|
73
75
|
cancelEvent: cancelEvent(api2),
|
|
74
|
-
open: open({ api: api2, emit, nextTick, parent, props, state }),
|
|
76
|
+
open: open({ api: api2, emit, nextTick, parent, props, state, isMobileFirstMode }),
|
|
75
77
|
addMsgQueue: addMsgQueue({ api: api2, parent }),
|
|
76
78
|
removeMsgQueue: removeMsgQueue({ api: api2, parent }),
|
|
77
79
|
close: close({ emit, parent, props, state }),
|
|
78
80
|
handleGlobalKeydownEvent: handleGlobalKeydownEvent(api2),
|
|
79
|
-
maximize: maximize({ api: api2, nextTick, props, state }),
|
|
80
|
-
revert: revert({ api: api2, nextTick, state }),
|
|
81
|
-
toggleZoomEvent: toggleZoomEvent({ api: api2, emit, parent, state }),
|
|
82
|
-
mousedownEvent: mousedownEvent({ api: api2, nextTick, props, state, emit }),
|
|
83
|
-
dragEvent: dragEvent({ api: api2, emit, parent, props, state })
|
|
81
|
+
maximize: maximize({ api: api2, nextTick, props, state, isMobileFirstMode }),
|
|
82
|
+
revert: revert({ api: api2, nextTick, state, isMobileFirstMode }),
|
|
83
|
+
toggleZoomEvent: toggleZoomEvent({ api: api2, emit, parent, state, isMobileFirstMode }),
|
|
84
|
+
mousedownEvent: mousedownEvent({ api: api2, nextTick, props, state, emit, isMobileFirstMode }),
|
|
85
|
+
dragEvent: dragEvent({ api: api2, emit, parent, props, state }),
|
|
86
|
+
resetDragStyle: resetDragStyle(api2)
|
|
84
87
|
});
|
|
85
88
|
watch(() => props.modelValue, api2.watchValue);
|
|
86
89
|
api2.created();
|
package/month-range/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { isDate, modifyWithTimeString, prevYear, nextYear, nextMonth } from "
|
|
2
|
+
import { isDate, modifyWithTimeString, prevYear, nextYear, nextMonth } from "../common/deps/date-util";
|
|
3
3
|
const calcDefaultValue = (defaultValue) => {
|
|
4
4
|
if (Array.isArray(defaultValue)) {
|
|
5
5
|
return [new Date(defaultValue[0]), new Date(defaultValue[1])];
|
package/month-range/vue.js
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
handleShortcutClick,
|
|
16
16
|
doPick
|
|
17
17
|
} from "./index";
|
|
18
|
-
import { nextYear } from "
|
|
18
|
+
import { nextYear } from "../common/deps/date-util";
|
|
19
19
|
const api = ["state", "rightNextYear", "rightPrevYear", "handleRangePick", "handleShortcutClick", "handleChangeRange", "leftPrevYear", "leftNextYear"];
|
|
20
20
|
const initState = ({ reactive, computed, api: api2, t }) => {
|
|
21
21
|
const state = reactive({
|
package/month-table/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "../chunk-PKUHTIDK.js";
|
|
2
|
-
import { toDate } from "
|
|
3
|
-
import { hasClass } from "
|
|
4
|
-
import { range as rangeDate, getDayCountOfMonth, nextDate } from "
|
|
5
|
-
import { arrayFindIndex, coerceTruthyValueToArray, arrayFind } from "
|
|
6
|
-
import { DATEPICKER } from "
|
|
2
|
+
import { toDate } from "../common/date";
|
|
3
|
+
import { hasClass } from "../common/deps/dom";
|
|
4
|
+
import { range as rangeDate, getDayCountOfMonth, nextDate } from "../common/deps/date-util";
|
|
5
|
+
import { arrayFindIndex, coerceTruthyValueToArray, arrayFind } from "../date-table";
|
|
6
|
+
import { DATEPICKER } from "../common";
|
|
7
7
|
const datesInMonth = (year, month) => {
|
|
8
8
|
const numOfDays = getDayCountOfMonth(year, month);
|
|
9
9
|
const firstDay = new Date(year, month, 1);
|
package/month-table/vue.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
getCellStyle,
|
|
11
11
|
getMonthOfCell
|
|
12
12
|
} from "./index";
|
|
13
|
-
import { DATEPICKER } from "
|
|
13
|
+
import { DATEPICKER } from "../common";
|
|
14
14
|
const api = ["state", "handleMonthTableClick", "handleMouseMove", "getCellStyle"];
|
|
15
15
|
const renderless = (props, { computed, reactive, watch }, { t, vm, emit }) => {
|
|
16
16
|
const api2 = {};
|