提交 9f63eced 编写于 作者: H hdx

state(data): 移除 错误的 css 用法,text 组件不支持 flex-direction

上级 7eeb6285
......@@ -25,7 +25,7 @@
</view>
<view class="item">
<text class="type">数组型数据:</text>
<text class="value row" id="arr">{{arr}}</text>
<text class="value" id="arr">{{arr}}</text>
<text>通过for循环显示:</text>
<view class="row" v-for="(item,index) in arr" :key="index" style="padding-left: 10px;">
<text>第{{index}}项目的值:</text>
......@@ -47,30 +47,32 @@
num: 2023 as number,
str: '我是字符串' as string,
obj: { name: 'John', age: 30 } as myObj,
arr: [1,2,3,4,5,6,7] as number[]
arr: [1, 2, 3, 4, 5, 6, 7] as number[]
}
},
onLoad() {
console.log('获取所有 data 中的变量',this.$data);
console.log('获取data中的变量num',this.num);
console.log('获取data中的变量num',this.$data.get('num'));
console.log('获取所有 data 中的变量', this.$data);
console.log('获取data中的变量num', this.num);
console.log('获取data中的变量num', this.$data.get('num'));
}
}
</script>
<style>
.item{
padding: 5px;
flex-direction: row;
flex-wrap: wrap;
position: relative;
border-bottom: 0.1px solid #888;
}
.row{
width: 500rpx;
flex-direction: row;
}
.column{
flex-direction: column;
}
.item {
padding: 5px;
flex-direction: row;
flex-wrap: wrap;
position: relative;
border-bottom: 0.1px solid #888;
}
.row {
width: 500rpx;
flex-direction: row;
}
.column {
flex-direction: column;
}
</style>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册