Skip to content
广告位招租广告位招租

使用步骤

  • 【步骤】1 - main.uts
ts
import App from './App.uvue'

import { TurboUI } from './uni_modules/turbo-ui/index.uts'

import { createSSRApp } from 'vue'
export function createApp() {
	const app = createSSRApp(App)
	app.use(TurboUI)
	return {
		app
	}
}
  • 【步骤】2 - App.uvue
vue
<script lang="uts">
	export default {
		onLaunch: function () {
			console.log('App Launch')
			// #ifdef APP
			uni.loadFontFace({
				global: true,
				family: "remixicon",
				source: "/uni_modules/turbo-ui/static/iconfonts/remixicon.ttf",
				success: () => {
					console.log("load remixicon success")
				},
				fail: () => {
					console.log("load remixicon fail")
				}
			})
			// #endif
		}
	}
</script>
<style>
/* #ifdef WEB */
@font-face {
	font-family: "remixicon";
	src: url("/static/TurboUIResources/remixicon.ttf");
}
/* #endif */
</style>
  • 【步骤】3 - theme.json
json
{
	"light": {
		"tabBarColor": "#999999",
		"tabBarSelectColor": "#165dff",
		"tabBarBorderColor": "white",
		"navigationBarBackgroundColor": "#f5f5f5",
		"tabBarBackgroundColor": "#ffffff",
		"backgroundColorContent": "#f5f5f5",
		"backgroundColor": "#f5f5f5"
	},
	"dark": {
		"tabBarColor": "#999999",
		"tabBarSelectColor": "#165dff",
		"tabBarBorderColor": "black",
		"navigationBarBackgroundColor": "#000000",
		"tabBarBackgroundColor": "#000000",
		"backgroundColorContent": "#000000",
		"backgroundColor": "#000000"
	}
}