主题色设置
This commit is contained in:
parent
2bfeeddef4
commit
8afca35cf5
|
|
@ -9,4 +9,7 @@ onError((error) => {
|
|||
console.error(`[PI error]: ${error}`);
|
||||
})
|
||||
</script>
|
||||
<style></style>
|
||||
<style lang="scss">
|
||||
@use '@/style/style.scss';
|
||||
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,12 @@
|
|||
{
|
||||
"easycom": {
|
||||
"autoscan": true,
|
||||
"custom": {
|
||||
// uni-ui 规则如下配置
|
||||
"^uni-(.*)": "@dcloudio/uni-ui/lib/uni-$1/uni-$1.vue"
|
||||
}
|
||||
},
|
||||
|
||||
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
<image class="logo" src="/static/logo.png"/>
|
||||
<view class="text-area">
|
||||
<text class="title">{{ title }}</text>
|
||||
<button type="warn" plain="">{{ title }}</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
|
@ -11,11 +12,14 @@
|
|||
import {ref} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import api from "@/api/index"
|
||||
import globalStore from "@/store/global";
|
||||
|
||||
const {t, locale} = useI18n()
|
||||
const title = ref(t('index.title'))
|
||||
const global = globalStore()
|
||||
|
||||
getInfo()
|
||||
// getInfo()
|
||||
// console.log(global.size)
|
||||
|
||||
async function getInfo() {
|
||||
const res = await api.auth.info()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
import {defineStore} from "pinia";
|
||||
|
||||
const globalStore = defineStore('global', {
|
||||
state: () => ({
|
||||
size: '12px'
|
||||
}),
|
||||
actions: {
|
||||
set_size(val: string) {
|
||||
this.size = val
|
||||
}
|
||||
},
|
||||
persist: true
|
||||
})
|
||||
|
||||
export default globalStore
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
/* 覆盖uni-app主题色 */
|
||||
|
||||
:root {
|
||||
--primary-color: #409EFF;
|
||||
--UI-BG: #fff;
|
||||
--UI-BG-1: #f7f7f7;
|
||||
--UI-BG-2: #fff;
|
||||
--UI-BG-3: #f7f7f7;
|
||||
--UI-BG-4: #4c4c4c;
|
||||
--UI-BG-5: #fff;
|
||||
--UI-FG: #000;
|
||||
--UI-FG-0: rgba(0, 0, 0, 0.9);
|
||||
--UI-FG-HALF: rgba(0, 0, 0, 0.9);
|
||||
--UI-FG-1: rgba(0, 0, 0, 0.5);
|
||||
--UI-FG-2: rgba(0, 0, 0, 0.3);
|
||||
--UI-FG-3: rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
//uni-button[type='warn'] {
|
||||
// background-color: #F56C6C!important;
|
||||
//}
|
||||
|
|
@ -0,0 +1 @@
|
|||
@use "fix.scss";
|
||||
Loading…
Reference in New Issue