From eb27ca5c3e6fadd78eb5cc05b5ecea3405925fd9 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Fri, 5 Jan 2024 16:15:34 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=B0=83=E6=95=B4=E7=A4=BA=E4=BE=8B?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E7=B1=BB=E5=9E=8B=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../get-element-by-id-multiple-root-node.uvue | 10 +++++----- pages/API/get-element-by-id/get-element-by-id.uvue | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue b/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue index 548e928a..6041bbe1 100644 --- a/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue +++ b/pages/API/get-element-by-id/get-element-by-id-multiple-root-node.uvue @@ -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('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') } } } diff --git a/pages/API/get-element-by-id/get-element-by-id.uvue b/pages/API/get-element-by-id/get-element-by-id.uvue index 0a94e3fe..69e7e04e 100644 --- a/pages/API/get-element-by-id/get-element-by-id.uvue +++ b/pages/API/get-element-by-id/get-element-by-id.uvue @@ -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('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() { -- GitLab