修改$t为$tn

修改部分函数api的名称
This commit is contained in:
jaylen
2022-11-27 16:58:51 +08:00
parent 72d0c5872a
commit fa70ad608a
92 changed files with 1475 additions and 1461 deletions

View File

@@ -48,9 +48,9 @@
<view class="tn-padding-bottom-lg"></view>
</view>
</view>
</template>
</view>
</template>
<script>
import demoTitle from '@/libs/components/demo-title.vue'
export default {
@@ -68,29 +68,29 @@
methods: {
// 获取随机背景颜色
getRandomBgColor() {
this.randomBgColorClass = this.$t.color.getRandomColorClass()
this.randomBgColorClass = this.$tn.color.getRandomColorClass()
},
// 获取随机颜色
getRandomColor() {
this.randomColorClass = this.$t.color.getRandomColorClass('color')
this.randomColorClass = this.$tn.color.getRandomColorClass('color')
},
// 获取随机酷炫背景颜色
getRandomCoolColor() {
this.randomCoolBgColorClass = this.$t.color.getRandomCoolBgClass()
this.randomCoolBgColorClass = this.$tn.color.getRandomCoolBgClass()
},
// 将hex与rgb互转
convertToRGBOrHex() {
if (this.rgbFlag) {
this.hexRGBValue = this.$t.color.rgbToHex(this.hexRGBValue)
this.hexRGBValue = this.$tn.color.rgbToHex(this.hexRGBValue)
} else {
this.hexRGBValue = this.$t.color.hexToRGB(this.hexRGBValue)
this.hexRGBValue = this.$tn.color.hexToRGB(this.hexRGBValue)
}
this.rgbFlag = !this.rgbFlag
}
}
}
</script>
}
</script>
<style lang="scss" scoped>
.basic-utils__color {
background-color: $tn-bg-gray-color;
@@ -101,5 +101,5 @@
width: auto;
padding: 10rpx 20rpx;
}
}
</style>
}
</style>