Skip to content

Commit 9e3adaa

Browse files
committed
fix(page-wrapper): fix PageWrapper title not showing
1 parent 7d8b8db commit 9e3adaa

File tree

7 files changed

+26
-22
lines changed

7 files changed

+26
-22
lines changed

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"vetur.format.defaultFormatter.ts": "prettier-tslint",
139139
"vetur.format.defaultFormatter.js": "prettier",
140140
"vetur.languageFeatures.codeActions": false,
141-
"vetur.validation.script": false,
141+
// "vetur.validation.script": false,
142142
"vetur.format.defaultFormatterOptions": {
143143
"js-beautify-html": {
144144
"wrap_attributes": "force-expand-multiline"

CHANGELOG.zh_CN.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
- 确保 `table action` 的值被正确更新
1010
- 修复页面切换的动画无法关闭
11+
- 修复`PageWrapper`title 不显示
1112

1213
## 2.0.3 (2021-03-07)
1314

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"vite-plugin-style-import": "^0.8.1",
113113
"vite-plugin-svg-icons": "^0.3.3",
114114
"vite-plugin-theme": "^0.4.8",
115-
"vite-plugin-windicss": "0.7.0",
115+
"vite-plugin-windicss": "0.7.1",
116116
"vue-eslint-parser": "^7.6.0",
117117
"yargs": "^16.2.0"
118118
},

src/components/Page/src/PageWrapper.vue

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
<div :class="getClass">
33
<PageHeader
44
:ghost="ghost"
5+
:title="title"
56
v-bind="$attrs"
67
ref="headerRef"
7-
v-if="content || $slots.headerContent"
8+
v-if="content || $slots.headerContent || title || getHeaderSlots.length"
89
>
910
<template #default>
1011
<template v-if="content">
@@ -49,6 +50,7 @@
4950
components: { PageFooter, PageHeader },
5051
inheritAttrs: false,
5152
props: {
53+
title: propTypes.string,
5254
dense: propTypes.bool,
5355
ghost: propTypes.bool,
5456
content: propTypes.string,

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import '/@/design/index.less';
2-
import 'windi.css';
2+
import '@virtual/windi.css';
33

44
// Do not introduce on-demand in local development?
55
// In the local development for on-demand introduction, the number of browser requests will increase by about 20%.

src/views/demo/system/password/index.vue

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
<template>
2-
<div class="p-4 flex flex-col justify-center items-center">
3-
<BasicForm @register="register" />
4-
5-
<div class="flex justify-center">
6-
<a-button @click="resetFields"> 重置 </a-button>
7-
<a-button class="ml-4" type="primary" @click="handleSubmit"> 确认 </a-button>
2+
<PageWrapper title="修改当前用户密码" content="修改成功后会自动退出当前登录!">
3+
<div class="py-8 bg-white flex flex-col justify-center items-center">
4+
<BasicForm @register="register" />
5+
<div class="flex justify-center">
6+
<a-button @click="resetFields"> 重置 </a-button>
7+
<a-button class="ml-4" type="primary" @click="handleSubmit"> 确认 </a-button>
8+
</div>
89
</div>
9-
</div>
10+
</PageWrapper>
1011
</template>
1112
<script lang="ts">
1213
import { defineComponent } from 'vue';
13-
14+
import { PageWrapper } from '/@/components/Page';
1415
import { BasicForm, useForm } from '/@/components/Form';
1516
1617
import { formSchema } from './pwd.data';
1718
export default defineComponent({
1819
name: 'ChangePassword',
19-
components: { BasicForm },
20+
components: { BasicForm, PageWrapper },
2021
setup() {
2122
const [register, { validate, resetFields }] = useForm({
2223
size: 'large',

yarn.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -1785,10 +1785,10 @@
17851785
dependencies:
17861786
vue-demi latest
17871787

1788-
"@windicss/plugin-utils@0.7.0":
1789-
version "0.7.0"
1790-
resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.7.0.tgz#0321328cd4e7ef673cdeccf0104e8e5f81f7496b"
1791-
integrity sha512-Bfk3AF/CLKyj22iSaAkjHCI5Nw0Lp2GFo0bS3ymUSWrWn2Xx7w0K8INkZ9bjDpdrh/m1yImA+sbas302+NqXEQ==
1788+
"@windicss/plugin-utils@0.7.1":
1789+
version "0.7.1"
1790+
resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.7.1.tgz#001ba282b78a9d4e110e531d59309d2b9cb0929e"
1791+
integrity sha512-ZloIRRKCnArFyDNuhZiFRA15XqhlWaeTcOf3soP9VxWJ+i6/IkH6cnaYgBefDATA/zJodOPsXBnbX333zKVk1Q==
17921792
dependencies:
17931793
esbuild "^0.8.57"
17941794
esbuild-register "^2.2.0"
@@ -9182,12 +9182,12 @@ vite-plugin-theme@^0.4.8:
91829182
es-module-lexer "^0.3.26"
91839183
tinycolor2 "^1.4.2"
91849184

9185-
vite-plugin-windicss@0.7.0:
9186-
version "0.7.0"
9187-
resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.7.0.tgz#9e1bee2d041aee7a0b5a4bf08c483fe5b2525898"
9188-
integrity sha512-zKQEnDKhKZT4mYoUfLfOy8hPviAWTUbLE5POo2OACKxMCBdcOHmakh+RfkMIUrejgrRZbX9bBezKzSfxPqO65Q==
9185+
vite-plugin-windicss@0.7.1:
9186+
version "0.7.1"
9187+
resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.7.1.tgz#1e1c41c2f62d18a2777819057c981a1ec26d8901"
9188+
integrity sha512-0NNrTBgjx11KOwqS/4szfVIt3LURFor4cEEVVJjB8p7JDTnC4K8Cu11bcAvY+QMOfflxv4s2ONo2SU4xkq68kA==
91899189
dependencies:
9190-
"@windicss/plugin-utils" "0.7.0"
9190+
"@windicss/plugin-utils" "0.7.1"
91919191
windicss "^2.3.0"
91929192

91939193
vite@^2.0.5:

0 commit comments

Comments
 (0)