@varlet/ui 1.26.8 → 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/icon/icon.css +1 -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/icon/icon.css +1 -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/lib/collapse/Collapse.js
CHANGED
|
@@ -10,16 +10,20 @@ var _provide = require("./provide");
|
|
|
10
10
|
|
|
11
11
|
var _props = require("./props");
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _components = require("../utils/components");
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _shared = require("../utils/shared");
|
|
16
16
|
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
};
|
|
17
|
+
var {
|
|
18
|
+
n
|
|
19
|
+
} = (0, _components.createNamespace)('collapse');
|
|
20
20
|
|
|
21
21
|
function render(_ctx, _cache) {
|
|
22
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
22
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
23
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
24
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
25
|
+
/* CLASS */
|
|
26
|
+
);
|
|
23
27
|
}
|
|
24
28
|
|
|
25
29
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -57,11 +61,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
57
61
|
};
|
|
58
62
|
|
|
59
63
|
var updateItem = (value, isExpand) => {
|
|
60
|
-
var _props$onUpdateModel;
|
|
61
|
-
|
|
62
64
|
var modelValue = getValue(value, isExpand);
|
|
63
|
-
(
|
|
64
|
-
|
|
65
|
+
(0, _components.call)(props['onUpdate:modelValue'], modelValue);
|
|
66
|
+
(0, _components.call)(props.onChange, modelValue);
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
var matchName = () => {
|
|
@@ -129,6 +131,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
129
131
|
bindCollapseItem(collapseProvider);
|
|
130
132
|
(0, _vue.watch)(() => length.value, () => (0, _vue.nextTick)().then(resize));
|
|
131
133
|
(0, _vue.watch)(() => props.modelValue, () => (0, _vue.nextTick)().then(resize));
|
|
134
|
+
return {
|
|
135
|
+
n
|
|
136
|
+
};
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
});
|
|
@@ -10,6 +10,8 @@ var _elements = require("../utils/elements");
|
|
|
10
10
|
|
|
11
11
|
var _shared = require("../utils/shared");
|
|
12
12
|
|
|
13
|
+
var _components = require("../utils/components");
|
|
14
|
+
|
|
13
15
|
var _provide = require("./provide");
|
|
14
16
|
|
|
15
17
|
var _props = require("./props");
|
|
@@ -18,50 +20,49 @@ var _icon = _interopRequireDefault(require("../icon"));
|
|
|
18
20
|
|
|
19
21
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
22
|
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
var _hoisted_2 = {
|
|
27
|
-
class: "var-collapse-item-header__icon"
|
|
28
|
-
};
|
|
29
|
-
var _hoisted_3 = {
|
|
30
|
-
class: "var-collapse-item__wrap"
|
|
31
|
-
};
|
|
23
|
+
var {
|
|
24
|
+
n,
|
|
25
|
+
classes
|
|
26
|
+
} = (0, _components.createNamespace)('collapse-item');
|
|
32
27
|
|
|
33
28
|
function render(_ctx, _cache) {
|
|
34
29
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
35
30
|
|
|
36
31
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
37
|
-
class: (0, _vue.normalizeClass)(
|
|
38
|
-
'var-collapse-item': true,
|
|
39
|
-
'var-collapse-item__active': _ctx.offset && _ctx.isShow,
|
|
40
|
-
'var-collapse-item__disable': _ctx.disabled
|
|
41
|
-
})
|
|
32
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.offset && _ctx.isShow, _ctx.n('--active')], [_ctx.disabled, _ctx.n('--disable')]))
|
|
42
33
|
}, [(0, _vue.createElementVNode)("div", {
|
|
43
|
-
class:
|
|
34
|
+
class: (0, _vue.normalizeClass)(_ctx.n('header')),
|
|
44
35
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.toggle())
|
|
45
|
-
}, [(0, _vue.createElementVNode)("div",
|
|
36
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
37
|
+
class: (0, _vue.normalizeClass)(_ctx.n('header-title'))
|
|
38
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "title", {}, () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.title), 1
|
|
46
39
|
/* TEXT */
|
|
47
|
-
)])]
|
|
40
|
+
)])], 2
|
|
41
|
+
/* CLASS */
|
|
42
|
+
), (0, _vue.createElementVNode)("div", {
|
|
43
|
+
class: (0, _vue.normalizeClass)(_ctx.n('header-icon'))
|
|
44
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "icon", {}, () => [(0, _vue.createVNode)(_component_var_icon, {
|
|
48
45
|
name: _ctx.icon,
|
|
49
46
|
transition: 250,
|
|
50
|
-
class: (0, _vue.normalizeClass)(
|
|
51
|
-
'var-collapse-item-header__icon': true,
|
|
52
|
-
'var-collapse-item-header__open': _ctx.isShow && _ctx.icon === 'chevron-down',
|
|
53
|
-
'var-collapse-item-header__disable': _ctx.disabled
|
|
54
|
-
})
|
|
47
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('header-icon'), [_ctx.isShow && _ctx.icon === 'chevron-down', _ctx.n('header-open')], [_ctx.disabled, _ctx.n('header--disable')]))
|
|
55
48
|
}, null, 8
|
|
56
49
|
/* PROPS */
|
|
57
|
-
, ["name", "class"])])]
|
|
58
|
-
|
|
50
|
+
, ["name", "class"])])], 2
|
|
51
|
+
/* CLASS */
|
|
52
|
+
)], 2
|
|
53
|
+
/* CLASS */
|
|
54
|
+
), (0, _vue.withDirectives)((0, _vue.createElementVNode)("div", {
|
|
55
|
+
class: (0, _vue.normalizeClass)(_ctx.n('content')),
|
|
59
56
|
ref: "contentEl",
|
|
60
57
|
onTransitionend: _cache[1] || (_cache[1] = function () {
|
|
61
58
|
return _ctx.transitionend && _ctx.transitionend(...arguments);
|
|
62
59
|
})
|
|
63
|
-
}, [(0, _vue.createElementVNode)("div",
|
|
64
|
-
|
|
60
|
+
}, [(0, _vue.createElementVNode)("div", {
|
|
61
|
+
class: (0, _vue.normalizeClass)(_ctx.n('content-wrap'))
|
|
62
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default")], 2
|
|
63
|
+
/* CLASS */
|
|
64
|
+
)], 34
|
|
65
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
65
66
|
), [[_vue.vShow, _ctx.show]])], 2
|
|
66
67
|
/* CLASS */
|
|
67
68
|
);
|
|
@@ -143,6 +144,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
143
144
|
if (value) openPanel();else closePanel();
|
|
144
145
|
});
|
|
145
146
|
return {
|
|
147
|
+
n,
|
|
148
|
+
classes,
|
|
146
149
|
show,
|
|
147
150
|
isShow,
|
|
148
151
|
offset,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --collapse-background: #fff; --collapse-text-color: #232222; --collapse-header-font-size: var(--font-size-lg); --collapse-header-padding: 10px 12px; --collapse-content-font-size: var(--font-size-md); --collapse-content-padding: 0 12px 10px; --collapse-item-margin-top: 16px; --collapse-disable-color: #bdbdbd; --collapse-border-top: thin solid rgba(0, 0, 0, 0.12);}.var-collapse-item { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; position: relative; margin-top: 0; background: var(--collapse-background); color: var(--collapse-text-color); transition: margin-top 0.25s, background-color 0.25s;}.var-collapse-item::before { bottom: 0; content: ''; left: 0; position: absolute; right: 0; top: 0; z-index: -1; box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);}.var-collapse-item:not(:first-child)::after { border-top: var(--collapse-border-top); content: ''; left: 0; position: absolute; right: 0; top: 0;}.var-collapse-
|
|
1
|
+
:root { --collapse-background: #fff; --collapse-text-color: #232222; --collapse-header-font-size: var(--font-size-lg); --collapse-header-padding: 10px 12px; --collapse-content-font-size: var(--font-size-md); --collapse-content-padding: 0 12px 10px; --collapse-item-margin-top: 16px; --collapse-disable-color: #bdbdbd; --collapse-border-top: thin solid rgba(0, 0, 0, 0.12);}.var-collapse-item { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); box-sizing: border-box; position: relative; margin-top: 0; background: var(--collapse-background); color: var(--collapse-text-color); transition: margin-top 0.25s, background-color 0.25s;}.var-collapse-item::before { bottom: 0; content: ''; left: 0; position: absolute; right: 0; top: 0; z-index: -1; box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);}.var-collapse-item:not(:first-child)::after { border-top: var(--collapse-border-top); content: ''; left: 0; position: absolute; right: 0; top: 0;}.var-collapse-item__header { align-items: center; display: flex; font-size: var(--collapse-header-font-size); outline: none; padding: var(--collapse-header-padding); justify-content: space-between; position: relative;}.var-collapse-item__header-title { transition: color 0.25s;}.var-collapse-item__header-icon { transform: rotate(0deg); opacity: 1;}.var-collapse-item__header-open { transform: rotate(-180deg);}.var-collapse-item__header--disable { opacity: 0;}.var-collapse-item__content { display: flex; font-size: var(--collapse-content-font-size); overflow: hidden; transition: all 0.25s;}.var-collapse-item__content-wrap { padding: var(--collapse-content-padding); word-break: break-all; flex: 1;}.var-collapse-item--active + .var-collapse-item,.var-collapse-item--active:not(:first-child) { margin-top: var(--collapse-item-margin-top);}.var-collapse-item--active + .var-collapse-item::after,.var-collapse-item--active:not(:first-child)::after { border-top: none;}.var-collapse-item--disable { color: var(--collapse-disable-color); cursor: not-allowed;}
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
top: 0;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
&__header {
|
|
53
53
|
align-items: center;
|
|
54
54
|
display: flex;
|
|
55
55
|
font-size: var(--collapse-header-font-size);
|
|
@@ -58,39 +58,39 @@
|
|
|
58
58
|
justify-content: space-between;
|
|
59
59
|
position: relative;
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
&-title {
|
|
62
62
|
transition: color 0.25s;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
&-icon {
|
|
66
66
|
transform: rotate(0deg);
|
|
67
67
|
opacity: 1;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
&-open {
|
|
71
|
+
transform: rotate(-180deg);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
&--disable {
|
|
75
|
+
opacity: 0;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
&__content {
|
|
80
80
|
display: flex;
|
|
81
81
|
font-size: var(--collapse-content-font-size);
|
|
82
82
|
overflow: hidden;
|
|
83
83
|
transition: all 0.25s;
|
|
84
|
-
}
|
|
85
84
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
&-wrap {
|
|
86
|
+
padding: var(--collapse-content-padding);
|
|
87
|
+
word-break: break-all;
|
|
88
|
+
flex: 1;
|
|
89
|
+
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
&--active + &,
|
|
93
|
+
&--active:not(:first-child) {
|
|
94
94
|
margin-top: var(--collapse-item-margin-top);
|
|
95
95
|
|
|
96
96
|
&::after {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
&--disable {
|
|
102
102
|
color: var(--collapse-disable-color);
|
|
103
103
|
cursor: not-allowed;
|
|
104
104
|
}
|
|
@@ -12,21 +12,24 @@ var _elements = require("../utils/elements");
|
|
|
12
12
|
|
|
13
13
|
var _shared = require("../utils/shared");
|
|
14
14
|
|
|
15
|
+
var _components = require("../utils/components");
|
|
16
|
+
|
|
17
|
+
var {
|
|
18
|
+
n
|
|
19
|
+
} = (0, _components.createNamespace)('countdown');
|
|
15
20
|
var SECOND = 1000;
|
|
16
21
|
var MINUTE = 60 * SECOND;
|
|
17
22
|
var HOUR = 60 * MINUTE;
|
|
18
23
|
var DAY = 24 * HOUR;
|
|
19
24
|
|
|
20
|
-
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
21
|
-
|
|
22
|
-
var _hoisted_1 = {
|
|
23
|
-
class: "var-countdown"
|
|
24
|
-
};
|
|
25
|
-
|
|
26
25
|
function render(_ctx, _cache) {
|
|
27
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
26
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
27
|
+
class: (0, _vue.normalizeClass)(_ctx.n())
|
|
28
|
+
}, [(0, _vue.renderSlot)(_ctx.$slots, "default", (0, _vue.normalizeProps)((0, _vue.guardReactiveProps)(_ctx.timeData)), () => [(0, _vue.createTextVNode)((0, _vue.toDisplayString)(_ctx.showTime), 1
|
|
28
29
|
/* TEXT */
|
|
29
|
-
)])]
|
|
30
|
+
)])], 2
|
|
31
|
+
/* CLASS */
|
|
32
|
+
);
|
|
30
33
|
}
|
|
31
34
|
|
|
32
35
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -62,7 +65,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
62
65
|
milliseconds
|
|
63
66
|
};
|
|
64
67
|
timeData.value = time;
|
|
65
|
-
|
|
68
|
+
(0, _components.call)(props.onChange, timeData.value);
|
|
66
69
|
showTime.value = (0, _shared.parseFormat)(props.format, time);
|
|
67
70
|
};
|
|
68
71
|
|
|
@@ -80,7 +83,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
80
83
|
formatTime(durationTime);
|
|
81
84
|
|
|
82
85
|
if (durationTime === 0) {
|
|
83
|
-
|
|
86
|
+
(0, _components.call)(onEnd);
|
|
84
87
|
return;
|
|
85
88
|
}
|
|
86
89
|
|
|
@@ -114,6 +117,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
114
117
|
return {
|
|
115
118
|
showTime,
|
|
116
119
|
timeData,
|
|
120
|
+
n,
|
|
117
121
|
start,
|
|
118
122
|
pause,
|
|
119
123
|
reset
|
package/lib/counter/Counter.js
CHANGED
|
@@ -26,15 +26,16 @@ var _components = require("../utils/components");
|
|
|
26
26
|
|
|
27
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
28
|
|
|
29
|
+
var {
|
|
30
|
+
n,
|
|
31
|
+
classes
|
|
32
|
+
} = (0, _components.createNamespace)('counter');
|
|
29
33
|
var SPEED = 100;
|
|
30
34
|
var DELAY = 600;
|
|
31
35
|
|
|
32
36
|
var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
|
|
33
37
|
|
|
34
|
-
var _hoisted_1 =
|
|
35
|
-
class: "var-counter var--box"
|
|
36
|
-
};
|
|
37
|
-
var _hoisted_2 = ["inputmode", "readonly", "disabled"];
|
|
38
|
+
var _hoisted_1 = ["inputmode", "readonly", "disabled"];
|
|
38
39
|
|
|
39
40
|
function render(_ctx, _cache) {
|
|
40
41
|
var _component_var_icon = (0, _vue.resolveComponent)("var-icon");
|
|
@@ -43,15 +44,17 @@ function render(_ctx, _cache) {
|
|
|
43
44
|
|
|
44
45
|
var _directive_ripple = (0, _vue.resolveDirective)("ripple");
|
|
45
46
|
|
|
46
|
-
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div",
|
|
47
|
-
class:
|
|
47
|
+
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
48
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), 'var--box'))
|
|
49
|
+
}, [(0, _vue.createElementVNode)("div", (0, _vue.mergeProps)({
|
|
50
|
+
class: _ctx.classes(_ctx.n('controller'), 'var-elevation--2', [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')], [_ctx.errorMessage, _ctx.n('--error')]),
|
|
48
51
|
style: {
|
|
49
52
|
background: _ctx.color ? _ctx.color : undefined
|
|
50
53
|
}
|
|
51
54
|
}, _ctx.$attrs), [(0, _vue.withDirectives)((0, _vue.createVNode)(_component_var_icon, {
|
|
52
|
-
class: (0, _vue.normalizeClass)(["var-counter__decrement-button", [!_ctx.decrementButton ? 'var-counter--hidden' : null]]),
|
|
53
55
|
"var-counter-cover": "",
|
|
54
56
|
name: "minus",
|
|
57
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('decrement-button'), [!_ctx.decrementButton, _ctx.n('--hidden')])),
|
|
55
58
|
style: (0, _vue.normalizeStyle)({
|
|
56
59
|
width: _ctx.toSizeUnit(_ctx.buttonSize),
|
|
57
60
|
height: _ctx.toSizeUnit(_ctx.buttonSize)
|
|
@@ -65,7 +68,7 @@ function render(_ctx, _cache) {
|
|
|
65
68
|
, ["class", "style", "onClick", "onTouchstart", "onTouchend", "onTouchcancel"]), [[_directive_ripple, {
|
|
66
69
|
disabled: !_ctx.ripple || _ctx.disabled || _ctx.readonly || _ctx.disableDecrement || !_ctx.decrementButton || _ctx.isMin
|
|
67
70
|
}]]), (0, _vue.withDirectives)((0, _vue.createElementVNode)("input", {
|
|
68
|
-
class:
|
|
71
|
+
class: (0, _vue.normalizeClass)(_ctx.n('input')),
|
|
69
72
|
style: (0, _vue.normalizeStyle)({
|
|
70
73
|
width: _ctx.toSizeUnit(_ctx.inputWidth),
|
|
71
74
|
fontSize: _ctx.toSizeUnit(_ctx.inputTextSize)
|
|
@@ -77,12 +80,12 @@ function render(_ctx, _cache) {
|
|
|
77
80
|
onChange: _cache[1] || (_cache[1] = function () {
|
|
78
81
|
return _ctx.handleChange && _ctx.handleChange(...arguments);
|
|
79
82
|
})
|
|
80
|
-
}, null,
|
|
81
|
-
/* STYLE, PROPS, HYDRATE_EVENTS */
|
|
82
|
-
,
|
|
83
|
-
class: (0, _vue.normalizeClass)(["var-counter__increment-button", [!_ctx.incrementButton ? 'var-counter--hidden' : null]]),
|
|
83
|
+
}, null, 46
|
|
84
|
+
/* CLASS, STYLE, PROPS, HYDRATE_EVENTS */
|
|
85
|
+
, _hoisted_1), [[_vue.vModelText, _ctx.inputValue]]), (0, _vue.withDirectives)((0, _vue.createVNode)(_component_var_icon, {
|
|
84
86
|
"var-counter-cover": "",
|
|
85
87
|
name: "plus",
|
|
88
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('increment-button'), [!_ctx.incrementButton, _ctx.n('--hidden')])),
|
|
86
89
|
style: (0, _vue.normalizeStyle)({
|
|
87
90
|
width: _ctx.toSizeUnit(_ctx.buttonSize),
|
|
88
91
|
height: _ctx.toSizeUnit(_ctx.buttonSize)
|
|
@@ -101,7 +104,9 @@ function render(_ctx, _cache) {
|
|
|
101
104
|
"error-message": _ctx.errorMessage
|
|
102
105
|
}, null, 8
|
|
103
106
|
/* PROPS */
|
|
104
|
-
, ["error-message"])]
|
|
107
|
+
, ["error-message"])], 2
|
|
108
|
+
/* CLASS */
|
|
109
|
+
);
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
var _default = (0, _vue.defineComponent)({
|
|
@@ -154,12 +159,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
154
159
|
|
|
155
160
|
|
|
156
161
|
var reset = () => {
|
|
157
|
-
var _props$onUpdateModel;
|
|
158
|
-
|
|
159
162
|
var {
|
|
160
163
|
min
|
|
161
164
|
} = props;
|
|
162
|
-
(
|
|
165
|
+
(0, _components.call)(props['onUpdate:modelValue'], min != null ? (0, _shared.toNumber)(min) : 0);
|
|
163
166
|
resetValidation();
|
|
164
167
|
};
|
|
165
168
|
|
|
@@ -217,7 +220,7 @@ var _default = (0, _vue.defineComponent)({
|
|
|
217
220
|
value
|
|
218
221
|
} = event.target;
|
|
219
222
|
var normalizedValue = normalizeValue(value);
|
|
220
|
-
lazyChange ?
|
|
223
|
+
lazyChange ? (0, _components.call)(onBeforeChange, (0, _shared.toNumber)(normalizedValue), change) : setNormalizedValue(normalizedValue);
|
|
221
224
|
validateWithTrigger('onInputChange');
|
|
222
225
|
};
|
|
223
226
|
|
|
@@ -245,10 +248,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
245
248
|
var value = new _decimal.Decimal((0, _shared.toNumber)(modelValue)).minus(new _decimal.Decimal((0, _shared.toNumber)(step))).toString();
|
|
246
249
|
var normalizedValue = normalizeValue(value);
|
|
247
250
|
var normalizedValueNum = (0, _shared.toNumber)(normalizedValue);
|
|
248
|
-
|
|
251
|
+
(0, _components.call)(onDecrement, normalizedValueNum);
|
|
249
252
|
|
|
250
253
|
if (lazyChange) {
|
|
251
|
-
|
|
254
|
+
(0, _components.call)(onBeforeChange, normalizedValueNum, change);
|
|
252
255
|
} else {
|
|
253
256
|
setNormalizedValue(normalizedValue);
|
|
254
257
|
validateWithTrigger('onDecrement');
|
|
@@ -279,10 +282,10 @@ var _default = (0, _vue.defineComponent)({
|
|
|
279
282
|
var value = new _decimal.Decimal((0, _shared.toNumber)(modelValue)).plus(new _decimal.Decimal((0, _shared.toNumber)(step))).toString();
|
|
280
283
|
var normalizedValue = normalizeValue(value);
|
|
281
284
|
var normalizedValueNum = (0, _shared.toNumber)(normalizedValue);
|
|
282
|
-
|
|
285
|
+
(0, _components.call)(onIncrement, normalizedValueNum);
|
|
283
286
|
|
|
284
287
|
if (lazyChange) {
|
|
285
|
-
|
|
288
|
+
(0, _components.call)(onBeforeChange, normalizedValueNum, change);
|
|
286
289
|
} else {
|
|
287
290
|
setNormalizedValue(normalizedValue);
|
|
288
291
|
validateWithTrigger('onIncrement');
|
|
@@ -344,11 +347,9 @@ var _default = (0, _vue.defineComponent)({
|
|
|
344
347
|
};
|
|
345
348
|
|
|
346
349
|
var setNormalizedValue = normalizedValue => {
|
|
347
|
-
var _props$onUpdateModel2;
|
|
348
|
-
|
|
349
350
|
inputValue.value = normalizedValue;
|
|
350
351
|
var normalizedValueNum = (0, _shared.toNumber)(normalizedValue);
|
|
351
|
-
(
|
|
352
|
+
(0, _components.call)(props['onUpdate:modelValue'], normalizedValueNum);
|
|
352
353
|
};
|
|
353
354
|
|
|
354
355
|
var change = value => {
|
|
@@ -356,13 +357,15 @@ var _default = (0, _vue.defineComponent)({
|
|
|
356
357
|
validateWithTrigger('onLazyChange');
|
|
357
358
|
};
|
|
358
359
|
|
|
359
|
-
|
|
360
|
+
(0, _components.call)(bindForm, counterProvider);
|
|
360
361
|
(0, _vue.watch)(() => props.modelValue, newValue => {
|
|
361
362
|
setNormalizedValue(normalizeValue(String(newValue)));
|
|
362
|
-
|
|
363
|
+
(0, _components.call)(props.onChange, (0, _shared.toNumber)(newValue));
|
|
363
364
|
});
|
|
364
365
|
setNormalizedValue(normalizeValue(String(props.modelValue)));
|
|
365
366
|
return {
|
|
367
|
+
n,
|
|
368
|
+
classes,
|
|
366
369
|
inputValue,
|
|
367
370
|
errorMessage,
|
|
368
371
|
formDisabled,
|
|
@@ -20,10 +20,17 @@ var _shared = require("../utils/shared");
|
|
|
20
20
|
|
|
21
21
|
var _elements = require("../utils/elements");
|
|
22
22
|
|
|
23
|
+
var _components = require("../utils/components");
|
|
24
|
+
|
|
23
25
|
var _locale = require("../locale");
|
|
24
26
|
|
|
25
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
26
28
|
|
|
29
|
+
var {
|
|
30
|
+
n,
|
|
31
|
+
classes
|
|
32
|
+
} = (0, _components.createNamespace)('date-picker');
|
|
33
|
+
|
|
27
34
|
function render(_ctx, _cache) {
|
|
28
35
|
var _component_year_picker_panel = (0, _vue.resolveComponent)("year-picker-panel");
|
|
29
36
|
|
|
@@ -32,14 +39,14 @@ function render(_ctx, _cache) {
|
|
|
32
39
|
var _component_day_picker_panel = (0, _vue.resolveComponent)("day-picker-panel");
|
|
33
40
|
|
|
34
41
|
return (0, _vue.openBlock)(), (0, _vue.createElementBlock)("div", {
|
|
35
|
-
class: (0, _vue.normalizeClass)(
|
|
42
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n(), [_ctx.shadow, 'var-elevation--2']))
|
|
36
43
|
}, [(0, _vue.createElementVNode)("div", {
|
|
37
|
-
class:
|
|
44
|
+
class: (0, _vue.normalizeClass)(_ctx.n('title')),
|
|
38
45
|
style: (0, _vue.normalizeStyle)({
|
|
39
46
|
background: _ctx.headerColor || _ctx.color
|
|
40
47
|
})
|
|
41
48
|
}, [(0, _vue.createElementVNode)("div", {
|
|
42
|
-
class: (0, _vue.normalizeClass)(
|
|
49
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-year'), [_ctx.isYearPanel, _ctx.n('title-year--active')])),
|
|
43
50
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.clickEl('year'))
|
|
44
51
|
}, [(0, _vue.renderSlot)(_ctx.$slots, "year", {
|
|
45
52
|
year: _ctx.previewYear
|
|
@@ -48,10 +55,10 @@ function render(_ctx, _cache) {
|
|
|
48
55
|
)])], 2
|
|
49
56
|
/* CLASS */
|
|
50
57
|
), (0, _vue.createElementVNode)("div", {
|
|
51
|
-
class: (0, _vue.normalizeClass)(
|
|
58
|
+
class: (0, _vue.normalizeClass)(_ctx.classes(_ctx.n('title-date'), [!_ctx.isYearPanel, _ctx.n('title-date--active')], [_ctx.range, _ctx.n('title-date--range')])),
|
|
52
59
|
onClick: _cache[1] || (_cache[1] = $event => _ctx.clickEl('date'))
|
|
53
60
|
}, [(0, _vue.createVNode)(_vue.Transition, {
|
|
54
|
-
name: _ctx.multiple ? '' : "
|
|
61
|
+
name: _ctx.multiple ? '' : "" + _ctx.n() + (_ctx.reverse ? '-reverse' : '') + "-translatey"
|
|
55
62
|
}, {
|
|
56
63
|
default: (0, _vue.withCtx)(() => {
|
|
57
64
|
var _ctx$chooseMonth, _ctx$chooseMonth2, _ctx$chooseMonth3;
|
|
@@ -99,10 +106,10 @@ function render(_ctx, _cache) {
|
|
|
99
106
|
/* PROPS */
|
|
100
107
|
, ["name"])], 2
|
|
101
108
|
/* CLASS */
|
|
102
|
-
)],
|
|
103
|
-
/* STYLE */
|
|
109
|
+
)], 6
|
|
110
|
+
/* CLASS, STYLE */
|
|
104
111
|
), (0, _vue.createElementVNode)("div", {
|
|
105
|
-
class:
|
|
112
|
+
class: (0, _vue.normalizeClass)(_ctx.n('body')),
|
|
106
113
|
onTouchstart: _cache[2] || (_cache[2] = function () {
|
|
107
114
|
return _ctx.handleTouchstart && _ctx.handleTouchstart(...arguments);
|
|
108
115
|
}),
|
|
@@ -113,7 +120,7 @@ function render(_ctx, _cache) {
|
|
|
113
120
|
return _ctx.handleTouchend && _ctx.handleTouchend(...arguments);
|
|
114
121
|
})
|
|
115
122
|
}, [(0, _vue.createVNode)(_vue.Transition, {
|
|
116
|
-
name: "
|
|
123
|
+
name: _ctx.n() + "-panel-fade"
|
|
117
124
|
}, {
|
|
118
125
|
default: (0, _vue.withCtx)(() => [_ctx.getPanelType === 'year' ? ((0, _vue.openBlock)(), (0, _vue.createBlock)(_component_year_picker_panel, {
|
|
119
126
|
key: 0,
|
|
@@ -150,8 +157,10 @@ function render(_ctx, _cache) {
|
|
|
150
157
|
_: 1
|
|
151
158
|
/* STABLE */
|
|
152
159
|
|
|
153
|
-
}
|
|
154
|
-
/*
|
|
160
|
+
}, 8
|
|
161
|
+
/* PROPS */
|
|
162
|
+
, ["name"])], 34
|
|
163
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
155
164
|
)], 2
|
|
156
165
|
/* CLASS */
|
|
157
166
|
);
|
|
@@ -338,27 +347,23 @@ var _default = (0, _vue.defineComponent)({
|
|
|
338
347
|
rangeDone.value = !rangeDone.value;
|
|
339
348
|
|
|
340
349
|
if (rangeDone.value) {
|
|
341
|
-
var _props$onUpdateModel;
|
|
342
|
-
|
|
343
350
|
var isChangeOrder = (0, _dayjs.default)(rangeDate.value[0]).isAfter(rangeDate.value[1]);
|
|
344
351
|
|
|
345
352
|
var _date = isChangeOrder ? [rangeDate.value[1], rangeDate.value[0]] : [...rangeDate.value];
|
|
346
353
|
|
|
347
|
-
(
|
|
348
|
-
|
|
354
|
+
(0, _components.call)(props['onUpdate:modelValue'], _date);
|
|
355
|
+
(0, _components.call)(props.onChange, _date);
|
|
349
356
|
}
|
|
350
357
|
};
|
|
351
358
|
|
|
352
359
|
var updateMultiple = (date, type) => {
|
|
353
|
-
var _props$onUpdateModel2;
|
|
354
|
-
|
|
355
360
|
var multipleDates = type === 'month' ? chooseMonths : chooseDays;
|
|
356
361
|
var formatType = type === 'month' ? 'YYYY-MM' : 'YYYY-MM-DD';
|
|
357
362
|
var formatDates = multipleDates.value.map(date => (0, _dayjs.default)(date).format(formatType));
|
|
358
363
|
var index = formatDates.findIndex(choose => choose === date);
|
|
359
364
|
if (index === -1) formatDates.push(date);else formatDates.splice(index, 1);
|
|
360
|
-
(
|
|
361
|
-
|
|
365
|
+
(0, _components.call)(props['onUpdate:modelValue'], formatDates);
|
|
366
|
+
(0, _components.call)(props.onChange, formatDates);
|
|
362
367
|
};
|
|
363
368
|
|
|
364
369
|
var getReverse = (dateType, date) => {
|
|
@@ -381,8 +386,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
381
386
|
var date = previewYear.value + "-" + previewMonth.value.index + "-" + day;
|
|
382
387
|
var formatDate = (0, _dayjs.default)(date).format('YYYY-MM-DD');
|
|
383
388
|
if (range) updateRange(formatDate, 'day');else if (multiple) updateMultiple(formatDate, 'day');else {
|
|
384
|
-
|
|
385
|
-
|
|
389
|
+
(0, _components.call)(updateModelValue, formatDate);
|
|
390
|
+
(0, _components.call)(onChange, formatDate);
|
|
386
391
|
}
|
|
387
392
|
};
|
|
388
393
|
|
|
@@ -400,8 +405,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
400
405
|
if (type === 'month' && !readonly) {
|
|
401
406
|
var date = previewYear.value + "-" + month.index;
|
|
402
407
|
if (range) updateRange(date, 'month');else if (multiple) updateMultiple(date, 'month');else {
|
|
403
|
-
|
|
404
|
-
|
|
408
|
+
(0, _components.call)(updateModelValue, date);
|
|
409
|
+
(0, _components.call)(onChange, date);
|
|
405
410
|
}
|
|
406
411
|
} else {
|
|
407
412
|
previewMonth.value = month;
|
|
@@ -524,6 +529,8 @@ var _default = (0, _vue.defineComponent)({
|
|
|
524
529
|
});
|
|
525
530
|
(0, _vue.watch)(getPanelType, resetState);
|
|
526
531
|
return {
|
|
532
|
+
n,
|
|
533
|
+
classes,
|
|
527
534
|
monthPanelEl,
|
|
528
535
|
dayPanelEl,
|
|
529
536
|
reverse,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --date-picker-border-radius: 4px; --date-picker-font-size: var(--font-size-md); --date-picker-min-width: 290px; --date-picker-height: 385px; --date-picker-main-color: rgba(0, 0, 0, 0.87); --date-picker-title-padding: 16px; --date-picker-title-background: var(--color-primary); --date-picker-title-color: #fff; --date-picker-title-year-font-size: var(--font-size-md); --date-picker-title-year-font-weight: 500; --date-picker-title-year-margin-bottom: 8px; --date-picker-title-date-height: 48px; --date-picker-title-date-font-size: 34px; --date-picker-title-date-font-weight: 500; --date-picker-title-date-range-font-size: 20px; --date-picker-body-background-color: rgba(0, 0, 0, 0); --picker-header-padding: 4px 16px; --month-picker-padding: 0 12px; --month-picker-item-width: 33%; --month-picker-item-height: 56px; --month-picker-item-button-max-width: 140px; --year-picker-font-weight: 400; --year-picker-item-padding: 8px 0; --year-picker-item-active-font-size: 26px; --year-picker-item-active-font-weight: 500; --year-picker-item-active-font-padding: 10px 0; --year-picker-item-active-color: var(--color-primary); --day-picker-content-item-width: 14.28%; --day-picker-content-item-font-size: var(--font-size-sm); --day-picker-content-item-padding: 2px 0; --day-picker-content-item-button-width: 32px; --day-picker-content-item-button-height: 32px; --day-picker-content-item-button-font-size: var(--font-size-sm); --day-picker-head-item-color: rgba(0, 0, 0, 0.38); --day-picker-head-item-padding: 8px 0; --day-picker-head-item-font-weight: 600;}.var-date-picker { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border-radius: var(--date-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--date-picker-font-size); position: relative; min-width: var(--date-picker-min-width); height: var(--date-picker-height); overflow: hidden;}.var-date-picker ul { list-style: none; margin: 0; padding: 0;}.var-date-
|
|
1
|
+
:root { --date-picker-border-radius: 4px; --date-picker-font-size: var(--font-size-md); --date-picker-min-width: 290px; --date-picker-height: 385px; --date-picker-main-color: rgba(0, 0, 0, 0.87); --date-picker-title-padding: 16px; --date-picker-title-background: var(--color-primary); --date-picker-title-color: #fff; --date-picker-title-year-font-size: var(--font-size-md); --date-picker-title-year-font-weight: 500; --date-picker-title-year-margin-bottom: 8px; --date-picker-title-date-height: 48px; --date-picker-title-date-font-size: 34px; --date-picker-title-date-font-weight: 500; --date-picker-title-date-range-font-size: 20px; --date-picker-body-background-color: rgba(0, 0, 0, 0); --picker-header-padding: 4px 16px; --month-picker-padding: 0 12px; --month-picker-item-width: 33%; --month-picker-item-height: 56px; --month-picker-item-button-max-width: 140px; --year-picker-font-weight: 400; --year-picker-item-padding: 8px 0; --year-picker-item-active-font-size: 26px; --year-picker-item-active-font-weight: 500; --year-picker-item-active-font-padding: 10px 0; --year-picker-item-active-color: var(--color-primary); --day-picker-content-item-width: 14.28%; --day-picker-content-item-font-size: var(--font-size-sm); --day-picker-content-item-padding: 2px 0; --day-picker-content-item-button-width: 32px; --day-picker-content-item-button-height: 32px; --day-picker-content-item-button-font-size: var(--font-size-sm); --day-picker-head-item-color: rgba(0, 0, 0, 0.38); --day-picker-head-item-padding: 8px 0; --day-picker-head-item-font-weight: 600;}.var-date-picker { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); border-radius: var(--date-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--date-picker-font-size); position: relative; min-width: var(--date-picker-min-width); height: var(--date-picker-height); overflow: hidden;}.var-date-picker ul { list-style: none; margin: 0; padding: 0;}.var-date-picker__title { padding: var(--date-picker-title-padding); color: var(--date-picker-title-color); background: var(--date-picker-title-background); display: flex; justify-content: space-between; flex-direction: column; flex-wrap: wrap;}.var-date-picker__title-year { opacity: 0.6; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); align-items: center; display: inline-flex; font-size: var(--date-picker-title-year-font-size); font-weight: var(--date-picker-title-year-font-weight); margin-bottom: var(--date-picker-title-year-margin-bottom); transition: 0.3s var(--cubic-bezier);}.var-date-picker__title-year--active { opacity: 1;}.var-date-picker__title-date { height: var(--date-picker-title-date-height); overflow: hidden; font-size: var(--date-picker-title-date-font-size); text-align: left; font-weight: var(--date-picker-title-date-font-weight); position: relative; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); display: flex; align-items: center; opacity: 0.6; transition: 0.3s var(--cubic-bezier);}.var-date-picker__title-date--active { opacity: 1;}.var-date-picker__title-date--range { font-size: var(--date-picker-title-date-range-font-size);}.var-date-picker__body { flex: 1; position: relative; overflow: auto; background-color: var(--date-picker-body-background-color);}.var-date-picker .var-picker-header { padding: var(--picker-header-padding); align-items: center; display: flex; justify-content: space-between; position: relative;}.var-date-picker .var-picker-header__value { flex: 1; text-align: center; position: relative; overflow: hidden; font-weight: 700; cursor: pointer; user-select: none;}.var-date-picker .var-picker-header__value div { width: 100%;}.var-date-picker .var-month-picker__content { padding: var(--month-picker-padding);}.var-date-picker .var-month-picker__content ul { display: flex; flex-wrap: wrap; justify-content: space-between;}.var-date-picker .var-month-picker__content ul li { width: var(--month-picker-item-width); display: flex; height: var(--month-picker-item-height); align-items: center; justify-content: center;}.var-date-picker .var-month-picker__button[var-month-picker-cover] { width: 100%; max-width: var(--month-picker-item-button-max-width);}.var-date-picker .var-month-picker__button[var-date-picker-color-cover='true'] { color: var(--date-picker-main-color);}.var-date-picker .var-month-picker__button--disabled { color: var(--color-text-disabled) !important; cursor: not-allowed;}.var-date-picker .var-year-picker { width: 100%; height: 100%; font-weight: var(--year-picker-font-weight); padding: 0; margin: 0; list-style-type: none; overflow: auto; text-align: center;}.var-date-picker .var-year-picker__item { padding: var(--year-picker-item-padding); cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-date-picker .var-year-picker__item--active { font-size: var(--year-picker-item-active-font-size); font-weight: var(--year-picker-item-active-font-weight); padding: var(--year-picker-item-active-font-padding); color: var(--year-picker-item-active-color);}.var-date-picker .var-day-picker__content ul { display: flex; flex-wrap: wrap;}.var-date-picker .var-day-picker__content ul li { position: relative; display: flex; justify-content: center; width: var(--day-picker-content-item-width); font-size: var(--day-picker-content-item-font-size); padding: var(--day-picker-content-item-padding);}.var-date-picker .var-day-picker__head li { color: var(--day-picker-head-item-color); padding: var(--day-picker-head-item-padding); font-weight: var(--day-picker-head-item-font-weight);}.var-date-picker .var-day-picker__button[var-day-picker-cover] { width: var(--day-picker-content-item-button-width); height: var(--day-picker-content-item-button-height); font-size: var(--day-picker-content-item-button-font-size);}.var-date-picker .var-day-picker__button:not(.var-day-picker__button--usable) { cursor: unset;}.var-date-picker .var-day-picker__button[var-date-picker-color-cover='true'] { color: var(--date-picker-main-color);}.var-date-picker .var-day-picker__button--disabled { color: var(--color-text-disabled) !important; cursor: not-allowed;}.var-date-picker-translatey-enter-from { opacity: 0; transform: translateY(100%);}.var-date-picker-translatey-enter-active,.var-date-picker-reverse-translatey-enter-active { transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatey-leave-active,.var-date-picker-reverse-translatey-leave-active { position: absolute; transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatey-leave-to { opacity: 0; transform: translateY(-100%);}.var-date-picker-reverse-translatey-enter-from { opacity: 0; transform: translateY(-100%);}.var-date-picker-reverse-translatey-leave-to { opacity: 0; transform: translateY(100%);}.var-date-picker-panel-fade-enter-from,.var-date-picker-panel-fade-leave-to { transition: 0.3s var(--cubic-bezier); opacity: 0;}.var-date-picker-panel-fade-leave-active { position: absolute;}.var-date-picker-translatex-enter-from { opacity: 0; transform: translateX(100%);}.var-date-picker-reverse-translatex-enter-from { opacity: 0; transform: translateX(-100%);}.var-date-picker-translatex-enter-active,.var-date-picker-reverse-translatex-enter-active { transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatex-leave-active,.var-date-picker-reverse-translatex-leave-active { position: absolute; transition: 0.3s var(--cubic-bezier);}.var-date-picker-translatex-leave-to { opacity: 0; transform: translateX(-100%);}.var-date-picker-reverse-translatex-leave-to { opacity: 0; transform: translateX(100%);}
|