@lambo-design/pro-layout 1.0.0-beta.310 → 1.0.0-beta.311

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.310",
3
+ "version": "1.0.0-beta.311",
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.162",
14
- "@lambo-design/core": "^4.7.1-beta.131"
13
+ "@lambo-design/core": "^4.7.1-beta.131",
14
+ "@lambo-design/shared": "^1.0.0-beta.162"
15
15
  },
16
16
  "scripts": {}
17
17
  }
@@ -1,193 +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>
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>
@@ -1,131 +1,131 @@
1
- <template>
2
- <div class="pro-layout-tools-quick-notice">
3
- <Dropdown >
4
- <Badge :count="noticeDatas.length" class-name="badge-count">
5
- <Icon type="ios-notifications-outline" size="20" style="cursor: pointer"></Icon>
6
- </Badge>
7
- <template #list>
8
- <DropdownMenu slot="list" class="notice-dropdown-menu">
9
- <DropdownItem v-for="(item, index) in noticeDatas" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
10
- <div class="item-image">
11
- <Icon type="ios-mail" size="24"/>
12
- </div>
13
- <div class="item-title" :title="item.noticeTitle">
14
- {{ item.noticeTitle }}
15
- </div>
16
- <div class="item-time">
17
- {{ item.publishTime }}
18
- </div>
19
- </DropdownItem>
20
- <div class="dropdown-footer" :class="[noticeDatas.length == 0 ? 'no-line' : '']">
21
- <Button type="text" v-if="noticeDatas.length > 0" @click="getMore" class="display-more" >查看更多</Button>
22
- <Button type="text" v-if="noticeDatas.length > 0" @click="markRead" class="mark-read" >一键已读</Button>
23
- <div class="no-data" v-if="noticeDatas.length == 0" >暂无未读通知</div>
24
- </div>
25
- </DropdownMenu>
26
- </template>
27
- </Dropdown>
28
- </div>
29
- </template>
30
-
31
- <script>
32
- import Bus from '@lambo-design/shared/utils/bus';
33
- import {deepCopy} from '@lambo-design/shared/utils/assist';
34
- export default {
35
- name: "pro-layout-tools-quick-notice",
36
- data() {
37
- return {
38
- noticeDatas:[]
39
- }
40
- },
41
- methods: {
42
- initListener() {
43
- Bus.$on('other-datas',(data) => {
44
- this.initNoticeList(data);
45
- })
46
- },
47
- destroyListener() {
48
- Bus.$off('other-datas')
49
- },
50
- initNoticeList(data) {
51
- if (data && data.noticeDatas) {
52
- this.noticeDatas = deepCopy(data.noticeDatas);
53
- }
54
- },
55
- getDetail(item){
56
- Bus.$emit('other-operate','notice-detail',item)
57
- },
58
- markRead(){
59
- Bus.$emit('other-operate','notice-mark-read')
60
- },
61
- getMore() {
62
- Bus.$emit('other-operate','notice-more')
63
- }
64
- },
65
- created() {
66
- this.initListener()
67
- },
68
- beforeDestroy() {
69
- this.destroyListener()
70
- }
71
- }
72
- </script>
73
-
74
- <style lang="less">
75
- @import "@lambo-design/core/src/styles/default";
76
- .pro-layout-tools-quick-notice{
77
- .badge-count{
78
- top:12px;
79
- height: 10px;
80
- line-height: 8px;
81
- min-width: 8px;
82
- padding: 0;
83
- font-size: 8px;
84
- width: 10px;
85
- }
86
- }
87
- .notice-dropdown-menu {
88
- max-height: 300px;
89
- width: 300px;
90
- &::-webkit-scrollbar {
91
- width: 0;
92
- height: 0;
93
- }
94
- .dropdown-item {
95
- overflow: hidden;
96
- line-height: 24px;
97
- padding: 8px;
98
- .item-image{
99
- float: left;
100
- }
101
- .item-title{
102
- float: left;
103
- margin-left: 5px;
104
- width: 120px;
105
- white-space:nowrap;
106
- overflow:hidden;
107
- text-overflow: ellipsis;
108
- }
109
- .item-time{
110
- float: right;
111
- }
112
- }
113
- .dropdown-footer{
114
- line-height: 24px;
115
- border-top: 1px solid var(--layout-sider-line-color,@_layout-sider-line-color);
116
- padding: 8px;
117
- &.no-line{
118
- border: 0;
119
- }
120
- .display-more{
121
- float: left;
122
- }
123
- .mark-read{
124
- float: right;
125
- }
126
- .no-data{
127
- text-align: center;
128
- }
129
- }
130
- }
131
- </style>
1
+ <template>
2
+ <div class="pro-layout-tools-quick-notice">
3
+ <Dropdown >
4
+ <Badge :count="noticeDatas.length" class-name="badge-count">
5
+ <Icon type="ios-notifications-outline" size="20" style="cursor: pointer"></Icon>
6
+ </Badge>
7
+ <template #list>
8
+ <DropdownMenu slot="list" class="notice-dropdown-menu">
9
+ <DropdownItem v-for="(item, index) in noticeDatas" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
10
+ <div class="item-image">
11
+ <Icon type="ios-mail" size="24"/>
12
+ </div>
13
+ <div class="item-title" :title="item.noticeTitle">
14
+ {{ item.noticeTitle }}
15
+ </div>
16
+ <div class="item-time">
17
+ {{ item.publishTime }}
18
+ </div>
19
+ </DropdownItem>
20
+ <div class="dropdown-footer" :class="[noticeDatas.length == 0 ? 'no-line' : '']">
21
+ <Button type="text" v-if="noticeDatas.length > 0" @click="getMore" class="display-more" >查看更多</Button>
22
+ <Button type="text" v-if="noticeDatas.length > 0" @click="markRead" class="mark-read" >一键已读</Button>
23
+ <div class="no-data" v-if="noticeDatas.length == 0" >暂无未读通知</div>
24
+ </div>
25
+ </DropdownMenu>
26
+ </template>
27
+ </Dropdown>
28
+ </div>
29
+ </template>
30
+
31
+ <script>
32
+ import Bus from '@lambo-design/shared/utils/bus';
33
+ import {deepCopy} from '@lambo-design/shared/utils/assist';
34
+ export default {
35
+ name: "pro-layout-tools-quick-notice",
36
+ data() {
37
+ return {
38
+ noticeDatas:[]
39
+ }
40
+ },
41
+ methods: {
42
+ initListener() {
43
+ Bus.$on('other-datas',(data) => {
44
+ this.initNoticeList(data);
45
+ })
46
+ },
47
+ destroyListener() {
48
+ Bus.$off('other-datas')
49
+ },
50
+ initNoticeList(data) {
51
+ if (data && data.noticeDatas) {
52
+ this.noticeDatas = deepCopy(data.noticeDatas);
53
+ }
54
+ },
55
+ getDetail(item){
56
+ Bus.$emit('other-operate','notice-detail',item)
57
+ },
58
+ markRead(){
59
+ Bus.$emit('other-operate','notice-mark-read')
60
+ },
61
+ getMore() {
62
+ Bus.$emit('other-operate','notice-more')
63
+ }
64
+ },
65
+ created() {
66
+ this.initListener()
67
+ },
68
+ beforeDestroy() {
69
+ this.destroyListener()
70
+ }
71
+ }
72
+ </script>
73
+
74
+ <style lang="less">
75
+ @import "@lambo-design/core/src/styles/default";
76
+ .pro-layout-tools-quick-notice{
77
+ .badge-count{
78
+ top:12px;
79
+ height: 10px;
80
+ line-height: 8px;
81
+ min-width: 8px;
82
+ padding: 0;
83
+ font-size: 8px;
84
+ width: 10px;
85
+ }
86
+ }
87
+ .notice-dropdown-menu {
88
+ max-height: 300px;
89
+ width: 300px;
90
+ &::-webkit-scrollbar {
91
+ width: 0;
92
+ height: 0;
93
+ }
94
+ .dropdown-item {
95
+ overflow: hidden;
96
+ line-height: 24px;
97
+ padding: 8px;
98
+ .item-image{
99
+ float: left;
100
+ }
101
+ .item-title{
102
+ float: left;
103
+ margin-left: 5px;
104
+ width: 120px;
105
+ white-space:nowrap;
106
+ overflow:hidden;
107
+ text-overflow: ellipsis;
108
+ }
109
+ .item-time{
110
+ float: right;
111
+ }
112
+ }
113
+ .dropdown-footer{
114
+ line-height: 24px;
115
+ border-top: 1px solid var(--layout-sider-line-color,@_layout-sider-line-color);
116
+ padding: 8px;
117
+ &.no-line{
118
+ border: 0;
119
+ }
120
+ .display-more{
121
+ float: left;
122
+ }
123
+ .mark-read{
124
+ float: right;
125
+ }
126
+ .no-data{
127
+ text-align: center;
128
+ }
129
+ }
130
+ }
131
+ </style>
@@ -1,119 +1,119 @@
1
- <template>
2
- <div class="pro-layout-tools-quick-todo">
3
- <Dropdown >
4
- <Badge :count="todoDatas.length" class-name="badge-count">
5
- <Icon type="ios-alarm-outline" size="18" style="cursor: pointer"/>
6
- </Badge>
7
- <template #list>
8
- <DropdownMenu slot="list" class="todo-dropdown-menu">
9
- <DropdownItem v-for="(item, index) in todoDatas" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
10
- <div class="item-title" :title="item.name">
11
- {{ item.name }}
12
- </div>
13
- <div class="item-time">
14
- {{ formatTimestamp(item.createTime,'YYYY-MM-DD HH:mm:ss') }}
15
- </div>
16
- </DropdownItem>
17
- <div class="dropdown-footer" :class="[todoDatas.length == 0 ? 'no-line' : '']">
18
- <Button type="text" v-if="todoDatas.length > 0" @click="getMore" >查看更多</Button>
19
- <div class="no-data" v-if="todoDatas.length == 0" >暂无代办</div>
20
- </div>
21
- </DropdownMenu>
22
- </template>
23
- </Dropdown>
24
- </div>
25
- </template>
26
-
27
- <script>
28
- import Bus from '@lambo-design/shared/utils/bus';
29
- import {deepCopy} from '@lambo-design/shared/utils/assist';
30
- import {formatTimestamp} from '@lambo-design/shared/utils/date'
31
- export default {
32
- name: "pro-layout-tools-quick-todo",
33
- data() {
34
- return {
35
- formatTimestamp: formatTimestamp,
36
- todoDatas:[]
37
- }
38
- },
39
- methods: {
40
- initListener() {
41
- Bus.$on('other-datas',(data) => {
42
- this.initTodoList(data);
43
- })
44
- },
45
- destroyListener() {
46
- Bus.$off('other-datas')
47
- },
48
- initTodoList(data) {
49
- if (data && data.todoDatas) {
50
- this.todoDatas = deepCopy(data.todoDatas);
51
- }
52
- },
53
- getDetail(item){
54
- Bus.$emit('other-operate','todo-detail',item)
55
- },
56
- getMore() {
57
- Bus.$emit('other-operate','todo-more')
58
- }
59
- },
60
- created() {
61
- this.initListener()
62
- },
63
- beforeDestroy() {
64
- this.destroyListener()
65
- }
66
- }
67
- </script>
68
-
69
- <style lang="less">
70
- @import "@lambo-design/core/src/styles/default";
71
- .pro-layout-tools-quick-todo{
72
- .badge-count{
73
- top:12px;
74
- height: 10px;
75
- line-height: 8px;
76
- min-width: 8px;
77
- padding: 0;
78
- font-size: 8px;
79
- width: 10px;
80
- }
81
- }
82
- .todo-dropdown-menu {
83
- max-height: 300px;
84
- width: 300px;
85
- overflow-y: auto;
86
- &::-webkit-scrollbar {
87
- width: 0;
88
- height: 0;
89
- }
90
- .dropdown-item {
91
- overflow: hidden;
92
- line-height: 24px;
93
- padding: 8px;
94
- .item-title{
95
- float: left;
96
- margin-left: 5px;
97
- width: 120px;
98
- white-space:nowrap;
99
- overflow:hidden;
100
- text-overflow: ellipsis;
101
- }
102
- .item-time{
103
- float: right;
104
- }
105
- }
106
- .dropdown-footer{
107
- line-height: 24px;
108
- border-top: 1px solid var(--layout-sider-line-color,@_layout-sider-line-color);
109
- padding: 8px;
110
- text-align: center;
111
- &.no-line{
112
- border: 0;
113
- }
114
- .no-data{
115
- text-align: center;
116
- }
117
- }
118
- }
119
- </style>
1
+ <template>
2
+ <div class="pro-layout-tools-quick-todo">
3
+ <Dropdown >
4
+ <Badge :count="todoDatas.length" class-name="badge-count">
5
+ <Icon type="ios-alarm-outline" size="18" style="cursor: pointer"/>
6
+ </Badge>
7
+ <template #list>
8
+ <DropdownMenu slot="list" class="todo-dropdown-menu">
9
+ <DropdownItem v-for="(item, index) in todoDatas" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
10
+ <div class="item-title" :title="item.name">
11
+ {{ item.name }}
12
+ </div>
13
+ <div class="item-time">
14
+ {{ formatTimestamp(item.createTime,'YYYY-MM-DD HH:mm:ss') }}
15
+ </div>
16
+ </DropdownItem>
17
+ <div class="dropdown-footer" :class="[todoDatas.length == 0 ? 'no-line' : '']">
18
+ <Button type="text" v-if="todoDatas.length > 0" @click="getMore" >查看更多</Button>
19
+ <div class="no-data" v-if="todoDatas.length == 0" >暂无代办</div>
20
+ </div>
21
+ </DropdownMenu>
22
+ </template>
23
+ </Dropdown>
24
+ </div>
25
+ </template>
26
+
27
+ <script>
28
+ import Bus from '@lambo-design/shared/utils/bus';
29
+ import {deepCopy} from '@lambo-design/shared/utils/assist';
30
+ import {formatTimestamp} from '@lambo-design/shared/utils/date'
31
+ export default {
32
+ name: "pro-layout-tools-quick-todo",
33
+ data() {
34
+ return {
35
+ formatTimestamp: formatTimestamp,
36
+ todoDatas:[]
37
+ }
38
+ },
39
+ methods: {
40
+ initListener() {
41
+ Bus.$on('other-datas',(data) => {
42
+ this.initTodoList(data);
43
+ })
44
+ },
45
+ destroyListener() {
46
+ Bus.$off('other-datas')
47
+ },
48
+ initTodoList(data) {
49
+ if (data && data.todoDatas) {
50
+ this.todoDatas = deepCopy(data.todoDatas);
51
+ }
52
+ },
53
+ getDetail(item){
54
+ Bus.$emit('other-operate','todo-detail',item)
55
+ },
56
+ getMore() {
57
+ Bus.$emit('other-operate','todo-more')
58
+ }
59
+ },
60
+ created() {
61
+ this.initListener()
62
+ },
63
+ beforeDestroy() {
64
+ this.destroyListener()
65
+ }
66
+ }
67
+ </script>
68
+
69
+ <style lang="less">
70
+ @import "@lambo-design/core/src/styles/default";
71
+ .pro-layout-tools-quick-todo{
72
+ .badge-count{
73
+ top:12px;
74
+ height: 10px;
75
+ line-height: 8px;
76
+ min-width: 8px;
77
+ padding: 0;
78
+ font-size: 8px;
79
+ width: 10px;
80
+ }
81
+ }
82
+ .todo-dropdown-menu {
83
+ max-height: 300px;
84
+ width: 300px;
85
+ overflow-y: auto;
86
+ &::-webkit-scrollbar {
87
+ width: 0;
88
+ height: 0;
89
+ }
90
+ .dropdown-item {
91
+ overflow: hidden;
92
+ line-height: 24px;
93
+ padding: 8px;
94
+ .item-title{
95
+ float: left;
96
+ margin-left: 5px;
97
+ width: 120px;
98
+ white-space:nowrap;
99
+ overflow:hidden;
100
+ text-overflow: ellipsis;
101
+ }
102
+ .item-time{
103
+ float: right;
104
+ }
105
+ }
106
+ .dropdown-footer{
107
+ line-height: 24px;
108
+ border-top: 1px solid var(--layout-sider-line-color,@_layout-sider-line-color);
109
+ padding: 8px;
110
+ text-align: center;
111
+ &.no-line{
112
+ border: 0;
113
+ }
114
+ .no-data{
115
+ text-align: center;
116
+ }
117
+ }
118
+ }
119
+ </style>
@@ -6,11 +6,11 @@
6
6
  <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="parentItem.meta.icon"></ProLayoutSiderIcon>
7
7
  </Col>
8
8
  <Col span="21">
9
- <div :class="systemInfo.titleShow === 'wrap' ? 'menu-title-wrap' : 'menu-title-ellipsis'">
10
- <Tooltip v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(parentItem)">
11
- <span>{{ showTitle(parentItem)}}</span>
9
+ <div>
10
+ <Tooltip style="width: 100%" v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(parentItem)">
11
+ <div class="menu-title-ellipsis">{{ showTitle(parentItem)}}</div>
12
12
  </Tooltip>
13
- <span v-else>{{ showTitle(parentItem)}}</span>
13
+ <span v-else class="menu-title-wrap">{{ showTitle(parentItem)}}</span>
14
14
  </div>
15
15
  </Col>
16
16
  </Row>
@@ -30,15 +30,11 @@
30
30
  @click="toggleCollect(item)"></Icon>
31
31
  </Col>
32
32
  <Col span="21">
33
- <div :class="[
34
- systemInfo.titleShow === 'wrap' ? 'menu-title-nochildren-wrap' : 'menu-title-nochildren-ellipsis',
35
- 'menu-title-' + item.children[0].permissionId,
36
- 'draggable-text'
37
- ]" v-draggable="dragOptions(item.children[0])">
38
- <Tooltip v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item.children[0])">
39
- <span>{{ showTitle(item.children[0]) }}</span>
33
+ <div :class="'menu-title-' + item.permissionId" v-draggable="dragOptions(item)">
34
+ <Tooltip style="width: 100%" v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item.children[0])">
35
+ <div class="menu-title-nochildren-ellipsis">{{ showTitle(item.children[0]) }}</div>
40
36
  </Tooltip>
