docs: prefer shorter demo
This commit is contained in:
@@ -30,12 +30,8 @@ import { Toast } from 'vant';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const onClickLeft = () => {
|
||||
Toast('Back');
|
||||
};
|
||||
const onClickRight = () => {
|
||||
Toast('Button');
|
||||
};
|
||||
const onClickLeft = () => Toast('Back');
|
||||
const onClickRight = () => Toast('Button');
|
||||
return {
|
||||
onClickLeft,
|
||||
onClickRight,
|
||||
|
||||
@@ -30,12 +30,8 @@ import { Toast } from 'vant';
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const onClickLeft = () => {
|
||||
Toast('返回');
|
||||
};
|
||||
const onClickRight = () => {
|
||||
Toast('按钮');
|
||||
};
|
||||
const onClickLeft = () => Toast('返回');
|
||||
const onClickRight = () => Toast('按钮');
|
||||
return {
|
||||
onClickLeft,
|
||||
onClickRight,
|
||||
|
||||
@@ -35,14 +35,8 @@ const i18n = {
|
||||
export default {
|
||||
setup() {
|
||||
const t = useTranslate(i18n);
|
||||
|
||||
const onClickLeft = () => {
|
||||
Toast(t('back'));
|
||||
};
|
||||
|
||||
const onClickRight = () => {
|
||||
Toast(t('button'));
|
||||
};
|
||||
const onClickLeft = () => Toast(t('back'));
|
||||
const onClickRight = () => Toast(t('button'));
|
||||
|
||||
return {
|
||||
t,
|
||||
|
||||
Reference in New Issue
Block a user