mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore: update demo i18n (#9342)
This commit is contained in:
parent
253e4a7988
commit
125f77a48b
@ -2,7 +2,7 @@
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
icon1: '客服',
|
icon1: '客服',
|
||||||
icon2: '购物车',
|
icon2: '购物车',
|
||||||
@ -29,9 +29,7 @@ const i18n = {
|
|||||||
customIconColor: 'Custom Icon Color',
|
customIconColor: 'Custom Icon Color',
|
||||||
customButtonColor: 'Custom Button Color',
|
customButtonColor: 'Custom Button Color',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const onClickIcon = () => Toast(t('clickIcon'));
|
const onClickIcon = () => Toast(t('clickIcon'));
|
||||||
const onClickButton = () => Toast(t('clickButton'));
|
const onClickButton = () => Toast(t('clickButton'));
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { ActionSheetAction } from '..';
|
import { ActionSheetAction } from '..';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
option1: '选项一',
|
option1: '选项一',
|
||||||
option2: '选项二',
|
option2: '选项二',
|
||||||
@ -33,9 +33,7 @@ const i18n = {
|
|||||||
disabledOption: 'Disabled Option',
|
disabledOption: 'Disabled Option',
|
||||||
showDescription: 'Show Description',
|
showDescription: 'Show Description',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const showBasic = ref(false);
|
const showBasic = ref(false);
|
||||||
const showCancel = ref(false);
|
const showCancel = ref(false);
|
||||||
const showTitle = ref(false);
|
const showTitle = ref(false);
|
||||||
|
@ -4,7 +4,7 @@ import { areaList } from '@vant/area-data';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
areaColumnsPlaceholder: ['请选择', '请选择', '请选择'],
|
areaColumnsPlaceholder: ['请选择', '请选择', '请选择'],
|
||||||
searchResult: [
|
searchResult: [
|
||||||
@ -37,9 +37,7 @@ const i18n = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const searchResult = ref([]);
|
const searchResult = ref([]);
|
||||||
|
|
||||||
const onSave = () => Toast(t('save'));
|
const onSave = () => Toast(t('save'));
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
list: [
|
list: [
|
||||||
{
|
{
|
||||||
@ -62,9 +62,8 @@ const i18n = {
|
|||||||
disabledText: 'The following address is out of range',
|
disabledText: 'The following address is out of range',
|
||||||
defaultTagText: 'Default',
|
defaultTagText: 'Default',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const chosenAddressId = ref('1');
|
const chosenAddressId = ref('1');
|
||||||
const onAdd = () => {
|
const onAdd = () => {
|
||||||
Toast(t('add'));
|
Toast(t('add'));
|
||||||
|
@ -4,7 +4,7 @@ import { areaList } from '@vant/area-data';
|
|||||||
import { areaListEn } from './area-en';
|
import { areaListEn } from './area-en';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '选中省市区',
|
title2: '选中省市区',
|
||||||
title3: '配置显示列',
|
title3: '配置显示列',
|
||||||
@ -19,9 +19,8 @@ const i18n = {
|
|||||||
columnsPlaceholder: ['Choose', 'Choose', 'Choose'],
|
columnsPlaceholder: ['Choose', 'Choose', 'Choose'],
|
||||||
areaList: areaListEn,
|
areaList: areaListEn,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = ref('330302');
|
const value = ref('330302');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
max: '最大值',
|
max: '最大值',
|
||||||
standalone: '独立展示',
|
standalone: '独立展示',
|
||||||
@ -14,9 +14,7 @@ const i18n = {
|
|||||||
customColor: 'Custom Color',
|
customColor: 'Custom Color',
|
||||||
customContent: 'Custom Content',
|
customContent: 'Custom Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
type: '按钮类型',
|
type: '按钮类型',
|
||||||
size: '按钮尺寸',
|
size: '按钮尺寸',
|
||||||
@ -60,9 +60,7 @@ const i18n = {
|
|||||||
gradient: 'Gradient',
|
gradient: 'Gradient',
|
||||||
blockElement: 'Block Element',
|
blockElement: 'Block Element',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title: '商品名称',
|
title: '商品名称',
|
||||||
discountInfo: '营销信息',
|
discountInfo: '营销信息',
|
||||||
@ -11,9 +11,8 @@ const i18n = {
|
|||||||
discountInfo: 'Discount Info',
|
discountInfo: 'Discount Info',
|
||||||
customContent: 'Custom Content',
|
customContent: 'Custom Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const imageURL = 'https://img.yzcdn.cn/vant/ipad.jpeg';
|
const imageURL = 'https://img.yzcdn.cn/vant/ipad.jpeg';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import { deepClone } from '../../utils/deep-clone';
|
|||||||
import zhCNOptions from './area-zh-CN';
|
import zhCNOptions from './area-zh-CN';
|
||||||
import enUSOptions from './area-en-US';
|
import enUSOptions from './area-en-US';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
area: '地区',
|
area: '地区',
|
||||||
options: zhCNOptions,
|
options: zhCNOptions,
|
||||||
@ -45,7 +45,7 @@ const i18n = {
|
|||||||
],
|
],
|
||||||
customFieldNames: 'Custom Field Names',
|
customFieldNames: 'Custom Field Names',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
type StateItem = {
|
type StateItem = {
|
||||||
show: boolean;
|
show: boolean;
|
||||||
@ -54,7 +54,6 @@ type StateItem = {
|
|||||||
options?: CascaderOption[];
|
options?: CascaderOption[];
|
||||||
};
|
};
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const baseState = reactive<StateItem>({
|
const baseState = reactive<StateItem>({
|
||||||
show: false,
|
show: false,
|
||||||
value: '',
|
value: '',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
cell: '单元格',
|
cell: '单元格',
|
||||||
group: '分组',
|
group: '分组',
|
||||||
@ -32,9 +32,7 @@ const i18n = {
|
|||||||
insetGrouped: 'Inset Grouped',
|
insetGrouped: 'Inset Grouped',
|
||||||
verticalCenter: 'Vertical center',
|
verticalCenter: 'Vertical center',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -5,7 +5,7 @@ import { useRefs } from '../../composables/use-refs';
|
|||||||
import type { CheckboxInstance } from '../types';
|
import type { CheckboxInstance } from '../types';
|
||||||
import type { CheckboxGroupInstance } from '../../checkbox-group';
|
import type { CheckboxGroupInstance } from '../../checkbox-group';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
checkbox: '复选框',
|
checkbox: '复选框',
|
||||||
customIcon: '自定义图标',
|
customIcon: '自定义图标',
|
||||||
@ -36,9 +36,8 @@ const i18n = {
|
|||||||
horizontal: 'Horizontal',
|
horizontal: 'Horizontal',
|
||||||
disableLabel: 'Disable label click',
|
disableLabel: 'Disable label click',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
checkbox1: true,
|
checkbox1: true,
|
||||||
checkbox2: true,
|
checkbox2: true,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
left: '左侧',
|
left: '左侧',
|
||||||
right: '右侧',
|
right: '右侧',
|
||||||
@ -27,9 +27,8 @@ const i18n = {
|
|||||||
startPosition: 'Start Position',
|
startPosition: 'Start Position',
|
||||||
counterClockwise: 'Counter Clockwise',
|
counterClockwise: 'Counter Clockwise',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const rate = ref(70);
|
const rate = ref(70);
|
||||||
const currentRate1 = ref(70);
|
const currentRate1 = ref(70);
|
||||||
const currentRate2 = ref(70);
|
const currentRate2 = ref(70);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '在列元素之间增加间距',
|
title2: '在列元素之间增加间距',
|
||||||
justify: '对齐方式',
|
justify: '对齐方式',
|
||||||
@ -10,9 +10,7 @@ const i18n = {
|
|||||||
title2: 'Column Spacing',
|
title2: 'Column Spacing',
|
||||||
justify: 'Justify Content',
|
justify: 'Justify Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
accordion: '手风琴',
|
accordion: '手风琴',
|
||||||
titleSlot: '自定义标题内容',
|
titleSlot: '自定义标题内容',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
titleSlot: 'Custom title',
|
titleSlot: 'Custom title',
|
||||||
text: 'Content',
|
text: 'Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const active1 = ref([0]);
|
const active1 = ref([0]);
|
||||||
const active2 = ref(0);
|
const active2 = ref(0);
|
||||||
const active3 = ref([]);
|
const active3 = ref([]);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
rate: '评分',
|
rate: '评分',
|
||||||
slider: '滑块',
|
slider: '滑块',
|
||||||
@ -19,9 +19,8 @@ const i18n = {
|
|||||||
customTheme: 'Custom Theme',
|
customTheme: 'Custom Theme',
|
||||||
defaultTheme: 'DefaultTheme',
|
defaultTheme: 'DefaultTheme',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const rate = ref(4);
|
const rate = ref(4);
|
||||||
const slider = ref(50);
|
const slider = ref(50);
|
||||||
const themeVars = {
|
const themeVars = {
|
||||||
|
@ -3,7 +3,7 @@ import { computed } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
add: '新增',
|
add: '新增',
|
||||||
edit: '编辑',
|
edit: '编辑',
|
||||||
@ -18,9 +18,7 @@ const i18n = {
|
|||||||
addContact: 'Add Contact',
|
addContact: 'Add Contact',
|
||||||
editContact: 'Edit Contact',
|
editContact: 'Edit Contact',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
|
|
||||||
const currentContact = computed(() => ({
|
const currentContact = computed(() => ({
|
||||||
name: t('name'),
|
name: t('name'),
|
||||||
|
@ -3,16 +3,15 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
defaultLabel: '设为默认联系人',
|
defaultLabel: '设为默认联系人',
|
||||||
},
|
},
|
||||||
'en-US': {
|
'en-US': {
|
||||||
defaultLabel: 'Set as the default contact',
|
defaultLabel: 'Set as the default contact',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const editingContact = ref({});
|
const editingContact = ref({});
|
||||||
|
|
||||||
const onSave = () => Toast(t('save'));
|
const onSave = () => Toast(t('save'));
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
add: '新增',
|
add: '新增',
|
||||||
edit: '编辑',
|
edit: '编辑',
|
||||||
@ -42,9 +42,8 @@ const i18n = {
|
|||||||
select: 'Select',
|
select: 'Select',
|
||||||
defaultTagText: 'default',
|
defaultTagText: 'default',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const chosenContactId = ref('1');
|
const chosenContactId = ref('1');
|
||||||
|
|
||||||
const onAdd = () => {
|
const onAdd = () => {
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
import type { CountDownInstance } from '../CountDown';
|
import type { CountDownInstance } from '../CountDown';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
reset: '重置',
|
reset: '重置',
|
||||||
pause: '暂停',
|
pause: '暂停',
|
||||||
@ -27,9 +27,8 @@ const i18n = {
|
|||||||
manualControl: 'Manual Control',
|
manualControl: 'Manual Control',
|
||||||
formatWithDay: 'DD Day, HH:mm:ss',
|
formatWithDay: 'DD Day, HH:mm:ss',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const time = ref(30 * 60 * 60 * 1000);
|
const time = ref(30 * 60 * 60 * 1000);
|
||||||
const countDown = ref<CountDownInstance>();
|
const countDown = ref<CountDownInstance>();
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { CouponInfo } from '../../coupon';
|
import { CouponInfo } from '../../coupon';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
coupon: {
|
coupon: {
|
||||||
name: '优惠券名称',
|
name: '优惠券名称',
|
||||||
@ -21,12 +21,11 @@ const i18n = {
|
|||||||
},
|
},
|
||||||
exchange: 'Success',
|
exchange: 'Success',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const getRandomId = (max = 999999) =>
|
const getRandomId = (max = 999999) =>
|
||||||
String(Math.floor(Math.random() * max) + 1);
|
String(Math.floor(Math.random() * max) + 1);
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const showList = ref(false);
|
const showList = ref(false);
|
||||||
const chosenCoupon = ref(-1);
|
const chosenCoupon = ref(-1);
|
||||||
const exchangedCoupons = ref<CouponInfo[]>([]);
|
const exchangedCoupons = ref<CouponInfo[]>([]);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { reactive } from 'vue';
|
import { reactive } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
day: '日',
|
day: '日',
|
||||||
year: '年',
|
year: '年',
|
||||||
@ -29,9 +29,8 @@ const i18n = {
|
|||||||
optionFilter: 'Option Filter',
|
optionFilter: 'Option Filter',
|
||||||
sortColumns: 'Columns Order',
|
sortColumns: 'Columns Order',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = reactive({
|
const value = reactive({
|
||||||
date: new Date(2021, 0, 17),
|
date: new Date(2021, 0, 17),
|
||||||
time: '12:00',
|
time: '12:00',
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { Dialog } from '..';
|
import { Dialog } from '..';
|
||||||
import type { DialogAction } from '../Dialog';
|
import type { DialogAction } from '../Dialog';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title: '标题',
|
title: '标题',
|
||||||
alert1: '提示弹窗',
|
alert1: '提示弹窗',
|
||||||
@ -24,9 +24,8 @@ const i18n = {
|
|||||||
roundButton: 'Round Button Style',
|
roundButton: 'Round Button Style',
|
||||||
componentCall: 'Component Call',
|
componentCall: 'Component Call',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const image = 'https://img.yzcdn.cn/vant/apple-3.jpg';
|
const image = 'https://img.yzcdn.cn/vant/apple-3.jpg';
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
dashed: '虚线',
|
dashed: '虚线',
|
||||||
@ -16,9 +16,7 @@ const i18n = {
|
|||||||
contentPosition: 'Content Position',
|
contentPosition: 'Content Position',
|
||||||
customStyle: 'Custom Style',
|
customStyle: 'Custom Style',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import type { DropdownItemInstance } from '../../dropdown-item';
|
import type { DropdownItemInstance } from '../../dropdown-item';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
disableMenu: '禁用菜单',
|
disableMenu: '禁用菜单',
|
||||||
switchTitle1: '包邮',
|
switchTitle1: '包邮',
|
||||||
@ -42,10 +42,9 @@ const i18n = {
|
|||||||
{ text: 'Option C', value: 'c' },
|
{ text: 'Option C', value: 'c' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const item = ref<DropdownItemInstance>();
|
const item = ref<DropdownItemInstance>();
|
||||||
const t = useTranslate(i18n);
|
|
||||||
|
|
||||||
const switch1 = ref(true);
|
const switch1 = ref(true);
|
||||||
const switch2 = ref(false);
|
const switch2 = ref(false);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
error: '通用错误',
|
error: '通用错误',
|
||||||
search: '搜索提示',
|
search: '搜索提示',
|
||||||
@ -21,9 +21,8 @@ const i18n = {
|
|||||||
customImage: 'Custom Image',
|
customImage: 'Custom Image',
|
||||||
bottomContent: 'Bottom Content',
|
bottomContent: 'Bottom Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const active = ref('error');
|
const active = ref('error');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
message: '留言',
|
message: '留言',
|
||||||
autosize: '高度自适应',
|
autosize: '高度自适应',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
autosize: 'Auto Resize',
|
autosize: 'Auto Resize',
|
||||||
placeholder: 'Message',
|
placeholder: 'Message',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = ref('');
|
const value = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
label: '文本',
|
label: '文本',
|
||||||
placeholder: '请输入文本',
|
placeholder: '请输入文本',
|
||||||
@ -11,9 +11,8 @@ const i18n = {
|
|||||||
label: 'Label',
|
label: 'Label',
|
||||||
placeholder: 'Text',
|
placeholder: 'Text',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = ref('');
|
const value = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
digit: '整数',
|
digit: '整数',
|
||||||
@ -27,9 +27,8 @@ const i18n = {
|
|||||||
phonePlaceholder: 'Phone',
|
phonePlaceholder: 'Phone',
|
||||||
numberPlaceholder: 'Number',
|
numberPlaceholder: 'Number',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const text = ref('');
|
const text = ref('');
|
||||||
const phone = ref('');
|
const phone = ref('');
|
||||||
const digit = ref('');
|
const digit = ref('');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
disabled: '禁用输入框',
|
disabled: '禁用输入框',
|
||||||
@ -13,9 +13,7 @@ const i18n = {
|
|||||||
inputReadonly: 'Input Readonly',
|
inputReadonly: 'Input Readonly',
|
||||||
inputDisabled: 'Input Disabled',
|
inputDisabled: 'Input Disabled',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
phone: '手机号',
|
phone: '手机号',
|
||||||
errorInfo: '错误提示',
|
errorInfo: '错误提示',
|
||||||
@ -15,9 +15,8 @@ const i18n = {
|
|||||||
phoneError: 'Invalid phone',
|
phoneError: 'Invalid phone',
|
||||||
phonePlaceholder: 'Phone',
|
phonePlaceholder: 'Phone',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const phone = ref('123');
|
const phone = ref('123');
|
||||||
const username = ref('');
|
const username = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
formatValue: '格式化输入内容',
|
formatValue: '格式化输入内容',
|
||||||
@ -15,9 +15,8 @@ const i18n = {
|
|||||||
formatOnBlur: 'Format On Blur',
|
formatOnBlur: 'Format On Blur',
|
||||||
formatOnChange: 'Format On Change',
|
formatOnChange: 'Format On Change',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value1 = ref('');
|
const value1 = ref('');
|
||||||
const value2 = ref('');
|
const value2 = ref('');
|
||||||
const formatter = (value: string) => value.replace(/\d/g, '');
|
const formatter = (value: string) => value.replace(/\d/g, '');
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
inputAlign: '输入框内容对齐',
|
inputAlign: '输入框内容对齐',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
inputAlign: 'Input Align',
|
inputAlign: 'Input Align',
|
||||||
alignPlaceHolder: 'Input Align Right',
|
alignPlaceHolder: 'Input Align Right',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = ref('');
|
const value = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
sms: '短信验证码',
|
sms: '短信验证码',
|
||||||
sendSMS: '发送验证码',
|
sendSMS: '发送验证码',
|
||||||
@ -15,9 +15,8 @@ const i18n = {
|
|||||||
insertButton: 'Insert Button',
|
insertButton: 'Insert Button',
|
||||||
smsPlaceholder: 'SMS',
|
smsPlaceholder: 'SMS',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const sms = ref('');
|
const sms = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
showIcon: '显示图标',
|
showIcon: '显示图标',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
showIcon: 'Show Icon',
|
showIcon: 'Show Icon',
|
||||||
showClearIcon: 'Show Clear Icon',
|
showClearIcon: 'Show Clear Icon',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const icon1 = ref('');
|
const icon1 = ref('');
|
||||||
const icon2 = ref('123');
|
const icon2 = ref('123');
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
message: '留言',
|
message: '留言',
|
||||||
placeholder: '请输入留言',
|
placeholder: '请输入留言',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
placeholder: 'Message',
|
placeholder: 'Message',
|
||||||
showWordLimit: 'Show Word Limit',
|
showWordLimit: 'Show Word Limit',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = ref('');
|
const value = ref('');
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { FieldValidateError } from '../../field/types';
|
import { FieldValidateError } from '../../field/types';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
submit: '提交',
|
submit: '提交',
|
||||||
username: '用户名',
|
username: '用户名',
|
||||||
@ -18,9 +18,8 @@ const i18n = {
|
|||||||
requireUsername: 'Username is required',
|
requireUsername: 'Username is required',
|
||||||
requirePassword: 'Password is required',
|
requirePassword: 'Password is required',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const username = ref('');
|
const username = ref('');
|
||||||
const password = ref('');
|
const password = ref('');
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import FieldTypePicker from './FieldTypePicker.vue';
|
|||||||
import FieldTypeCalendar from './FieldTypeCalendar.vue';
|
import FieldTypeCalendar from './FieldTypeCalendar.vue';
|
||||||
import FieldTypeDatetimePicker from './FieldTypeDatetimePicker.vue';
|
import FieldTypeDatetimePicker from './FieldTypeDatetimePicker.vue';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
rate: '评分',
|
rate: '评分',
|
||||||
radio: '单选框',
|
radio: '单选框',
|
||||||
@ -35,9 +35,8 @@ const i18n = {
|
|||||||
checkboxGroup: 'Checkbox Group',
|
checkboxGroup: 'Checkbox Group',
|
||||||
requireCheckbox: 'Checkbox is required',
|
requireCheckbox: 'Checkbox is required',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const rate = ref(3);
|
const rate = ref(3);
|
||||||
const radio = ref('1');
|
const radio = ref('1');
|
||||||
const slider = ref(50);
|
const slider = ref(50);
|
||||||
|
@ -5,7 +5,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { AreaColumnOption } from '../../area';
|
import { AreaColumnOption } from '../../area';
|
||||||
import { areaListEn } from '../../area/demo/area-en';
|
import { areaListEn } from '../../area/demo/area-en';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
picker: '地区选择',
|
picker: '地区选择',
|
||||||
areaList,
|
areaList,
|
||||||
@ -16,9 +16,8 @@ const i18n = {
|
|||||||
areaList: areaListEn,
|
areaList: areaListEn,
|
||||||
placeholder: 'Select area',
|
placeholder: 'Select area',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const areaCode = ref('');
|
const areaCode = ref('');
|
||||||
const showArea = ref(false);
|
const showArea = ref(false);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
calendar: '日历',
|
calendar: '日历',
|
||||||
placeholder: '点击选择日期',
|
placeholder: '点击选择日期',
|
||||||
@ -11,9 +11,8 @@ const i18n = {
|
|||||||
calendar: 'Calendar',
|
calendar: 'Calendar',
|
||||||
placeholder: 'Select date',
|
placeholder: 'Select date',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const result = ref('');
|
const result = ref('');
|
||||||
const showCalendar = ref(false);
|
const showCalendar = ref(false);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
label: '时间选择',
|
label: '时间选择',
|
||||||
placeholder: '点击选择时间',
|
placeholder: '点击选择时间',
|
||||||
@ -11,9 +11,8 @@ const i18n = {
|
|||||||
label: 'Datetime Picker',
|
label: 'Datetime Picker',
|
||||||
placeholder: 'Select time',
|
placeholder: 'Select time',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const result = ref('');
|
const result = ref('');
|
||||||
const showPicker = ref(false);
|
const showPicker = ref(false);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
picker: '选择器',
|
picker: '选择器',
|
||||||
placeholder: '点击选择城市',
|
placeholder: '点击选择城市',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
placeholder: 'Select city',
|
placeholder: 'Select city',
|
||||||
textColumns: ['Delaware', 'Florida', 'Georqia', 'Indiana', 'Maine'],
|
textColumns: ['Delaware', 'Florida', 'Georqia', 'Indiana', 'Maine'],
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const result = ref('');
|
const result = ref('');
|
||||||
const showPicker = ref(false);
|
const showPicker = ref(false);
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { FieldValidateError } from '../../field/types';
|
import { FieldValidateError } from '../../field/types';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
label: '文本',
|
label: '文本',
|
||||||
title: '校验规则',
|
title: '校验规则',
|
||||||
@ -29,9 +29,8 @@ const i18n = {
|
|||||||
asyncValidator: 'Use async validator',
|
asyncValidator: 'Use async validator',
|
||||||
validatorMessage: 'Use validator to return message',
|
validatorMessage: 'Use validator to return message',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value1 = ref('');
|
const value1 = ref('');
|
||||||
const value2 = ref('');
|
const value2 = ref('');
|
||||||
const value3 = ref('abc');
|
const value3 = ref('abc');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文字',
|
text: '文字',
|
||||||
route: '页面导航',
|
route: '页面导航',
|
||||||
@ -26,9 +26,7 @@ const i18n = {
|
|||||||
showBadge: 'Show Badge',
|
showBadge: 'Show Badge',
|
||||||
horizontal: 'Horizontal',
|
horizontal: 'Horizontal',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -31,7 +31,7 @@ function copyToClipboard(str: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title: '图标列表',
|
title: '图标列表',
|
||||||
badge: '徽标提示',
|
badge: '徽标提示',
|
||||||
@ -54,9 +54,8 @@ const i18n = {
|
|||||||
color: 'Icon Color',
|
color: 'Icon Color',
|
||||||
size: 'Icon Size',
|
size: 'Icon Size',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const tab = ref(0);
|
const tab = ref(0);
|
||||||
const demoIcon = 'chat-o';
|
const demoIcon = 'chat-o';
|
||||||
const demoImage = 'https://b.yzcdn.cn/vant/icon-demo-1126.png';
|
const demoImage = 'https://b.yzcdn.cn/vant/icon-demo-1126.png';
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { ImagePreview, ImagePreviewOptions } from '..';
|
import { ImagePreview, ImagePreviewOptions } from '..';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
closed: '关闭',
|
closed: '关闭',
|
||||||
showClose: '展示关闭按钮',
|
showClose: '展示关闭按钮',
|
||||||
@ -27,7 +27,7 @@ const i18n = {
|
|||||||
componentCall: 'Component Call',
|
componentCall: 'Component Call',
|
||||||
index: (index: number) => `Page: ${index}`,
|
index: (index: number) => `Page: ${index}`,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const images = [
|
const images = [
|
||||||
'https://img.yzcdn.cn/vant/apple-1.jpg',
|
'https://img.yzcdn.cn/vant/apple-1.jpg',
|
||||||
@ -36,7 +36,6 @@ const images = [
|
|||||||
'https://img.yzcdn.cn/vant/apple-4.jpg',
|
'https://img.yzcdn.cn/vant/apple-4.jpg',
|
||||||
];
|
];
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const index = ref(0);
|
const index = ref(0);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
fitMode: '填充模式',
|
fitMode: '填充模式',
|
||||||
round: '圆形图片',
|
round: '圆形图片',
|
||||||
@ -20,9 +20,8 @@ const i18n = {
|
|||||||
customTip: 'Custom Tip',
|
customTip: 'Custom Tip',
|
||||||
loadFail: 'Load failed',
|
loadFail: 'Load failed',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const image = 'https://img.yzcdn.cn/vant/cat.jpeg';
|
const image = 'https://img.yzcdn.cn/vant/cat.jpeg';
|
||||||
const fits = ['contain', 'cover', 'fill', 'none', 'scale-down'];
|
const fits = ['contain', 'cover', 'fill', 'none', 'scale-down'];
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '文本',
|
text: '文本',
|
||||||
customIndexList: '自定义索引列表',
|
customIndexList: '自定义索引列表',
|
||||||
@ -11,9 +11,8 @@ const i18n = {
|
|||||||
text: 'Text',
|
text: 'Text',
|
||||||
customIndexList: 'Custom Index List',
|
customIndexList: 'Custom Index List',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const activeTab = ref(0);
|
const activeTab = ref(0);
|
||||||
const indexList: string[] = [];
|
const indexList: string[] = [];
|
||||||
const customIndexList = [1, 2, 3, 4, 5, 6, 8, 9, 10];
|
const customIndexList = [1, 2, 3, 4, 5, 6, 8, 9, 10];
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '背景图懒加载',
|
title2: '背景图懒加载',
|
||||||
title3: '懒加载模块',
|
title3: '懒加载模块',
|
||||||
@ -10,9 +10,7 @@ const i18n = {
|
|||||||
title2: 'Lazyload Background Image',
|
title2: 'Lazyload Background Image',
|
||||||
title3: 'Lazyload Component',
|
title3: 'Lazyload Component',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
|
|
||||||
const imageList = [
|
const imageList = [
|
||||||
'https://img.yzcdn.cn/vant/apple-1.jpg',
|
'https://img.yzcdn.cn/vant/apple-1.jpg',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
errorInfo: '错误提示',
|
errorInfo: '错误提示',
|
||||||
errorText: '请求失败,点击重新加载',
|
errorText: '请求失败,点击重新加载',
|
||||||
@ -15,9 +15,8 @@ const i18n = {
|
|||||||
pullRefresh: 'PullRefresh',
|
pullRefresh: 'PullRefresh',
|
||||||
finishedText: 'Finished',
|
finishedText: 'Finished',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const list = ref([
|
const list = ref([
|
||||||
{
|
{
|
||||||
items: [] as string[],
|
items: [] as string[],
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
type: '加载类型',
|
type: '加载类型',
|
||||||
text: '加载文案',
|
text: '加载文案',
|
||||||
@ -18,9 +18,7 @@ const i18n = {
|
|||||||
vertical: 'Vertical',
|
vertical: 'Vertical',
|
||||||
textColor: 'Text Color',
|
textColor: 'Text Color',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -2,16 +2,15 @@
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
useSlot: '使用插槽',
|
useSlot: '使用插槽',
|
||||||
},
|
},
|
||||||
'en-US': {
|
'en-US': {
|
||||||
useSlot: 'Use Slot',
|
useSlot: 'Use Slot',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const onClickLeft = () => Toast(t('back'));
|
const onClickLeft = () => Toast(t('back'));
|
||||||
const onClickRight = () => Toast(t('button'));
|
const onClickRight = () => Toast(t('button'));
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。',
|
text: '在代码阅读过程中人们说脏话的频率是衡量代码质量的唯一标准。',
|
||||||
mode: '通知栏模式',
|
mode: '通知栏模式',
|
||||||
@ -22,9 +22,7 @@ const i18n = {
|
|||||||
scrollable: 'Scrollable',
|
scrollable: 'Scrollable',
|
||||||
verticalScroll: 'Vertical Scroll',
|
verticalScroll: 'Vertical Scroll',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { Notify } from '..';
|
import { Notify } from '..';
|
||||||
import { NotifyType } from '../Notify';
|
import { NotifyType } from '../Notify';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
primary: '主要通知',
|
primary: '主要通知',
|
||||||
success: '成功通知',
|
success: '成功通知',
|
||||||
@ -29,9 +29,8 @@ const i18n = {
|
|||||||
componentCall: 'Component Call',
|
componentCall: 'Component Call',
|
||||||
customDuration: 'Custom Duration',
|
customDuration: 'Custom Duration',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
const showNotify = () => {
|
const showNotify = () => {
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
close: '完成',
|
close: '完成',
|
||||||
input: '输入',
|
input: '输入',
|
||||||
@ -36,9 +36,8 @@ const i18n = {
|
|||||||
multiExtraKey: 'Multiple ExtraKey',
|
multiExtraKey: 'Multiple ExtraKey',
|
||||||
randomKeyOrder: 'Random Key Order',
|
randomKeyOrder: 'Random Key Order',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value = ref('');
|
const value = ref('');
|
||||||
const keyboard = ref('default');
|
const keyboard = ref('default');
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
showOverlay: '显示遮罩层',
|
showOverlay: '显示遮罩层',
|
||||||
embeddedContent: '嵌入内容',
|
embeddedContent: '嵌入内容',
|
||||||
@ -11,9 +11,8 @@ const i18n = {
|
|||||||
showOverlay: 'Show Overlay',
|
showOverlay: 'Show Overlay',
|
||||||
embeddedContent: 'Embedded Content',
|
embeddedContent: 'Embedded Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const showEmbedded = ref(false);
|
const showEmbedded = ref(false);
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '简单模式',
|
title2: '简单模式',
|
||||||
title3: '显示省略号',
|
title3: '显示省略号',
|
||||||
@ -17,9 +17,8 @@ const i18n = {
|
|||||||
prevText: 'Prev',
|
prevText: 'Prev',
|
||||||
nextText: 'Next',
|
nextText: 'Next',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const currentPage1 = ref(1);
|
const currentPage1 = ref(1);
|
||||||
const currentPage2 = ref(1);
|
const currentPage2 = ref(1);
|
||||||
const currentPage3 = ref(1);
|
const currentPage3 = ref(1);
|
||||||
|
@ -3,7 +3,7 @@ import { ref, watch } from 'vue';
|
|||||||
import { ComponentInstance } from '../../utils';
|
import { ComponentInstance } from '../../utils';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
info: '密码为 6 位数字',
|
info: '密码为 6 位数字',
|
||||||
showInfo: '提示信息',
|
showInfo: '提示信息',
|
||||||
@ -20,9 +20,8 @@ const i18n = {
|
|||||||
removeMask: 'Remove Mask',
|
removeMask: 'Remove Mask',
|
||||||
customLength: 'Custom Length',
|
customLength: 'Custom Length',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const initialValue = {
|
const initialValue = {
|
||||||
showInfo: '123',
|
showInfo: '123',
|
||||||
addGutter: '123',
|
addGutter: '123',
|
||||||
|
@ -4,7 +4,7 @@ import { dateColumns, cascadeColumns, cascadeColumnsCustomKey } from './data';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
city: '城市',
|
city: '城市',
|
||||||
cascade: '级联选择',
|
cascade: '级联选择',
|
||||||
@ -68,9 +68,8 @@ const i18n = {
|
|||||||
toastContent: (value: string, index: number) =>
|
toastContent: (value: string, index: number) =>
|
||||||
`Value: ${value}, Index:${index}`,
|
`Value: ${value}, Index:${index}`,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const picker = ref();
|
const picker = ref();
|
||||||
const showPicker = ref(false);
|
const showPicker = ref(false);
|
||||||
const fieldValue = ref('');
|
const fieldValue = ref('');
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
actions: [{ text: '选项一' }, { text: '选项二' }, { text: '选项三' }],
|
actions: [{ text: '选项一' }, { text: '选项二' }, { text: '选项三' }],
|
||||||
shortActions: [{ text: '选项一' }, { text: '选项二' }],
|
shortActions: [{ text: '选项一' }, { text: '选项二' }],
|
||||||
@ -50,7 +50,7 @@ const i18n = {
|
|||||||
disableAction: 'Disable Action',
|
disableAction: 'Disable Action',
|
||||||
choosePlacement: 'Placement',
|
choosePlacement: 'Placement',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const placements = [
|
const placements = [
|
||||||
'top',
|
'top',
|
||||||
@ -67,7 +67,6 @@ const placements = [
|
|||||||
'bottom-end',
|
'bottom-end',
|
||||||
];
|
];
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref({
|
const show = ref({
|
||||||
showIcon: false,
|
showIcon: false,
|
||||||
placement: false,
|
placement: false,
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
position: '弹出位置',
|
position: '弹出位置',
|
||||||
buttonBasic: '展示弹出层',
|
buttonBasic: '展示弹出层',
|
||||||
@ -29,9 +29,8 @@ const i18n = {
|
|||||||
customCloseIcon: 'Custom Icon',
|
customCloseIcon: 'Custom Icon',
|
||||||
customIconPosition: 'Icon Position',
|
customIconPosition: 'Icon Position',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const showBasic = ref(false);
|
const showBasic = ref(false);
|
||||||
const showTop = ref(false);
|
const showTop = ref(false);
|
||||||
const showBottom = ref(false);
|
const showBottom = ref(false);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '置灰',
|
title2: '置灰',
|
||||||
title3: '样式定制',
|
title3: '样式定制',
|
||||||
@ -15,9 +15,7 @@ const i18n = {
|
|||||||
strokeWidth: 'Stroke Width',
|
strokeWidth: 'Stroke Width',
|
||||||
transition: 'Transition',
|
transition: 'Transition',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
|
|
||||||
const percentage = ref(50);
|
const percentage = ref(50);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { computed, onMounted, ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
try: '下拉试试',
|
try: '下拉试试',
|
||||||
text: '刷新次数',
|
text: '刷新次数',
|
||||||
@ -18,9 +18,8 @@ const i18n = {
|
|||||||
successTip: 'Success Tip',
|
successTip: 'Success Tip',
|
||||||
customTips: 'Custom Tips',
|
customTips: 'Custom Tips',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const count = ref(0);
|
const count = ref(0);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
radio: '单选框',
|
radio: '单选框',
|
||||||
text1: '未选中禁用',
|
text1: '未选中禁用',
|
||||||
@ -27,9 +27,8 @@ const i18n = {
|
|||||||
customIconSize: 'Custom Icon Size',
|
customIconSize: 'Custom Icon Size',
|
||||||
disableLabel: 'Disable label click',
|
disableLabel: 'Disable label click',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const radio1 = ref('1');
|
const radio1 = ref('1');
|
||||||
const radio2 = ref('2');
|
const radio2 = ref('2');
|
||||||
const radio3 = ref('1');
|
const radio3 = ref('1');
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
halfStar: '半星',
|
halfStar: '半星',
|
||||||
disabled: '禁用状态',
|
disabled: '禁用状态',
|
||||||
@ -26,9 +26,8 @@ const i18n = {
|
|||||||
changeEvent: 'Change Event',
|
changeEvent: 'Change Event',
|
||||||
toastContent: (value: number) => `current value:${value}`,
|
toastContent: (value: number) => `current value:${value}`,
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value1 = ref(3);
|
const value1 = ref(3);
|
||||||
const value2 = ref(3);
|
const value2 = ref(3);
|
||||||
const value3 = ref(3);
|
const value3 = ref(3);
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
label: '地址',
|
label: '地址',
|
||||||
disabled: '禁用搜索框',
|
disabled: '禁用搜索框',
|
||||||
@ -22,9 +22,8 @@ const i18n = {
|
|||||||
customButton: 'Custom Action Button',
|
customButton: 'Custom Action Button',
|
||||||
listenToEvents: 'Listen to Events',
|
listenToEvents: 'Listen to Events',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value1 = ref('');
|
const value1 = ref('');
|
||||||
const value2 = ref('');
|
const value2 = ref('');
|
||||||
const value3 = ref('');
|
const value3 = ref('');
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { ShareSheetOption, ShareSheetOptions } from '..';
|
import { ShareSheetOption, ShareSheetOptions } from '..';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
qq: 'QQ',
|
qq: 'QQ',
|
||||||
name: '名称',
|
name: '名称',
|
||||||
@ -39,9 +39,8 @@ const i18n = {
|
|||||||
weappQrcode: 'Weapp Qrcode',
|
weappQrcode: 'Weapp Qrcode',
|
||||||
wechatMoments: 'Wechat Moments',
|
wechatMoments: 'Wechat Moments',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const showBasic = ref(false);
|
const showBasic = ref(false);
|
||||||
const showWithDesc = ref(false);
|
const showWithDesc = ref(false);
|
||||||
const showMultiLine = ref(false);
|
const showMultiLine = ref(false);
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title: '标签名',
|
title: '标签名',
|
||||||
disabled: '禁用选项',
|
disabled: '禁用选项',
|
||||||
@ -15,9 +15,8 @@ const i18n = {
|
|||||||
showBadge: 'Show Badge',
|
showBadge: 'Show Badge',
|
||||||
changeEvent: 'Change Event',
|
changeEvent: 'Change Event',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const active1 = ref(0);
|
const active1 = ref(0);
|
||||||
const active2 = ref(0);
|
const active2 = ref(0);
|
||||||
const active3 = ref(0);
|
const active3 = ref(0);
|
||||||
|
@ -2,13 +2,12 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
showAvatar: '显示头像',
|
showAvatar: '显示头像',
|
||||||
showChildren: '显示子组件',
|
showChildren: '显示子组件',
|
||||||
title: '关于 Vant',
|
title: '关于 Vant',
|
||||||
desc:
|
desc: 'Vant 是一套轻量、可靠的移动端 Vue 组件库,提供了丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。',
|
||||||
'Vant 是一套轻量、可靠的移动端 Vue 组件库,提供了丰富的基础组件和业务组件,帮助开发者快速搭建移动应用。',
|
|
||||||
},
|
},
|
||||||
'en-US': {
|
'en-US': {
|
||||||
showAvatar: 'Show Avatar',
|
showAvatar: 'Show Avatar',
|
||||||
@ -16,9 +15,8 @@ const i18n = {
|
|||||||
title: 'About Vant',
|
title: 'About Vant',
|
||||||
desc: 'Vant is a set of Mobile UI Components built on Vue.',
|
desc: 'Vant is a set of Mobile UI Components built on Vue.',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
text: '当前值:',
|
text: '当前值:',
|
||||||
title1: '基础用法',
|
title1: '基础用法',
|
||||||
@ -26,9 +26,8 @@ const i18n = {
|
|||||||
customStyle: 'Custom Style',
|
customStyle: 'Custom Style',
|
||||||
customButton: 'Custom Button',
|
customButton: 'Custom Button',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const value1 = ref(50);
|
const value1 = ref(50);
|
||||||
const value2 = ref([20, 60]);
|
const value2 = ref([20, 60]);
|
||||||
const value3 = ref(0);
|
const value3 = ref(0);
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
step: '步长设置',
|
step: '步长设置',
|
||||||
range: '限制输入范围',
|
range: '限制输入范围',
|
||||||
@ -24,9 +24,8 @@ const i18n = {
|
|||||||
disableInput: 'Disable Input',
|
disableInput: 'Disable Input',
|
||||||
decimalLength: 'Decimal Length',
|
decimalLength: 'Decimal Length',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const stepper1 = ref(1);
|
const stepper1 = ref(1);
|
||||||
const stepper2 = ref(1);
|
const stepper2 = ref(1);
|
||||||
const stepper3 = ref(1);
|
const stepper3 = ref(1);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
nextStep: '下一步',
|
nextStep: '下一步',
|
||||||
step1: '买家下单',
|
step1: '买家下单',
|
||||||
@ -29,9 +29,8 @@ const i18n = {
|
|||||||
status3: '【City】Status3',
|
status3: '【City】Status3',
|
||||||
customStyle: 'Custom Style',
|
customStyle: 'Custom Style',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const active = ref(1);
|
const active = ref(1);
|
||||||
|
|
||||||
const nextStep = () => {
|
const nextStep = () => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
offsetTop: '吸顶距离',
|
offsetTop: '吸顶距离',
|
||||||
offsetBottom: '吸底距离',
|
offsetBottom: '吸底距离',
|
||||||
@ -13,9 +13,8 @@ const i18n = {
|
|||||||
offsetBottom: 'Offset Bottom',
|
offsetBottom: 'Offset Bottom',
|
||||||
setContainer: 'Set Container',
|
setContainer: 'Set Container',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const container = ref(null);
|
const container = ref(null);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
hairline: '1px 边框',
|
hairline: '1px 边框',
|
||||||
ellipsis: '文字省略',
|
ellipsis: '文字省略',
|
||||||
@ -22,9 +22,8 @@ const i18n = {
|
|||||||
text2:
|
text2:
|
||||||
'This is a paragraph that displays up to two lines of text, and the rest of the text will be omitted.',
|
'This is a paragraph that displays up to two lines of text, and the rest of the text will be omitted.',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const transitionName = ref('');
|
const transitionName = ref('');
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
tip1: '你的收货地址不支持同城送, 我们已为你推荐快递',
|
tip1: '你的收货地址不支持同城送, 我们已为你推荐快递',
|
||||||
tip2: '你的收货地址不支持同城送, ',
|
tip2: '你的收货地址不支持同城送, ',
|
||||||
@ -22,9 +22,8 @@ const i18n = {
|
|||||||
clickLink: 'Click Link',
|
clickLink: 'Click Link',
|
||||||
clickButton: 'Submit',
|
clickButton: 'Submit',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const checked = ref(true);
|
const checked = ref(true);
|
||||||
|
|
||||||
const onSubmit = () => Toast(t('clickButton'));
|
const onSubmit = () => Toast(t('clickButton'));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Dialog } from '../../dialog';
|
import { Dialog } from '../../dialog';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
select: '选择',
|
select: '选择',
|
||||||
delete: '删除',
|
delete: '删除',
|
||||||
@ -23,9 +23,8 @@ const i18n = {
|
|||||||
beforeClose: 'Before Close',
|
beforeClose: 'Before Close',
|
||||||
customContent: 'Custom Content',
|
customContent: 'Custom Content',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const imageURL = 'https://img.yzcdn.cn/vant/ipad.jpeg';
|
const imageURL = 'https://img.yzcdn.cn/vant/ipad.jpeg';
|
||||||
|
|
||||||
const beforeClose = ({ position }: { position: string }) => {
|
const beforeClose = ({ position }: { position: string }) => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title2: '懒加载',
|
title2: '懒加载',
|
||||||
title3: '监听 change 事件',
|
title3: '监听 change 事件',
|
||||||
@ -19,9 +19,8 @@ const i18n = {
|
|||||||
title6: 'Custom indicator',
|
title6: 'Custom indicator',
|
||||||
message: 'Current Swipe index:',
|
message: 'Current Swipe index:',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const images = [
|
const images = [
|
||||||
'https://img.yzcdn.cn/vant/apple-1.jpg',
|
'https://img.yzcdn.cn/vant/apple-1.jpg',
|
||||||
'https://img.yzcdn.cn/vant/apple-2.jpg',
|
'https://img.yzcdn.cn/vant/apple-2.jpg',
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Dialog } from '../../dialog';
|
import { Dialog } from '../../dialog';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
title: '标题',
|
title: '标题',
|
||||||
confirm: '提醒',
|
confirm: '提醒',
|
||||||
@ -22,9 +22,8 @@ const i18n = {
|
|||||||
customColor: 'Custom Color',
|
customColor: 'Custom Color',
|
||||||
asyncControl: 'Async Control',
|
asyncControl: 'Async Control',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const checked = ref(true);
|
const checked = ref(true);
|
||||||
const checked2 = ref(true);
|
const checked2 = ref(true);
|
||||||
const checked3 = ref(true);
|
const checked3 = ref(true);
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
tab: '标签 ',
|
tab: '标签 ',
|
||||||
title2: '标签栏滚动',
|
title2: '标签栏滚动',
|
||||||
@ -35,9 +35,8 @@ const i18n = {
|
|||||||
matchByName: 'Match By Name',
|
matchByName: 'Match By Name',
|
||||||
beforeChange: 'Before Change',
|
beforeChange: 'Before Change',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const active = ref(2);
|
const active = ref(2);
|
||||||
const activeName = ref('b');
|
const activeName = ref('b');
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { ref } from 'vue';
|
|||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
badge: '徽标提示',
|
badge: '徽标提示',
|
||||||
customIcon: '自定义图标',
|
customIcon: '自定义图标',
|
||||||
@ -18,9 +18,8 @@ const i18n = {
|
|||||||
matchByName: 'Match by name',
|
matchByName: 'Match by name',
|
||||||
switchEvent: 'Change Event',
|
switchEvent: 'Change Event',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const active = ref(0);
|
const active = ref(0);
|
||||||
const active2 = ref(0);
|
const active2 = ref(0);
|
||||||
const active3 = ref(0);
|
const active3 = ref(0);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { useTranslate } from '@demo/use-translate';
|
import { useTranslate } from '@demo/use-translate';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
type: '类型',
|
type: '类型',
|
||||||
mark: '标记样式',
|
mark: '标记样式',
|
||||||
@ -34,9 +34,8 @@ const i18n = {
|
|||||||
customTextColor: 'Text Color',
|
customTextColor: 'Text Color',
|
||||||
customPlainColor: 'Plain Color',
|
customPlainColor: 'Plain Color',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const show = ref(true);
|
const show = ref(true);
|
||||||
const close = () => {
|
const close = () => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
|
@ -3,7 +3,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { Toast } from '..';
|
import { Toast } from '..';
|
||||||
import type { LoadingType } from '../../loading';
|
import type { LoadingType } from '../../loading';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
fail: '失败提示',
|
fail: '失败提示',
|
||||||
text: '提示内容',
|
text: '提示内容',
|
||||||
@ -40,9 +40,7 @@ const i18n = {
|
|||||||
positionBottom: 'Bottom',
|
positionBottom: 'Bottom',
|
||||||
customPosition: 'Custom Position',
|
customPosition: 'Custom Position',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
|
|
||||||
const showLoadingToast = (loadingType?: LoadingType) => {
|
const showLoadingToast = (loadingType?: LoadingType) => {
|
||||||
Toast.loading({
|
Toast.loading({
|
||||||
|
@ -5,7 +5,7 @@ import { zhCNData } from './data-zh';
|
|||||||
import { enUSData } from './data-en';
|
import { enUSData } from './data-en';
|
||||||
import { deepClone } from '../../utils/deep-clone';
|
import { deepClone } from '../../utils/deep-clone';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
showBadge: '徽标提示',
|
showBadge: '徽标提示',
|
||||||
radioMode: '单选模式',
|
radioMode: '单选模式',
|
||||||
@ -22,9 +22,8 @@ const i18n = {
|
|||||||
data: enUSData,
|
data: enUSData,
|
||||||
dataSimple: [{ text: 'Group 1' }, { text: 'Group 2' }],
|
dataSimple: [{ text: 'Group 1' }, { text: 'Group 2' }],
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
const activeId = ref(1);
|
const activeId = ref(1);
|
||||||
const activeId2 = ref(1);
|
const activeId2 = ref(1);
|
||||||
const activeIds = ref([1, 2]);
|
const activeIds = ref([1, 2]);
|
||||||
|
@ -4,7 +4,7 @@ import { useTranslate } from '@demo/use-translate';
|
|||||||
import { UploaderFileListItem } from '../types';
|
import { UploaderFileListItem } from '../types';
|
||||||
import { Toast } from '../../toast';
|
import { Toast } from '../../toast';
|
||||||
|
|
||||||
const i18n = {
|
const t = useTranslate({
|
||||||
'zh-CN': {
|
'zh-CN': {
|
||||||
status: '上传状态',
|
status: '上传状态',
|
||||||
failed: '上传失败',
|
failed: '上传失败',
|
||||||
@ -41,9 +41,7 @@ const i18n = {
|
|||||||
customPreviewImage: 'Custom single prevew image',
|
customPreviewImage: 'Custom single prevew image',
|
||||||
deleteMessage: 'Before Delete',
|
deleteMessage: 'Before Delete',
|
||||||
},
|
},
|
||||||
};
|
});
|
||||||
|
|
||||||
const t = useTranslate(i18n);
|
|
||||||
|
|
||||||
const fileList = ref([
|
const fileList = ref([
|
||||||
{ url: 'https://img.yzcdn.cn/vant/leaf.jpg' },
|
{ url: 'https://img.yzcdn.cn/vant/leaf.jpg' },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user