uni-app 自动化测试 element.data api是否不支持vue3 setup语法糖?
uni-app 自动化测试 element.data api是否不支持vue3 setup语法糖?
示例代码:
import {
reactive,
ref
} from 'vue';
let title = ref('Hello')
describe('input', () => {
test('input start', async () => {
const page = await program.currentPage()
const element = await page.$('.el-input')
console.log(await page.data('title'))
console.log(await element.value());
});
});
操作步骤:
describe('input', () => {
test('input start', async () => {
const page = await program.currentPage()
const element = await page.$('.el-input')
console.log(await page.data('title'))
console.log(await element.value());
});
});
预期结果:
正常输出
实际结果:
输出undefind
bug描述:
vue2的语法能够正常输出,但是使用vue3 setup语法糖,输出的则是undefind
信息项 | 详情 |
---|---|
产品分类 | uniapp/App |
PC开发环境 | Windows |
PC开发环境版本 | win11 |
HBuilderX类型 | 正式 |
HBuilderX版本 | 3.99 |
手机系统 | Android |
手机系统版本 | Android 12 |
手机厂商 | 华为 |
手机机型 | mate40 |
页面类型 | vue |
Vue版本 | vue3 |
打包方式 | 云端 |
项目创建方式 | HBuilderX |
1 回复