@varlet/ui 2.18.0 → 2.18.1
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/chip/Chip.mjs +1 -1
- package/es/chip/props.mjs +2 -0
- package/es/counter/Counter.mjs +1 -1
- package/es/date-picker/DatePicker.mjs +34 -13
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/props.mjs +3 -0
- package/es/date-picker/src/year-picker-panel.mjs +5 -2
- package/es/floating-panel/FloatingPanel.mjs +4 -1
- package/es/index.bundle.mjs +1 -1
- package/es/index.mjs +1 -1
- package/es/locale/en-US.mjs +4 -1
- package/es/locale/zh-CN.mjs +4 -1
- package/es/rate/Rate.mjs +9 -7
- package/es/rate/props.mjs +1 -1
- package/es/select/Select.mjs +1 -1
- package/es/style.css +1 -1
- package/es/time-picker/TimePicker.mjs +73 -51
- package/es/time-picker/props.mjs +3 -0
- package/es/time-picker/timePicker.css +1 -1
- package/es/utils/test.mjs +7 -0
- package/es/varlet.esm.js +560 -500
- package/highlight/web-types.en-US.json +28 -10
- package/highlight/web-types.zh-CN.json +29 -11
- package/lib/style.css +1 -1
- package/lib/varlet.cjs.js +143 -79
- package/package.json +7 -7
- package/types/backTop.d.ts +1 -1
- package/types/chip.d.ts +2 -0
- package/types/datePicker.d.ts +4 -1
- package/types/rate.d.ts +3 -3
- package/types/switch.d.ts +1 -1
- package/types/timePicker.d.ts +3 -0
- package/umd/varlet.js +6 -6
package/lib/varlet.cjs.js
CHANGED
|
@@ -1542,10 +1542,13 @@ var stdin_default$3q = {
|
|
|
1542
1542
|
}
|
|
1543
1543
|
},
|
|
1544
1544
|
datePickerSelected: "个被选择",
|
|
1545
|
+
datePickerHint: "选择日期",
|
|
1545
1546
|
// pagination
|
|
1546
1547
|
paginationItem: "条",
|
|
1547
1548
|
paginationPage: "页",
|
|
1548
|
-
paginationJump: "前往"
|
|
1549
|
+
paginationJump: "前往",
|
|
1550
|
+
// time-picker
|
|
1551
|
+
timePickerHint: "选择时间"
|
|
1549
1552
|
};
|
|
1550
1553
|
var stdin_default$3p = {
|
|
1551
1554
|
// Dialog
|
|
@@ -1644,10 +1647,13 @@ var stdin_default$3p = {
|
|
|
1644
1647
|
}
|
|
1645
1648
|
},
|
|
1646
1649
|
datePickerSelected: " selected",
|
|
1650
|
+
datePickerHint: "SELECT DATE",
|
|
1647
1651
|
// pagination
|
|
1648
1652
|
paginationItem: "",
|
|
1649
1653
|
paginationPage: "page",
|
|
1650
|
-
paginationJump: "Go to"
|
|
1654
|
+
paginationJump: "Go to",
|
|
1655
|
+
// time-picker
|
|
1656
|
+
timePickerHint: "SELECT TIME"
|
|
1651
1657
|
};
|
|
1652
1658
|
var stdin_default$3o = {
|
|
1653
1659
|
// Dialog
|
|
@@ -5038,7 +5044,9 @@ const props$W = {
|
|
|
5038
5044
|
default: true
|
|
5039
5045
|
},
|
|
5040
5046
|
block: Boolean,
|
|
5047
|
+
/** @deprecated Use closeable to instead. */
|
|
5041
5048
|
closable: Boolean,
|
|
5049
|
+
closeable: Boolean,
|
|
5042
5050
|
onClose: defineListenerProp()
|
|
5043
5051
|
};
|
|
5044
5052
|
const { name: name$W, n: n$11, classes: classes$S } = createNamespace("chip");
|
|
@@ -5068,7 +5076,7 @@ function __render__$11(_ctx, _cache) {
|
|
|
5068
5076
|
/* CLASS */
|
|
5069
5077
|
),
|
|
5070
5078
|
vue.renderSlot(_ctx.$slots, "right"),
|
|
5071
|
-
_ctx.closable ? (vue.openBlock(), vue.createElementBlock(
|
|
5079
|
+
_ctx.closeable || _ctx.closable ? (vue.openBlock(), vue.createElementBlock(
|
|
5072
5080
|
"span",
|
|
5073
5081
|
{
|
|
5074
5082
|
key: 0,
|
|
@@ -8228,7 +8236,7 @@ function __render__$Y(_ctx, _cache) {
|
|
|
8228
8236
|
[_ctx.disabled || _ctx.formDisabled, _ctx.n("--disabled")],
|
|
8229
8237
|
[_ctx.errorMessage, _ctx.n("--error")]
|
|
8230
8238
|
),
|
|
8231
|
-
style: { background: _ctx.color
|
|
8239
|
+
style: { background: _ctx.color }
|
|
8232
8240
|
}, _ctx.$attrs),
|
|
8233
8241
|
[
|
|
8234
8242
|
vue.createVNode(_component_var_button, {
|
|
@@ -9016,9 +9024,12 @@ const props$Q = {
|
|
|
9016
9024
|
type: String,
|
|
9017
9025
|
default: "date"
|
|
9018
9026
|
},
|
|
9027
|
+
hint: String,
|
|
9019
9028
|
allowedDates: Function,
|
|
9020
9029
|
color: String,
|
|
9030
|
+
/** @deprecated Use titleColor to instead. */
|
|
9021
9031
|
headerColor: String,
|
|
9032
|
+
titleColor: String,
|
|
9022
9033
|
elevation: {
|
|
9023
9034
|
type: [Boolean, Number, String],
|
|
9024
9035
|
default: false
|
|
@@ -9447,6 +9458,7 @@ function __render__$V(_ctx, _cache) {
|
|
|
9447
9458
|
return vue.openBlock(), vue.createElementBlock(
|
|
9448
9459
|
"ul",
|
|
9449
9460
|
{
|
|
9461
|
+
ref: "panel",
|
|
9450
9462
|
class: vue.normalizeClass(_ctx.n())
|
|
9451
9463
|
},
|
|
9452
9464
|
[
|
|
@@ -9482,6 +9494,7 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9482
9494
|
},
|
|
9483
9495
|
emits: ["choose-year"],
|
|
9484
9496
|
setup(props2, { emit }) {
|
|
9497
|
+
const panel = vue.ref();
|
|
9485
9498
|
const yearList = vue.computed(() => {
|
|
9486
9499
|
const list2 = [];
|
|
9487
9500
|
const {
|
|
@@ -9516,7 +9529,7 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9516
9529
|
emit("choose-year", year);
|
|
9517
9530
|
};
|
|
9518
9531
|
onSmartMounted(() => {
|
|
9519
|
-
const activeEl =
|
|
9532
|
+
const activeEl = panel.value.querySelector(`.${n$V("item--active")}`);
|
|
9520
9533
|
activeEl == null ? void 0 : activeEl.scrollIntoView({
|
|
9521
9534
|
block: "center"
|
|
9522
9535
|
});
|
|
@@ -9524,6 +9537,7 @@ const __sfc__$W = vue.defineComponent({
|
|
|
9524
9537
|
return {
|
|
9525
9538
|
n: n$V,
|
|
9526
9539
|
classes: classes$N,
|
|
9540
|
+
panel,
|
|
9527
9541
|
yearList,
|
|
9528
9542
|
chooseYear,
|
|
9529
9543
|
toNumber
|
|
@@ -9903,6 +9917,7 @@ var __async$c = (__this, __arguments, generator) => {
|
|
|
9903
9917
|
};
|
|
9904
9918
|
const { name: name$Q, n: n$T, classes: classes$L } = createNamespace("date-picker");
|
|
9905
9919
|
function __render__$T(_ctx, _cache) {
|
|
9920
|
+
var _a;
|
|
9906
9921
|
const _component_year_picker_panel = vue.resolveComponent("year-picker-panel");
|
|
9907
9922
|
const _component_month_picker_panel = vue.resolveComponent("month-picker-panel");
|
|
9908
9923
|
const _component_day_picker_panel = vue.resolveComponent("day-picker-panel");
|
|
@@ -9916,23 +9931,42 @@ function __render__$T(_ctx, _cache) {
|
|
|
9916
9931
|
"div",
|
|
9917
9932
|
{
|
|
9918
9933
|
class: vue.normalizeClass(_ctx.n("title")),
|
|
9919
|
-
style: vue.normalizeStyle({ background: _ctx.headerColor || _ctx.color })
|
|
9934
|
+
style: vue.normalizeStyle({ background: _ctx.titleColor || _ctx.headerColor || _ctx.color })
|
|
9920
9935
|
},
|
|
9921
9936
|
[
|
|
9922
9937
|
vue.createElementVNode(
|
|
9923
9938
|
"div",
|
|
9924
9939
|
{
|
|
9925
|
-
class: vue.normalizeClass(_ctx.
|
|
9926
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickEl("year"))
|
|
9940
|
+
class: vue.normalizeClass(_ctx.n("title-select"))
|
|
9927
9941
|
},
|
|
9928
9942
|
[
|
|
9929
|
-
vue.
|
|
9930
|
-
|
|
9931
|
-
|
|
9932
|
-
|
|
9933
|
-
|
|
9934
|
-
)
|
|
9935
|
-
|
|
9943
|
+
vue.createElementVNode(
|
|
9944
|
+
"div",
|
|
9945
|
+
{
|
|
9946
|
+
class: vue.normalizeClass(_ctx.n("title-hint"))
|
|
9947
|
+
},
|
|
9948
|
+
vue.toDisplayString((_a = _ctx.hint) != null ? _a : _ctx.pack.datePickerHint),
|
|
9949
|
+
3
|
|
9950
|
+
/* TEXT, CLASS */
|
|
9951
|
+
),
|
|
9952
|
+
vue.createElementVNode(
|
|
9953
|
+
"div",
|
|
9954
|
+
{
|
|
9955
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-year"), [_ctx.isYearPanel, _ctx.n("title-year--active")])),
|
|
9956
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.clickEl("year"))
|
|
9957
|
+
},
|
|
9958
|
+
[
|
|
9959
|
+
vue.renderSlot(_ctx.$slots, "year", { year: _ctx.chooseYear }, () => [
|
|
9960
|
+
vue.createTextVNode(
|
|
9961
|
+
vue.toDisplayString(_ctx.chooseYear),
|
|
9962
|
+
1
|
|
9963
|
+
/* TEXT */
|
|
9964
|
+
)
|
|
9965
|
+
])
|
|
9966
|
+
],
|
|
9967
|
+
2
|
|
9968
|
+
/* CLASS */
|
|
9969
|
+
)
|
|
9936
9970
|
],
|
|
9937
9971
|
2
|
|
9938
9972
|
/* CLASS */
|
|
@@ -9948,10 +9982,10 @@ function __render__$T(_ctx, _cache) {
|
|
|
9948
9982
|
name: _ctx.multiple ? "" : `${_ctx.n()}${_ctx.reverse ? "-reverse" : ""}-translatey`
|
|
9949
9983
|
}, {
|
|
9950
9984
|
default: vue.withCtx(() => {
|
|
9951
|
-
var
|
|
9985
|
+
var _a2, _b, _c;
|
|
9952
9986
|
return [
|
|
9953
9987
|
_ctx.type === "month" ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
9954
|
-
key: `${_ctx.chooseYear}${(
|
|
9988
|
+
key: `${_ctx.chooseYear}${(_a2 = _ctx.chooseMonth) == null ? void 0 : _a2.index}`
|
|
9955
9989
|
}, [
|
|
9956
9990
|
_ctx.range ? vue.renderSlot(_ctx.$slots, "range", {
|
|
9957
9991
|
key: 0,
|
|
@@ -10420,6 +10454,7 @@ const __sfc__$U = vue.defineComponent({
|
|
|
10420
10454
|
componentProps,
|
|
10421
10455
|
slotProps,
|
|
10422
10456
|
formatRange,
|
|
10457
|
+
pack,
|
|
10423
10458
|
n: n$T,
|
|
10424
10459
|
classes: classes$L,
|
|
10425
10460
|
clickEl,
|
|
@@ -13651,7 +13686,10 @@ const __sfc__$N = vue.defineComponent({
|
|
|
13651
13686
|
const target = event.target;
|
|
13652
13687
|
const eventFromContent = contentRef.value === target || ((_a = contentRef.value) == null ? void 0 : _a.contains(target));
|
|
13653
13688
|
if (eventFromContent && !props2.contentDraggable) {
|
|
13654
|
-
|
|
13689
|
+
return;
|
|
13690
|
+
}
|
|
13691
|
+
if (eventFromContent && props2.contentDraggable && visibleHeight.value >= maxAnchor.value && !isReachTop(contentRef.value)) {
|
|
13692
|
+
if (isReachBottom(contentRef.value)) {
|
|
13655
13693
|
preventDefault(event);
|
|
13656
13694
|
}
|
|
13657
13695
|
return;
|
|
@@ -19146,7 +19184,7 @@ const _RadioGroupComponent = stdin_default$1t;
|
|
|
19146
19184
|
var stdin_default$1s = stdin_default$1t;
|
|
19147
19185
|
const props$j = {
|
|
19148
19186
|
modelValue: {
|
|
19149
|
-
type:
|
|
19187
|
+
type: Number,
|
|
19150
19188
|
default: 0
|
|
19151
19189
|
},
|
|
19152
19190
|
count: {
|
|
@@ -19258,7 +19296,7 @@ const __sfc__$q = vue.defineComponent({
|
|
|
19258
19296
|
const { form, bindForm } = useForm();
|
|
19259
19297
|
const { errorMessage, validateWithTrigger: vt, validate: v, resetValidation } = useValidation();
|
|
19260
19298
|
const { hovering } = useHoverOverlay();
|
|
19261
|
-
let lastScore =
|
|
19299
|
+
let lastScore = toNumber(props2.modelValue);
|
|
19262
19300
|
const rateProvider = {
|
|
19263
19301
|
reset,
|
|
19264
19302
|
validate,
|
|
@@ -19300,10 +19338,10 @@ const __sfc__$q = vue.defineComponent({
|
|
|
19300
19338
|
if (disabled || (form == null ? void 0 : form.disabled.value)) {
|
|
19301
19339
|
iconColor = disabledColor;
|
|
19302
19340
|
}
|
|
19303
|
-
if (index <=
|
|
19341
|
+
if (index <= modelValue) {
|
|
19304
19342
|
return { color: iconColor, name: icon2, namespace };
|
|
19305
19343
|
}
|
|
19306
|
-
if (half2 && index <=
|
|
19344
|
+
if (half2 && index <= modelValue + 0.5) {
|
|
19307
19345
|
return { color: iconColor, name: halfIcon, namespace: halfIconNamespace };
|
|
19308
19346
|
}
|
|
19309
19347
|
return {
|
|
@@ -19321,22 +19359,24 @@ const __sfc__$q = vue.defineComponent({
|
|
|
19321
19359
|
if (lastScore === score && clearable) {
|
|
19322
19360
|
score = 0;
|
|
19323
19361
|
}
|
|
19362
|
+
if (lastScore !== score) {
|
|
19363
|
+
call(props2["onUpdate:modelValue"], score);
|
|
19364
|
+
call(props2.onChange, score);
|
|
19365
|
+
}
|
|
19324
19366
|
lastScore = score;
|
|
19325
|
-
call(props2["onUpdate:modelValue"], score);
|
|
19326
19367
|
}
|
|
19327
19368
|
function validate() {
|
|
19328
|
-
return v(props2.rules,
|
|
19369
|
+
return v(props2.rules, props2.modelValue);
|
|
19329
19370
|
}
|
|
19330
19371
|
function validateWithTrigger() {
|
|
19331
19372
|
return vue.nextTick(() => vt(["onChange"], "onChange", props2.rules, props2.modelValue));
|
|
19332
19373
|
}
|
|
19333
19374
|
function handleClick(score, event) {
|
|
19334
|
-
const { readonly, disabled
|
|
19375
|
+
const { readonly, disabled } = props2;
|
|
19335
19376
|
if (readonly || disabled || (form == null ? void 0 : form.disabled.value) || (form == null ? void 0 : form.readonly.value)) {
|
|
19336
19377
|
return;
|
|
19337
19378
|
}
|
|
19338
19379
|
changeValue(score, event);
|
|
19339
|
-
call(onChange, score);
|
|
19340
19380
|
validateWithTrigger();
|
|
19341
19381
|
}
|
|
19342
19382
|
function createHoverHandler(value) {
|
|
@@ -19940,7 +19980,7 @@ function __render__$g(_ctx, _cache) {
|
|
|
19940
19980
|
return vue.openBlock(), vue.createBlock(_component_var_chip, {
|
|
19941
19981
|
class: vue.normalizeClass(_ctx.n("chip")),
|
|
19942
19982
|
"var-select-cover": "",
|
|
19943
|
-
|
|
19983
|
+
closeable: "",
|
|
19944
19984
|
size: "small",
|
|
19945
19985
|
type: _ctx.errorMessage ? "danger" : void 0,
|
|
19946
19986
|
key: l,
|
|
@@ -22873,8 +22913,11 @@ const props$2 = {
|
|
|
22873
22913
|
type: [Boolean, Number, String],
|
|
22874
22914
|
default: false
|
|
22875
22915
|
},
|
|
22916
|
+
hint: String,
|
|
22876
22917
|
color: String,
|
|
22918
|
+
/** @deprecated Use titleColor to instead. */
|
|
22877
22919
|
headerColor: String,
|
|
22920
|
+
titleColor: String,
|
|
22878
22921
|
format: {
|
|
22879
22922
|
type: String,
|
|
22880
22923
|
default: "ampm"
|
|
@@ -23289,6 +23332,7 @@ const _hoisted_1$2 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ vue.crea
|
|
|
23289
23332
|
));
|
|
23290
23333
|
const _hoisted_2$2 = { key: 0 };
|
|
23291
23334
|
function __render__$2(_ctx, _cache) {
|
|
23335
|
+
var _a;
|
|
23292
23336
|
const _component_clock = vue.resolveComponent("clock");
|
|
23293
23337
|
return vue.openBlock(), vue.createElementBlock(
|
|
23294
23338
|
"div",
|
|
@@ -23301,83 +23345,102 @@ function __render__$2(_ctx, _cache) {
|
|
|
23301
23345
|
"div",
|
|
23302
23346
|
{
|
|
23303
23347
|
class: vue.normalizeClass(_ctx.n("title")),
|
|
23304
|
-
style: vue.normalizeStyle({ background: _ctx.headerColor || _ctx.color })
|
|
23348
|
+
style: vue.normalizeStyle({ background: _ctx.titleColor || _ctx.headerColor || _ctx.color })
|
|
23305
23349
|
},
|
|
23306
23350
|
[
|
|
23307
23351
|
vue.createElementVNode(
|
|
23308
23352
|
"div",
|
|
23309
23353
|
{
|
|
23310
|
-
class: vue.normalizeClass(_ctx.n("title-
|
|
23354
|
+
class: vue.normalizeClass(_ctx.n("title-hint"))
|
|
23311
23355
|
},
|
|
23312
|
-
|
|
23313
|
-
|
|
23314
|
-
|
|
23315
|
-
{
|
|
23316
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "hour", _ctx.n("title-btn--active")])),
|
|
23317
|
-
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.checkPanel("hour"))
|
|
23318
|
-
},
|
|
23319
|
-
vue.toDisplayString(_ctx.time.hour),
|
|
23320
|
-
3
|
|
23321
|
-
/* TEXT, CLASS */
|
|
23322
|
-
),
|
|
23323
|
-
_hoisted_1$2,
|
|
23324
|
-
vue.createElementVNode(
|
|
23325
|
-
"div",
|
|
23326
|
-
{
|
|
23327
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "minute", _ctx.n("title-btn--active")])),
|
|
23328
|
-
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.checkPanel("minute"))
|
|
23329
|
-
},
|
|
23330
|
-
vue.toDisplayString(_ctx.time.minute),
|
|
23331
|
-
3
|
|
23332
|
-
/* TEXT, CLASS */
|
|
23333
|
-
),
|
|
23334
|
-
_ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, ":")) : vue.createCommentVNode("v-if", true),
|
|
23335
|
-
_ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock(
|
|
23336
|
-
"div",
|
|
23337
|
-
{
|
|
23338
|
-
key: 1,
|
|
23339
|
-
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "second", _ctx.n("title-btn--active")])),
|
|
23340
|
-
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.checkPanel("second"))
|
|
23341
|
-
},
|
|
23342
|
-
vue.toDisplayString(_ctx.time.second),
|
|
23343
|
-
3
|
|
23344
|
-
/* TEXT, CLASS */
|
|
23345
|
-
)) : vue.createCommentVNode("v-if", true)
|
|
23346
|
-
],
|
|
23347
|
-
2
|
|
23348
|
-
/* CLASS */
|
|
23356
|
+
vue.toDisplayString((_a = _ctx.hint) != null ? _a : _ctx.pack.timePickerHint),
|
|
23357
|
+
3
|
|
23358
|
+
/* TEXT, CLASS */
|
|
23349
23359
|
),
|
|
23350
|
-
|
|
23360
|
+
vue.createElementVNode(
|
|
23351
23361
|
"div",
|
|
23352
23362
|
{
|
|
23353
|
-
|
|
23354
|
-
class: vue.normalizeClass(_ctx.n("title-ampm"))
|
|
23363
|
+
class: vue.normalizeClass(_ctx.n("title-time-container"))
|
|
23355
23364
|
},
|
|
23356
23365
|
[
|
|
23357
23366
|
vue.createElementVNode(
|
|
23358
23367
|
"div",
|
|
23359
23368
|
{
|
|
23360
|
-
class: vue.normalizeClass(_ctx.
|
|
23361
|
-
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.checkAmpm("am"))
|
|
23369
|
+
class: vue.normalizeClass(_ctx.n("title-time"))
|
|
23362
23370
|
},
|
|
23363
|
-
|
|
23371
|
+
[
|
|
23372
|
+
vue.createElementVNode(
|
|
23373
|
+
"div",
|
|
23374
|
+
{
|
|
23375
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "hour", _ctx.n("title-btn--active")])),
|
|
23376
|
+
onClick: _cache[0] || (_cache[0] = ($event) => _ctx.checkPanel("hour"))
|
|
23377
|
+
},
|
|
23378
|
+
vue.toDisplayString(_ctx.time.hour),
|
|
23379
|
+
3
|
|
23380
|
+
/* TEXT, CLASS */
|
|
23381
|
+
),
|
|
23382
|
+
_hoisted_1$2,
|
|
23383
|
+
vue.createElementVNode(
|
|
23384
|
+
"div",
|
|
23385
|
+
{
|
|
23386
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "minute", _ctx.n("title-btn--active")])),
|
|
23387
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.checkPanel("minute"))
|
|
23388
|
+
},
|
|
23389
|
+
vue.toDisplayString(_ctx.time.minute),
|
|
23390
|
+
3
|
|
23391
|
+
/* TEXT, CLASS */
|
|
23392
|
+
),
|
|
23393
|
+
_ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$2, ":")) : vue.createCommentVNode("v-if", true),
|
|
23394
|
+
_ctx.useSeconds ? (vue.openBlock(), vue.createElementBlock(
|
|
23395
|
+
"div",
|
|
23396
|
+
{
|
|
23397
|
+
key: 1,
|
|
23398
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.type === "second", _ctx.n("title-btn--active")])),
|
|
23399
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.checkPanel("second"))
|
|
23400
|
+
},
|
|
23401
|
+
vue.toDisplayString(_ctx.time.second),
|
|
23402
|
+
3
|
|
23403
|
+
/* TEXT, CLASS */
|
|
23404
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
23405
|
+
],
|
|
23364
23406
|
2
|
|
23365
23407
|
/* CLASS */
|
|
23366
23408
|
),
|
|
23367
|
-
vue.
|
|
23409
|
+
_ctx.format === "ampm" ? (vue.openBlock(), vue.createElementBlock(
|
|
23368
23410
|
"div",
|
|
23369
23411
|
{
|
|
23370
|
-
|
|
23371
|
-
|
|
23412
|
+
key: 0,
|
|
23413
|
+
class: vue.normalizeClass(_ctx.n("title-ampm"))
|
|
23372
23414
|
},
|
|
23373
|
-
|
|
23415
|
+
[
|
|
23416
|
+
vue.createElementVNode(
|
|
23417
|
+
"div",
|
|
23418
|
+
{
|
|
23419
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.ampm === "am", _ctx.n("title-btn--active")])),
|
|
23420
|
+
onClick: _cache[3] || (_cache[3] = ($event) => _ctx.checkAmpm("am"))
|
|
23421
|
+
},
|
|
23422
|
+
" AM ",
|
|
23423
|
+
2
|
|
23424
|
+
/* CLASS */
|
|
23425
|
+
),
|
|
23426
|
+
vue.createElementVNode(
|
|
23427
|
+
"div",
|
|
23428
|
+
{
|
|
23429
|
+
class: vue.normalizeClass(_ctx.classes(_ctx.n("title-btn"), [_ctx.ampm === "pm", _ctx.n("title-btn--active")])),
|
|
23430
|
+
onClick: _cache[4] || (_cache[4] = ($event) => _ctx.checkAmpm("pm"))
|
|
23431
|
+
},
|
|
23432
|
+
" PM ",
|
|
23433
|
+
2
|
|
23434
|
+
/* CLASS */
|
|
23435
|
+
)
|
|
23436
|
+
],
|
|
23374
23437
|
2
|
|
23375
23438
|
/* CLASS */
|
|
23376
|
-
)
|
|
23439
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
23377
23440
|
],
|
|
23378
23441
|
2
|
|
23379
23442
|
/* CLASS */
|
|
23380
|
-
)
|
|
23443
|
+
)
|
|
23381
23444
|
],
|
|
23382
23445
|
6
|
|
23383
23446
|
/* CLASS, STYLE */
|
|
@@ -23670,6 +23733,7 @@ const __sfc__$2 = vue.defineComponent({
|
|
|
23670
23733
|
isPreventNextUpdate,
|
|
23671
23734
|
n: n$2,
|
|
23672
23735
|
classes: classes$2,
|
|
23736
|
+
pack,
|
|
23673
23737
|
moveHand,
|
|
23674
23738
|
checkPanel,
|
|
23675
23739
|
checkAmpm,
|
|
@@ -24640,7 +24704,7 @@ const uploader = "";
|
|
|
24640
24704
|
const UploaderSfc = "";
|
|
24641
24705
|
const watermark = "";
|
|
24642
24706
|
const WatermarkSfc = "";
|
|
24643
|
-
const version = "2.18.
|
|
24707
|
+
const version = "2.18.1";
|
|
24644
24708
|
function install(app) {
|
|
24645
24709
|
stdin_default$3k.install && app.use(stdin_default$3k);
|
|
24646
24710
|
stdin_default$3i.install && app.use(stdin_default$3i);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/ui",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.1",
|
|
4
4
|
"description": "A material like components library",
|
|
5
5
|
"main": "lib/varlet.cjs.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
"@popperjs/core": "^2.11.6",
|
|
49
49
|
"dayjs": "^1.10.4",
|
|
50
50
|
"decimal.js": "^10.2.1",
|
|
51
|
-
"@varlet/
|
|
52
|
-
"@varlet/
|
|
53
|
-
"@varlet/shared": "2.18.
|
|
51
|
+
"@varlet/icons": "2.18.1",
|
|
52
|
+
"@varlet/use": "2.18.1",
|
|
53
|
+
"@varlet/shared": "2.18.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@vue/runtime-core": "3.3.4",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
"typescript": "^5.1.5",
|
|
67
67
|
"vue": "3.3.4",
|
|
68
68
|
"vue-router": "4.2.0",
|
|
69
|
-
"@varlet/
|
|
70
|
-
"@varlet/
|
|
71
|
-
"@varlet/
|
|
69
|
+
"@varlet/touch-emulator": "2.18.1",
|
|
70
|
+
"@varlet/cli": "2.18.1",
|
|
71
|
+
"@varlet/ui": "2.18.1"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|
|
74
74
|
"dev": "varlet-cli dev",
|
package/types/backTop.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export interface BackTopProps extends BasicAttributes {
|
|
|
10
10
|
right?: number | string
|
|
11
11
|
elevation?: boolean | number | string
|
|
12
12
|
bottom?: number | string
|
|
13
|
-
onClick?: ListenerProp<(e:
|
|
13
|
+
onClick?: ListenerProp<(e: Event) => void>
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export class BackTop extends VarComponent {
|
package/types/chip.d.ts
CHANGED
package/types/datePicker.d.ts
CHANGED
|
@@ -10,7 +10,10 @@ export interface DatePickerProps extends BasicAttributes {
|
|
|
10
10
|
type?: DatePickerType
|
|
11
11
|
allowedDates?: (val: string) => boolean
|
|
12
12
|
color?: string
|
|
13
|
-
|
|
13
|
+
hint?: string
|
|
14
|
+
/** @deprecated Use titleColor to instead. */
|
|
15
|
+
headerColor: string
|
|
16
|
+
titleColor: string
|
|
14
17
|
elevation?: boolean | string | number
|
|
15
18
|
buttonElevation?: boolean | string | number
|
|
16
19
|
firstDayOfWeek?: string | number
|
package/types/rate.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { VarComponent, BasicAttributes, ListenerProp } from './varComponent'
|
|
|
3
3
|
export declare const rateProps: Record<string, any>
|
|
4
4
|
|
|
5
5
|
export interface RateProps extends BasicAttributes {
|
|
6
|
-
modelValue?:
|
|
6
|
+
modelValue?: number
|
|
7
7
|
count?: string | number
|
|
8
8
|
color?: string
|
|
9
9
|
emptyColor?: string
|
|
@@ -22,8 +22,8 @@ export interface RateProps extends BasicAttributes {
|
|
|
22
22
|
clearable?: boolean
|
|
23
23
|
ripple?: boolean
|
|
24
24
|
rules?: Array<(value: any) => any>
|
|
25
|
-
onChange?: ListenerProp<(value:
|
|
26
|
-
'onUpdate:modelValue'?: ListenerProp<(value:
|
|
25
|
+
onChange?: ListenerProp<(value: number) => void>
|
|
26
|
+
'onUpdate:modelValue'?: ListenerProp<(value: number) => void>
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export class Rate extends VarComponent {
|
package/types/switch.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export interface SwitchProps extends BasicAttributes {
|
|
|
15
15
|
closeColor?: string
|
|
16
16
|
size?: string | number
|
|
17
17
|
rules?: Array<(value: any) => any>
|
|
18
|
-
onClick?: ListenerProp<(event:
|
|
18
|
+
onClick?: ListenerProp<(event: Event) => void>
|
|
19
19
|
onChange?: ListenerProp<(value: boolean) => void>
|
|
20
20
|
'onUpdate:modelValue'?: ListenerProp<(value: boolean) => void>
|
|
21
21
|
}
|
package/types/timePicker.d.ts
CHANGED
|
@@ -14,7 +14,10 @@ export interface TimePickerProps extends BasicAttributes {
|
|
|
14
14
|
modelValue?: string
|
|
15
15
|
elevation?: boolean | string | number
|
|
16
16
|
color?: string
|
|
17
|
+
hint?: string
|
|
18
|
+
/** @deprecated Use titleColor to instead. */
|
|
17
19
|
headerColor?: string
|
|
20
|
+
titleColor?: string
|
|
18
21
|
allowedTime?: AllowedTime
|
|
19
22
|
format?: TimePickerFormat
|
|
20
23
|
min?: string
|