提交 77e3d040 编写于 作者: H hdx

feat(v-bind): 新增 array 深度属性测试

上级 1a351bae
......@@ -59,6 +59,12 @@
"style": {
"navigationBarTitleText": "v-bind-attribute"
}
},
{
"path": "pages/directive/v-bind/v-bind-array-deep",
"style": {
"navigationBarTitleText": "v-bind-array-deep"
}
},
{
"path": "pages/directive/v-for/v-for",
......
const PAGE_PATH = '/pages/directive/v-bind/v-bind-array-deep'
describe('v-bind-array-deep', () => {
let page
beforeAll(async () => {
page = await program.reLaunch(PAGE_PATH)
await page.waitFor(500)
})
it('object-value', async () => {
const value = await page.$('.deep-value')
expect(await value.text()).toBe('3')
})
})
\ No newline at end of file
<template>
<view>
<view v-for="(item, index) in arrayList" :key="index">
<text>{{item}}</text>
<text v-if="index==1">下面应显示 3</text>
<text v-if="index==1" class="deep-value">{{item['b']}}</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
arrayList: [{ a: 1 }] as UTSJSONObject[],
}
},
onReady() {
const b = { b: 2 } as UTSJSONObject
this.arrayList.push(b);
this.$nextTick(() => {
this.arrayList[1]['b'] = 3
})
}
}
</script>
\ No newline at end of file
......@@ -161,6 +161,11 @@
name: 'v-bind-attribute',
url: 'v-bind/v-bind-attribute',
enable: false,
},
{
name: 'v-bind-array-deep',
url: 'v-bind/v-bind-array-deep',
enable: true,
},
{
name: 'v-model',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册