41
- <span v-else>{{ showTitle(item.children[0]) }}</span>
37
+ <span v-else class="menu-title-nochildren-wrap">{{ showTitle(item.children[0])}}</span>
42
38
  </div>
43
39
  </Col>
44
40
  </Row>
@@ -58,15 +54,11 @@
58
54
  @click="toggleCollect(item)"></Icon>
59
55
  </Col>
60
56
  <Col span="21">
61
- <div :class="[
62
- systemInfo.titleShow === 'wrap' ? 'menu-title-nochildren-wrap' : 'menu-title-nochildren-ellipsis',
63
- 'menu-title-' + item.permissionId,
64
- 'draggable-text'
65
- ]" v-draggable="dragOptions(item)">
66
- <Tooltip v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item)">
67
- <span>{{ showTitle(item)}}</span>
57
+ <div :class="'menu-title-' + item.permissionId" v-draggable="dragOptions(item)">
58
+ <Tooltip style="width: 100%" v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item)">
59
+ <div class="menu-title-nochildren-ellipsis">{{ showTitle(item) }}</div>
68
60
  </Tooltip>
69
- <span v-else>{{ showTitle(item)}}</span>
61
+ <span v-else class="menu-title-nochildren-wrap">{{ showTitle(item) }}</span>
70
62
  </div>
