mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-04-30 22:29:01 +08:00
perf: 优化 crud query
This commit is contained in:
parent
567e306a5c
commit
58de3c1ad6
@ -7,25 +7,22 @@
|
||||
--------------------------------->
|
||||
|
||||
<template>
|
||||
<AppCard
|
||||
v-if="$slots.default"
|
||||
bordered
|
||||
bg="#fafafc dark:black"
|
||||
class="mb-30 min-h-60 flex justify-between rounded-4 p-16"
|
||||
>
|
||||
<n-space wrap :size="[32, 16]">
|
||||
<slot />
|
||||
</n-space>
|
||||
<div class="flex-shrink-0">
|
||||
<n-button ghost type="primary" @click="handleReset">
|
||||
<i class="i-fe:rotate-ccw mr-4" />
|
||||
重置
|
||||
</n-button>
|
||||
<n-button class="ml-20" type="primary" @click="handleSearch">
|
||||
<i class="i-fe:search mr-4" />
|
||||
搜索
|
||||
</n-button>
|
||||
</div>
|
||||
<AppCard v-if="$slots.default" bordered bg="#fafafc dark:black" class="mb-30 min-h-60 rounded-4">
|
||||
<form class="flex justify-between p-16" @submit="handleSearch()">
|
||||
<n-space wrap :size="[32, 16]">
|
||||
<slot />
|
||||
</n-space>
|
||||
<div class="flex-shrink-0">
|
||||
<n-button ghost type="primary" @click="handleReset">
|
||||
<i class="i-fe:rotate-ccw mr-4" />
|
||||
重置
|
||||
</n-button>
|
||||
<n-button attr-type="submit" class="ml-20" type="primary">
|
||||
<i class="i-fe:search mr-4" />
|
||||
搜索
|
||||
</n-button>
|
||||
</div>
|
||||
</form>
|
||||
</AppCard>
|
||||
|
||||
<n-data-table
|
||||
|
@ -23,13 +23,7 @@
|
||||
:get-data="api.read"
|
||||
>
|
||||
<MeQueryItem label="角色名" :label-width="50">
|
||||
<n-input
|
||||
v-model:value="queryItems.name"
|
||||
type="text"
|
||||
placeholder="请输入角色名"
|
||||
clearable
|
||||
@keydown.enter="() => $table?.handleSearch()"
|
||||
/>
|
||||
<n-input v-model:value="queryItems.name" type="text" placeholder="请输入角色名" clearable />
|
||||
</MeQueryItem>
|
||||
<MeQueryItem label="状态" :label-width="50">
|
||||
<n-select
|
||||
|
@ -43,7 +43,6 @@
|
||||
type="text"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
@keydown.enter="() => $table?.handleSearch()"
|
||||
/>
|
||||
</MeQueryItem>
|
||||
|
||||
|
@ -28,7 +28,6 @@
|
||||
type="text"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
@keydown.enter="() => $table?.handleSearch()"
|
||||
/>
|
||||
</MeQueryItem>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user