# Taro3-Vue3-Demo
```js
// option Api
data() {
return {
res: [],
msg: "",
};
},
created() {
this.getRes();
},
methods: {
getRes: async function () {
this.res = await test();
},
},
```
```js
setup() {
const res = ref([]);
const msg = ref("");
const getRes = async () => {
const result = await test();
res.value = result;
};
getRes();
return { res, msg };
},
```
没有合适的资源?快使用搜索试试~ 我知道了~
Taro3-Vue3-Demo:taro3使用vue3进行开发
共31个文件
ts:10个
scss:4个
js:4个
需积分: 46 10 下载量 67 浏览量
2021-03-29
11:26:22
上传
评论
收藏 181KB ZIP 举报
温馨提示
Taro3-Vue3-Demo // option Api data ( ) { return { res : [ ] , msg : "" , } ; } , created ( ) { this . getRes ( ) ; } , methods : { getRes : async function ( ) { this . res = await test ( ) ; } , } , setup ( ) { const res = ref ( [ ] ) ; const msg = ref ( "" ) ; const getRes = async ( ) => { const result = await test ( ) ;
资源详情
资源评论
资源推荐
收起资源包目录
Taro3-Vue3-Demo-master.zip (31个子文件)
Taro3-Vue3-Demo-master
.gitignore 64B
.eslintrc 31B
package.json 2KB
.npmrc 570B
src
api
test.ts 118B
app.scss 0B
vuex
index.ts 214B
app.config.ts 541B
utils
envInfo.ts 84B
request
index.ts 1KB
index.html 1011B
app.ts 303B
pages
demo
index.config.ts 54B
index.vue 251B
index.scss 0B
index
index.config.ts 54B
index.vue 950B
index.scss 0B
test
index.config.ts 60B
index.vue 931B
index.scss 0B
project.config.json 288B
tsconfig.json 677B
README.md 455B
config
index.js 1KB
dev.js 112B
prod.js 423B
global.d.ts 394B
babel.config.js 230B
.editorconfig 197B
yarn.lock 601KB
共 31 条
- 1
WillisWang
- 粉丝: 22
- 资源: 4701
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0