@lambo-design/pro-layout 1.0.0-beta.48 → 1.0.0-beta.481

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/package.json +11 -4
  2. package/src/components/pro-layout-header/index.vue +224 -0
  3. package/src/components/pro-layout-header/pro-layout-logo/index.vue +206 -0
  4. package/src/components/pro-layout-header/pro-layout-nav/components/pro-layout-nav-slide-menu.vue +398 -0
  5. package/src/components/pro-layout-header/pro-layout-nav/index-slide.vue +226 -0
  6. package/src/components/pro-layout-header/pro-layout-nav/index.vue +564 -0
  7. package/src/components/pro-layout-header/pro-layout-slogan/index.vue +40 -0
  8. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-collect.vue +79 -0
  9. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-document.vue +116 -0
  10. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-fullscreen.vue +144 -0
  11. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-icons.vue +104 -0
  12. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-intl.vue +111 -0
  13. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-notice.vue +133 -0
  14. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-search.vue +305 -0
  15. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-todo.vue +145 -0
  16. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-todoCenter.vue +177 -0
  17. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-user.vue +86 -0
  18. package/src/components/pro-layout-header/pro-layout-tools/index.vue +32 -0
  19. package/src/components/pro-layout-header/pro-layout-trigger/index.vue +84 -0
  20. package/src/components/pro-layout-sider/components/pro-layout-sider-app-name.vue +123 -0
  21. package/src/components/{pro-layout-sider-collapsed-menu.vue → pro-layout-sider/components/pro-layout-sider-collapsed-menu.vue} +30 -11
  22. package/src/components/{pro-layout-sider-icon.vue → pro-layout-sider/components/pro-layout-sider-icon.vue} +2 -2
  23. package/src/components/pro-layout-sider/components/pro-layout-sider-menu-item.vue +139 -0
  24. package/src/components/pro-layout-sider/components/pro-layout-sider-other-menu.vue +140 -0
  25. package/src/components/pro-layout-sider/components/pro-layout-sider-search.vue +345 -0
  26. package/src/components/pro-layout-sider/index.vue +493 -0
  27. package/src/components/{pro-layout-tabs.vue → pro-layout-tabs/index.vue} +121 -23
  28. package/src/index.vue +366 -44
  29. package/src/styles/color.less +267 -0
  30. package/src/styles/images/xiaoxitongzhi.png +0 -0
  31. package/src/styles/other-menu.less +63 -111
  32. package/src/utils/menuItem.js +10 -0
  33. package/src/utils/sider.js +16 -1
  34. package/src/components/pro-layout-header.vue +0 -52
  35. package/src/components/pro-layout-logo.vue +0 -79
  36. package/src/components/pro-layout-nav.vue +0 -150
  37. package/src/components/pro-layout-other-menu.vue +0 -137
  38. package/src/components/pro-layout-sider-menu-item.vue +0 -37
  39. package/src/components/pro-layout-sider.vue +0 -240
  40. package/src/components/pro-layout-tools-user.vue +0 -84
  41. package/src/components/pro-layout-tools.vue +0 -21
  42. package/src/components/pro-layout-trigger.vue +0 -48
package/src/index.vue CHANGED
@@ -1,22 +1,51 @@
1
1
  <template>
2
- <i-layout class="pro-layout" :class="layoutClass">
3
- <i-header class="pro-layout-header">
4
- <LamboProLayoutHeader></LamboProLayoutHeader>
2
+ <i-layout
3
+ class="pro-layout"
4
+ :class="[layoutClass, { 'show-sider-scrollbar': systemInfo.showSiderScrollbar === '1' }]"
5
+ >
6
+ <i-header class="pro-layout-header" :style="systemInfo.headBackground ? headBackgroundStyle : ''">
7
+ <LamboProLayoutHeader :is-home="isHome" :is-show-left-menu="isShowLeftMenu" ref="header">
8
+ <template slot = "pro-layout-trigger">
9
+ <slot name="pro-layout-trigger"></slot>
10
+ </template>
11
+ <template slot = "pro-layout-logo">
12
+ <slot name="pro-layout-logo"></slot>
13
+ </template>
14
+ <template slot = "pro-layout-nav">
15
+ <slot name="pro-layout-nav"></slot>
16
+ </template>
17
+ <template slot = "pro-layout-icons">
18
+ <slot name="pro-layout-icons"></slot>
19
+ </template>
20
+ <template slot="pro-layout-custom-icons">
21
+ <slot name="pro-layout-custom-icons"></slot>
22
+ </template>
23
+ <template slot = "pro-layout-user">
24
+ <slot name="pro-layout-user"></slot>
25
+ </template>
26
+ </LamboProLayoutHeader>
5
27
  </i-header>