71
63
  </Col>
72
64
  </Row>
@@ -20,15 +20,11 @@
20
20
  <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="item.type == 2 ? (isCollected.hasOwnProperty(item.name) ? 'ios-star' : 'ios-star-outline') : item.meta.icon"></ProLayoutSiderIcon>
21
21
  </Col>
22
22
  <Col span="21">
23
- <div :class="[
24
- systemInfo.titleShow === 'wrap' ? 'menu-title-nochildren-wrap' : 'menu-title-nochildren-ellipsis',
25
- 'menu-title-' + item.children[0].permissionId,
26
- 'draggable-text'
27
- ]" v-draggable="dragOptions(item.children[0])">
28
- <Tooltip v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item.children[0])">
29
- <span>{{ showTitle(item.children[0]) }}</span>
23
+ <div :class="'menu-title-' + item.permissionId" v-draggable="dragOptions(item)">
24
+ <Tooltip style="width: 100%" v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item.children[0])">
25
+ <div class="menu-title-nochildren-ellipsis">{{ showTitle(item.children[0]) }}</div>
30
26
  </Tooltip>
31
- <span v-else>{{ showTitle(item.children[0]) }}</span>
27
+ <span v-else class="menu-title-nochildren-wrap">{{ showTitle(item.children[0]) }}</span>
32
28
  </div>
