@lambo-design/pro-layout 1.0.0-beta.354 → 1.0.0-beta.356

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.354",
3
+ "version": "1.0.0-beta.356",
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.236",
14
- "@lambo-design/core": "^4.7.1-beta.147"
13
+ "@lambo-design/core": "^4.7.1-beta.149",
14
+ "@lambo-design/shared": "^1.0.0-beta.237"
15
15
  },
16
16
  "scripts": {
17
17
  "release-pro-layout": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="pro-layout-header-wrapper">
3
- <div class="trigger-box" :style="menuScalingStyle">
3
+ <div class="trigger-box" :style="menuScalingStyle" v-show="hideMenuLogo">
4
4
  <slot name="pro-layout-trigger">
5
5
  <LamboProTrigger v-if="systemInfo.menuScaling === '1'"></LamboProTrigger>
6
6
  </slot>
@@ -44,6 +44,10 @@ export default {
44
44
  acceptAppId: {
45
45
  type: String,
46
46
  default:''
47
+ },
48
+ hideMenuLogo: {
49
+ type: Boolean,
50
+ default:true
47
51
  }
48
52
  },
49
53
  data(){
@@ -15,6 +15,9 @@
15
15
  <Col class="font-padding" v-show="rightTopOptButtonList.includes('search')">
16
16
  <ProLayoutToolsQuickSearch></ProLayoutToolsQuickSearch>
17
17
  </Col>
18
+ <Col class="font-padding" v-show="rightTopOptButtonList.includes('i18n')">
19
+ <ProLayoutToolsQuickIntl></ProLayoutToolsQuickIntl>
20
+ </Col>
18
21
  </Row>
19
22
  </template>
20
23
 
@@ -24,6 +27,7 @@ import ProLayoutToolsQuickCollect from './pro-layout-tools-quick-collect';
24
27
  import ProLayoutToolsQuickFullscreen from './pro-layout-tools-quick-fullscreen';
25
28
  import ProLayoutToolsQuickTodo from './pro-layout-tools-quick-todo';
26
29
  import ProLayoutToolsQuickNotice from './pro-layout-tools-quick-notice';
30
+ import ProLayoutToolsQuickIntl from './pro-layout-tools-quick-intl';
27
31
  import Bus from '@lambo-design/shared/utils/bus'
28
32
  import {deepCopy} from "@lambo-design/shared/utils/assist";
29
33
 
@@ -39,7 +43,8 @@ export default {
39
43
  ProLayoutToolsQuickCollect,
40
44
  ProLayoutToolsQuickFullscreen,
41
45
  ProLayoutToolsQuickTodo,
42
- ProLayoutToolsQuickNotice
46
+ ProLayoutToolsQuickNotice,
47
+ ProLayoutToolsQuickIntl
43
48
  },
44
49
  methods: {
45
50
  initListener() {
@@ -0,0 +1,79 @@
1
+ <template>
2
+ <div class="user-avatar-dropdown">
3
+ <Dropdown @on-click="switchLang" :transfer="false">
4
+ <span>{{defaultLang}}</span>
5
+ <Icon type="ios-arrow-down"/>
6
+ <DropdownMenu slot="list">
7
+ <DropdownItem v-for="(item, index) in intlDictList" :key="index" :name="item.dictKey"><span>{{ item.dictValue }}</span></DropdownItem>
8
+ </DropdownMenu>
9
+ </Dropdown>
10
+ </div>
11
+ </template>
12
+
13
+
14
+ <script>
15
+
16
+ import Bus from "@lambo-design/shared/utils/bus";
17
+ import {deepCopy} from "@lambo-design/shared/utils/assist";
18
+
19
+ export default {
20
+ name: 'pro-layout-tools-intl',
21
+ data() {
22
+ return {
23
+ defaultLang: '语言',
24
+ langCodeDict:{},
25
+ intlDictList:[]
26
+ }
27
+ },
28
+ methods: {
29
+ initListener() {
30
+ Bus.$on('other-datas',(data) => {
31
+ this.initIntlDictList(data);
32
+ })
33
+ },
34
+ destroyListener() {
35
+ Bus.$off('other-datas')
36
+ },
37
+ initIntlDictList(data) {
38
+ if (data && data.intlDatas){
39
+ this.intlDictList = deepCopy(data.intlDatas);
40
+ this.intlDictList.forEach(item => {
41
+ this.langCodeDict[item.dictKey] = item.dictValue;
42
+ })
43
+ }
44
+
45
+ this.setDefaultLang();
46
+ },
47
+ switchLang(name) {
48
+ window.sessionStorage.clear();
49
+ this.defaultLang = this.langCodeDict[name];
50
+ sessionStorage.setItem("lambo_lang_code", name);
51
+ window.location.reload();
52
+ },
53
+ setDefaultLang() {
54
+ let langCode = sessionStorage.getItem("lambo_lang_code");
55
+ if(langCode){
56
+ this.defaultLang = this.langCodeDict[langCode];
57
+ }
58
+ }
59
+ },
60
+ mounted() {
61
+ this.setDefaultLang();
62
+ },
63
+ created() {
64
+ this.initListener()
65
+ },
66
+ beforeDestroy() {
67
+ this.destroyListener()
68
+ }
69
+ }
70
+ </script>
71
+ <style lang="less" scoped>
72
+ @import '@lambo-design/core/src/styles/default.less';
73
+ .user-avatar-dropdown {
74
+ float: left;
75
+ cursor: pointer;
76
+ vertical-align: middle;
77
+ font-size: var(--font-size-base, @_font-size-base);
78
+ }
79
+ </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>
package/src/index.vue CHANGED
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <i-layout class="pro-layout" :class="layoutClass">
3
3
  <i-header class="pro-layout-header" :style="systemInfo.headBackground ? headBackgroundStyle : ''">
4
- <LamboProLayoutHeader>
4
+ <LamboProLayoutHeader :hide-menu-logo="isHideLeftMenu">
5
5
  <template slot = "pro-layout-trigger">
6
6
  <slot name="pro-layout-trigger"></slot>
7
7
  </template>
@@ -20,7 +20,7 @@
20
20
  </LamboProLayoutHeader>
21
21
  </i-header>
22
22
  <i-layout>
23
- <i-sider
23
+ <i-sider v-show="isHideLeftMenu"
24
24
  class="pro-layout-sider"
25
25
  hide-trigger
26
26
  collapsible
@@ -114,7 +114,8 @@ export default {
114
114
  collapsed: false,
115
115
  appId: '',
116
116
  activeName: '',
117
- tagList: []
117
+ tagList: [],
118
+ isHideLeftMenu: false
118
119
  }
119
120
  },
120
121
  components: {
@@ -259,6 +260,7 @@ export default {
259
260
  if (!appInfo) {
260
261
  appInfo = this.navList.filter(item => item.appId == appId)[0];
261
262
  }
263
+ this.isHideLeftMenu=appInfo.extendProps.is_hide_left_menu!='1'
262
264
  this.appId = appId;
263
265
  this.$emit('change-app',{appId,appInfo})
264
266
  },