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

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.235",
3
+ "version": "1.0.0-beta.237",
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.43",
14
- "@lambo-design/core": "^4.7.1-beta.59"
13
+ "@lambo-design/shared": "^1.0.0-beta.119",
14
+ "@lambo-design/core": "^4.7.1-beta.118"
15
15
  },
16
16
  "scripts": {}
17
17
  }
@@ -6,13 +6,13 @@
6
6
  <div class="logo-box">
7
7
  <LamboProLogo></LamboProLogo>
8
8
  </div>
9
- <div class="nav-box" v-if="!systemInfo || !systemInfo.navType || systemInfo.navType == 'dropdown'">
9
+ <div class="nav-box" v-show="!systemInfo || !systemInfo.navType || systemInfo.navType == 'dropdown'">
10
10
  <LamboProNav></LamboProNav>
11
11
  </div>
12
12
  <div class="tools-box">
13
13
  <LamboProTools></LamboProTools>
14
14
  </div>
15
- <div v-if="systemInfo && systemInfo.navType && systemInfo.navType == 'slide'">
15
+ <div v-show="systemInfo && systemInfo.navType && systemInfo.navType == 'slide'">
16
16
  <LamboProNavSildeBtn></LamboProNavSildeBtn>
17
17
  </div>
18
18
  </div>
@@ -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,238 +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
- },
57
- destroyListener() {
58
- Bus.$off('system-info')
59
- Bus.$off('nav-list')
60
- },
61
- initSystemInfo(data) {
62
- if (data) {
63
- this.topMenuNum = data.topMenu ? data.topMenu : 4;
64
- this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
65
- this.initNav(this.navList)
66
- }
67
- },
68
- initNav(data) {
69
- if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
70
- return
71
- }
72
- this.navList = data
73
- this.lastTopMenuNum = this.topMenuNum
74
- if (data.length > this.topMenuNum) {
75
- let navList = deepCopy(data)
76
- this.topMenList = navList
77
- this.$emit('topMen-list', this.topMenList);
78
- this.$emit('topMen-num', this.topMenuNum);
79
- this.$emit('topMen-true', true);
80
- // this.topMenList = navList.splice(0, this.topMenuNum)
81
- // this.otherList = navList
82
- } else {
83
- this.topMenList = this.navList
84
- this.$emit('topMen-true', false);
85
- }
86
- if (this.topMenList.length > 0) {
87
- let appId = this.topMenList[0].appId
88
- for (let i = 0; i < this.topMenList.length; i++) {
89
- if (this.topMenList[i].selected == true) {
90
- appId = this.topMenList[i].appId
91
- }
92
- }
93
- if (this.activeName) {
94
- appId = this.activeName
95
- }
96
- this.selectApp(appId)
97
- }
98
- },
99
- selectApp(appId) {
100
- this.activeName = appId
101
- let res = this.navList.filter(app => app.appId == appId)
102
- Bus.$emit('change-app', { appId, appInfo: res[0] })
103
- },
104
- },
105
- watch: {
106
- acceptInt(val){
107
- this.pointer = val;
108
- },
109
- acceptAppId(val) {
110
- this.selectApp(val)
111
- }
112
- },
113
- created() {
114
- this.initListener()
115
- },
116
- beforeDestroy() {
117
- this.destroyListener()
118
- }
119
- }
120
- </script>
121
-
122
- <style scoped lang="less">
123
- @import '@lambo-design/core/src/styles/default.less';
124
-
125
- .pro-layout-nav-wrapper {
126
- .ivu-menu {
127
- .ivu-menu-item {
128
- &:hover {
129
- background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
130
-
131
- .line {
132
- border-bottom: 3.35px solid var(--primary-color-tint-5, @_primary-color-tint-5);
133
- position: absolute;
134
- left: 0;
135
- right: 0;
136
- }
137
- }
138
-
139
- &.ivu-menu-item-active, &.ivu-menu-item-selected {
140
- background: linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 100%);
141
-
142
- .line {
143
- border-bottom: 3.35px solid var(--primary-color-tint-5, @_primary-color-tint-5);
144
- position: absolute;
145
- left: 0;
146
- right: 0;
147
- //bottom: 0;
148
- }
149
- }
150
- }
151
-
152
- /deep/ .ivu-menu-submenu {
153
- .ivu-menu-submenu-title > i {
154
- &.ivu-menu-submenu-title-icon {
155
-
156
- }
157
- }
158
-
159
- .ivu-select-dropdown {
160
- background: var(--menu-dark-title, @_menu-dark-title);
161
- color: var(--heading-color-dark, @_heading-color-dark);
162
-
163
- .ivu-menu-drop-list {
164
- .ivu-menu-item {
165
- color: var(--menu-dark-subsidiary-color, @_menu-dark-subsidiary-color);
166
-
167
- &:hover {
168
- background: rgba(255, 255, 255, 0.2);
169
- color: var(--heading-color-dark, @_heading-color-dark);
170
- }
171
-
172
- &.ivu-menu-item-active, &.ivu-menu-item-selected {
173
- background: rgba(255, 255, 255, 0.2);
174
- color: var(--heading-color-dark, @_heading-color-dark);
175
- }
176
- }
177
- }
178
- }
179
- }
180
- }
181
- }
182
-
183
- .menu-list {
184
- height: 100%;
185
- line-height: 24px;
186
- color: #ffffff;
187
- cursor: pointer;
188
- font-size: 16px;
189
- .top-menu {
190
- overflow: hidden;
191
- height: 100%;
192
- .top-menu-item {
193
- position: relative;
194
- height: 100%;
195
- color: #FFFFFF;
196
- list-style: none;
197
- float: left;
198
- &:hover {
199
- background: transparent;
200
- .menu-item {
201
- color: #fff;
202
- }
203
- }
204
- &.active {
205
- background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
206
- border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
207
- .menu-item {
208
- color: #fff;
209
- }
210
- }
211
- .menu-item {
212
- padding: 2px 0px 0px 8px;
213
- margin: 0px 30px;
214
- }
215
- .menu-icon {
216
- height: 20px;
217
- line-height: 20px;
218
- text-align: center;
219
- //position: absolute;
220
- left: 14px;
221
- }
222
- .menu-txt {
223
- text-align: center;
224
- font-size: 14px;
225
- line-height: 2;
226
- }
227
- }
228
- }
229
- }
230
-
231
-
232
-
233
- .more-menu {
234
- color: #d9eeec;
235
- font-size: 22px;
236
- cursor: pointer;
237
- }
238
- </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>