Socket
Socket
Sign inDemoInstall

vant

Package Overview
Dependencies
4
Maintainers
7
Versions
559
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.9.0 to 4.9.1

26

es/address-list/AddressList.d.ts

@@ -1,9 +0,9 @@

import { type ExtractPropTypes } from 'vue';
import { type ExtractPropTypes, type PropType } from 'vue';
import { AddressListAddress } from './AddressListItem';
export declare const addressListProps: {
list: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];
};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: PropType<string | number | (string | number)[]>;
switchable: {

@@ -15,3 +15,3 @@ type: BooleanConstructor;

disabledList: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];

@@ -26,3 +26,3 @@ };

rightIcon: {
type: import("vue").PropType<string>;
type: PropType<string>;
default: string;

@@ -34,6 +34,6 @@ };

list: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];
};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: PropType<string | number | (string | number)[]>;
switchable: {

@@ -45,3 +45,3 @@ type: BooleanConstructor;

disabledList: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];

@@ -56,3 +56,3 @@ };

rightIcon: {
type: import("vue").PropType<string>;
type: PropType<string>;
default: string;

@@ -62,6 +62,6 @@ };

list: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];
};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: PropType<string | number | (string | number)[]>;
switchable: {

@@ -73,3 +73,3 @@ type: BooleanConstructor;

disabledList: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];

@@ -84,3 +84,3 @@ };

rightIcon: {
type: import("vue").PropType<string>;
type: PropType<string>;
default: string;

@@ -87,0 +87,0 @@ };

@@ -17,2 +17,3 @@ import { type PropType } from 'vue';

switchable: BooleanConstructor;
singleChoice: BooleanConstructor;
defaultTagText: StringConstructor;

@@ -30,2 +31,3 @@ rightIcon: {

switchable: BooleanConstructor;
singleChoice: BooleanConstructor;
defaultTagText: StringConstructor;

@@ -44,3 +46,4 @@ rightIcon: {

switchable: boolean;
singleChoice: boolean;
}, {}>;
export default _default;

@@ -6,3 +6,3 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").DefineComponent<{

};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: import("vue").PropType<string | number | (string | number)[]>;
switchable: {

@@ -32,3 +32,3 @@ type: BooleanConstructor;

};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: import("vue").PropType<string | number | (string | number)[]>;
switchable: {

@@ -35,0 +35,0 @@ type: BooleanConstructor;

@@ -109,2 +109,2 @@ export * from "./action-bar";

export function install(app: any): void;
export const version: "4.9.0";
export const version: "4.9.1";

@@ -1,9 +0,9 @@

import { type ExtractPropTypes } from 'vue';
import { type ExtractPropTypes, type PropType } from 'vue';
import { AddressListAddress } from './AddressListItem';
export declare const addressListProps: {
list: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];
};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: PropType<string | number | (string | number)[]>;
switchable: {

@@ -15,3 +15,3 @@ type: BooleanConstructor;

disabledList: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];

@@ -26,3 +26,3 @@ };

rightIcon: {
type: import("vue").PropType<string>;
type: PropType<string>;
default: string;

@@ -34,6 +34,6 @@ };

list: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];
};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: PropType<string | number | (string | number)[]>;
switchable: {

@@ -45,3 +45,3 @@ type: BooleanConstructor;

disabledList: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];

@@ -56,3 +56,3 @@ };

rightIcon: {
type: import("vue").PropType<string>;
type: PropType<string>;
default: string;

@@ -62,6 +62,6 @@ };

list: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];
};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: PropType<string | number | (string | number)[]>;
switchable: {

@@ -73,3 +73,3 @@ type: BooleanConstructor;

disabledList: {
type: import("vue").PropType<AddressListAddress[]>;
type: PropType<AddressListAddress[]>;
default: () => never[];

@@ -84,3 +84,3 @@ };

rightIcon: {
type: import("vue").PropType<string>;
type: PropType<string>;
default: string;

@@ -87,0 +87,0 @@ };

@@ -39,2 +39,3 @@ var __create = Object.create;

var import_radio_group = require("../radio-group");
var import_checkbox_group = require("../checkbox-group");
var import_AddressListItem = __toESM(require("./AddressListItem"));

@@ -44,3 +45,3 @@ const [name, bem, t] = (0, import_utils.createNamespace)("address-list");

list: (0, import_utils.makeArrayProp)(),
modelValue: import_utils.numericProp,
modelValue: [...import_utils.numericProp, Array],
switchable: import_utils.truthProp,

@@ -62,2 +63,3 @@ disabledText: String,

}) {
const singleChoice = (0, import_vue2.computed)(() => !Array.isArray(props.modelValue));
const renderItem = (item, index, disabled) => {

@@ -71,3 +73,12 @@ const onEdit = () => emit(disabled ? "editDisabled" : "edit", item, index);

if (!disabled) {
emit("update:modelValue", item.id);
if (singleChoice.value) {
emit("update:modelValue", item.id);
} else {
const value = props.modelValue;
if (value.includes(item.id)) {
emit("update:modelValue", value.filter((id) => id !== item.id));
} else {
emit("update:modelValue", [...value, item.id]);
}
}
}

@@ -80,2 +91,3 @@ };

"switchable": props.switchable,
"singleChoice": singleChoice.value,
"defaultTagText": props.defaultTagText,

@@ -115,6 +127,10 @@ "rightIcon": props.rightIcon,

"class": bem()
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), (0, import_vue.createVNode)(import_radio_group.RadioGroup, {
}, [(_a = slots.top) == null ? void 0 : _a.call(slots), !singleChoice.value && Array.isArray(props.modelValue) ? (0, import_vue.createVNode)(import_checkbox_group.CheckboxGroup, {
"modelValue": props.modelValue
}, {
default: () => [List]
}) : (0, import_vue.createVNode)(import_radio_group.RadioGroup, {
"modelValue": props.modelValue
}, {
default: () => [List]
}), DisabledText, DisabledList, (_b = slots.default) == null ? void 0 : _b.call(slots), renderBottom()]);

@@ -121,0 +137,0 @@ };

@@ -17,2 +17,3 @@ import { type PropType } from 'vue';

switchable: BooleanConstructor;
singleChoice: BooleanConstructor;
defaultTagText: StringConstructor;

@@ -30,2 +31,3 @@ rightIcon: {

switchable: BooleanConstructor;
singleChoice: BooleanConstructor;
defaultTagText: StringConstructor;

@@ -44,3 +46,4 @@ rightIcon: {

switchable: boolean;
singleChoice: boolean;
}, {}>;
export default _default;

@@ -30,2 +30,3 @@ var __defProp = Object.defineProperty;

var import_radio = require("../radio");
var import_checkbox = require("../checkbox");
const [name, bem] = (0, import_utils.createNamespace)("address-item");

@@ -38,2 +39,3 @@ var stdin_default = (0, import_vue2.defineComponent)({

switchable: Boolean,
singleChoice: Boolean,
defaultTagText: String,

@@ -80,3 +82,4 @@ rightIcon: (0, import_utils.makeStringProp)("edit")

disabled,
switchable
switchable,
singleChoice
} = props;

@@ -89,8 +92,17 @@ const Info = [(0, import_vue.createVNode)("div", {

if (switchable && !disabled) {
return (0, import_vue.createVNode)(import_radio.Radio, {
"name": address.id,
"iconSize": 18
}, {
default: () => [Info]
});
if (singleChoice) {
return (0, import_vue.createVNode)(import_radio.Radio, {
"name": address.id,
"iconSize": 18
}, {
default: () => [Info]
});
} else {
return (0, import_vue.createVNode)(import_checkbox.Checkbox, {
"name": address.id,
"iconSize": 18
}, {
default: () => [Info]
});
}
}

@@ -97,0 +109,0 @@ return Info;

@@ -6,3 +6,3 @@ export declare const AddressList: import("../utils").WithInstall<import("vue").DefineComponent<{

};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: import("vue").PropType<string | number | (string | number)[]>;
switchable: {

@@ -32,3 +32,3 @@ type: BooleanConstructor;

};
modelValue: (NumberConstructor | StringConstructor)[];
modelValue: import("vue").PropType<string | number | (string | number)[]>;
switchable: {

@@ -35,0 +35,0 @@ type: BooleanConstructor;

@@ -9,4 +9,5 @@ require("../../style/base.css");

require("../../radio-group/index.css");
require("../../checkbox-group/index.css");
require("../../checkbox/index.css");
require("../../radio/index.css");
require("../index.css");

@@ -64,5 +64,5 @@ var __defProp = Object.defineProperty;

if (showCity) {
return placeholder.length ? [
return placeholder.length > 1 ? [
makeOption(
placeholder[0],
placeholder[1],
AREA_EMPTY_CODE,

@@ -85,3 +85,3 @@ showCounty ? [] : void 0

if (showCounty) {
return placeholder.length ? [makeOption(placeholder[1])] : [];
return placeholder.length > 2 ? [makeOption(placeholder[2])] : [];
}

@@ -88,0 +88,0 @@ };

@@ -128,2 +128,12 @@ var __defProp = Object.defineProperty;

});
const renderHeader = () => {
if (slots.header) {
return slots.header();
}
return (0, import_vue.createVNode)("div", {
"class": bem("header")
}, [(0, import_vue.createVNode)("div", {
"class": bem("header-bar")
}, null)]);
};
return () => {

@@ -140,7 +150,3 @@ var _a;

"onTouchcancel": onTouchend
}, [(0, import_vue.createVNode)("div", {
"class": bem("header")
}, [(0, import_vue.createVNode)("div", {
"class": bem("header-bar")
}, null)]), (0, import_vue.createVNode)("div", {
}, [renderHeader(), (0, import_vue.createVNode)("div", {
"class": bem("content"),

@@ -147,0 +153,0 @@ "ref": contentRef

@@ -109,2 +109,2 @@ export * from "./action-bar";

export function install(app: any): void;
export const version: "4.9.0";
export const version: "4.9.1";

@@ -229,3 +229,3 @@ var __defProp = Object.defineProperty;

__reExport(stdin_exports, require("./watermark"), module.exports);
const version = "4.9.0";
const version = "4.9.1";
function install(app) {

@@ -232,0 +232,0 @@ const components = [

@@ -249,2 +249,3 @@ var __defProp = Object.defineProperty;

"placeholder": props.placeholder,
"autocomplete": "off",
"aria-valuemax": props.max,

@@ -251,0 +252,0 @@ "aria-valuemin": props.min,

{
"name": "vant",
"version": "4.9.0",
"version": "4.9.1",
"description": "Mobile UI Components built on Vue",

@@ -36,3 +36,3 @@ "main": "lib/vant.cjs.js",

"dependencies": {
"@vue/shared": "^3.4.26",
"@vue/shared": "^3.4.27",
"@vant/popperjs": "^1.3.0",

@@ -45,8 +45,8 @@ "@vant/use": "^1.6.0"

"devDependencies": {
"@types/node": "^18.19.31",
"@vitejs/plugin-vue": "^5.0.4",
"@types/node": "^18.19.33",
"@vitejs/plugin-vue": "^5.0.5",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vitest/coverage-istanbul": "^1.5.3",
"@vue/runtime-core": "^3.4.26",
"@vue/test-utils": "^2.4.5",
"@vue/runtime-core": "^3.4.27",
"@vue/test-utils": "^2.4.6",
"csstype": "^3.1.3",

@@ -56,11 +56,11 @@ "diffable-html": "^5.0.0",

"typescript": "^5.4.5",
"vite": "^5.2.10",
"vite": "^5.2.12",
"vitest": "^1.5.3",
"vitest-canvas-mock": "^0.3.3",
"vue": "^3.4.26",
"vue": "^3.4.27",
"vue-router": "^4.3.2",
"@vant/cli": "7.0.3",
"@vant/eslint-config": "4.0.0",
"@vant/area-data": "1.5.1",
"@vant/eslint-config": "4.0.0",
"@vant/icons": "3.0.2",
"@vant/cli": "7.0.2"
"@vant/icons": "3.0.2"
},

@@ -67,0 +67,0 @@ "sideEffects": [

@@ -20,3 +20,3 @@ <p align="center">

&nbsp;
<a href="https://vant-ui.github.io/vant">文档站</a>
<a href="https://vant.pro/vant/">Documentation (backup)</a>
&nbsp;

@@ -102,3 +102,3 @@ ·

See more in [Quickstart](https://vant-ui.github.io/vant#/en-US/quickstart).
See more in [Quickstart](https://vant-ui.github.io/vant/#/en-US/quickstart).

@@ -138,4 +138,5 @@ ## Browser Support

- [Documentation](https://vant-ui.github.io/vant)
- [Changelog](https://vant-ui.github.io/vant#/en-US/changelog)
- [Documentation](https://vant-ui.github.io/vant/)
- [Documentation (backup)](https://vant.pro/vant/)
- [Changelog](https://vant-ui.github.io/vant/#/en-US/changelog)
- [Discussions](https://github.com/vant-ui/vant/discussions)

@@ -142,0 +143,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc