mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
style: 优化按钮样式
This commit is contained in:
@ -156,10 +156,18 @@ async function handleExport() {
|
||||
}
|
||||
|
||||
async function handleCleanOperLog() {
|
||||
const { error } = await fetchCleanOperLog();
|
||||
if (error) return;
|
||||
window.$message?.success('清理成功');
|
||||
await getData();
|
||||
window.$dialog?.error({
|
||||
title: '提示',
|
||||
content: '是否确认清空所有操作日志数据项?',
|
||||
positiveText: '确认清空',
|
||||
negativeText: '取消',
|
||||
onPositiveClick: async () => {
|
||||
const { error } = await fetchCleanOperLog();
|
||||
if (error) return;
|
||||
window.$message?.success('清空成功');
|
||||
await getData();
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -182,11 +190,14 @@ async function handleCleanOperLog() {
|
||||
<template #prefix>
|
||||
<NButton
|
||||
v-if="hasAuth('monitor:operlog:remove')"
|
||||
type="warning"
|
||||
type="error"
|
||||
ghost
|
||||
size="small"
|
||||
@click="handleCleanOperLog"
|
||||
>
|
||||
<template #icon>
|
||||
<icon-material-symbols:warning-outline-rounded />
|
||||
</template>
|
||||
清空
|
||||
</NButton>
|
||||
</template>
|
||||
|
@ -215,6 +215,9 @@ async function handleRefreshCache() {
|
||||
size="small"
|
||||
@click="handleRefreshCache"
|
||||
>
|
||||
<template #icon>
|
||||
<icon-material-symbols:sync-outline />
|
||||
</template>
|
||||
刷新缓存
|
||||
</NButton>
|
||||
</template>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="tsx">
|
||||
import { NButton, NDivider } from 'naive-ui';
|
||||
import { jsonClone } from '@sa/utils';
|
||||
import type { TableDataWithIndex } from '@sa/hooks';
|
||||
import { type TableDataWithIndex } from '@sa/hooks';
|
||||
import { fetchBatchDeleteDept, fetchGetDeptList } from '@/service/api/system/dept';
|
||||
import { useAppStore } from '@/store/modules/app';
|
||||
import { useAuth } from '@/hooks/business/auth';
|
||||
@ -31,6 +31,7 @@ const {
|
||||
searchParams,
|
||||
resetSearchParams,
|
||||
expandedRowKeys,
|
||||
isCollapse,
|
||||
expandAll,
|
||||
collapseAll
|
||||
} = useTreeTable({
|
||||
@ -173,8 +174,18 @@ async function addInRow(row: TableDataWithIndex<Api.System.Dept>) {
|
||||
@refresh="getData"
|
||||
>
|
||||
<template #prefix>
|
||||
<NButton size="small" @click="expandAll">展开</NButton>
|
||||
<NButton size="small" @click="collapseAll">收起</NButton>
|
||||
<NButton v-if="!isCollapse" :disabled="!expandedRowKeys.length" size="small" @click="expandAll">
|
||||
<template #icon>
|
||||
<icon-quill:expand />
|
||||
</template>
|
||||
全部展开
|
||||
</NButton>
|
||||
<NButton v-if="isCollapse" :disabled="!expandedRowKeys.length" size="small" @click="collapseAll">
|
||||
<template #icon>
|
||||
<icon-quill:collapse />
|
||||
</template>
|
||||
全部收起
|
||||
</NButton>
|
||||
</template>
|
||||
</TableHeaderOperation>
|
||||
</template>
|
||||
|
@ -305,13 +305,13 @@ const btnColumns: DataTableColumns<Api.System.Menu> = [
|
||||
v-model:checked-keys="checkedKeys"
|
||||
v-model:expanded-keys="expandedKeys"
|
||||
:cancelable="false"
|
||||
block-node
|
||||
show-line
|
||||
:data="treeData as []"
|
||||
:default-expanded-keys="[0]"
|
||||
:show-irrelevant-nodes="false"
|
||||
:pattern="name"
|
||||
block-line
|
||||
class="h-full min-h-200px py-3"
|
||||
class="menu-tree h-full min-h-200px py-3"
|
||||
key-field="menuId"
|
||||
label-field="menuName"
|
||||
virtual-scroll
|
||||
@ -482,11 +482,11 @@ const btnColumns: DataTableColumns<Api.System.Menu> = [
|
||||
|
||||
.menu-tree {
|
||||
:deep(.n-tree-node) {
|
||||
height: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
:deep(.n-tree-node-switcher) {
|
||||
height: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
:deep(.n-tree-node-switcher__icon) {
|
||||
|
@ -161,7 +161,7 @@ const {
|
||||
<ButtonIcon
|
||||
text
|
||||
type="primary"
|
||||
icon="material-symbols:download"
|
||||
icon="material-symbols:download-rounded"
|
||||
class="text-20px"
|
||||
tooltipContent={$t('common.download')}
|
||||
onClick={() => download(row.ossId!)}
|
||||
@ -298,15 +298,15 @@ function handleToOssConfig() {
|
||||
</template>
|
||||
</NSwitch>
|
||||
|
||||
<NButton type="primary" size="small" ghost @click="handleUpload('file')">
|
||||
<NButton size="small" ghost @click="handleUpload('file')">
|
||||
<template #icon>
|
||||
<icon-ic-round-file-upload />
|
||||
<icon-material-symbols:upload-rounded />
|
||||
</template>
|
||||
上传文件
|
||||
</NButton>
|
||||
<NButton type="primary" size="small" ghost @click="handleUpload('image')">
|
||||
<NButton size="small" ghost @click="handleUpload('image')">
|
||||
<template #icon>
|
||||
<icon-ic-round-image />
|
||||
<icon-material-symbols:image-outline />
|
||||
</template>
|
||||
上传图片
|
||||
</NButton>
|
||||
|
@ -257,7 +257,6 @@ async function handleStatusChange(
|
||||
:default-expanded-keys="deptData?.length ? [deptData[0].id!] : []"
|
||||
:show-irrelevant-nodes="false"
|
||||
:pattern="deptPattern"
|
||||
block-line
|
||||
class="infinite-scroll h-full min-h-200px py-3"
|
||||
key-field="id"
|
||||
label-field="label"
|
||||
@ -289,7 +288,7 @@ async function handleStatusChange(
|
||||
<template #after>
|
||||
<NButton v-if="hasAuth('system:user:import')" size="small" ghost @click="handleImport">
|
||||
<template #icon>
|
||||
<icon-material-symbols:upload-2-rounded class="text-icon" />
|
||||
<icon-material-symbols:upload-rounded class="text-icon" />
|
||||
</template>
|
||||
导入
|
||||
</NButton>
|
||||
@ -351,11 +350,11 @@ async function handleStatusChange(
|
||||
}
|
||||
|
||||
:deep(.n-tree-node) {
|
||||
height: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
:deep(.n-tree-node-switcher) {
|
||||
height: 33px;
|
||||
height: 25px;
|
||||
}
|
||||
|
||||
:deep(.n-tree-node-switcher__icon) {
|
||||
|
@ -287,13 +287,13 @@ getDataNames();
|
||||
@click="() => handleGenCode()"
|
||||
>
|
||||
<template #icon>
|
||||
<icon-ic-round-download class="text-icon" />
|
||||
<icon-material-symbols:download-rounded class="text-icon" />
|
||||
</template>
|
||||
生成代码
|
||||
</NButton>
|
||||
<NButton size="small" ghost type="primary" @click="handleImport">
|
||||
<template #icon>
|
||||
<icon-ic-round-upload class="text-icon" />
|
||||
<icon-material-symbols:upload-rounded class="text-icon" />
|
||||
</template>
|
||||
导入
|
||||
</NButton>
|
||||
|
Reference in New Issue
Block a user