vue2-client 1.4.27 → 1.4.28

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/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Change Log
2
2
  > 所有关于本项目的变化都在该文档里。
3
3
 
4
+ **1.4.28 -2022-10-08 @江超**
5
+ - 功能修改:
6
+ - 顶部导航模式增加内容宽度
7
+
4
8
  **1.4.27 -2022-10-06 @江超**
5
9
  - 功能修改:
6
10
  - 修改v4登录获取信息方式
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vue2-client",
3
- "version": "1.4.27",
3
+ "version": "1.4.28",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -1,40 +1,40 @@
1
- .page-header{
2
- background: @base-bg-color;
3
- padding: 16px 24px;
4
- &.head.fixed{
5
- margin: auto;
6
- max-width: 1400px;
7
- }
8
- .page-header-wide{
9
- .breadcrumb{
10
- margin-bottom: 20px;
11
- }
12
- .detail{
13
- display: flex;
14
- .row {
15
- display: flex;
16
- flex-wrap: wrap;
17
- justify-content: space-between;
18
- }
19
- .avatar {
20
- margin:0 24px 0 0;
21
- }
22
- .main{
23
- width: 100%;
24
- .title{
25
- font-size: 20px;
26
- color: @title-color;
27
- margin-bottom: 16px;
28
- }
29
- .content{
30
- display: flex;
31
- flex-wrap: wrap;
32
- color: @text-color-second;
33
- }
34
- .extra{
35
- display: flex;
36
- }
37
- }
38
- }
39
- }
40
- }
1
+ .page-header{
2
+ background: @base-bg-color;
3
+ padding: 16px 24px;
4
+ &.head.fixed{
5
+ margin: auto;
6
+ max-width: 100%;
7
+ }
8
+ .page-header-wide{
9
+ .breadcrumb{
10
+ margin-bottom: 20px;
11
+ }
12
+ .detail{
13
+ display: flex;
14
+ .row {
15
+ display: flex;
16
+ flex-wrap: wrap;
17
+ justify-content: space-between;
18
+ }
19
+ .avatar {
20
+ margin:0 24px 0 0;
21
+ }
22
+ .main{
23
+ width: 100%;
24
+ .title{
25
+ font-size: 20px;
26
+ color: @title-color;
27
+ margin-bottom: 16px;
28
+ }
29
+ .content{
30
+ display: flex;
31
+ flex-wrap: wrap;
32
+ color: @text-color-second;
33
+ }
34
+ .extra{
35
+ display: flex;
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
@@ -1,151 +1,151 @@
1
- <template>
2
- <div class="page-layout">
3
- <page-header
4
- ref="pageHeader"
5
- :style="`margin-top: ${multiPage ? 0 : -24}px`"
6
- :breadcrumb="breadcrumb"
7
- :title="pageTitle"
8
- :logo="logo"
9
- :avatar="avatar">
10
- <slot name="action" slot="action"></slot>
11
- <slot slot="content" name="headerContent"></slot>
12
- <div slot="content" v-if="!this.$slots.headerContent && desc">
13
- <p>{{ desc }}</p>
14
- <div v-if="this.linkList" class="link">
15
- <template v-for="(link, index) in linkList">
16
- <a :key="index" :href="link.href"><a-icon :type="link.icon" />{{ link.title }}</a>
17
- </template>
18
- </div>
19
- </div>
20
- <slot v-if="this.$slots.extra" slot="extra" name="extra"></slot>
21
- </page-header>
22
- <div ref="page" :class="['page-content', layout, pageWidth]" >
23
- <slot></slot>
24
- </div>
25
- </div>
26
- </template>
27
-
28
- <script>
29
- import PageHeader from '@vue2-client/components/page/header/PageHeader'
30
- import { mapState, mapMutations } from 'vuex'
31
- import { getI18nKey } from '@vue2-client/utils/routerUtil'
32
-
33
- export default {
34
- name: 'PageLayout',
35
- components: { PageHeader },
36
- // eslint-disable-next-line vue/require-prop-types
37
- props: ['desc', 'logo', 'title', 'avatar', 'linkList', 'extraImage'],
38
- data () {
39
- return {
40
- page: {},
41
- pageHeaderHeight: 0
42
- }
43
- },
44
- watch: {
45
- $route () {
46
- this.page = this.$route.meta.page
47
- }
48
- },
49
- updated () {
50
- if (!this._inactive) {
51
- this.updatePageHeight()
52
- }
53
- },
54
- activated () {
55
- this.updatePageHeight()
56
- },
57
- deactivated () {
58
- this.updatePageHeight(0)
59
- },
60
- mounted () {
61
- this.updatePageHeight()
62
- },
63
- created () {
64
- this.page = this.$route.meta.page
65
- },
66
- beforeDestroy () {
67
- this.updatePageHeight(0)
68
- },
69
- computed: {
70
- ...mapState('setting', ['layout', 'multiPage', 'pageMinHeight', 'pageWidth', 'customTitles']),
71
- pageTitle () {
72
- const pageTitle = this.page && this.page.title
73
- return this.customTitle || (pageTitle && this.$t(pageTitle)) || this.title || this.routeName
74
- },
75
- routeName () {
76
- const route = this.$route
77
- return this.$t(getI18nKey(route.matched[route.matched.length - 1].path))
78
- },
79
- breadcrumb () {
80
- const page = this.page
81
- const breadcrumb = page && page.breadcrumb
82
- if (breadcrumb) {
83
- const i18nBreadcrumb = []
84
- breadcrumb.forEach(item => {
85
- i18nBreadcrumb.push(this.$t(item))
86
- })
87
- return i18nBreadcrumb
88
- } else {
89
- return this.getRouteBreadcrumb()
90
- }
91
- },
92
- marginCorrect () {
93
- return this.multiPage ? 24 : 0
94
- }
95
- },
96
- methods: {
97
- ...mapMutations('setting', ['correctPageMinHeight']),
98
- getRouteBreadcrumb () {
99
- const routes = this.$route.matched
100
- const path = this.$route.path
101
- const breadcrumb = []
102
- routes.filter(item => path.includes(item.path))
103
- .forEach(route => {
104
- const path = route.path.length === 0 ? '/home' : route.path
105
- breadcrumb.push(this.$t(getI18nKey(path)))
106
- })
107
- const pageTitle = this.page && this.page.title
108
- if (this.customTitle || pageTitle) {
109
- breadcrumb[breadcrumb.length - 1] = this.customTitle || pageTitle
110
- }
111
- return breadcrumb
112
- },
113
- /**
114
- * 用于计算页面内容最小高度
115
- * @param newHeight
116
- */
117
- updatePageHeight (newHeight = this.$refs.pageHeader.$el.offsetHeight + this.marginCorrect) {
118
- this.correctPageMinHeight(this.pageHeaderHeight - newHeight)
119
- this.pageHeaderHeight = newHeight
120
- }
121
- }
122
- }
123
- </script>
124
-
125
- <style lang="less">
126
- .page-header{
127
- margin: 0 -24px 0;
128
- }
129
- .link{
130
- /*margin-top: 16px;*/
131
- line-height: 24px;
132
- a{
133
- font-size: 14px;
134
- margin-right: 32px;
135
- i{
136
- font-size: 22px;
137
- margin-right: 8px;
138
- }
139
- }
140
- }
141
- .page-content{
142
- position: relative;
143
- padding: 24px 0 0;
144
- &.side{
145
- }
146
- &.head.fixed{
147
- margin: 0 auto;
148
- max-width: 1400px;
149
- }
150
- }
151
- </style>
1
+ <template>
2
+ <div class="page-layout">
3
+ <page-header
4
+ ref="pageHeader"
5
+ :style="`margin-top: ${multiPage ? 0 : -24}px`"
6
+ :breadcrumb="breadcrumb"
7
+ :title="pageTitle"
8
+ :logo="logo"
9
+ :avatar="avatar">
10
+ <slot name="action" slot="action"></slot>
11
+ <slot slot="content" name="headerContent"></slot>
12
+ <div slot="content" v-if="!this.$slots.headerContent && desc">
13
+ <p>{{ desc }}</p>
14
+ <div v-if="this.linkList" class="link">
15
+ <template v-for="(link, index) in linkList">
16
+ <a :key="index" :href="link.href"><a-icon :type="link.icon" />{{ link.title }}</a>
17
+ </template>
18
+ </div>
19
+ </div>
20
+ <slot v-if="this.$slots.extra" slot="extra" name="extra"></slot>
21
+ </page-header>
22
+ <div ref="page" :class="['page-content', layout, pageWidth]" >
23
+ <slot></slot>
24
+ </div>
25
+ </div>
26
+ </template>
27
+
28
+ <script>
29
+ import PageHeader from '@vue2-client/components/page/header/PageHeader'
30
+ import { mapState, mapMutations } from 'vuex'
31
+ import { getI18nKey } from '@vue2-client/utils/routerUtil'
32
+
33
+ export default {
34
+ name: 'PageLayout',
35
+ components: { PageHeader },
36
+ // eslint-disable-next-line vue/require-prop-types
37
+ props: ['desc', 'logo', 'title', 'avatar', 'linkList', 'extraImage'],
38
+ data () {
39
+ return {
40
+ page: {},
41
+ pageHeaderHeight: 0
42
+ }
43
+ },
44
+ watch: {
45
+ $route () {
46
+ this.page = this.$route.meta.page
47
+ }
48
+ },
49
+ updated () {
50
+ if (!this._inactive) {
51
+ this.updatePageHeight()
52
+ }
53
+ },
54
+ activated () {
55
+ this.updatePageHeight()
56
+ },
57
+ deactivated () {
58
+ this.updatePageHeight(0)
59
+ },
60
+ mounted () {
61
+ this.updatePageHeight()
62
+ },
63
+ created () {
64
+ this.page = this.$route.meta.page
65
+ },
66
+ beforeDestroy () {
67
+ this.updatePageHeight(0)
68
+ },
69
+ computed: {
70
+ ...mapState('setting', ['layout', 'multiPage', 'pageMinHeight', 'pageWidth', 'customTitles']),
71
+ pageTitle () {
72
+ const pageTitle = this.page && this.page.title
73
+ return this.customTitle || (pageTitle && this.$t(pageTitle)) || this.title || this.routeName
74
+ },
75
+ routeName () {
76
+ const route = this.$route
77
+ return this.$t(getI18nKey(route.matched[route.matched.length - 1].path))
78
+ },
79
+ breadcrumb () {
80
+ const page = this.page
81
+ const breadcrumb = page && page.breadcrumb
82
+ if (breadcrumb) {
83
+ const i18nBreadcrumb = []
84
+ breadcrumb.forEach(item => {
85
+ i18nBreadcrumb.push(this.$t(item))
86
+ })
87
+ return i18nBreadcrumb
88
+ } else {
89
+ return this.getRouteBreadcrumb()
90
+ }
91
+ },
92
+ marginCorrect () {
93
+ return this.multiPage ? 24 : 0
94
+ }
95
+ },
96
+ methods: {
97
+ ...mapMutations('setting', ['correctPageMinHeight']),
98
+ getRouteBreadcrumb () {
99
+ const routes = this.$route.matched
100
+ const path = this.$route.path
101
+ const breadcrumb = []
102
+ routes.filter(item => path.includes(item.path))
103
+ .forEach(route => {
104
+ const path = route.path.length === 0 ? '/home' : route.path
105
+ breadcrumb.push(this.$t(getI18nKey(path)))
106
+ })
107
+ const pageTitle = this.page && this.page.title
108
+ if (this.customTitle || pageTitle) {
109
+ breadcrumb[breadcrumb.length - 1] = this.customTitle || pageTitle
110
+ }
111
+ return breadcrumb
112
+ },
113
+ /**
114
+ * 用于计算页面内容最小高度
115
+ * @param newHeight
116
+ */
117
+ updatePageHeight (newHeight = this.$refs.pageHeader.$el.offsetHeight + this.marginCorrect) {
118
+ this.correctPageMinHeight(this.pageHeaderHeight - newHeight)
119
+ this.pageHeaderHeight = newHeight
120
+ }
121
+ }
122
+ }
123
+ </script>
124
+
125
+ <style lang="less">
126
+ .page-header{
127
+ margin: 0 -24px 0;
128
+ }
129
+ .link{
130
+ /*margin-top: 16px;*/
131
+ line-height: 24px;
132
+ a{
133
+ font-size: 14px;
134
+ margin-right: 32px;
135
+ i{
136
+ font-size: 22px;
137
+ margin-right: 8px;
138
+ }
139
+ }
140
+ }
141
+ .page-content{
142
+ position: relative;
143
+ padding: 24px 0 0;
144
+ &.side{
145
+ }
146
+ &.head.fixed{
147
+ margin: 0 auto;
148
+ max-width: 100%;
149
+ }
150
+ }
151
+ </style>
@@ -1,92 +1,92 @@
1
- .admin-header{
2
- padding: 0;
3
- z-index: 2;
4
- box-shadow: @shadow-down;
5
- position: relative;
6
- background: @base-bg-color;
7
- .head-menu{
8
- height: 64px;
9
- line-height: 64px;
10
- vertical-align: middle;
11
- box-shadow: none;
12
- }
13
- &.dark{
14
- background: @header-bg-color-dark;
15
- color: white;
16
- }
17
- &.night{
18
- .head-menu{
19
- background: @base-bg-color;
20
- }
21
- }
22
- .admin-header-wide{
23
- padding-left: 24px;
24
- &.head.fixed{
25
- max-width: 1400px;
26
- margin: auto;
27
- padding-left: 0;
28
- }
29
- &.side{
30
- padding-right: 12px;
31
- }
32
- .logo {
33
- height: 64px;
34
- line-height: 58px;
35
- vertical-align: top;
36
- display: inline-block;
37
- padding: 0 12px 0 24px;
38
- cursor: pointer;
39
- font-size: 20px;
40
- color: inherit;
41
- &.pc{
42
- padding: 0 12px 0 0;
43
- }
44
- img {
45
- vertical-align: middle;
46
- }
47
- h1{
48
- color: inherit;
49
- display: inline-block;
50
- font-size: 16px;
51
- }
52
- }
53
- .trigger {
54
- font-size: 20px;
55
- line-height: 64px;
56
- padding: 0 24px;
57
- cursor: pointer;
58
- transition: color .3s;
59
- &:hover{
60
- color: @primary-color;
61
- }
62
- }
63
- .admin-header-menu{
64
- display: inline-block;
65
- }
66
- .admin-header-right{
67
- float: right;
68
- display: flex;
69
- color: inherit;
70
- .header-item{
71
- color: inherit;
72
- padding: 0 12px;
73
- cursor: pointer;
74
- align-self: center;
75
- a{
76
- color: inherit;
77
- i{
78
- font-size: 16px;
79
- }
80
- }
81
- }
82
- each(@theme-list, {
83
- &.@{value} .header-item{
84
- &:hover{
85
- @class: ~'hover-bg-color-@{value}';
86
- background-color: @@class;
87
- }
88
- }
89
- })
90
- }
91
- }
92
- }
1
+ .admin-header{
2
+ padding: 0;
3
+ z-index: 2;
4
+ box-shadow: @shadow-down;
5
+ position: relative;
6
+ background: @base-bg-color;
7
+ .head-menu{
8
+ height: 64px;
9
+ line-height: 64px;
10
+ vertical-align: middle;
11
+ box-shadow: none;
12
+ }
13
+ &.dark{
14
+ background: @header-bg-color-dark;
15
+ color: white;
16
+ }
17
+ &.night{
18
+ .head-menu{
19
+ background: @base-bg-color;
20
+ }
21
+ }
22
+ .admin-header-wide{
23
+ padding-left: 24px;
24
+ &.head.fixed{
25
+ padding: 0 24px;
26
+ max-width: 100%;
27
+ margin: auto;
28
+ }
29
+ &.side{
30
+ padding-right: 12px;
31
+ }
32
+ .logo {
33
+ height: 64px;
34
+ line-height: 58px;
35
+ vertical-align: top;
36
+ display: inline-block;
37
+ padding: 0 12px 0 24px;
38
+ cursor: pointer;
39
+ font-size: 20px;
40
+ color: inherit;
41
+ &.pc{
42
+ padding: 0 12px 0 0;
43
+ }
44
+ img {
45
+ vertical-align: middle;
46
+ }
47
+ h1{
48
+ color: inherit;
49
+ display: inline-block;
50
+ font-size: 16px;
51
+ }
52
+ }
53
+ .trigger {
54
+ font-size: 20px;
55
+ line-height: 64px;
56
+ padding: 0 24px;
57
+ cursor: pointer;
58
+ transition: color .3s;
59
+ &:hover{
60
+ color: @primary-color;
61
+ }
62
+ }
63
+ .admin-header-menu{
64
+ display: inline-block;
65
+ }
66
+ .admin-header-right{
67
+ float: right;
68
+ display: flex;
69
+ color: inherit;
70
+ .header-item{
71
+ color: inherit;
72
+ padding: 0 12px;
73
+ cursor: pointer;
74
+ align-self: center;
75
+ a{
76
+ color: inherit;
77
+ i{
78
+ font-size: 16px;
79
+ }
80
+ }
81
+ }
82
+ each(@theme-list, {
83
+ &.@{value} .header-item{
84
+ &:hover{
85
+ @class: ~'hover-bg-color-@{value}';
86
+ background-color: @@class;
87
+ }
88
+ }
89
+ })
90
+ }
91
+ }
92
+ }
@@ -141,7 +141,7 @@
141
141
  .tabs-head{
142
142
  margin: 0 auto;
143
143
  &.head.fixed{
144
- width: 1400px;
144
+ width: 100%;
145
145
  }
146
146
  }
147
147
  .tabs-container{
@@ -358,13 +358,13 @@ export default {
358
358
  .tabs-view {
359
359
  margin: -16px auto 8px;
360
360
  &.head.fixed {
361
- max-width: 1400px;
361
+ max-width: 100%;
362
362
  }
363
363
  }
364
364
  .tabs-view-content {
365
365
  position: relative;
366
366
  &.head.fixed {
367
- width: 1400px;
367
+ width: 100%;
368
368
  margin: 0 auto;
369
369
  }
370
370
  > div > div > .ant-card:first-of-type > .ant-card-body {
@@ -54,7 +54,7 @@
54
54
 
55
55
  <script>
56
56
  import CommonLayout from '@vue2-client/layouts/CommonLayout'
57
- import { getRoutesConfig, login, V4GetInfo, V4Login } from '@vue2-client/services/user'
57
+ import { getRoutesConfig, login, V4Login } from '@vue2-client/services/user'
58
58
  import { setAuthorization } from '@vue2-client/utils/request'
59
59
  import { loadRoutes, funcToRouter } from '@vue2-client/utils/routerUtil'
60
60
  import { mapMutations, mapState } from 'vuex'