@varlet/ui 1.26.9 → 1.27.0-alpha.1649242923701
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/es/action-sheet/ActionSheet.js +29 -27
- package/es/app-bar/AppBar.js +32 -27
- package/es/back-top/BackTop.js +9 -2
- package/es/badge/Badge.js +22 -14
- package/es/bottom-navigation/BottomNavigation.js +167 -0
- package/es/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/es/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/es/bottom-navigation/bottomNavigation.css +1 -0
- package/es/bottom-navigation/bottomNavigation.less +49 -0
- package/es/bottom-navigation/index.js +8 -0
- package/es/bottom-navigation/props.js +40 -0
- package/es/bottom-navigation/provide.js +17 -0
- package/es/bottom-navigation/style/index.js +4 -0
- package/es/bottom-navigation/style/less.js +4 -0
- package/es/bottom-navigation-item/BottomNavigationItem.js +122 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/es/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/es/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/es/bottom-navigation-item/index.js +8 -0
- package/es/bottom-navigation-item/props.js +22 -0
- package/es/bottom-navigation-item/provide.js +21 -0
- package/es/bottom-navigation-item/style/index.js +6 -0
- package/es/bottom-navigation-item/style/less.js +6 -0
- package/es/button/Button.js +12 -5
- package/es/card/Card.js +33 -28
- package/es/cell/Cell.js +26 -15
- package/es/checkbox/Checkbox.js +28 -26
- package/es/checkbox-group/CheckboxGroup.js +21 -25
- package/es/chip/Chip.js +16 -7
- package/es/chip/chip.css +1 -1
- package/es/chip/chip.less +11 -11
- package/es/col/Col.js +12 -5
- package/es/collapse/Collapse.js +15 -12
- package/es/collapse-item/CollapseItem.js +31 -30
- package/es/collapse-item/collapseItem.css +1 -1
- package/es/collapse-item/collapseItem.less +16 -16
- package/es/countdown/Countdown.js +14 -11
- package/es/counter/Counter.js +30 -27
- package/es/date-picker/DatePicker.js +28 -23
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/date-picker.less +22 -20
- package/es/date-picker/src/day-picker-panel.js +41 -34
- package/es/date-picker/src/month-picker-panel.js +27 -21
- package/es/date-picker/src/panel-header.js +16 -11
- package/es/date-picker/src/year-picker-panel.js +17 -9
- package/es/dialog/Dialog.js +36 -40
- package/es/divider/Divider.js +16 -12
- package/es/form/Form.js +11 -8
- package/es/form-details/FormDetails.js +27 -22
- package/es/icon/Icon.js +8 -1
- package/es/image/Image.js +19 -12
- package/es/image-preview/ImagePreview.js +35 -34
- package/es/index-anchor/IndexAnchor.js +8 -1
- package/es/index-bar/IndexBar.js +22 -20
- package/es/index.js +10 -0
- package/es/input/Input.js +45 -44
- package/es/lazy/index.js +2 -1
- package/es/less.js +2 -0
- package/es/list/List.js +39 -38
- package/es/loading/Loading.js +31 -23
- package/es/loading/loading.css +1 -1
- package/es/loading/loading.less +32 -32
- package/es/menu/Menu.js +12 -10
- package/es/option/Option.js +16 -11
- package/es/pagination/Pagination.js +34 -44
- package/es/pagination/pagination.css +1 -1
- package/es/pagination/pagination.less +8 -8
- package/es/picker/Picker.js +51 -47
- package/es/popup/Popup.js +9 -5
- package/es/progress/Progress.js +44 -35
- package/es/progress/progress.css +1 -1
- package/es/progress/progress.less +12 -12
- package/es/pull-refresh/PullRefresh.js +13 -10
- package/es/radio/Radio.js +25 -25
- package/es/radio-group/RadioGroup.js +19 -19
- package/es/rate/Rate.js +27 -25
- package/es/ripple/index.js +6 -2
- package/es/row/Row.js +11 -4
- package/es/select/Select.js +53 -54
- package/es/skeleton/Skeleton.js +70 -81
- package/es/slider/Slider.js +44 -40
- package/es/slider/slider.css +1 -1
- package/es/slider/slider.less +5 -5
- package/es/snackbar/Snackbar.js +9 -5
- package/es/snackbar/core.js +20 -26
- package/es/snackbar/snackbar.css +1 -1
- package/es/snackbar/snackbar.less +66 -68
- package/es/space/Space.js +8 -3
- package/es/step/Step.js +25 -23
- package/es/step/step.css +1 -1
- package/es/step/step.less +10 -10
- package/es/steps/Steps.js +12 -5
- package/es/sticky/Sticky.js +14 -7
- package/es/style-provider/StyleProvider.js +6 -2
- package/es/style.css +1 -1
- package/es/style.js +2 -0
- package/es/swipe/Swipe.js +22 -16
- package/es/swipe-item/SwipeItem.js +9 -4
- package/es/switch/Switch.js +25 -23
- package/es/switch/switch.css +1 -1
- package/es/switch/switch.less +2 -2
- package/es/tab/Tab.js +8 -1
- package/es/tab-item/TabItem.js +8 -1
- package/es/table/Table.js +27 -20
- package/es/tabs/Tabs.js +16 -11
- package/es/tabs-items/TabsItems.js +10 -5
- package/es/themes/dark/bottomNavigation.js +4 -0
- package/es/themes/dark/bottomNavigationItem.js +3 -0
- package/es/themes/dark/index.js +3 -1
- package/es/time-picker/TimePicker.js +47 -38
- package/es/time-picker/clock.js +26 -22
- package/es/time-picker/timePicker.css +1 -1
- package/es/time-picker/timePicker.less +11 -11
- package/es/umdIndex.js +10 -0
- package/es/uploader/Uploader.js +62 -57
- package/es/utils/components.js +35 -0
- package/es/varlet.esm.js +2082 -1527
- package/highlight/attributes.json +48 -0
- package/highlight/tags.json +20 -0
- package/highlight/web-types.json +155 -1
- package/lib/action-sheet/ActionSheet.js +30 -26
- package/lib/app-bar/AppBar.js +31 -24
- package/lib/back-top/BackTop.js +11 -2
- package/lib/badge/Badge.js +23 -13
- package/lib/bottom-navigation/BottomNavigation.js +183 -0
- package/lib/bottom-navigation/BottomNavigationSfc.css +0 -0
- package/lib/bottom-navigation/BottomNavigationSfc.less +0 -0
- package/lib/bottom-navigation/bottomNavigation.css +1 -0
- package/lib/bottom-navigation/bottomNavigation.less +49 -0
- package/lib/bottom-navigation/index.js +17 -0
- package/lib/bottom-navigation/props.js +45 -0
- package/lib/bottom-navigation/provide.js +27 -0
- package/lib/bottom-navigation/style/index.js +4 -0
- package/lib/bottom-navigation/style/less.js +4 -0
- package/lib/bottom-navigation-item/BottomNavigationItem.js +140 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.css +0 -0
- package/lib/bottom-navigation-item/BottomNavigationItemSfc.less +0 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.css +1 -0
- package/lib/bottom-navigation-item/bottomNavigationItem.less +78 -0
- package/lib/bottom-navigation-item/index.js +17 -0
- package/lib/bottom-navigation-item/props.js +27 -0
- package/lib/bottom-navigation-item/provide.js +28 -0
- package/lib/bottom-navigation-item/style/index.js +6 -0
- package/lib/bottom-navigation-item/style/less.js +6 -0
- package/lib/button/Button.js +13 -4
- package/lib/card/Card.js +34 -27
- package/lib/cell/Cell.js +26 -13
- package/lib/checkbox/Checkbox.js +26 -23
- package/lib/checkbox-group/CheckboxGroup.js +19 -22
- package/lib/chip/Chip.js +18 -7
- package/lib/chip/chip.css +1 -1
- package/lib/chip/chip.less +11 -11
- package/lib/col/Col.js +14 -5
- package/lib/collapse/Collapse.js +15 -10
- package/lib/collapse-item/CollapseItem.js +31 -28
- package/lib/collapse-item/collapseItem.css +1 -1
- package/lib/collapse-item/collapseItem.less +16 -16
- package/lib/countdown/Countdown.js +14 -10
- package/lib/counter/Counter.js +29 -26
- package/lib/date-picker/DatePicker.js +30 -23
- package/lib/date-picker/date-picker.css +1 -1
- package/lib/date-picker/date-picker.less +22 -20
- package/lib/date-picker/src/day-picker-panel.js +41 -32
- package/lib/date-picker/src/month-picker-panel.js +27 -19
- package/lib/date-picker/src/panel-header.js +16 -9
- package/lib/date-picker/src/year-picker-panel.js +19 -9
- package/lib/dialog/Dialog.js +36 -38
- package/lib/divider/Divider.js +16 -10
- package/lib/form/Form.js +11 -6
- package/lib/form-details/FormDetails.js +27 -20
- package/lib/icon/Icon.js +10 -1
- package/lib/image/Image.js +20 -11
- package/lib/image-preview/ImagePreview.js +35 -33
- package/lib/index-anchor/IndexAnchor.js +10 -1
- package/lib/index-bar/IndexBar.js +24 -20
- package/lib/index.js +6 -0
- package/lib/input/Input.js +45 -43
- package/lib/lazy/index.js +3 -1
- package/lib/less.js +2 -0
- package/lib/list/List.js +39 -36
- package/lib/loading/Loading.js +33 -23
- package/lib/loading/loading.css +1 -1
- package/lib/loading/loading.less +32 -32
- package/lib/menu/Menu.js +12 -9
- package/lib/option/Option.js +16 -9
- package/lib/pagination/Pagination.js +36 -44
- package/lib/pagination/pagination.css +1 -1
- package/lib/pagination/pagination.less +8 -8
- package/lib/picker/Picker.js +51 -46
- package/lib/popup/Popup.js +9 -4
- package/lib/progress/Progress.js +45 -34
- package/lib/progress/progress.css +1 -1
- package/lib/progress/progress.less +12 -12
- package/lib/pull-refresh/PullRefresh.js +14 -10
- package/lib/radio/Radio.js +23 -22
- package/lib/radio-group/RadioGroup.js +17 -16
- package/lib/rate/Rate.js +27 -24
- package/lib/ripple/index.js +7 -2
- package/lib/row/Row.js +12 -3
- package/lib/select/Select.js +53 -53
- package/lib/skeleton/Skeleton.js +69 -78
- package/lib/slider/Slider.js +42 -38
- package/lib/slider/slider.css +1 -1
- package/lib/slider/slider.less +5 -5
- package/lib/snackbar/Snackbar.js +9 -4
- package/lib/snackbar/core.js +20 -25
- package/lib/snackbar/snackbar.css +1 -1
- package/lib/snackbar/snackbar.less +66 -68
- package/lib/space/Space.js +9 -3
- package/lib/step/Step.js +26 -22
- package/lib/step/step.css +1 -1
- package/lib/step/step.less +10 -10
- package/lib/steps/Steps.js +13 -4
- package/lib/sticky/Sticky.js +15 -6
- package/lib/style-provider/StyleProvider.js +8 -2
- package/lib/style.css +1 -1
- package/lib/style.js +2 -0
- package/lib/swipe/Swipe.js +23 -16
- package/lib/swipe-item/SwipeItem.js +10 -3
- package/lib/switch/Switch.js +23 -20
- package/lib/switch/switch.css +1 -1
- package/lib/switch/switch.less +2 -2
- package/lib/tab/Tab.js +10 -1
- package/lib/tab-item/TabItem.js +10 -1
- package/lib/table/Table.js +27 -18
- package/lib/tabs/Tabs.js +18 -11
- package/lib/tabs-items/TabsItems.js +11 -4
- package/lib/themes/dark/bottomNavigation.js +9 -0
- package/lib/themes/dark/bottomNavigationItem.js +8 -0
- package/lib/themes/dark/index.js +5 -1
- package/lib/time-picker/TimePicker.js +49 -38
- package/lib/time-picker/clock.js +26 -20
- package/lib/time-picker/timePicker.css +1 -1
- package/lib/time-picker/timePicker.less +11 -11
- package/lib/uploader/Uploader.js +60 -55
- package/lib/utils/components.js +39 -0
- package/package.json +4 -4
- package/types/bottomNavigation.d.ts +19 -0
- package/types/bottomNavigationItem.d.ts +16 -0
- package/types/global.d.ts +2 -0
- package/types/index.d.ts +2 -0
- package/umd/varlet.js +4 -4
package/es/lazy/index.js
CHANGED
|
@@ -6,6 +6,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
6
6
|
|
|
7
7
|
import { getAllParentScroller, inViewport } from '../utils/elements';
|
|
8
8
|
import { createCache, removeItem, throttle } from '../utils/shared';
|
|
9
|
+
import { call } from '../utils/components';
|
|
9
10
|
var BACKGROUND_IMAGE_ARG_NAME = 'background-image';
|
|
10
11
|
var LAZY_LOADING = 'lazy-loading';
|
|
11
12
|
var LAZY_ERROR = 'lazy-error';
|
|
@@ -93,7 +94,7 @@ function createLazy(el, binding) {
|
|
|
93
94
|
attemptLock: false
|
|
94
95
|
}, lazyOptions);
|
|
95
96
|
setSRC(el, PIXEL);
|
|
96
|
-
defaultLazyOptions.filter
|
|
97
|
+
call(defaultLazyOptions.filter, el._lazy);
|
|
97
98
|
}
|
|
98
99
|
|
|
99
100
|
function createImage(el, attemptSRC) {
|
package/es/less.js
CHANGED
|
@@ -2,6 +2,8 @@ import './action-sheet/style/less'
|
|
|
2
2
|
import './app-bar/style/less'
|
|
3
3
|
import './back-top/style/less'
|
|
4
4
|
import './badge/style/less'
|
|
5
|
+
import './bottom-navigation/style/less'
|
|
6
|
+
import './bottom-navigation-item/style/less'
|
|
5
7
|
import './button/style/less'
|
|
6
8
|
import './card/style/less'
|
|
7
9
|
import './cell/style/less'
|
package/es/list/List.js
CHANGED
|
@@ -8,57 +8,58 @@ import { defineComponent, onMounted, onUnmounted, ref, nextTick } from 'vue';
|
|
|
8
8
|
import { getParentScroller, toPxNum } from '../utils/elements';
|
|
9
9
|
import { props } from './props';
|
|
10
10
|
import { isNumber, dt } from '../utils/shared';
|
|
11
|
+
import { createNamespace, call } from '../utils/components';
|
|
11
12
|
import { pack } from '../locale';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class: "var-list var--box",
|
|
18
|
-
ref: "listEl"
|
|
19
|
-
};
|
|
20
|
-
var _hoisted_2 = {
|
|
21
|
-
class: "var-list__loading"
|
|
22
|
-
};
|
|
23
|
-
var _hoisted_3 = {
|
|
24
|
-
class: "var-list__loading-text"
|
|
25
|
-
};
|
|
26
|
-
var _hoisted_4 = {
|
|
27
|
-
class: "var-list__finished"
|
|
28
|
-
};
|
|
29
|
-
var _hoisted_5 = {
|
|
30
|
-
class: "var-list__detector",
|
|
31
|
-
ref: "detectorEl"
|
|
32
|
-
};
|
|
13
|
+
var {
|
|
14
|
+
n,
|
|
15
|
+
classes
|
|
16
|
+
} = createNamespace('list');
|
|
17
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective, openBlock as _openBlock, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
33
18
|
export function render(_ctx, _cache) {
|
|
34
19
|
var _component_var_loading = _resolveComponent("var-loading");
|
|
35
20
|
|
|
36
21
|
var _directive_ripple = _resolveDirective("ripple");
|
|
37
22
|
|
|
38
|
-
return _openBlock(), _createElementBlock("div",
|
|
23
|
+
return _openBlock(), _createElementBlock("div", {
|
|
24
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box')),
|
|
25
|
+
ref: "listEl"
|
|
26
|
+
}, [_renderSlot(_ctx.$slots, "default"), _ctx.loading ? _renderSlot(_ctx.$slots, "loading", {
|
|
39
27
|
key: 0
|
|
40
|
-
}, () => [_createElementVNode("div",
|
|
41
|
-
|
|
28
|
+
}, () => [_createElementVNode("div", {
|
|
29
|
+
class: _normalizeClass(_ctx.n('loading'))
|
|
30
|
+
}, [_createElementVNode("div", {
|
|
31
|
+
class: _normalizeClass(_ctx.n('loading-text'))
|
|
32
|
+
}, _toDisplayString(_ctx.dt(_ctx.loadingText, _ctx.pack.listLoadingText)), 3
|
|
33
|
+
/* TEXT, CLASS */
|
|
42
34
|
), _createVNode(_component_var_loading, {
|
|
43
35
|
size: "mini",
|
|
44
36
|
radius: 10
|
|
45
|
-
})]
|
|
37
|
+
})], 2
|
|
38
|
+
/* CLASS */
|
|
39
|
+
)]) : _createCommentVNode("v-if", true), _ctx.finished ? _renderSlot(_ctx.$slots, "finished", {
|
|
46
40
|
key: 1
|
|
47
|
-
}, () => [_createElementVNode("div",
|
|
48
|
-
|
|
41
|
+
}, () => [_createElementVNode("div", {
|
|
42
|
+
class: _normalizeClass(_ctx.n('finished'))
|
|
43
|
+
}, _toDisplayString(_ctx.dt(_ctx.finishedText, _ctx.pack.listFinishedText)), 3
|
|
44
|
+
/* TEXT, CLASS */
|
|
49
45
|
)]) : _createCommentVNode("v-if", true), _ctx.error ? _renderSlot(_ctx.$slots, "error", {
|
|
50
46
|
key: 2
|
|
51
47
|
}, () => [_withDirectives((_openBlock(), _createElementBlock("div", {
|
|
52
|
-
class:
|
|
48
|
+
class: _normalizeClass(_ctx.n('error')),
|
|
53
49
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
54
50
|
return _ctx.load && _ctx.load(...arguments);
|
|
55
51
|
})
|
|
56
52
|
}, [_createTextVNode(_toDisplayString(_ctx.dt(_ctx.errorText, _ctx.pack.listErrorText)), 1
|
|
57
53
|
/* TEXT */
|
|
58
|
-
)]
|
|
59
|
-
/*
|
|
60
|
-
)],
|
|
61
|
-
|
|
54
|
+
)], 2
|
|
55
|
+
/* CLASS */
|
|
56
|
+
)), [[_directive_ripple]])]) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
57
|
+
class: _normalizeClass(_ctx.n('detector')),
|
|
58
|
+
ref: "detectorEl"
|
|
59
|
+
}, null, 2
|
|
60
|
+
/* CLASS */
|
|
61
|
+
)], 2
|
|
62
|
+
/* CLASS */
|
|
62
63
|
);
|
|
63
64
|
}
|
|
64
65
|
export default defineComponent({
|
|
@@ -78,11 +79,9 @@ export default defineComponent({
|
|
|
78
79
|
var scroller;
|
|
79
80
|
|
|
80
81
|
var load = () => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
(
|
|
84
|
-
(_props$onUpdateLoadi = props['onUpdate:loading']) == null ? void 0 : _props$onUpdateLoadi.call(props, true);
|
|
85
|
-
props.onLoad == null ? void 0 : props.onLoad();
|
|
82
|
+
call(props['onUpdate:error'], false);
|
|
83
|
+
call(props['onUpdate:loading'], true);
|
|
84
|
+
call(props.onLoad);
|
|
86
85
|
};
|
|
87
86
|
|
|
88
87
|
var isReachBottom = () => {
|
|
@@ -130,7 +129,9 @@ export default defineComponent({
|
|
|
130
129
|
dt,
|
|
131
130
|
isNumber,
|
|
132
131
|
load,
|
|
133
|
-
check
|
|
132
|
+
check,
|
|
133
|
+
n,
|
|
134
|
+
classes
|
|
134
135
|
};
|
|
135
136
|
}
|
|
136
137
|
|
package/es/loading/Loading.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { computed, defineComponent } from 'vue';
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { toNumber } from '../utils/shared';
|
|
4
|
+
import { createNamespace, call } from '../utils/components';
|
|
5
|
+
var {
|
|
6
|
+
n,
|
|
7
|
+
classes
|
|
8
|
+
} = createNamespace('loading');
|
|
4
9
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
5
10
|
|
|
6
11
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
7
12
|
|
|
8
|
-
var _hoisted_1 = {
|
|
9
|
-
class: "var-loading"
|
|
10
|
-
};
|
|
11
|
-
var _hoisted_2 = {
|
|
12
|
-
key: 0,
|
|
13
|
-
class: "var-loading__circle"
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var _hoisted_3 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode("svg", {
|
|
13
|
+
var _hoisted_1 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode("svg", {
|
|
17
14
|
viewBox: "25 25 50 50"
|
|
18
15
|
}, [/*#__PURE__*/_createElementVNode("circle", {
|
|
19
16
|
cx: "50",
|
|
@@ -24,38 +21,45 @@ var _hoisted_3 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNod
|
|
|
24
21
|
/* HOISTED */
|
|
25
22
|
));
|
|
26
23
|
|
|
27
|
-
var
|
|
24
|
+
var _hoisted_2 = [_hoisted_1];
|
|
28
25
|
export function render(_ctx, _cache) {
|
|
29
|
-
return _openBlock(), _createElementBlock("div",
|
|
26
|
+
return _openBlock(), _createElementBlock("div", {
|
|
27
|
+
class: _normalizeClass(_ctx.n())
|
|
28
|
+
}, [_ctx.$slots.default ? (_openBlock(), _createElementBlock("div", {
|
|
30
29
|
key: 0,
|
|
31
|
-
class: _normalizeClass(
|
|
30
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('content'), [_ctx.loading, _ctx.n('content--active')]))
|
|
32
31
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
33
32
|
/* CLASS */
|
|
34
33
|
)) : _createCommentVNode("v-if", true), _ctx.isShow ? (_openBlock(), _createElementBlock("div", {
|
|
35
34
|
key: 1,
|
|
36
|
-
class: _normalizeClass(
|
|
37
|
-
}, [_ctx.type === 'circle' ? (_openBlock(), _createElementBlock("div",
|
|
38
|
-
|
|
35
|
+
class: _normalizeClass(_ctx.classes('var--box', _ctx.n('body'), [_ctx.$slots.default, _ctx.n('inside')]))
|
|
36
|
+
}, [_ctx.type === 'circle' ? (_openBlock(), _createElementBlock("div", {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: _normalizeClass(_ctx.n('circle'))
|
|
39
|
+
}, [_createElementVNode("span", {
|
|
40
|
+
class: _normalizeClass(_ctx.n('circle-block')),
|
|
39
41
|
style: _normalizeStyle({
|
|
40
42
|
width: _ctx.getRadius * 2 + 'px',
|
|
41
43
|
height: _ctx.getRadius * 2 + 'px',
|
|
42
44
|
color: _ctx.color
|
|
43
45
|
})
|
|
44
|
-
},
|
|
45
|
-
/* STYLE */
|
|
46
|
-
)]
|
|
46
|
+
}, _hoisted_2, 6
|
|
47
|
+
/* CLASS, STYLE */
|
|
48
|
+
)], 2
|
|
49
|
+
/* CLASS */
|
|
50
|
+
)) : _createCommentVNode("v-if", true), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.loadingTypeDict, (nums, key) => {
|
|
47
51
|
return _openBlock(), _createElementBlock(_Fragment, {
|
|
48
52
|
key: key
|
|
49
53
|
}, [_ctx.type === key ? (_openBlock(), _createElementBlock("div", {
|
|
50
54
|
key: 0,
|
|
51
|
-
class: _normalizeClass(
|
|
55
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(key), _ctx.n(key + "--" + _ctx.size)))
|
|
52
56
|
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(nums, num => {
|
|
53
57
|
return _openBlock(), _createElementBlock("div", {
|
|
54
58
|
key: num + key,
|
|
55
59
|
style: _normalizeStyle({
|
|
56
60
|
backgroundColor: _ctx.color
|
|
57
61
|
}),
|
|
58
|
-
class: _normalizeClass(
|
|
62
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(key + "-item"), _ctx.n(key + "-item--" + _ctx.size)))
|
|
59
63
|
}, null, 6
|
|
60
64
|
/* CLASS, STYLE */
|
|
61
65
|
);
|
|
@@ -70,7 +74,7 @@ export function render(_ctx, _cache) {
|
|
|
70
74
|
/* KEYED_FRAGMENT */
|
|
71
75
|
)), _ctx.$slots.description || _ctx.description ? (_openBlock(), _createElementBlock("div", {
|
|
72
76
|
key: 1,
|
|
73
|
-
class: _normalizeClass(
|
|
77
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('description'), _ctx.n("description--" + _ctx.size))),
|
|
74
78
|
style: _normalizeStyle({
|
|
75
79
|
color: _ctx.color
|
|
76
80
|
})
|
|
@@ -80,7 +84,9 @@ export function render(_ctx, _cache) {
|
|
|
80
84
|
/* CLASS, STYLE */
|
|
81
85
|
)) : _createCommentVNode("v-if", true)], 2
|
|
82
86
|
/* CLASS */
|
|
83
|
-
)) : _createCommentVNode("v-if", true)]
|
|
87
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
88
|
+
/* CLASS */
|
|
89
|
+
);
|
|
84
90
|
}
|
|
85
91
|
export default defineComponent({
|
|
86
92
|
render,
|
|
@@ -107,10 +113,12 @@ export default defineComponent({
|
|
|
107
113
|
return props.radius ? toNumber(props.radius) : sizeDict[props.size];
|
|
108
114
|
});
|
|
109
115
|
var isShow = computed(() => {
|
|
110
|
-
if (!(slots.default
|
|
116
|
+
if (!call(slots.default)) return true;
|
|
111
117
|
return props.loading;
|
|
112
118
|
});
|
|
113
119
|
return {
|
|
120
|
+
n,
|
|
121
|
+
classes,
|
|
114
122
|
loadingTypeDict,
|
|
115
123
|
getRadius,
|
|
116
124
|
isShow
|
package/es/loading/loading.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { position: relative;}.var-loading__content { transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity); user-select: none;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: currentColor; margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: 16px;}.var-loading__description--normal { font-size: 14px;}.var-loading__description--small { font-size: 12px;}.var-loading__description--mini { font-size: 10px;}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; animation: circle 1.8s linear infinite;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { display: flex; align-items: center; justify-content: center;}.var-loading__wave
|
|
1
|
+
:root { --loading-opacity: 0.38; --loading-desc-margin: 8px 0 0;}.var-loading { position: relative;}.var-loading__content { transition: opacity 0.3s; opacity: 1;}.var-loading__content--active { opacity: var(--loading-opacity); user-select: none;}.var-loading__body { display: flex; justify-content: center; align-items: center; height: 100%; flex-direction: column;}.var-loading__inside { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1;}.var-loading__description { color: currentColor; margin: var(--loading-desc-margin);}.var-loading__description--large { font-size: 16px;}.var-loading__description--normal { font-size: 14px;}.var-loading__description--small { font-size: 12px;}.var-loading__description--mini { font-size: 10px;}.var-loading__circle { display: flex;}.var-loading__circle-block { display: inline-block; animation: circle 1.8s linear infinite;}.var-loading__circle-block svg { display: block; width: 100%; height: 100%;}.var-loading__circle-block svg circle { animation: circular 1.5s ease-in-out infinite; stroke: currentColor; stroke-width: 3; stroke-linecap: round;}@keyframes circle { from { transform: rotate(0deg); } to { transform: rotate(360deg); }}@keyframes circular { 0% { stroke-dasharray: 1, 200; stroke-dashoffset: 0; } 50% { stroke-dasharray: 90, 150; stroke-dashoffset: -40; } 100% { stroke-dasharray: 90, 150; stroke-dashoffset: -120; }}.var-loading__wave { display: flex; align-items: center; justify-content: center;}.var-loading__wave--large { width: 64px; height: 18px;}.var-loading__wave--normal { width: 50px; height: 16px;}.var-loading__wave--small { width: 36px; height: 14px;}.var-loading__wave--mini { width: 22px; height: 12px;}.var-loading__wave-item { height: 100%; display: inline-block; animation: 1.2s ease-in-out infinite wave;}.var-loading__wave-item:nth-child(1) { animation-delay: -1.2s; margin-left: 0;}.var-loading__wave-item:nth-child(2) { animation-delay: -1.1s;}.var-loading__wave-item:nth-child(3) { animation-delay: -1s;}.var-loading__wave-item:nth-child(4) { animation-delay: -0.9s;}.var-loading__wave-item:nth-child(5) { animation-delay: -0.8s;}.var-loading__wave-item--large { width: 5px; margin-left: 5px;}.var-loading__wave-item--normal { width: 4px; margin-left: 4px;}.var-loading__wave-item--small { width: 3px; margin-left: 3px;}.var-loading__wave-item--mini { width: 2px; margin-left: 2px;}@keyframes wave { 0%, 40%, 100% { transform: scaleY(0.4); } 20% { transform: scaleY(1); }}.var-loading__cube { display: flex; align-items: center;}.var-loading__cube--large { width: 64px; height: 18px;}.var-loading__cube--normal { width: 50px; height: 16px;}.var-loading__cube--small { width: 36px; height: 14px;}.var-loading__cube--mini { width: 22px; height: 12px;}.var-loading__cube-item { display: inline-block; transform-origin: right bottom; animation: 1.5s ease infinite cube;}.var-loading__cube-item:nth-child(1) { animation-delay: 0.2s; margin-left: 0;}.var-loading__cube-item:nth-child(2) { animation-delay: 0.4s;}.var-loading__cube-item:nth-child(3) { animation-delay: 0.6s;}.var-loading__cube-item:nth-child(4) { animation-delay: 0.8s;}.var-loading__cube-item--large { height: 10px; width: 10px; margin-left: 5px;}.var-loading__cube-item--normal { height: 8px; width: 8px; margin-left: 4px;}.var-loading__cube-item--small { height: 6px; width: 6px; margin-left: 3px;}.var-loading__cube-item--mini { height: 4px; width: 4px; margin-left: 2px;}@keyframes cube { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: rotate(90deg) scale(0.3); }}.var-loading__rect { display: flex; flex-wrap: nowrap; justify-content: center; align-items: center;}.var-loading__rect--large { width: 64px; height: 18px;}.var-loading__rect--normal { width: 50px; height: 16px;}.var-loading__rect--small { width: 36px; height: 14px;}.var-loading__rect--mini { width: 22px; height: 12px;}.var-loading__rect-item { animation: 2s ease-in-out infinite rect;}.var-loading__rect-item:nth-child(1) { animation-delay: 1.75s;}.var-loading__rect-item:nth-child(2) { animation-delay: 1.5s;}.var-loading__rect-item:nth-child(3) { animation-delay: 1.25s;}.var-loading__rect-item:nth-child(4) { animation-delay: 1s;}.var-loading__rect-item:nth-child(5) { animation-delay: 0.75s;}.var-loading__rect-item:nth-child(6) { animation-delay: 0.5s;}.var-loading__rect-item:nth-child(7) { animation-delay: 0.25s;}.var-loading__rect-item:nth-child(8) { animation-delay: 0s;}.var-loading__rect-item--large { height: 100%; width: 8px;}.var-loading__rect-item--normal { height: 90%; width: 6.4px;}.var-loading__rect-item--small { height: 80%; width: 4.8px;}.var-loading__rect-item--mini { height: 70%; width: 3.2px;}@keyframes rect { 0% { opacity: 0.3; } 25% { opacity: 1; } 50% { opacity: 0.3; } 65% { opacity: 1; } 100% { opacity: 0.3; }}.var-loading__disappear { display: flex; justify-content: space-around; align-items: center; flex-flow: nowrap;}.var-loading__disappear--large { width: 64px; height: 18px;}.var-loading__disappear--normal { width: 50px; height: 16px;}.var-loading__disappear--small { width: 36px; height: 14px;}.var-loading__disappear--mini { width: 22px; height: 12px;}.var-loading__disappear-item { border-radius: 50%; animation: 0.5s ease-in-out infinite alternate disappear;}.var-loading__disappear-item:nth-child(1) { animation-delay: -0.4s;}.var-loading__disappear-item:nth-child(2) { animation-delay: -0.2s;}.var-loading__disappear-item:nth-child(3) { animation-delay: 0s;}.var-loading__disappear-item--large { height: 15px; width: 15px;}.var-loading__disappear-item--normal { height: 12px; width: 12px;}.var-loading__disappear-item--small { height: 9px; width: 9px;}.var-loading__disappear-item--mini { height: 6px; width: 6px;}@keyframes disappear { 0% { opacity: 1; } 100% { opacity: 0; }}
|
package/es/loading/loading.less
CHANGED
|
@@ -124,22 +124,22 @@
|
|
|
124
124
|
align-items: center;
|
|
125
125
|
justify-content: center;
|
|
126
126
|
|
|
127
|
-
|
|
127
|
+
&--large {
|
|
128
128
|
width: @loading-large-width;
|
|
129
129
|
height: @loading-large-height;
|
|
130
130
|
}
|
|
131
131
|
|
|
132
|
-
|
|
132
|
+
&--normal {
|
|
133
133
|
width: @loading-normal-width;
|
|
134
134
|
height: @loading-normal-height;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
&--small {
|
|
138
138
|
width: @loading-small-width;
|
|
139
139
|
height: @loading-small-height;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
&--mini {
|
|
143
143
|
width: @loading-mini-width;
|
|
144
144
|
height: @loading-mini-height;
|
|
145
145
|
}
|
|
@@ -171,22 +171,22 @@
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
&-item
|
|
174
|
+
&-item--large {
|
|
175
175
|
width: @loading-wave-size-item-width;
|
|
176
176
|
margin-left: @loading-wave-size-item-margin;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
&-item
|
|
179
|
+
&-item--normal {
|
|
180
180
|
width: @loading-wave-size-item-width - 1;
|
|
181
181
|
margin-left: @loading-wave-size-item-margin - 1;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
&-item
|
|
184
|
+
&-item--small {
|
|
185
185
|
width: @loading-wave-size-item-width - 2;
|
|
186
186
|
margin-left: @loading-wave-size-item-margin - 2;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
&-item
|
|
189
|
+
&-item--mini {
|
|
190
190
|
width: @loading-wave-size-item-width - 3;
|
|
191
191
|
margin-left: @loading-wave-size-item-margin - 3;
|
|
192
192
|
}
|
|
@@ -211,22 +211,22 @@
|
|
|
211
211
|
display: flex;
|
|
212
212
|
align-items: center;
|
|
213
213
|
|
|
214
|
-
|
|
214
|
+
&--large {
|
|
215
215
|
width: @loading-large-width;
|
|
216
216
|
height: @loading-large-height;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
|
|
219
|
+
&--normal {
|
|
220
220
|
width: @loading-normal-width;
|
|
221
221
|
height: @loading-normal-height;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
&--small {
|
|
225
225
|
width: @loading-small-width;
|
|
226
226
|
height: @loading-small-height;
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
-
|
|
229
|
+
&--mini {
|
|
230
230
|
width: @loading-mini-width;
|
|
231
231
|
height: @loading-mini-height;
|
|
232
232
|
}
|
|
@@ -254,25 +254,25 @@
|
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
|
|
257
|
-
&-item
|
|
257
|
+
&-item--large {
|
|
258
258
|
height: @loading-cube-size-item-height;
|
|
259
259
|
width: @loading-cube-size-item-width;
|
|
260
260
|
margin-left: @loading-cube-size-item-margin;
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
-
&-item
|
|
263
|
+
&-item--normal {
|
|
264
264
|
height: @loading-cube-size-item-height - 2;
|
|
265
265
|
width: @loading-cube-size-item-width - 2;
|
|
266
266
|
margin-left: @loading-cube-size-item-margin - 1;
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
&-item
|
|
269
|
+
&-item--small {
|
|
270
270
|
height: @loading-cube-size-item-height - 4;
|
|
271
271
|
width: @loading-cube-size-item-width - 4;
|
|
272
272
|
margin-left: @loading-cube-size-item-margin - 2;
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
-
&-item
|
|
275
|
+
&-item--mini {
|
|
276
276
|
height: @loading-cube-size-item-height - 6;
|
|
277
277
|
width: @loading-cube-size-item-width - 6;
|
|
278
278
|
margin-left: @loading-cube-size-item-margin - 3;
|
|
@@ -299,22 +299,22 @@
|
|
|
299
299
|
justify-content: center;
|
|
300
300
|
align-items: center;
|
|
301
301
|
|
|
302
|
-
|
|
302
|
+
&--large {
|
|
303
303
|
width: @loading-large-width;
|
|
304
304
|
height: @loading-large-height;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
|
|
307
|
+
&--normal {
|
|
308
308
|
width: @loading-normal-width;
|
|
309
309
|
height: @loading-normal-height;
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
&--small {
|
|
313
313
|
width: @loading-small-width;
|
|
314
314
|
height: @loading-small-height;
|
|
315
315
|
}
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
&--mini {
|
|
318
318
|
width: @loading-mini-width;
|
|
319
319
|
height: @loading-mini-height;
|
|
320
320
|
}
|
|
@@ -355,22 +355,22 @@
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
&-item
|
|
358
|
+
&-item--large {
|
|
359
359
|
height: @loading-rect-size-item-height;
|
|
360
360
|
width: @loading-rect-size-item-width;
|
|
361
361
|
}
|
|
362
362
|
|
|
363
|
-
&-item
|
|
363
|
+
&-item--normal {
|
|
364
364
|
height: @loading-rect-size-item-height * 0.9;
|
|
365
365
|
width: @loading-rect-size-item-width * 0.8;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
&-item
|
|
368
|
+
&-item--small {
|
|
369
369
|
height: @loading-rect-size-item-height * 0.8;
|
|
370
370
|
width: @loading-rect-size-item-width * 0.6;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
&-item
|
|
373
|
+
&-item--mini {
|
|
374
374
|
height: @loading-rect-size-item-height * 0.7;
|
|
375
375
|
width: @loading-rect-size-item-width * 0.4;
|
|
376
376
|
}
|
|
@@ -403,22 +403,22 @@
|
|
|
403
403
|
align-items: center;
|
|
404
404
|
flex-flow: nowrap;
|
|
405
405
|
|
|
406
|
-
|
|
406
|
+
&--large {
|
|
407
407
|
width: @loading-large-width;
|
|
408
408
|
height: @loading-large-height;
|
|
409
409
|
}
|
|
410
410
|
|
|
411
|
-
|
|
411
|
+
&--normal {
|
|
412
412
|
width: @loading-normal-width;
|
|
413
413
|
height: @loading-normal-height;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
|
|
416
|
+
&--small {
|
|
417
417
|
width: @loading-small-width;
|
|
418
418
|
height: @loading-small-height;
|
|
419
419
|
}
|
|
420
420
|
|
|
421
|
-
|
|
421
|
+
&--mini {
|
|
422
422
|
width: @loading-mini-width;
|
|
423
423
|
height: @loading-mini-height;
|
|
424
424
|
}
|
|
@@ -440,22 +440,22 @@
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
|
|
443
|
-
&-item
|
|
443
|
+
&-item--large {
|
|
444
444
|
height: @loading-disappear-size-item-height;
|
|
445
445
|
width: @loading-disappear-size-item-width;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
-
&-item
|
|
448
|
+
&-item--normal {
|
|
449
449
|
height: @loading-disappear-size-item-height * 0.8;
|
|
450
450
|
width: @loading-disappear-size-item-width * 0.8;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
-
&-item
|
|
453
|
+
&-item--small {
|
|
454
454
|
height: @loading-disappear-size-item-height * 0.6;
|
|
455
455
|
width: @loading-disappear-size-item-width * 0.6;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
&-item
|
|
458
|
+
&-item--mini {
|
|
459
459
|
height: @loading-disappear-size-item-height * 0.4;
|
|
460
460
|
width: @loading-disappear-size-item-width * 0.4;
|
|
461
461
|
}
|
package/es/menu/Menu.js
CHANGED
|
@@ -8,7 +8,7 @@ import { defineComponent, ref, computed, watch, onMounted, onUnmounted, Transiti
|
|
|
8
8
|
import { props } from './props';
|
|
9
9
|
import { getLeft, getTop, toSizeUnit } from '../utils/elements';
|
|
10
10
|
import { useZIndex } from '../context/zIndex';
|
|
11
|
-
import { exposeApis, useTeleport } from '../utils/components';
|
|
11
|
+
import { call, createNamespace, exposeApis, useTeleport } from '../utils/components';
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -17,6 +17,10 @@ function _isSlot(s) {
|
|
|
17
17
|
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
var {
|
|
21
|
+
n,
|
|
22
|
+
classes
|
|
23
|
+
} = createNamespace('menu');
|
|
20
24
|
export default defineComponent({
|
|
21
25
|
name: 'VarMenu',
|
|
22
26
|
props,
|
|
@@ -47,8 +51,6 @@ export default defineComponent({
|
|
|
47
51
|
};
|
|
48
52
|
|
|
49
53
|
var handleMenuClose = () => {
|
|
50
|
-
var _props$onUpdateShow;
|
|
51
|
-
|
|
52
54
|
if (clickSelf) {
|
|
53
55
|
clickSelf = false;
|
|
54
56
|
return;
|
|
@@ -58,7 +60,7 @@ export default defineComponent({
|
|
|
58
60
|
return;
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
(
|
|
63
|
+
call(props['onUpdate:show'], false);
|
|
62
64
|
}; // expose
|
|
63
65
|
|
|
64
66
|
|
|
@@ -77,18 +79,18 @@ export default defineComponent({
|
|
|
77
79
|
});
|
|
78
80
|
|
|
79
81
|
var renderTransition = () => _createVNode(Transition, {
|
|
80
|
-
"name":
|
|
82
|
+
"name": n(),
|
|
81
83
|
"onAfterEnter": props.onOpened,
|
|
82
84
|
"onAfterLeave": props.onClosed
|
|
83
85
|
}, {
|
|
84
86
|
default: () => [_withDirectives(_createVNode("div", {
|
|
85
|
-
"class":
|
|
87
|
+
"class": classes(n('menu'), 'var-elevation--3'),
|
|
86
88
|
"ref": menu,
|
|
87
89
|
"style": transitionStyle.value,
|
|
88
90
|
"onClick": event => {
|
|
89
91
|
event.stopPropagation();
|
|
90
92
|
}
|
|
91
|
-
}, [slots.menu
|
|
93
|
+
}, [call(slots.menu)]), [[_vShow, props.show]])]
|
|
92
94
|
});
|
|
93
95
|
|
|
94
96
|
watch(() => props.alignment, resize);
|
|
@@ -104,7 +106,7 @@ export default defineComponent({
|
|
|
104
106
|
resize();
|
|
105
107
|
}
|
|
106
108
|
|
|
107
|
-
newValue ? onOpen
|
|
109
|
+
newValue ? call(onOpen) : call(onClose);
|
|
108
110
|
});
|
|
109
111
|
|
|
110
112
|
return function (_x) {
|
|
@@ -132,10 +134,10 @@ export default defineComponent({
|
|
|
132
134
|
var _slot;
|
|
133
135
|
|
|
134
136
|
return _createVNode("div", {
|
|
135
|
-
"class":
|
|
137
|
+
"class": n(),
|
|
136
138
|
"ref": host,
|
|
137
139
|
"onClick": handleClick
|
|
138
|
-
}, [slots.default
|
|
140
|
+
}, [call(slots.default), to.value ? _createVNode(Teleport, {
|
|
139
141
|
"to": to.value,
|
|
140
142
|
"disabled": disabled.value
|
|
141
143
|
}, _isSlot(_slot = renderTransition()) ? _slot : {
|
package/es/option/Option.js
CHANGED
|
@@ -2,21 +2,20 @@ import VarCheckbox from '../checkbox';
|
|
|
2
2
|
import Ripple from '../ripple';
|
|
3
3
|
import { defineComponent, computed, ref, watch } from 'vue';
|
|
4
4
|
import { useSelect } from './provide';
|
|
5
|
+
import { createNamespace } from '../utils/components';
|
|
5
6
|
import { props } from './props';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class: "var-option__text var--ellipsis"
|
|
12
|
-
};
|
|
7
|
+
var {
|
|
8
|
+
n,
|
|
9
|
+
classes
|
|
10
|
+
} = createNamespace('option');
|
|
11
|
+
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, withModifiers as _withModifiers, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveDirective as _resolveDirective, createElementBlock as _createElementBlock, withDirectives as _withDirectives } from "vue";
|
|
13
12
|
export function render(_ctx, _cache) {
|
|
14
13
|
var _component_var_checkbox = _resolveComponent("var-checkbox");
|
|
15
14
|
|
|
16
15
|
var _directive_ripple = _resolveDirective("ripple");
|
|
17
16
|
|
|
18
17
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
19
|
-
class: _normalizeClass(
|
|
18
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box', [_ctx.optionSelected, _ctx.n('--selected-color')])),
|
|
20
19
|
style: _normalizeStyle({
|
|
21
20
|
width: _ctx.wrapWidth,
|
|
22
21
|
color: _ctx.optionSelected ? _ctx.focusColor : undefined
|
|
@@ -25,7 +24,7 @@ export function render(_ctx, _cache) {
|
|
|
25
24
|
return _ctx.handleClick && _ctx.handleClick(...arguments);
|
|
26
25
|
})
|
|
27
26
|
}, [_createElementVNode("div", {
|
|
28
|
-
class: _normalizeClass(
|
|
27
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('cover'), [_ctx.optionSelected, _ctx.n('--selected-background')])),
|
|
29
28
|
style: _normalizeStyle({
|
|
30
29
|
background: _ctx.optionSelected ? _ctx.focusColor : undefined
|
|
31
30
|
})
|
|
@@ -41,9 +40,13 @@ export function render(_ctx, _cache) {
|
|
|
41
40
|
onChange: _ctx.handleSelect
|
|
42
41
|
}, null, 8
|
|
43
42
|
/* PROPS */
|
|
44
|
-
, ["checked-color", "modelValue", "onChange"])) : _createCommentVNode("v-if", true), _createElementVNode("div",
|
|
43
|
+
, ["checked-color", "modelValue", "onChange"])) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
44
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('text'), 'var--ellipsis'))
|
|
45
|
+
}, [_renderSlot(_ctx.$slots, "default", {}, () => [_createTextVNode(_toDisplayString(_ctx.label), 1
|
|
45
46
|
/* TEXT */
|
|
46
|
-
)])]
|
|
47
|
+
)])], 2
|
|
48
|
+
/* CLASS */
|
|
49
|
+
)], 6
|
|
47
50
|
/* CLASS, STYLE */
|
|
48
51
|
)), [[_directive_ripple]]);
|
|
49
52
|
}
|
|
@@ -100,6 +103,8 @@ export default defineComponent({
|
|
|
100
103
|
});
|
|
101
104
|
bindSelect(optionProvider);
|
|
102
105
|
return {
|
|
106
|
+
n,
|
|
107
|
+
classes,
|
|
103
108
|
optionSelected,
|
|
104
109
|
wrapWidth,
|
|
105
110
|
multiple,
|