@lambo-design/pro-layout 1.0.0-beta.253 → 1.0.0-beta.255

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.253",
3
+ "version": "1.0.0-beta.255",
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.130",
14
+ "@lambo-design/core": "^4.7.1-beta.126"
15
15
  },
16
16
  "scripts": {}
17
17
  }
@@ -1,89 +1,89 @@
1
- <template>
2
- <div class="pro-layout-nav-slide-wrapper">
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 class="pro-layout-nav-slide-wrapper">
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,176 +1,176 @@
1
- <template>
2
- <div class="menu-list" >
3
- <ul class="top-menu" ref="topNav">
4
- <li class="top-menu-item" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
5
- <div class="menu-item" v-show="pointer <= index && index < pointer + topMenuNum && flag">
6
- <p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
7
- <p class="menu-txt">{{ item.name }}</p>
8
- </div>
9
- </li>
10
- </ul>
11
- </div>
12
- </template>
13
-
14
- <script>
15
- import Bus from '@lambo-design/shared/utils/bus'
16
- import { deepCopy } from '@lambo-design/shared/utils/assist'
17
-
18
- export default {
19
- props: {
20
- acceptInt: {
21
- type: Number,
22
- default: 0
23
- },
24
- topMenListNum: {
25
- type: Number,
26
- default: 0
27
- }
28
- },
29
- data() {
30
- return {
31
- pointer:0,
32
- flag:true,
33
- arrowFlag: true,
34
- acceptAppId: '',
35
- navList: [],
36
- topMenList: [],
37
- topTqmMenList:[],
38
- otherList: [],
39
- activeName: '',
40
- topMenuNum: 7,
41
- lastTopMenuNum:-1,
42
- originMenuList: []
43
- }
44
- },
45
- methods: {
46
- initListener() {
47
- Bus.$on('system-info',(data) => {
48
- this.initSystemInfo(data);
49
- })
50
- Bus.$on('nav-list', (data) => {
51
- this.initNav(data)
52
- })
53
- Bus.$on('change-app', ({ appId, appInfo }) => {
54
- this.changeApp(appId, appInfo)
55
- })
56
- },
57
- destroyListener() {
58
- Bus.$off('system-info')
59
- Bus.$off('nav-list')
60
- Bus.$off('change-app')
61
- },
62
- initSystemInfo(data) {
63
- if (data) {
64
- this.topMenuNum = data.topMenu ? data.topMenu : 4;
65
- this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
66
- this.initNav(this.navList)
67
- }
68
- },
69
- initNav(data) {
70
- if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
71
- return
72
- }
73
- this.navList = data
74
- this.lastTopMenuNum = this.topMenuNum
75
- if (data.length > this.topMenuNum) {
76
- let navList = deepCopy(data)
77
- this.topMenList = navList
78
- this.$emit('topMen-list', this.topMenList);
79
- this.$emit('topMen-num', this.topMenuNum);
80
- this.$emit('topMen-true', true);
81
- // this.topMenList = navList.splice(0, this.topMenuNum)
82
- // this.otherList = navList
83
- } else {
84
- this.topMenList = this.navList
85
- this.$emit('topMen-true', false);
86
- }
87
- if (this.topMenList.length > 0) {
88
- let appId = this.topMenList[0].appId
89
- for (let i = 0; i < this.topMenList.length; i++) {
90
- if (this.topMenList[i].selected == true) {
91
- appId = this.topMenList[i].appId
92
- }
93
- }
94
- if (this.activeName) {
95
- appId = this.activeName
96
- }
97
- this.selectApp(appId)
98
- }
99
- },
100
- changeApp(appId, appInfo){
101
- this.activeName = appId
102
- },
103
- selectApp(appId) {
104
- this.activeName = appId
105
- let res = this.navList.filter(app => app.appId == appId)
106
- Bus.$emit('change-app', { appId, appInfo: res[0] })
107
- },
108
- },
109
- watch: {
110
- acceptInt(val){
111
- this.pointer = val;
112
- },
113
- acceptAppId(val) {
114
- this.selectApp(val)
115
- }
116
- },
117
- created() {
118
- this.initListener()
119
- },
120
- beforeDestroy() {
121
- this.destroyListener()
122
- }
123
- }
124
- </script>
125
-
126
- <style scoped lang="less">
127
- @import '@lambo-design/core/src/styles/default.less';
128
- .menu-list {
129
- height: 100%;
130
- line-height: 24px;
131
- //color: #ffffff;
132
- cursor: pointer;
133
- font-size: 16px;
134
- margin-left: 53px;
135
- .top-menu {
136
- overflow: hidden;
137
- height: 100%;
138
- .top-menu-item {
139
- position: relative;
140
- height: 100%;
141
- //color: #FFFFFF;
142
- list-style: none;
143
- float: left;
144
- &:hover {
145
- //background: transparent;
146
- .menu-item {
147
- //color: #fff;
148
- }
149
- }
150
- &.active {
151
- //background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
152
- //border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
153
- .menu-item {
154
- //color: #fff;
155
- }
156
- }
157
- .menu-item {
158
- padding: 2px 0px 0px 8px;
159
- margin: 0px 30px;
160
- }
161
- .menu-icon {
162
- height: 20px;
163
- line-height: 20px;
164
- text-align: center;
165
- //position: absolute;
166
- left: 14px;
167
- }
168
- .menu-txt {
169
- text-align: center;
170
- font-size: 14px;
171
- line-height: 2;
172
- }
173
- }
174
- }
175
- }
176
- </style>
1
+ <template>
2
+ <div class="menu-list" >
3
+ <ul class="top-menu" ref="topNav">
4
+ <li class="top-menu-item" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
5
+ <div class="menu-item" v-show="pointer <= index && index < pointer + topMenuNum && flag">
6
+ <p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
7
+ <p class="menu-txt">{{ item.name }}</p>
8
+ </div>
9
+ </li>
10
+ </ul>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import Bus from '@lambo-design/shared/utils/bus'
16
+ import { deepCopy } from '@lambo-design/shared/utils/assist'
17
+
18
+ export default {
19
+ props: {
20
+ acceptInt: {
21
+ type: Number,
22
+ default: 0
23
+ },
24
+ topMenListNum: {
25
+ type: Number,
26
+ default: 0
27
+ }
28
+ },
29
+ data() {
30
+ return {
31
+ pointer:0,
32
+ flag:true,
33
+ arrowFlag: true,
34
+ acceptAppId: '',
35
+ navList: [],
36
+ topMenList: [],
37
+ topTqmMenList:[],
38
+ otherList: [],
39
+ activeName: '',
40
+ topMenuNum: 7,
41
+ lastTopMenuNum:-1,
42
+ originMenuList: []
43
+ }
44
+ },
45
+ methods: {
46
+ initListener() {
47
+ Bus.$on('system-info',(data) => {
48
+ this.initSystemInfo(data);
49
+ })
50
+ Bus.$on('nav-list', (data) => {
51
+ this.initNav(data)
52
+ })
53
+ Bus.$on('change-app', ({ appId, appInfo }) => {
54
+ this.changeApp(appId, appInfo)
55
+ })
56
+ },
57
+ destroyListener() {
58
+ Bus.$off('system-info')
59
+ Bus.$off('nav-list')
60
+ Bus.$off('change-app')
61
+ },
62
+ initSystemInfo(data) {
63
+ if (data) {
64
+ this.topMenuNum = data.topMenu ? data.topMenu : 4;
65
+ this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
66
+ this.initNav(this.navList)
67
+ }
68
+ },
69
+ initNav(data) {
70
+ if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
71
+ return
72
+ }
73
+ this.navList = data
74
+ this.lastTopMenuNum = this.topMenuNum
75
+ if (data.length > this.topMenuNum) {
76
+ let navList = deepCopy(data)
77
+ this.topMenList = navList
78
+ this.$emit('topMen-list', this.topMenList);
79
+ this.$emit('topMen-num', this.topMenuNum);
80
+ this.$emit('topMen-true', true);
81
+ // this.topMenList = navList.splice(0, this.topMenuNum)
82
+ // this.otherList = navList
83
+ } else {
84
+ this.topMenList = this.navList
85
+ this.$emit('topMen-true', false);
86
+ }
87
+ if (this.topMenList.length > 0) {
88
+ let appId = this.topMenList[0].appId
89
+ for (let i = 0; i < this.topMenList.length; i++) {
90
+ if (this.topMenList[i].selected == true) {
91
+ appId = this.topMenList[i].appId
92
+ }
93
+ }
94
+ if (this.activeName) {
95
+ appId = this.activeName
96
+ }
97
+ this.selectApp(appId)
98
+ }
99
+ },
100
+ changeApp(appId, appInfo){
101
+ this.activeName = appId
102
+ },
103
+ selectApp(appId) {
104
+ this.activeName = appId
105
+ let res = this.navList.filter(app => app.appId == appId)
106
+ Bus.$emit('change-app', { appId, appInfo: res[0] })
107
+ },
108
+ },
109
+ watch: {
110
+ acceptInt(val){
111
+ this.pointer = val;
112
+ },
113
+ acceptAppId(val) {
114
+ this.selectApp(val)
115
+ }
116
+ },
117
+ created() {
118
+ this.initListener()
119
+ },
120
+ beforeDestroy() {
121
+ this.destroyListener()
122
+ }
123
+ }
124
+ </script>
125
+
126
+ <style scoped lang="less">
127
+ @import '@lambo-design/core/src/styles/default.less';
128
+ .menu-list {
129
+ height: 100%;
130
+ line-height: 24px;
131
+ //color: #ffffff;
132
+ cursor: pointer;
133
+ font-size: 16px;
134
+ margin-left: 53px;
135
+ .top-menu {
136
+ overflow: hidden;
137
+ height: 100%;
138
+ .top-menu-item {
139
+ position: relative;
140
+ height: 100%;
141
+ //color: #FFFFFF;
142
+ list-style: none;
143
+ float: left;
144
+ &:hover {
145
+ //background: transparent;
146
+ .menu-item {
147
+ //color: #fff;
148
+ }
149
+ }
150
+ &.active {
151
+ //background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
152
+ //border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
153
+ .menu-item {
154
+ //color: #fff;
155
+ }
156
+ }
157
+ .menu-item {
158
+ padding: 2px 0px 0px 8px;
159
+ margin: 0px 30px;
160
+ }
161
+ .menu-icon {
162
+ height: 20px;
163
+ line-height: 20px;
164
+ text-align: center;
165
+ //position: absolute;
166
+ left: 14px;
167
+ }
168
+ .menu-txt {
169
+ text-align: center;
170
+ font-size: 14px;
171
+ line-height: 2;
172
+ }
173
+ }
174
+ }
175
+ }
176
+ </style>
@@ -5,7 +5,7 @@
5
5
  :class="['drop-menu-a', activeItem.indexOf(parentItem.name) >= 0 ? 'selected-parent' : '']" type="text"
6
6
  @mouseover="handleMousemove($event, children)">
7
7
  <ProLayoutSiderIcon :icon-type="parentItem.meta.icon" :icon-size="hideTitle ? 26 : 14"></ProLayoutSiderIcon>
8
- <span v-if="!hideTitle" class="menu-title">&nbsp;{{ showTitle(parentItem) }}</span>
8
+ <span v-if="!hideTitle" class="menu-title" style="display: inline-block">&nbsp;{{ showTitle(parentItem) }}</span>
9
9
  <Icon v-if="!hideTitle" :size="16"type="ios-arrow-forward"/>
10
10
  </a>
11
11
  <DropdownMenu ref="dropdown" slot="list" style="width: auto">
package/src/index.vue CHANGED
@@ -308,7 +308,7 @@ export default {
308
308
  }
309
309
  .pro-layout-content{
310
310
  .pro-layout-content-layout{
311
- height: ~"calc(100vh - 53px)";
311
+ height: ~"calc(100vh - 64px)";
312
312
  .pro-layout-page{
313
313
  overflow: hidden;
314
314
  }
@@ -354,6 +354,14 @@ export default {
354
354
  height: calc(100vh - 50px);
355
355
  }
356
356
  }
357
+ .pro-layout-content{
358
+ .pro-layout-content-layout{
359
+ height: ~"calc(100vh - 48px)";
360
+ .pro-layout-page{
361
+ overflow: hidden;
362
+ }
363
+ }
364
+ }
357
365
  }
358
366
  }
359
367
  </style>