@lambo-design/pro-layout 1.0.0-beta.237 → 1.0.0-beta.238

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/pro-layout",
3
- "version": "1.0.0-beta.237",
3
+ "version": "1.0.0-beta.238",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -10,8 +10,8 @@
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "devDependencies": {
13
- "@lambo-design/shared": "^1.0.0-beta.119",
14
- "@lambo-design/core": "^4.7.1-beta.118"
13
+ "@lambo-design/shared": "^1.0.0-beta.43",
14
+ "@lambo-design/core": "^4.7.1-beta.59"
15
15
  },
16
16
  "scripts": {}
17
17
  }
@@ -25,10 +25,6 @@ import LamboProNav from './pro-layout-nav'
25
25
  import LamboProNavSildeBtn from './pro-layout-nav-slide-btn'
26
26
  import LamboProTools from './pro-layout-tools'
27
27
  import Bus from "@lambo-design/shared/utils/bus";
28
- import {deepCopy} from "@lambo-design/shared/utils/assist";
29
- import generatorMenuList from "@lambo-design/shared/utils/menu";
30
- import {filterMenuName, filterMenuUri, tagExists} from "@lambo-design/shared/utils/platform";
31
- import {findComponentsDownward} from "@lambo-design/core/src/utils/assist";
32
28
  export default {
33
29
  name: "pro-layout-header",
34
30
  props:{
@@ -40,25 +36,6 @@ export default {
40
36
  data(){
41
37
  return {
42
38
  systemInfo: {},
43
- isShowSearch:'1',
44
- navList: [],
45
- originMenuList:[],
46
- menuList: [],
47
- appId: '',
48
- primaryColor: '#ff0000',
49
- collapsed: false,
50
- accordion: true,
51
- activeName: '',
52
- openedNames: [],
53
- activeMenu: null,
54
- selectedMenuParent: null,
55
- activeMenuItem: null,
56
- openedSubMenu: null,
57
- currentMenuItem: null,
58
- selectedTopParent: '',
59
- activeIcon: null,
60
- tagValue: '',
61
- tagList: []
62
39
  }
63
40
  },
64
41
  components: {
@@ -78,179 +55,14 @@ export default {
78
55
  Bus.$on('system-info',(data)=>{
79
56
  this.initSystem(data)
80
57
  });
81
- Bus.$on('nav-list',(data)=>{
82
- this.initNav(data)
83
- });
84
- Bus.$on('menu-list',(data)=>{
85
- this.initMenu(data)
86
- });
87
- Bus.$on('trigger-change',(data)=>{
88
- this.triggerChange(data)
89
- });
90
- Bus.$on('change-app', ({appId,appInfo})=> {
91
- this.changeApp(appId,appInfo)
92
- })
93
- Bus.$on('tag-list',(data,current)=>{
94
- this.initTags(data,current)
95
- });
96
- Bus.$on('menu-click',(current)=>{
97
- this.menuClick(current)
98
- });
99
58
  },
100
59
  destroyListener(){
101
60
  Bus.$off('system-info')
102
- Bus.$off('nav-list')
103
- Bus.$off('menu-list')
104
- Bus.$off('trigger-change')
105
- Bus.$off('change-app')
106
- Bus.$off('tag-list')
107
- Bus.$off('menu-click')
108
61
  },
109
62
  initSystem(data){
110
63
  if (data) {
111
64
  this.systemInfo = data;
112
- if (data.isShowSearch) {
113
- this.isShowSearch = data.isShowSearch;
114
- }
115
- }
116
- },
117
- initNav(data){
118
- if (data.toString() === this.navList.toString()) {
119
- return;
120
- }
121
- this.navList = data;
122
- },
123
- handleSelect(name,uri,pid){
124
- let menu = null;
125
- if (name.indexOf("isTurnByHref_") > -1) {
126
- name = name.replace("isTurnByHref_","");
127
- menu = filterMenuUri(this.menuList,name);
128
- } else {
129
- menu = filterMenuName(this.menuList,name);
130
65
  }
131
- let tagList = this.tagList;
132
- if (menu && menu.name) {
133
- if (!tagExists(tagList,menu.name)) {
134
- tagList.push(menu);
135
- }
136
- Bus.$emit('tag-list', tagList, menu.name)
137
- }
138
- if (menu.meta && Array.isArray(menu.meta.crumbs)) {
139
- let parentMenu = menu.meta.crumbs[0]
140
- this.$set(this, 'selectedTopParent', parentMenu.name);
141
- } else {
142
- // 处理没有父菜单的情况
143
- this.$set(this, 'selectedTopParent', menu.name);
144
- }
145
- // 如果 uri 为空,则需要根据 pid 判断是展开父菜单还是同时展开父菜单和当前菜单
146
- if (!uri) {
147
- let parentName;
148
- if (pid === 0) {
149
- // 如果 pid 为 0,表示是最外层菜单
150
- parentName = this.getNameOrHref(menu);
151
- //console.log('parentName',parentName)
152
- this.openedNames = [parentName]; // 设置最外层父菜单为展开状态
153
- } else {
154
- // 如果 pid 不等于 0,查找并打开对应的最外层父菜单
155
- parentName = this.getTopParent(menu);
156
- this.openedNames = [parentName]; // 设置最外层父菜单为展开状态
157
- this.activeName = menu.name; // 设置当前菜单为激活状态
158
- }
159
- }
160
- },
161
-
162
- getTopParent(menu) {
163
- return menu.parent ? this.getTopParent(menu.parent) : menu.name;
164
- },
165
- initMenu(data){
166
- if (data && data.length > 0) {
167
- let item = data[0];
168
- if (item.appId && item.appId !== this.appId) {
169
- return;
170
- }
171
- }
172
- this.originMenuList = deepCopy(data);
173
- this.changeMenu()
174
- },
175
- changeApp(appId,appInfo){
176
- this.appId = appId;
177
- this.changeMenu()
178
- },
179
- changeMenu(){
180
- let treeMenuList = generatorMenuList(this.originMenuList,this.appId);
181
- if (treeMenuList && treeMenuList.length > 0) {
182
- this.menuList = treeMenuList;
183
- } else {
184
- this.menuList = [];
185
- }
186
- this.openedNames = this.getOpenedNamesByActiveName();
187
- },
188
- activeIconBackground(item) {
189
- // 如果当前菜单项是激活的,返回一个颜色值,否则返回空
190
- return this.selectedMenuParent=== item.parent ? this.primaryColor : '';
191
- },
192
- triggerChange(data){
193
- this.collapsed = data;
194
- },
195
- initTags(data,name){
196
- this.tagList = data;
197
- this.value = name;
198
- },
199
- menuClick(current) {
200
- let item = this.originMenuList.filter(menu => menu.name === current);
201
- if (item && item.length > 0){
202
- let type = item[0].type;
203
- if (type == 2) {
204
- this.activeName = current;
205
- } else {
206
- let pItem = this.originMenuList.filter(menu => menu.permissionId === item[0].pid);
207
- if (pItem && pItem.length > 0){
208
- this.activeName = pItem[0].name;
209
- }
210
- }
211
- } else {
212
- this.activeName = current;
213
- }
214
- },
215
- getOpenedNamesByActiveName(){
216
- let res = filterMenuName(this.menuList,this.activeName);
217
- let openNames = []
218
- if (res) {
219
- const crumbs = res.meta.crumbs;
220
- if (crumbs) {
221
- crumbs.forEach(item => {
222
- if (item.type === 1) {
223
- openNames.push(item.name)
224
- }
225
- })
226
- }
227
- }
228
- return openNames
229
- },
230
- updateOpened () {
231
- const items = findComponentsDownward(this, 'Submenu');
232
- if (items.length) {
233
- items.forEach(item => {
234
- if (this.openedNames.indexOf(item.name) > -1) item.opened = true;
235
- else item.opened = false;
236
- });
237
- }
238
- },
239
- updateActiveName () {
240
- if (this.currentActiveName === undefined) {
241
- this.currentActiveName = -1;
242
- }
243
- }
244
- },
245
- watch:{
246
- activeName(){
247
- this.openedNames = this.getOpenedNamesByActiveName();
248
- },
249
- openedNames() {
250
- this.$nextTick(() => {
251
- this.updateOpened()
252
- this.updateActiveName()
253
- })
254
66
  }
255
67
  },
256
68
  created(){
@@ -1,89 +1,89 @@
1
- <template>
2
- <div>
3
- <div class="nav-box-slide">
4
- <LamboProNavSlide :accept-int="pointer" @topMen-list="handleCustomEvent" @topMen-num="topMen" @topMen-true="topMenTrue"></LamboProNavSlide>
5
- </div>
6
- <!--slide按钮-->
7
- <div class="tools-box-slide">
8
- <div style="margin-right: 50px;">
9
- <Icon
10
- class="more-menu"
11
- style="margin-right: 10px"
12
- type="md-arrow-dropleft-circle"
13
- v-if="arrowFlag"
14
- @click="moveMenu('left')"
15
- />
16
- <Icon
17
- type="md-arrow-dropright-circle"
18
- class="more-menu"
19
- v-if="arrowFlag"
20
- @click="moveMenu('right')"
21
- />
22
- </div>
23
- </div>
24
- </div>
25
- </template>
26
-
27
- <script>
28
- import LamboProNavSlide from './pro-layout-nav-slide.vue'
29
- export default {
30
- data(){
31
- return {
32
- pointer:0,
33
- topList:[],
34
- topNum:0,
35
- arrowFlag: true,
36
- }
37
- },
38
- components: {
39
- LamboProNavSlide
40
- },
41
- methods:{
42
- handleCustomEvent(data) {
43
- // 接收子组件传递的数据
44
- this.topList = data;
45
- },
46
- topMen(data){
47
- this.topNum = data;
48
- },
49
- topMenTrue(data){
50
- this.arrowFlag = data
51
- },
52
- moveMenu: function (direction) {
53
- if (direction === "right") {
54
- if (this.pointer + this.topNum === this.topList.length) {
55
- return;
56
- }
57
- this.pointer++;
58
- } else {
59
- if (this.pointer === 0) {
60
- return;
61
- }
62
- this.pointer--;
63
- }
64
- this.flag = false;
65
- let self = this;
66
- setTimeout(() => {
67
- self.flag = true;
68
- }, 0);
69
- },
70
-
71
- },
72
- }
73
- </script>
74
-
75
- <style scoped lang="less">
76
-
77
- .more-menu {
78
- color: #d9eeec;
79
- font-size: 22px;
80
- cursor: pointer;
81
- }
82
-
83
- .nav-box-slide{
84
- float: left;
85
- }
86
- .tools-box-slide{
87
- float: right;
88
- }
89
- </style>
1
+ <template>
2
+ <div>
3
+ <div class="nav-box-slide">
4
+ <LamboProNavSlide :accept-int="pointer" @topMen-list="handleCustomEvent" @topMen-num="topMen" @topMen-true="topMenTrue"></LamboProNavSlide>
5
+ </div>
6
+ <!--slide按钮-->
7
+ <div class="tools-box-slide">
8
+ <div style="margin-right: 50px;">
9
+ <Icon
10
+ class="more-menu"
11
+ style="margin-right: 10px"
12
+ type="md-arrow-dropleft-circle"
13
+ v-if="arrowFlag"
14
+ @click="moveMenu('left')"
15
+ />
16
+ <Icon
17
+ type="md-arrow-dropright-circle"
18
+ class="more-menu"
19
+ v-if="arrowFlag"
20
+ @click="moveMenu('right')"
21
+ />
22
+ </div>
23
+ </div>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import LamboProNavSlide from './pro-layout-nav-slide.vue'
29
+ export default {
30
+ data(){
31
+ return {
32
+ pointer:0,
33
+ topList:[],
34
+ topNum:0,
35
+ arrowFlag: true,
36
+ }
37
+ },
38
+ components: {
39
+ LamboProNavSlide
40
+ },
41
+ methods:{
42
+ handleCustomEvent(data) {
43
+ // 接收子组件传递的数据
44
+ this.topList = data;
45
+ },
46
+ topMen(data){
47
+ this.topNum = data;
48
+ },
49
+ topMenTrue(data){
50
+ this.arrowFlag = data
51
+ },
52
+ moveMenu: function (direction) {
53
+ if (direction === "right") {
54
+ if (this.pointer + this.topNum === this.topList.length) {
55
+ return;
56
+ }
57
+ this.pointer++;
58
+ } else {
59
+ if (this.pointer === 0) {
60
+ return;
61
+ }
62
+ this.pointer--;
63
+ }
64
+ this.flag = false;
65
+ let self = this;
66
+ setTimeout(() => {
67
+ self.flag = true;
68
+ }, 0);
69
+ },
70
+
71
+ },
72
+ }
73
+ </script>
74
+
75
+ <style scoped lang="less">
76
+
77
+ .more-menu {
78
+ color: #d9eeec;
79
+ font-size: 22px;
80
+ cursor: pointer;
81
+ }
82
+
83
+ .nav-box-slide{
84
+ float: left;
85
+ }
86
+ .tools-box-slide{
87
+ float: right;
88
+ }
89
+ </style>
@@ -1,245 +1,245 @@
1
- <template>
2
- <div style="margin-left: 53px;">
3
- <div class="menu-list" >
4
- <ul class="top-menu" ref="topNav">
5
- <li class="top-menu-item" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
6
- <div class="menu-item" v-show="pointer <= index && index < pointer + topMenuNum && flag">
7
- <p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
8
- <p class="menu-txt">{{ item.name }}</p>
9
- </div>
10
- </li>
11
- </ul>
12
- </div>
13
- </div>
14
- </template>
15
-
16
- <script>
17
- import Bus from '@lambo-design/shared/utils/bus'
18
- import { deepCopy } from '@lambo-design/shared/utils/assist'
19
-
20
- export default {
21
- name: 'pro-layout-tqm',
22
- props: {
23
- acceptInt: {
24
- type: Number,
25
- default: 0
26
- },
27
- topMenListNum: {
28
- type: Number,
29
- default: 0
30
- }
31
- },
32
- data() {
33
- return {
34
- pointer:0,
35
- flag:true,
36
- arrowFlag: true,
37
- acceptAppId: '',
38
- navList: [],
39
- topMenList: [],
40
- topTqmMenList:[],
41
- otherList: [],
42
- activeName: '',
43
- topMenuNum: 7,
44
- lastTopMenuNum:-1,
45
- originMenuList: []
46
- }
47
- },
48
- methods: {
49
- initListener() {
50
- Bus.$on('system-info',(data) => {
51
- this.initSystemInfo(data);
52
- })
53
- Bus.$on('nav-list', (data) => {
54
- this.initNav(data)
55
- })
56
- Bus.$on('change-app', ({ appId, appInfo }) => {
57
- this.changeApp(appId, appInfo)
58
- })
59
- },
60
- destroyListener() {
61
- Bus.$off('system-info')
62
- Bus.$off('nav-list')
63
- Bus.$off('change-app')
64
- },
65
- initSystemInfo(data) {
66
- if (data) {
67
- this.topMenuNum = data.topMenu ? data.topMenu : 4;
68
- this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
69
- this.initNav(this.navList)
70
- }
71
- },
72
- initNav(data) {
73
- if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
74
- return
75
- }
76
- this.navList = data
77
- this.lastTopMenuNum = this.topMenuNum
78
- if (data.length > this.topMenuNum) {
79
- let navList = deepCopy(data)
80
- this.topMenList = navList
81
- this.$emit('topMen-list', this.topMenList);
82
- this.$emit('topMen-num', this.topMenuNum);
83
- this.$emit('topMen-true', true);
84
- // this.topMenList = navList.splice(0, this.topMenuNum)
85
- // this.otherList = navList
86
- } else {
87
- this.topMenList = this.navList
88
- this.$emit('topMen-true', false);
89
- }
90
- if (this.topMenList.length > 0) {
91
- let appId = this.topMenList[0].appId
92
- for (let i = 0; i < this.topMenList.length; i++) {
93
- if (this.topMenList[i].selected == true) {
94
- appId = this.topMenList[i].appId
95
- }
96
- }
97
- if (this.activeName) {
98
- appId = this.activeName
99
- }
100
- this.selectApp(appId)
101
- }
102
- },
103
- changeApp(appId, appInfo){
104
- this.activeName = appId
105
- },
106
- selectApp(appId) {
107
- this.activeName = appId
108
- let res = this.navList.filter(app => app.appId == appId)
109
- Bus.$emit('change-app', { appId, appInfo: res[0] })
110
- },
111
- },
112
- watch: {
113
- acceptInt(val){
114
- this.pointer = val;
115
- },
116
- acceptAppId(val) {
117
- this.selectApp(val)
118
- }
119
- },
120
- created() {
121
- this.initListener()
122
- },
123
- beforeDestroy() {
124
- this.destroyListener()
125
- }
126
- }
127
- </script>
128
-
129
- <style scoped lang="less">
130
- @import '@lambo-design/core/src/styles/default.less';
131
-
132
- .pro-layout-nav-wrapper {
133
- .ivu-menu {
134
- .ivu-menu-item {
135
- &:hover {
136
- background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
137
-
138
- .line {
139
- border-bottom: 3.35px solid var(--primary-color-tint-5, @_primary-color-tint-5);
140
- position: absolute;
141
- left: 0;
142
- right: 0;
143
- }
144
- }
145
-
146
- &.ivu-menu-item-active, &.ivu-menu-item-selected {
147
- background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
148
-
149
- .line {
150
- border-bottom: 3.35px solid var(--primary-color-tint-5, @_primary-color-tint-5);
151
- position: absolute;
152
- left: 0;
153
- right: 0;
154
- //bottom: 0;
155
- }
156
- }
157
- }
158
-
159
- /deep/ .ivu-menu-submenu {
160
- .ivu-menu-submenu-title > i {
161
- &.ivu-menu-submenu-title-icon {
162
-
163
- }
164
- }
165
-
166
- .ivu-select-dropdown {
167
- background: var(--menu-dark-title, @_menu-dark-title);
168
- color: var(--heading-color-dark, @_heading-color-dark);
169
-
170
- .ivu-menu-drop-list {
171
- .ivu-menu-item {
172
- color: var(--menu-dark-subsidiary-color, @_menu-dark-subsidiary-color);
173
-
174
- &:hover {
175
- background: rgba(255, 255, 255, 0.2);
176
- color: var(--heading-color-dark, @_heading-color-dark);
177
- }
178
-
179
- &.ivu-menu-item-active, &.ivu-menu-item-selected {
180
- background: rgba(255, 255, 255, 0.2);
181
- color: var(--heading-color-dark, @_heading-color-dark);
182
- }
183
- }
184
- }
185
- }
186
- }
187
- }
188
- }
189
-
190
- .menu-list {
191
- height: 100%;
192
- line-height: 24px;
193
- color: #ffffff;
194
- cursor: pointer;
195
- font-size: 16px;
196
- .top-menu {
197
- overflow: hidden;
198
- height: 100%;
199
- .top-menu-item {
200
- position: relative;
201
- height: 100%;
202
- color: #FFFFFF;
203
- list-style: none;
204
- float: left;
205
- &:hover {
206
- background: transparent;
207
- .menu-item {
208
- color: #fff;
209
- }
210
- }
211
- &.active {
212
- background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
213
- border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
214
- .menu-item {
215
- color: #fff;
216
- }
217
- }
218
- .menu-item {
219
- padding: 2px 0px 0px 8px;
220
- margin: 0px 30px;
221
- }
222
- .menu-icon {
223
- height: 20px;
224
- line-height: 20px;
225
- text-align: center;
226
- //position: absolute;
227
- left: 14px;
228
- }
229
- .menu-txt {
230
- text-align: center;
231
- font-size: 14px;
232
- line-height: 2;
233
- }
234
- }
235
- }
236
- }
237
-
238
-
239
-
240
- .more-menu {
241
- color: #d9eeec;
242
- font-size: 22px;
243
- cursor: pointer;
244
- }
245
- </style>
1
+ <template>
2
+ <div style="margin-left: 53px;">
3
+ <div class="menu-list" >
4
+ <ul class="top-menu" ref="topNav">
5
+ <li class="top-menu-item" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
6
+ <div class="menu-item" v-show="pointer <= index && index < pointer + topMenuNum && flag">
7
+ <p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
8
+ <p class="menu-txt">{{ item.name }}</p>
9
+ </div>
10
+ </li>
11
+ </ul>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <script>
17
+ import Bus from '@lambo-design/shared/utils/bus'
18
+ import { deepCopy } from '@lambo-design/shared/utils/assist'
19
+
20
+ export default {
21
+ name: 'pro-layout-tqm',
22
+ props: {
23
+ acceptInt: {
24
+ type: Number,
25
+ default: 0
26
+ },
27
+ topMenListNum: {
28
+ type: Number,
29
+ default: 0
30
+ }
31
+ },
32
+ data() {
33
+ return {
34
+ pointer:0,
35
+ flag:true,
36
+ arrowFlag: true,
37
+ acceptAppId: '',
38
+ navList: [],
39
+ topMenList: [],
40
+ topTqmMenList:[],
41
+ otherList: [],
42
+ activeName: '',
43
+ topMenuNum: 7,
44
+ lastTopMenuNum:-1,
45
+ originMenuList: []
46
+ }
47
+ },
48
+ methods: {
49
+ initListener() {
50
+ Bus.$on('system-info',(data) => {
51
+ this.initSystemInfo(data);
52
+ })
53
+ Bus.$on('nav-list', (data) => {
54
+ this.initNav(data)
55
+ })
56
+ Bus.$on('change-app', ({ appId, appInfo }) => {
57
+ this.changeApp(appId, appInfo)
58
+ })
59
+ },
60
+ destroyListener() {
61
+ Bus.$off('system-info')
62
+ Bus.$off('nav-list')
63
+ Bus.$off('change-app')
64
+ },
65
+ initSystemInfo(data) {
66
+ if (data) {
67
+ this.topMenuNum = data.topMenu ? data.topMenu : 4;
68
+ this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
69
+ this.initNav(this.navList)
70
+ }
71
+ },
72
+ initNav(data) {
73
+ if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
74
+ return
75
+ }
76
+ this.navList = data
77
+ this.lastTopMenuNum = this.topMenuNum
78
+ if (data.length > this.topMenuNum) {
79
+ let navList = deepCopy(data)
80
+ this.topMenList = navList
81
+ this.$emit('topMen-list', this.topMenList);
82
+ this.$emit('topMen-num', this.topMenuNum);
83
+ this.$emit('topMen-true', true);
84
+ // this.topMenList = navList.splice(0, this.topMenuNum)
85
+ // this.otherList = navList
86
+ } else {
87
+ this.topMenList = this.navList
88
+ this.$emit('topMen-true', false);
89
+ }
90
+ if (this.topMenList.length > 0) {
91
+ let appId = this.topMenList[0].appId
92
+ for (let i = 0; i < this.topMenList.length; i++) {
93
+ if (this.topMenList[i].selected == true) {
94
+ appId = this.topMenList[i].appId
95
+ }
96
+ }
97
+ if (this.activeName) {
98
+ appId = this.activeName
99
+ }
100
+ this.selectApp(appId)
101
+ }
102
+ },
103
+ changeApp(appId, appInfo){
104
+ this.activeName = appId
105
+ },
106
+ selectApp(appId) {
107
+ this.activeName = appId
108
+ let res = this.navList.filter(app => app.appId == appId)
109
+ Bus.$emit('change-app', { appId, appInfo: res[0] })
110
+ },
111
+ },
112
+ watch: {
113
+ acceptInt(val){
114
+ this.pointer = val;
115
+ },
116
+ acceptAppId(val) {
117
+ this.selectApp(val)
118
+ }
119
+ },
120
+ created() {
121
+ this.initListener()
122
+ },
123
+ beforeDestroy() {
124
+ this.destroyListener()
125
+ }
126
+ }
127
+ </script>
128
+
129
+ <style scoped lang="less">
130
+ @import '@lambo-design/core/src/styles/default.less';
131
+
132
+ .pro-layout-nav-wrapper {
133
+ .ivu-menu {
134
+ .ivu-menu-item {
135
+ &:hover {
136
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
137
+
138
+ .line {
139
+ border-bottom: 3.35px solid var(--primary-color-tint-5, @_primary-color-tint-5);
140
+ position: absolute;
141
+ left: 0;
142
+ right: 0;
143
+ }
144
+ }
145
+
146
+ &.ivu-menu-item-active, &.ivu-menu-item-selected {
147
+ background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
148
+
149
+ .line {
150
+ border-bottom: 3.35px solid var(--primary-color-tint-5, @_primary-color-tint-5);
151
+ position: absolute;
152
+ left: 0;
153
+ right: 0;
154
+ //bottom: 0;
155
+ }
156
+ }
157
+ }
158
+
159
+ /deep/ .ivu-menu-submenu {
160
+ .ivu-menu-submenu-title > i {
161
+ &.ivu-menu-submenu-title-icon {
162
+
163
+ }
164
+ }
165
+
166
+ .ivu-select-dropdown {
167
+ background: var(--menu-dark-title, @_menu-dark-title);
168
+ color: var(--heading-color-dark, @_heading-color-dark);
169
+
170
+ .ivu-menu-drop-list {
171
+ .ivu-menu-item {
172
+ color: var(--menu-dark-subsidiary-color, @_menu-dark-subsidiary-color);
173
+
174
+ &:hover {
175
+ background: rgba(255, 255, 255, 0.2);
176
+ color: var(--heading-color-dark, @_heading-color-dark);
177
+ }
178
+
179
+ &.ivu-menu-item-active, &.ivu-menu-item-selected {
180
+ background: rgba(255, 255, 255, 0.2);
181
+ color: var(--heading-color-dark, @_heading-color-dark);
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ }
189
+
190
+ .menu-list {
191
+ height: 100%;
192
+ line-height: 24px;
193
+ color: #ffffff;
194
+ cursor: pointer;
195
+ font-size: 16px;
196
+ .top-menu {
197
+ overflow: hidden;
198
+ height: 100%;
199
+ .top-menu-item {
200
+ position: relative;
201
+ height: 100%;
202
+ color: #FFFFFF;
203
+ list-style: none;
204
+ float: left;
205
+ &:hover {
206
+ background: transparent;
207
+ .menu-item {
208
+ color: #fff;
209
+ }
210
+ }
211
+ &.active {
212
+ background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
213
+ border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
214
+ .menu-item {
215
+ color: #fff;
216
+ }
217
+ }
218
+ .menu-item {
219
+ padding: 2px 0px 0px 8px;
220
+ margin: 0px 30px;
221
+ }
222
+ .menu-icon {
223
+ height: 20px;
224
+ line-height: 20px;
225
+ text-align: center;
226
+ //position: absolute;
227
+ left: 14px;
228
+ }
229
+ .menu-txt {
230
+ text-align: center;
231
+ font-size: 14px;
232
+ line-height: 2;
233
+ }
234
+ }
235
+ }
236
+ }
237
+
238
+
239
+
240
+ .more-menu {
241
+ color: #d9eeec;
242
+ font-size: 22px;
243
+ cursor: pointer;
244
+ }
245
+ </style>
package/src/index.vue CHANGED
@@ -290,8 +290,8 @@ export default {
290
290
 
291
291
  <style lang="less">
292
292
  @import "@lambo-design/core/src/styles/default";
293
+ @import "styles/color";
293
294
  .pro-layout{
294
- color: #ffffff;
295
295
  height: 100vh;
296
296
  width: 100%;
297
297
  overflow: hidden;
@@ -311,7 +311,6 @@ export default {
311
311
  height: ~"calc(100vh - 53px)";
312
312
  .pro-layout-page{
313
313
  overflow: hidden;
314
- color: var(--text-color,@_text-color);
315
314
  }
316
315
  }
317
316
  }
@@ -0,0 +1,113 @@
1
+ @import "@lambo-design/core/src/styles/default";
2
+ .pro-layout{
3
+ color: var(--layout-color ,@_layout-color);
4
+ .active {
5
+ color: var(--layout-active-color ,@_layout-active-color);
6
+ }
7
+ .pro-layout-header{
8
+ background: var(--layout-header-background,@_layout-header-background);
9
+ color: var(--layout-header-color ,@_layout-header-color);
10
+ .active {
11
+ color: var(--layout-header-active-color,@_layout-header-active-color);
12
+ }
13
+ .pro-layout-nav-wrapper{
14
+ background: var(--layout-header-background,@_layout-header-background);
15
+ color: var(--layout-header-nav-color,@_layout-header-nav-color);
16
+ .ivu-menu-dark{
17
+ background: var(--layout-header-background,@_layout-header-background);
18
+ color: var(--layout-header-nav-color,@_layout-header-nav-color);
19
+ .ivu-menu-item-active,.ivu-menu-item-selected{
20
+ background: linear-gradient(to bottom, var(--layout-header-nav-active-background-begin,@_layout-header-nav-active-background-begin) 0%, var(--layout-header-nav-active-background-end,@_layout-header-nav-active-background-end) 100%);
21
+ color: var(--layout-header-nav-active-color,@_layout-header-nav-active-color);
22
+ }
23
+ }
24
+ }
25
+ .pro-layout-tools-wrapper{
26
+ .user-avatar-dropdown{
27
+ .ivu-select-dropdown{
28
+ background: var(--layout-header-background,@_layout-header-background);
29
+ color: var(--layout-header-drop-color,@_layout-header-drop-color);
30
+ .ivu-dropdown-item{
31
+ background: var(--layout-header-background,@_layout-header-background);
32
+ color: var(--layout-header-drop-color,@_layout-header-drop-color);
33
+ &.active {
34
+ background: var(--layout-header-drop-active-background,@_layout-header-drop-active-background);
35
+ color: var(--layout-header-drop-active-color,@_layout-header-drop-active-color);
36
+ }
37
+ &:hover {
38
+ background: var(--layout-header-drop-active-background,@_layout-header-drop-active-background);
39
+ color: var(--layout-header-drop-active-color,@_layout-header-drop-active-color);
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ .pro-layout-sider{
48
+ background: var(--layout-sider-background,@_layout-sider-background);
49
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
50
+ .pro-layout-sider-wrapper{
51
+ .ivu-menu-dark{
52
+ background: var(--layout-sider-menu-background,@_layout-sider-menu-background);
53
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
54
+ .ivu-menu-submenu{
55
+ background: var(--layout-sider-submenu-background,@_layout-sider-submenu-background);
56
+ .ivu-menu-submenu-title{
57
+ background: var(--layout-sider-background,@_layout-sider-background);
58
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
59
+ }
60
+ .ivu-menu-item{
61
+ background: var(--layout-sider-menuitem-background,@_layout-sider-menuitem-background);
62
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
63
+ &.ivu-menu-item-active,&.ivu-menu-item-selected{
64
+ background: var(--layout-sider-menuitem-active-background,@_layout-sider-menuitem-active-background);
65
+ color: var(--ayout-sider-menu-active-color,@_ayout-sider-menu-active-color);
66
+ }
67
+ }
68
+ &.ivu-menu-item-active,&.ivu-menu-child-item-active{
69
+ background: var(--layout-sider-submenu-active-background,@_layout-sider-submenu-active-background);
70
+ color: var(--ayout-sider-menu-active-color,@_ayout-sider-menu-active-color);
71
+ }
72
+ }
73
+ }
74
+ .other-menu{
75
+ background: var(--layout-sider-menu-background,@_layout-sider-menu-background);
76
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
77
+ .other-menu-item{
78
+ &:hover {
79
+ background: var(--layout-sider-menuitem-active-background,@_layout-sider-menuitem-active-background);
80
+ color: var(--ayout-sider-menu-active-color,@_ayout-sider-menu-active-color);
81
+ }
82
+ }
83
+ }
84
+ .search-fast-con{
85
+ background: var(--layout-sider-menu-background,@_layout-sider-menu-background);
86
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
87
+ .search-fast-con-side{
88
+ .sideInput{
89
+ .ivu-input{
90
+ background: var(--layout-sider-menu-background,@_layout-sider-menu-background);
91
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+
100
+ .search-fast-con-side-modal{
101
+ .ivu-modal-content{
102
+ background: var(--layout-sider-menu-background,@_layout-sider-menu-background);
103
+ color: var(--layout-sider-menu-color ,@_layout-sider-menu-color);
104
+ .menu-side-style{
105
+ background: var(--layout-sider-menu-background,@_layout-sider-menu-background);
106
+ color: var(--layout-header-drop-color,@_layout-header-drop-color);
107
+ &:hover {
108
+ background: var(--layout-header-drop-active-background,@_layout-header-drop-active-background);
109
+ color: var(--layout-header-drop-active-color,@_layout-header-drop-active-color);
110
+ }
111
+ }
112
+ }
113
+ }