chore(Signature): improve clear button text (#11807)

This commit is contained in:
neverland 2023-05-02 22:08:26 +08:00 committed by GitHub
parent 0f47224b46
commit 12c3570e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
45 changed files with 94 additions and 77 deletions

View File

@ -68,8 +68,8 @@ Current supported languages:
| Romanian | ro-RO | - |
| Russian | ru-RU | `v3.1.5` |
| Swedish | sv-SE | `v3.4.7` |
| Turkish | tr-TR | - |
| Thai | th-TH | - |
| Turkish | tr-TR | - |
| Ukrainian | uk-UA | `v3.4.5` |
| Vietnamese | vi-VN | `v3.4.5` |
| Chinese | zh-CN | - |

View File

@ -69,8 +69,8 @@ Locale.add(messages);
| 罗马尼亚语 | ro-RO | - |
| 俄罗斯语 | ru-RU | `v3.1.5` |
| 瑞典语 | sv-SE | `v3.4.7` |
| 土耳其语 | tr-TR | - |
| 泰语 | th-TH | - |
| 土耳其语 | tr-TR | - |
| 乌克兰语 | uk-UA | `v3.4.5` |
| 越南语 | vi-VN | `v3.4.5` |
| 简体中文 | zh-CN | - |

View File

@ -2,8 +2,9 @@ export default {
name: 'Име',
tel: 'Телефон',
save: 'Запазване',
confirm: 'Потвърди',
clear: 'ясно',
cancel: 'Отказ',
confirm: 'Потвърди',
delete: 'Изтриване',
loading: 'Зареждане...',
noCoupon: 'Без купони',

View File

@ -2,8 +2,9 @@ export default {
name: 'নাম',
tel: 'ফোন',
save: 'সংরক্ষণ করুন',
confirm: 'নিশ্চিত করুন',
clear: 'পরিষ্কার',
cancel: 'বাতিল',
confirm: 'নিশ্চিত করুন',
delete: 'মুছুন',
loading: 'লোড হচ্ছে...',
noCoupon: 'কোন কুপন নেই',

View File

@ -2,8 +2,9 @@ export default {
name: 'navn',
tel: 'Telefon',
save: 'Gem',
confirm: 'Bekræft',
clear: 'Klar',
cancel: 'Annuller',
confirm: 'Bekræft',
delete: 'Slet',
loading: 'Indlæser...',
noCoupon: 'Ingen kuponer',

View File

@ -2,8 +2,9 @@ export default {
name: 'Name',
tel: 'Telefon',
save: 'Speichern',
confirm: 'Bestätigen',
clear: 'Klar',
cancel: 'Abbrechen',
confirm: 'Bestätigen',
delete: 'Löschen',
loading: 'Laden...',
noCoupon: 'Keine Coupons',

View File

@ -2,8 +2,9 @@ export default {
name: 'Name',
tel: 'Telefon',
save: 'Speichern',
confirm: 'Bestätigen',
clear: 'Klar',
cancel: 'Abbrechen',
confirm: 'Bestätigen',
delete: 'Löschen',
loading: 'Laden...',
noCoupon: 'Keine Coupons',

View File

@ -2,8 +2,9 @@ export default {
name: 'Όνομα',
tel: 'Τηλέφωνο',
save: 'Αποθήκευση',
confirm: 'Επιβεβαίωση',
clear: 'Σαφή',
cancel: 'Ακύρωση',
confirm: 'Επιβεβαίωση',
delete: 'Διαγραφή',
loading: 'Φόρτωση...',
noCoupon: 'Χωρίς κουπόνια',

View File

@ -2,8 +2,9 @@ export default {
name: 'Name',
tel: 'Phone',
save: 'Save',
confirm: 'Confirm',
clear: 'Clear',
cancel: 'Cancel',
confirm: 'Confirm',
delete: 'Delete',
loading: 'Loading...',
noCoupon: 'No coupons',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nomo',
tel: 'Telefonnumero',
save: 'Konservi',
confirm: 'Konfirmi',
clear: 'Klara',
cancel: 'Rezigni',
confirm: 'Konfirmi',
delete: 'Forigi',
loading: 'Bonvolu atendi...',
noCoupon: 'Neniu kupono',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nombre',
tel: 'Teléfono',
save: 'Guardar',
confirm: 'Confirmar',
clear: 'Claro',
cancel: 'Cancelar',
confirm: 'Confirmar',
delete: 'Eliminar',
loading: 'Cargando...',
noCoupon: 'Sin cupones',

View File

@ -2,8 +2,9 @@ export default {
name: 'نام',
tel: 'تلفن',
save: 'ذخیره',
confirm: 'تایید',
clear: 'پاک کردن',
cancel: 'انصراف',
confirm: 'تایید',
delete: 'حذف',
loading: 'در حال بارگزاری ...',
noCoupon: 'بدون کوپن',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nom',
tel: 'Telephone',
save: 'Sauvegarder',
confirm: 'Confirmer',
clear: 'Clair',
cancel: 'Annuler',
confirm: 'Confirmer',
delete: 'Suprimer',
loading: 'Chargement...',
noCoupon: 'Pas de coupons',

View File

@ -2,8 +2,9 @@ export default {
name: 'שם',
tel: 'טלפון',
save: 'שמור',
confirm: 'אישור',
clear: 'ברור',
cancel: 'ביטול',
confirm: 'אישור',
delete: 'מחיקה',
loading: 'טוען...',
noCoupon: 'אין קופונים',

View File

@ -2,8 +2,9 @@ export default {
name: 'नाम',
tel: 'फ़ोन',
save: 'सहेजें',
confirm: 'पुष्टि करना',
clear: 'साफ़',
cancel: 'रद्द करें',
confirm: 'पुष्टि करना',
delete: 'हटाएं',
loading: 'लोड हो रहा है...',
noCoupon: 'कोई कूपन नहीं',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nama',
tel: 'Telepon',
save: 'Simpan',
confirm: 'Konfirmasi',
clear: 'Jernih',
cancel: 'Batal',
confirm: 'Konfirmasi',
delete: 'Hapus',
loading: 'Memuat...',
noCoupon: 'Tidak ada kupon',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nafn',
tel: 'Sími',
save: 'Vista',
confirm: 'Staðfesta',
clear: 'Hreinsa',
cancel: 'hætta við',
confirm: 'Staðfesta',
delete: 'Eyða',
loading: 'Hleður...',
noCoupon: 'Engin afsláttarmiða',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nome',
tel: 'Telefono',
save: 'Salva',
confirm: 'Conferma',
clear: 'Chiaro',
cancel: 'Annulla',
confirm: 'Conferma',
delete: 'Elimina',
loading: 'Caricamento in corso...',
noCoupon: 'Nessun coupon',
@ -14,15 +15,7 @@ export default {
end: 'Fine',
start: 'Inizio',
title: 'Calendario',
weekdays: [
'dom',
'lun',
'mar',
'mer',
'gio',
'ven',
'sab',
],
weekdays: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'],
monthTitle: (year: number, month: number) => `${year}/${month}`,
rangePrompt: (maxRange: number) => `Scegli non più di ${maxRange} giorni`,
},

View File

@ -2,8 +2,9 @@ export default {
name: 'お名前',
tel: '電話番号',
save: 'セーブ',
confirm: '確認',
clear: 'クリア',
cancel: 'キャンセル',
confirm: '確認',
delete: '削除',
loading: '読み込み中...',
noCoupon: 'クーポンはありません',

View File

@ -2,8 +2,9 @@ export default {
name: 'ឈ្មោះ',
tel: 'ទូរស័ព្ទ',
save: 'រក្សាទុក',
confirm: 'យល់ព្រម',
clear: 'ច្បាស់',
cancel: 'បោះបង់',
confirm: 'យល់ព្រម',
delete: 'លុប',
loading: 'កំពុង​ផ្ទុក...',
noCoupon: 'គ្មានគូប៉ុង',

View File

@ -2,8 +2,9 @@ export default {
name: '이름',
tel: '핸드폰',
save: '구하다',
confirm: '확인',
clear: '분명한',
cancel: '취소',
confirm: '확인',
delete: '삭제',
loading: '로딩 중...',
noCoupon: '쿠폰 없음',

View File

@ -2,8 +2,9 @@ export default {
name: 'ຊື່',
tel: 'ໂທລະສັບ',
save: 'ບັນທຶກ',
confirm: 'ຢຶນຢັນ',
clear: 'ຈະແຈ້ງ',
cancel: 'ຍົກເລີກ',
confirm: 'ຢຶນຢັນ',
delete: 'ລືບ',
loading: 'ກຳລັງໂຫຼດ...',
noCoupon: 'ບໍ່ມີຄູປອງ',

View File

@ -2,8 +2,9 @@ export default {
name: 'Нэр',
tel: 'Утас',
save: 'Хадгалах',
confirm: 'Баталгаажуулах',
clear: 'Тодорхой',
cancel: 'Цуцлах',
confirm: 'Баталгаажуулах',
delete: 'Устгах',
loading: 'Ачааж байна...',
noCoupon: 'Купон байхгүй',

View File

@ -2,8 +2,9 @@ export default {
name: 'Navn',
tel: 'Telefon',
save: 'Lagre',
confirm: 'Bekreft',
clear: 'Klar',
cancel: 'Avbryt',
confirm: 'Bekreft',
delete: 'Slett',
loading: 'Laster...',
noCoupon: 'Ingen kuponger',

View File

@ -2,8 +2,9 @@ export default {
name: 'naam',
tel: 'Telefoon',
save: 'Opslaan',
confirm: 'Bevestigen',
clear: 'Duidelijk',
cancel: 'Annuleren',
confirm: 'Bevestigen',
delete: 'Verwijderen',
loading: 'Bezig met laden...',
noCoupon: 'Geen coupons',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nome',
tel: 'Fone',
save: 'Salvar',
confirm: 'Confirmar',
clear: 'Claro',
cancel: 'Cancelar',
confirm: 'Confirmar',
delete: 'Excluir',
loading: 'Carregando...',
noCoupon: 'Nenhum cupom',

View File

@ -2,8 +2,9 @@ export default {
name: 'Nume',
tel: 'Telefon',
save: 'Salvează',
confirm: 'Confirmă',
clear: 'Clar',
cancel: 'Anulează',
confirm: 'Confirmă',
delete: 'Șterge',
loading: 'Încărcare...',
noCoupon: 'Fără cupoane',

View File

@ -2,8 +2,9 @@ export default {
name: 'Имя',
tel: 'Телефон',
save: 'Сохранить',
confirm: 'Подтвердить',
clear: 'Прозрачный',
cancel: 'Отмена',
confirm: 'Подтвердить',
delete: 'Удалить',
loading: 'Загрузка...',
noCoupon: 'Нет купонов',

View File

@ -2,8 +2,9 @@ export default {
name: 'Namn',
tel: 'Telefon',
save: 'Spara',
confirm: 'Bekräfta',
clear: 'Klar',
cancel: 'Avbryt',
confirm: 'Bekräfta',
delete: 'Radera',
loading: 'Laddar...',
noCoupon: 'Inga kuponger',

View File

@ -2,8 +2,9 @@ export default {
name: 'ชื่อ',
tel: 'โทรศัพท์',
save: 'บันทึก',
confirm: 'ยืนยัน',
clear: 'ชัดเจน',
cancel: 'ยกเลิก',
confirm: 'ยืนยัน',
delete: 'ลบ',
loading: 'กำลังโหลด...',
noCoupon: 'ไม่มีคูปอง',

View File

@ -2,8 +2,9 @@ export default {
name: 'İsim',
tel: 'Telefon',
save: 'Kaydet',
confirm: 'Onayla',
clear: 'Temizlemek',
cancel: 'İptal',
confirm: 'Onayla',
delete: 'Sil',
loading: 'Yükleniyor...',
noCoupon: 'Kupon yok',

View File

@ -2,8 +2,9 @@ export default {
name: "Ім'я",
tel: 'Телефон',
save: 'Зберегти',
confirm: 'Підтвердити',
clear: 'ясно',
cancel: 'Скасувати',
confirm: 'Підтвердити',
delete: 'Видалити',
loading: 'Завантаження...',
noCoupon: 'Без купонів',
@ -14,18 +15,9 @@ export default {
end: 'Кінець',
start: 'Початок',
title: 'Календар',
weekdays: [
'Нд',
'Пн',
'Вт',
'Ср',
'Чт',
"Пт",
'Сб',
],
weekdays: ['Нд', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб'],
monthTitle: (year: number, month: number) => `${year}/${month}`,
rangePrompt: (maxRange: number) =>
`Оберіть не більше ніж ${maxRange} днів`,
rangePrompt: (maxRange: number) => `Оберіть не більше ніж ${maxRange} днів`,
},
vanCascader: {
select: 'Обрати',

View File

@ -2,8 +2,9 @@ export default {
name: 'tên',
tel: 'Điện thoại',
save: 'Cứu',
confirm: 'Xác nhận',
clear: 'Thông thoáng',
cancel: 'Hủy bỏ',
confirm: 'Xác nhận',
delete: 'Xóa',
loading: 'Đang tải ...',
noCoupon: 'Không có phiếu giảm giá',

View File

@ -2,8 +2,9 @@ export default {
name: '姓名',
tel: '电话',
save: '保存',
confirm: '确认',
clear: '清空',
cancel: '取消',
confirm: '确认',
delete: '删除',
loading: '加载中...',
noCoupon: '暂无优惠券',

View File

@ -2,8 +2,9 @@ export default {
name: '姓名',
tel: '電話',
save: '保存',
confirm: '確認',
clear: '清空',
cancel: '取消',
confirm: '確認',
delete: '刪除',
loading: '加載中...',
noCoupon: '暫無優惠券',

View File

@ -2,8 +2,9 @@ export default {
name: '姓名',
tel: '電話',
save: '儲存',
confirm: '確認',
clear: '清空',
cancel: '取消',
confirm: '確認',
delete: '刪除',
loading: '載入中...',
noCoupon: '暫無優惠券',

View File

@ -77,7 +77,7 @@ Use `line-width` prop to set the width of the line.
| pen-color | Color of the brush stroke, default is black | _string_ | `#000` |
| line-width | Width of the line | _number_ | `3` |
| tips | Text that appears when Canvas is not supported | _string_ | - |
| cancel-button-text | Cancel button text | _string_ | `Cancel` |
| clear-button-text | Clear button text | _string_ | `Clear` |
| confirm-button-text | Confirm button text | _string_ | `Confirm` |
### Events

View File

@ -77,7 +77,7 @@ export default {
| pen-color | 笔触颜色,默认黑色 | _string_ | `#000` |
| line-width | 线条宽度 | _number_ | `3` |
| tips | 当不支持 Canvas 的时候出现的提示文案 | _string_ | - |
| cancel-button-text | 取消按钮文案 | _string_ | `取消` |
| clear-button-text | 清除按钮文案 | _string_ | `清空` |
| confirm-button-text | 确认按钮文案 | _string_ | `确认` |
### Events

View File

@ -22,7 +22,7 @@ export const signatureProps = {
type: makeStringProp('png'),
penColor: makeStringProp('#000'),
lineWidth: makeNumberProp(3),
cancelButtonText: String,
clearButtonText: String,
confirmButtonText: String,
};
@ -151,7 +151,7 @@ export default defineComponent({
</div>
<div class={bem('footer')}>
<Button size="small" onClick={clear}>
{props.cancelButtonText || t('cancel')}
{props.clearButtonText || t('clear')}
</Button>
<Button type="primary" size="small" onClick={submit}>
{props.confirmButtonText || t('confirm')}

View File

@ -19,7 +19,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Cancel
Clear
</span>
</div>
</button>
@ -54,7 +54,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Cancel
Clear
</span>
</div>
</button>
@ -89,7 +89,7 @@ exports[`should render demo and match snapshot 1`] = `
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Cancel
Clear
</span>
</div>
</button>

View File

@ -15,7 +15,7 @@ exports[`should render demo and match snapshot 1`] = `
>
<div class="van-button__content">
<span class="van-button__text">
Cancel
Clear
</span>
</div>
</button>
@ -45,7 +45,7 @@ exports[`should render demo and match snapshot 1`] = `
>
<div class="van-button__content">
<span class="van-button__text">
Cancel
Clear
</span>
</div>
</button>
@ -75,7 +75,7 @@ exports[`should render demo and match snapshot 1`] = `
>
<div class="van-button__content">
<span class="van-button__text">
Cancel
Clear
</span>
</div>
</button>

View File

@ -36,7 +36,7 @@ exports[`should render tips correctly 1`] = `
>
<div class="van-button__content">
<span class="van-button__text">
Cancel
Clear
</span>
</div>
</button>

View File

@ -16,7 +16,7 @@ exports[`should render correctly when SSR 1`] = `
<div class="van-button__content">
<span class="van-button__text">
<!--[-->
Cancel
Clear
</span>
</div>
</button>

View File

@ -84,7 +84,7 @@ test('should allow to custom button text', async () => {
const wrapper = mount(Signature, {
props: {
confirmButtonText: 'Foo',
cancelButtonText: 'Bar',
clearButtonText: 'Bar',
},
});

View File

@ -210,6 +210,10 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
path: 'slider',
title: 'Slider 滑块',
},
{
path: 'signature',
title: 'Signature 签名',
},
{
path: 'stepper',
title: 'Stepper 步进器',
@ -434,10 +438,6 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
path: 'submit-bar',
title: 'SubmitBar 提交订单栏',
},
{
path: 'signature',
title: 'Signature 签名',
},
],
},
{
@ -658,6 +658,10 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
path: 'slider',
title: 'Slider',
},
{
path: 'signature',
title: 'Signature',
},
{
path: 'stepper',
title: 'Stepper',
@ -882,10 +886,6 @@ location.href = location.href.replace('youzan.github.io', 'vant-ui.github.io');
path: 'submit-bar',
title: 'SubmitBar',
},
{
path: 'signature',
title: 'Signature',
},
],
},
{