mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-05-02 15:19:01 +08:00
Compare commits
No commits in common. "d0a99dcf123cefe5aed5b263ccde7acd4949da2a" and "2384113120ba78667d12e939f05aeb0bc79aec88" have entirely different histories.
d0a99dcf12
...
2384113120
@ -9,12 +9,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<AppCard v-if="$slots.default" bordered bg="#fafafc dark:black" class="mb-30 min-h-60 rounded-4">
|
<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.prevent="handleSearch()">
|
<form class="flex justify-between p-16" @submit.prevent="handleSearch()">
|
||||||
<n-scrollbar x-scrollable>
|
<n-space wrap :size="[32, 16]">
|
||||||
<n-space :wrap="!expand || isExpanded" :size="[32, 16]" class="p-10">
|
<slot />
|
||||||
<slot />
|
</n-space>
|
||||||
</n-space>
|
<div class="flex-shrink-0">
|
||||||
</n-scrollbar>
|
|
||||||
<div class="flex-shrink-0 p-10">
|
|
||||||
<n-button ghost type="primary" @click="handleReset">
|
<n-button ghost type="primary" @click="handleReset">
|
||||||
<i class="i-fe:rotate-ccw mr-4" />
|
<i class="i-fe:rotate-ccw mr-4" />
|
||||||
重置
|
重置
|
||||||
@ -23,17 +21,6 @@
|
|||||||
<i class="i-fe:search mr-4" />
|
<i class="i-fe:search mr-4" />
|
||||||
搜索
|
搜索
|
||||||
</n-button>
|
</n-button>
|
||||||
|
|
||||||
<template v-if="expand">
|
|
||||||
<n-button v-if="!isExpanded" type="primary" text @click="toggleExpand">
|
|
||||||
<i class="i-fe:chevrons-down ml-4" />
|
|
||||||
展开
|
|
||||||
</n-button>
|
|
||||||
<n-button v-else text type="primary" @click="toggleExpand">
|
|
||||||
<i class="i-fe:chevrons-up ml-4" />
|
|
||||||
收起
|
|
||||||
</n-button>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</AppCard>
|
</AppCard>
|
||||||
@ -102,8 +89,6 @@ const props = defineProps({
|
|||||||
type: Function,
|
type: Function,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
/** 是否支持展开 */
|
|
||||||
expand: Boolean,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['update:queryItems', 'onChecked', 'onDataChange'])
|
const emit = defineEmits(['update:queryItems', 'onChecked', 'onDataChange'])
|
||||||
@ -118,13 +103,6 @@ const pagination = reactive({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// 是否展开
|
|
||||||
const isExpanded = ref(false)
|
|
||||||
|
|
||||||
function toggleExpand() {
|
|
||||||
isExpanded.value = !isExpanded.value
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleQuery() {
|
async function handleQuery() {
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user