Browse Source

update: menu菜单样式修改

liuyang 2 years ago
parent
commit
7f47e088cc

+ 2 - 2
examples/App.vue

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

+ 1 - 2
package.json

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

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

20
  }
20
  }
21
}
21
}
22

22

23

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

+ 1 - 1
packages/container/CommonContainer.vue

36
defineProps({
36
defineProps({
37
  asideWidth: {
37
  asideWidth: {
38
    type: String,
38
    type: String,
39
    default: () => '260px'
39
    default: () => '240px'
40
  },
40
  },
41
  isCollapse: {
41
  isCollapse: {
42
    type: Boolean,
42
    type: Boolean,

+ 1 - 1
packages/layer/CommonLayer.vue

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

+ 1 - 1
packages/layer/Header.vue

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

+ 21 - 13
packages/layer/Menu.vue

11
    :collapse="isCollapse"
11
    :collapse="isCollapse"
12
    router
12
    router
13
    :unique-opened="true"
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
    @open="handleOpen"
17
    @open="handleOpen"
18
    @select="handleSelect"
18
    @select="handleSelect"
19
    @close="handleClose"
19
    @close="handleClose"
63
63
64
<style scoped>
64
<style scoped>
65
.el-menu {
65
.el-menu {
66
  height: 100%;
67
  border-right: 0;
66
  border-right: 0;
68
  user-select: none;
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
:deep(.el-sub-menu, .el-sub-menu__title) {
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
:deep(.el-menu-item) {
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
</style>
92
</style>

+ 17 - 1
packages/layer/MenuItem.vue

54
</script>
54
</script>
55
55
56
<style laneg="scss" scoped>
56
<style laneg="scss" scoped>
57
.el-menu-item {
57
/* .el-menu-item {
58
  color: rgba(255, 255, 255, 0.6);
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
.mr-10 {
72
.mr-10 {
61
  margin-right: 10px;
73
  margin-right: 10px;
62
}
74
}
75
.menu-icon {
76
  margin-right: 5px;
77
  margin-top: -2px;
78
}
63
</style>
79
</style>

+ 1 - 1
packages/panel/Panel.vue

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

+ 1 - 1
packages/table/CommonTable.vue

197
  }
197
  }
198
});
198
});
199
function getIcon(name: any) {
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
const emits = defineEmits([
202
const emits = defineEmits([
203
  'changeEvent',
203
  'changeEvent',