docs(NavBar): use setup

This commit is contained in:
chenjiahan
2020-12-15 15:21:31 +08:00
parent 872bf4ddfb
commit 775f0bef47
5 changed files with 59 additions and 33 deletions
+9 -5
View File
@@ -29,13 +29,17 @@ app.use(NavBar);
import { Toast } from 'vant';
export default {
methods: {
onClickLeft() {
setup() {
const onClickLeft = () => {
Toast('Back');
},
onClickRight() {
};
const onClickRight = () => {
Toast('Button');
},
};
return {
onClickLeft,
onClickRight,
};
},
};
```