vant 4.6.2 → 4.6.3
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/address-list/AddressList.d.ts +13 -0
- package/es/address-list/AddressList.mjs +3 -2
- package/es/address-list/index.d.ts +9 -0
- package/es/checkbox/Checkbox.d.ts +13 -23
- package/es/checkbox/Checkbox.mjs +2 -2
- package/es/checkbox/Checker.d.ts +6 -11
- package/es/checkbox/Checker.mjs +8 -6
- package/es/checkbox/index.d.ts +2 -9
- package/es/checkbox-group/CheckboxGroup.d.ts +14 -1
- package/es/checkbox-group/CheckboxGroup.mjs +2 -1
- package/es/checkbox-group/index.d.ts +9 -0
- package/es/floating-bubble/index.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/radio/Radio.d.ts +13 -23
- package/es/radio/Radio.mjs +2 -2
- package/es/radio/index.css +1 -1
- package/es/radio/index.d.ts +2 -9
- package/es/radio-group/RadioGroup.d.ts +4 -0
- package/es/radio-group/RadioGroup.mjs +1 -0
- package/es/radio-group/index.d.ts +2 -0
- package/es/tab/Tab.mjs +2 -2
- package/es/utils/basic.d.ts +8 -0
- package/es/utils/basic.mjs +28 -7
- package/es/utils/create.mjs +1 -2
- package/es/utils/deep-assign.mjs +1 -1
- package/es/utils/deep-clone.mjs +1 -1
- package/es/utils/dom.mjs +1 -1
- package/es/utils/format.mjs +1 -1
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.mjs +0 -1
- package/es/utils/interceptor.mjs +1 -2
- package/lib/address-list/AddressList.d.ts +13 -0
- package/lib/address-list/AddressList.js +3 -2
- package/lib/address-list/index.d.ts +9 -0
- package/lib/checkbox/Checkbox.d.ts +13 -23
- package/lib/checkbox/Checkbox.js +1 -1
- package/lib/checkbox/Checker.d.ts +6 -11
- package/lib/checkbox/Checker.js +7 -5
- package/lib/checkbox/index.d.ts +2 -9
- package/lib/checkbox-group/CheckboxGroup.d.ts +14 -1
- package/lib/checkbox-group/CheckboxGroup.js +1 -0
- package/lib/checkbox-group/index.d.ts +9 -0
- package/lib/floating-bubble/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/radio/Radio.d.ts +13 -23
- package/lib/radio/Radio.js +1 -1
- package/lib/radio/index.css +1 -1
- package/lib/radio/index.d.ts +2 -9
- package/lib/radio-group/RadioGroup.d.ts +4 -0
- package/lib/radio-group/RadioGroup.js +1 -0
- package/lib/radio-group/index.d.ts +2 -0
- package/lib/tab/Tab.js +2 -2
- package/lib/utils/basic.d.ts +8 -0
- package/lib/utils/basic.js +29 -8
- package/lib/utils/create.js +1 -2
- package/lib/utils/deep-assign.js +3 -3
- package/lib/utils/deep-clone.js +3 -3
- package/lib/utils/dom.js +2 -2
- package/lib/utils/format.js +4 -4
- package/lib/utils/index.d.ts +0 -1
- package/lib/utils/index.js +0 -1
- package/lib/utils/interceptor.js +1 -2
- package/lib/vant.cjs.js +31 -23
- package/lib/vant.es.js +31 -23
- package/lib/vant.js +96 -34
- package/lib/vant.min.js +1 -1
- package/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/es/utils/validate.d.ts +0 -9
- package/es/utils/validate.mjs +0 -22
- package/lib/utils/validate.d.ts +0 -9
- package/lib/utils/validate.js +0 -41
package/lib/vant.es.js
CHANGED
@@ -1,10 +1,14 @@
|
|
1
|
-
import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, withDirectives, vShow, Teleport, Fragment, onBeforeUpdate,
|
1
|
+
import { unref, ref, reactive, inject, watch, onMounted, nextTick, createVNode, defineComponent, getCurrentInstance, computed, onActivated, onDeactivated, onBeforeUnmount, provide, watchEffect, mergeProps, Transition, withDirectives, vShow, Teleport, Fragment, onBeforeUpdate, createTextVNode, onUnmounted, createApp, resolveDirective, withKeys, onUpdated, Comment, Text, h } from "vue";
|
2
2
|
import { useWindowSize, useRect, useChildren, useParent, onMountedOrActivated, getScrollParent, useEventListener, cancelRaf, raf, useScrollParent, usePageVisibility, doubleRaf, CUSTOM_FIELD_INJECTION_KEY, useCustomFieldValue, inBrowser as inBrowser$1, useToggle, useCountDown, useClickAway } from "@vant/use";
|
3
|
-
import { stringifyStyle } from "@vue/shared";
|
3
|
+
import { normalizeClass, stringifyStyle, normalizeStyle } from "@vue/shared";
|
4
4
|
import { offsetModifier, createPopper } from "@vant/popperjs";
|
5
|
+
function noop() {
|
6
|
+
}
|
7
|
+
const extend = Object.assign;
|
8
|
+
const inBrowser = typeof window !== "undefined";
|
9
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
5
10
|
const isDef = (val) => val !== void 0 && val !== null;
|
6
11
|
const isFunction = (val) => typeof val === "function";
|
7
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
8
12
|
const isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
9
13
|
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
10
14
|
function isMobile(value) {
|
@@ -13,10 +17,6 @@ function isMobile(value) {
|
|
13
17
|
}
|
14
18
|
const isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
15
19
|
const isIOS$1 = () => inBrowser ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
16
|
-
function noop() {
|
17
|
-
}
|
18
|
-
const extend = Object.assign;
|
19
|
-
const inBrowser = typeof window !== "undefined";
|
20
20
|
function get(object, path) {
|
21
21
|
const keys = path.split(".");
|
22
22
|
let result = object;
|
@@ -27,12 +27,15 @@ function get(object, path) {
|
|
27
27
|
return result;
|
28
28
|
}
|
29
29
|
function pick(obj, keys, ignoreUndefined) {
|
30
|
-
return keys.reduce(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
return keys.reduce(
|
31
|
+
(ret, key) => {
|
32
|
+
if (!ignoreUndefined || obj[key] !== void 0) {
|
33
|
+
ret[key] = obj[key];
|
34
|
+
}
|
35
|
+
return ret;
|
36
|
+
},
|
37
|
+
{}
|
38
|
+
);
|
36
39
|
}
|
37
40
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
38
41
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
@@ -5186,6 +5189,7 @@ var stdin_default$1q = defineComponent({
|
|
5186
5189
|
const AddressEdit = withInstall(stdin_default$1q);
|
5187
5190
|
const [name$1f, bem$1b] = createNamespace("radio-group");
|
5188
5191
|
const radioGroupProps = {
|
5192
|
+
shape: String,
|
5189
5193
|
disabled: Boolean,
|
5190
5194
|
iconSize: numericProp,
|
5191
5195
|
direction: String,
|
@@ -5306,7 +5310,7 @@ var stdin_default$1n = defineComponent({
|
|
5306
5310
|
props: extend({}, checkerProps, {
|
5307
5311
|
bem: makeRequiredProp(Function),
|
5308
5312
|
role: String,
|
5309
|
-
shape:
|
5313
|
+
shape: String,
|
5310
5314
|
parent: Object,
|
5311
5315
|
checked: Boolean,
|
5312
5316
|
bindGroup: truthProp
|
@@ -5345,6 +5349,9 @@ var stdin_default$1n = defineComponent({
|
|
5345
5349
|
};
|
5346
5350
|
}
|
5347
5351
|
});
|
5352
|
+
const shape = computed(() => {
|
5353
|
+
return props2.shape || getParentProp("shape") || "round";
|
5354
|
+
});
|
5348
5355
|
const onClick = (event) => {
|
5349
5356
|
const {
|
5350
5357
|
target
|
@@ -5360,17 +5367,16 @@ var stdin_default$1n = defineComponent({
|
|
5360
5367
|
var _a, _b;
|
5361
5368
|
const {
|
5362
5369
|
bem: bem2,
|
5363
|
-
shape,
|
5364
5370
|
checked
|
5365
5371
|
} = props2;
|
5366
5372
|
const iconSize = props2.iconSize || getParentProp("iconSize");
|
5367
5373
|
return createVNode("div", {
|
5368
5374
|
"ref": iconRef,
|
5369
|
-
"class": bem2("icon", [shape, {
|
5375
|
+
"class": bem2("icon", [shape.value, {
|
5370
5376
|
disabled: disabled.value,
|
5371
5377
|
checked
|
5372
5378
|
}]),
|
5373
|
-
"style": shape !== "dot" ? {
|
5379
|
+
"style": shape.value !== "dot" ? {
|
5374
5380
|
fontSize: addUnit(iconSize)
|
5375
5381
|
} : {
|
5376
5382
|
width: addUnit(iconSize),
|
@@ -5380,7 +5386,7 @@ var stdin_default$1n = defineComponent({
|
|
5380
5386
|
}, [slots.icon ? slots.icon({
|
5381
5387
|
checked,
|
5382
5388
|
disabled: disabled.value
|
5383
|
-
}) : shape !== "dot" ? createVNode(Icon, {
|
5389
|
+
}) : shape.value !== "dot" ? createVNode(Icon, {
|
5384
5390
|
"name": "success",
|
5385
5391
|
"style": iconStyle.value
|
5386
5392
|
}, null) : createVNode("div", {
|
@@ -5415,7 +5421,7 @@ var stdin_default$1n = defineComponent({
|
|
5415
5421
|
}
|
5416
5422
|
});
|
5417
5423
|
const radioProps = extend({}, checkerProps, {
|
5418
|
-
shape:
|
5424
|
+
shape: String
|
5419
5425
|
});
|
5420
5426
|
const [name$1d, bem$19] = createNamespace("radio");
|
5421
5427
|
var stdin_default$1m = defineComponent({
|
@@ -5544,6 +5550,7 @@ const addressListProps = {
|
|
5544
5550
|
switchable: truthProp,
|
5545
5551
|
disabledText: String,
|
5546
5552
|
disabledList: makeArrayProp(),
|
5553
|
+
showAddButton: truthProp,
|
5547
5554
|
addButtonText: String,
|
5548
5555
|
defaultTagText: String,
|
5549
5556
|
rightIcon: makeStringProp("edit")
|
@@ -5585,7 +5592,7 @@ var stdin_default$1k = defineComponent({
|
|
5585
5592
|
return list.map((item, index) => renderItem(item, index, disabled));
|
5586
5593
|
}
|
5587
5594
|
};
|
5588
|
-
const renderBottom = () => createVNode("div", {
|
5595
|
+
const renderBottom = () => props2.showAddButton ? createVNode("div", {
|
5589
5596
|
"class": [bem$17("bottom"), "van-safe-area-bottom"]
|
5590
5597
|
}, [createVNode(Button, {
|
5591
5598
|
"round": true,
|
@@ -5594,7 +5601,7 @@ var stdin_default$1k = defineComponent({
|
|
5594
5601
|
"text": props2.addButtonText || t$h("add"),
|
5595
5602
|
"class": bem$17("add"),
|
5596
5603
|
"onClick": () => emit("add")
|
5597
|
-
}, null)]);
|
5604
|
+
}, null)]) : void 0;
|
5598
5605
|
return () => {
|
5599
5606
|
var _a, _b;
|
5600
5607
|
const List2 = renderList(props2.list);
|
@@ -7413,6 +7420,7 @@ const CellGroup = withInstall(stdin_default$1a);
|
|
7413
7420
|
const [name$10, bem$$] = createNamespace("checkbox-group");
|
7414
7421
|
const checkboxGroupProps = {
|
7415
7422
|
max: numericProp,
|
7423
|
+
shape: makeStringProp("round"),
|
7416
7424
|
disabled: Boolean,
|
7417
7425
|
iconSize: numericProp,
|
7418
7426
|
direction: String,
|
@@ -7474,7 +7482,7 @@ var stdin_default$19 = defineComponent({
|
|
7474
7482
|
});
|
7475
7483
|
const [name$$, bem$_] = createNamespace("checkbox");
|
7476
7484
|
const checkboxProps = extend({}, checkerProps, {
|
7477
|
-
shape:
|
7485
|
+
shape: String,
|
7478
7486
|
bindGroup: truthProp
|
7479
7487
|
});
|
7480
7488
|
var stdin_default$18 = defineComponent({
|
@@ -16377,7 +16385,7 @@ const Lazyload = {
|
|
16377
16385
|
});
|
16378
16386
|
}
|
16379
16387
|
};
|
16380
|
-
const version = "4.6.
|
16388
|
+
const version = "4.6.3";
|
16381
16389
|
function install(app) {
|
16382
16390
|
const components = [
|
16383
16391
|
ActionBar,
|
package/lib/vant.js
CHANGED
@@ -2,10 +2,14 @@
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue")) : typeof define === "function" && define.amd ? define(["exports", "vue"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.vant = {}, global.Vue));
|
3
3
|
})(this, function(exports2, vue) {
|
4
4
|
"use strict";
|
5
|
+
function noop() {
|
6
|
+
}
|
7
|
+
const extend = Object.assign;
|
8
|
+
const inBrowser$1 = typeof window !== "undefined";
|
9
|
+
const isObject$1 = (val) => val !== null && typeof val === "object";
|
5
10
|
const isDef = (val) => val !== void 0 && val !== null;
|
6
11
|
const isFunction = (val) => typeof val === "function";
|
7
|
-
const
|
8
|
-
const isPromise = (val) => isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
12
|
+
const isPromise = (val) => isObject$1(val) && isFunction(val.then) && isFunction(val.catch);
|
9
13
|
const isDate = (val) => Object.prototype.toString.call(val) === "[object Date]" && !Number.isNaN(val.getTime());
|
10
14
|
function isMobile(value) {
|
11
15
|
value = value.replace(/[^-|\d]/g, "");
|
@@ -13,26 +17,25 @@
|
|
13
17
|
}
|
14
18
|
const isNumeric = (val) => typeof val === "number" || /^\d+(\.\d+)?$/.test(val);
|
15
19
|
const isIOS$1 = () => inBrowser$1 ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : false;
|
16
|
-
function noop() {
|
17
|
-
}
|
18
|
-
const extend = Object.assign;
|
19
|
-
const inBrowser$1 = typeof window !== "undefined";
|
20
20
|
function get(object, path) {
|
21
21
|
const keys = path.split(".");
|
22
22
|
let result = object;
|
23
23
|
keys.forEach((key) => {
|
24
24
|
var _a;
|
25
|
-
result = isObject(result) ? (_a = result[key]) != null ? _a : "" : "";
|
25
|
+
result = isObject$1(result) ? (_a = result[key]) != null ? _a : "" : "";
|
26
26
|
});
|
27
27
|
return result;
|
28
28
|
}
|
29
29
|
function pick(obj, keys, ignoreUndefined) {
|
30
|
-
return keys.reduce(
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
return keys.reduce(
|
31
|
+
(ret, key) => {
|
32
|
+
if (!ignoreUndefined || obj[key] !== void 0) {
|
33
|
+
ret[key] = obj[key];
|
34
|
+
}
|
35
|
+
return ret;
|
36
|
+
},
|
37
|
+
{}
|
38
|
+
);
|
36
39
|
}
|
37
40
|
const isSameValue = (newValue, oldValue) => JSON.stringify(newValue) === JSON.stringify(oldValue);
|
38
41
|
const toArray = (item) => Array.isArray(item) ? item : [item];
|
@@ -614,7 +617,7 @@
|
|
614
617
|
if (!isDef(val)) {
|
615
618
|
return;
|
616
619
|
}
|
617
|
-
if (!hasOwnProperty.call(to, key) || !isObject(val)) {
|
620
|
+
if (!hasOwnProperty.call(to, key) || !isObject$1(val)) {
|
618
621
|
to[key] = val;
|
619
622
|
} else {
|
620
623
|
to[key] = deepAssign(Object(to[key]), val);
|
@@ -2292,7 +2295,9 @@
|
|
2292
2295
|
});
|
2293
2296
|
return propRef;
|
2294
2297
|
};
|
2298
|
+
const isArray = Array.isArray;
|
2295
2299
|
const isString = (val) => typeof val === "string";
|
2300
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
2296
2301
|
const cacheStringFunction = (fn) => {
|
2297
2302
|
const cache = /* @__PURE__ */ Object.create(null);
|
2298
2303
|
return (str) => {
|
@@ -2304,6 +2309,38 @@
|
|
2304
2309
|
const hyphenate = cacheStringFunction(
|
2305
2310
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
2306
2311
|
);
|
2312
|
+
function normalizeStyle(value) {
|
2313
|
+
if (isArray(value)) {
|
2314
|
+
const res = {};
|
2315
|
+
for (let i = 0; i < value.length; i++) {
|
2316
|
+
const item = value[i];
|
2317
|
+
const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);
|
2318
|
+
if (normalized) {
|
2319
|
+
for (const key in normalized) {
|
2320
|
+
res[key] = normalized[key];
|
2321
|
+
}
|
2322
|
+
}
|
2323
|
+
}
|
2324
|
+
return res;
|
2325
|
+
} else if (isString(value)) {
|
2326
|
+
return value;
|
2327
|
+
} else if (isObject(value)) {
|
2328
|
+
return value;
|
2329
|
+
}
|
2330
|
+
}
|
2331
|
+
const listDelimiterRE = /;(?![^(]*\))/g;
|
2332
|
+
const propertyDelimiterRE = /:([^]+)/;
|
2333
|
+
const styleCommentRE = /\/\*[^]*?\*\//g;
|
2334
|
+
function parseStringStyle(cssText) {
|
2335
|
+
const ret = {};
|
2336
|
+
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
2337
|
+
if (item) {
|
2338
|
+
const tmp = item.split(propertyDelimiterRE);
|
2339
|
+
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
2340
|
+
}
|
2341
|
+
});
|
2342
|
+
return ret;
|
2343
|
+
}
|
2307
2344
|
function stringifyStyle(styles) {
|
2308
2345
|
let ret = "";
|
2309
2346
|
if (!styles || isString(styles)) {
|
@@ -2318,6 +2355,26 @@
|
|
2318
2355
|
}
|
2319
2356
|
return ret;
|
2320
2357
|
}
|
2358
|
+
function normalizeClass(value) {
|
2359
|
+
let res = "";
|
2360
|
+
if (isString(value)) {
|
2361
|
+
res = value;
|
2362
|
+
} else if (isArray(value)) {
|
2363
|
+
for (let i = 0; i < value.length; i++) {
|
2364
|
+
const normalized = normalizeClass(value[i]);
|
2365
|
+
if (normalized) {
|
2366
|
+
res += normalized + " ";
|
2367
|
+
}
|
2368
|
+
}
|
2369
|
+
} else if (isObject(value)) {
|
2370
|
+
for (const name2 in value) {
|
2371
|
+
if (value[name2]) {
|
2372
|
+
res += name2 + " ";
|
2373
|
+
}
|
2374
|
+
}
|
2375
|
+
}
|
2376
|
+
return res.trim();
|
2377
|
+
}
|
2321
2378
|
function scrollLeftTo(scroller, to, duration) {
|
2322
2379
|
let rafId;
|
2323
2380
|
let count = 0;
|
@@ -3512,8 +3569,8 @@
|
|
3512
3569
|
titleClass,
|
3513
3570
|
titleStyle
|
3514
3571
|
} = props2;
|
3515
|
-
parsedClass.value = titleClass ?
|
3516
|
-
parsedStyle.value = titleStyle && typeof titleStyle !== "string" ? stringifyStyle(
|
3572
|
+
parsedClass.value = titleClass ? normalizeClass(titleClass) : "";
|
3573
|
+
parsedStyle.value = titleStyle && typeof titleStyle !== "string" ? stringifyStyle(normalizeStyle(titleStyle)) : titleStyle;
|
3517
3574
|
});
|
3518
3575
|
const renderTitle = (onClickTab) => vue.createVNode(TabTitle, vue.mergeProps({
|
3519
3576
|
"key": id,
|
@@ -4332,7 +4389,7 @@
|
|
4332
4389
|
const scrollTop = getRootScrollTop();
|
4333
4390
|
input.style.height = "auto";
|
4334
4391
|
let height2 = input.scrollHeight;
|
4335
|
-
if (isObject(autosize)) {
|
4392
|
+
if (isObject$1(autosize)) {
|
4336
4393
|
const { maxHeight, minHeight } = autosize;
|
4337
4394
|
if (maxHeight !== void 0) {
|
4338
4395
|
height2 = Math.min(height2, maxHeight);
|
@@ -5070,7 +5127,7 @@
|
|
5070
5127
|
let currentOptions$2 = extend({}, defaultOptions$1);
|
5071
5128
|
const defaultOptionsMap = /* @__PURE__ */ new Map();
|
5072
5129
|
function parseOptions$1(message) {
|
5073
|
-
if (isObject(message)) {
|
5130
|
+
if (isObject$1(message)) {
|
5074
5131
|
return message;
|
5075
5132
|
}
|
5076
5133
|
return {
|
@@ -5370,7 +5427,7 @@
|
|
5370
5427
|
const data = vue.reactive({});
|
5371
5428
|
const showAreaPopup = vue.ref(false);
|
5372
5429
|
const detailFocused = vue.ref(false);
|
5373
|
-
const areaListLoaded = vue.computed(() => isObject(props2.areaList) && Object.keys(props2.areaList).length);
|
5430
|
+
const areaListLoaded = vue.computed(() => isObject$1(props2.areaList) && Object.keys(props2.areaList).length);
|
5374
5431
|
const areaText = vue.computed(() => {
|
5375
5432
|
const {
|
5376
5433
|
province,
|
@@ -5593,6 +5650,7 @@
|
|
5593
5650
|
const AddressEdit = withInstall(stdin_default$1q);
|
5594
5651
|
const [name$1f, bem$1b] = createNamespace("radio-group");
|
5595
5652
|
const radioGroupProps = {
|
5653
|
+
shape: String,
|
5596
5654
|
disabled: Boolean,
|
5597
5655
|
iconSize: numericProp,
|
5598
5656
|
direction: String,
|
@@ -5713,7 +5771,7 @@
|
|
5713
5771
|
props: extend({}, checkerProps, {
|
5714
5772
|
bem: makeRequiredProp(Function),
|
5715
5773
|
role: String,
|
5716
|
-
shape:
|
5774
|
+
shape: String,
|
5717
5775
|
parent: Object,
|
5718
5776
|
checked: Boolean,
|
5719
5777
|
bindGroup: truthProp
|
@@ -5752,6 +5810,9 @@
|
|
5752
5810
|
};
|
5753
5811
|
}
|
5754
5812
|
});
|
5813
|
+
const shape = vue.computed(() => {
|
5814
|
+
return props2.shape || getParentProp("shape") || "round";
|
5815
|
+
});
|
5755
5816
|
const onClick = (event) => {
|
5756
5817
|
const {
|
5757
5818
|
target
|
@@ -5767,17 +5828,16 @@
|
|
5767
5828
|
var _a, _b;
|
5768
5829
|
const {
|
5769
5830
|
bem: bem2,
|
5770
|
-
shape,
|
5771
5831
|
checked
|
5772
5832
|
} = props2;
|
5773
5833
|
const iconSize = props2.iconSize || getParentProp("iconSize");
|
5774
5834
|
return vue.createVNode("div", {
|
5775
5835
|
"ref": iconRef,
|
5776
|
-
"class": bem2("icon", [shape, {
|
5836
|
+
"class": bem2("icon", [shape.value, {
|
5777
5837
|
disabled: disabled.value,
|
5778
5838
|
checked
|
5779
5839
|
}]),
|
5780
|
-
"style": shape !== "dot" ? {
|
5840
|
+
"style": shape.value !== "dot" ? {
|
5781
5841
|
fontSize: addUnit(iconSize)
|
5782
5842
|
} : {
|
5783
5843
|
width: addUnit(iconSize),
|
@@ -5787,7 +5847,7 @@
|
|
5787
5847
|
}, [slots.icon ? slots.icon({
|
5788
5848
|
checked,
|
5789
5849
|
disabled: disabled.value
|
5790
|
-
}) : shape !== "dot" ? vue.createVNode(Icon, {
|
5850
|
+
}) : shape.value !== "dot" ? vue.createVNode(Icon, {
|
5791
5851
|
"name": "success",
|
5792
5852
|
"style": iconStyle.value
|
5793
5853
|
}, null) : vue.createVNode("div", {
|
@@ -5822,7 +5882,7 @@
|
|
5822
5882
|
}
|
5823
5883
|
});
|
5824
5884
|
const radioProps = extend({}, checkerProps, {
|
5825
|
-
shape:
|
5885
|
+
shape: String
|
5826
5886
|
});
|
5827
5887
|
const [name$1d, bem$19] = createNamespace("radio");
|
5828
5888
|
var stdin_default$1m = vue.defineComponent({
|
@@ -5951,6 +6011,7 @@
|
|
5951
6011
|
switchable: truthProp,
|
5952
6012
|
disabledText: String,
|
5953
6013
|
disabledList: makeArrayProp(),
|
6014
|
+
showAddButton: truthProp,
|
5954
6015
|
addButtonText: String,
|
5955
6016
|
defaultTagText: String,
|
5956
6017
|
rightIcon: makeStringProp("edit")
|
@@ -5992,7 +6053,7 @@
|
|
5992
6053
|
return list.map((item, index) => renderItem(item, index, disabled));
|
5993
6054
|
}
|
5994
6055
|
};
|
5995
|
-
const renderBottom = () => vue.createVNode("div", {
|
6056
|
+
const renderBottom = () => props2.showAddButton ? vue.createVNode("div", {
|
5996
6057
|
"class": [bem$17("bottom"), "van-safe-area-bottom"]
|
5997
6058
|
}, [vue.createVNode(Button, {
|
5998
6059
|
"round": true,
|
@@ -6001,7 +6062,7 @@
|
|
6001
6062
|
"text": props2.addButtonText || t$h("add"),
|
6002
6063
|
"class": bem$17("add"),
|
6003
6064
|
"onClick": () => emit("add")
|
6004
|
-
}, null)]);
|
6065
|
+
}, null)]) : void 0;
|
6005
6066
|
return () => {
|
6006
6067
|
var _a, _b;
|
6007
6068
|
const List2 = renderList(props2.list);
|
@@ -7817,6 +7878,7 @@
|
|
7817
7878
|
const [name$10, bem$$] = createNamespace("checkbox-group");
|
7818
7879
|
const checkboxGroupProps = {
|
7819
7880
|
max: numericProp,
|
7881
|
+
shape: makeStringProp("round"),
|
7820
7882
|
disabled: Boolean,
|
7821
7883
|
iconSize: numericProp,
|
7822
7884
|
direction: String,
|
@@ -7878,7 +7940,7 @@
|
|
7878
7940
|
});
|
7879
7941
|
const [name$$, bem$_] = createNamespace("checkbox");
|
7880
7942
|
const checkboxProps = extend({}, checkerProps, {
|
7881
|
-
shape:
|
7943
|
+
shape: String,
|
7882
7944
|
bindGroup: truthProp
|
7883
7945
|
});
|
7884
7946
|
var stdin_default$18 = vue.defineComponent({
|
@@ -8030,7 +8092,7 @@
|
|
8030
8092
|
strokeLinecap
|
8031
8093
|
} = props2;
|
8032
8094
|
const offset2 = PERIMETER * currentRate / 100;
|
8033
|
-
const color = isObject(props2.color) ? `url(#${id})` : props2.color;
|
8095
|
+
const color = isObject$1(props2.color) ? `url(#${id})` : props2.color;
|
8034
8096
|
const style = {
|
8035
8097
|
stroke: color,
|
8036
8098
|
strokeWidth: `${+strokeWidth + 1}px`,
|
@@ -8060,7 +8122,7 @@
|
|
8060
8122
|
const {
|
8061
8123
|
color
|
8062
8124
|
} = props2;
|
8063
|
-
if (!isObject(color)) {
|
8125
|
+
if (!isObject$1(color)) {
|
8064
8126
|
return;
|
8065
8127
|
}
|
8066
8128
|
const Stops = Object.keys(color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key, index) => vue.createVNode("stop", {
|
@@ -11770,7 +11832,7 @@
|
|
11770
11832
|
});
|
11771
11833
|
let timer;
|
11772
11834
|
let instance;
|
11773
|
-
const parseOptions = (message) => isObject(message) ? message : {
|
11835
|
+
const parseOptions = (message) => isObject$1(message) ? message : {
|
11774
11836
|
message
|
11775
11837
|
};
|
11776
11838
|
function initInstance() {
|
@@ -15704,7 +15766,7 @@
|
|
15704
15766
|
const {
|
15705
15767
|
to
|
15706
15768
|
} = props2;
|
15707
|
-
const config = isObject(to) ? to : {
|
15769
|
+
const config = isObject$1(to) ? to : {
|
15708
15770
|
path: to
|
15709
15771
|
};
|
15710
15772
|
return !!$route.matched.find((val) => {
|
@@ -17290,7 +17352,7 @@
|
|
17290
17352
|
valueFormatter(value) {
|
17291
17353
|
let src = value;
|
17292
17354
|
let { loading, error } = this.options;
|
17293
|
-
if (isObject(value)) {
|
17355
|
+
if (isObject$1(value)) {
|
17294
17356
|
({ src } = value);
|
17295
17357
|
loading = value.loading || this.options.loading;
|
17296
17358
|
error = value.error || this.options.error;
|
@@ -17535,7 +17597,7 @@
|
|
17535
17597
|
});
|
17536
17598
|
}
|
17537
17599
|
};
|
17538
|
-
const version = "4.6.
|
17600
|
+
const version = "4.6.3";
|
17539
17601
|
function install(app) {
|
17540
17602
|
const components = [
|
17541
17603
|
ActionBar,
|