@varlet/ui 1.23.7 → 1.23.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.23.8](https://github.com/haoziqaq/varlet/compare/v1.23.7...v1.23.8) (2021-11-24)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **d.ts:** repair type ([b925e7e](https://github.com/haoziqaq/varlet/commit/b925e7ea63c4154b3c26cb711fde4a7382633c80))
12
+ * compatible dayjs for nuxt ([0b3b540](https://github.com/haoziqaq/varlet/commit/0b3b540694e13130686773d9bcd3c3c4d21da496))
13
+
14
+
15
+
16
+
17
+
6
18
  ## [1.23.7](https://github.com/haoziqaq/varlet/compare/v1.23.6...v1.23.7) (2021-11-23)
7
19
 
8
20
 
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.css'
2
+ import '../SnackbarSfc.css'
2
3
  import '../../styles/elevation.css'
3
4
  import '../../loading/loading.css'
4
5
  import '../../button/button.css'
5
6
  import '../../icon/icon.css'
6
7
  import '../snackbar.css'
7
8
  import '../coreSfc.css'
8
- import '../SnackbarSfc.css'
@@ -1,8 +1,8 @@
1
1
  import '../../styles/common.less'
2
+ import '../SnackbarSfc.less'
2
3
  import '../../styles/elevation.less'
3
4
  import '../../loading/loading.less'
4
5
  import '../../button/button.less'
5
6
  import '../../icon/icon.less'
6
7
  import '../snackbar.less'
7
8
  import '../coreSfc.less'
8
- import '../SnackbarSfc.less'
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "framework": "vue",
4
- "version": "1.23.5",
4
+ "version": "1.23.7",
5
5
  "name": "VARLET",
6
6
  "contributions": {
7
7
  "html": {
@@ -6,7 +6,7 @@ exports.default = void 0;
6
6
 
7
7
  var _vue = require("vue");
8
8
 
9
- var dayjs = _interopRequireWildcard(require("dayjs"));
9
+ var _dayjs = _interopRequireDefault(require("dayjs"));
10
10
 
11
11
  var _monthPickerPanel = _interopRequireDefault(require("./src/month-picker-panel.js"));
12
12
 
@@ -22,10 +22,6 @@ var _locale = require("../locale");
22
22
 
23
23
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
24
 
25
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
26
-
27
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
28
-
29
25
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
30
26
 
31
27
  var _hoisted_1 = {
@@ -161,7 +157,7 @@ var _default = (0, _vue.defineComponent)({
161
157
  props: _props.props,
162
158
 
163
159
  setup(props) {
164
- var currentDate = dayjs().format('YYYY-MM-D');
160
+ var currentDate = (0, _dayjs.default)().format('YYYY-MM-D');
165
161
  var [currentYear, currentMonth, currentDay] = currentDate.split('-');
166
162
 
167
163
  var monthDes = _props.MONTH_LIST.find(month => month.index === currentMonth);
@@ -223,12 +219,12 @@ var _default = (0, _vue.defineComponent)({
223
219
  } = props;
224
220
 
225
221
  if (range) {
226
- chooseRangeDay.value = chooseRangeDay.value.map(date => dayjs(date).format('YYYY-MM-DD'));
222
+ chooseRangeDay.value = chooseRangeDay.value.map(date => (0, _dayjs.default)(date).format('YYYY-MM-DD'));
227
223
  return chooseRangeDay.value[0] + " ~ " + chooseRangeDay.value[1];
228
224
  }
229
225
 
230
226
  if (multiple) return "" + chooseDays.value.length + _locale.pack.value.datePickerSelected;
231
- var weekIndex = dayjs(chooseYear.value + "-" + chooseMonth.value.index + "-" + chooseDay.value).day();
227
+ var weekIndex = (0, _dayjs.default)(chooseYear.value + "-" + chooseMonth.value.index + "-" + chooseDay.value).day();
232
228
 
233
229
  var week = _props.WEEK_HEADER.find(value => value.index === "" + weekIndex);
234
230
 
@@ -239,7 +235,7 @@ var _default = (0, _vue.defineComponent)({
239
235
  return weekName.slice(0, 3) + ", " + monthName.slice(0, 3) + " " + chooseDay.value;
240
236
  });
241
237
  var slotProps = (0, _vue.computed)(() => {
242
- var weekIndex = dayjs(chooseYear.value + "-" + chooseMonth.value.index + "-" + chooseDay.value).day();
238
+ var weekIndex = (0, _dayjs.default)(chooseYear.value + "-" + chooseMonth.value.index + "-" + chooseDay.value).day();
243
239
  return {
244
240
  week: "" + weekIndex,
245
241
  year: chooseYear.value,
@@ -247,7 +243,7 @@ var _default = (0, _vue.defineComponent)({
247
243
  date: chooseDay.value
248
244
  };
249
245
  });
250
- var formatRange = (0, _vue.computed)(() => getChoose.value.chooseRangeDay.map(choose => dayjs(choose).format('YYYY-MM-DD')));
246
+ var formatRange = (0, _vue.computed)(() => getChoose.value.chooseRangeDay.map(choose => (0, _dayjs.default)(choose).format('YYYY-MM-DD')));
251
247
  var isSameYear = (0, _vue.computed)(() => chooseYear.value === previewYear.value);
252
248
  var isSameMonth = (0, _vue.computed)(() => chooseMonth.value.index === previewMonth.value.index);
253
249
 
@@ -266,7 +262,7 @@ var _default = (0, _vue.defineComponent)({
266
262
  if (rangeDone.value) {
267
263
  var _props$onUpdateModel;
268
264
 
269
- var isChangeOrder = dayjs(rangeDate.value[0]).isAfter(rangeDate.value[1]);
265
+ var isChangeOrder = (0, _dayjs.default)(rangeDate.value[0]).isAfter(rangeDate.value[1]);
270
266
 
271
267
  var _date = isChangeOrder ? [rangeDate.value[1], rangeDate.value[0]] : [...rangeDate.value];
272
268
 
@@ -280,7 +276,7 @@ var _default = (0, _vue.defineComponent)({
280
276
 
281
277
  var multipleDates = type === 'month' ? chooseMonths : chooseDays;
282
278
  var formatType = type === 'month' ? 'YYYY-MM' : 'YYYY-MM-DD';
283
- var formatDates = multipleDates.value.map(date => dayjs(date).format(formatType));
279
+ var formatDates = multipleDates.value.map(date => (0, _dayjs.default)(date).format(formatType));
284
280
  var index = formatDates.findIndex(choose => choose === date);
285
281
  if (index === -1) formatDates.push(date);else formatDates.splice(index, 1);
286
282
  (_props$onUpdateModel2 = props['onUpdate:modelValue']) == null ? void 0 : _props$onUpdateModel2.call(props, formatDates);
@@ -304,7 +300,7 @@ var _default = (0, _vue.defineComponent)({
304
300
  if (day < 0 || readonly) return;
305
301
  reverse.value = getReverse('day', day);
306
302
  var date = previewYear.value + "-" + previewMonth.value.index + "-" + day;
307
- var formatDate = dayjs(date).format('YYYY-MM-DD');
303
+ var formatDate = (0, _dayjs.default)(date).format('YYYY-MM-DD');
308
304
  if (range) updateRange(formatDate, 'day');else if (multiple) updateMultiple(formatDate, 'day');else {
309
305
  updateModelValue == null ? void 0 : updateModelValue(formatDate);
310
306
  onChange == null ? void 0 : onChange(formatDate);
@@ -391,11 +387,11 @@ var _default = (0, _vue.defineComponent)({
391
387
  var rangeInit = (value, type) => {
392
388
  var rangeDate = type === 'month' ? chooseRangeMonth : chooseRangeDay;
393
389
  var formatType = type === 'month' ? 'YYYY-MM' : 'YYYY-MM-D';
394
- var formatDateList = value.map(choose => dayjs(choose).format(formatType)).slice(0, 2);
390
+ var formatDateList = value.map(choose => (0, _dayjs.default)(choose).format(formatType)).slice(0, 2);
395
391
  var isValid = rangeDate.value.some(date => invalidFormatDate(date));
396
392
  if (isValid) return;
397
393
  rangeDate.value = formatDateList;
398
- var isChangeOrder = dayjs(rangeDate.value[0]).isAfter(rangeDate.value[1]);
394
+ var isChangeOrder = (0, _dayjs.default)(rangeDate.value[0]).isAfter(rangeDate.value[1]);
399
395
 
400
396
  if (rangeDate.value.length === 2 && isChangeOrder) {
401
397
  rangeDate.value = [rangeDate.value[1], rangeDate.value[0]];
@@ -406,12 +402,12 @@ var _default = (0, _vue.defineComponent)({
406
402
  var rangeDate = type === 'month' ? chooseMonths : chooseDays;
407
403
  var formatType = type === 'month' ? 'YYYY-MM' : 'YYYY-MM-D'; // 需要去重
408
404
 
409
- var formatDateList = Array.from(new Set(value.map(choose => dayjs(choose).format(formatType))));
405
+ var formatDateList = Array.from(new Set(value.map(choose => (0, _dayjs.default)(choose).format(formatType))));
410
406
  rangeDate.value = formatDateList.filter(date => date !== 'Invalid Date');
411
407
  };
412
408
 
413
409
  var dateInit = value => {
414
- var formatDate = dayjs(value).format('YYYY-MM-D');
410
+ var formatDate = (0, _dayjs.default)(value).format('YYYY-MM-D');
415
411
  if (invalidFormatDate(formatDate)) return;
416
412
  var [yearValue, monthValue, dayValue] = formatDate.split('-');
417
413
 
@@ -4,7 +4,7 @@ exports.__esModule = true;
4
4
  exports.render = render;
5
5
  exports.default = void 0;
6
6
 
7
- var dayjs = _interopRequireWildcard(require("dayjs"));
7
+ var _dayjs = _interopRequireDefault(require("dayjs"));
8
8
 
9
9
  var _isSameOrBefore = _interopRequireDefault(require("dayjs/plugin/isSameOrBefore"));
10
10
 
@@ -24,14 +24,11 @@ var _locale = require("../../locale");
24
24
 
25
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
26
 
27
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
28
-
29
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
-
31
27
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
32
28
 
33
- dayjs.extend(_isSameOrBefore.default);
34
- dayjs.extend(_isSameOrAfter.default);
29
+ _dayjs.default.extend(_isSameOrBefore.default);
30
+
31
+ _dayjs.default.extend(_isSameOrAfter.default);
35
32
 
36
33
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
37
34
 
@@ -174,8 +171,8 @@ var _default = (0, _vue.defineComponent)({
174
171
  previewYear
175
172
  }
176
173
  } = props;
177
- var monthNum = dayjs(previewYear + "-" + previewMonth.index).daysInMonth();
178
- var firstDayToWeek = dayjs(previewYear + "-" + previewMonth.index + "-01").day();
174
+ var monthNum = (0, _dayjs.default)(previewYear + "-" + previewMonth.index).daysInMonth();
175
+ var firstDayToWeek = (0, _dayjs.default)(previewYear + "-" + previewMonth.index + "-01").day();
179
176
  var index = sortWeekList.value.findIndex(week => week.index === "" + firstDayToWeek);
180
177
  days.value = [...Array(index).fill(-1), ...Array.from(Array(monthNum + 1).keys())].filter(value => value);
181
178
  };
@@ -194,13 +191,13 @@ var _default = (0, _vue.defineComponent)({
194
191
 
195
192
  if (max) {
196
193
  var date = previewYear + "-" + ((0, _shared.toNumber)(previewMonth.index) + 1);
197
- panelBtnDisabled.right = !dayjs(date).isSameOrBefore(dayjs(max), 'month');
194
+ panelBtnDisabled.right = !(0, _dayjs.default)(date).isSameOrBefore((0, _dayjs.default)(max), 'month');
198
195
  }
199
196
 
200
197
  if (min) {
201
198
  var _date = previewYear + "-" + ((0, _shared.toNumber)(previewMonth.index) - 1);
202
199
 
203
- panelBtnDisabled.left = !dayjs(_date).isSameOrAfter(dayjs(min), 'month');
200
+ panelBtnDisabled.left = !(0, _dayjs.default)(_date).isSameOrAfter((0, _dayjs.default)(min), 'month');
204
201
  }
205
202
  };
206
203
 
@@ -218,8 +215,8 @@ var _default = (0, _vue.defineComponent)({
218
215
  var isBeforeMax = true;
219
216
  var isAfterMin = true;
220
217
  var previewDate = previewYear + "-" + previewMonth.index + "-" + day;
221
- if (max) isBeforeMax = dayjs(previewDate).isSameOrBefore(dayjs(max), 'day');
222
- if (min) isAfterMin = dayjs(previewDate).isSameOrAfter(dayjs(min), 'day');
218
+ if (max) isBeforeMax = (0, _dayjs.default)(previewDate).isSameOrBefore((0, _dayjs.default)(max), 'day');
219
+ if (min) isAfterMin = (0, _dayjs.default)(previewDate).isSameOrAfter((0, _dayjs.default)(min), 'day');
223
220
  return isBeforeMax && isAfterMin;
224
221
  };
225
222
 
@@ -236,8 +233,8 @@ var _default = (0, _vue.defineComponent)({
236
233
  if (!chooseRangeDay.length) return false;
237
234
 
238
235
  if (range) {
239
- var isBeforeMax = dayjs(val).isSameOrBefore(dayjs(chooseRangeDay[1]), 'day');
240
- var isAfterMin = dayjs(val).isSameOrAfter(dayjs(chooseRangeDay[0]), 'day');
236
+ var isBeforeMax = (0, _dayjs.default)(val).isSameOrBefore((0, _dayjs.default)(chooseRangeDay[1]), 'day');
237
+ var isAfterMin = (0, _dayjs.default)(val).isSameOrAfter((0, _dayjs.default)(chooseRangeDay[0]), 'day');
241
238
  return isBeforeMax && isAfterMin;
242
239
  }
243
240
 
@@ -6,7 +6,7 @@ exports.default = void 0;
6
6
 
7
7
  var _vue = require("vue");
8
8
 
9
- var dayjs = _interopRequireWildcard(require("dayjs"));
9
+ var _dayjs = _interopRequireDefault(require("dayjs"));
10
10
 
11
11
  var _isSameOrBefore = _interopRequireDefault(require("dayjs/plugin/isSameOrBefore"));
12
12
 
@@ -24,14 +24,11 @@ var _locale = require("../../locale");
24
24
 
25
25
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
26
 
27
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
28
-
29
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
30
-
31
27
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
32
28
 
33
- dayjs.extend(_isSameOrBefore.default);
34
- dayjs.extend(_isSameOrAfter.default);
29
+ _dayjs.default.extend(_isSameOrBefore.default);
30
+
31
+ _dayjs.default.extend(_isSameOrAfter.default);
35
32
 
36
33
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
37
34
 
@@ -154,8 +151,8 @@ var _default = (0, _vue.defineComponent)({
154
151
  var isBeforeMax = true;
155
152
  var isAfterMin = true;
156
153
  var previewDate = previewYear + "-" + key;
157
- if (max) isBeforeMax = dayjs(previewDate).isSameOrBefore(dayjs(max), 'month');
158
- if (min) isAfterMin = dayjs(previewDate).isSameOrAfter(dayjs(min), 'month');
154
+ if (max) isBeforeMax = (0, _dayjs.default)(previewDate).isSameOrBefore((0, _dayjs.default)(max), 'month');
155
+ if (min) isAfterMin = (0, _dayjs.default)(previewDate).isSameOrAfter((0, _dayjs.default)(min), 'month');
159
156
  return isBeforeMax && isAfterMin;
160
157
  };
161
158
 
@@ -174,8 +171,8 @@ var _default = (0, _vue.defineComponent)({
174
171
  if (!chooseRangeMonth.length) return false;
175
172
 
176
173
  if (range) {
177
- var isBeforeMax = dayjs(val).isSameOrBefore(dayjs(chooseRangeMonth[1]), 'month');
178
- var isAfterMin = dayjs(val).isSameOrAfter(dayjs(chooseRangeMonth[0]), 'month');
174
+ var isBeforeMax = (0, _dayjs.default)(val).isSameOrBefore((0, _dayjs.default)(chooseRangeMonth[1]), 'month');
175
+ var isAfterMin = (0, _dayjs.default)(val).isSameOrAfter((0, _dayjs.default)(chooseRangeMonth[0]), 'month');
179
176
  return isBeforeMax && isAfterMin;
180
177
  }
181
178
 
@@ -266,8 +263,8 @@ var _default = (0, _vue.defineComponent)({
266
263
  max
267
264
  }
268
265
  } = props;
269
- if (max) panelBtnDisabled.right = !dayjs("" + ((0, _shared.toNumber)(year) + 1)).isSameOrBefore(dayjs(max), 'year');
270
- if (min) panelBtnDisabled.left = !dayjs("" + ((0, _shared.toNumber)(year) - 1)).isSameOrAfter(dayjs(min), 'year');
266
+ if (max) panelBtnDisabled.right = !(0, _dayjs.default)("" + ((0, _shared.toNumber)(year) + 1)).isSameOrBefore((0, _dayjs.default)(max), 'year');
267
+ if (min) panelBtnDisabled.left = !(0, _dayjs.default)("" + ((0, _shared.toNumber)(year) - 1)).isSameOrAfter((0, _dayjs.default)(min), 'year');
271
268
  }, {
272
269
  immediate: true
273
270
  });
@@ -6,13 +6,11 @@ exports.default = void 0;
6
6
 
7
7
  var _vue = require("vue");
8
8
 
9
- var dayjs = _interopRequireWildcard(require("dayjs"));
9
+ var _dayjs = _interopRequireDefault(require("dayjs"));
10
10
 
11
11
  var _shared = require("../../utils/shared");
12
12
 
13
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
-
15
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
14
 
17
15
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
18
16
 
@@ -68,14 +66,14 @@ var _default = (0, _vue.defineComponent)({
68
66
  var yearRange = [(0, _shared.toNumber)(preview) + 100, (0, _shared.toNumber)(preview) - 100];
69
67
 
70
68
  if (max) {
71
- var formatMax = dayjs(max).format('YYYY-MM-D');
69
+ var formatMax = (0, _dayjs.default)(max).format('YYYY-MM-D');
72
70
  var year = (0, _shared.toNumber)(formatMax.split('-')[0]);
73
71
  if (year < yearRange[0] && year > yearRange[1]) yearRange = [year, yearRange[1]];
74
72
  if (year <= yearRange[1]) return [year];
75
73
  }
76
74
 
77
75
  if (min) {
78
- var formatMin = dayjs(min).format('YYYY-MM-D');
76
+ var formatMin = (0, _dayjs.default)(min).format('YYYY-MM-D');
79
77
 
80
78
  var _year = (0, _shared.toNumber)(formatMin.split('-')[0]);
81
79
 
@@ -1,8 +1,8 @@
1
1
  require('../../styles/common.css')
2
- require('../SnackbarSfc.css')
3
2
  require('../../styles/elevation.css')
4
3
  require('../../loading/loading.css')
5
4
  require('../../button/button.css')
6
5
  require('../../icon/icon.css')
7
6
  require('../snackbar.css')
8
7
  require('../coreSfc.css')
8
+ require('../SnackbarSfc.css')
@@ -1,8 +1,8 @@
1
1
  require('../../styles/common.less')
2
- require('../SnackbarSfc.less')
3
2
  require('../../styles/elevation.less')
4
3
  require('../../loading/loading.less')
5
4
  require('../../button/button.less')
6
5
  require('../../icon/icon.less')
7
6
  require('../snackbar.less')
8
7
  require('../coreSfc.less')
8
+ require('../SnackbarSfc.less')
@@ -6,7 +6,7 @@ exports.default = void 0;
6
6
 
7
7
  var _vue = require("vue");
8
8
 
9
- var dayjs = _interopRequireWildcard(require("dayjs"));
9
+ var _dayjs = _interopRequireDefault(require("dayjs"));
10
10
 
11
11
  var _clock = _interopRequireDefault(require("./clock.js"));
12
12
 
@@ -18,10 +18,6 @@ var _utils = require("./utils");
18
18
 
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
 
21
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
22
-
23
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
24
-
25
21
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
26
22
 
27
23
  var _hoisted_1 = {
@@ -220,9 +216,9 @@ var _default = (0, _vue.defineComponent)({
220
216
  second
221
217
  } = (0, _utils.getNumberTime)(value);
222
218
  return {
223
- hour: dayjs().hour(hour).format(hourFormat),
224
- minute: dayjs().minute(minute).format('mm'),
225
- second: dayjs().second(second).format('ss')
219
+ hour: (0, _dayjs.default)().hour(hour).format(hourFormat),
220
+ minute: (0, _dayjs.default)().minute(minute).format('mm'),
221
+ second: (0, _dayjs.default)().second(second).format('ss')
226
222
  };
227
223
  };
228
224
 
@@ -371,10 +367,10 @@ var _default = (0, _vue.defineComponent)({
371
367
  minute,
372
368
  second
373
369
  } = (0, _utils.getNumberTime)(value);
374
- var formatHour12 = dayjs().hour(hour).format('hh');
375
- var formatHour24 = dayjs().hour(hour).format('HH');
376
- var formatMinute = dayjs().minute(minute).format('mm');
377
- var formatSecond = dayjs().second(second).format('ss');
370
+ var formatHour12 = (0, _dayjs.default)().hour(hour).format('hh');
371
+ var formatHour24 = (0, _dayjs.default)().hour(hour).format('HH');
372
+ var formatMinute = (0, _dayjs.default)().minute(minute).format('mm');
373
+ var formatSecond = (0, _dayjs.default)().second(second).format('ss');
378
374
  hourRad.value = (formatHour12 === '12' ? 0 : (0, _shared.toNumber)(formatHour12)) * 30;
379
375
  minuteRad.value = (0, _shared.toNumber)(formatMinute) * 6;
380
376
  secondRad.value = (0, _shared.toNumber)(formatSecond) * 6;
@@ -6,7 +6,7 @@ exports.default = void 0;
6
6
 
7
7
  var _vue = require("vue");
8
8
 
9
- var dayjs = _interopRequireWildcard(require("dayjs"));
9
+ var _dayjs = _interopRequireDefault(require("dayjs"));
10
10
 
11
11
  var _props = require("./props");
12
12
 
@@ -14,9 +14,7 @@ var _utils = require("./utils");
14
14
 
15
15
  var _shared = require("../utils/shared");
16
16
 
17
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
-
19
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
18
 
21
19
  var _withScopeId = n => ((0, _vue.pushScopeId)(""), n = n(), (0, _vue.popScopeId)(), n);
22
20
 
@@ -255,13 +253,13 @@ var _default = (0, _vue.defineComponent)({
255
253
  } = (0, _utils.convertHour)(props.format, props.ampm, props.time.hour);
256
254
 
257
255
  if (props.type === 'minute') {
258
- var newMinute = dayjs().minute(radToMinSec).format('mm');
256
+ var newMinute = (0, _dayjs.default)().minute(radToMinSec).format('mm');
259
257
  var second = props.useSeconds ? ":" + props.time.second : '';
260
258
  newTime = hourStr + ":" + newMinute + second;
261
259
  }
262
260
 
263
261
  if (props.type === 'second') {
264
- var newSecond = dayjs().second(radToMinSec).format('ss');
262
+ var newSecond = (0, _dayjs.default)().second(radToMinSec).format('ss');
265
263
 
266
264
  var _second = props.useSeconds ? ":" + newSecond : '';
267
265
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "1.23.7",
3
+ "version": "1.23.8",
4
4
  "description": "A material like components library",
5
5
  "module": "es/index.js",
6
6
  "main": "lib/index.js",
@@ -49,9 +49,9 @@
49
49
  "peerDependencies": {
50
50
  "vue": "^3.2.0"
51
51
  },
52
- "gitHead": "fb7d2dc56f2bd274e779e9904f229fb81b697448",
52
+ "gitHead": "7962430948d06d391cc52d22f87cb4d304d8c2b5",
53
53
  "devDependencies": {
54
- "@varlet/cli": "^1.23.7"
54
+ "@varlet/cli": "^1.23.8"
55
55
  },
56
56
  "dependencies": {
57
57
  "dayjs": "^1.10.4",
@@ -12,7 +12,7 @@ export class StyleProviderComponent extends VarComponent {
12
12
  }
13
13
 
14
14
  export interface IStyleProvider {
15
- (options: StyleVars): void
15
+ (options: StyleVars | null): void
16
16
  Component: typeof StyleProviderComponent
17
17
 
18
18
  install(app: App): void