refactor: migrate playground deprecated antdv-next APIs
- Modal: destroyOnClose → destroyOnHidden - Card: body-style → styles.body - Alert: message prop/slot → title - Spin: tip → description, wrapper-class-name → classes.rootpull/348/MERGE
parent
a1081bf7a6
commit
1e44b87359
|
|
@ -386,7 +386,7 @@ function cropImage(file: File, aspectRatio: string | undefined) {
|
||||||
closable: false,
|
closable: false,
|
||||||
cancelText: $t('common.cancel'),
|
cancelText: $t('common.cancel'),
|
||||||
okText: $t('ui.crop.confirm'),
|
okText: $t('ui.crop.confirm'),
|
||||||
destroyOnClose: true,
|
destroyOnHidden: true,
|
||||||
onOk: async () => {
|
onOk: async () => {
|
||||||
const cropper = cropperRef.value;
|
const cropper = cropperRef.value;
|
||||||
if (!cropper) {
|
if (!cropper) {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function fetchData() {
|
||||||
>
|
>
|
||||||
<Card>
|
<Card>
|
||||||
<Alert>
|
<Alert>
|
||||||
<template #message>
|
<template #title>
|
||||||
有些后端接口返回的ID是长整数,但javascript原生的JSON解析是不支持超过2^53-1的长整数的。
|
有些后端接口返回的ID是长整数,但javascript原生的JSON解析是不支持超过2^53-1的长整数的。
|
||||||
这种情况可以建议后端返回数据前将长整数转换为字符串类型。如果后端不接受我们的建议😡……
|
这种情况可以建议后端返回数据前将长整数转换为字符串类型。如果后端不接受我们的建议😡……
|
||||||
<br />
|
<br />
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const showCaching = refAutoReset(true, 1000);
|
||||||
<Card
|
<Card
|
||||||
title="并发和缓存"
|
title="并发和缓存"
|
||||||
v-spinning="!showCaching"
|
v-spinning="!showCaching"
|
||||||
:body-style="{ minHeight: '330px' }"
|
:styles="{ body: { minHeight: '330px' } }"
|
||||||
>
|
>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<Button @click="showCaching = false">重新加载</Button>
|
<Button @click="showCaching = false">重新加载</Button>
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ const leftMaxWidth = ref(props.leftMaxWidth || 100);
|
||||||
@after-change="(value) => (props.leftMaxWidth = value as number)"
|
@after-change="(value) => (props.leftMaxWidth = value as number)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Alert message="实验性的组件" show-icon type="warning">
|
<Alert title="实验性的组件" show-icon type="warning">
|
||||||
<template #description>
|
<template #description>
|
||||||
<p>
|
<p>
|
||||||
双列布局组件是一个在Page组件上扩展的相对基础的布局组件,支持左侧折叠(当拖拽导致左侧宽度比最小宽度还要小时,还可以进入折叠状态)、拖拽调整宽度等功能。
|
双列布局组件是一个在Page组件上扩展的相对基础的布局组件,支持左侧折叠(当拖拽导致左侧宽度比最小宽度还要小时,还可以进入折叠状态)、拖拽调整宽度等功能。
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ const loadingV = refAutoReset(false, 3000);
|
||||||
>
|
>
|
||||||
<Card title="Antd Spin">
|
<Card title="Antd Spin">
|
||||||
<template #actions>这是Antd 组件库自带的Spin组件演示</template>
|
<template #actions>这是Antd 组件库自带的Spin组件演示</template>
|
||||||
<Spin :spinning="spinning" tip="加载中...">
|
<Spin :spinning="spinning" description="加载中...">
|
||||||
<Button type="primary" @click="spinning = true">显示Spin</Button>
|
<Button type="primary" @click="spinning = true">显示Spin</Button>
|
||||||
</Spin>
|
</Spin>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
@ -71,9 +71,11 @@ const loadingV = refAutoReset(false, 3000);
|
||||||
title="Vben Spinner"
|
title="Vben Spinner"
|
||||||
v-spinning="spinningV"
|
v-spinning="spinningV"
|
||||||
class="mt-4 overflow-hidden"
|
class="mt-4 overflow-hidden"
|
||||||
:body-style="{
|
:styles="{
|
||||||
position: 'relative',
|
body: {
|
||||||
overflow: 'hidden',
|
position: 'relative',
|
||||||
|
overflow: 'hidden',
|
||||||
|
},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ function openDocPage() {
|
||||||
<span>一个易于使用的为其它组件赋予动画效果的组件。</span>
|
<span>一个易于使用的为其它组件赋予动画效果的组件。</span>
|
||||||
<Button type="link" @click="openDocPage">查看文档</Button>
|
<Button type="link" @click="openDocPage">查看文档</Button>
|
||||||
</template>
|
</template>
|
||||||
<Card title="使用指令" :body-style="{ minHeight: '5rem' }">
|
<Card title="使用指令" :styles="{ body: { minHeight: '5rem' } }">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<Button type="primary" @click="showCard1 = false">重载</Button>
|
<Button type="primary" @click="showCard1 = false">重载</Button>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -82,7 +82,7 @@ function openDocPage() {
|
||||||
<Card
|
<Card
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
title="使用组件(将内部作为一个整体添加动画)"
|
title="使用组件(将内部作为一个整体添加动画)"
|
||||||
:body-style="{ padding: 0 }"
|
:styles="{ body: { padding: 0 } }"
|
||||||
>
|
>
|
||||||
<div class="relative flex-center min-h-32 gap-2 overflow-hidden">
|
<div class="relative flex-center min-h-32 gap-2 overflow-hidden">
|
||||||
<Motion
|
<Motion
|
||||||
|
|
@ -147,7 +147,7 @@ function openDocPage() {
|
||||||
<Card
|
<Card
|
||||||
class="mt-2"
|
class="mt-2"
|
||||||
title="分组动画(每个子元素都会应用相同的独立动画)"
|
title="分组动画(每个子元素都会应用相同的独立动画)"
|
||||||
:body-style="{ padding: 0 }"
|
:styles="{ body: { padding: 0 } }"
|
||||||
>
|
>
|
||||||
<div class="relative flex-center min-h-32 gap-2 overflow-hidden">
|
<div class="relative flex-center min-h-32 gap-2 overflow-hidden">
|
||||||
<MotionGroup v-bind="motionGroupProps" v-if="showCard3">
|
<MotionGroup v-bind="motionGroupProps" v-if="showCard3">
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ function getNodeClass(node: Recordable<any>) {
|
||||||
<Drawer :title="getDrawerTitle">
|
<Drawer :title="getDrawerTitle">
|
||||||
<Form>
|
<Form>
|
||||||
<template #permissions="slotProps">
|
<template #permissions="slotProps">
|
||||||
<Spin :spinning="loadingPermissions" wrapper-class-name="w-full">
|
<Spin :spinning="loadingPermissions" :classes="{ root: 'w-full' }">
|
||||||
<Tree
|
<Tree
|
||||||
:tree-data="permissions"
|
:tree-data="permissions"
|
||||||
multiple
|
multiple
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue