@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
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import VarFormDetails from '../form-details';
|
|
2
2
|
import { defineComponent, computed, watch, nextTick } from 'vue';
|
|
3
3
|
import { props } from './props';
|
|
4
|
-
import { useValidation } from '../utils/components';
|
|
4
|
+
import { useValidation, createNamespace, call } from '../utils/components';
|
|
5
5
|
import { useCheckboxes } from './provide';
|
|
6
6
|
import { useForm } from '../form/provide';
|
|
7
7
|
import { uniq } from '../utils/shared';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
class: "var-checkbox-group__wrap"
|
|
14
|
-
};
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('checkbox-group');
|
|
12
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
15
13
|
export function render(_ctx, _cache) {
|
|
16
14
|
var _component_var_form_details = _resolveComponent("var-form-details");
|
|
17
15
|
|
|
18
|
-
return _openBlock(), _createElementBlock("div",
|
|
19
|
-
class: _normalizeClass(
|
|
16
|
+
return _openBlock(), _createElementBlock("div", {
|
|
17
|
+
class: _normalizeClass(_ctx.n('wrap'))
|
|
18
|
+
}, [_createElementVNode("div", {
|
|
19
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("--" + _ctx.direction)))
|
|
20
20
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
21
21
|
/* CLASS */
|
|
22
22
|
), _createVNode(_component_var_form_details, {
|
|
23
23
|
"error-message": _ctx.errorMessage
|
|
24
24
|
}, null, 8
|
|
25
25
|
/* PROPS */
|
|
26
|
-
, ["error-message"])]
|
|
26
|
+
, ["error-message"])], 2
|
|
27
|
+
/* CLASS */
|
|
28
|
+
);
|
|
27
29
|
}
|
|
28
30
|
export default defineComponent({
|
|
29
31
|
render,
|
|
@@ -65,10 +67,8 @@ export default defineComponent({
|
|
|
65
67
|
};
|
|
66
68
|
|
|
67
69
|
var change = changedModelValue => {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
(_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, changedModelValue);
|
|
71
|
-
props.onChange == null ? void 0 : props.onChange(changedModelValue);
|
|
70
|
+
call(props['onUpdate:modelValue'], changedModelValue);
|
|
71
|
+
call(props.onChange, changedModelValue);
|
|
72
72
|
validateWithTrigger('onChange');
|
|
73
73
|
};
|
|
74
74
|
|
|
@@ -107,8 +107,6 @@ export default defineComponent({
|
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
var checkAll = () => {
|
|
110
|
-
var _props$onUpdateModel2;
|
|
111
|
-
|
|
112
110
|
var checkedValues = checkboxes.map(_ref2 => {
|
|
113
111
|
var {
|
|
114
112
|
checkedValue
|
|
@@ -117,14 +115,12 @@ export default defineComponent({
|
|
|
117
115
|
});
|
|
118
116
|
var changedModelValue = uniq(checkedValues);
|
|
119
117
|
resetWithAnimation();
|
|
120
|
-
(
|
|
118
|
+
call(props['onUpdate:modelValue'], changedModelValue);
|
|
121
119
|
return changedModelValue;
|
|
122
120
|
}; // expose
|
|
123
121
|
|
|
124
122
|
|
|
125
123
|
var inverseAll = () => {
|
|
126
|
-
var _props$onUpdateModel3;
|
|
127
|
-
|
|
128
124
|
var checkedValues = checkboxes.filter(_ref3 => {
|
|
129
125
|
var {
|
|
130
126
|
checked
|
|
@@ -138,15 +134,13 @@ export default defineComponent({
|
|
|
138
134
|
});
|
|
139
135
|
var changedModelValue = uniq(checkedValues);
|
|
140
136
|
resetWithAnimation();
|
|
141
|
-
(
|
|
137
|
+
call(props['onUpdate:modelValue'], changedModelValue);
|
|
142
138
|
return changedModelValue;
|
|
143
139
|
}; // expose
|
|
144
140
|
|
|
145
141
|
|
|
146
142
|
var reset = () => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
(_props$onUpdateModel4 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel4.call(props, []);
|
|
143
|
+
call(props['onUpdate:modelValue'], []);
|
|
150
144
|
resetValidation();
|
|
151
145
|
}; // expose
|
|
152
146
|
|
|
@@ -168,9 +162,11 @@ export default defineComponent({
|
|
|
168
162
|
errorMessage: checkboxGroupErrorMessage
|
|
169
163
|
};
|
|
170
164
|
bindCheckboxes(checkboxGroupProvider);
|
|
171
|
-
bindForm
|
|
165
|
+
call(bindForm, checkboxGroupProvider);
|
|
172
166
|
return {
|
|
173
167
|
errorMessage,
|
|
168
|
+
n,
|
|
169
|
+
classes,
|
|
174
170
|
checkAll,
|
|
175
171
|
inverseAll,
|
|
176
172
|
reset,
|
package/es/chip/Chip.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import VarIcon from '../icon';
|
|
2
2
|
import { defineComponent, computed } from 'vue';
|
|
3
3
|
import { props } from './props';
|
|
4
|
+
import { createNamespace } from '../utils/components';
|
|
5
|
+
var {
|
|
6
|
+
n,
|
|
7
|
+
classes
|
|
8
|
+
} = createNamespace('chip');
|
|
4
9
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, mergeProps as _mergeProps, Transition as _Transition, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
|
5
10
|
export function render(_ctx, _cache) {
|
|
6
11
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
@@ -9,15 +14,15 @@ export function render(_ctx, _cache) {
|
|
|
9
14
|
name: "var-fade"
|
|
10
15
|
}, {
|
|
11
16
|
default: _withCtx(() => [_createElementVNode("span", _mergeProps({
|
|
12
|
-
class:
|
|
17
|
+
class: _ctx.classes(_ctx.n(), 'var--box', ..._ctx.contentClass),
|
|
13
18
|
style: _ctx.chipStyles
|
|
14
19
|
}, _ctx.$attrs), [_renderSlot(_ctx.$slots, "left"), _createElementVNode("span", {
|
|
15
|
-
class: _normalizeClass(
|
|
20
|
+
class: _normalizeClass(_ctx.n("text-" + _ctx.size))
|
|
16
21
|
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
17
22
|
/* CLASS */
|
|
18
23
|
), _renderSlot(_ctx.$slots, "right"), _ctx.closable ? (_openBlock(), _createElementBlock("span", {
|
|
19
24
|
key: 0,
|
|
20
|
-
class:
|
|
25
|
+
class: _normalizeClass(_ctx.n('--close')),
|
|
21
26
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
22
27
|
return _ctx.onClose && _ctx.onClose(...arguments);
|
|
23
28
|
})
|
|
@@ -25,7 +30,9 @@ export function render(_ctx, _cache) {
|
|
|
25
30
|
name: "" + (_ctx.iconName ? _ctx.iconName : 'close-circle')
|
|
26
31
|
}, null, 8
|
|
27
32
|
/* PROPS */
|
|
28
|
-
, ["name"])]
|
|
33
|
+
, ["name"])], 2
|
|
34
|
+
/* CLASS */
|
|
35
|
+
)) : _createCommentVNode("v-if", true)], 16
|
|
29
36
|
/* FULL_PROPS */
|
|
30
37
|
)]),
|
|
31
38
|
_: 3
|
|
@@ -71,11 +78,13 @@ export default defineComponent({
|
|
|
71
78
|
round
|
|
72
79
|
} = props;
|
|
73
80
|
var blockClass = block ? 'var--flex' : 'var--inline-flex';
|
|
74
|
-
var plainTypeClass = plain ?
|
|
75
|
-
var roundClass = round
|
|
76
|
-
return ["
|
|
81
|
+
var plainTypeClass = plain ? n('plain') + " " + n("plain-" + type) : n("--" + type);
|
|
82
|
+
var roundClass = round ? n('--round') : null;
|
|
83
|
+
return [n("--" + size), blockClass, plainTypeClass, roundClass];
|
|
77
84
|
});
|
|
78
85
|
return {
|
|
86
|
+
n,
|
|
87
|
+
classes,
|
|
79
88
|
chipStyles,
|
|
80
89
|
contentClass
|
|
81
90
|
};
|
package/es/chip/chip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary); --chip-danger-color: var(--color-danger); --chip-success-color: var(--color-success); --chip-warning-color: var(--color-warning); --chip-info-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0px 10px; --chip-large-padding: 0px 17px; --chip-small-padding: 0px 6px; --chip-mini-padding: 0px 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px;}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; line-height: 1; transition: background-color 0.25s;}.var-chip--default { color: inherit; background: var(--chip-default-color);}.var-chip--primary { color: #fff; background-color: var(--chip-primary-color);}.var-chip--info { color: #fff; background-color: var(--chip-info-color);}.var-chip--success { color: #fff; background-color: var(--chip-success-color);}.var-chip--warning { color: #fff; background-color: var(--chip-warning-color);}.var-chip--danger { color: #fff; background-color: var(--chip-danger-color);}.var-
|
|
1
|
+
:root { --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary); --chip-danger-color: var(--color-danger); --chip-success-color: var(--color-success); --chip-warning-color: var(--color-warning); --chip-info-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0px 10px; --chip-large-padding: 0px 17px; --chip-small-padding: 0px 6px; --chip-mini-padding: 0px 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px;}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; line-height: 1; transition: background-color 0.25s;}.var-chip--default { color: inherit; background: var(--chip-default-color);}.var-chip--primary { color: #fff; background-color: var(--chip-primary-color);}.var-chip--info { color: #fff; background-color: var(--chip-info-color);}.var-chip--success { color: #fff; background-color: var(--chip-success-color);}.var-chip--warning { color: #fff; background-color: var(--chip-warning-color);}.var-chip--danger { color: #fff; background-color: var(--chip-danger-color);}.var-chip__plain { background-color: transparent;}.var-chip__plain:active { box-shadow: none;}.var-chip__plain-default { color: inherit; border-color: currentColor;}.var-chip__plain-primary { color: var(--chip-primary-color); border-color: currentColor;}.var-chip__plain-info { color: var(--chip-info-color); border-color: currentColor;}.var-chip__plain-success { color: var(--chip-success-color); border-color: currentColor;}.var-chip__plain-warning { color: var(--chip-warning-color); border-color: currentColor;}.var-chip__plain-danger { color: var(--chip-danger-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--font-size-md); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--font-size-lg); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--font-size-sm); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--font-size-xs); height: var(--chip-mini-height);}.var-chip--close { cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-chip__text-large { margin: var(--chip-text-large-margin);}.var-chip__text-normal { margin: var(--chip-text-normal-margin);}.var-chip__text-small { margin: var(--chip-text-small-margin);}.var-chip__text-mini { margin: var(--chip-text-mini-margin);}
|
package/es/chip/chip.less
CHANGED
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
background-color: var(--chip-danger-color);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
&__plain {
|
|
97
97
|
background-color: transparent;
|
|
98
98
|
|
|
99
99
|
&:active {
|
|
@@ -101,32 +101,32 @@
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
&__plain-default {
|
|
105
105
|
color: inherit;
|
|
106
106
|
border-color: currentColor;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
&__plain-primary {
|
|
110
110
|
color: var(--chip-primary-color);
|
|
111
111
|
border-color: currentColor;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
&__plain-info {
|
|
115
115
|
color: var(--chip-info-color);
|
|
116
116
|
border-color: currentColor;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
&__plain-success {
|
|
120
120
|
color: var(--chip-success-color);
|
|
121
121
|
border-color: currentColor;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
&__plain-warning {
|
|
125
125
|
color: var(--chip-warning-color);
|
|
126
126
|
border-color: currentColor;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
&__plain-danger {
|
|
130
130
|
color: var(--chip-danger-color);
|
|
131
131
|
border-color: currentColor;
|
|
132
132
|
}
|
|
@@ -164,19 +164,19 @@
|
|
|
164
164
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
&__text-large {
|
|
168
168
|
margin: var(--chip-text-large-margin);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
&__text-normal {
|
|
172
172
|
margin: var(--chip-text-normal-margin);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
&__text-small {
|
|
176
176
|
margin: var(--chip-text-small-margin);
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
|
|
179
|
+
&__text-mini {
|
|
180
180
|
margin: var(--chip-text-mini-margin);
|
|
181
181
|
}
|
|
182
182
|
}
|
package/es/col/Col.js
CHANGED
|
@@ -3,10 +3,15 @@ import { isPlainObject, toNumber } from '../utils/shared';
|
|
|
3
3
|
import { props } from './props';
|
|
4
4
|
import { useRow } from './provide';
|
|
5
5
|
import { toSizeUnit } from '../utils/elements';
|
|
6
|
+
import { createNamespace, call } from '../utils/components';
|
|
7
|
+
var {
|
|
8
|
+
n,
|
|
9
|
+
classes
|
|
10
|
+
} = createNamespace('col');
|
|
6
11
|
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
7
12
|
export function render(_ctx, _cache) {
|
|
8
13
|
return _openBlock(), _createElementBlock("div", {
|
|
9
|
-
class: _normalizeClass(
|
|
14
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box', [_ctx.span, _ctx.n("--span-" + _ctx.span)], [_ctx.offset, _ctx.n("--offset-" + _ctx.offset)], ..._ctx.getSize('xs', _ctx.xs), ..._ctx.getSize('sm', _ctx.sm), ..._ctx.getSize('md', _ctx.md), ..._ctx.getSize('lg', _ctx.lg), ..._ctx.getSize('xl', _ctx.xl))),
|
|
10
15
|
style: _normalizeStyle({
|
|
11
16
|
paddingLeft: _ctx.toSizeUnit(_ctx.padding.left),
|
|
12
17
|
paddingRight: _ctx.toSizeUnit(_ctx.padding.right)
|
|
@@ -53,10 +58,10 @@ export default defineComponent({
|
|
|
53
58
|
span: _span,
|
|
54
59
|
offset: _offset
|
|
55
60
|
} = size;
|
|
56
|
-
_span && classes.push("
|
|
57
|
-
_offset && classes.push("
|
|
61
|
+
_span && classes.push(n("--span-" + mode + "-" + _span));
|
|
62
|
+
_offset && classes.push(n("--offset-" + mode + "-" + _offset));
|
|
58
63
|
} else {
|
|
59
|
-
classes.push("
|
|
64
|
+
classes.push(n("--span-" + mode + "-" + size));
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
return classes;
|
|
@@ -65,8 +70,10 @@ export default defineComponent({
|
|
|
65
70
|
watch([() => props.span, () => props.offset], () => {
|
|
66
71
|
row == null ? void 0 : row.computePadding();
|
|
67
72
|
});
|
|
68
|
-
bindRow
|
|
73
|
+
call(bindRow, colProvider);
|
|
69
74
|
return {
|
|
75
|
+
n,
|
|
76
|
+
classes,
|
|
70
77
|
padding,
|
|
71
78
|
toNumber,
|
|
72
79
|
toSizeUnit,
|
package/es/collapse/Collapse.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { computed, defineComponent, nextTick, watch } from 'vue';
|
|
2
2
|
import { useCollapseItem } from './provide';
|
|
3
3
|
import { props } from './props';
|
|
4
|
+
import { call, createNamespace } from '../utils/components';
|
|
4
5
|
import { isArray } from '../utils/shared';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _hoisted_1 = {
|
|
10
|
-
class: "var-collapse"
|
|
11
|
-
};
|
|
6
|
+
var {
|
|
7
|
+
n
|
|
8
|
+
} = createNamespace('collapse');
|
|
9
|
+
import { renderSlot as _renderSlot, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
12
10
|
export function render(_ctx, _cache) {
|
|
13
|
-
return _openBlock(), _createElementBlock("div",
|
|
11
|
+
return _openBlock(), _createElementBlock("div", {
|
|
12
|
+
class: _normalizeClass(_ctx.n())
|
|
13
|
+
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
14
|
+
/* CLASS */
|
|
15
|
+
);
|
|
14
16
|
}
|
|
15
17
|
export default defineComponent({
|
|
16
18
|
render,
|
|
@@ -47,11 +49,9 @@ export default defineComponent({
|
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
var updateItem = (value, isExpand) => {
|
|
50
|
-
var _props$onUpdateModel;
|
|
51
|
-
|
|
52
52
|
var modelValue = getValue(value, isExpand);
|
|
53
|
-
(
|
|
54
|
-
props.onChange
|
|
53
|
+
call(props['onUpdate:modelValue'], modelValue);
|
|
54
|
+
call(props.onChange, modelValue);
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
var matchName = () => {
|
|
@@ -119,6 +119,9 @@ export default defineComponent({
|
|
|
119
119
|
bindCollapseItem(collapseProvider);
|
|
120
120
|
watch(() => length.value, () => nextTick().then(resize));
|
|
121
121
|
watch(() => props.modelValue, () => nextTick().then(resize));
|
|
122
|
+
return {
|
|
123
|
+
n
|
|
124
|
+
};
|
|
122
125
|
}
|
|
123
126
|
|
|
124
127
|
});
|
|
@@ -1,54 +1,53 @@
|
|
|
1
1
|
import { defineComponent, ref, nextTick, watch, computed } from 'vue';
|
|
2
2
|
import { requestAnimationFrame } from '../utils/elements';
|
|
3
3
|
import { isArray } from '../utils/shared';
|
|
4
|
+
import { createNamespace } from '../utils/components';
|
|
4
5
|
import { useCollapse } from './provide';
|
|
5
6
|
import { props } from './props';
|
|
6
7
|
import VarIcon from '../icon';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class: "var-collapse-item-header__title"
|
|
13
|
-
};
|
|
14
|
-
var _hoisted_2 = {
|
|
15
|
-
class: "var-collapse-item-header__icon"
|
|
16
|
-
};
|
|
17
|
-
var _hoisted_3 = {
|
|
18
|
-
class: "var-collapse-item__wrap"
|
|
19
|
-
};
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('collapse-item');
|
|
12
|
+
import { renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, vShow as _vShow, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
20
13
|
export function render(_ctx, _cache) {
|
|
21
14
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
22
15
|
|
|
23
16
|
return _openBlock(), _createElementBlock("div", {
|
|
24
|
-
class: _normalizeClass(
|
|
25
|
-
'var-collapse-item': true,
|
|
26
|
-
'var-collapse-item__active': _ctx.offset && _ctx.isShow,
|
|
27
|
-
'var-collapse-item__disable': _ctx.disabled
|
|
28
|
-
})
|
|
17
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.offset && _ctx.isShow, _ctx.n('--active')], [_ctx.disabled, _ctx.n('--disable')]))
|
|
29
18
|
}, [_createElementVNode("div", {
|
|
30
|
-
class:
|
|
19
|
+
class: _normalizeClass(_ctx.n('header')),
|
|
31
20
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.toggle())
|
|
32
|
-
}, [_createElementVNode("div",
|
|
21
|
+
}, [_createElementVNode("div", {
|
|
22
|
+
class: _normalizeClass(_ctx.n('header-title'))
|
|
23
|
+
}, [_renderSlot(_ctx.$slots, "title", {}, () => [_createTextVNode(_toDisplayString(_ctx.title), 1
|
|
33
24
|
/* TEXT */
|
|
34
|
-
)])]
|
|
25
|
+
)])], 2
|
|
26
|
+
/* CLASS */
|
|
27
|
+
), _createElementVNode("div", {
|
|
28
|
+
class: _normalizeClass(_ctx.n('header-icon'))
|
|
29
|
+
}, [_renderSlot(_ctx.$slots, "icon", {}, () => [_createVNode(_component_var_icon, {
|
|
35
30
|
name: _ctx.icon,
|
|
36
31
|
transition: 250,
|
|
37
|
-
class: _normalizeClass(
|
|
38
|
-
'var-collapse-item-header__icon': true,
|
|
39
|
-
'var-collapse-item-header__open': _ctx.isShow && _ctx.icon === 'chevron-down',
|
|
40
|
-
'var-collapse-item-header__disable': _ctx.disabled
|
|
41
|
-
})
|
|
32
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('header-icon'), [_ctx.isShow && _ctx.icon === 'chevron-down', _ctx.n('header-open')], [_ctx.disabled, _ctx.n('header--disable')]))
|
|
42
33
|
}, null, 8
|
|
43
34
|
/* PROPS */
|
|
44
|
-
, ["name", "class"])])]
|
|
45
|
-
|
|
35
|
+
, ["name", "class"])])], 2
|
|
36
|
+
/* CLASS */
|
|
37
|
+
)], 2
|
|
38
|
+
/* CLASS */
|
|
39
|
+
), _withDirectives(_createElementVNode("div", {
|
|
40
|
+
class: _normalizeClass(_ctx.n('content')),
|
|
46
41
|
ref: "contentEl",
|
|
47
42
|
onTransitionend: _cache[1] || (_cache[1] = function () {
|
|
48
43
|
return _ctx.transitionend && _ctx.transitionend(...arguments);
|
|
49
44
|
})
|
|
50
|
-
}, [_createElementVNode("div",
|
|
51
|
-
|
|
45
|
+
}, [_createElementVNode("div", {
|
|
46
|
+
class: _normalizeClass(_ctx.n('content-wrap'))
|
|
47
|
+
}, [_renderSlot(_ctx.$slots, "default")], 2
|
|
48
|
+
/* CLASS */
|
|
49
|
+
)], 34
|
|
50
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
52
51
|
), [[_vShow, _ctx.show]])], 2
|
|
53
52
|
/* CLASS */
|
|
54
53
|
);
|
|
@@ -129,6 +128,8 @@ export default defineComponent({
|
|
|
129
128
|
if (value) openPanel();else closePanel();
|
|
130
129
|
});
|
|
131
130
|
return {
|
|
131
|
+
n,
|
|
132
|
+
classes,
|
|
132
133
|
show,
|
|
133
134
|
isShow,
|
|
134
135
|
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
|
}
|
|
@@ -2,21 +2,23 @@ import { defineComponent, ref, watch } from 'vue';
|
|
|
2
2
|
import { props } from './props';
|
|
3
3
|
import { requestAnimationFrame, cancelAnimationFrame } from '../utils/elements';
|
|
4
4
|
import { toNumber, parseFormat } from '../utils/shared';
|
|
5
|
+
import { call, createNamespace } from '../utils/components';
|
|
6
|
+
var {
|
|
7
|
+
n
|
|
8
|
+
} = createNamespace('countdown');
|
|
5
9
|
var SECOND = 1000;
|
|
6
10
|
var MINUTE = 60 * SECOND;
|
|
7
11
|
var HOUR = 60 * MINUTE;
|
|
8
12
|
var DAY = 24 * HOUR;
|
|
9
|
-
import { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode,
|
|
10
|
-
|
|
11
|
-
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
12
|
-
|
|
13
|
-
var _hoisted_1 = {
|
|
14
|
-
class: "var-countdown"
|
|
15
|
-
};
|
|
13
|
+
import { normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
16
14
|
export function render(_ctx, _cache) {
|
|
17
|
-
return _openBlock(), _createElementBlock("div",
|
|
15
|
+
return _openBlock(), _createElementBlock("div", {
|
|
16
|
+
class: _normalizeClass(_ctx.n())
|
|
17
|
+
}, [_renderSlot(_ctx.$slots, "default", _normalizeProps(_guardReactiveProps(_ctx.timeData)), () => [_createTextVNode(_toDisplayString(_ctx.showTime), 1
|
|
18
18
|
/* TEXT */
|
|
19
|
-
)])]
|
|
19
|
+
)])], 2
|
|
20
|
+
/* CLASS */
|
|
21
|
+
);
|
|
20
22
|
}
|
|
21
23
|
export default defineComponent({
|
|
22
24
|
render,
|
|
@@ -51,7 +53,7 @@ export default defineComponent({
|
|
|
51
53
|
milliseconds
|
|
52
54
|
};
|
|
53
55
|
timeData.value = time;
|
|
54
|
-
props.onChange
|
|
56
|
+
call(props.onChange, timeData.value);
|
|
55
57
|
showTime.value = parseFormat(props.format, time);
|
|
56
58
|
};
|
|
57
59
|
|
|
@@ -69,7 +71,7 @@ export default defineComponent({
|
|
|
69
71
|
formatTime(durationTime);
|
|
70
72
|
|
|
71
73
|
if (durationTime === 0) {
|
|
72
|
-
onEnd
|
|
74
|
+
call(onEnd);
|
|
73
75
|
return;
|
|
74
76
|
}
|
|
75
77
|
|
|
@@ -103,6 +105,7 @@ export default defineComponent({
|
|
|
103
105
|
return {
|
|
104
106
|
showTime,
|
|
105
107
|
timeData,
|
|
108
|
+
n,
|
|
106
109
|
start,
|
|
107
110
|
pause,
|
|
108
111
|
reset
|