fix: 移除重复的css变量绑定代码并更新注释
由于root插件更新到1.3.4后问题已解决,移除about.vue中重复的css变量绑定代码
This commit is contained in:
@@ -69,18 +69,6 @@ onReady(() => {
|
||||
onShow(() => {
|
||||
console.log('onShow uniKuRoot exposeRef', uniKuRoot.value?.exposeRef)
|
||||
})
|
||||
|
||||
// 备注:本文件内容直接放到 about.vue 页面,在`微信小程序`里面不生效,单独放到一个文件却生效,原因未知
|
||||
// 2025-08-31 经过测试,不适用root插件就可以。
|
||||
const testBindCssVariable = ref('red')
|
||||
function changeTestBindCssVariable() {
|
||||
if (testBindCssVariable.value === 'red') {
|
||||
testBindCssVariable.value = 'green'
|
||||
}
|
||||
else {
|
||||
testBindCssVariable.value = 'red'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template root="uniKuRoot">
|
||||
@@ -99,15 +87,6 @@ function changeTestBindCssVariable() {
|
||||
</button>
|
||||
<RequestComp />
|
||||
<VBindCss />
|
||||
<view class="text-center text-sm text-gray">
|
||||
如下直接写,不生效,如果去掉 root插件也可以。看起来是root插件影响了
|
||||
</view>
|
||||
<button class="mt-4 w-60 text-center" @click="changeTestBindCssVariable">
|
||||
toggle v-bind css变量
|
||||
</button>
|
||||
<view class="test-css my-2 text-center">
|
||||
测试v-bind css变量的具体文案
|
||||
</view>
|
||||
<view class="mb-6 h-1px bg-#eee" />
|
||||
<view class="text-center">
|
||||
<button type="primary" size="mini" class="w-160px" @click="gotoAlova">
|
||||
@@ -137,10 +116,3 @@ function changeTestBindCssVariable() {
|
||||
<view class="h-6" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.test-css {
|
||||
color: v-bind(testBindCssVariable);
|
||||
font-size: 24px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
// 备注:本文件内容直接放到 about.vue 页面,在`微信小程序`里面不生效,单独放到一个文件却生效,原因未知
|
||||
// root 插件更新到 1.3.4之后,都正常了。
|
||||
const testBindCssVariable = ref('red')
|
||||
function changeTestBindCssVariable() {
|
||||
if (testBindCssVariable.value === 'red') {
|
||||
|
||||
Reference in New Issue
Block a user