@varlet/ui 3.2.3 → 3.2.4

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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  <img src="https://varlet.gitee.io/varlet-ui/logo.svg" width="150">
4
4
  </a>
5
5
  <h1>VARLET</h1>
6
- <p>Vue3 mobile component library supports both Material Design 2 and 3, and also has a good experience on the desktop.</p>
6
+ <p>A mobile component library based on Vue3, Material Design 2, Material Design 3, and supports desktop development.</p>
7
7
  <p>
8
8
  <a href="https://varlet-varletjs.vercel.app/#/en-US/index">Documentation(Vercel)</a> |
9
9
  <a href="https://varlet.gitee.io/varlet-ui/#/en-US/index">Documentation(Gitee)</a> |
package/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <img src="https://varlet.gitee.io/varlet-ui/logo.svg" width="150">
5
5
  </a>
6
6
  <h1>VARLET</h1>
7
- <p>Vue3 移动端组件库,同时支持 Material Design 2 3,桌面端也有不错的体验。</p>
7
+ <p>一个移动端组件库,基于 Vue3, Material Design 2, Material Design 3,并支持桌面端开发。</p>
8
8
  <p>
9
9
  <a href="https://varlet-varletjs.vercel.app">文档(Vercel)</a> |
10
10
  <a href="https://varlet.gitee.io/varlet-ui">文档(Gitee)</a> |
@@ -3,5 +3,5 @@ import '../../icon/icon.css'
3
3
  import '../../ripple/ripple.css'
4
4
  import '../../popup/popup.css'
5
5
  import '../actionSheet.css'
6
- import '../ActionSheetSfc.css'
7
6
  import '../ActionItemSfc.css'
7
+ import '../ActionSheetSfc.css'
@@ -33,8 +33,7 @@ const __sfc__ = defineComponent({
33
33
  return {
34
34
  rootStyles,
35
35
  n,
36
- classes,
37
- toSizeUnit
36
+ classes
38
37
  };
39
38
  }
40
39
  });
@@ -138,16 +138,11 @@ const __sfc__ = defineComponent({
138
138
  right: false
139
139
  });
140
140
  const yearList = computed(() => {
141
- const list = [];
142
- if (!props.preview)
143
- return list;
144
- let startYear = Math.floor(toNumber(props.preview) / 100 + page.value) * 100;
145
- startYear = startYear < 0 ? 0 : startYear;
146
- const yearRange = [startYear, startYear + 100];
147
- for (let i = yearRange[0]; i < yearRange[1]; i++) {
148
- list.push(i);
141
+ if (!props.preview) {
142
+ return [];
149
143
  }
150
- return list;
144
+ const startYear = Math.floor(toNumber(props.preview) / 100 + page.value) * 100;
145
+ return Array.from(Array(100), (_v, k) => Math.max(0, startYear) + k);
151
146
  });
152
147
  const shouldChoose = (val) => {
153
148
  const {
@@ -171,12 +166,8 @@ const __sfc__ = defineComponent({
171
166
  const {
172
167
  componentProps: { min, max }
173
168
  } = props;
174
- let isBeforeMax = true;
175
- let isAfterMin = true;
176
- if (max)
177
- isBeforeMax = dayjs(year).isSameOrBefore(dayjs(max), "year");
178
- if (min)
179
- isAfterMin = dayjs(year).isSameOrAfter(dayjs(min), "year");
169
+ const isBeforeMax = max ? dayjs(year).isSameOrBefore(dayjs(max), "year") : true;
170
+ const isAfterMin = min ? dayjs(year).isSameOrAfter(dayjs(min), "year") : true;
180
171
  return isBeforeMax && isAfterMin;
181
172
  };
182
173
  const buttonProps = (year) => {
@@ -247,9 +238,10 @@ const __sfc__ = defineComponent({
247
238
  });
248
239
  };
249
240
  const checkDate = (checkType) => {
250
- reverse.value = checkType === "prev";
251
- panelKey.value += checkType === "prev" ? -1 : 1;
252
- page.value += checkType === "prev" ? -1 : 1;
241
+ const isPrevType = checkType === "prev";
242
+ reverse.value = isPrevType;
243
+ panelKey.value += isPrevType ? -1 : 1;
244
+ page.value += isPrevType ? -1 : 1;
253
245
  };
254
246
  const forwardRef = (checkType) => {
255
247
  headerEl.value.checkDate(checkType);
@@ -21,7 +21,8 @@ function __render__(_ctx, _cache) {
21
21
  [_ctx.hairline, _ctx.n("--hairline")]
22
22
  )
23
23
  ),
24
- style: _normalizeStyle(_ctx.style)
24
+ style: _normalizeStyle(_ctx.style),
25
+ role: "separator"
25
26
  },
26
27
  [
27
28
  !_ctx.vertical ? _renderSlot(_ctx.$slots, "default", { key: 0 }, () => [
@@ -262,7 +262,7 @@ import './tooltip/style/index.mjs'
262
262
  import './uploader/style/index.mjs'
263
263
  import './watermark/style/index.mjs'
264
264
 
265
- const version = '3.2.3'
265
+ const version = '3.2.4'
266
266
 
267
267
  function install(app) {
268
268
  ActionSheet.install && app.use(ActionSheet)
package/es/index.mjs CHANGED
@@ -174,7 +174,7 @@ export * from './tooltip/index.mjs'
174
174
  export * from './uploader/index.mjs'
175
175
  export * from './watermark/index.mjs'
176
176
 
177
- const version = '3.2.3'
177
+ const version = '3.2.4'
178
178
 
179
179
  function install(app) {
180
180
  ActionSheet.install && app.use(ActionSheet)
@@ -54,7 +54,7 @@ function usePopover(options) {
54
54
  const show = useVModel(options, "show", {
55
55
  passive: true,
56
56
  defaultValue: false,
57
- emit(event, value) {
57
+ emit(_event, value) {
58
58
  if (value) {
59
59
  call(options.onOpen);
60
60
  } else {
@@ -300,8 +300,7 @@ function usePopover(options) {
300
300
  popoverInstance.setOptions(getPopperOptions());
301
301
  };
302
302
  const open = () => {
303
- const { disabled } = options;
304
- if (disabled) {
303
+ if (options.disabled) {
305
304
  return;
306
305
  }
307
306
  show.value = true;
@@ -1,7 +1,7 @@
1
1
  import '../../styles/common.css'
2
- import '../SnackbarSfc.css'
3
2
  import '../../styles/elevation.css'
4
3
  import '../../loading/loading.css'
5
4
  import '../../icon/icon.css'
6
5
  import '../snackbar.css'
7
6
  import '../coreSfc.css'
7
+ import '../SnackbarSfc.css'
@@ -113,12 +113,10 @@ const __sfc__ = defineComponent({
113
113
  required: true
114
114
  },
115
115
  useSeconds: {
116
- type: Boolean,
117
- default: false
116
+ type: Boolean
118
117
  },
119
118
  preventNextUpdate: {
120
- type: Boolean,
121
- default: false
119
+ type: Boolean
122
120
  },
123
121
  type: {
124
122
  type: String,
@@ -310,7 +308,7 @@ const __sfc__ = defineComponent({
310
308
  }
311
309
  disable24HourIndex.value = disableHour.value.map((hour) => hours24.findIndex((hour24) => hour === hour24)).filter((hour) => hour >= 0);
312
310
  },
313
- { immediate: true }
311
+ { immediate: true, deep: true }
314
312
  );
315
313
  return {
316
314
  n,