6
28
  <i-layout>
7
29
  <i-sider
30
+ v-show="isShowLeftMenu"
8
31
  class="pro-layout-sider"
9
32
  hide-trigger
10
33
  collapsible
11
- :width="220"
34
+ :width="siderWidth"
12
35
  :collapsed-width="64"
13
36
  v-model="collapsed">
14
37
  <LamboProLayoutSider ref="sider"></LamboProLayoutSider>
38
+ <!-- 拖拽条 -->
39
+ <div
40
+ v-show="isShowLeftMenu"
41
+ class="sider-resize-bar"
42
+ @mousedown.stop.prevent="startResize"
43
+ ></div>
15
44
  </i-sider>
16
45
  <i-content class="pro-layout-content">
17
46
  <i-layout class="pro-layout-content-layout">
18
- <div class="pro-layout-tabs">
19
- <LamboProLayoutTabs></LamboProLayoutTabs>
47
+ <div class="pro-layout-tabs" v-show="isShowLeftMenu">
48
+ <LamboProLayoutTabs ref="tabs" :not-single-app="notSingleApp"></LamboProLayoutTabs>
20
49
  </div>
21
50
  <i-content class="pro-layout-page">
22
51
  <slot>
@@ -25,9 +54,15 @@
25
54
  </i-layout>
26
55
  </i-content>
27
56
  </i-layout>
57
+ <!-- 拖拽时的全局捕获层 -->
58
+ <div
59
+ v-if="isResizing"
60
+ class="resize-mask"
61
+ @mousemove="onMouseMove"
62
+ @mouseup="stopResize"
63
+ ></div>
28
64
  </i-layout>
29
65
  </template>
30
-
31
66
  <script>
32
67
  import LamboProLayoutHeader from './components/pro-layout-header'
33
68
  import LamboProLayoutSider from './components/pro-layout-sider'
@@ -35,19 +70,38 @@ import LamboProLayoutTabs from './components/pro-layout-tabs'
35
70
  import Bus from '@lambo-design/shared/utils/bus'
36
71
  import config from "@lambo-design/shared/config/config";
37
72
  import {
38
- getTagNavListFromLocalstorage, routeEqual, tagExists,
73
+ getTagNavListFromLocalstorage, isOpenBlank, routeEqual, tagExists,getTagNavListFromSessionstorage, getTagNavListKey
39
74
  } from "@lambo-design/shared/utils/platform";
40
75
  import {deepCopy} from "@lambo-design/shared/utils/assist";
