Files
henan-backend/ruoyi-ui/src/App.vue
T

34 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
/**
* 说明:这里曾经挂着一个隐藏的 <theme-picker />(用 #app .theme-picker{display:none} 藏起来)。
* 它虽然不可见,组件照样会 mount,ThemePicker.created() 里只要 localStorage 的 theme 不等于
* ThemePicker 自己那个 ORIGINAL_THEME 常量,就会:
* 1) XHR 去 https://unpkg.com/element-ui@<version>/lib/theme-chalk/index.css 拉整包默认主题(外网依赖)
* 2) 把拉回来的 CSS 注入成 <style id="chalk-style"> 追加到 head 末尾
* 3) 用正则把页面上所有含旧色的 <style> 标签逐个做字符串替换
* 第 2 步注入的默认主题与本项目皮肤层 skin.scss 同权重但更靠后,会把圆角/配色改回企业蓝方角,
* 导致换肤被部分覆盖。故移除。如需恢复主题色选择器,请连带处理上述覆盖问题。
*/
export default {
name: "App",
metaInfo() {
return {
title:
this.$store.state.settings.dynamicTitle &&
this.$store.state.settings.title,
titleTemplate: title => {
return title
? `${title} - ${process.env.VUE_APP_TITLE}`
: process.env.VUE_APP_TITLE;
}
};
}
};
</script>