@varlet/ui 1.23.4-alpha.5 → 1.23.5
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/CHANGELOG.md +29 -0
- package/es/action-sheet/index.js +1 -1
- package/es/back-top/BackTop.js +2 -2
- package/es/dialog/index.js +1 -1
- package/es/image-preview/index.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/input/Input.js +36 -13
- package/es/list/List.js +1 -1
- package/es/popup/Popup.js +81 -59
- package/es/popup/index.js +1 -1
- package/es/popup/style/index.js +0 -1
- package/es/popup/style/less.js +0 -1
- package/es/pull-refresh/PullRefresh.js +1 -1
- package/es/snackbar/style/index.js +1 -1
- package/es/snackbar/style/less.js +1 -1
- package/es/sticky/Sticky.js +1 -1
- package/es/utils/components.js +7 -0
- package/es/utils/elements.js +2 -2
- package/es/utils/shared.js +1 -1
- package/lib/action-sheet/index.js +1 -1
- package/lib/back-top/BackTop.js +2 -2
- package/lib/date-picker/src/day-picker-panel.js +4 -4
- package/lib/date-picker/src/month-picker-panel.js +4 -4
- package/lib/dialog/index.js +1 -1
- package/lib/image-preview/index.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +62 -62
- package/lib/input/Input.js +35 -12
- package/lib/list/List.js +1 -1
- package/lib/popup/Popup.js +78 -58
- package/lib/popup/index.js +1 -1
- package/lib/popup/style/index.js +0 -1
- package/lib/popup/style/less.js +0 -1
- package/lib/pull-refresh/PullRefresh.js +1 -1
- package/lib/sticky/Sticky.js +1 -1
- package/lib/style.css +1 -0
- package/lib/utils/components.js +9 -0
- package/lib/utils/elements.js +2 -2
- package/lib/utils/shared.js +3 -1
- package/package.json +3 -3
- package/types/global.d.ts +1 -0
- package/types/index.d.ts +1 -0
- package/types/list.d.ts +21 -0
- package/umd/varlet.js +3 -2
- package/es/popup/PopupSfc.css +0 -0
- package/es/popup/PopupSfc.less +0 -0
- package/lib/popup/PopupSfc.css +0 -0
- package/lib/popup/PopupSfc.less +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.23.5](https://github.com/haoziqaq/varlet/compare/v1.23.4...v1.23.5) (2021-11-21)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **cli:** add module moduleCompatible option in varlet.config.js ([0b1d95f](https://github.com/haoziqaq/varlet/commit/0b1d95fc740a225240ee3f28e06015f4538b2304))
|
|
12
|
+
* **cli:** expose lib folder ([2a8848a](https://github.com/haoziqaq/varlet/commit/2a8848a6f064aa91d56875ba467c46da79589a79))
|
|
13
|
+
* **cli/compile:** add commonjs bundle ([4a424d4](https://github.com/haoziqaq/varlet/commit/4a424d4c066f7de69cbf561a5bc9279862739637))
|
|
14
|
+
* **ui:** dayjs compatible ([3f2289b](https://github.com/haoziqaq/varlet/commit/3f2289bdf39e82529df94fea6fec9dd7739a5c96))
|
|
15
|
+
* **ui/list:** support nuxt ([dd7a71e](https://github.com/haoziqaq/varlet/commit/dd7a71ee37e2eadbacc6febd22949ef664997cb3))
|
|
16
|
+
* **ui/popup,input:** support nuxt ([def81ef](https://github.com/haoziqaq/varlet/commit/def81ef821a8ce679287702316bd98ca363bc7f4))
|
|
17
|
+
* **ui/sticky:** support nuxt ([29c24d6](https://github.com/haoziqaq/varlet/commit/29c24d61a0e91ceb948ff5a3e1bc6eb4c52b416a))
|
|
18
|
+
* compatible nuxt ([d681176](https://github.com/haoziqaq/varlet/commit/d6811763867f44731544c8c218e5368896aab6b1))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## [1.23.4](https://github.com/haoziqaq/varlet/compare/v1.23.3...v1.23.4) (2021-11-21)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* **ui/types:** add list.d.ts ([ab06a8f](https://github.com/haoziqaq/varlet/commit/ab06a8f219fcf5f4f929938f048a142a6c4b1715))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
6
35
|
## [1.23.3](https://github.com/haoziqaq/varlet/compare/v1.23.2...v1.23.3) (2021-11-20)
|
|
7
36
|
|
|
8
37
|
|
package/es/action-sheet/index.js
CHANGED
package/es/back-top/BackTop.js
CHANGED
|
@@ -38,7 +38,7 @@ export default defineComponent({
|
|
|
38
38
|
props,
|
|
39
39
|
|
|
40
40
|
setup(props) {
|
|
41
|
-
var element
|
|
41
|
+
var element;
|
|
42
42
|
var show = ref(false);
|
|
43
43
|
|
|
44
44
|
var click = () => {
|
|
@@ -65,7 +65,7 @@ export default defineComponent({
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
onMounted(() => {
|
|
68
|
-
|
|
68
|
+
element = props.target ? getHTMLElement() : window;
|
|
69
69
|
element.addEventListener('scroll', throttleScroll);
|
|
70
70
|
});
|
|
71
71
|
onBeforeUnmount(() => {
|
package/es/dialog/index.js
CHANGED
package/es/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../types'
|
package/es/input/Input.js
CHANGED
|
@@ -5,7 +5,7 @@ import { props } from './props';
|
|
|
5
5
|
import { isEmpty } from '../utils/shared';
|
|
6
6
|
import { useValidation } from '../utils/components';
|
|
7
7
|
import { useForm } from '../form/provide';
|
|
8
|
-
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode,
|
|
8
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, toDisplayString as _toDisplayString, resolveComponent as _resolveComponent, createBlock as _createBlock, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
9
9
|
|
|
10
10
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
11
11
|
|
|
@@ -13,7 +13,9 @@ var _hoisted_1 = {
|
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "var-input__autocomplete"
|
|
15
15
|
};
|
|
16
|
-
var _hoisted_2 = ["
|
|
16
|
+
var _hoisted_2 = ["id", "disabled", "type", "value", "maxlength", "rows"];
|
|
17
|
+
var _hoisted_3 = ["id", "disabled", "type", "value", "maxlength"];
|
|
18
|
+
var _hoisted_4 = ["for"];
|
|
17
19
|
export function render(_ctx, _cache) {
|
|
18
20
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
19
21
|
|
|
@@ -21,7 +23,7 @@ export function render(_ctx, _cache) {
|
|
|
21
23
|
|
|
22
24
|
return _openBlock(), _createElementBlock("div", {
|
|
23
25
|
class: _normalizeClass(["var-input var--box", [_ctx.disabled ? 'var-input--disabled' : null]]),
|
|
24
|
-
onClick: _cache[
|
|
26
|
+
onClick: _cache[8] || (_cache[8] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
|
|
25
27
|
}, [_createElementVNode("div", {
|
|
26
28
|
class: _normalizeClass(["var-input__controller", [_ctx.isFocus ? 'var-input--focus' : null, _ctx.errorMessage ? 'var-input--error' : null, _ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null]]),
|
|
27
29
|
style: _normalizeStyle({
|
|
@@ -33,8 +35,9 @@ export function render(_ctx, _cache) {
|
|
|
33
35
|
/* CLASS */
|
|
34
36
|
), _createElementVNode("div", {
|
|
35
37
|
class: _normalizeClass(["var-input__wrap", [!_ctx.hint ? 'var-input--non-hint' : null]])
|
|
36
|
-
}, [_ctx.type === 'password' ? (_openBlock(), _createElementBlock("input", _hoisted_1)) : _createCommentVNode("v-if", true), (_openBlock(),
|
|
37
|
-
|
|
38
|
+
}, [_ctx.type === 'password' ? (_openBlock(), _createElementBlock("input", _hoisted_1)) : _createCommentVNode("v-if", true), _ctx.textarea ? (_openBlock(), _createElementBlock("textarea", {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: _normalizeClass(["var-input__input var-input--textarea", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
|
|
38
41
|
ref: "el",
|
|
39
42
|
autocomplete: "new-password",
|
|
40
43
|
id: _ctx.id,
|
|
@@ -48,18 +51,38 @@ export function render(_ctx, _cache) {
|
|
|
48
51
|
caretColor: !_ctx.errorMessage ? _ctx.focusColor : null,
|
|
49
52
|
resize: _ctx.resize ? 'vertical' : 'none'
|
|
50
53
|
}),
|
|
51
|
-
onFocus: _ctx.handleFocus,
|
|
52
|
-
onBlur: _ctx.handleBlur,
|
|
53
|
-
onInput: _ctx.handleInput,
|
|
54
|
-
onChange: _ctx.handleChange
|
|
55
|
-
},
|
|
56
|
-
/* PROPS */
|
|
57
|
-
,
|
|
54
|
+
onFocus: _cache[0] || (_cache[0] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
55
|
+
onBlur: _cache[1] || (_cache[1] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
56
|
+
onInput: _cache[2] || (_cache[2] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
|
|
57
|
+
onChange: _cache[3] || (_cache[3] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
|
|
58
|
+
}, "\n ", 46
|
|
59
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
60
|
+
, _hoisted_2)) : (_openBlock(), _createElementBlock("input", {
|
|
61
|
+
key: 2,
|
|
62
|
+
class: _normalizeClass(["var-input__input", [_ctx.formDisabled || _ctx.disabled ? 'var-input--disabled' : null, _ctx.errorMessage ? 'var-input--caret-error' : null]]),
|
|
63
|
+
ref: "el",
|
|
64
|
+
autocomplete: "new-password",
|
|
65
|
+
id: _ctx.id,
|
|
66
|
+
disabled: _ctx.formDisabled || _ctx.disabled || _ctx.formReadonly || _ctx.readonly,
|
|
67
|
+
type: _ctx.type,
|
|
68
|
+
value: _ctx.modelValue,
|
|
69
|
+
maxlength: _ctx.maxlength,
|
|
70
|
+
style: _normalizeStyle({
|
|
71
|
+
color: _ctx.textColor,
|
|
72
|
+
caretColor: !_ctx.errorMessage ? _ctx.focusColor : null
|
|
73
|
+
}),
|
|
74
|
+
onFocus: _cache[4] || (_cache[4] = (...args) => _ctx.handleFocus && _ctx.handleFocus(...args)),
|
|
75
|
+
onBlur: _cache[5] || (_cache[5] = (...args) => _ctx.handleBlur && _ctx.handleBlur(...args)),
|
|
76
|
+
onInput: _cache[6] || (_cache[6] = (...args) => _ctx.handleInput && _ctx.handleInput(...args)),
|
|
77
|
+
onChange: _cache[7] || (_cache[7] = (...args) => _ctx.handleChange && _ctx.handleChange(...args))
|
|
78
|
+
}, null, 46
|
|
79
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
80
|
+
, _hoisted_3)), _createElementVNode("label", {
|
|
58
81
|
class: _normalizeClass([_ctx.textarea ? 'var-input__textarea-placeholder' : 'var-input__placeholder', _ctx.computePlaceholderState(), !_ctx.hint ? 'var-input--placeholder-non-hint' : null]),
|
|
59
82
|
for: _ctx.id
|
|
60
83
|
}, _toDisplayString(_ctx.placeholder), 11
|
|
61
84
|
/* TEXT, CLASS, PROPS */
|
|
62
|
-
,
|
|
85
|
+
, _hoisted_4)], 2
|
|
63
86
|
/* CLASS */
|
|
64
87
|
), _createElementVNode("div", {
|
|
65
88
|
class: _normalizeClass(["var-input__icon", [!_ctx.hint ? 'var-input--non-hint' : null]])
|
package/es/list/List.js
CHANGED
package/es/popup/Popup.js
CHANGED
|
@@ -1,70 +1,28 @@
|
|
|
1
|
+
import { isVNode as _isVNode, withDirectives as _withDirectives, vShow as _vShow, mergeProps as _mergeProps, createVNode as _createVNode } from "vue";
|
|
2
|
+
|
|
1
3
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
4
|
|
|
3
|
-
import { defineComponent, watch } from 'vue';
|
|
5
|
+
import { defineComponent, watch, Transition, Teleport } from 'vue';
|
|
4
6
|
import { props } from './props';
|
|
5
7
|
import { useLock } from '../context/lock';
|
|
6
8
|
import { useZIndex } from '../context/zIndex';
|
|
7
9
|
import { addRouteListener, useTeleport } from '../utils/components';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}, [_createVNode(_Transition, {
|
|
14
|
-
name: "var-fade",
|
|
15
|
-
onAfterEnter: _ctx.onOpened,
|
|
16
|
-
onAfterLeave: _ctx.onClosed
|
|
17
|
-
}, {
|
|
18
|
-
default: _withCtx(() => [_withDirectives(_createElementVNode("div", {
|
|
19
|
-
class: "var--box var-popup",
|
|
20
|
-
style: _normalizeStyle({
|
|
21
|
-
zIndex: _ctx.zIndex - 2
|
|
22
|
-
})
|
|
23
|
-
}, [_ctx.overlay ? (_openBlock(), _createElementBlock("div", {
|
|
24
|
-
key: 0,
|
|
25
|
-
class: _normalizeClass(["var-popup__overlay", [_ctx.overlayClass]]),
|
|
26
|
-
style: _normalizeStyle(_extends({
|
|
27
|
-
zIndex: _ctx.zIndex - 1
|
|
28
|
-
}, _ctx.overlayStyle)),
|
|
29
|
-
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.hidePopup && _ctx.hidePopup(...args))
|
|
30
|
-
}, null, 6
|
|
31
|
-
/* CLASS, STYLE */
|
|
32
|
-
)) : _createCommentVNode("v-if", true), _createVNode(_Transition, {
|
|
33
|
-
name: _ctx.transition ? _ctx.transition : "var-pop-" + _ctx.position
|
|
34
|
-
}, {
|
|
35
|
-
default: _withCtx(() => [_ctx.show ? (_openBlock(), _createElementBlock("div", _mergeProps({
|
|
36
|
-
key: 0,
|
|
37
|
-
class: ["var-popup__content var-elevation--3", ["var-popup--" + _ctx.position]],
|
|
38
|
-
style: {
|
|
39
|
-
zIndex: _ctx.zIndex
|
|
40
|
-
}
|
|
41
|
-
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "default")], 16
|
|
42
|
-
/* FULL_PROPS */
|
|
43
|
-
)) : _createCommentVNode("v-if", true)]),
|
|
44
|
-
_: 3
|
|
45
|
-
/* FORWARDED */
|
|
46
|
-
|
|
47
|
-
}, 8
|
|
48
|
-
/* PROPS */
|
|
49
|
-
, ["name"])], 4
|
|
50
|
-
/* STYLE */
|
|
51
|
-
), [[_vShow, _ctx.show]])]),
|
|
52
|
-
_: 3
|
|
53
|
-
/* FORWARDED */
|
|
54
|
-
|
|
55
|
-
}, 8
|
|
56
|
-
/* PROPS */
|
|
57
|
-
, ["onAfterEnter", "onAfterLeave"])], 8
|
|
58
|
-
/* PROPS */
|
|
59
|
-
, ["to", "disabled"]);
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
function _isSlot(s) {
|
|
14
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
60
15
|
}
|
|
16
|
+
|
|
61
17
|
export default defineComponent({
|
|
62
|
-
render,
|
|
63
18
|
name: 'VarPopup',
|
|
64
19
|
inheritAttrs: false,
|
|
65
20
|
props,
|
|
66
21
|
|
|
67
|
-
setup(props
|
|
22
|
+
setup(props, {
|
|
23
|
+
slots,
|
|
24
|
+
attrs
|
|
25
|
+
}) {
|
|
68
26
|
var {
|
|
69
27
|
zIndex
|
|
70
28
|
} = useZIndex(() => props.show, 3);
|
|
@@ -98,10 +56,74 @@ export default defineComponent({
|
|
|
98
56
|
}); // internal for Dialog
|
|
99
57
|
|
|
100
58
|
addRouteListener(() => props.onRouteChange == null ? void 0 : props.onRouteChange());
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
59
|
+
|
|
60
|
+
var renderOverlay = () => {
|
|
61
|
+
var {
|
|
62
|
+
overlayClass,
|
|
63
|
+
overlayStyle
|
|
64
|
+
} = props;
|
|
65
|
+
return _createVNode("div", {
|
|
66
|
+
"class": ['var-popup__overlay', overlayClass],
|
|
67
|
+
"style": _extends({
|
|
68
|
+
zIndex: zIndex.value - 1
|
|
69
|
+
}, overlayStyle),
|
|
70
|
+
"onClick": hidePopup
|
|
71
|
+
}, null);
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
var renderContent = () => {
|
|
75
|
+
return _createVNode("div", _mergeProps({
|
|
76
|
+
"class": ['var-popup__content', 'var-elevation--3', "var-popup--" + props.position],
|
|
77
|
+
"style": {
|
|
78
|
+
zIndex: zIndex.value
|
|
79
|
+
}
|
|
80
|
+
}, attrs), [slots.default == null ? void 0 : slots.default()]);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
var renderPopup = () => {
|
|
84
|
+
var {
|
|
85
|
+
onOpened,
|
|
86
|
+
onClosed,
|
|
87
|
+
show,
|
|
88
|
+
overlay,
|
|
89
|
+
transition,
|
|
90
|
+
position
|
|
91
|
+
} = props;
|
|
92
|
+
return _createVNode(Transition, {
|
|
93
|
+
"name": "var-fade",
|
|
94
|
+
"onAfterEnter": onOpened,
|
|
95
|
+
"onAfterLeave": onClosed
|
|
96
|
+
}, {
|
|
97
|
+
default: () => [_withDirectives(_createVNode("div", {
|
|
98
|
+
"class": "var--box var-popup",
|
|
99
|
+
"style": {
|
|
100
|
+
zIndex: zIndex.value - 2
|
|
101
|
+
}
|
|
102
|
+
}, [overlay && renderOverlay(), _createVNode(Transition, {
|
|
103
|
+
"name": transition || "var-pop-" + position
|
|
104
|
+
}, {
|
|
105
|
+
default: () => [show && renderContent()]
|
|
106
|
+
})]), [[_vShow, show]])]
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
return () => {
|
|
111
|
+
var {
|
|
112
|
+
teleport
|
|
113
|
+
} = props;
|
|
114
|
+
|
|
115
|
+
if (teleport) {
|
|
116
|
+
var _slot;
|
|
117
|
+
|
|
118
|
+
return _createVNode(Teleport, {
|
|
119
|
+
"to": teleport,
|
|
120
|
+
"disabled": disabled.value
|
|
121
|
+
}, _isSlot(_slot = renderPopup()) ? _slot : {
|
|
122
|
+
default: () => [_slot]
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return renderPopup();
|
|
105
127
|
};
|
|
106
128
|
}
|
|
107
129
|
|
package/es/popup/index.js
CHANGED
package/es/popup/style/index.js
CHANGED
package/es/popup/style/less.js
CHANGED
|
@@ -5,7 +5,7 @@ import { props } from './props';
|
|
|
5
5
|
import { toNumber } from '../utils/shared';
|
|
6
6
|
var MAX_DISTANCE = 100;
|
|
7
7
|
var CONTROL_POSITION = -50;
|
|
8
|
-
var scroller
|
|
8
|
+
var scroller;
|
|
9
9
|
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, createVNode as _createVNode, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderSlot as _renderSlot, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
10
10
|
export function render(_ctx, _cache) {
|
|
11
11
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../styles/common.css'
|
|
2
|
+
import '../SnackbarSfc.css'
|
|
2
3
|
import '../../styles/elevation.css'
|
|
3
4
|
import '../../loading/loading.css'
|
|
4
5
|
import '../../button/button.css'
|
|
5
6
|
import '../../icon/icon.css'
|
|
6
7
|
import '../snackbar.css'
|
|
7
8
|
import '../coreSfc.css'
|
|
8
|
-
import '../SnackbarSfc.css'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import '../../styles/common.less'
|
|
2
|
+
import '../SnackbarSfc.less'
|
|
2
3
|
import '../../styles/elevation.less'
|
|
3
4
|
import '../../loading/loading.less'
|
|
4
5
|
import '../../button/button.less'
|
|
5
6
|
import '../../icon/icon.less'
|
|
6
7
|
import '../snackbar.less'
|
|
7
8
|
import '../coreSfc.less'
|
|
8
|
-
import '../SnackbarSfc.less'
|
package/es/sticky/Sticky.js
CHANGED
|
@@ -48,7 +48,7 @@ export default defineComponent({
|
|
|
48
48
|
var enableCSSMode = computed(() => !props.disabled && props.cssMode);
|
|
49
49
|
var enableFixedMode = computed(() => !props.disabled && isFixed.value);
|
|
50
50
|
var offsetTop = computed(() => toPxNum(props.offsetTop));
|
|
51
|
-
var scroller
|
|
51
|
+
var scroller;
|
|
52
52
|
|
|
53
53
|
var handleScroll = () => {
|
|
54
54
|
var {
|
package/es/utils/components.js
CHANGED
package/es/utils/elements.js
CHANGED
|
@@ -153,10 +153,10 @@ export var toSizeUnit = value => {
|
|
|
153
153
|
return toPxNum(value) + "px";
|
|
154
154
|
};
|
|
155
155
|
export function requestAnimationFrame(fn) {
|
|
156
|
-
return
|
|
156
|
+
return globalThis.requestAnimationFrame ? globalThis.requestAnimationFrame(fn) : globalThis.setTimeout(fn, 16);
|
|
157
157
|
}
|
|
158
158
|
export function cancelAnimationFrame(handle) {
|
|
159
|
-
|
|
159
|
+
globalThis.cancelAnimationFrame ? globalThis.cancelAnimationFrame(handle) : globalThis.clearTimeout(handle);
|
|
160
160
|
}
|
|
161
161
|
export function nextTickFrame(fn) {
|
|
162
162
|
requestAnimationFrame(() => {
|
package/es/utils/shared.js
CHANGED
|
@@ -138,7 +138,7 @@ export function parseFormat(format, time) {
|
|
|
138
138
|
return format;
|
|
139
139
|
}
|
|
140
140
|
export var dt = (value, defaultText) => value == null ? defaultText : value;
|
|
141
|
-
export var inBrowser = typeof window !== 'undefined';
|
|
141
|
+
export var inBrowser = () => typeof window !== 'undefined';
|
|
142
142
|
export var uniq = arr => [...new Set(arr)];
|
|
143
143
|
export function kebabCase(str) {
|
|
144
144
|
var reg = /([^-])([A-Z])/g;
|
package/lib/back-top/BackTop.js
CHANGED
|
@@ -52,7 +52,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
52
52
|
props: _props.props,
|
|
53
53
|
|
|
54
54
|
setup(props) {
|
|
55
|
-
var element
|
|
55
|
+
var element;
|
|
56
56
|
var show = (0, _vue.ref)(false);
|
|
57
57
|
|
|
58
58
|
var click = () => {
|
|
@@ -79,7 +79,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
(0, _vue.onMounted)(() => {
|
|
82
|
-
|
|
82
|
+
element = props.target ? getHTMLElement() : window;
|
|
83
83
|
element.addEventListener('scroll', throttleScroll);
|
|
84
84
|
});
|
|
85
85
|
(0, _vue.onBeforeUnmount)(() => {
|
|
@@ -6,9 +6,9 @@ exports.default = void 0;
|
|
|
6
6
|
|
|
7
7
|
var dayjs = _interopRequireWildcard(require("dayjs"));
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _isSameOrBefore = _interopRequireDefault(require("dayjs/plugin/isSameOrBefore"));
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _isSameOrAfter = _interopRequireDefault(require("dayjs/plugin/isSameOrAfter"));
|
|
12
12
|
|
|
13
13
|
var _panelHeader = _interopRequireDefault(require("./panel-header.js"));
|
|
14
14
|
|
|
@@ -30,8 +30,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
30
30
|
|
|
31
31
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
32
32
|
|
|
33
|
-
dayjs.extend(
|
|
34
|
-
dayjs.extend(
|
|
33
|
+
dayjs.extend(_isSameOrBefore.default);
|
|
34
|
+
dayjs.extend(_isSameOrAfter.default);
|
|
35
35
|
|
|
36
36
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
37
37
|
|
|
@@ -8,9 +8,9 @@ var _vue = require("vue");
|
|
|
8
8
|
|
|
9
9
|
var dayjs = _interopRequireWildcard(require("dayjs"));
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _isSameOrBefore = _interopRequireDefault(require("dayjs/plugin/isSameOrBefore"));
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _isSameOrAfter = _interopRequireDefault(require("dayjs/plugin/isSameOrAfter"));
|
|
14
14
|
|
|
15
15
|
var _props = require("../props");
|
|
16
16
|
|
|
@@ -30,8 +30,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
30
30
|
|
|
31
31
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
32
32
|
|
|
33
|
-
dayjs.extend(
|
|
34
|
-
dayjs.extend(
|
|
33
|
+
dayjs.extend(_isSameOrBefore.default);
|
|
34
|
+
dayjs.extend(_isSameOrAfter.default);
|
|
35
35
|
|
|
36
36
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
37
37
|
|
package/lib/dialog/index.js
CHANGED
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../types'
|