Skip to content

Commit

Permalink
fix(page-wrapper): fix PageWrapper title not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Mar 8, 2021
1 parent 7d8b8db commit 9e3adaa
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"vetur.format.defaultFormatter.ts": "prettier-tslint",
"vetur.format.defaultFormatter.js": "prettier",
"vetur.languageFeatures.codeActions": false,
"vetur.validation.script": false,
// "vetur.validation.script": false,
"vetur.format.defaultFormatterOptions": {
"js-beautify-html": {
"wrap_attributes": "force-expand-multiline"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

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

## 2.0.3 (2021-03-07)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
"vite-plugin-style-import": "^0.8.1",
"vite-plugin-svg-icons": "^0.3.3",
"vite-plugin-theme": "^0.4.8",
"vite-plugin-windicss": "0.7.0",
"vite-plugin-windicss": "0.7.1",
"vue-eslint-parser": "^7.6.0",
"yargs": "^16.2.0"
},
Expand Down
4 changes: 3 additions & 1 deletion src/components/Page/src/PageWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<div :class="getClass">
<PageHeader
:ghost="ghost"
:title="title"
v-bind="$attrs"
ref="headerRef"
v-if="content || $slots.headerContent"
v-if="content || $slots.headerContent || title || getHeaderSlots.length"
>
<template #default>
<template v-if="content">
Expand Down Expand Up @@ -49,6 +50,7 @@
components: { PageFooter, PageHeader },
inheritAttrs: false,
props: {
title: propTypes.string,
dense: propTypes.bool,
ghost: propTypes.bool,
content: propTypes.string,
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import '/@/design/index.less';
import 'windi.css';
import '@virtual/windi.css';

// Do not introduce on-demand in local development?
// In the local development for on-demand introduction, the number of browser requests will increase by about 20%.
Expand Down
19 changes: 10 additions & 9 deletions src/views/demo/system/password/index.vue
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
<template>
<div class="p-4 flex flex-col justify-center items-center">
<BasicForm @register="register" />

<div class="flex justify-center">
<a-button @click="resetFields"> 重置 </a-button>
<a-button class="ml-4" type="primary" @click="handleSubmit"> 确认 </a-button>
<PageWrapper title="修改当前用户密码" content="修改成功后会自动退出当前登录!">
<div class="py-8 bg-white flex flex-col justify-center items-center">
<BasicForm @register="register" />
<div class="flex justify-center">
<a-button @click="resetFields"> 重置 </a-button>
<a-button class="ml-4" type="primary" @click="handleSubmit"> 确认 </a-button>
</div>
</div>
</div>
</PageWrapper>
</template>
<script lang="ts">
import { defineComponent } from 'vue';
import { PageWrapper } from '/@/components/Page';
import { BasicForm, useForm } from '/@/components/Form';
import { formSchema } from './pwd.data';
export default defineComponent({
name: 'ChangePassword',
components: { BasicForm },
components: { BasicForm, PageWrapper },
setup() {
const [register, { validate, resetFields }] = useForm({
size: 'large',
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1785,10 +1785,10 @@
dependencies:
vue-demi latest

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

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

vite@^2.0.5:
Expand Down

0 comments on commit 9e3adaa

Please sign in to comment.