@lambo-design/pro-layout 1.0.0-beta.32 → 1.0.0-beta.321

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 (39) hide show
  1. package/.versionrc +23 -0
  2. package/CHANGELOG.md +32 -0
  3. package/package.json +11 -4
  4. package/src/components/pro-layout-header/index.vue +108 -0
  5. package/src/components/pro-layout-header/pro-layout-logo/index.vue +146 -0
  6. package/src/components/pro-layout-header/pro-layout-nav/components/pro-layout-nav-slide-menu.vue +193 -0
  7. package/src/components/pro-layout-header/pro-layout-nav/index-slide.vue +89 -0
  8. package/src/components/pro-layout-header/pro-layout-nav/index.vue +159 -0
  9. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-collect.vue +77 -0
  10. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-fullscreen.vue +142 -0
  11. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-icons.vue +74 -0
  12. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-notice.vue +131 -0
  13. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-search.vue +177 -0
  14. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-todo.vue +119 -0
  15. package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-user.vue +62 -0
  16. package/src/components/pro-layout-header/pro-layout-tools/index.vue +28 -0
  17. package/src/components/{pro-layout-trigger.vue → pro-layout-header/pro-layout-trigger/index.vue} +2 -3
  18. package/src/components/{pro-layout-sider-collapsed-menu.vue → pro-layout-sider/components/pro-layout-sider-collapsed-menu.vue} +30 -11
  19. package/src/components/{pro-layout-sider-icon.vue → pro-layout-sider/components/pro-layout-sider-icon.vue} +2 -2
  20. package/src/components/pro-layout-sider/components/pro-layout-sider-menu-item.vue +137 -0
  21. package/src/components/pro-layout-sider/components/pro-layout-sider-other-menu.vue +137 -0
  22. package/src/components/pro-layout-sider/components/pro-layout-sider-search.vue +303 -0
  23. package/src/components/pro-layout-sider/index.vue +433 -0
  24. package/src/components/{pro-layout-tabs.vue → pro-layout-tabs/index.vue} +2 -2
  25. package/src/index.vue +141 -18
  26. package/src/styles/color.less +257 -0
  27. package/src/styles/images/xiaoxitongzhi.png +0 -0
  28. package/src/styles/other-menu.css +106 -0
  29. package/src/styles/other-menu.css.map +1 -0
  30. package/src/styles/other-menu.less +109 -0
  31. package/src/utils/menuItem.js +10 -0
  32. package/src/utils/sider.js +16 -1
  33. package/src/components/pro-layout-header.vue +0 -52
  34. package/src/components/pro-layout-logo.vue +0 -79
  35. package/src/components/pro-layout-nav.vue +0 -150
  36. package/src/components/pro-layout-sider-menu-item.vue +0 -37
  37. package/src/components/pro-layout-sider.vue +0 -240
  38. package/src/components/pro-layout-tools-user.vue +0 -84
  39. package/src/components/pro-layout-tools.vue +0 -21
