refactor: 优化 antd 模板代码生成示例提到的一些问题
parent
994b444319
commit
448b4c983a
|
@ -129,11 +129,11 @@ const tableRef = ref<VxeTableInstance>();
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getList();
|
await getList();
|
||||||
await nextTick();
|
await nextTick();
|
||||||
// 挂载 $toolbar 工具栏
|
// 挂载 toolbar 工具栏
|
||||||
const $table = tableRef.value;
|
const table = tableRef.value;
|
||||||
const tableToolbar = tableToolbarRef.value;
|
const tableToolbar = tableToolbarRef.value;
|
||||||
if ($table && tableToolbar) {
|
if (table && tableToolbar) {
|
||||||
await $table.connect(tableToolbar.getToolbarRef()!);
|
await table.connect(tableToolbar.getToolbarRef()!);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -144,10 +144,8 @@ onMounted(async () => {
|
||||||
|
|
||||||
<ContentWrap v-if="!hiddenSearchBar">
|
<ContentWrap v-if="!hiddenSearchBar">
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<!-- TODO @puhui999:貌似 -mb-15px 没效果?可能和 ContentWrap 有关系? -->
|
|
||||||
<Form :model="queryParams" ref="queryFormRef" layout="inline">
|
<Form :model="queryParams" ref="queryFormRef" layout="inline">
|
||||||
<Form.Item label="名字" name="name">
|
<Form.Item label="名字" name="name">
|
||||||
<!-- TODO @puhui999:貌似不一定 240?看着和 schema 还是不太一样 -->
|
|
||||||
<Input
|
<Input
|
||||||
v-model:value="queryParams.name"
|
v-model:value="queryParams.name"
|
||||||
placeholder="请输入名字"
|
placeholder="请输入名字"
|
||||||
|
@ -169,9 +167,10 @@ onMounted(async () => {
|
||||||
'number',
|
'number',
|
||||||
)"
|
)"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
:label="dict.label"
|
|
||||||
:value="dict.value"
|
:value="dict.value"
|
||||||
/>
|
>
|
||||||
|
{{ dict.label }}
|
||||||
|
</Select.Option>
|
||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label="创建时间" name="createTime">
|
<Form.Item label="创建时间" name="createTime">
|
||||||
|
@ -182,8 +181,6 @@ onMounted(async () => {
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item>
|
<Form.Item>
|
||||||
<!-- TODO @puhui999:搜索和重置;貌似样子和位置不太一样,有木有办法一致 -->
|
|
||||||
<!-- TODO @puhui999:收齐、展开,好弄哇? -->
|
|
||||||
<Button class="ml-2" @click="resetQuery"> 重置 </Button>
|
<Button class="ml-2" @click="resetQuery"> 重置 </Button>
|
||||||
<Button class="ml-2" @click="handleQuery" type="primary">
|
<Button class="ml-2" @click="handleQuery" type="primary">
|
||||||
搜索
|
搜索
|
||||||
|
@ -193,7 +190,7 @@ onMounted(async () => {
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap title="你好">
|
<ContentWrap title="示例联系人">
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<TableToolbar
|
<TableToolbar
|
||||||
ref="tableToolbarRef"
|
ref="tableToolbarRef"
|
||||||
|
@ -264,7 +261,6 @@ onMounted(async () => {
|
||||||
</VxeTable>
|
</VxeTable>
|
||||||
<!-- 分页 -->
|
<!-- 分页 -->
|
||||||
<div class="mt-2 flex justify-end">
|
<div class="mt-2 flex justify-end">
|
||||||
<!-- TODO @puhui999:这个分页,看着不太一致 -->
|
|
||||||
<Pagination
|
<Pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
v-model:current="queryParams.pageNo"
|
v-model:current="queryParams.pageNo"
|
||||||
|
|
Loading…
Reference in New Issue