vant 3.3.2 → 3.3.5
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 +1 -1
- package/es/index.js +1 -1
- package/es/locale/lang/pt-BR.d.ts +73 -0
- package/es/locale/lang/pt-BR.js +72 -0
- package/es/swipe/index.css +1 -1
- package/es/swipe/index.less +2 -0
- package/es/uploader/Uploader.js +13 -2
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/lang/pt-BR.d.ts +73 -0
- package/lib/locale/lang/pt-BR.js +77 -0
- package/lib/ssr.js +7 -0
- package/lib/ssr.mjs +1 -0
- package/lib/swipe/index.css +1 -1
- package/lib/swipe/index.less +2 -0
- package/lib/uploader/Uploader.js +12 -1
- package/lib/vant.cjs.js +12 -2
- package/lib/vant.cjs.min.js +1 -1
- package/lib/vant.es.js +12 -2
- package/lib/vant.es.min.js +12 -2
- package/lib/vant.js +12 -2
- package/lib/vant.min.js +1 -1
- package/package.json +10 -4
- package/vetur/attributes.json +580 -580
- package/vetur/tags.json +207 -207
- package/vetur/web-types.json +1859 -1859
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
@@ -84,7 +84,7 @@ import { Tag } from './tag';
|
|
84
84
|
import { Toast } from './toast';
|
85
85
|
import { TreeSelect } from './tree-select';
|
86
86
|
import { Uploader } from './uploader';
|
87
|
-
var version = '3.3.
|
87
|
+
var version = '3.3.5';
|
88
88
|
|
89
89
|
function install(app) {
|
90
90
|
var components = [ActionBar, ActionBarButton, ActionBarIcon, ActionSheet, AddressEdit, AddressList, Area, Badge, Button, Calendar, Card, Cascader, Cell, CellGroup, Checkbox, CheckboxGroup, Circle, Col, Collapse, CollapseItem, ConfigProvider, ContactCard, ContactEdit, ContactList, CountDown, Coupon, CouponCell, CouponList, DatetimePicker, Dialog, Divider, DropdownItem, DropdownMenu, Empty, Field, Form, Grid, GridItem, Icon, Image, ImagePreview, IndexAnchor, IndexBar, List, Loading, Locale, NavBar, NoticeBar, Notify, NumberKeyboard, Overlay, Pagination, PasswordInput, Picker, Popover, Popup, Progress, PullRefresh, Radio, RadioGroup, Rate, Row, Search, ShareSheet, Sidebar, SidebarItem, Skeleton, Slider, Step, Stepper, Steps, Sticky, SubmitBar, Swipe, SwipeCell, SwipeItem, Switch, Tab, Tabbar, TabbarItem, Tabs, Tag, Toast, TreeSelect, Uploader];
|
@@ -0,0 +1,73 @@
|
|
1
|
+
declare const _default: {
|
2
|
+
name: string;
|
3
|
+
tel: string;
|
4
|
+
save: string;
|
5
|
+
confirm: string;
|
6
|
+
cancel: string;
|
7
|
+
delete: string;
|
8
|
+
loading: string;
|
9
|
+
noCoupon: string;
|
10
|
+
nameEmpty: string;
|
11
|
+
telInvalid: string;
|
12
|
+
vanCalendar: {
|
13
|
+
end: string;
|
14
|
+
start: string;
|
15
|
+
title: string;
|
16
|
+
startEnd: string;
|
17
|
+
weekdays: string[];
|
18
|
+
monthTitle: (year: number, month: number) => string;
|
19
|
+
rangePrompt: (maxRange: number) => string;
|
20
|
+
};
|
21
|
+
vanCascader: {
|
22
|
+
select: string;
|
23
|
+
};
|
24
|
+
vanContactCard: {
|
25
|
+
addText: string;
|
26
|
+
};
|
27
|
+
vanContactList: {
|
28
|
+
addText: string;
|
29
|
+
};
|
30
|
+
vanPagination: {
|
31
|
+
prev: string;
|
32
|
+
next: string;
|
33
|
+
};
|
34
|
+
vanPullRefresh: {
|
35
|
+
pulling: string;
|
36
|
+
loosing: string;
|
37
|
+
};
|
38
|
+
vanSubmitBar: {
|
39
|
+
label: string;
|
40
|
+
};
|
41
|
+
vanCoupon: {
|
42
|
+
unlimited: string;
|
43
|
+
discount: (discount: number) => string;
|
44
|
+
condition: (condition: number) => string;
|
45
|
+
};
|
46
|
+
vanCouponCell: {
|
47
|
+
title: string;
|
48
|
+
count: (count: number) => string;
|
49
|
+
};
|
50
|
+
vanCouponList: {
|
51
|
+
exchange: string;
|
52
|
+
close: string;
|
53
|
+
enable: string;
|
54
|
+
disabled: string;
|
55
|
+
placeholder: string;
|
56
|
+
};
|
57
|
+
vanAddressEdit: {
|
58
|
+
area: string;
|
59
|
+
postal: string;
|
60
|
+
areaEmpty: string;
|
61
|
+
addressEmpty: string;
|
62
|
+
postalEmpty: string;
|
63
|
+
defaultAddress: string;
|
64
|
+
};
|
65
|
+
vanAddressEditDetail: {
|
66
|
+
label: string;
|
67
|
+
placeholder: string;
|
68
|
+
};
|
69
|
+
vanAddressList: {
|
70
|
+
add: string;
|
71
|
+
};
|
72
|
+
};
|
73
|
+
export default _default;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
export default {
|
2
|
+
name: 'Nome',
|
3
|
+
tel: 'Fone',
|
4
|
+
save: 'Salvar',
|
5
|
+
confirm: 'Confirmar',
|
6
|
+
cancel: 'Cancelar',
|
7
|
+
delete: 'Excluir',
|
8
|
+
loading: 'Carregando...',
|
9
|
+
noCoupon: 'Nenhum cupom',
|
10
|
+
nameEmpty: 'Por favor, preencha o nome',
|
11
|
+
telInvalid: 'Telefone em formato inválido',
|
12
|
+
vanCalendar: {
|
13
|
+
end: 'Fim',
|
14
|
+
start: 'Início',
|
15
|
+
title: 'Calendário',
|
16
|
+
startEnd: 'Início/Fim',
|
17
|
+
weekdays: ['Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'],
|
18
|
+
monthTitle: (year, month) => month + "/" + year,
|
19
|
+
rangePrompt: maxRange => "Escolha no m\xE1ximo " + maxRange + " dias"
|
20
|
+
},
|
21
|
+
vanCascader: {
|
22
|
+
select: 'Selecione'
|
23
|
+
},
|
24
|
+
vanContactCard: {
|
25
|
+
addText: 'Adicionar informações de contato'
|
26
|
+
},
|
27
|
+
vanContactList: {
|
28
|
+
addText: 'Adicionar novo contato'
|
29
|
+
},
|
30
|
+
vanPagination: {
|
31
|
+
prev: 'Anterior',
|
32
|
+
next: 'Próximo'
|
33
|
+
},
|
34
|
+
vanPullRefresh: {
|
35
|
+
pulling: 'Puxe para atualizar...',
|
36
|
+
loosing: 'Solte para atualizar...'
|
37
|
+
},
|
38
|
+
vanSubmitBar: {
|
39
|
+
label: 'Total:'
|
40
|
+
},
|
41
|
+
vanCoupon: {
|
42
|
+
unlimited: 'Ilimitado',
|
43
|
+
discount: discount => discount * 10 + "% de desconto",
|
44
|
+
condition: condition => "Pelo menos " + condition
|
45
|
+
},
|
46
|
+
vanCouponCell: {
|
47
|
+
title: 'Cupom',
|
48
|
+
count: count => "Voc\xEA possui " + count + " cupom(ns)"
|
49
|
+
},
|
50
|
+
vanCouponList: {
|
51
|
+
exchange: 'Usar',
|
52
|
+
close: 'Fechar',
|
53
|
+
enable: 'Disponível',
|
54
|
+
disabled: 'Indisponível',
|
55
|
+
placeholder: 'Código do cupom'
|
56
|
+
},
|
57
|
+
vanAddressEdit: {
|
58
|
+
area: 'Área',
|
59
|
+
postal: 'CEP',
|
60
|
+
areaEmpty: 'Por favor, selecione uma área de recebimento',
|
61
|
+
addressEmpty: 'Endereço não pode ser vazio',
|
62
|
+
postalEmpty: 'CEP inválido',
|
63
|
+
defaultAddress: 'Usar como endereço padrão'
|
64
|
+
},
|
65
|
+
vanAddressEditDetail: {
|
66
|
+
label: 'Endereço',
|
67
|
+
placeholder: 'Endereço'
|
68
|
+
},
|
69
|
+
vanAddressList: {
|
70
|
+
add: 'Adicionar novo endereço'
|
71
|
+
}
|
72
|
+
};
|
package/es/swipe/index.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
:root{--van-swipe-indicator-size:6px;--van-swipe-indicator-margin:var(--van-padding-sm);--van-swipe-indicator-active-opacity:1;--van-swipe-indicator-inactive-opacity:0.3;--van-swipe-indicator-active-background-color:var(--van-primary-color);--van-swipe-indicator-inactive-background-color:var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100%}.van-swipe__track--vertical{flex-direction:column}.van-swipe__indicators{position:absolute;bottom:var(--van-swipe-indicator-margin);left:50%;display:flex;transform:translateX(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:var(--van-swipe-indicator-margin);flex-direction:column;transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:var(--van-swipe-indicator-size)}.van-swipe__indicator{width:var(--van-swipe-indicator-size);height:var(--van-swipe-indicator-size);background-color:var(--van-swipe-indicator-inactive-background-color);border-radius:100%;opacity:var(--van-swipe-indicator-inactive-opacity);transition:opacity var(--van-animation-duration-fast),background-color var(--van-animation-duration-fast)}.van-swipe__indicator:not(:last-child){margin-right:var(--van-swipe-indicator-size)}.van-swipe__indicator--active{background-color:var(--van-swipe-indicator-active-background-color);opacity:var(--van-swipe-indicator-active-opacity)}
|
1
|
+
:root{--van-swipe-indicator-size:6px;--van-swipe-indicator-margin:var(--van-padding-sm);--van-swipe-indicator-active-opacity:1;--van-swipe-indicator-inactive-opacity:0.3;--van-swipe-indicator-active-background-color:var(--van-primary-color);--van-swipe-indicator-inactive-background-color:var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;transform:translateZ(0);cursor:-webkit-grab;cursor:grab;-webkit-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100%}.van-swipe__track--vertical{flex-direction:column}.van-swipe__indicators{position:absolute;bottom:var(--van-swipe-indicator-margin);left:50%;display:flex;transform:translateX(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:var(--van-swipe-indicator-margin);flex-direction:column;transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:var(--van-swipe-indicator-size)}.van-swipe__indicator{width:var(--van-swipe-indicator-size);height:var(--van-swipe-indicator-size);background-color:var(--van-swipe-indicator-inactive-background-color);border-radius:100%;opacity:var(--van-swipe-indicator-inactive-opacity);transition:opacity var(--van-animation-duration-fast),background-color var(--van-animation-duration-fast)}.van-swipe__indicator:not(:last-child){margin-right:var(--van-swipe-indicator-size)}.van-swipe__indicator--active{background-color:var(--van-swipe-indicator-active-background-color);opacity:var(--van-swipe-indicator-active-opacity)}
|
package/es/swipe/index.less
CHANGED
package/es/uploader/Uploader.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createVNode as _createVNode, mergeProps as _mergeProps, resolveDirective as _resolveDirective } from "vue";
|
2
|
-
import { ref, reactive, defineComponent } from 'vue'; // Utils
|
2
|
+
import { ref, reactive, defineComponent, onBeforeUnmount } from 'vue'; // Utils
|
3
3
|
|
4
4
|
import { pick, extend, isPromise, truthProp, numericProp, getSizeStyle, makeArrayProp, makeStringProp, makeNumericProp } from '../utils';
|
5
5
|
import { bem, name, toArray, isOversize, filterFiles, isImageFile, readFileContent } from './utils'; // Composables
|
@@ -50,6 +50,7 @@ export default defineComponent({
|
|
50
50
|
slots
|
51
51
|
} = _ref;
|
52
52
|
var inputRef = ref();
|
53
|
+
var urls = [];
|
53
54
|
|
54
55
|
var getDetail = function (index) {
|
55
56
|
if (index === void 0) {
|
@@ -182,7 +183,14 @@ export default defineComponent({
|
|
182
183
|
var previewImage = item => {
|
183
184
|
if (props.previewFullImage) {
|
184
185
|
var imageFiles = props.modelValue.filter(isImageFile);
|
185
|
-
var images = imageFiles.map(item =>
|
186
|
+
var images = imageFiles.map(item => {
|
187
|
+
if (item.file && !item.url) {
|
188
|
+
item.url = URL.createObjectURL(item.file);
|
189
|
+
urls.push(item.url);
|
190
|
+
}
|
191
|
+
|
192
|
+
return item.url;
|
193
|
+
}).filter(Boolean);
|
186
194
|
imagePreview = ImagePreview(extend({
|
187
195
|
images,
|
188
196
|
startPosition: imageFiles.indexOf(item),
|
@@ -269,6 +277,9 @@ export default defineComponent({
|
|
269
277
|
}
|
270
278
|
};
|
271
279
|
|
280
|
+
onBeforeUnmount(() => {
|
281
|
+
urls.forEach(url => URL.revokeObjectURL(url));
|
282
|
+
});
|
272
283
|
useExpose({
|
273
284
|
chooseFile,
|
274
285
|
closeImagePreview
|