Merge branch 'dev' into next
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
"author": "chenjiahan",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.13.15",
|
||||
"esbuild": "^0.14.21",
|
||||
"release-it": "^14.2.2",
|
||||
"typescript": "~4.5.2"
|
||||
},
|
||||
|
||||
@@ -47,8 +47,8 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.16.0",
|
||||
"@docsearch/css": "3.0.0-alpha.41",
|
||||
"@docsearch/js": "3.0.0-alpha.41",
|
||||
"@docsearch/css": "3.0.0-alpha.50",
|
||||
"@docsearch/js": "3.0.0-alpha.50",
|
||||
"@types/jest": "^27.0.3",
|
||||
"@vant/eslint-config": "^3.3.2",
|
||||
"@vant/markdown-vetur": "^2.2.0",
|
||||
@@ -62,7 +62,7 @@
|
||||
"commander": "^8.3.0",
|
||||
"consola": "^2.15.3",
|
||||
"conventional-changelog": "^3.1.24",
|
||||
"esbuild": "^0.14.2",
|
||||
"esbuild": "^0.14.21",
|
||||
"eslint": "^8.1.0",
|
||||
"execa": "^5.1.1",
|
||||
"fast-glob": "^3.2.7",
|
||||
@@ -86,7 +86,7 @@
|
||||
"stylelint": "^13.0.0",
|
||||
"transliteration": "^2.2.0",
|
||||
"typescript": "^4.5.2",
|
||||
"vite": "^2.7.10",
|
||||
"vite": "^2.8.0",
|
||||
"vite-plugin-html": "^2.1.1",
|
||||
"vite-plugin-md": "^0.11.4",
|
||||
"vue-router": "^4.0.12"
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
"@popperjs/core": "^2.9.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.13.15",
|
||||
"esbuild": "^0.14.21",
|
||||
"release-it": "^14.2.2",
|
||||
"typescript": "~4.5.2"
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"author": "chenjiahan",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.13.15",
|
||||
"esbuild": "^0.14.21",
|
||||
"release-it": "^14.0.2",
|
||||
"typescript": "~4.5.2",
|
||||
"vue": "^3.2.27"
|
||||
|
||||
@@ -16,6 +16,30 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).
|
||||
|
||||
## Details
|
||||
|
||||
### [v3.4.5](https://github.com/compare/v3.4.3...v3.4.5)
|
||||
|
||||
`2022-02-14`
|
||||
|
||||
**Feature**
|
||||
|
||||
- CollapseItem: add lazy-render prop [#10270](https://github.com/issues/10270)
|
||||
- Dialog: support enter/esc keyboard event [#10261](https://github.com/issues/10261)
|
||||
- Locale: add Bangla (Bangladesh) [#10287](https://github.com/issues/10287)
|
||||
- Locale: add Indonesian translation [#10289](https://github.com/issues/10289)
|
||||
- Locale: add Italian translation [#10288](https://github.com/issues/10288)
|
||||
- Locale: add Ukrainian translation [#10291](https://github.com/issues/10291)
|
||||
- Locale: add Vietnamese translation [#10294](https://github.com/issues/10294)
|
||||
|
||||
**style**
|
||||
|
||||
- SubmitBar: using english colon [#10286](https://github.com/issues/10286)
|
||||
|
||||
**Types**
|
||||
|
||||
- IndexBar: index-list prop can includes number [#10273](https://github.com/issues/10273)
|
||||
- Toast: fix missing teleport prop [#10272](https://github.com/issues/10272)
|
||||
- Uploader: fix UploaderBeforeRead type [#10274](https://github.com/issues/10274)
|
||||
|
||||
### [v3.4.4](https://github.com/youzan/vant/compare/v3.4.4...v3.4.3)
|
||||
|
||||
`2022-02-07`
|
||||
|
||||
@@ -16,6 +16,30 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。
|
||||
|
||||
## 更新内容
|
||||
|
||||
### [v3.4.5](https://github.com/compare/v3.4.3...v3.4.5)
|
||||
|
||||
`2022-02-14`
|
||||
|
||||
**Feature**
|
||||
|
||||
- CollapseItem: 新增 lazy-render 属性 [#10270](https://github.com/issues/10270)
|
||||
- Dialog: 支持通过 enter/esc 进行键盘操作 [#10261](https://github.com/issues/10261)
|
||||
- Locale: 新增 Bangla 孟加拉语 [#10287](https://github.com/issues/10287)
|
||||
- Locale: 新增 Indonesian 印度尼西亚语 [#10289](https://github.com/issues/10289)
|
||||
- Locale: 新增 Italian 意大利语 [#10288](https://github.com/issues/10288)
|
||||
- Locale: 新增 Ukrainian 乌克兰语 [#10291](https://github.com/issues/10291)
|
||||
- Locale: 新增 Vietnamese 越南语 [#10294](https://github.com/issues/10294)
|
||||
|
||||
**style**
|
||||
|
||||
- SubmitBar: 将冒号调整为英文冒号 [#10286](https://github.com/issues/10286)
|
||||
|
||||
**Types**
|
||||
|
||||
- IndexBar: 修复 index-list 属性无法传入 number 类型的问题 [#10273](https://github.com/issues/10273)
|
||||
- Toast: 修复缺少 teleport 属性定义的问题 [#10272](https://github.com/issues/10272)
|
||||
- Uploader: 修复 UploaderBeforeRead 类型定义不准确的问题 [#10274](https://github.com/issues/10274)
|
||||
|
||||
### [v3.4.4](https://github.com/youzan/vant/compare/v3.4.4...v3.4.3)
|
||||
|
||||
`2022-02-07`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vant",
|
||||
"version": "3.4.4",
|
||||
"version": "3.4.5",
|
||||
"description": "Mobile UI Components built on Vue",
|
||||
"main": "lib/vant.cjs.js",
|
||||
"module": "es/index.js",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
withKeys,
|
||||
defineComponent,
|
||||
type PropType,
|
||||
type ExtractPropTypes,
|
||||
@@ -7,6 +9,7 @@ import {
|
||||
|
||||
// Utils
|
||||
import {
|
||||
noop,
|
||||
pick,
|
||||
extend,
|
||||
addUnit,
|
||||
@@ -19,6 +22,7 @@ import {
|
||||
makeStringProp,
|
||||
callInterceptor,
|
||||
createNamespace,
|
||||
type ComponentInstance,
|
||||
} from '../utils';
|
||||
import { popupSharedProps, popupSharedPropKeys } from '../popup/shared';
|
||||
|
||||
@@ -71,9 +75,10 @@ export default defineComponent({
|
||||
|
||||
props: dialogProps,
|
||||
|
||||
emits: ['confirm', 'cancel', 'update:show'],
|
||||
emits: ['confirm', 'cancel', 'keydown', 'update:show'],
|
||||
|
||||
setup(props, { emit, slots }) {
|
||||
const root = ref<ComponentInstance>();
|
||||
const loading = reactive({
|
||||
confirm: false,
|
||||
cancel: false,
|
||||
@@ -113,6 +118,23 @@ export default defineComponent({
|
||||
|
||||
const onCancel = getActionHandler('cancel');
|
||||
const onConfirm = getActionHandler('confirm');
|
||||
const onKeydown = withKeys(
|
||||
(event: KeyboardEvent) => {
|
||||
// skip keyboard events of child elements
|
||||
if (event.target !== root.value?.popupRef?.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
const onEventType: Record<string, () => void> = {
|
||||
Enter: props.showConfirmButton ? onConfirm : noop,
|
||||
Escape: props.showCancelButton ? onCancel : noop,
|
||||
};
|
||||
|
||||
onEventType[event.key]();
|
||||
emit('keydown', event);
|
||||
},
|
||||
['enter', 'esc']
|
||||
);
|
||||
|
||||
const renderTitle = () => {
|
||||
const title = slots.title ? slots.title() : props.title;
|
||||
@@ -229,10 +251,13 @@ export default defineComponent({
|
||||
const { width, title, theme, message, className } = props;
|
||||
return (
|
||||
<Popup
|
||||
ref={root}
|
||||
role="dialog"
|
||||
class={[bem([theme]), className]}
|
||||
style={{ width: addUnit(width) }}
|
||||
tabindex={0}
|
||||
aria-labelledby={title || message}
|
||||
onKeydown={onKeydown}
|
||||
onUpdate:show={updateShow}
|
||||
{...pick(props, popupInheritKeys)}
|
||||
>
|
||||
|
||||
@@ -97,6 +97,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<transition-stub>
|
||||
<div class="van-popup van-popup--center van-dialog"
|
||||
role="dialog"
|
||||
tabindex="0"
|
||||
aria-labelledby="Title"
|
||||
style="display: none;"
|
||||
>
|
||||
|
||||
@@ -32,6 +32,7 @@ exports[`should render default slot correctly 1`] = `
|
||||
exports[`should render footer slot correctly 1`] = `
|
||||
<div class="van-popup van-popup--center van-dialog"
|
||||
role="dialog"
|
||||
tabindex="0"
|
||||
aria-labelledby="message"
|
||||
>
|
||||
<div class="van-dialog__content van-dialog__content--isolated">
|
||||
|
||||
@@ -39,25 +39,30 @@ Locale.add(messages);
|
||||
|
||||
Current supported languages:
|
||||
|
||||
| Language | Filename |
|
||||
| ------------------------ | ------------ |
|
||||
| German | de-DE |
|
||||
| German (formal) | de-DE-formal |
|
||||
| English | en-US |
|
||||
| Spanish (Spain) | es-ES |
|
||||
| French | fr-FR |
|
||||
| Hindi | hi-IN |
|
||||
| Japanese | ja-JP |
|
||||
| Korean | ko-KR |
|
||||
| Norwegian | nb-NO |
|
||||
| Portuguese (Brazil) | pt-BR |
|
||||
| Romanian | ro-RO |
|
||||
| Russian | ru-RU |
|
||||
| Turkish | tr-TR |
|
||||
| Thai | th-TH |
|
||||
| Chinese | zh-CN |
|
||||
| Traditional Chinese (HK) | zh-HK |
|
||||
| Traditional Chinese (TW) | zh-TW |
|
||||
| Language | Filename | Version |
|
||||
| ------------------------ | ------------ | -------- |
|
||||
| Bangla (Bangladesh) | bn-BD | `v3.4.5` |
|
||||
| German | de-DE | - |
|
||||
| German (formal) | de-DE-formal | - |
|
||||
| English | en-US | - |
|
||||
| Spanish (Spain) | es-ES | - |
|
||||
| French | fr-FR | - |
|
||||
| Hindi | hi-IN | `v3.4.3` |
|
||||
| Indonesian | id-ID | `v3.4.5` |
|
||||
| Italian | it-IT | `v3.4.5` |
|
||||
| Japanese | ja-JP | - |
|
||||
| Korean | ko-KR | `v3.4.3` |
|
||||
| Norwegian | nb-NO | - |
|
||||
| Portuguese (Brazil) | pt-BR | `v3.3.3` |
|
||||
| Romanian | ro-RO | - |
|
||||
| Russian | ru-RU | `v3.1.5` |
|
||||
| Turkish | tr-TR | - |
|
||||
| Thai | th-TH | - |
|
||||
| Ukrainian | uk-UA | `v3.4.5` |
|
||||
| Vietnamese | vi-VN | `v3.4.5` |
|
||||
| Chinese | zh-CN | - |
|
||||
| Traditional Chinese (HK) | zh-HK | - |
|
||||
| Traditional Chinese (TW) | zh-TW | - |
|
||||
|
||||
> View all language configs [Here](https://github.com/youzan/vant/tree/dev/packages/vant/src/locale/lang).
|
||||
|
||||
|
||||
@@ -40,25 +40,30 @@ Locale.add(messages);
|
||||
|
||||
目前支持的语言:
|
||||
|
||||
| 语言 | 文件名 |
|
||||
| --------------- | ------------ |
|
||||
| 德语 | de-DE |
|
||||
| 德语 (正式) | de-DE-formal |
|
||||
| 英语 | en-US |
|
||||
| 西班牙语 | es-ES |
|
||||
| 法语 | fr-FR |
|
||||
| 印地语 | hi-IN |
|
||||
| 日语 | ja-JP |
|
||||
| 韩语/朝鲜语 | ko-KR.ts |
|
||||
| 挪威语 | nb-NO |
|
||||
| 葡萄牙语 (巴西) | pt-BR |
|
||||
| 罗马尼亚语 | ro-RO |
|
||||
| 俄罗斯语 | ru-RU |
|
||||
| 土耳其语 | tr-TR |
|
||||
| 泰语 | th-TH |
|
||||
| 简体中文 | zh-CN |
|
||||
| 繁體中文(港) | zh-HK |
|
||||
| 繁體中文(台) | zh-TW |
|
||||
| 语言 | 文件名 | 版本 |
|
||||
| -------------------- | ------------ | -------- |
|
||||
| 孟加拉语(孟加拉国) | bn-BD | `v3.4.5` |
|
||||
| 德语 | de-DE | - |
|
||||
| 德语(正式) | de-DE-formal | - |
|
||||
| 英语 | en-US | - |
|
||||
| 西班牙语 | es-ES | - |
|
||||
| 法语 | fr-FR | - |
|
||||
| 印地语 | hi-IN | `v3.4.3` |
|
||||
| 印度尼西亚语 | id-ID | `v3.4.5` |
|
||||
| 意大利语 | it-IT | `v3.4.5` |
|
||||
| 日语 | ja-JP | - |
|
||||
| 韩语/朝鲜语 | ko-KR | `v3.4.3` |
|
||||
| 挪威语 | nb-NO | - |
|
||||
| 葡萄牙语(巴西) | pt-BR | `v3.3.3` |
|
||||
| 罗马尼亚语 | ro-RO | - |
|
||||
| 俄罗斯语 | ru-RU | `v3.1.5` |
|
||||
| 土耳其语 | tr-TR | - |
|
||||
| 泰语 | th-TH | - |
|
||||
| 乌克兰语 | uk-UA | `v3.4.5` |
|
||||
| 越南语 | vi-VN | `v3.4.5` |
|
||||
| 简体中文 | zh-CN | - |
|
||||
| 繁體中文(港) | zh-HK | - |
|
||||
| 繁體中文(台) | zh-TW | - |
|
||||
|
||||
> 在 [这里](https://github.com/youzan/vant/tree/dev/packages/vant/src/locale/lang) 查看所有的语言包源文件。
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
export default {
|
||||
name: 'নাম',
|
||||
tel: 'ফোন',
|
||||
save: 'সংরক্ষণ করুন',
|
||||
confirm: 'নিশ্চিত করুন',
|
||||
cancel: 'বাতিল',
|
||||
delete: 'মুছুন',
|
||||
loading: 'লোড হচ্ছে...',
|
||||
noCoupon: 'কোন কুপন নেই',
|
||||
nameEmpty: 'অনুগ্রহ করে নামটি পূরণ করুন',
|
||||
addContact: 'যোগাযোগ যোগ করুন',
|
||||
telInvalid: 'বিকৃত ফোন নম্বর',
|
||||
vanCalendar: {
|
||||
end: 'শেষ',
|
||||
start: 'শুরু',
|
||||
title: 'ক্যালেন্ডার',
|
||||
weekdays: [
|
||||
'রবিবার',
|
||||
'সোমবার',
|
||||
'মঙ্গলবার',
|
||||
'বুধবার',
|
||||
'বৃহস্পতিবার',
|
||||
'শুক্রবার',
|
||||
'শনিবার',
|
||||
],
|
||||
monthTitle: (year: number, month: number) => `${year}/${month}`,
|
||||
rangePrompt: (maxRange: number) =>
|
||||
`${maxRange} দিনের বেশি নির্বাচন করবেন না`,
|
||||
},
|
||||
vanCascader: {
|
||||
select: 'নির্বাচন',
|
||||
},
|
||||
vanPagination: {
|
||||
prev: 'পূর্ববর্তী',
|
||||
next: 'পরবর্তী',
|
||||
},
|
||||
vanPullRefresh: {
|
||||
pulling: 'রিফ্রেশ করতে টানুন...',
|
||||
loosing: 'রিফ্রেশ করতে আলগা...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'মোট:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'আনলিমিটেড',
|
||||
discount: (discount: number) => `${discount * 10}% ছাড়`,
|
||||
condition: (condition: number) => `অন্তত ${condition}`,
|
||||
},
|
||||
vanCouponCell: {
|
||||
title: 'কুপন',
|
||||
count: (count: number) => `আপনার ${count} কুপন আছে`,
|
||||
},
|
||||
vanCouponList: {
|
||||
exchange: 'বিনিময়',
|
||||
close: 'বন্ধ',
|
||||
enable: 'উপলভ্য',
|
||||
disabled: 'অনুপলব্ধ',
|
||||
placeholder: 'কুপন কোড',
|
||||
},
|
||||
vanAddressEdit: {
|
||||
area: 'এরিয়া',
|
||||
postal: 'ডাক',
|
||||
areaEmpty: 'অনুগ্রহ করে একটি রিসিভিং এলাকা নির্বাচন করুন',
|
||||
addressEmpty: 'ঠিকানা খালি হতে পারে না',
|
||||
postalEmpty: 'ভুল পোস্টাল কোড',
|
||||
addressDetail: 'ঠিকানা',
|
||||
defaultAddress: 'ডিফল্ট ঠিকানা হিসাবে সেট করুন',
|
||||
},
|
||||
vanAddressList: {
|
||||
add: 'নতুন ঠিকানা যোগ করুন',
|
||||
},
|
||||
};
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Loslassen zum Aktualisieren...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Unbegrenzt',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Loslassen zum Aktualisieren...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Unbegrenzt',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Loose to refresh...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Unlimited',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Suelta para recargar...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Ilimitado',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Relâchez pour actualiser...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Illimité',
|
||||
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
loosing: 'ताज़ा करने के लिए ढीला...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'कुल:',
|
||||
label: 'कुल:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'असीमित',
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
export default {
|
||||
name: 'Nama',
|
||||
tel: 'Telepon',
|
||||
save: 'Simpan',
|
||||
confirm: 'Konfirmasi',
|
||||
cancel: 'Batal',
|
||||
delete: 'Hapus',
|
||||
loading: 'Memuat...',
|
||||
noCoupon: 'Tidak ada kupon',
|
||||
nameEmpty: 'Silakan isi nama',
|
||||
addContact: 'Tambahkan kontak',
|
||||
telInvalid: 'Nomor telepon salah format',
|
||||
vanCalendar: {
|
||||
end: 'Akhir',
|
||||
start: 'Mulai',
|
||||
title: 'Kalender',
|
||||
weekdays: ['minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'],
|
||||
monthTitle: (year: number, month: number) => `${year}/${month}`,
|
||||
rangePrompt: (maxRange: number) =>
|
||||
`Pilih tidak lebih dari ${maxRange} hari`,
|
||||
},
|
||||
vanCascader: {
|
||||
select: 'Pilih',
|
||||
},
|
||||
vanPagination: {
|
||||
prev: 'Sebelumnya',
|
||||
next: 'Selanjutnya',
|
||||
},
|
||||
vanPullRefresh: {
|
||||
pulling: 'Tarik untuk menyegarkan...',
|
||||
loosing: 'Loose untuk menyegarkan...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Jumlah:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Tidak terbatas',
|
||||
discount: (discount: number) => `${discount * 10}% off`,
|
||||
condition: (condition: number) => `Setidaknya ${condition}`,
|
||||
},
|
||||
vanCouponCell: {
|
||||
title: 'Kupon',
|
||||
count: (count: number) => `Anda memiliki kupon ${count}`,
|
||||
},
|
||||
vanCouponList: {
|
||||
exchange: 'Pertukaran',
|
||||
close: 'Tutup',
|
||||
enable: 'Tersedia',
|
||||
disabled: 'Tidak tersedia',
|
||||
placeholder: 'Kode kupon',
|
||||
},
|
||||
vanAddressEdit: {
|
||||
area: 'Daerah',
|
||||
postal: 'pos',
|
||||
areaEmpty: 'Silakan pilih area penerima',
|
||||
addressEmpty: 'Alamat tidak boleh kosong',
|
||||
postalEmpty: 'Kode pos salah',
|
||||
addressDetail: 'Alamat',
|
||||
defaultAddress: 'Tetapkan sebagai alamat default',
|
||||
},
|
||||
vanAddressList: {
|
||||
add: 'Tambahkan alamat baru',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
export default {
|
||||
name: 'Nome',
|
||||
tel: 'Telefono',
|
||||
save: 'Salva',
|
||||
confirm: 'Conferma',
|
||||
cancel: 'Annulla',
|
||||
delete: 'Elimina',
|
||||
loading: 'Caricamento in corso...',
|
||||
noCoupon: 'Nessun coupon',
|
||||
nameEmpty: 'Inserisci il nome',
|
||||
addContact: 'Aggiungi contatto',
|
||||
telInvalid: 'Numero di telefono errato',
|
||||
vanCalendar: {
|
||||
end: 'Fine',
|
||||
start: 'Inizio',
|
||||
title: 'Calendario',
|
||||
weekdays: [
|
||||
'domenica',
|
||||
'Lunedi',
|
||||
'Martedì',
|
||||
'mercoledì',
|
||||
'giovedì',
|
||||
'venerdì',
|
||||
'Sabato',
|
||||
],
|
||||
monthTitle: (year: number, month: number) => `${year}/${month}`,
|
||||
rangePrompt: (maxRange: number) => `Scegli non più di ${maxRange} giorni`,
|
||||
},
|
||||
vanCascader: {
|
||||
select: 'Seleziona',
|
||||
},
|
||||
vanPagination: {
|
||||
prev: 'Precedente',
|
||||
next: 'Avanti',
|
||||
},
|
||||
vanPullRefresh: {
|
||||
pulling: 'Tiri per aggiornare...',
|
||||
loosing: 'Largo per rinfrescare...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Totale:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Illimitato',
|
||||
discount: (discount: number) => `${discount * 10}% di sconto`,
|
||||
condition: (condition: number) => `Almeno ${condition}`,
|
||||
},
|
||||
vanCouponCell: {
|
||||
title: 'Buono',
|
||||
count: (count: number) => `Hai ${count} coupon`,
|
||||
},
|
||||
vanCouponList: {
|
||||
exchange: 'Scambio',
|
||||
close: 'Chiudi',
|
||||
enable: 'Disponibile',
|
||||
disabled: 'Non disponibile',
|
||||
placeholder: 'Codice coupon',
|
||||
},
|
||||
vanAddressEdit: {
|
||||
area: 'Area',
|
||||
postal: 'Postale',
|
||||
areaEmpty: "Seleziona un'area di ricezione",
|
||||
addressEmpty: "L'indirizzo non può essere vuoto",
|
||||
postalEmpty: 'Codice postale errato',
|
||||
addressDetail: 'Indirizzo',
|
||||
defaultAddress: 'Imposta come indirizzo predefinito',
|
||||
},
|
||||
vanAddressList: {
|
||||
add: 'Aggiungi nuovo indirizzo',
|
||||
},
|
||||
};
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'リリース時に更新...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: '合計:',
|
||||
label: '合計:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: '無制限',
|
||||
|
||||
@@ -38,7 +38,7 @@ export default {
|
||||
loosing: '새로 고침...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: '총:',
|
||||
label: '총:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: '제한 없는',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Mist for oppdatering...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Totalt:',
|
||||
label: 'Totalt:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Uendelig',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Solte para atualizar...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Ilimitado',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Eliberează pentru a împrospăta...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Total:',
|
||||
label: 'Total:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Nelimitat',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: 'Отпустите для обновления...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Всего:',
|
||||
label: 'Всего:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Безлимитный',
|
||||
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
loosing: 'ปล่อยเพื่อรีเฟรช...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'รวม:',
|
||||
label: 'รวม:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'ไม่ จำกัด',
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
export default {
|
||||
name: "Ім'я",
|
||||
tel: 'Телефон',
|
||||
save: 'Зберегти',
|
||||
confirm: 'підтвердити',
|
||||
cancel: 'Скасувати',
|
||||
delete: 'Видалити',
|
||||
loading: 'Завантаження...',
|
||||
noCoupon: 'Без купонів',
|
||||
nameEmpty: "Будь ласка, введіть ім'я",
|
||||
addContact: 'Додати контакт',
|
||||
telInvalid: 'Неправильний номер телефону',
|
||||
vanCalendar: {
|
||||
end: 'Кінець',
|
||||
start: 'Почати',
|
||||
title: 'Календар',
|
||||
weekdays: [
|
||||
'неділя',
|
||||
'понеділок',
|
||||
'вівторок',
|
||||
'середа',
|
||||
'четвер',
|
||||
"п'ятниця",
|
||||
'субота',
|
||||
],
|
||||
monthTitle: (year: number, month: number) => `${year}/${month}`,
|
||||
rangePrompt: (maxRange: number) =>
|
||||
`Виберіть не більше ніж ${maxRange} днів`,
|
||||
},
|
||||
vanCascader: {
|
||||
select: 'Вибрати',
|
||||
},
|
||||
vanPagination: {
|
||||
prev: 'Попередній',
|
||||
next: 'Далі',
|
||||
},
|
||||
vanPullRefresh: {
|
||||
pulling: 'Потягніть, щоб оновити...',
|
||||
loosing: 'Погано оновити...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Усього:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Необмежено',
|
||||
discount: (discount: number) => `${discount * 10}% off`,
|
||||
condition: (condition: number) => `Принаймні ${condition}`,
|
||||
},
|
||||
vanCouponCell: {
|
||||
title: 'Купон',
|
||||
count: (count: number) => `У вас є ${count} купонів`,
|
||||
},
|
||||
vanCouponList: {
|
||||
exchange: 'Обмін',
|
||||
close: 'Закрити',
|
||||
enable: 'Доступно',
|
||||
disabled: 'Недоступно',
|
||||
placeholder: 'Код купона',
|
||||
},
|
||||
vanAddressEdit: {
|
||||
area: 'Область',
|
||||
postal: 'Поштовий',
|
||||
areaEmpty: 'Будь ласка, виберіть зону прийому',
|
||||
addressEmpty: 'Адреса не може бути порожньою',
|
||||
postalEmpty: 'Неправильний поштовий індекс',
|
||||
addressDetail: 'Адреса',
|
||||
defaultAddress: 'Встановити як адресу за замовчуванням',
|
||||
},
|
||||
vanAddressList: {
|
||||
add: 'Додати нову адресу',
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,71 @@
|
||||
export default {
|
||||
name: 'tên',
|
||||
tel: 'Điện thoại',
|
||||
save: 'Cứu',
|
||||
confirm: 'Xác nhận',
|
||||
cancel: 'Hủy bỏ',
|
||||
delete: 'Xóa',
|
||||
loading: 'Đang tải ...',
|
||||
noCoupon: 'Không có phiếu giảm giá',
|
||||
nameEmpty: 'Vui lòng điền vào tên',
|
||||
addContact: 'Thêm liên hệ',
|
||||
telInvalid: 'Số điện thoại không đúng định dạng',
|
||||
vanCalendar: {
|
||||
end: 'Kết thúc',
|
||||
start: 'Bắt đầu',
|
||||
title: 'Lịch',
|
||||
weekdays: [
|
||||
'chủ nhật',
|
||||
'thứ hai',
|
||||
'thứ ba',
|
||||
'Thứ Tư',
|
||||
'Thứ năm',
|
||||
'Thứ sáu',
|
||||
'thứ bảy',
|
||||
],
|
||||
monthTitle: (year: number, month: number) => `${year}/${month}`,
|
||||
rangePrompt: (maxRange: number) => `Chọn không quá ${maxRange} ngày`,
|
||||
},
|
||||
vanCascader: {
|
||||
select: 'Chọn',
|
||||
},
|
||||
vanPagination: {
|
||||
prev: 'Trước đó',
|
||||
next: 'Tiếp theo',
|
||||
},
|
||||
vanPullRefresh: {
|
||||
pulling: 'Kéo để làm mới ...',
|
||||
loosing: 'Loose để làm mới ...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: 'Tổng:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: 'Không giới hạn',
|
||||
discount: (discount: number) => `Chiết khấu ${discount * 10}%`,
|
||||
condition: (condition: number) => `Ít nhất ${condition}`,
|
||||
},
|
||||
vanCouponCell: {
|
||||
title: 'Phiếu giảm giá',
|
||||
count: (count: number) => `Bạn có ${count} phiếu giảm giá`,
|
||||
},
|
||||
vanCouponList: {
|
||||
exchange: 'Trao đổi',
|
||||
close: 'Đóng',
|
||||
enable: 'Có sẵn',
|
||||
disabled: 'Không khả dụng',
|
||||
placeholder: 'Mã phiếu thưởng',
|
||||
},
|
||||
vanAddressEdit: {
|
||||
area: 'Khu vực',
|
||||
postal: 'Bưu điện',
|
||||
areaEmpty: 'Vui lòng chọn khu vực nhận hàng',
|
||||
addressEmpty: 'Địa chỉ không được để trống',
|
||||
postalEmpty: 'Mã bưu chính sai',
|
||||
addressDetail: 'Địa chỉ',
|
||||
defaultAddress: 'Đặt làm địa chỉ mặc định',
|
||||
},
|
||||
vanAddressList: {
|
||||
add: 'Thêm địa chỉ mới',
|
||||
},
|
||||
};
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: '释放即可刷新...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: '合计:',
|
||||
label: '合计:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: '无门槛',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: '釋放即可刷新...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: '合計:',
|
||||
label: '合計:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: '無門檻',
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
loosing: '釋放即可刷新...',
|
||||
},
|
||||
vanSubmitBar: {
|
||||
label: '合計:',
|
||||
label: '合計:',
|
||||
},
|
||||
vanCoupon: {
|
||||
unlimited: '無門檻',
|
||||
|
||||
@@ -3,6 +3,7 @@ import {
|
||||
watch,
|
||||
provide,
|
||||
Teleport,
|
||||
nextTick,
|
||||
computed,
|
||||
onMounted,
|
||||
Transition,
|
||||
@@ -68,6 +69,7 @@ export default defineComponent({
|
||||
'close',
|
||||
'opened',
|
||||
'closed',
|
||||
'keydown',
|
||||
'update:show',
|
||||
'clickOverlay',
|
||||
'clickCloseIcon',
|
||||
@@ -172,9 +174,11 @@ export default defineComponent({
|
||||
|
||||
const onOpened = () => emit('opened');
|
||||
const onClosed = () => emit('closed');
|
||||
const onKeydown = (event: KeyboardEvent) => emit('keydown', event);
|
||||
|
||||
const renderPopup = lazyRender(() => {
|
||||
const { round, position, safeAreaInsetBottom } = props;
|
||||
|
||||
return (
|
||||
<div
|
||||
v-show={props.show}
|
||||
@@ -187,6 +191,7 @@ export default defineComponent({
|
||||
}),
|
||||
{ 'van-safe-area-bottom': safeAreaInsetBottom },
|
||||
]}
|
||||
onKeydown={onKeydown}
|
||||
{...attrs}
|
||||
>
|
||||
{slots.default?.()}
|
||||
@@ -216,6 +221,12 @@ export default defineComponent({
|
||||
(show) => {
|
||||
if (show && !opened) {
|
||||
open();
|
||||
|
||||
if (attrs.tabindex === 0) {
|
||||
nextTick(() => {
|
||||
popupRef.value?.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
if (!show && opened) {
|
||||
opened = false;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ComponentPublicInstance } from 'vue';
|
||||
import type { Ref, ComponentPublicInstance } from 'vue';
|
||||
import type { PopupProps } from './Popup';
|
||||
|
||||
export type PopupPosition = 'top' | 'left' | 'bottom' | 'right' | 'center' | '';
|
||||
@@ -9,4 +9,8 @@ export type PopupCloseIconPosition =
|
||||
| 'bottom-left'
|
||||
| 'bottom-right';
|
||||
|
||||
export type PopupInstance = ComponentPublicInstance<PopupProps>;
|
||||
export type PopupExpose = {
|
||||
popupRef: Ref<HTMLElement>;
|
||||
};
|
||||
|
||||
export type PopupInstance = ComponentPublicInstance<PopupProps, PopupExpose>;
|
||||
|
||||
@@ -76,6 +76,7 @@ body {
|
||||
color: var(--van-submit-bar-price-color);
|
||||
font-weight: var(--van-font-bold);
|
||||
font-size: var(--van-submit-bar-price-font-size);
|
||||
margin-left: var(--van-padding-base);
|
||||
|
||||
&-integer {
|
||||
font-size: var(--van-submit-bar-price-integer-font-size);
|
||||
|
||||
@@ -6,7 +6,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-submit-bar__bar">
|
||||
<div class="van-submit-bar__text">
|
||||
<span>
|
||||
Total:
|
||||
Total:
|
||||
</span>
|
||||
<span class="van-submit-bar__price">
|
||||
¥
|
||||
@@ -40,7 +40,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-submit-bar__bar">
|
||||
<div class="van-submit-bar__text">
|
||||
<span>
|
||||
Total:
|
||||
Total:
|
||||
</span>
|
||||
<span class="van-submit-bar__price">
|
||||
¥
|
||||
@@ -68,7 +68,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-submit-bar__bar">
|
||||
<div class="van-submit-bar__text">
|
||||
<span>
|
||||
Total:
|
||||
Total:
|
||||
</span>
|
||||
<span class="van-submit-bar__price">
|
||||
¥
|
||||
@@ -125,7 +125,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</div>
|
||||
<div class="van-submit-bar__text">
|
||||
<span>
|
||||
Total:
|
||||
Total:
|
||||
</span>
|
||||
<span class="van-submit-bar__price">
|
||||
¥
|
||||
|
||||
Reference in New Issue
Block a user