提交 eb27ca5c 编写于 作者: 雪洛's avatar 雪洛

fix: 调整示例兼容类型定义

上级 ae92c8a1
......@@ -28,18 +28,18 @@
},
changePageHeadBackgroundColor() {
const pageHead = uni.getElementById('page-head')!
pageHead.style['backgroundColor'] = 'red'
pageHead.style.setProperty('background-color', 'red')
},
changeTextColor() {
const text = uni.getElementById('text')!
text.style['color'] = 'red'
text.style.setProperty('color', 'red')
},
changeViewStyle() {
const view = uni.getElementById<UniViewElement>('view')
if (view !== null) {
view.style['width'] = '90%'
view.style['height'] = '50px'
view.style['backgroundColor'] = '#007AFF'
view.style.setProperty('width', '90%')
view.style.setProperty('height', '50px')
view.style.setProperty('backgroundColor', '#007AFF')
}
}
}
......
......@@ -35,18 +35,18 @@
},
changePageHeadBackgroundColor() {
const pageHead = uni.getElementById('page-head')!
pageHead.style['backgroundColor'] = 'red'
pageHead.style.setProperty('background-color', 'red')
},
changeTextColor() {
const text = uni.getElementById('text')!
text.style['color'] = 'red'
text.style.setProperty('color', 'red')
},
changeViewStyle() {
const view = uni.getElementById<UniViewElement>('view')
if (view !== null) {
view.style['width'] = '90%'
view.style['height'] = '50px'
view.style['backgroundColor'] = '#007AFF'
view.style.setProperty('width', '90%')
view.style.setProperty('height', '50px')
view.style.setProperty('background-color', '#007AFF')
}
},
goMultipleRootNode() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册