diff --git a/src/assets/imgs/icon/icon_drafting_group.png b/src/assets/imgs/icon/icon_drafting_group.png deleted file mode 100644 index 5e47ba0..0000000 Binary files a/src/assets/imgs/icon/icon_drafting_group.png and /dev/null differ diff --git a/src/assets/imgs/icon/icon_drafting_group_act.png b/src/assets/imgs/icon/icon_drafting_group_act.png deleted file mode 100644 index b67bff8..0000000 Binary files a/src/assets/imgs/icon/icon_drafting_group_act.png and /dev/null differ diff --git a/src/components/iconfont/iconfont.css b/src/components/iconfont/iconfont.css index cbb2d5b..b0e4f30 100644 --- a/src/components/iconfont/iconfont.css +++ b/src/components/iconfont/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "anticon-jeecg"; /* Project id 2798517 */ - src: url('iconfont.woff2?t=1631613073967') format('woff2'), - url('iconfont.woff?t=1631613073967') format('woff'), - url('iconfont.ttf?t=1631613073967') format('truetype'); + src: url('iconfont.woff2?t=1705570227820') format('woff2'), + url('iconfont.woff?t=1705570227820') format('woff'), + url('iconfont.ttf?t=1705570227820') format('truetype'); } .anticon-jeecg { @@ -13,6 +13,30 @@ -moz-osx-font-smoothing: grayscale; } +.anticondraftgroup:before { + content: "\e65e"; +} + +.anticonothermeeting:before { + content: "\e621"; +} + +.anticonworking:before { + content: "\e61f"; +} + +.anticoninternational:before { + content: "\e61e"; +} + +.anticondatamembers:before { + content: "\e61d"; +} + +.anticoncommittee:before { + content: "\e613"; +} + .anticonmeeting:before { content: "\e60f"; } diff --git a/src/components/iconfont/iconfont.js b/src/components/iconfont/iconfont.js index 1eb2297..33f5975 100644 --- a/src/components/iconfont/iconfont.js +++ b/src/components/iconfont/iconfont.js @@ -1 +1 @@ -!function(c){var t,e,a,n,o,i='',h=(h=document.getElementsByTagName("script"))[h.length-1].getAttribute("data-injectcss"),l=function(c,t){t.parentNode.insertBefore(c,t)};if(h&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}function m(){o||(o=!0,a())}function d(){try{n.documentElement.doScroll("left")}catch(c){return void setTimeout(d,50)}m()}t=function(){var c,t;(t=document.createElement("div")).innerHTML=i,i=null,(c=t.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",t=c,(c=document.body).firstChild?l(t,c.firstChild):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(e=function(){document.removeEventListener("DOMContentLoaded",e,!1),t()},document.addEventListener("DOMContentLoaded",e,!1)):document.attachEvent&&(a=t,n=c.document,o=!1,d(),n.onreadystatechange=function(){"complete"==n.readyState&&(n.onreadystatechange=null,m())})}(window); \ No newline at end of file +window._iconfont_svg_string_2798517='',function(a){var c=(c=document.getElementsByTagName("script"))[c.length-1],t=c.getAttribute("data-injectcss"),c=c.getAttribute("data-disable-injectsvg");if(!c){var e,o,n,i,l,m=function(c,t){t.parentNode.insertBefore(c,t)};if(t&&!a.__iconfont__svg__cssinject__){a.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(c){console&&console.log(c)}}e=function(){var c,t=document.createElement("div");t.innerHTML=a._iconfont_svg_string_2798517,(t=t.getElementsByTagName("svg")[0])&&(t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.width=0,t.style.height=0,t.style.overflow="hidden",t=t,(c=document.body).firstChild?m(t,c.firstChild):c.appendChild(t))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(e,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),e()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(n=e,i=a.document,l=!1,v(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,h())})}function h(){l||(l=!0,n())}function v(){try{i.documentElement.doScroll("left")}catch(c){return void setTimeout(v,50)}h()}}(window); \ No newline at end of file diff --git a/src/components/iconfont/iconfont.json b/src/components/iconfont/iconfont.json index 0ebc5f0..3d7e5e4 100644 --- a/src/components/iconfont/iconfont.json +++ b/src/components/iconfont/iconfont.json @@ -5,6 +5,48 @@ "css_prefix_text": "anticon", "description": "", "glyphs": [ + { + "icon_id": "3009589", + "name": "cus_draftgroup", + "font_class": "gongzuopai", + "unicode": "e65e", + "unicode_decimal": 58974 + }, + { + "icon_id": "26512409", + "name": "cue_othermeeting", + "font_class": "othermeeting", + "unicode": "e621", + "unicode_decimal": 58913 + }, + { + "icon_id": "26512248", + "name": "cus_working", + "font_class": "working", + "unicode": "e61f", + "unicode_decimal": 58911 + }, + { + "icon_id": "26512241", + "name": "cus_international", + "font_class": "international", + "unicode": "e61e", + "unicode_decimal": 58910 + }, + { + "icon_id": "26512231", + "name": "cus_datamembers", + "font_class": "datamembers", + "unicode": "e61d", + "unicode_decimal": 58909 + }, + { + "icon_id": "26511116", + "name": "cus_committee", + "font_class": "committee", + "unicode": "e613", + "unicode_decimal": 58899 + }, { "icon_id": "24340808", "name": "cus_meeting", diff --git a/src/components/iconfont/iconfont.ttf b/src/components/iconfont/iconfont.ttf index 39f153e..6e7035b 100644 Binary files a/src/components/iconfont/iconfont.ttf and b/src/components/iconfont/iconfont.ttf differ diff --git a/src/components/iconfont/iconfont.woff b/src/components/iconfont/iconfont.woff index b394c4d..ca410f3 100644 Binary files a/src/components/iconfont/iconfont.woff and b/src/components/iconfont/iconfont.woff differ diff --git a/src/components/iconfont/iconfont.woff2 b/src/components/iconfont/iconfont.woff2 index 4d3a5eb..2ef9273 100644 Binary files a/src/components/iconfont/iconfont.woff2 and b/src/components/iconfont/iconfont.woff2 differ diff --git a/src/components/menu/SideMenu.vue b/src/components/menu/SideMenu.vue index 0ca8dd0..ae85b17 100644 --- a/src/components/menu/SideMenu.vue +++ b/src/components/menu/SideMenu.vue @@ -175,11 +175,5 @@ export default { } } } -// icon图片默认是选中的图片,如果没被选中,就设置灰掉 -.ant-menu-item:not(.ant-menu-item-selected) { - .icon-img { - filter: grayscale(100%); - } -} diff --git a/src/components/menu/index.js b/src/components/menu/index.js index 3c03aa8..18ac600 100644 --- a/src/components/menu/index.js +++ b/src/components/menu/index.js @@ -147,13 +147,6 @@ export default { ) }, renderIcon (icon) { - // 图片做菜单icon,cus_img_xxx.png, xxx-act.png放在assets/imgs/icon/ - // (act是激活后的图片,未激活时通过样式置灰) - if (icon !== 'none' && icon !== undefined && icon.indexOf('cus_img_') !== -1) { - const img = require('@/assets/imgs/icon/' + icon.substr(8) + '_act.png') - return () - } if (icon !== 'none' && icon !== undefined && icon.indexOf('cus_') !== -1) { let className = `anticon-jeecg anticon${icon.substr(4)}` return diff --git a/src/components/page/GlobalLayout.vue b/src/components/page/GlobalLayout.vue index 1452577..4ad6e09 100644 --- a/src/components/page/GlobalLayout.vue +++ b/src/components/page/GlobalLayout.vue @@ -696,4 +696,11 @@ body { } } } + +// 自定义图标收小隐藏文字 +.ant-menu-inline-collapsed { + .anticon-jeecg + span { + opacity: 0!important; + } +} diff --git a/src/components/tools/Logo.vue b/src/components/tools/Logo.vue index 36d85ed..7742b79 100644 --- a/src/components/tools/Logo.vue +++ b/src/components/tools/Logo.vue @@ -3,8 +3,8 @@ - logo - logo + logo + logo

{{ title }}

@@ -29,6 +29,16 @@ default: true, required: false } + }, + data() { + return { + smallImg: false + } + }, + watch: { + sidebarOpened(val) { + this.smallImg = !val + } } } @@ -55,5 +65,8 @@ &.light .logo { background-color: @primary-color; } + .smallImg { + height: 16px; + } } \ No newline at end of file diff --git a/src/config/router.config.js b/src/config/router.config.js index 3d4a6e9..58fcc06 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -139,7 +139,7 @@ export const routerData = [ component: 'draftTeam/DraftTeam', route: '1', meta: { - icon: 'cus_img_icon_drafting_group', // 菜单前图标 + icon: 'cus_draftgroup', // 菜单前图标 componentName: 'DraftTeam', keepAlive: false, title: '起草组' // 菜单名称