33
29
  </Col>
34
30
  </Row>
@@ -49,15 +45,11 @@
49
45
  <ProLayoutSiderIcon v-if="systemInfo.menuLogo == '1'" :icon-type="item.type == 2 ? (isCollected.hasOwnProperty(item.name) ? 'ios-star' : 'ios-star-outline') : item.meta.icon"></ProLayoutSiderIcon>
50
46
  </Col>
51
47
  <Col span="21">
52
- <div :class="[
53
- systemInfo.titleShow === 'wrap' ? 'menu-title-nochildren-wrap' : 'menu-title-nochildren-ellipsis',
54
- 'menu-title-' + item.permissionId,
55
- 'draggable-text'
56
- ]" v-draggable="dragOptions(item)">
57
- <Tooltip v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item)">
58
- <span>{{ showTitle(item) }}</span>
48
+ <div :class="'menu-title-' + item.permissionId" v-draggable="dragOptions(item)">
49
+ <Tooltip style="width: 100%" v-if="systemInfo.titleShow ==='ellipsis'" placement="right" :content="showTitle(item)">
50
+ <div class="menu-title-nochildren-ellipsis">{{ showTitle(item) }}</div>
59
51
  </Tooltip>
60
- <span v-else>{{ showTitle(item) }}</span>
52
+ <span v-else class="menu-title-nochildren-wrap">{{ showTitle(item) }}</span>
61
53
  </div>
