提交 9e3adaa3 编写于 作者: V Vben

fix(page-wrapper): fix PageWrapper title not showing

上级 7d8b8db2
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
"vetur.format.defaultFormatter.ts": "prettier-tslint", "vetur.format.defaultFormatter.ts": "prettier-tslint",
"vetur.format.defaultFormatter.js": "prettier", "vetur.format.defaultFormatter.js": "prettier",
"vetur.languageFeatures.codeActions": false, "vetur.languageFeatures.codeActions": false,
"vetur.validation.script": false, // "vetur.validation.script": false,
"vetur.format.defaultFormatterOptions": { "vetur.format.defaultFormatterOptions": {
"js-beautify-html": { "js-beautify-html": {
"wrap_attributes": "force-expand-multiline" "wrap_attributes": "force-expand-multiline"
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
- 确保 `table action` 的值被正确更新 - 确保 `table action` 的值被正确更新
- 修复页面切换的动画无法关闭 - 修复页面切换的动画无法关闭
- 修复`PageWrapper`title 不显示
## 2.0.3 (2021-03-07) ## 2.0.3 (2021-03-07)
......
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
<div :class="getClass"> <div :class="getClass">
<PageHeader <PageHeader
:ghost="ghost" :ghost="ghost"
:title="title"
v-bind="$attrs" v-bind="$attrs"
ref="headerRef" ref="headerRef"
v-if="content || $slots.headerContent" v-if="content || $slots.headerContent || title || getHeaderSlots.length"
> >
<template #default> <template #default>
<template v-if="content"> <template v-if="content">
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
components: { PageFooter, PageHeader }, components: { PageFooter, PageHeader },
inheritAttrs: false, inheritAttrs: false,
props: { props: {
title: propTypes.string,
dense: propTypes.bool, dense: propTypes.bool,
ghost: propTypes.bool, ghost: propTypes.bool,
content: propTypes.string, content: propTypes.string,
......
import '/@/design/index.less'; import '/@/design/index.less';
import 'windi.css'; import '@virtual/windi.css';
// Do not introduce on-demand in local development? // 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%. // In the local development for on-demand introduction, the number of browser requests will increase by about 20%.
......
<template> <template>
<div class="p-4 flex flex-col justify-center items-center"> <PageWrapper title="修改当前用户密码" content="修改成功后会自动退出当前登录!">
<BasicForm @register="register" /> <div class="py-8 bg-white flex flex-col justify-center items-center">
<BasicForm @register="register" />
<div class="flex justify-center"> <div class="flex justify-center">
<a-button @click="resetFields"> 重置 </a-button> <a-button @click="resetFields"> 重置 </a-button>
<a-button class="ml-4" type="primary" @click="handleSubmit"> 确认 </a-button> <a-button class="ml-4" type="primary" @click="handleSubmit"> 确认 </a-button>
</div>
</div> </div>
</div> </PageWrapper>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { PageWrapper } from '/@/components/Page';
import { BasicForm, useForm } from '/@/components/Form'; import { BasicForm, useForm } from '/@/components/Form';
import { formSchema } from './pwd.data'; import { formSchema } from './pwd.data';
export default defineComponent({ export default defineComponent({
name: 'ChangePassword', name: 'ChangePassword',
components: { BasicForm }, components: { BasicForm, PageWrapper },
setup() { setup() {
const [register, { validate, resetFields }] = useForm({ const [register, { validate, resetFields }] = useForm({
size: 'large', size: 'large',
......
...@@ -1785,10 +1785,10 @@ ...@@ -1785,10 +1785,10 @@
dependencies: dependencies:
vue-demi latest vue-demi latest
"@windicss/plugin-utils@0.7.0": "@windicss/plugin-utils@0.7.1":
version "0.7.0" version "0.7.1"
resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.7.0.tgz#0321328cd4e7ef673cdeccf0104e8e5f81f7496b" resolved "https://registry.npmjs.org/@windicss/plugin-utils/-/plugin-utils-0.7.1.tgz#001ba282b78a9d4e110e531d59309d2b9cb0929e"
integrity sha512-Bfk3AF/CLKyj22iSaAkjHCI5Nw0Lp2GFo0bS3ymUSWrWn2Xx7w0K8INkZ9bjDpdrh/m1yImA+sbas302+NqXEQ== integrity sha512-ZloIRRKCnArFyDNuhZiFRA15XqhlWaeTcOf3soP9VxWJ+i6/IkH6cnaYgBefDATA/zJodOPsXBnbX333zKVk1Q==
dependencies: dependencies:
esbuild "^0.8.57" esbuild "^0.8.57"
esbuild-register "^2.2.0" esbuild-register "^2.2.0"
...@@ -9182,12 +9182,12 @@ vite-plugin-theme@^0.4.8: ...@@ -9182,12 +9182,12 @@ vite-plugin-theme@^0.4.8:
es-module-lexer "^0.3.26" es-module-lexer "^0.3.26"
tinycolor2 "^1.4.2" tinycolor2 "^1.4.2"
vite-plugin-windicss@0.7.0: vite-plugin-windicss@0.7.1:
version "0.7.0" version "0.7.1"
resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.7.0.tgz#9e1bee2d041aee7a0b5a4bf08c483fe5b2525898" resolved "https://registry.npmjs.org/vite-plugin-windicss/-/vite-plugin-windicss-0.7.1.tgz#1e1c41c2f62d18a2777819057c981a1ec26d8901"
integrity sha512-zKQEnDKhKZT4mYoUfLfOy8hPviAWTUbLE5POo2OACKxMCBdcOHmakh+RfkMIUrejgrRZbX9bBezKzSfxPqO65Q== integrity sha512-0NNrTBgjx11KOwqS/4szfVIt3LURFor4cEEVVJjB8p7JDTnC4K8Cu11bcAvY+QMOfflxv4s2ONo2SU4xkq68kA==
dependencies: dependencies:
"@windicss/plugin-utils" "0.7.0" "@windicss/plugin-utils" "0.7.1"
windicss "^2.3.0" windicss "^2.3.0"
vite@^2.0.5: vite@^2.0.5:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册