vant 3.6.11 → 3.6.12

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/index.d.ts CHANGED
@@ -91,4 +91,4 @@ declare namespace _default {
91
91
  }
92
92
  export default _default;
93
93
  export function install(app: any): void;
94
- export const version: "3.6.11";
94
+ export const version: "3.6.12";
package/es/index.mjs CHANGED
@@ -84,7 +84,7 @@ import { Tag } from "./tag/index.mjs";
84
84
  import { Toast } from "./toast/index.mjs";
85
85
  import { TreeSelect } from "./tree-select/index.mjs";
86
86
  import { Uploader } from "./uploader/index.mjs";
87
- const version = "3.6.11";
87
+ const version = "3.6.12";
88
88
  function install(app) {
89
89
  const components = [
90
90
  ActionBar,
@@ -91,7 +91,8 @@ var stdin_default = defineComponent({
91
91
  const result = {
92
92
  file,
93
93
  status: "",
94
- message: ""
94
+ message: "",
95
+ objectUrl: URL.createObjectURL(file)
95
96
  };
96
97
  if (contents[index]) {
97
98
  result.content = contents[index];
@@ -105,7 +106,8 @@ var stdin_default = defineComponent({
105
106
  const result = {
106
107
  file: files,
107
108
  status: "",
108
- message: ""
109
+ message: "",
110
+ objectUrl: URL.createObjectURL(files)
109
111
  };
110
112
  if (content) {
111
113
  result.content = content;
@@ -147,8 +149,8 @@ var stdin_default = defineComponent({
147
149
  if (props.previewFullImage) {
148
150
  const imageFiles = props.modelValue.filter(isImageFile);
149
151
  const images = imageFiles.map((item2) => {
150
- if (item2.file && !item2.url && item2.status !== "failed") {
151
- item2.url = URL.createObjectURL(item2.file);
152
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
153
+ item2.url = item2.objectUrl;
152
154
  urls.push(item2.url);
153
155
  }
154
156
  return item2.url;
@@ -98,7 +98,7 @@ var stdin_default = defineComponent({
98
98
  if (isImageFile(item)) {
99
99
  return _createVNode(Image, {
100
100
  "fit": imageFit,
101
- "src": item.content || item.url,
101
+ "src": item.objectUrl || item.content || item.url,
102
102
  "class": bem("preview-image"),
103
103
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
104
104
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -6,6 +6,7 @@ export declare type UploaderResultType = 'dataUrl' | 'text' | 'file';
6
6
  export declare type UploaderFileListItem = {
7
7
  url?: string;
8
8
  file?: File;
9
+ objectUrl?: string;
9
10
  content?: string;
10
11
  isImage?: boolean;
11
12
  status?: '' | 'uploading' | 'done' | 'failed';
@@ -40,7 +40,7 @@ function filterFiles(items, maxSize) {
40
40
  });
41
41
  return { valid, invalid };
42
42
  }
43
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
43
+ const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
44
44
  const isImageUrl = (url) => IMAGE_REGEXP.test(url);
45
45
  function isImageFile(item) {
46
46
  if (item.isImage) {
package/lib/index.d.ts CHANGED
@@ -91,4 +91,4 @@ declare namespace _default {
91
91
  }
92
92
  export default _default;
93
93
  export function install(app: any): void;
94
- export const version: "3.6.11";
94
+ export const version: "3.6.12";
package/lib/index.js CHANGED
@@ -196,7 +196,7 @@ __reExport(stdin_exports, require("./tag"), module.exports);
196
196
  __reExport(stdin_exports, require("./toast"), module.exports);
197
197
  __reExport(stdin_exports, require("./tree-select"), module.exports);
198
198
  __reExport(stdin_exports, require("./uploader"), module.exports);
199
- const version = "3.6.11";
199
+ const version = "3.6.12";
200
200
  function install(app) {
201
201
  const components = [
202
202
  import_action_bar.ActionBar,
@@ -119,7 +119,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
119
119
  const result = {
120
120
  file,
121
121
  status: "",
122
- message: ""
122
+ message: "",
123
+ objectUrl: URL.createObjectURL(file)
123
124
  };
124
125
  if (contents[index]) {
125
126
  result.content = contents[index];
@@ -133,7 +134,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
133
134
  const result = {
134
135
  file: files,
135
136
  status: "",
136
- message: ""
137
+ message: "",
138
+ objectUrl: URL.createObjectURL(files)
137
139
  };
138
140
  if (content) {
139
141
  result.content = content;
@@ -175,8 +177,8 @@ var stdin_default = (0, import_vue2.defineComponent)({
175
177
  if (props.previewFullImage) {
176
178
  const imageFiles = props.modelValue.filter(import_utils2.isImageFile);
177
179
  const images = imageFiles.map((item2) => {
178
- if (item2.file && !item2.url && item2.status !== "failed") {
179
- item2.url = URL.createObjectURL(item2.file);
180
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
181
+ item2.url = item2.objectUrl;
180
182
  urls.push(item2.url);
181
183
  }
182
184
  return item2.url;
@@ -120,7 +120,7 @@ var stdin_default = (0, import_vue2.defineComponent)({
120
120
  if ((0, import_utils.isImageFile)(item)) {
121
121
  return (0, import_vue.createVNode)(import_image.Image, {
122
122
  "fit": imageFit,
123
- "src": item.content || item.url,
123
+ "src": item.objectUrl || item.content || item.url,
124
124
  "class": (0, import_utils.bem)("preview-image"),
125
125
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
126
126
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -6,6 +6,7 @@ export declare type UploaderResultType = 'dataUrl' | 'text' | 'file';
6
6
  export declare type UploaderFileListItem = {
7
7
  url?: string;
8
8
  file?: File;
9
+ objectUrl?: string;
9
10
  content?: string;
10
11
  isImage?: boolean;
11
12
  status?: '' | 'uploading' | 'done' | 'failed';
@@ -69,7 +69,7 @@ function filterFiles(items, maxSize) {
69
69
  });
70
70
  return { valid, invalid };
71
71
  }
72
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
72
+ const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
73
73
  const isImageUrl = (url) => IMAGE_REGEXP.test(url);
74
74
  function isImageFile(item) {
75
75
  if (item.isImage) {
package/lib/vant.cjs.js CHANGED
@@ -13731,7 +13731,7 @@ function filterFiles(items, maxSize) {
13731
13731
  });
13732
13732
  return { valid, invalid };
13733
13733
  }
13734
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
13734
+ const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
13735
13735
  const isImageUrl = (url) => IMAGE_REGEXP.test(url);
13736
13736
  function isImageFile(item) {
13737
13737
  if (item.isImage) {
@@ -13841,7 +13841,7 @@ var stdin_default$5 = vue.defineComponent({
13841
13841
  if (isImageFile(item)) {
13842
13842
  return vue.createVNode(Image$1, {
13843
13843
  "fit": imageFit,
13844
- "src": item.content || item.url,
13844
+ "src": item.objectUrl || item.content || item.url,
13845
13845
  "class": bem("preview-image"),
13846
13846
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
13847
13847
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -13950,7 +13950,8 @@ var stdin_default$4 = vue.defineComponent({
13950
13950
  const result = {
13951
13951
  file,
13952
13952
  status: "",
13953
- message: ""
13953
+ message: "",
13954
+ objectUrl: URL.createObjectURL(file)
13954
13955
  };
13955
13956
  if (contents[index]) {
13956
13957
  result.content = contents[index];
@@ -13964,7 +13965,8 @@ var stdin_default$4 = vue.defineComponent({
13964
13965
  const result = {
13965
13966
  file: files,
13966
13967
  status: "",
13967
- message: ""
13968
+ message: "",
13969
+ objectUrl: URL.createObjectURL(files)
13968
13970
  };
13969
13971
  if (content) {
13970
13972
  result.content = content;
@@ -14006,8 +14008,8 @@ var stdin_default$4 = vue.defineComponent({
14006
14008
  if (props.previewFullImage) {
14007
14009
  const imageFiles = props.modelValue.filter(isImageFile);
14008
14010
  const images = imageFiles.map((item2) => {
14009
- if (item2.file && !item2.url && item2.status !== "failed") {
14010
- item2.url = URL.createObjectURL(item2.file);
14011
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
14012
+ item2.url = item2.objectUrl;
14011
14013
  urls.push(item2.url);
14012
14014
  }
14013
14015
  return item2.url;
@@ -15000,7 +15002,7 @@ const Lazyload = {
15000
15002
  });
15001
15003
  }
15002
15004
  };
15003
- const version = "3.6.11";
15005
+ const version = "3.6.12";
15004
15006
  function install(app) {
15005
15007
  const components = [
15006
15008
  ActionBar,
package/lib/vant.es.js CHANGED
@@ -13729,7 +13729,7 @@ function filterFiles(items, maxSize) {
13729
13729
  });
13730
13730
  return { valid, invalid };
13731
13731
  }
13732
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
13732
+ const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
13733
13733
  const isImageUrl = (url) => IMAGE_REGEXP.test(url);
13734
13734
  function isImageFile(item) {
13735
13735
  if (item.isImage) {
@@ -13839,7 +13839,7 @@ var stdin_default$5 = defineComponent({
13839
13839
  if (isImageFile(item)) {
13840
13840
  return createVNode(Image$1, {
13841
13841
  "fit": imageFit,
13842
- "src": item.content || item.url,
13842
+ "src": item.objectUrl || item.content || item.url,
13843
13843
  "class": bem("preview-image"),
13844
13844
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
13845
13845
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -13948,7 +13948,8 @@ var stdin_default$4 = defineComponent({
13948
13948
  const result = {
13949
13949
  file,
13950
13950
  status: "",
13951
- message: ""
13951
+ message: "",
13952
+ objectUrl: URL.createObjectURL(file)
13952
13953
  };
13953
13954
  if (contents[index]) {
13954
13955
  result.content = contents[index];
@@ -13962,7 +13963,8 @@ var stdin_default$4 = defineComponent({
13962
13963
  const result = {
13963
13964
  file: files,
13964
13965
  status: "",
13965
- message: ""
13966
+ message: "",
13967
+ objectUrl: URL.createObjectURL(files)
13966
13968
  };
13967
13969
  if (content) {
13968
13970
  result.content = content;
@@ -14004,8 +14006,8 @@ var stdin_default$4 = defineComponent({
14004
14006
  if (props.previewFullImage) {
14005
14007
  const imageFiles = props.modelValue.filter(isImageFile);
14006
14008
  const images = imageFiles.map((item2) => {
14007
- if (item2.file && !item2.url && item2.status !== "failed") {
14008
- item2.url = URL.createObjectURL(item2.file);
14009
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
14010
+ item2.url = item2.objectUrl;
14009
14011
  urls.push(item2.url);
14010
14012
  }
14011
14013
  return item2.url;
@@ -14998,7 +15000,7 @@ const Lazyload = {
14998
15000
  });
14999
15001
  }
15000
15002
  };
15001
- const version = "3.6.11";
15003
+ const version = "3.6.12";
15002
15004
  function install(app) {
15003
15005
  const components = [
15004
15006
  ActionBar,
package/lib/vant.js CHANGED
@@ -14945,7 +14945,7 @@
14945
14945
  });
14946
14946
  return { valid, invalid };
14947
14947
  }
14948
- const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
14948
+ const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i;
14949
14949
  const isImageUrl = (url) => IMAGE_REGEXP.test(url);
14950
14950
  function isImageFile(item) {
14951
14951
  if (item.isImage) {
@@ -15055,7 +15055,7 @@
15055
15055
  if (isImageFile(item)) {
15056
15056
  return vue.createVNode(Image$1, {
15057
15057
  "fit": imageFit,
15058
- "src": item.content || item.url,
15058
+ "src": item.objectUrl || item.content || item.url,
15059
15059
  "class": bem("preview-image"),
15060
15060
  "width": Array.isArray(previewSize) ? previewSize[0] : previewSize,
15061
15061
  "height": Array.isArray(previewSize) ? previewSize[1] : previewSize,
@@ -15164,7 +15164,8 @@
15164
15164
  const result = {
15165
15165
  file,
15166
15166
  status: "",
15167
- message: ""
15167
+ message: "",
15168
+ objectUrl: URL.createObjectURL(file)
15168
15169
  };
15169
15170
  if (contents[index]) {
15170
15171
  result.content = contents[index];
@@ -15178,7 +15179,8 @@
15178
15179
  const result = {
15179
15180
  file: files,
15180
15181
  status: "",
15181
- message: ""
15182
+ message: "",
15183
+ objectUrl: URL.createObjectURL(files)
15182
15184
  };
15183
15185
  if (content) {
15184
15186
  result.content = content;
@@ -15220,8 +15222,8 @@
15220
15222
  if (props.previewFullImage) {
15221
15223
  const imageFiles = props.modelValue.filter(isImageFile);
15222
15224
  const images = imageFiles.map((item2) => {
15223
- if (item2.file && !item2.url && item2.status !== "failed") {
15224
- item2.url = URL.createObjectURL(item2.file);
15225
+ if (item2.objectUrl && !item2.url && item2.status !== "failed") {
15226
+ item2.url = item2.objectUrl;
15225
15227
  urls.push(item2.url);
15226
15228
  }
15227
15229
  return item2.url;
@@ -16197,7 +16199,7 @@
16197
16199
  });
16198
16200
  }
16199
16201
  };
16200
- const version = "3.6.11";
16202
+ const version = "3.6.12";
16201
16203
  function install(app) {
16202
16204
  const components = [
16203
16205
  ActionBar,