package/.versionrc ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "tagPrefix": "@lambo-design/pro-layout@",
3
+ "releaseCommitMessageFormat": "chore(release): @lambo-design/pro-layout@{{currentTag}}",
4
+ "path": ".",
5
+ "header": "# Changelog",
6
+ "types": [
7
+ {"type": "chore", "section":"'🎫 Chores | 其他更新", "hidden": false},
8
+ {"type": "revert", "section":"⏪ Reverts | 回退", "hidden": false},
9
+ {"type": "feat", "section": "✨ Features | 新功能", "hidden": false},
10
+ {"type": "fix", "section": "🐛 Bug Fixes | Bug 修复", "hidden": false},
11
+ {"type": "improvement", "section": "Feature Improvements", "hidden": false},
12
+ {"type": "docs", "section":"📝 Documentation | 文档", "hidden": false},
13
+ {"type": "style", "section":"💄 Styles | 风格", "hidden": false},
14
+ {"type": "refactor", "section":"💄 Styles | 风格", "hidden": false},
15
+ {"type": "perf", "section":"⚡ Performance Improvements | 性能优化", "hidden": false},
16
+ {"type": "test", "section":"✅ Tests | 测试", "hidden": false},
17
+ {"type": "build", "section":"👷‍ Build System | 构建", "hidden": false},
18
+ {"type": "ci", "section":"🔧 Continuous Integration | CI 配置", "hidden":false}
19
+ ],
20
+ "commitUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/{{hash}}",
21
+ "compareUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/{{previousTag}}...{{currentTag}}",
22
+ "issueUrlFormat": "http://git.inspur.com/ecbh/lambo-design/lambo-design/-/issues/{{id}}"
23
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,32 @@
1
+ # Changelog
2
+ ## [1.0.0-beta.320](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/pro-layout@1.0.0-beta.319...@lambo-design/pro-layout@1.0.0-beta.320) (2024-04-29)
3
+
4
+ ## [1.0.0-beta.319](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/pro-layout@1.0.0-beta.318...@lambo-design/pro-layout@1.0.0-beta.319) (2024-04-29)
5
+
6
+ ## [1.0.0-beta.318](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/compare/@lambo-design/pro-layout@1.0.0-beta.317...@lambo-design/pro-layout@1.0.0-beta.318) (2024-04-28)
7
+
8
+
9
+ ### 💄 Styles | 风格
10
+
11
+ * **@lambo-design/pro-layout:** 版本 ([c7910c1](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/c7910c13895ea219e428a40af8c1152dc296470d))
12
+
13
+ ## 1.0.0-beta.317 (2024-04-28)
14
+
15
+
16
+ ### ✨ Features | 新功能
17
+
18
+ * **@lambo-design/pro-layout:** 样式 ([a27e390](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/a27e3904ebb6dfd46d003cd617745acf8ee54024))
19
+
20
+ ## 1.0.0-beta.316 (2024-04-28)
21
+
22
+
23
+ ### ✨ Features | 新功能
24
+
25
+ * **@lambo-design/pro-layout:** 样式 ([a27e390](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/a27e3904ebb6dfd46d003cd617745acf8ee54024))
26
+
27
+ ## 1.0.0-beta.315 (2024-04-26)
28
+
29
+
30
+ ### ✨ Features | 新功能
31
+
32
+ * **@lambo-design/pro-layout:** 样式 ([a27e390](http://git.inspur.com/ecbh/lambo-design/lambo-design/-/commit/a27e3904ebb6dfd46d003cd617745acf8ee54024))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lambo-design/pro-layout",
3
- "version": "1.0.0-beta.32",
3
+ "version": "1.0.0-beta.321",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "lambo",
@@ -10,8 +10,15 @@
10
10
  "registry": "https://registry.npmjs.org/"
11
11
  },
12
12
  "devDependencies": {
13
- "@lambo-design/shared": "^1.0.0-beta.26",
14
- "@lambo-design/core": "^4.7.1-beta.45"
13
+ "@lambo-design/core": "^4.7.1-beta.136",
14
+ "@lambo-design/shared": "^1.0.0-beta.168"
15
15
  },
16
- "scripts": {}
16
+ "scripts": {
17
+ "release-pro-layout": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
18
+ "release-major": "standard-version --release-as major",
19
+ "release-minor": "standard-version --release-as minor",
20
+ "release-patch": "standard-version --release-as patch",
21
+ "release-beta": "standard-version --prerelease beta",
22
+ "re-publish": "pnpm publish --access public --no-git-checks"
23
+ }
17
24
  }
@@ -0,0 +1,108 @@
1
+ <template>
2
+ <div class="pro-layout-header-wrapper">
3
+ <div class="trigger-box" :style="menuScalingStyle">
4
+ <slot name="pro-layout-trigger">
5
+ <LamboProTrigger v-if="systemInfo.menuScaling === '1'"></LamboProTrigger>
6
+ </slot>
7
+ </div>
8
+ <div class="logo-box">
9
+ <slot name="pro-layout-logo">
10
+ <LamboProLogo></LamboProLogo>
11
+ </slot>
12
+ </div>
13
+ <div class="nav-box" v-show="!systemInfo || !systemInfo.navType || systemInfo.navType == 'dropdown'">
14
+ <slot name="pro-layout-nav">
15
+ <LamboProNav></LamboProNav>
16
+ </slot>
17
+ </div>
18
+ <div class="tools-box">
19
+ <LamboProTools>
20
+ <template slot = "pro-layout-icons">
21
+ <slot name="pro-layout-icons"></slot>
22
+ </template>
23
+ <template slot = "pro-layout-user">
24
+ <slot name="pro-layout-user"></slot>
25
+ </template>
26
+ </LamboProTools>
27
+ </div>
28
+ <div v-show="systemInfo && systemInfo.navType && systemInfo.navType == 'slide'">
29
+ <LamboProNavSilde></LamboProNavSilde>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+ import LamboProTrigger from './pro-layout-trigger'
36
+ import LamboProLogo from './pro-layout-logo'
37
+ import LamboProNav from './pro-layout-nav'
38
+ import LamboProNavSilde from './pro-layout-nav/index-slide'
39
+ import LamboProTools from './pro-layout-tools'
40
+ import Bus from "@lambo-design/shared/utils/bus";
41
+ export default {
42
+ name: "pro-layout-header",
43
+ props:{
44
+ acceptAppId: {
45
+ type: String,
46
+ default:''
47
+ }
48
+ },
49
+ data(){
50
+ return {
51
+ systemInfo: {},
52
+ }
53
+ },
54
+ components: {
55
+ LamboProTrigger,
56
+ LamboProLogo,
57
+ LamboProNav,
58
+ LamboProNavSilde,
59
+ LamboProTools
60
+ },
61
+ computed:{
62
+ menuScalingStyle(){
63
+ return this.systemInfo.menuScaling === '1' ? '' : {marginLeft:'25px'}
64
+ }
65
+ },
66
+ methods:{
67
+ initListener(){
68
+ Bus.$on('system-info',(data)=>{
69
+ this.initSystem(data)
70
+ });
71
+ },
72
+ destroyListener(){
73
+ Bus.$off('system-info')
74
+ },
75
+ initSystem(data){
76
+ if (data) {
77
+ this.systemInfo = data;
78
+ }
79
+ }
80
+ },
81
+ created(){
82
+ this.initListener();
83
+ },
84
+ beforeDestroy(){
85
+ this.destroyListener();
86
+ }
87
+ }
88
+ </script>
89
+
90
+ <style scoped lang="less">
91
+ .pro-layout-header-wrapper{
92
+ width: auto;
93
+ height: 64px;
94
+ .trigger-box{
95
+ float: left;
96
+ height: inherit;
97
+ }
98
+ .logo-box{
99
+ float: left;
100
+ }
101
+ .nav-box{
102
+ float: left;
103
+ }
104
+ .tools-box{
105
+ float: right;
106
+ }
107
+ }
108
+ </style>
@@ -0,0 +1,146 @@
1
+ <template>
2
+ <div @click="handleClick">
3
+ <Row class="pro-layout-logo-wrapper" :style="systemInfo.layoutSize === 'default' ? {height:'64px'} :{height:'50px'} " type="flex" align="middle">
4
+ <Col>
5
+ <div class="logo" v-if="systemInfo.systemLogo" :style="logoStyle"></div>
6
+ </Col>
7
+ <Col>
8
+ <div class="divider" v-if="systemInfo.systemLogo"></div>
9
+ </Col>
10
+ <Col>
11
+ <div class="system-name" :style="nameStyle">{{systemName}}</div>
12
+ </Col>
13
+ </Row>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ import Bus from '@lambo-design/shared/utils/bus'
19
+ export default {
20
+
21
+ name: "pro-layout-logo",
22
+ props:{
23
+ routeName:String,
24
+ default:''
25
+ },
26
+ data(){
27
+ return {
28
+ systemInfo: {},
29
+ systemName: '后台管理系统',
30
+ isHovered: false,
31
+ src:''
32
+ }
33
+ },
34
+ computed:{
35
+ logoStyle() {
36
+ let style = '';
37
+ if (this.systemInfo && this.systemInfo.systemLogo) {
38
+ style += `background: url("${this.systemInfo.systemLogo}") no-repeat; background-size: 100%;background-position:center;`;
39
+ // 如果 systemInfo.logoWidth 存在且不为空,则添加到样式
40
+ if (this.systemInfo.logoWidth && this.systemInfo.logoWidth !== '') {
41
+ style += `width: ${this.systemInfo.logoWidth}px;`;
42
+ }
43
+ // 如果 systemInfo.logoTop 存在且不为空,则添加到样式
44
+ // if (this.systemInfo.logoTop && this.systemInfo.logoTop !== '') {
45
+ // style += `margin-top: ${this.systemInfo.logoTop}px;`;
46
+ // }
47
+ style += `text-align-last: justify;`
48
+ }
49
+ return style;
50
+ },
51
+
52
+
53
+ nameStyle() {
54
+ let style = '';
55
+ if (this.systemInfo && this.systemInfo.nameSize) {
56
+ const lines = this.systemInfo.nameSize; // 行数
57
+ const maxHeight = lineHeight * lines; // 计算最大高度
58
+
59
+ // 根据nameSize设置margin-top
60
+ // if (lines == 1) {
61
+ // style += `margin-top: 12px;`;
62
+ // } else if (lines == 2) {
63
+ // style += `margin-top: 5px; `;
64
+ // }
65
+
66
+ // 动态计算字体大小
67
+ const fontSize = Math.max(20 - (lines - 1) * 4, 15); // 字体大小递减
68
+ const lineHeight = fontSize + 5; // 固定行高
69
+ const width = (this.systemName.length / lines) * fontSize + 20;
70
+
71
+ // 组装样式字符串
72
+ style += `line-height: ${lineHeight}px;`;
73
+ style += `font-size: ${fontSize}px;`;
74
+ style += `max-height: ${maxHeight}px;`; // 设置最大高度限制行数
75
+ style += `width: ${width}px;`; // 设置宽度
76
+ style += `overflow: hidden;`; // 超出部分隐藏
77
+ style += `word-wrap: break-word;`; // 允许单词内换行
78
+ style += `white-space: normal;`; // 默认的换行方式
79
+ style += `text-align-last: justify;`;
80
+ style += `text-align: justify;`;
81
+ }
82
+ return style;
83
+ }
84
+
85
+ },
86
+ methods: {
87
+ handleClick(){
88
+ Bus.$emit('click-logo')
89
+ },
90
+ initListener(){
91
+ Bus.$on('system-info',(data)=>{
92
+ this.initSystem(data)
93
+ });
94
+ },
95
+ destroyListener(){
96
+ Bus.$off('system-info')
97
+ },
98
+ initSystem(data){
99
+ if (data) {
100
+ this.systemInfo = data;
101
+ if (data.systemName) {
102
+ this.systemName = data.systemName;
103
+ }
104
+ }
105
+ },
106
+
107
+ },
108
+ created(){
109
+ this.initListener();
110
+ },
111
+ beforeDestroy(){
112
+ this.destroyListener();
113
+ }
114
+ }
115
+ </script>
116
+
117
+ <style scoped lang="less">
118
+ @import "@lambo-design/core/src/styles/default";
119
+ .pro-layout-logo-wrapper{
120
+ overflow: hidden;
121
+ cursor:pointer;
122
+ .logo{
123
+ width: 150px;
124
+ height: 43px;
125
+ background: url("../../../styles/images/inspur.png") no-repeat;
126
+ background-size: 100%;
127
+ background-position: center; /* 图片在背景区域内居中显示 */
128
+ //float: left;
129
+ //margin-top: 20px;
130
+ }
131
+ .divider{
132
+ height: 33px;
133
+ width: 2px;
134
+ border-right: 2px dashed fade(@_black,30%);
135
+ //float: left;
136
+ margin: 0 12px 0 14px;
137
+ }
138
+ .system-name{
139
+ //float: left;
140
+ font-weight: bold;
141
+ font-size: 20px;
142
+ margin-right: 15px;
143
+
144
+ }
145
+ }
146
+ </style>
@@ -0,0 +1,193 @@
1
+ <template>
2
+ <div class="menu-list" >
3
+ <ul class="top-menu" :style="layoutSize === 'default' ? {height: '64px'} : {height: '50px'}" ref="topNav">
4
+ <li class="top-menu-item" v-show="pointer <= index && index < pointer + topMenuNum && flag" :class="{ 'active': activeName === item.appId }" v-for="(item,index) in topMenList" :key="item.appId" @click="selectApp(item.appId)">
5
+ <div class="menu-item" :style="layoutSize === 'default' ? {paddingTop: '10px'} : {paddingTop: '2px'}">
6
+ <p class="menu-icon"><Icon :type="item.icon" :size="20"></Icon></p>
7
+ <p class="menu-txt" :title="item.name">{{ 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
+ systemInfo:{},
32
+ pointer:0,
33
+ flag:true,
34
+ arrowFlag: true,
35
+ acceptAppId: '',
36
+ navList: [],
37
+ topMenList: [],
38
+ topTqmMenList:[],
39
+ otherList: [],
40
+ activeName: '',
41
+ topMenuNum: 7,
42
+ lastTopMenuNum:-1,
43
+ originMenuList: [],
44
+ layoutSize:"default"
45
+ }
46
+ },
47
+ methods: {
48
+ initListener() {
49
+ Bus.$on('system-info',(data) => {
50
+ this.initSystemInfo(data);
51
+ })
52
+ Bus.$on('nav-list', (data) => {
53
+ this.initNav(data)
54
+ })
55
+ Bus.$on('change-app', ({ appId, appInfo }) => {
56
+ this.changeApp(appId, appInfo)
57
+ })
58
+ },
59
+ destroyListener() {
60
+ Bus.$off('system-info')
61
+ Bus.$off('nav-list')
62
+ Bus.$off('change-app')
63
+ },
64
+ initSystemInfo(data) {
65
+ if (data) {
66
+ this.layoutSize = data.layoutSize ? data.layoutSize : 'default';
67
+ this.topMenuNum = data.topMenu ? data.topMenu : 4;
68
+ this.acceptAppId = data.acceptAppId ? data.acceptAppId : '';
69
+ if (!this.activeName) {
70
+ this.activeName = this.acceptAppId
71
+ }
72
+ this.initNav(this.navList)
73
+ }
74
+ },
75
+ initNav(data) {
76
+ if (data.toString() === this.navList.toString() && this.topMenuNum === this.lastTopMenuNum) {
77
+ return
78
+ }
79
+ this.navList = data
80
+ this.lastTopMenuNum = this.topMenuNum
81
+ if (data.length > this.topMenuNum) {
82
+ let navList = deepCopy(data)
83
+ this.topMenList = navList
84
+ this.$emit('topMen-list', this.topMenList);
85
+ this.$emit('topMen-num', this.topMenuNum);
86
+ this.$emit('topMen-true', true);
87
+ // this.topMenList = navList.splice(0, this.topMenuNum)
88
+ // this.otherList = navList
89
+ } else {
90
+ this.topMenList = this.navList
91
+ this.$emit('topMen-true', false);
92
+ }
93
+ if (this.topMenList.length > 0) {
94
+ let appId = this.topMenList[0].appId
95
+ for (let i = 0; i < this.topMenList.length; i++) {
96
+ if (this.topMenList[i].selected == true) {
97
+ appId = this.topMenList[i].appId
98
+ }
99
+ }
100
+ if (this.activeName) {
101
+ appId = this.activeName
102
+ }
103
+ this.selectApp(appId)
104
+ }
105
+ },
106
+ selectApp(appId) {
107
+ if (appId) {
108
+ this.activeName = appId
109
+ let res = this.navList.filter(app => app.appId == appId)
110
+ Bus.$emit('change-app', { appId, appInfo: res[0] })
111
+ }
112
+ },
113
+ changeApp(appId, appInfo){
114
+ if (appId) {
115
+ this.activeName = appId
116
+ }
117
+ }
118
+ },
119
+ watch: {
120
+ acceptInt(val){
121
+ this.pointer = val;
122
+ }
123
+ },
124
+ created() {
125
+ this.initListener()
126
+ },
127
+ beforeDestroy() {
128
+ this.destroyListener()
129
+ }
130
+ }
131
+ </script>
132
+
133
+ <style scoped lang="less">
134
+ @import '@lambo-design/core/src/styles/default.less';
135
+ .menu-list {
136
+ height: 100%;
137
+ line-height: 24px;
138
+ //color: #ffffff;
139
+ cursor: pointer;
140
+ font-size: 16px;
141
+ margin-left: 15px;
142
+ .top-menu {
143
+ overflow: hidden;
144
+ .top-menu-item {
145
+ padding-left: 15px;
146
+ padding-right: 15px;
147
+ position: relative;
148
+ height: 100%;
149
+ //color: #FFFFFF;
150
+ list-style: none;
151
+ float: left;
152
+ &:hover {
153
+ //background: transparent;
154
+ .menu-item {
155
+ //color: #fff;
156
+ }
157
+ }
158
+ &.active {
159
+ //background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) !important;
160
+ //border-bottom: 2px solid var(--primary-color-tint-5, @_primary-color-tint-5);
161
+ .menu-item {
162
+ //color: #fff;
163
+ width: 135px;
164
+ }
165
+ }
166
+ .menu-item {
167
+ display: flex;
168
+ margin-top: 10px;
169
+ padding-right: 10px;
170
+ width: 135px;
171
+
172
+ }
173
+ .menu-icon {
174
+ height: 20px;
175
+ line-height: 20px;
176
+ text-align: center;
177
+ margin-right: 10px;
178
+ margin-left: 10px;
179
+ margin-top: 3px;
180
+ }
181
+ .menu-txt {
182
+ text-align: center;
183
+ font-size: 14px;
184
+ line-height: 2;
185
+ width: 135px;
186
+ white-space: nowrap;
187
+ overflow: hidden;
188
+ text-overflow: ellipsis;
189
+ }
190
+ }
191
+ }
192
+ }
193
+ </style>
@@ -0,0 +1,89 @@
1
+ <template>
2
+ <div class="pro-layout-nav-slide-wrapper">
3
+ <div class="nav-box-slide">
4
+ <LamboProNavSlideMenu :accept-int="pointer" @topMen-list="handleCustomEvent" @topMen-num="topMen" @topMen-true="topMenTrue"></LamboProNavSlideMenu>
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 LamboProNavSlideMenu from './components/pro-layout-nav-slide-menu'
29
+ export default {
30
+ data(){
31
+ return {
32
+ pointer:0,
33
+ topList:[],
34
+ topNum:0,
35
+ arrowFlag: true,
36
+ }
37
+ },
38
+ components: {
39
+ LamboProNavSlideMenu
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>