chore: typo in Container (#3669)

This commit is contained in:
苗大 2024-03-12 15:27:47 +08:00 committed by GitHub
parent e26a4ee9cb
commit 02b3a2fce8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 49 additions and 49 deletions

View File

@ -1,12 +1,12 @@
<script lang="tsx"> <script lang="tsx">
import { ref, unref, defineComponent, type PropType, type ExtractPropTypes } from 'vue';
import { isNil } from 'lodash-es';
import { Skeleton } from 'ant-design-vue';
import { useTimeoutFn } from '@vben/hooks';
import { CollapseTransition } from '@/components/Transition'; import { CollapseTransition } from '@/components/Transition';
import CollapseHeader from './CollapseHeader.vue';
import { triggerWindowResize } from '@/utils/event';
import { useDesign } from '@/hooks/web/useDesign'; import { useDesign } from '@/hooks/web/useDesign';
import { triggerWindowResize } from '@/utils/event';
import { useTimeoutFn } from '@vben/hooks';
import { Skeleton } from 'ant-design-vue';
import { isNil } from 'lodash-es';
import { defineComponent, ref, unref, type ExtractPropTypes, type PropType } from 'vue';
import CollapseHeader from './CollapseHeader.vue';
const collapseContainerProps = { const collapseContainerProps = {
title: { type: String, default: '' }, title: { type: String, default: '' },
@ -14,7 +14,7 @@
/** /**
* Can it be expanded * Can it be expanded
*/ */
canExpan: { type: Boolean, default: true }, canExpand: { type: Boolean, default: true },
/** /**
* Warm reminder on the right side of the title * Warm reminder on the right side of the title
*/ */
@ -69,7 +69,7 @@
/> />
<div class="p-2"> <div class="p-2">
<CollapseTransition enable={props.canExpan}> <CollapseTransition enable={props.canExpand}>
{props.loading ? ( {props.loading ? (
<Skeleton active={props.loading} /> <Skeleton active={props.loading} />
) : ( ) : (

View File

@ -1,13 +1,13 @@
<script lang="tsx"> <script lang="tsx">
import { defineComponent, computed, unref, type ExtractPropTypes, PropType } from 'vue';
import { useDesign } from '@/hooks/web/useDesign';
import { BasicArrow, BasicTitle } from '@/components/Basic'; import { BasicArrow, BasicTitle } from '@/components/Basic';
import { useDesign } from '@/hooks/web/useDesign';
import { PropType, computed, defineComponent, unref, type ExtractPropTypes } from 'vue';
const collapseHeaderProps = { const collapseHeaderProps = {
prefixCls: String, prefixCls: String,
title: String, title: String,
show: Boolean, show: Boolean,
canExpan: Boolean, canExpand: Boolean,
helpMessage: { helpMessage: {
type: [Array, String] as PropType<string[] | string>, type: [Array, String] as PropType<string[] | string>,
default: '', default: '',
@ -33,7 +33,7 @@
<div class={`${unref(_prefixCls)}__action`}> <div class={`${unref(_prefixCls)}__action`}>
{slots.action {slots.action
? slots.action({ expand: props.show, onClick: () => emit('expand') }) ? slots.action({ expand: props.show, onClick: () => emit('expand') })
: props.canExpan && ( : props.canExpand && (
<BasicArrow up expand={props.show} onClick={() => emit('expand')} /> <BasicArrow up expand={props.show} onClick={() => emit('expand')} />
)} )}
</div> </div>

View File

@ -1,23 +1,23 @@
<script lang="tsx"> <script lang="tsx">
import type { DescriptionProps, DescInstance, DescItem } from './typing';
import type { DescriptionsProps } from 'ant-design-vue/es/descriptions';
import type { CollapseContainerOptions } from '@/components/Container'; import type { CollapseContainerOptions } from '@/components/Container';
import {
type CSSProperties,
type PropType,
defineComponent,
computed,
ref,
unref,
toRefs,
} from 'vue';
import { get } from 'lodash-es';
import { Descriptions } from 'ant-design-vue';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import { useDesign } from '@/hooks/web/useDesign'; import { useDesign } from '@/hooks/web/useDesign';
import { isFunction } from '@/utils/is';
import { getSlot } from '@/utils/helper/tsxHelper'; import { getSlot } from '@/utils/helper/tsxHelper';
import { isFunction } from '@/utils/is';
import { useAttrs } from '@vben/hooks'; import { useAttrs } from '@vben/hooks';
import { Descriptions } from 'ant-design-vue';
import type { DescriptionsProps } from 'ant-design-vue/es/descriptions';
import { get } from 'lodash-es';
import {
computed,
defineComponent,
ref,
toRefs,
unref,
type CSSProperties,
type PropType,
} from 'vue';
import type { DescInstance, DescItem, DescriptionProps } from './typing';
const props = { const props = {
useCollapse: { type: Boolean, default: true }, useCollapse: { type: Boolean, default: true },
@ -175,7 +175,7 @@
const { title } = unref(getMergeProps); const { title } = unref(getMergeProps);
return ( return (
<CollapseContainer title={title} canExpan={canExpand} helpMessage={helpMessage}> <CollapseContainer title={title} canExpand={canExpand} helpMessage={helpMessage}>
{{ {{
default: () => content, default: () => content,
action: () => getSlot(slots, 'action'), action: () => getSlot(slots, 'action'),

View File

@ -1,7 +1,7 @@
<template> <template>
<PageWrapper title="二维码组件使用示例"> <PageWrapper title="二维码组件使用示例">
<div class="flex flex-wrap"> <div class="flex flex-wrap">
<CollapseContainer title="基础示例" :canExpan="true" class="text-center mb-6 w-1/5 mr-6"> <CollapseContainer title="基础示例" :canExpand="true" class="text-center mb-6 w-1/5 mr-6">
<QrCode :value="qrCodeUrl" /> <QrCode :value="qrCodeUrl" />
</CollapseContainer> </CollapseContainer>
@ -79,13 +79,13 @@
</PageWrapper> </PageWrapper>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, unref } from 'vue';
import { QrCode, QrCodeActionType } from '@/components/Qrcode';
import LogoImg from '@/assets/images/logo.png'; import LogoImg from '@/assets/images/logo.png';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import { PageWrapper } from '@/components/Page'; import { PageWrapper } from '@/components/Page';
import { QrCode, QrCodeActionType } from '@/components/Qrcode';
import { type Nullable } from '@vben/types'; import { type Nullable } from '@vben/types';
import { QRCode } from 'ant-design-vue'; import { QRCode } from 'ant-design-vue';
import { ref, unref } from 'vue';
const qrCodeUrl = 'https://www.vvbin.cn'; const qrCodeUrl = 'https://www.vvbin.cn';
const qrRef = ref<Nullable<QrCodeActionType>>(null); const qrRef = ref<Nullable<QrCodeActionType>>(null);

View File

@ -23,7 +23,7 @@
</Row> </Row>
</Col> </Col>
<Col :span="7" :class="`${prefixCls}-col`"> <Col :span="7" :class="`${prefixCls}-col`">
<CollapseContainer title="标签" :canExpan="false"> <CollapseContainer title="标签" :canExpand="false">
<template v-for="tag in tags" :key="tag"> <template v-for="tag in tags" :key="tag">
<Tag class="mb-2"> <Tag class="mb-2">
{{ tag }} {{ tag }}
@ -32,7 +32,7 @@
</CollapseContainer> </CollapseContainer>
</Col> </Col>
<Col :span="8" :class="`${prefixCls}-col`"> <Col :span="8" :class="`${prefixCls}-col`">
<CollapseContainer :class="`${prefixCls}-top__team`" title="团队" :canExpan="false"> <CollapseContainer :class="`${prefixCls}-top__team`" title="团队" :canExpand="false">
<div v-for="(team, index) in teams" :key="index" :class="`${prefixCls}-top__team-item`"> <div v-for="(team, index) in teams" :key="index" :class="`${prefixCls}-top__team-item`">
<Icon :icon="team.icon" :color="team.color" /> <Icon :icon="team.icon" :color="team.color" />
<span>{{ team.title }}</span> <span>{{ team.title }}</span>
@ -53,17 +53,17 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Tag, Tabs, Row, Col } from 'ant-design-vue';
import { computed } from 'vue';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import Article from './Article.vue'; import { Col, Row, Tabs, Tag } from 'ant-design-vue';
import { computed } from 'vue';
import Application from './Application.vue'; import Application from './Application.vue';
import Article from './Article.vue';
import Project from './Project.vue'; import Project from './Project.vue';
import headerImg from '@/assets/images/header.jpg'; import headerImg from '@/assets/images/header.jpg';
import { tags, teams, details, achieveList } from './data';
import { useUserStore } from '@/store/modules/user'; import { useUserStore } from '@/store/modules/user';
import { achieveList, details, tags, teams } from './data';
const userStore = useUserStore(); const userStore = useUserStore();
const TabPane = Tabs.TabPane; const TabPane = Tabs.TabPane;

View File

@ -1,5 +1,5 @@
<template> <template>
<CollapseContainer title="账号绑定" :canExpan="false"> <CollapseContainer title="账号绑定" :canExpand="false">
<List> <List>
<template v-for="item in accountBindList" :key="item.key"> <template v-for="item in accountBindList" :key="item.key">
<ListItem> <ListItem>
@ -23,9 +23,9 @@
</CollapseContainer> </CollapseContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { List } from 'ant-design-vue';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import { List } from 'ant-design-vue';
import { accountBindList } from './data'; import { accountBindList } from './data';

View File

@ -1,5 +1,5 @@
<template> <template>
<CollapseContainer title="基本设置" :canExpan="false"> <CollapseContainer title="基本设置" :canExpand="false">
<Row :gutter="24"> <Row :gutter="24">
<Col :span="14"> <Col :span="14">
<BasicForm @register="register" /> <BasicForm @register="register" />
@ -22,19 +22,19 @@
</CollapseContainer> </CollapseContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { Row, Col } from 'ant-design-vue';
import { computed, onMounted } from 'vue';
import { BasicForm, useForm } from '@/components/Form';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import { CropperAvatar } from '@/components/Cropper'; import { CropperAvatar } from '@/components/Cropper';
import { BasicForm, useForm } from '@/components/Form';
import { Col, Row } from 'ant-design-vue';
import { computed, onMounted } from 'vue';
import { useMessage } from '@/hooks/web/useMessage'; import { useMessage } from '@/hooks/web/useMessage';
import headerImg from '@/assets/images/header.jpg';
import { accountInfoApi } from '@/api/demo/account'; import { accountInfoApi } from '@/api/demo/account';
import { baseSetschemas } from './data';
import { useUserStore } from '@/store/modules/user';
import { uploadApi } from '@/api/sys/upload'; import { uploadApi } from '@/api/sys/upload';
import headerImg from '@/assets/images/header.jpg';
import { useUserStore } from '@/store/modules/user';
import { baseSetschemas } from './data';
const { createMessage } = useMessage(); const { createMessage } = useMessage();
const userStore = useUserStore(); const userStore = useUserStore();

View File

@ -1,5 +1,5 @@
<template> <template>
<CollapseContainer title="新消息通知" :canExpan="false"> <CollapseContainer title="新消息通知" :canExpand="false">
<List> <List>
<template v-for="item in msgNotifyList" :key="item.key"> <template v-for="item in msgNotifyList" :key="item.key">
<ListItem> <ListItem>
@ -23,8 +23,8 @@
</CollapseContainer> </CollapseContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { List, Switch } from 'ant-design-vue';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import { List, Switch } from 'ant-design-vue';
import { msgNotifyList } from './data'; import { msgNotifyList } from './data';
const ListItem = List.Item; const ListItem = List.Item;

View File

@ -1,5 +1,5 @@
<template> <template>
<CollapseContainer title="安全设置" :canExpan="false"> <CollapseContainer title="安全设置" :canExpand="false">
<List> <List>
<template v-for="item in secureSettingList" :key="item.key"> <template v-for="item in secureSettingList" :key="item.key">
<ListItem> <ListItem>
@ -23,8 +23,8 @@
</CollapseContainer> </CollapseContainer>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { List } from 'ant-design-vue';
import { CollapseContainer } from '@/components/Container'; import { CollapseContainer } from '@/components/Container';
import { List } from 'ant-design-vue';
import { secureSettingList } from './data'; import { secureSettingList } from './data';
const ListItem = List.Item; const ListItem = List.Item;