docs(Search): update action slot demo (#10133)

This commit is contained in:
neverland
2021-12-30 21:22:28 +08:00
committed by GitHub
parent 7831553bee
commit ac85f82f09
3 changed files with 40 additions and 3 deletions
+2 -1
View File
@@ -34,6 +34,7 @@ const value6 = ref('');
const onSearch = (val: string) => Toast(val);
const onCancel = () => Toast(t('cancel'));
const onClickButton = () => Toast(value6.value);
</script>
<template>
@@ -83,7 +84,7 @@ const onCancel = () => Toast(t('cancel'));
@search="onSearch"
>
<template #action>
<div @click="onSearch">{{ t('search') }}</div>
<div @click="onClickButton">{{ t('search') }}</div>
</template>
</van-search>
</demo-block>