chore: update demo
This commit is contained in:
parent
460020bee2
commit
1f79c08078
@ -4,6 +4,7 @@ import type { Recordable } from '@vben/types';
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
|
import { getPopupContainer } from '@vben/utils';
|
||||||
|
|
||||||
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
import { Modal, Popconfirm, Space } from 'ant-design-vue';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
@ -124,13 +125,19 @@ function handleMultiDelete() {
|
|||||||
<Page :auto-content-height="true">
|
<Page :auto-content-height="true">
|
||||||
<BasicTable>
|
<BasicTable>
|
||||||
<template #toolbar-actions>
|
<template #toolbar-actions>
|
||||||
<span class="pl-[7px] text-[16px]">测试单表列表</span>
|
<span class="pl-[7px] text-[16px]">测试单列表</span>
|
||||||
</template>
|
</template>
|
||||||
<template #toolbar-tools>
|
<template #toolbar-tools>
|
||||||
<Space>
|
<Space>
|
||||||
<a-button
|
<a-button
|
||||||
v-access:code="['demo:demo:export']"
|
v-access:code="['system:demo:export']"
|
||||||
@click="downloadExcel(demoExport, '测试单表数据', {})"
|
@click="
|
||||||
|
downloadExcel(
|
||||||
|
demoExport,
|
||||||
|
'测试单数据',
|
||||||
|
tableApi.formApi.form.values,
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.export') }}
|
{{ $t('pages.common.export') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
@ -138,14 +145,14 @@ function handleMultiDelete() {
|
|||||||
:disabled="!checked"
|
:disabled="!checked"
|
||||||
danger
|
danger
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['demo:demo:remove']"
|
v-access:code="['system:demo:remove']"
|
||||||
@click="handleMultiDelete"
|
@click="handleMultiDelete"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['demo:demo:add']"
|
v-access:code="['system:demo:add']"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.add') }}
|
{{ $t('pages.common.add') }}
|
||||||
@ -153,29 +160,28 @@ function handleMultiDelete() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<a-button
|
<Space>
|
||||||
size="small"
|
<ghost-button
|
||||||
type="link"
|
v-access:code="['system:demo:edit']"
|
||||||
v-access:code="['demo:demo:edit']"
|
@click.stop="handleEdit(row)"
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.edit') }}
|
{{ $t('pages.common.edit') }}
|
||||||
</a-button>
|
</ghost-button>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
|
:get-popup-container="getPopupContainer"
|
||||||
placement="left"
|
placement="left"
|
||||||
title="确认删除?"
|
title="确认删除?"
|
||||||
@confirm="handleDelete(row)"
|
@confirm="handleDelete(row)"
|
||||||
>
|
>
|
||||||
<a-button
|
<ghost-button
|
||||||
danger
|
danger
|
||||||
size="small"
|
v-access:code="['system:demo:remove']"
|
||||||
type="link"
|
|
||||||
v-access:code="['demo:demo:remove']"
|
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</ghost-button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<DemoModal @reload="tableApi.query()" />
|
<DemoModal @reload="tableApi.query()" />
|
||||||
|
@ -4,7 +4,7 @@ import type { Recordable } from '@vben/types';
|
|||||||
import { nextTick } from 'vue';
|
import { nextTick } from 'vue';
|
||||||
|
|
||||||
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
|
||||||
import { listToTree } from '@vben/utils';
|
import { getPopupContainer, listToTree } from '@vben/utils';
|
||||||
|
|
||||||
import { Popconfirm, Space } from 'ant-design-vue';
|
import { Popconfirm, Space } from 'ant-design-vue';
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ function collapseAll() {
|
|||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
type="primary"
|
type="primary"
|
||||||
v-access:code="['demo:tree:add']"
|
v-access:code="['system:tree:add']"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.add') }}
|
{{ $t('pages.common.add') }}
|
||||||
@ -117,29 +117,28 @@ function collapseAll() {
|
|||||||
</Space>
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
<template #action="{ row }">
|
<template #action="{ row }">
|
||||||
<a-button
|
<Space>
|
||||||
size="small"
|
<ghost-button
|
||||||
type="link"
|
v-access:code="['system:tree:edit']"
|
||||||
v-access:code="['demo:tree:edit']"
|
@click.stop="handleEdit(row)"
|
||||||
@click="handleEdit(row)"
|
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.edit') }}
|
{{ $t('pages.common.edit') }}
|
||||||
</a-button>
|
</ghost-button>
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
|
:get-popup-container="getPopupContainer"
|
||||||
placement="left"
|
placement="left"
|
||||||
title="确认删除?"
|
title="确认删除?"
|
||||||
@confirm="handleDelete(row)"
|
@confirm="handleDelete(row)"
|
||||||
>
|
>
|
||||||
<a-button
|
<ghost-button
|
||||||
danger
|
danger
|
||||||
size="small"
|
v-access:code="['system:tree:remove']"
|
||||||
type="link"
|
|
||||||
v-access:code="['demo:tree:remove']"
|
|
||||||
@click.stop=""
|
@click.stop=""
|
||||||
>
|
>
|
||||||
{{ $t('pages.common.delete') }}
|
{{ $t('pages.common.delete') }}
|
||||||
</a-button>
|
</ghost-button>
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
|
</Space>
|
||||||
</template>
|
</template>
|
||||||
</BasicTable>
|
</BasicTable>
|
||||||
<TreeModal @reload="tableApi.query()" />
|
<TreeModal @reload="tableApi.query()" />
|
||||||
|
Loading…
Reference in New Issue
Block a user