76
+ import Locale from '@lambo-design/core/src/mixins/locale';
77
+
41
78
  export default {
79
+ mixins: [Locale],
42
80
  props:{
81
+ notSingleApp: {
82
+ type: Boolean,
83
+ default: true
84
+ },
85
+ isHome: {
86
+ type: Boolean,
87
+ default: true
88
+ },
43
89
  systemInfo: {
44
90
  type: Object,
45
91
  default: () => {
46
92
  return {
47
- systemName: '后台管理系统',
93
+ systemName: this.t('pro-layout.common.systemName'),
48
94
  systemLogo: '',
49
95
  layoutSize: '',
50
- tabNum: 8,
96
+ acceptAppId: '',
97
+ tabNum: 5,
98
+ topMenu: 4,
99
+ rightTopOptButtonList: [],
100
+ menuScaling:'1',
101
+ headBackground:'',
102
+ menuLogo: '1',
103
+ titleShow:'wrap',
104
+ showSiderScrollbar: '0' //'1' 显示滚动条,'0' 隐藏滚动条
51
105
  }
52
106
  }
53
107
  },
@@ -59,15 +113,31 @@ export default {
59
113
  type: Array,
60
114
  default: () => []
61
115
  },
116
+ originalAllMenuList: {
117
+ type: Array,
118
+ default: () => []
119
+ },
62
120
  menuList: {
63
121
  type: Array,
64
122
  default: () => []
65
123
  },
124
+ historyMenuList: {
125
+ type: Array,
126
+ default: () => []
127
+ },
128
+ collectMenuList: {
129
+ type: Array,
130
+ default: () => []
131
+ },
66
132
  homeRouter: {
67
133
  type: Object,
68
134
  default: () => {
69
135
  return config.homeRouter
70
136
  }
137
+ },
138
+ otherDatas: {
139
+ type: Object,
140
+ default: () => {}
71
141
  }
72
142
  },
73
143
  data(){
@@ -75,7 +145,12 @@ export default {
75
145
  collapsed: false,
76
146
  appId: '',
77
147
  activeName: '',
78
- tagList: []
148
+ tagList: [],
149
+ isShowLeftMenu: true,
150
+ siderWidth: 220,
151
+ isResizing: false,
152
+ minWidth: 180,
153
+ maxWidth: 600,
79
154
  }
80
155
  },
81
156
  components: {
@@ -85,19 +160,29 @@ export default {
85
160
  },
86
161
  computed: {
87
162
  allData(){
88
- const { systemInfo, userInfo, navList, menuList, homeRouter} = this;
163
+ const { systemInfo, userInfo, navList, originalAllMenuList, menuList, historyMenuList, collectMenuList, homeRouter, otherDatas} = this;
89
164
  return {
90
165
  systemInfo,
91
166
  userInfo,
92
167
  navList,
168
+ originalAllMenuList,
93
169
  menuList,
94
- homeRouter
170
+ historyMenuList,
171
+ collectMenuList,
172
+ homeRouter,
173
+ otherDatas
174
+ }
175
+ },
176
+ headBackgroundStyle(){
177
+ return{
178
+ background: `url(${this.systemInfo.headBackground}) no-repeat`,
179
+ backgroundSize: 'cover',
95
180
  }
96
181
  },
97
182
  layoutClass(){
98
183
  if (this.systemInfo && this.systemInfo.layoutSize) {
99
184
  let layoutSize = this.systemInfo.layoutSize;
100
- if (layoutSize == 'default') {
185
+ if (layoutSize === 'default') {
101
186
  return '';
102
187
  } else {
103
188
  return 'small';
@@ -113,9 +198,49 @@ export default {
113
198
  },
114
199
  immediate: true,
115
200
  deep: true
201
+ },
202
+ collapsed(val) {
203
+ if (val) {
204
+ this.siderWidth = 64
205
+ } else {
206
+ const savedWidth = localStorage.getItem('siderWidth')
207
+ this.siderWidth = savedWidth ? parseInt(savedWidth) : 220
208
+ }
209
+ },
210
+ isHome: {
211
+ handler() {
212
+ if (this.isHome) {
213
+ this.isShowLeftMenu = false
214
+ }
215
+ },
216
+ immediate: true
116
217
  }
117
218
  },
118
219
  methods: {
220
+ startResize(e) {
221
+ e.preventDefault()
222
+ e.stopPropagation()
223
+
224
+ this.isResizing = true
225
+ this.startX = e.clientX
226
+ this.startWidth = this.siderWidth
227
+ },
228
+
229
+ onMouseMove(e) {
230
+ if (!this.isResizing) return
231
+
232
+ const moveX = e.clientX - this.startX
233
+ const newWidth = this.startWidth + moveX
234
+
235
+ if (newWidth < this.minWidth) return
236
+ if (newWidth > this.maxWidth) return
237
+
238
+ this.siderWidth = newWidth
239
+ },
240
+
241
+ stopResize() {
242
+ this.isResizing = false
243
+ },
119
244
  initListener(){
120
245
  Bus.$on('trigger-change',(data)=>{
121
246
  this.triggerChange(data)
@@ -132,6 +257,36 @@ export default {
132
257
  Bus.$on('tag-list',(data,current)=>{
133
258
  this.changeTabs(data,current)
134
259
  });
260
+ Bus.$on('get-history-menu-list',() => {
261
+ this.getHistoryMenuList()
262
+ })
263
+ Bus.$on('delete-history-menu',(data) => {
264
+ this.deleteHistoryMenu(data)
265
+ })
266
+ Bus.$on('delete-collect-menu',(data) => {
267
+ this.deleteCollectMenu(data)
268
+ })
269
+ Bus.$on('toggle-collect-menu',(actionType,data) => {
270
+ this.toggleCollectMenu(actionType,data)
271
+ })
272
+ Bus.$on('click-logo',()=>{
273
+ this.clickLogo();
274
+ })
275
+ Bus.$on('other-operate',(type,data)=>{
276
+ this.otherOperate(type,data);
277
+ })
278
+ Bus.$on('change-search-keyword',(keyword,tab)=>{
279
+ this.$emit('other-operate','search-keyword',{
280
+ keyword:keyword,
281
+ tab:tab
282
+ })
283
+ })
284
+ Bus.$on('change-search-tab',(keyword,tab)=>{
285
+ this.$emit('other-operate','search-keyword',{
286
+ keyword:keyword,
287
+ tab:tab
288
+ })
289
+ })
135
290
  },
136
291
  destroyListener(){
137
292
  Bus.$off('trigger-change')
@@ -139,15 +294,35 @@ export default {
139
294
  Bus.$off('user-action')
140
295
  Bus.$off('menu-click')
141
296
  Bus.$off('tag-list')
297
+ Bus.$off('get-history-menu-list')
298
+ Bus.$off('delete-history-menu')
299
+ Bus.$off('delete-collect-menu')
300
+ Bus.$off('toggle-collect-menu')
301
+ Bus.$off('click-logo')
302
+ Bus.$off('other-operate')
303
+ Bus.$off('change-keyword')
304
+ Bus.$off('change-tab')
142
305
  },
143
306
  initEmit(){
307
+ //在这里改this.menuList
144
308
  Bus.$emit('system-info',this.systemInfo)
145
309
  Bus.$emit('user-info',this.userInfo)
146
310
  Bus.$emit('nav-list',this.navList)
147
- Bus.$emit('menu-list',this.menuList)
311
+ this.menuList.map(item => {
312
+ // 如果 uri 不以 '/' 开头,添加 '/'
313
+ if (item.uri&&!item.uri.startsWith('/')&&!item.uri.startsWith('http')) {
314
+ item.uri = '/' + item.uri;
315
+ }
316
+ });
317
+ Bus.$emit('origin-all-menu-list',this.originalAllMenuList);
318
+ Bus.$emit('menu-list',this.menuList);
319
+ Bus.$emit('history-menu-list',this.historyMenuList);
320
+ Bus.$emit('collect-menu-list',this.collectMenuList);
321
+ Bus.$emit('other-datas',this.otherDatas)
148
322
  },
149
323
  initTags(){
150
- let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
324
+ // let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
325
+ let tagList = getTagNavListFromSessionstorage(getTagNavListKey());
151
326
  if (tagList.length == 0) {
152
327
  tagList.push(this.homeRouter);
153
328
  }
@@ -165,6 +340,25 @@ export default {
165
340
  if (!appInfo) {
166
341
  appInfo = this.navList.filter(item => item.appId == appId)[0];
167
342
  }
343
+ let appConfig={}
344
+ //sc中台
345
+ if(appInfo && appInfo.extendProps){
346
+ appConfig=appInfo.extendProps
347
+ }
348
+ //x1中台
349
+ if(appInfo && appInfo.setting){
350
+ appConfig=JSON.parse(appInfo.setting)
351
+ }
352
+
353
+ // 优先使用 appConfig最后使用默认值
354
+ if (appConfig && appConfig.hasOwnProperty("is_hide_left_menu")){
355
+ this.isShowLeftMenu = appConfig.is_hide_left_menu != '1'
356
+ } else if (appId == 'backHome'){
357
+ this.isShowLeftMenu = false
358
+ } else {
359
+ this.isShowLeftMenu = true
360
+ }
361
+
168
362
  this.appId = appId;
169
363
  this.$emit('change-app',{appId,appInfo})
170
364
  },
@@ -173,18 +367,21 @@ export default {
173
367
  },
174
368
  menuClick(name, item){
175
369
  if (!item) {
176
- let res = this.menuList.filter(item => item.name == name);
370
+ let res = this.menuList.filter(item => item.name == name );
177
371
  if (res && res.length > 0) {
178
372
  item = res[0];
179
373
  }
180
374
  }
181
- sessionStorage.setItem('activeName',name);
375
+ if (!isOpenBlank(item)) {
376
+ sessionStorage.setItem('activeName',name);
377
+ }
182
378
  this.$emit('menu-click', name, item)
183
379
  },
184
380
  changeTabs(data,current){
381
+ // data = data.filter(item => item.name === current);
185
382
  this.$emit('change-tabs',data,current)
186
383
  },
187
- openMenuInTabs(menu){
384
+ openMenuInTabs(menu,forceUpdate = false){
188
385
  let name = '';
189
386
  let menuItem = {};
190
387
  if (typeof menu === 'string') {
@@ -194,27 +391,53 @@ export default {
194
391
  menuItem = res[0];
195
392
  }
196
393
  this.$refs.sider.handleSelect(name);
197
- } else {
394
+ } else if (menu && menu.name){
198
395
  name = menu.name;
199
396
  menuItem = deepCopy(menu);
200
- let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
397
+ // let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
398
+ let tagList = getTagNavListFromSessionstorage(getTagNavListKey());
201
399
  if (!tagExists(tagList,name)) {
202
400
  tagList.push(menuItem);
203
401
  } else {
204
402
  let tag = tagList.filter(item => item.name == name)[0];
205
- if (!routeEqual(tag,menuItem)) {
403
+ if (forceUpdate || (!routeEqual(tag,menuItem) && 'home' != name)) {
206
404
  let res = tagList.filter(item => item.name !== name);
207
405
  tag = Object.assign(tag, menu);
406
+ tag.cts = new Date().getTime();
208
407
  res.push(tag);
209
408
  tagList = deepCopy(res);
210
409
  }
211
410
  }
411
+
212
412
  Bus.$emit('tag-list', tagList, name)
213
413
  }
414
+ },
415
+ getHistoryMenuList(){
416
+ this.$emit('get-history-menu-list');
417
+ },
418
+ deleteHistoryMenu(data){
419
+ this.$emit('delete-history-menu',data);
420
+ },
421
+ deleteCollectMenu(data){
422
+ this.$emit('delete-collect-menu',data);
423
+ },
424
+ toggleCollectMenu(actionType,data){
425
+ this.$emit('toggle-collect-menu',actionType,data);
426
+ },
427
+ clickLogo(){
428
+ this.$emit('click-logo')
429
+ },
430
+ otherOperate(type,data){
431
+ this.$emit('other-operate', type, data)
214
432
  }
215
433
  },
216
434
  mounted(){
217
435
  this.initTags();
436
+ const savedWidth = localStorage.getItem('siderWidth')
437
+ if (savedWidth) {
438
+ this.siderWidth = parseInt(savedWidth)
439
+ }
440
+ this.initEmit();
218
441
  },
219
442
  created(){
220
443
  this.initListener();
@@ -227,36 +450,72 @@ export default {
227
450
 
228
451
  <style lang="less">
229
452
  @import "@lambo-design/core/src/styles/default";
230
- .pro-layout{
231
- color: #ffffff;
453
+ @import "styles/color";
454
+ .resize-mask {
455
+ position: fixed;
456
+ left: 0;
457
+ top: 0;
458
+ width: 100vw;
459
+ height: 100vh;
460
+ z-index: 999999;
461
+ background: transparent;
462
+ cursor: col-resize;
463
+ }
464
+ .sider-resize-bar {
465
+ position: absolute;
466
+ right: -3px;
467
+ top: 0;
468
+ width: 6px;
469
+ height: 100%;
470
+ cursor: col-resize;
471
+ z-index: 99999;
472
+ background: transparent;
473
+ }
474
+
475
+ .sider-resize-bar:hover {
476
+ background: #ddd;
477
+ }
478
+
479
+ .pro-layout {
232
480
  height: 100vh;
233
481
  width: 100%;
234
482
  overflow: hidden;
483
+ min-width: 1100px;
235
484
  .ivu-layout-header{
236
485
  padding: 0;
237
486
  }
238
- .pro-layout-sider{
487
+ .pro-layout-sider {
239
488
  overflow: hidden;
240
- .ivu-layout-sider-children{
489
+ position: relative;
490
+ .ivu-layout-sider-children {
241
491
  height: calc(100vh - 65px);
242
492
  overflow-y: scroll;
243
493
  margin-right: -18px;
494
+ padding-right: 17px;
495
+
496
+ &::-webkit-scrollbar {
497
+ /* 隐藏默认的滚动条 */
498
+ display: none;
499
+ }
500
+ // Firefox 隐藏
501
+ scrollbar-width: none;
502
+ // IE/Edge 隐藏
503
+ -ms-overflow-style: none;
244
504
  }
245
505
  }
246
- .pro-layout-content{
247
- .pro-layout-content-layout{
248
- height: ~"calc(100vh - 53px)";
506
+ .pro-layout-content {
507
+ .pro-layout-content-layout {
508
+ height: calc(100vh - 65px);
249
509
  .pro-layout-page{
250
510
  overflow: hidden;
251
- color: var(--text-color,@_text-color);
252
511
  }
253
512
  }
254
513
  }
255
514
  &.small {
256
- .ivu-layout-header{
515
+ .ivu-layout-header {
257
516
  height: 50px;
258
517
  line-height: 50px;
259
- .pro-layout-header-wrapper{
518
+ .pro-layout-header-wrapper {
260
519
  height: 50px;
261
520
  .trigger-box{
262
521
  .sider-trigger-a{
@@ -265,31 +524,94 @@ export default {
265
524
  height: 50px;
266
525
  }
267
526
  }
268
- .logo-box{
269
- .pro-layout-logo-wrapper{
270
- .logo{
271
- height: 45px;
272
- margin-top: 14px;
527
+ .logo-box {
528
+ .pro-layout-logo-wrapper {
529
+ .logo {
530
+ height: 40px;
273
531
  }
274
- .divider{
532
+ .divider {
275
533
  height: 26px;
276
534
  margin: 12px;
277
535
  }
278
536
  }
279
537
  }
280
- .nav-box{
281
- .pro-layout-nav-wrapper{
282
- .ivu-menu-horizontal{
538
+ .nav-box {
539
+ .pro-layout-nav-wrapper {
540
+ .ivu-menu-horizontal {
283
541
  height: 46px;
284
- line-height: 46px;
542
+ line-height: var(--layout-menu-item-horizontal-line-height,@_layout-menu-item-horizontal-line-height);
285
543
  }
286
544
  }
287
545
  }
288
546
  }
289
547
  }
290
- .pro-layout-sider{
291
- .ivu-layout-sider-children{
548
+ .pro-layout-sider {
549
+ .ivu-layout-sider-children {
292
550
  height: calc(100vh - 50px);
551
+ padding-right: 17px;
552
+
553
+ &::-webkit-scrollbar {
554
+ /* 隐藏默认的滚动条 */
555
+ display: none;
556
+ }
557
+ }
558
+ }
559
+ .pro-layout-content {
560
+ .pro-layout-content-layout {
561
+ height: calc(100vh - 50px);
562
+ .pro-layout-page{
563
+ overflow: hidden;
564
+ }
565
+ }
566
+ }
567
+ }
568
+
569
+ // 通过 systemInfo 控制显示滚动条
570
+ &.show-sider-scrollbar {
571
+ .pro-layout-sider {
572
+ .ivu-layout-sider-children {
573
+ // 移除隐藏的 hack
574
+ margin-right: 0;
575
+ padding-right: 0;
576
+ overflow-y: auto;
577
+
578
+ &::-webkit-scrollbar {
579
+ display: block;
580
+ width: 6px;
581
+ height: 6px;
582
+ }
583
+
584
+ &::-webkit-scrollbar-track {
585
+ background: transparent;
586
+ border-radius: 3px;
587
+ }
588
+
589
+ &::-webkit-scrollbar-thumb {
590
+ background: #c1c1c1;
591
+ border-radius: 3px;
592
+ transition: background 0.2s;
593
+ }
594
+
595
+ &::-webkit-scrollbar-thumb:hover {
596
+ background: #a8a8a8;
597
+ }
598
+
599
+ // Firefox 显示
600
+ scrollbar-width: auto;
601
+ scrollbar-color: #c1c1c1 transparent;
602
+ }
603
+ }
604
+
605
+ &.small {
606
+ .pro-layout-sider {
607
+ .ivu-layout-sider-children {
608
+ padding-right: 0;
609
+
610
+ &::-webkit-scrollbar {
611
+ display: block;
612
+ width: 6px;
613
+ }
614
+ }
293
615
  }
294
616
  }
295
617
  }