@lambo-design/pro-layout 1.0.0-beta.457 → 1.0.0-beta.459

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.457",
3
+ "version": "1.0.0-beta.459",
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/core": "^4.7.1-beta.178",
14
- "@lambo-design/shared": "^1.0.0-beta.364"
13
+ "@lambo-design/shared": "^1.0.0-beta.364",
14
+ "@lambo-design/core": "^4.7.1-beta.178"
15
15
  },
16
16
  "scripts": {
17
17
  "release-pro-layout": "pnpm release-beta && git push --follow-tags && pnpm re-publish",
@@ -20,7 +20,7 @@
20
20
  </slot>
21
21
  </div>
22
22
  <div class="tools-box">
23
- <LamboProTools :show-tools-quick-icons="hideMenuLogo">
23
+ <LamboProTools>
24
24
  <template slot = "pro-layout-icons">
25
25
  <slot name="pro-layout-icons"></slot>
26
26
  </template>
@@ -2,12 +2,15 @@
2
2
  <div class="user-avatar-dropdown">
3
3
  <Dropdown @on-click="handleClick" :transfer="false">
4
4
  <span>{{ t('pro-layout.header.user-welcome') }},{{ userInfo.userName }}</span>
5
+ <span class="user-avatar" :style="buildAvaterStyle(userInfo.userAvater)" v-if="userInfo.userAvater"></span>
6
+ <Icon type="ios-contact" v-if="!userInfo.userAvater" class="user-avatar-icon"></Icon>
5
7
  <Icon v-if="userInfo.dropList.length > 0" type="ios-arrow-down"/>
6
8
  <DropdownMenu v-if="userInfo.dropList.length > 0" slot="list">
7
9
  <DropdownItem v-if="userInfo.dropList.includes('theme')" name="theme"><span>{{ t('pro-layout.header.user-change-theme') }}</span></DropdownItem>
8
10
  <DropdownItem v-if="userInfo.dropList.includes('showTheme')" name="showTheme"><span>{{ t('pro-layout.header.user-custom-theme') }}</span></DropdownItem>
9
11
  <DropdownItem v-if="userInfo.dropList.includes('personalCenter')" name="personalCenter"><span>{{ t('pro-layout.header.user-person-center') }}</span></DropdownItem>
10
12
  <DropdownItem v-if="userInfo.dropList.includes('noticeList')" name="noticeList"><span>{{ t('pro-layout.header.user-notice') }}</span></DropdownItem>
13
+ <DropdownItem v-if="userInfo.dropList.includes('customGsUpdatePass')" name="customGsUpdatePass"><span>修改密码</span></DropdownItem>
11
14
  <DropdownItem v-if="userInfo.dropList.includes('logout')" name="logout"><span>{{ t('pro-layout.header.user-logout') }}</span></DropdownItem>
12
15
  </DropdownMenu>
13
16
  </Dropdown>
@@ -26,6 +29,7 @@ export default {
26
29
  userInfo: {
27
30
  userName: this.t('pro-layout.header.user-default-name'),
28
31
  dropList: ['theme', 'personalCenter', 'noticeList', 'logout'],
32
+ userAvater: ''
29
33
  }
30
34
  }
31
35
  },
@@ -43,6 +47,9 @@ export default {
43
47
  },
44
48
  handleClick(name) {
45
49
  Bus.$emit('user-action', name)
50
+ },
51
+ buildAvaterStyle(avater){
52
+ return 'backgroundImage:url(' + config.ossServerContext + '/oss/file/get/' + avater + ')';
46
53
  }
47
54
  },
48
55
  created() {
@@ -60,5 +67,19 @@ export default {
60
67
  cursor: pointer;
61
68
  vertical-align: middle;
62
69
  font-size: var(--font-size-base, @_font-size-base);
70
+ .user-avatar{
71
+ display: inline-block;
72
+ vertical-align: middle;
73
+ margin-left: 4px;
74
+ width: 18px;
75
+ height: 18px;
76
+ border-radius: 8px;
77
+ background-size: cover;
78
+ background-position: center;
79
+ }
80
+ .user-avatar-icon{
81
+ margin-left: 4px;
82
+ font-size:18px;
83
+ }
63
84
  }
64
85
  </style>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="pro-layout-tools-wrapper">
3
3
  <slot name="pro-layout-icons">
4
- <LamboProLayoutToolsQuickIcons v-show="showToolsQuickIcons">
4
+ <LamboProLayoutToolsQuickIcons>
5
5
  <template slot="pro-layout-custom-icons">
6
6
  <slot name="pro-layout-custom-icons"></slot>
7
7
  </template>
@@ -21,13 +21,7 @@ export default {
21
21
  components: {
22
22
  LamboProLayoutToolsQuickIcons,
23
23
  LamboProLayoutToolsUser
24
- },
25
- props: {
26
- showToolsQuickIcons: {
27
- type: Boolean,
28
- default: true
29
- }
30
- },
24
+ }
31
25
  }
32
26
  </script>
33
27