@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 +1 -1
- package/README.zh-CN.md +1 -1
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/avatar-group/AvatarGroup.mjs +1 -2
- package/es/date-picker/src/year-picker-panel.mjs +10 -18
- package/es/divider/Divider.mjs +2 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/menu/usePopover.mjs +2 -3
- package/es/snackbar/style/index.mjs +1 -1
- package/es/time-picker/clock.mjs +3 -5
- package/es/varlet.esm.js +479 -487
- package/highlight/web-types.en-US.json +1 -1
- package/highlight/web-types.zh-CN.json +1 -1
- package/lib/varlet.cjs.js +19 -30
- package/package.json +7 -7
- package/umd/varlet.js +5 -5
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>
|
|
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
|
|
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> |
|
|
@@ -138,16 +138,11 @@ const __sfc__ = defineComponent({
|
|
|
138
138
|
right: false
|
|
139
139
|
});
|
|
140
140
|
const yearList = computed(() => {
|
|
141
|
-
|
|
142
|
-
|
|
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
|
-
|
|
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
|
-
|
|
175
|
-
|
|
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
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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);
|
package/es/divider/Divider.mjs
CHANGED
|
@@ -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 }, () => [
|
package/es/index.bundle.mjs
CHANGED
|
@@ -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.
|
|
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.
|
|
177
|
+
const version = '3.2.4'
|
|
178
178
|
|
|
179
179
|
function install(app) {
|
|
180
180
|
ActionSheet.install && app.use(ActionSheet)
|
package/es/menu/usePopover.mjs
CHANGED
|
@@ -54,7 +54,7 @@ function usePopover(options) {
|
|
|
54
54
|
const show = useVModel(options, "show", {
|
|
55
55
|
passive: true,
|
|
56
56
|
defaultValue: false,
|
|
57
|
-
emit(
|
|
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
|
-
|
|
304
|
-
if (disabled) {
|
|
303
|
+
if (options.disabled) {
|
|
305
304
|
return;
|
|
306
305
|
}
|
|
307
306
|
show.value = true;
|
package/es/time-picker/clock.mjs
CHANGED
|
@@ -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,
|