如何设置全局主题色 ?
- 方式1: 修改
uni_modules/turbo-core/common/config.uts
ts
/**
* @property {String} primaryColor 主题色
*/
export const TConfig = reactive<TConfigType>({
primaryColor: "rgb(22,93,255)",
} as TConfigType)- 方式2:
ts
如何设置全局尺寸单位 ?
- 方式1: 修改
uni_modules/turbo-core/common/config.uts
ts
/**
* @property {String} unit 单位
*/
export const TConfig = reactive<TConfigType>({
unit: "px",
} as TConfigType)- 方式2:
ts
如何更改暗黑/明亮模式 ?
ts
import { setTheme } from '@/uni_modules/turbo-ui/index.uts'
// "auto" | "light" | "dark"
setTheme("light")
