菜单图标切换本地 bsch-icons:layout.vue 改用 iconfont 掩码类,刷新 icons.css 图标库;登出地址改为 /cas/logout
build / build (push) Failing after 57s
build / build (push) Failing after 57s
This commit is contained in:
+421
-36
File diff suppressed because one or more lines are too long
+21
-17
@@ -118,7 +118,7 @@ const linkUserInfo = () => {
|
|||||||
};
|
};
|
||||||
const logout = () => {
|
const logout = () => {
|
||||||
let url = window.location.href;
|
let url = window.location.href;
|
||||||
url = "/logout?service=" + url;
|
url = "/cas/logout?service=" + url;
|
||||||
window.location.href = ssoHost.value + url;
|
window.location.href = ssoHost.value + url;
|
||||||
};
|
};
|
||||||
const childChange = (index: number) => {
|
const childChange = (index: number) => {
|
||||||
@@ -129,23 +129,23 @@ const childChange = (index: number) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/** 根据菜单项映射图标:优先按解析后的 page 判断(平台模块 id 不可依赖),
|
/** 根据菜单项映射图标:优先按解析后的 page 判断(平台模块 id 不可依赖),
|
||||||
* 兜底保留旧版 modId 对照 */
|
* 兜底保留旧版 modId 对照。图标为本地 bsch-icons(iconfont 掩码类,见 styles/icons.css) */
|
||||||
const getMenuIcon = (item?: any): string => {
|
const getMenuIcon = (item?: any): string => {
|
||||||
const page: string = item?.page || "";
|
const page: string = item?.page || "";
|
||||||
if (page === "/list/new") return "ios-create";
|
if (page === "/list/new") return "icon-xiugaijl";
|
||||||
if (page === "/list") return "ios-paper-plane";
|
if (page === "/list") return "icon-fasong";
|
||||||
if (page === "/" || page === "/accept") return "ios-mail";
|
if (page === "/" || page === "/accept") return "icon-sjx";
|
||||||
if (page === "/noticelist") return "ios-list";
|
if (page === "/noticelist") return "icon-liebiao";
|
||||||
if (page === "/stats") return "ios-stats";
|
if (page === "/stats") return "icon-tongji";
|
||||||
if (page === "/setting") return "ios-settings";
|
if (page === "/setting") return "icon-shezhi";
|
||||||
switch (item?.modId ?? item?.id) {
|
switch (item?.modId ?? item?.id) {
|
||||||
case 1: return "ios-mail";
|
case 1: return "icon-xiugaijl";
|
||||||
case 2: return "ios-paper-plane";
|
case 2: return "icon-fasong";
|
||||||
case 3: return "ios-list";
|
case 3: return "icon-sjx";
|
||||||
case 4: return "ios-stats";
|
case 4: return "icon-liebiao";
|
||||||
case 5: return "ios-document";
|
case 5: return "icon-wenzhang";
|
||||||
case 21: return "ios-settings";
|
case 21: return "icon-shezhi";
|
||||||
case 22: return "ios-create";
|
case 22: return "icon-xiugaijl";
|
||||||
default: return "";
|
default: return "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -189,7 +189,7 @@ function linkHomePage() {
|
|||||||
<li>
|
<li>
|
||||||
<a href="javascript:;" @click="childChange(index)">
|
<a href="javascript:;" @click="childChange(index)">
|
||||||
<i :class="item.childState ? 'arrow-down' : 'arrow-up'"></i>
|
<i :class="item.childState ? 'arrow-down' : 'arrow-up'"></i>
|
||||||
<Icon v-if="getMenuIcon(item)" :type="getMenuIcon(item)" />
|
<i v-if="getMenuIcon(item)" :class="['iconfont', getMenuIcon(item)]"></i>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -209,7 +209,7 @@ function linkHomePage() {
|
|||||||
</template>
|
</template>
|
||||||
<li v-else :class="item.page == currPath ? 'active' : ''">
|
<li v-else :class="item.page == currPath ? 'active' : ''">
|
||||||
<a href="javascript:;" @click="linkMenu(item)">
|
<a href="javascript:;" @click="linkMenu(item)">
|
||||||
<Icon v-if="getMenuIcon(item)" :type="getMenuIcon(item)" />
|
<i v-if="getMenuIcon(item)" :class="['iconfont', getMenuIcon(item)]"></i>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -262,4 +262,8 @@ function linkHomePage() {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* 仅覆盖/补充必要的动态样式,其余样式由全局 layout.css 提供 */
|
/* 仅覆盖/补充必要的动态样式,其余样式由全局 layout.css 提供 */
|
||||||
|
/* 菜单图标(本地 bsch-icons 掩码类)与文字间距 */
|
||||||
|
.left-menu a .iconfont {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user