@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
|
@@ -3,70 +3,75 @@ import dayjs from 'dayjs/esm';
|
|
|
3
3
|
import Clock from './clock.js'
|
|
4
4
|
import { props, hoursAmpm, hours24 } from './props';
|
|
5
5
|
import { toNumber } from '../utils/shared';
|
|
6
|
+
import { createNamespace, call } from '../utils/components';
|
|
6
7
|
import { getNumberTime, getIsDisableMinute, getIsDisableSecond } from './utils';
|
|
8
|
+
var {
|
|
9
|
+
n,
|
|
10
|
+
classes
|
|
11
|
+
} = createNamespace('time-picker');
|
|
7
12
|
import { toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, resolveComponent as _resolveComponent, createBlock as _createBlock, Transition as _Transition, withCtx as _withCtx, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
8
13
|
|
|
9
14
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
10
15
|
|
|
11
|
-
var _hoisted_1 =
|
|
12
|
-
class: "var-time-picker-title__time"
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
var _hoisted_2 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode("span", null, ":", -1
|
|
16
|
+
var _hoisted_1 = /*#__PURE__*/_withScopeId(() => /*#__PURE__*/_createElementVNode("span", null, ":", -1
|
|
16
17
|
/* HOISTED */
|
|
17
18
|
));
|
|
18
19
|
|
|
19
|
-
var
|
|
20
|
+
var _hoisted_2 = {
|
|
20
21
|
key: 0
|
|
21
22
|
};
|
|
22
|
-
var _hoisted_4 = {
|
|
23
|
-
key: 0,
|
|
24
|
-
class: "var-time-picker-title__ampm"
|
|
25
|
-
};
|
|
26
|
-
var _hoisted_5 = {
|
|
27
|
-
class: "var-time-picker-body"
|
|
28
|
-
};
|
|
29
23
|
export function render(_ctx, _cache) {
|
|
30
24
|
var _component_clock = _resolveComponent("clock");
|
|
31
25
|
|
|
32
26
|
return _openBlock(), _createElementBlock("div", {
|
|
33
|
-
class: _normalizeClass(
|
|
27
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), [_ctx.shadow, 'var-elevation--2'])),
|
|
34
28
|
ref: "picker"
|
|
35
29
|
}, [_createElementVNode("div", {
|
|
36
|
-
class:
|
|
30
|
+
class: _normalizeClass(_ctx.n('title')),
|
|
37
31
|
style: _normalizeStyle({
|
|
38
32
|
background: _ctx.headerColor || _ctx.color
|
|
39
33
|
})
|
|
40
|
-
}, [_createElementVNode("div",
|
|
41
|
-
class: _normalizeClass(
|
|
34
|
+
}, [_createElementVNode("div", {
|
|
35
|
+
class: _normalizeClass(_ctx.n('title-time'))
|
|
36
|
+
}, [_createElementVNode("div", {
|
|
37
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('title-btn'), [_ctx.type === 'hour', _ctx.n('title-btn--active')])),
|
|
42
38
|
onClick: _cache[0] || (_cache[0] = $event => _ctx.checkPanel('hour'))
|
|
43
39
|
}, _toDisplayString(_ctx.time.hour), 3
|
|
44
40
|
/* TEXT, CLASS */
|
|
45
|
-
),
|
|
46
|
-
class: _normalizeClass(
|
|
41
|
+
), _hoisted_1, _createElementVNode("div", {
|
|
42
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('title-btn'), [_ctx.type === 'minute', _ctx.n('title-btn--active')])),
|
|
47
43
|
onClick: _cache[1] || (_cache[1] = $event => _ctx.checkPanel('minute'))
|
|
48
44
|
}, _toDisplayString(_ctx.time.minute), 3
|
|
49
45
|
/* TEXT, CLASS */
|
|
50
|
-
), _ctx.useSeconds ? (_openBlock(), _createElementBlock("span",
|
|
46
|
+
), _ctx.useSeconds ? (_openBlock(), _createElementBlock("span", _hoisted_2, ":")) : _createCommentVNode("v-if", true), _ctx.useSeconds ? (_openBlock(), _createElementBlock("div", {
|
|
51
47
|
key: 1,
|
|
52
|
-
class: _normalizeClass(
|
|
48
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('title-btn'), [_ctx.type === 'second', _ctx.n('title-btn--active')])),
|
|
53
49
|
onClick: _cache[2] || (_cache[2] = $event => _ctx.checkPanel('second'))
|
|
54
50
|
}, _toDisplayString(_ctx.time.second), 3
|
|
55
51
|
/* TEXT, CLASS */
|
|
56
|
-
)) : _createCommentVNode("v-if", true)]
|
|
57
|
-
|
|
52
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
53
|
+
/* CLASS */
|
|
54
|
+
), _ctx.format === 'ampm' ? (_openBlock(), _createElementBlock("div", {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: _normalizeClass(_ctx.n('title-ampm'))
|
|
57
|
+
}, [_createElementVNode("div", {
|
|
58
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('title-btn'), [_ctx.ampm === 'am', _ctx.n('title-btn--active')])),
|
|
58
59
|
onClick: _cache[3] || (_cache[3] = $event => _ctx.checkAmpm('am'))
|
|
59
|
-
}, "
|
|
60
|
+
}, "AM", 2
|
|
60
61
|
/* CLASS */
|
|
61
62
|
), _createElementVNode("div", {
|
|
62
|
-
class: _normalizeClass(
|
|
63
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('title-btn'), [_ctx.ampm === 'pm', _ctx.n('title-btn--active')])),
|
|
63
64
|
onClick: _cache[4] || (_cache[4] = $event => _ctx.checkAmpm('pm'))
|
|
64
|
-
}, "
|
|
65
|
+
}, "PM", 2
|
|
66
|
+
/* CLASS */
|
|
67
|
+
)], 2
|
|
65
68
|
/* CLASS */
|
|
66
|
-
)
|
|
67
|
-
/* STYLE */
|
|
68
|
-
), _createElementVNode("div",
|
|
69
|
-
class:
|
|
69
|
+
)) : _createCommentVNode("v-if", true)], 6
|
|
70
|
+
/* CLASS, STYLE */
|
|
71
|
+
), _createElementVNode("div", {
|
|
72
|
+
class: _normalizeClass(_ctx.n('body'))
|
|
73
|
+
}, [_createElementVNode("div", {
|
|
74
|
+
class: _normalizeClass(_ctx.n('clock-container')),
|
|
70
75
|
onTouchstart: _cache[5] || (_cache[5] = function () {
|
|
71
76
|
return _ctx.moveHand && _ctx.moveHand(...arguments);
|
|
72
77
|
}),
|
|
@@ -78,7 +83,7 @@ export function render(_ctx, _cache) {
|
|
|
78
83
|
}),
|
|
79
84
|
ref: "container"
|
|
80
85
|
}, [_createVNode(_Transition, {
|
|
81
|
-
name: "
|
|
86
|
+
name: _ctx.n() + "-panel-fade"
|
|
82
87
|
}, {
|
|
83
88
|
default: _withCtx(() => [(_openBlock(), _createBlock(_component_clock, {
|
|
84
89
|
key: _ctx.type,
|
|
@@ -103,9 +108,13 @@ export function render(_ctx, _cache) {
|
|
|
103
108
|
_: 1
|
|
104
109
|
/* STABLE */
|
|
105
110
|
|
|
106
|
-
}
|
|
107
|
-
/*
|
|
108
|
-
|
|
111
|
+
}, 8
|
|
112
|
+
/* PROPS */
|
|
113
|
+
, ["name"])], 34
|
|
114
|
+
/* CLASS, HYDRATE_EVENTS */
|
|
115
|
+
)], 2
|
|
116
|
+
/* CLASS */
|
|
117
|
+
)], 2
|
|
109
118
|
/* CLASS */
|
|
110
119
|
);
|
|
111
120
|
}
|
|
@@ -153,10 +162,8 @@ export default defineComponent({
|
|
|
153
162
|
});
|
|
154
163
|
|
|
155
164
|
var update = newTime => {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
(_props$onUpdateModel = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel.call(props, newTime);
|
|
159
|
-
props.onChange == null ? void 0 : props.onChange(newTime);
|
|
165
|
+
call(props['onUpdate:modelValue'], newTime);
|
|
166
|
+
call(props.onChange, newTime);
|
|
160
167
|
};
|
|
161
168
|
|
|
162
169
|
var rad2deg = rad => {
|
|
@@ -376,6 +383,8 @@ export default defineComponent({
|
|
|
376
383
|
immediate: true
|
|
377
384
|
});
|
|
378
385
|
return {
|
|
386
|
+
n,
|
|
387
|
+
classes,
|
|
379
388
|
getRad,
|
|
380
389
|
time,
|
|
381
390
|
container,
|
package/es/time-picker/clock.js
CHANGED
|
@@ -3,27 +3,23 @@ import dayjs from 'dayjs/esm';
|
|
|
3
3
|
import { hoursAmpm, hours24, minSec } from './props';
|
|
4
4
|
import { notConvert, convertHour, getIsDisableMinute, getIsDisableSecond, getNumberTime } from './utils';
|
|
5
5
|
import { toNumber } from '../utils/shared';
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
var _hoisted_2 = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "var-time-picker-clock__inner",
|
|
16
|
-
ref: "inner"
|
|
17
|
-
};
|
|
6
|
+
import { createNamespace } from '../utils/components';
|
|
7
|
+
var {
|
|
8
|
+
n,
|
|
9
|
+
classes
|
|
10
|
+
} = createNamespace('time-picker');
|
|
11
|
+
import { normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createCommentVNode as _createCommentVNode } from "vue";
|
|
18
12
|
export function render(_ctx, _cache) {
|
|
19
|
-
return _openBlock(), _createElementBlock("div",
|
|
20
|
-
class:
|
|
13
|
+
return _openBlock(), _createElementBlock("div", {
|
|
14
|
+
class: _normalizeClass(_ctx.n('clock'))
|
|
15
|
+
}, [_createElementVNode("div", {
|
|
16
|
+
class: _normalizeClass(_ctx.n('clock-hand')),
|
|
21
17
|
style: _normalizeStyle(_ctx.handStyle)
|
|
22
|
-
}, null,
|
|
23
|
-
/* STYLE */
|
|
18
|
+
}, null, 6
|
|
19
|
+
/* CLASS, STYLE */
|
|
24
20
|
), (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.timeScales, (timeScale, index) => {
|
|
25
21
|
return _openBlock(), _createElementBlock("div", {
|
|
26
|
-
class: _normalizeClass(
|
|
22
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('clock-item'), [_ctx.isActive(index, false), _ctx.n('clock-item--active')], [_ctx.isDisable(timeScale), _ctx.n('clock-item--disable')])),
|
|
27
23
|
key: timeScale,
|
|
28
24
|
style: _normalizeStyle(_ctx.getStyle(index, timeScale, false))
|
|
29
25
|
}, _toDisplayString(timeScale), 7
|
|
@@ -31,9 +27,13 @@ export function render(_ctx, _cache) {
|
|
|
31
27
|
);
|
|
32
28
|
}), 128
|
|
33
29
|
/* KEYED_FRAGMENT */
|
|
34
|
-
)), _ctx.format === '24hr' && _ctx.type === 'hour' ? (_openBlock(), _createElementBlock("div",
|
|
30
|
+
)), _ctx.format === '24hr' && _ctx.type === 'hour' ? (_openBlock(), _createElementBlock("div", {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: _normalizeClass(_ctx.n('clock-inner')),
|
|
33
|
+
ref: "inner"
|
|
34
|
+
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.hours24, (hour, index) => {
|
|
35
35
|
return _openBlock(), _createElementBlock("div", {
|
|
36
|
-
class: _normalizeClass(
|
|
36
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('clock-item'), [_ctx.isActive(index, true), _ctx.n('clock-item--active')], [_ctx.isDisable(hour), _ctx.n('clock-item--disable')])),
|
|
37
37
|
key: hour,
|
|
38
38
|
style: _normalizeStyle(_ctx.getStyle(index, hour, true))
|
|
39
39
|
}, _toDisplayString(hour), 7
|
|
@@ -41,9 +41,11 @@ export function render(_ctx, _cache) {
|
|
|
41
41
|
);
|
|
42
42
|
}), 128
|
|
43
43
|
/* KEYED_FRAGMENT */
|
|
44
|
-
))],
|
|
45
|
-
/*
|
|
46
|
-
)) : _createCommentVNode("v-if", true)]
|
|
44
|
+
))], 2
|
|
45
|
+
/* CLASS */
|
|
46
|
+
)) : _createCommentVNode("v-if", true)], 2
|
|
47
|
+
/* CLASS */
|
|
48
|
+
);
|
|
47
49
|
}
|
|
48
50
|
export default defineComponent({
|
|
49
51
|
render,
|
|
@@ -313,6 +315,8 @@ export default defineComponent({
|
|
|
313
315
|
immediate: true
|
|
314
316
|
});
|
|
315
317
|
return {
|
|
318
|
+
n,
|
|
319
|
+
classes,
|
|
316
320
|
hours24,
|
|
317
321
|
timeScales,
|
|
318
322
|
inner,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --time-picker-border-radius: 4px; --time-picker-font-size: var(--font-size-md); --time-picker-min-width: 290px; --time-picker-height: 385px; --time-picker-title-padding: 16px; --time-picker-title-color: #fff; --time-picker-title-background: var(--color-primary); --time-picker-title-time-font-size: 50px; --time-picker-title-time-margin: 0 5px; --time-picker-title-ampm-margin-left: 5px; --time-picker-clock-left: 27px; --time-picker-clock-right: 27px; --time-picker-clock-top: 27px; --time-picker-clock-bottom: 27px; --time-picker-clock-container-width: 270px; --time-picker-clock-container-height: 270px; --time-picker-clock-container-background: #e0e0e0; --time-picker-clock-hand-height: calc(50% - 4px); --time-picker-clock-hand-width: 2px; --time-picker-clock-hand-bottom: 50%; --time-picker-clock-hand-left: calc(50% - 1px); --time-picker-clock-hand-background: var(--color-primary); --time-picker-clock-hand-border-color: var(--color-primary); --time-picker-clock-hand-before-width: 10px; --time-picker-clock-hand-before-height: 10px; --time-picker-clock-hand-before-border-width: 2px; --time-picker-clock-hand-after-width: 4px; --time-picker-clock-hand-after-height: 4px; --time-picker-clock-item-height: 32px; --time-picker-clock-item-width: 32px; --time-picker-clock-item-active-background: var(--color-primary); --time-picker-clock-item-active-color: #fff; --time-picker-clock-item-disable-color: rgba(0, 0, 0, 0.26); --time-picker-inner-left: 36px; --time-picker-inner-right: 36px; --time-picker-inner-top: 36px; --time-picker-inner-bottom: 36px; --time-picker-body-background: #fff;}.after-before-basic { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%);}.var-time-picker { border-radius: var(--time-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--time-picker-font-size); position: relative; min-width: var(--time-picker-min-width); height: var(--time-picker-height); overflow: hidden; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-time-
|
|
1
|
+
:root { --time-picker-border-radius: 4px; --time-picker-font-size: var(--font-size-md); --time-picker-min-width: 290px; --time-picker-height: 385px; --time-picker-title-padding: 16px; --time-picker-title-color: #fff; --time-picker-title-background: var(--color-primary); --time-picker-title-time-font-size: 50px; --time-picker-title-time-margin: 0 5px; --time-picker-title-ampm-margin-left: 5px; --time-picker-clock-left: 27px; --time-picker-clock-right: 27px; --time-picker-clock-top: 27px; --time-picker-clock-bottom: 27px; --time-picker-clock-container-width: 270px; --time-picker-clock-container-height: 270px; --time-picker-clock-container-background: #e0e0e0; --time-picker-clock-hand-height: calc(50% - 4px); --time-picker-clock-hand-width: 2px; --time-picker-clock-hand-bottom: 50%; --time-picker-clock-hand-left: calc(50% - 1px); --time-picker-clock-hand-background: var(--color-primary); --time-picker-clock-hand-border-color: var(--color-primary); --time-picker-clock-hand-before-width: 10px; --time-picker-clock-hand-before-height: 10px; --time-picker-clock-hand-before-border-width: 2px; --time-picker-clock-hand-after-width: 4px; --time-picker-clock-hand-after-height: 4px; --time-picker-clock-item-height: 32px; --time-picker-clock-item-width: 32px; --time-picker-clock-item-active-background: var(--color-primary); --time-picker-clock-item-active-color: #fff; --time-picker-clock-item-disable-color: rgba(0, 0, 0, 0.26); --time-picker-inner-left: 36px; --time-picker-inner-right: 36px; --time-picker-inner-top: 36px; --time-picker-inner-bottom: 36px; --time-picker-body-background: #fff;}.after-before-basic { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%);}.var-time-picker { border-radius: var(--time-picker-border-radius); contain: layout style; display: flex; flex-direction: column; font-size: var(--time-picker-font-size); position: relative; min-width: var(--time-picker-min-width); height: var(--time-picker-height); overflow: hidden; -webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.var-time-picker__title { padding: var(--time-picker-title-padding); color: var(--time-picker-title-color); background: var(--time-picker-title-background); display: flex; align-items: flex-end; justify-content: flex-end;}.var-time-picker__title-btn { opacity: 0.6; cursor: pointer; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); transition: 0.3s var(--cubic-bezier); white-space: nowrap;}.var-time-picker__title-btn--active { opacity: 1;}.var-time-picker__title-time { display: flex; justify-content: flex-end; font-size: var(--time-picker-title-time-font-size);}.var-time-picker__title-time .var-time-picker__title-btn { align-items: center; margin: var(--time-picker-title-time-margin);}.var-time-picker__title-ampm { margin-left: var(--time-picker-title-ampm-margin-left);}.var-time-picker__body { flex: 1; display: flex; align-items: center; justify-content: center; background-color: var(--time-picker-body-background);}.var-time-picker__clock { position: absolute; bottom: var(--time-picker-clock-bottom); left: var(--time-picker-clock-left); right: var(--time-picker-clock-right); top: var(--time-picker-clock-top);}.var-time-picker__clock-container { width: var(--time-picker-clock-container-width); height: var(--time-picker-clock-container-height); background: var(--time-picker-clock-container-background); border-radius: 50%; position: relative;}.var-time-picker__clock-hand { height: var(--time-picker-clock-hand-height); width: var(--time-picker-clock-hand-width); bottom: var(--time-picker-clock-hand-bottom); left: var(--time-picker-clock-hand-left); transform-origin: center bottom; position: absolute; will-change: transform; z-index: 1; background-color: var(--time-picker-clock-hand-background); border-color: var(--time-picker-clock-hand-border-color);}.var-time-picker__clock-hand::before { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%); background: transparent; border: var(--time-picker-clock-hand-before-border-width) solid; width: var(--time-picker-clock-hand-before-width); height: var(--time-picker-clock-hand-before-height); top: -5px; border-color: inherit;}.var-time-picker__clock-hand::after { content: ''; position: absolute; border-radius: 100%; left: 50%; transform: translate(-50%, -50%); border-color: inherit; height: var(--time-picker-clock-hand-after-height); width: var(--time-picker-clock-hand-after-width); top: 100%; border-style: solid; background-color: inherit;}.var-time-picker__clock-item { align-items: center; border-radius: 100%; display: flex; justify-content: center; height: var(--time-picker-clock-item-height); position: absolute; width: var(--time-picker-clock-item-width); user-select: none; transform: translate(-50%, -50%);}.var-time-picker__clock-item--active { background: var(--time-picker-clock-item-active-background); z-index: 2; color: var(--time-picker-clock-item-active-color);}.var-time-picker__clock-item--disable { color: var(--time-picker-clock-item-disable-color);}.var-time-picker__clock-inner { position: absolute; bottom: var(--time-picker-inner-bottom); left: var(--time-picker-inner-left); right: var(--time-picker-inner-right); top: var(--time-picker-inner-top);}.var-time-picker-panel-fade-enter-from,.var-time-picker-panel-fade-leave-to { transition: 0.3s var(--cubic-bezier); opacity: 0;}.var-time-picker-panel-fade-leave-active { position: absolute;}
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
overflow: hidden;
|
|
100
100
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
&__title {
|
|
103
103
|
padding: var(--time-picker-title-padding);
|
|
104
104
|
color: var(--time-picker-title-color);
|
|
105
105
|
background: var(--time-picker-title-background);
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
align-items: flex-end;
|
|
108
108
|
justify-content: flex-end;
|
|
109
109
|
|
|
110
|
-
|
|
110
|
+
&-btn {
|
|
111
111
|
opacity: 0.6;
|
|
112
112
|
cursor: pointer;
|
|
113
113
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
@@ -119,23 +119,23 @@
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
|
|
122
|
+
&-time {
|
|
123
123
|
display: flex;
|
|
124
124
|
justify-content: flex-end;
|
|
125
125
|
font-size: var(--time-picker-title-time-font-size);
|
|
126
126
|
|
|
127
|
-
.var-time-
|
|
127
|
+
.var-time-picker__title-btn {
|
|
128
128
|
align-items: center;
|
|
129
129
|
margin: var(--time-picker-title-time-margin);
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
|
|
133
|
+
&-ampm {
|
|
134
134
|
margin-left: var(--time-picker-title-ampm-margin-left);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
&__body {
|
|
139
139
|
flex: 1;
|
|
140
140
|
display: flex;
|
|
141
141
|
align-items: center;
|
|
@@ -143,14 +143,14 @@
|
|
|
143
143
|
background-color: var(--time-picker-body-background);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
&__clock {
|
|
147
147
|
position: absolute;
|
|
148
148
|
bottom: var(--time-picker-clock-bottom);
|
|
149
149
|
left: var(--time-picker-clock-left);
|
|
150
150
|
right: var(--time-picker-clock-right);
|
|
151
151
|
top: var(--time-picker-clock-top);
|
|
152
152
|
|
|
153
|
-
|
|
153
|
+
&-container {
|
|
154
154
|
width: var(--time-picker-clock-container-width);
|
|
155
155
|
height: var(--time-picker-clock-container-height);
|
|
156
156
|
background: var(--time-picker-clock-container-background);
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
position: relative;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
&-hand {
|
|
162
162
|
height: var(--time-picker-clock-hand-height);
|
|
163
163
|
width: var(--time-picker-clock-hand-width);
|
|
164
164
|
bottom: var(--time-picker-clock-hand-bottom);
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
|
|
196
|
+
&-item {
|
|
197
197
|
align-items: center;
|
|
198
198
|
border-radius: 100%;
|
|
199
199
|
display: flex;
|
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
}
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
|
|
218
|
+
&-inner {
|
|
219
219
|
position: absolute;
|
|
220
220
|
bottom: var(--time-picker-inner-bottom);
|
|
221
221
|
left: var(--time-picker-inner-left);
|
package/es/umdIndex.js
CHANGED
|
@@ -2,6 +2,8 @@ import ActionSheet, * as ActionSheetModule from './action-sheet'
|
|
|
2
2
|
import AppBar, * as AppBarModule from './app-bar'
|
|
3
3
|
import BackTop, * as BackTopModule from './back-top'
|
|
4
4
|
import Badge, * as BadgeModule from './badge'
|
|
5
|
+
import BottomNavigation, * as BottomNavigationModule from './bottom-navigation'
|
|
6
|
+
import BottomNavigationItem, * as BottomNavigationItemModule from './bottom-navigation-item'
|
|
5
7
|
import Button, * as ButtonModule from './button'
|
|
6
8
|
import Card, * as CardModule from './card'
|
|
7
9
|
import Cell, * as CellModule from './cell'
|
|
@@ -65,6 +67,8 @@ import './action-sheet/style'
|
|
|
65
67
|
import './app-bar/style'
|
|
66
68
|
import './back-top/style'
|
|
67
69
|
import './badge/style'
|
|
70
|
+
import './bottom-navigation/style'
|
|
71
|
+
import './bottom-navigation-item/style'
|
|
68
72
|
import './button/style'
|
|
69
73
|
import './card/style'
|
|
70
74
|
import './cell/style'
|
|
@@ -130,6 +134,8 @@ function install(app) {
|
|
|
130
134
|
AppBar.install && app.use(AppBar)
|
|
131
135
|
BackTop.install && app.use(BackTop)
|
|
132
136
|
Badge.install && app.use(Badge)
|
|
137
|
+
BottomNavigation.install && app.use(BottomNavigation)
|
|
138
|
+
BottomNavigationItem.install && app.use(BottomNavigationItem)
|
|
133
139
|
Button.install && app.use(Button)
|
|
134
140
|
Card.install && app.use(Card)
|
|
135
141
|
Cell.install && app.use(Cell)
|
|
@@ -196,6 +202,8 @@ export {
|
|
|
196
202
|
AppBar,
|
|
197
203
|
BackTop,
|
|
198
204
|
Badge,
|
|
205
|
+
BottomNavigation,
|
|
206
|
+
BottomNavigationItem,
|
|
199
207
|
Button,
|
|
200
208
|
Card,
|
|
201
209
|
Cell,
|
|
@@ -262,6 +270,8 @@ export default {
|
|
|
262
270
|
AppBar,
|
|
263
271
|
BackTop,
|
|
264
272
|
Badge,
|
|
273
|
+
BottomNavigation,
|
|
274
|
+
BottomNavigationItem,
|
|
265
275
|
Button,
|
|
266
276
|
Card,
|
|
267
277
|
Cell,
|
package/es/uploader/Uploader.js
CHANGED
|
@@ -10,27 +10,22 @@ import Ripple from '../ripple';
|
|
|
10
10
|
import { defineComponent, nextTick, reactive, computed, watch, ref } from 'vue';
|
|
11
11
|
import { props } from './props';
|
|
12
12
|
import { isNumber, isHTMLSupportImage, isHTMLSupportVideo, toNumber, isString } from '../utils/shared';
|
|
13
|
-
import { useValidation } from '../utils/components';
|
|
13
|
+
import { call, useValidation, createNamespace } from '../utils/components';
|
|
14
14
|
import { useForm } from '../form/provide';
|
|
15
|
+
var {
|
|
16
|
+
n,
|
|
17
|
+
classes
|
|
18
|
+
} = createNamespace('uploader');
|
|
15
19
|
var fid = 0;
|
|
16
|
-
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle,
|
|
20
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, withModifiers as _withModifiers, createCommentVNode as _createCommentVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives, renderSlot as _renderSlot, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
|
|
17
21
|
|
|
18
22
|
var _withScopeId = n => (_pushScopeId(""), n = n(), _popScopeId(), n);
|
|
19
23
|
|
|
20
|
-
var _hoisted_1 =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
var _hoisted_3 = ["onClick"];
|
|
27
|
-
var _hoisted_4 = {
|
|
28
|
-
class: "var-uploader__file-name"
|
|
29
|
-
};
|
|
30
|
-
var _hoisted_5 = ["onClick"];
|
|
31
|
-
var _hoisted_6 = ["src", "alt"];
|
|
32
|
-
var _hoisted_7 = ["multiple", "accept", "capture", "disabled"];
|
|
33
|
-
var _hoisted_8 = ["src"];
|
|
24
|
+
var _hoisted_1 = ["onClick"];
|
|
25
|
+
var _hoisted_2 = ["onClick"];
|
|
26
|
+
var _hoisted_3 = ["src", "alt"];
|
|
27
|
+
var _hoisted_4 = ["multiple", "accept", "capture", "disabled"];
|
|
28
|
+
var _hoisted_5 = ["src"];
|
|
34
29
|
export function render(_ctx, _cache) {
|
|
35
30
|
var _component_var_icon = _resolveComponent("var-icon");
|
|
36
31
|
|
|
@@ -40,49 +35,57 @@ export function render(_ctx, _cache) {
|
|
|
40
35
|
|
|
41
36
|
var _directive_ripple = _resolveDirective("ripple");
|
|
42
37
|
|
|
43
|
-
return _openBlock(), _createElementBlock("div",
|
|
38
|
+
return _openBlock(), _createElementBlock("div", {
|
|
39
|
+
class: _normalizeClass(_ctx.classes(_ctx.n(), 'var--box'))
|
|
40
|
+
}, [_createElementVNode("div", {
|
|
41
|
+
class: _normalizeClass(_ctx.n('file-list'))
|
|
42
|
+
}, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.files, f => {
|
|
44
43
|
return _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
45
|
-
class: _normalizeClass(
|
|
44
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('file'), 'var-elevation--2', [f.state === 'loading', _ctx.n('--loading')])),
|
|
46
45
|
key: f.id,
|
|
47
46
|
onClick: $event => _ctx.preview(f)
|
|
48
|
-
}, [_createElementVNode("div",
|
|
49
|
-
|
|
47
|
+
}, [_createElementVNode("div", {
|
|
48
|
+
class: _normalizeClass(_ctx.n('file-name'))
|
|
49
|
+
}, _toDisplayString(f.name || f.url), 3
|
|
50
|
+
/* TEXT, CLASS */
|
|
50
51
|
), _ctx.removable ? (_openBlock(), _createElementBlock("div", {
|
|
51
52
|
key: 0,
|
|
52
|
-
class:
|
|
53
|
+
class: _normalizeClass(_ctx.n('file-close')),
|
|
53
54
|
onClick: _withModifiers($event => _ctx.handleRemove(f), ["stop"])
|
|
54
55
|
}, [_createVNode(_component_var_icon, {
|
|
55
|
-
class:
|
|
56
|
+
class: _normalizeClass(_ctx.n('file-close-icon')),
|
|
56
57
|
"var-uploader-cover": "",
|
|
57
58
|
name: "delete"
|
|
58
|
-
}
|
|
59
|
+
}, null, 8
|
|
59
60
|
/* PROPS */
|
|
60
|
-
,
|
|
61
|
+
, ["class"])], 10
|
|
62
|
+
/* CLASS, PROPS */
|
|
63
|
+
, _hoisted_2)) : _createCommentVNode("v-if", true), f.cover ? (_openBlock(), _createElementBlock("img", {
|
|
61
64
|
key: 1,
|
|
62
|
-
class:
|
|
65
|
+
class: _normalizeClass(_ctx.n('file-cover')),
|
|
63
66
|
style: _normalizeStyle({
|
|
64
67
|
objectFit: f.fit
|
|
65
68
|
}),
|
|
66
69
|
src: f.cover,
|
|
67
70
|
alt: f.name
|
|
68
|
-
}, null,
|
|
69
|
-
/* STYLE, PROPS */
|
|
70
|
-
,
|
|
71
|
-
class: _normalizeClass(
|
|
71
|
+
}, null, 14
|
|
72
|
+
/* CLASS, STYLE, PROPS */
|
|
73
|
+
, _hoisted_3)) : _createCommentVNode("v-if", true), _createElementVNode("div", {
|
|
74
|
+
class: _normalizeClass(_ctx.classes(_ctx.n('file-indicator'), [f.state === 'success', _ctx.n('--success')], [f.state === 'error', _ctx.n('--error')]))
|
|
72
75
|
}, null, 2
|
|
73
76
|
/* CLASS */
|
|
74
77
|
)], 10
|
|
75
78
|
/* CLASS, PROPS */
|
|
76
|
-
,
|
|
79
|
+
, _hoisted_1)), [[_directive_ripple, {
|
|
77
80
|
disabled: _ctx.disabled || _ctx.formDisabled || _ctx.readonly || _ctx.formReadonly || !_ctx.ripple
|
|
78
81
|
}]]);
|
|
79
82
|
}), 128
|
|
80
83
|
/* KEYED_FRAGMENT */
|
|
81
84
|
)), !_ctx.maxlength || _ctx.modelValue.length < _ctx.maxlength ? _withDirectives((_openBlock(), _createElementBlock("div", {
|
|
82
85
|
key: 0,
|
|
83
|
-
class: _normalizeClass(
|
|
86
|
+
class: _normalizeClass(_ctx.classes('var--relative', [!_ctx.$slots.default, _ctx.n('action') + " var-elevation--2"], [_ctx.disabled || _ctx.formDisabled, _ctx.n('--disabled')]))
|
|
84
87
|
}, [_createElementVNode("input", {
|
|
85
|
-
class:
|
|
88
|
+
class: _normalizeClass(_ctx.n('action-input')),
|
|
86
89
|
type: "file",
|
|
87
90
|
multiple: _ctx.multiple,
|
|
88
91
|
accept: _ctx.accept,
|
|
@@ -91,23 +94,27 @@ export function render(_ctx, _cache) {
|
|
|
91
94
|
onChange: _cache[0] || (_cache[0] = function () {
|
|
92
95
|
return _ctx.handleChange && _ctx.handleChange(...arguments);
|
|
93
96
|
})
|
|
94
|
-
}, null,
|
|
95
|
-
/* PROPS, HYDRATE_EVENTS */
|
|
96
|
-
,
|
|
97
|
-
class:
|
|
97
|
+
}, null, 42
|
|
98
|
+
/* CLASS, PROPS, HYDRATE_EVENTS */
|
|
99
|
+
, _hoisted_4), _renderSlot(_ctx.$slots, "default", {}, () => [_createVNode(_component_var_icon, {
|
|
100
|
+
class: _normalizeClass(_ctx.n('action-icon')),
|
|
98
101
|
"var-uploader-cover": "",
|
|
99
102
|
name: "plus"
|
|
100
|
-
}
|
|
103
|
+
}, null, 8
|
|
104
|
+
/* PROPS */
|
|
105
|
+
, ["class"])])], 2
|
|
101
106
|
/* CLASS */
|
|
102
107
|
)), [[_directive_ripple, {
|
|
103
108
|
disabled: _ctx.disabled || _ctx.formDisabled || _ctx.readonly || _ctx.formReadonly || !_ctx.ripple || _ctx.$slots.default
|
|
104
|
-
}]]) : _createCommentVNode("v-if", true)]
|
|
109
|
+
}]]) : _createCommentVNode("v-if", true)], 2
|
|
110
|
+
/* CLASS */
|
|
111
|
+
), _createVNode(_component_var_form_details, {
|
|
105
112
|
"error-message": _ctx.errorMessage,
|
|
106
113
|
"maxlength-text": _ctx.maxlengthText
|
|
107
114
|
}, null, 8
|
|
108
115
|
/* PROPS */
|
|
109
116
|
, ["error-message", "maxlength-text"]), _createVNode(_component_var_popup, {
|
|
110
|
-
class:
|
|
117
|
+
class: _normalizeClass(_ctx.n('preview')),
|
|
111
118
|
"var-uploader-cover": "",
|
|
112
119
|
position: "center",
|
|
113
120
|
show: _ctx.showPreview,
|
|
@@ -119,7 +126,7 @@ export function render(_ctx, _cache) {
|
|
|
119
126
|
|
|
120
127
|
return [_ctx.currentPreview && _ctx.isHTMLSupportVideo((_ctx$currentPreview = _ctx.currentPreview) == null ? void 0 : _ctx$currentPreview.url) ? (_openBlock(), _createElementBlock("video", {
|
|
121
128
|
key: 0,
|
|
122
|
-
class:
|
|
129
|
+
class: _normalizeClass(_ctx.n('preview-video')),
|
|
123
130
|
playsinline: "true",
|
|
124
131
|
"webkit-playsinline": "true",
|
|
125
132
|
"x5-playsinline": "true",
|
|
@@ -127,16 +134,18 @@ export function render(_ctx, _cache) {
|
|
|
127
134
|
"x5-video-player-fullscreen": "false",
|
|
128
135
|
controls: "",
|
|
129
136
|
src: (_ctx$currentPreview2 = _ctx.currentPreview) == null ? void 0 : _ctx$currentPreview2.url
|
|
130
|
-
}, null,
|
|
131
|
-
/* PROPS */
|
|
132
|
-
,
|
|
137
|
+
}, null, 10
|
|
138
|
+
/* CLASS, PROPS */
|
|
139
|
+
, _hoisted_5)) : _createCommentVNode("v-if", true)];
|
|
133
140
|
}),
|
|
134
141
|
_: 1
|
|
135
142
|
/* STABLE */
|
|
136
143
|
|
|
137
144
|
}, 8
|
|
138
145
|
/* PROPS */
|
|
139
|
-
, ["show"])]
|
|
146
|
+
, ["class", "show"])], 2
|
|
147
|
+
/* CLASS */
|
|
148
|
+
);
|
|
140
149
|
}
|
|
141
150
|
export default defineComponent({
|
|
142
151
|
render,
|
|
@@ -265,8 +274,6 @@ export default defineComponent({
|
|
|
265
274
|
|
|
266
275
|
var handleChange = /*#__PURE__*/function () {
|
|
267
276
|
var _ref = _asyncToGenerator(function* (event) {
|
|
268
|
-
var _props$onUpdateModel;
|
|
269
|
-
|
|
270
277
|
var {
|
|
271
278
|
maxsize,
|
|
272
279
|
maxlength,
|
|
@@ -284,7 +291,7 @@ export default defineComponent({
|
|
|
284
291
|
var getValidSizeVarFile = varFiles => {
|
|
285
292
|
return varFiles.filter(varFile => {
|
|
286
293
|
if (varFile.file.size > toNumber(maxsize)) {
|
|
287
|
-
onOversize
|
|
294
|
+
call(onOversize, reactive(varFile));
|
|
288
295
|
return false;
|
|
289
296
|
}
|
|
290
297
|
|
|
@@ -316,9 +323,9 @@ export default defineComponent({
|
|
|
316
323
|
} = _ref3;
|
|
317
324
|
return varFile;
|
|
318
325
|
});
|
|
319
|
-
(
|
|
326
|
+
call(props['onUpdate:modelValue'], [...modelValue, ...validVarFiles]);
|
|
320
327
|
event.target.value = '';
|
|
321
|
-
validVarFiles.forEach(varFile => onAfterRead
|
|
328
|
+
validVarFiles.forEach(varFile => call(onAfterRead, reactive(varFile)));
|
|
322
329
|
});
|
|
323
330
|
|
|
324
331
|
return function handleChange(_x) {
|
|
@@ -328,8 +335,6 @@ export default defineComponent({
|
|
|
328
335
|
|
|
329
336
|
var handleRemove = /*#__PURE__*/function () {
|
|
330
337
|
var _ref4 = _asyncToGenerator(function* (removedVarFile) {
|
|
331
|
-
var _props$onUpdateModel2;
|
|
332
|
-
|
|
333
338
|
var {
|
|
334
339
|
disabled,
|
|
335
340
|
readonly,
|
|
@@ -347,9 +352,9 @@ export default defineComponent({
|
|
|
347
352
|
}
|
|
348
353
|
|
|
349
354
|
var expectedFiles = modelValue.filter(varFile => varFile !== removedVarFile);
|
|
350
|
-
onRemove
|
|
355
|
+
call(onRemove, removedVarFile);
|
|
351
356
|
validateWithTrigger('onRemove');
|
|
352
|
-
(
|
|
357
|
+
call(props['onUpdate:modelValue'], expectedFiles);
|
|
353
358
|
});
|
|
354
359
|
|
|
355
360
|
return function handleRemove(_x2) {
|
|
@@ -389,10 +394,8 @@ export default defineComponent({
|
|
|
389
394
|
|
|
390
395
|
|
|
391
396
|
var reset = () => {
|
|
392
|
-
var _props$onUpdateModel3;
|
|
393
|
-
|
|
394
397
|
callReset = true;
|
|
395
|
-
(
|
|
398
|
+
call(props['onUpdate:modelValue'], []);
|
|
396
399
|
resetValidation();
|
|
397
400
|
};
|
|
398
401
|
|
|
@@ -401,7 +404,7 @@ export default defineComponent({
|
|
|
401
404
|
resetValidation,
|
|
402
405
|
reset
|
|
403
406
|
};
|
|
404
|
-
bindForm
|
|
407
|
+
call(bindForm, uploaderProvider);
|
|
405
408
|
watch(() => props.modelValue, () => {
|
|
406
409
|
!callReset && validateWithTrigger('onChange');
|
|
407
410
|
callReset = false;
|
|
@@ -409,6 +412,8 @@ export default defineComponent({
|
|
|
409
412
|
deep: true
|
|
410
413
|
});
|
|
411
414
|
return {
|
|
415
|
+
n,
|
|
416
|
+
classes,
|
|
412
417
|
files,
|
|
413
418
|
showPreview,
|
|
414
419
|
currentPreview,
|