Bladeren bron

update: menu菜单样式修改

liuyang 2 jaren geleden
bovenliggende
commit
7f47e088cc

+ 2 - 2
examples/App.vue

@ -109,7 +109,7 @@ const commonds = ref<any>([
109 109
  { label: '个人中心', commond: 'user' },
110 110
  { label: '退出登录', commond: 'logout' }
111 111
]);
112
const asideWidth = ref<any>('260px');
112
const asideWidth = ref<any>('240px');
113 113
const isCollapse = ref<any>(false);
114 114
115 115
function handleChangeCollapse(collapse: any) {
@ -117,7 +117,7 @@ function handleChangeCollapse(collapse: any) {
117 117
  if (isCollapse.value) {
118 118
    asideWidth.value = '70px';
119 119
  } else {
120
    asideWidth.value = '260px';
120
    asideWidth.value = '240px';
121 121
  }
122 122
}
123 123
</script>

+ 1 - 2
package.json

@ -1,6 +1,6 @@
1 1
{
2 2
  "name": "common-module-ui",
3
  "version": "0.0.16",
3
  "version": "0.0.17",
4 4
  "author": "devin liu",
5 5
  "license": "ISC",
6 6
  "private": false,
@ -49,7 +49,6 @@
49 49
    "prettier": "^2.7.1",
50 50
    "sass": "^1.57.1",
51 51
    "vite-plugin-eslint": "^1.8.1",
52
    "vue": "^3.2.44",
53 52
    "vite-plugin-svg-icons": "^2.0.1",
54 53
    "vue-clipboard2": "^0.3.3",
55 54
    "vue-router": "^4.1.6"

+ 1 - 0
packages/assets/css/element.scss

@ -20,6 +20,7 @@
20 20
  }
21 21
}
22 22

23

23 24
// radio
24 25
.el-radio {
25 26
  .el-radio__input {

+ 1 - 1
packages/container/CommonContainer.vue

@ -36,7 +36,7 @@ import { defineProps } from 'vue';
36 36
defineProps({
37 37
  asideWidth: {
38 38
    type: String,
39
    default: () => '260px'
39
    default: () => '240px'
40 40
  },
41 41
  isCollapse: {
42 42
    type: Boolean,

+ 1 - 1
packages/layer/CommonLayer.vue

@ -89,7 +89,7 @@ const props = defineProps({
89 89
  },
90 90
  asideWidth: {
91 91
    type: String,
92
    default: () => '260px'
92
    default: () => '240px'
93 93
  }
94 94
});
95 95
const emits = defineEmits(['handleChangeCollapse']);

+ 1 - 1
packages/layer/Header.vue

@ -180,7 +180,7 @@ export default {
180 180
  justify-content: space-between;
181 181
  align-items: center;
182 182
  .h-l {
183
    min-width: 260px;
183
    min-width: 240px;
184 184
    color: #fff;
185 185
    display: flex;
186 186
    .__header-info-logo {

+ 21 - 13
packages/layer/Menu.vue

@ -11,9 +11,9 @@
11 11
    :collapse="isCollapse"
12 12
    router
13 13
    :unique-opened="true"
14
    background-color="#191a20"
15
    text-color="#fff"
16
    active-text-color="#fff"
14
    background-color="#fff"
15
    text-color="#455A74"
16
    active-text-color="#169BFA"
17 17
    @open="handleOpen"
18 18
    @select="handleSelect"
19 19
    @close="handleClose"
@ -63,22 +63,30 @@ export default {
63 63
64 64
<style scoped>
65 65
.el-menu {
66
  height: 100%;
67 66
  border-right: 0;
68 67
  user-select: none;
68
  height: 100%;
69
}
70
:deep(.el-sub-menu .is-active) {
71
  color: #169bfa;
72
  background: rgba(22, 155, 250, 0.1) !important;
69 73
}
70
71 74
:deep(.el-sub-menu, .el-sub-menu__title) {
72
  color: rgba(255, 255, 255, 0.6) !important;
75
  color: #455a74 !important;
76
  height: 40px;
73 77
}
74 78
:deep(.el-menu-item) {
75
  color: rgba(255, 255, 255, 0.6) !important;
76
}
77
:deep(.el-sub-menu__title) {
78
  color: rgba(255, 255, 255, 0.6) !important;
79
  color: #455a74 !important;
80
  height: 40px !important;
81
  line-height: 40px !important;
79 82
}
80
:deep(.is-active) {
81
  color: #fff !important;
82
  background: #169bfa;
83
.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container)
84
  .el-menu-item,
85
.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container)
86
  .el-menu-item-group__title,
87
.el-menu--vertical:not(.el-menu--collapse):not(.el-menu--popup-container)
88
  .el-sub-menu__title {
89
  /* color: #455a74 !important; */
90
  height: 40px !important;
83 91
}
84 92
</style>

+ 17 - 1
packages/layer/MenuItem.vue

@ -54,10 +54,26 @@ export default {
54 54
</script>
55 55
56 56
<style laneg="scss" scoped>
57
.el-menu-item {
57
/* .el-menu-item {
58 58
  color: rgba(255, 255, 255, 0.6);
59
} */
60
.mr-10 {
61
  margin-right: 10px;
62
}
63
64
.el-menu-item {
65
  color: #455a74;
66
  height: 40px !important;
67
  line-height: 40px !important;
68
}
69
.menu-icon {
70
  margin-right: 10px;
59 71
}
60 72
.mr-10 {
61 73
  margin-right: 10px;
62 74
}
75
.menu-icon {
76
  margin-right: 5px;
77
  margin-top: -2px;
78
}
63 79
</style>

+ 1 - 1
packages/panel/Panel.vue

@ -107,7 +107,7 @@ export default {
107 107
  transition: width 0.2s ease-in-out;
108 108
}
109 109
.collapse-right {
110
  width: 260px;
110
  width: 240px;
111 111
  opacity: 1;
112 112
  -webkit-transition: width 0.2s ease-in-out;
113 113
  -moz-transition: width 0.2s ease-in-out;

+ 1 - 1
packages/table/CommonTable.vue

@ -197,7 +197,7 @@ defineProps({
197 197
  }
198 198
});
199 199
function getIcon(name: any) {
200
  return new URL(`../../assets/images/${name}.svg`, import.meta.url).href;
200
  return new URL(`../assets/images/${name}.svg`, import.meta.url).href;
201 201
}
202 202
const emits = defineEmits([
203 203
  'changeEvent',