62
54
  </Col>
63
55
  </Row>
@@ -1,99 +1,89 @@
1
- .other-menu {
2
- width: 100%;
3
- position: absolute;
4
- bottom: 0;
5
- z-index: 1000;
6
- }
7
- .other-menu.other-menu-collapsed .other-menu-item {
8
- width: 100%;
9
- }
10
- .other-menu.other-menu-collapsed .other-menu-item .ivu-tooltip {
11
- width: 100%;
12
- }
13
- .other-menu.other-menu-collapsed .other-menu-item .ivu-tooltip .ivu-tooltip-rel {
14
- width: 100%;
15
- }
16
- .other-menu.other-menu-collapsed .other-menu-item .other-menu-icon {
17
- font-size: 20px;
18
- }
19
- .other-menu.other-menu-collapsed .other-menu-item .other-menu-title {
20
- display: none;
21
- }
22
- .other-menu .other-menu-item {
23
- text-align: center;
24
- line-height: 50px;
25
- height: 48.6px;
26
- width: 50%;
27
- display: inline-block;
28
- cursor: pointer;
29
- }
30
- .other-menu-drawer-list .other-menu-drawer-item {
31
- width: 100%;
32
- height: 35px;
33
- line-height: 35px;
34
- position: relative;
35
- }
36
- .other-menu-drawer-list .other-menu-drawer-item .delete {
37
- display: none;
38
- position: absolute;
39
- right: 0px;
40
- top: 0px;
41
- cursor: pointer;
42
- font-size: large;
43
- }
44
- .other-menu-drawer-list .other-menu-drawer-item:hover .content {
45
- cursor: pointer;
46
- height: 38px;
47
- font-weight: bold;
48
- color: var(--primary-color, #2d8cf0);
49
- }
50
- .other-menu-drawer-list .other-menu-drawer-item:hover .delete {
51
- display: inline;
52
- }
53
- .other-menu-drawer-wrap .ivu-drawer {
54
- left: 220px;
55
- height: calc(100% - 110px);
56
- bottom: 0;
57
- top: auto;
58
- overflow: hidden;
59
- }
60
- .other-menu-drawer-wrap-collapsed .ivu-drawer {
61
- left: 65px;
62
- height: calc(100% - 110px);
63
- bottom: 0;
64
- top: auto;
65
- }
66
- .menu-title-wrap {
67
- width: 70%;
68
- word-wrap: break-word;
69
- display: inline-block;
70
- }
71
- .menu-title-ellipsis {
72
- width: 70%;
73
- word-wrap: break-word;
74
- display: inline-block;
75
- }
76
- .menu-title-nochildren-wrap {
77
- width: 100%;
78
- word-wrap: break-word;
79
- display: inline-block;
80
- }
81
- .menu-title-nochildren-ellipsis {
82
- width: 100%;
83
- overflow: hidden;
84
- white-space: nowrap;
85
- /* 防止内容换行 */
86
- text-overflow: ellipsis;
87
- /* 超出部分省略 */
88
- }
89
- .draggable-text {
90
- -webkit-user-select: none;
91
- /* Safari */
92
- -moz-user-select: none;
93
- /* Firefox */
94
- -ms-user-select: none;
95
- /* IE10+/Edge */
96
- user-select: none;
97
- /* Standard syntax */
98
- }
1
+ .other-menu {
2
+ width: 100%;
3
+ position: absolute;
4
+ bottom: 0;
5
+ z-index: 1000;
6
+ }
7
+ .other-menu.other-menu-collapsed .other-menu-item {
8
+ width: 100%;
9
+ }
10
+ .other-menu.other-menu-collapsed .other-menu-item .ivu-tooltip {
11
+ width: 100%;
12
+ }
13
+ .other-menu.other-menu-collapsed .other-menu-item .ivu-tooltip .ivu-tooltip-rel {
14
+ width: 100%;
15
+ }
16
+ .other-menu.other-menu-collapsed .other-menu-item .other-menu-icon {
17
+ font-size: 20px;
18
+ }
19
+ .other-menu.other-menu-collapsed .other-menu-item .other-menu-title {
20
+ display: none;
21
+ }
22
+ .other-menu .other-menu-item {
23
+ text-align: center;
24
+ line-height: 50px;
25
+ height: 48.6px;
26
+ width: 50%;
27
+ display: inline-block;
28
+ cursor: pointer;
29
+ }
30
+ .other-menu-drawer-list .other-menu-drawer-item {
31
+ width: 100%;
32
+ height: 35px;
33
+ line-height: 35px;
34
+ position: relative;
35
+ }
36
+ .other-menu-drawer-list .other-menu-drawer-item .delete {
37
+ display: none;
38
+ position: absolute;
39
+ right: 0px;
40
+ top: 0px;
41
+ cursor: pointer;
42
+ font-size: large;
43
+ }
44
+ .other-menu-drawer-list .other-menu-drawer-item:hover .content {
45
+ cursor: pointer;
46
+ height: 38px;
47
+ font-weight: bold;
48
+ color: var(--primary-color, #2d8cf0);
49
+ }
50
+ .other-menu-drawer-list .other-menu-drawer-item:hover .delete {
51
+ display: inline;
52
+ }
53
+ .other-menu-drawer-wrap .ivu-drawer {
54
+ left: 220px;
55
+ height: calc(100% - 110px);
56
+ bottom: 0;
57
+ top: auto;
58
+ overflow: hidden;
59
+ }
60
+ .other-menu-drawer-wrap-collapsed .ivu-drawer {
61
+ left: 65px;
62
+ height: calc(100% - 110px);
63
+ bottom: 0;
64
+ top: auto;
65
+ }
66
+ .menu-title-wrap {
67
+ width: 70%;
68
+ word-wrap: break-word;
69
+ display: inline-block;
70
+ }
71
+ .menu-title-ellipsis {
72
+ width: 70%;
73
+ word-wrap: break-word;
74
+ display: inline-block;
75
+ }
76
+ .menu-title-nochildren-wrap {
77
+ width: 100%;
78
+ word-wrap: break-word;
79
+ display: inline-block;
80
+ }
81
+ .menu-title-nochildren-ellipsis {
82
+ width: 100%;
83
+ overflow: hidden;
84
+ white-space: nowrap;
85
+ /* 防止内容换行 */
86
+ text-overflow: ellipsis;
87
+ /* 超出部分省略 */
88
+ }
99
89
  /*# sourceMappingURL=other-menu.css.map */
@@ -1 +1 @@
1
- {"version":3,"sources":["other-menu.less"],"names":[],"mappings":"AACA;EACE,WAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;;AACA,WAAC,qBACC;EACE,WAAA;;AAFJ,WAAC,qBACC,iBAEE;EACE,WAAA;;AAJN,WAAC,qBACC,iBAEE,aAEE;EACE,WAAA;;AANR,WAAC,qBACC,iBAQE;EACE,eAAA;;AAVN,WAAC,qBACC,iBAWE;EACE,aAAA;;AAlBR,WAsBE;EACE,kBAAA;EACA,iBAAA;EACA,cAAA;EACA,UAAA;EACA,qBAAA;EACA,eAAA;;AAIJ,uBACE;EACE,WAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;;AALJ,uBACE,wBAKE;EACE,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,eAAA;EACA,gBAAA;;AAEF,uBAbF,wBAaG,MACC;EACE,eAAA;EACA,YAAA;EACA,iBAAA;EACA,OAAO,6BAAP;;AALJ,uBAbF,wBAaG,MAOC;EACE,eAAA;;AAMR,uBACE;EACE,WAAA;EACA,QAAQ,kBAAR;EACA,SAAA;EACA,SAAA;EACA,gBAAA;;AAIJ,iCACE;EACE,UAAA;EACA,QAAQ,kBAAR;EACA,SAAA;EACA,SAAA;;AAGJ;EACE,UAAA;EACA,qBAAA;EACA,qBAAA;;AAEF;EACE,UAAA;EACA,qBAAA;EACA,qBAAA;;AAEF;EACE,WAAA;EACA,qBAAA;EACA,qBAAA;;AAEF;EACE,WAAA;EACA,gBAAA;EACA,mBAAA;;EACA,uBAAA;;;AAEF;EACE,yBAAA;;EACA,sBAAA;;EACA,qBAAA;;EACA,iBAAA","file":"other-menu.css"}
1
+ {"version":3,"sources":["other-menu.less"],"names":[],"mappings":"AACA;EACE,WAAA;EACA,kBAAA;EACA,SAAA;EACA,aAAA;;AACA,WAAC,qBACC;EACE,WAAA;;AAFJ,WAAC,qBACC,iBAEE;EACE,WAAA;;AAJN,WAAC,qBACC,iBAEE,aAEE;EACE,WAAA;;AANR,WAAC,qBACC,iBAQE;EACE,eAAA;;AAVN,WAAC,qBACC,iBAWE;EACE,aAAA;;AAlBR,WAsBE;EACE,kBAAA;EACA,iBAAA;EACA,cAAA;EACA,UAAA;EACA,qBAAA;EACA,eAAA;;AAIJ,uBACE;EACE,WAAA;EACA,YAAA;EACA,iBAAA;EACA,kBAAA;;AALJ,uBACE,wBAKE;EACE,aAAA;EACA,kBAAA;EACA,UAAA;EACA,QAAA;EACA,eAAA;EACA,gBAAA;;AAEF,uBAbF,wBAaG,MACC;EACE,eAAA;EACA,YAAA;EACA,iBAAA;EACA,OAAO,6BAAP;;AALJ,uBAbF,wBAaG,MAOC;EACE,eAAA;;AAMR,uBACE;EACE,WAAA;EACA,QAAQ,kBAAR;EACA,SAAA;EACA,SAAA;EACA,gBAAA;;AAIJ,iCACE;EACE,UAAA;EACA,QAAQ,kBAAR;EACA,SAAA;EACA,SAAA;;AAGJ;EACE,UAAA;EACA,qBAAA;EACA,qBAAA;;AAEF;EACE,UAAA;EACA,qBAAA;EACA,qBAAA;;AAEF;EACE,WAAA;EACA,qBAAA;EACA,qBAAA;;AAEF;EACE,WAAA;EACA,gBAAA;EACA,mBAAA;;EACA,uBAAA","file":"other-menu.css"}
@@ -84,8 +84,9 @@
84
84
  }
85
85
  .menu-title-ellipsis{
86
86
  width: 70%;
87
- word-wrap: break-word;
88
- display: inline-block;
87
+ overflow: hidden;
88
+ white-space: nowrap; /* 防止内容换行 */
89
+ text-overflow: ellipsis; /* 超出部分省略 */
89
90
  }
90
91
  .menu-title-nochildren-wrap{
91
92
  width: 100%;
@@ -98,9 +99,3 @@
98
99
  white-space: nowrap; /* 防止内容换行 */
99
100
  text-overflow: ellipsis; /* 超出部分省略 */
100
101
  }
101
- .draggable-text {
102
- -webkit-user-select: none; /* Safari */
103
- -moz-user-select: none; /* Firefox */
104
- -ms-user-select: none; /* IE10+/Edge */
105
- user-select: none; /* Standard syntax */
106
- }