feat: 添加系统管理-菜单管理 (#929)

* feat: 添加系统管理-菜单管理

* chore: update

* chore: add Copyright in login page

* chore: 将页脚放在一屏可视区

* chore: 依赖更新

* chore: update

* chore: update

* chore: 更新依赖

* chore: update `husky v9`

* style: 适配`el-dialog`样式的更新

* style: update `src/layout/components/search/components/SearchResult.vue`

* chore: update

* style: update

* fix: 修复`ReDialog`中点击取消和确定按钮会触发两次关闭回调

* chore: update

* chore: update src/views/system/menu/README.md

* chore: update

* chore: update

* chore: done

* chore: update
This commit is contained in:
xiaoming
2024-02-26 22:17:40 +08:00
committed by GitHub
parent f762587fa7
commit c314b0cd1c
45 changed files with 2743 additions and 1118 deletions

View File

@@ -1,12 +1,19 @@
<script setup lang="ts">
import { ref, computed } from "vue";
import { animates } from "./animate";
import { ref, computed, toRef } from "vue";
import { cloneDeep } from "@pureadmin/utils";
defineOptions({
name: "ReAnimateSelector"
});
const props = defineProps({
placeholder: {
type: String,
default: "请选择动画"
}
});
const inputValue = defineModel({ type: String });
const searchVal = ref();
@@ -74,7 +81,7 @@ function onMouseleave() {
<el-select
clearable
filterable
placeholder="请选择动画"
:placeholder="props.placeholder"
popper-class="pure-animate-popper"
:model-value="inputValue"
:filter-method="filterMethod"

View File

@@ -90,7 +90,7 @@ function handleClose(
v-model="options.visible"
class="pure-dialog"
:fullscreen="fullscreen ? true : options?.fullscreen ? true : false"
@close="handleClose(options, index)"
@closed="handleClose(options, index)"
@opened="eventsCallBack('open', options, index)"
@openAutoFocus="eventsCallBack('openAutoFocus', options, index)"
@closeAutoFocus="eventsCallBack('closeAutoFocus', options, index)"

View File

@@ -3,7 +3,7 @@ import type { CSSProperties, VNode, Component } from "vue";
type DoneFn = (cancel?: boolean) => void;
type EventType = "open" | "close" | "openAutoFocus" | "closeAutoFocus";
type ArgsType = {
/** `cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页 */
/** `cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页或按下了esc键 */
command: "cancel" | "sure" | "close";
};
@@ -157,7 +157,7 @@ interface DialogOptions extends DialogProps {
options: DialogOptions;
index: number;
}) => void;
/** `Dialog` 关闭后的回调(只有点击右上角关闭按钮或空白页关闭页面时才会触发) */
/** `Dialog` 关闭后的回调(只有点击右上角关闭按钮或空白页或按下了esc键关闭页面时才会触发) */
close?: ({
options,
index
@@ -165,7 +165,7 @@ interface DialogOptions extends DialogProps {
options: DialogOptions;
index: number;
}) => void;
/** `Dialog` 关闭后的回调。 `args` 返回的 `command` 值解析:`cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页 */
/** `Dialog` 关闭后的回调。 `args` 返回的 `command` 值解析:`cancel` 点击取消按钮、`sure` 点击确定按钮、`close` 点击右上角关闭按钮或空白页或按下了esc键 */
closeCallBack?: ({
options,
index,

View File

@@ -1,7 +1,7 @@
<script setup lang="ts">
import { IconJson } from "@/components/ReIcon/data";
import { cloneDeep, isAllEmpty } from "@pureadmin/utils";
import { ref, computed, CSSProperties, toRef, watch } from "vue";
import { ref, computed, CSSProperties, watch } from "vue";
import Search from "@iconify-icons/ri/search-eye-line";
type ParameterCSSProperties = (item?: string) => CSSProperties | undefined;

View File

@@ -30,7 +30,7 @@ import Table from "@iconify-icons/ri/table-line";
import Info from "@iconify-icons/ri/file-info-line";
import Artboard from "@iconify-icons/ri/artboard-line";
addIcon("ubuntuFill", UbuntuFill);
addIcon("menu", Menu);
addIcon("ep:menu", Menu);
addIcon("edit", Edit);
addIcon("informationLine", InformationLine);
addIcon("setUp", SetUp);
@@ -42,14 +42,14 @@ addIcon("listCheck", ListCheck);
addIcon("histogram", Histogram);
addIcon("ppt", Ppt);
addIcon("checkboxCircleLine", CheckboxCircleLine);
addIcon("flUser", FlUser);
addIcon("role", Role);
addIcon("setting", Setting);
addIcon("dept", Dept);
addIcon("ri:admin-line", FlUser);
addIcon("ri:admin-fill", Role);
addIcon("ri:settings-3-line", Setting);
addIcon("ri:git-branch-line", Dept);
addIcon("search", Search);
addIcon("lollipop", Lollipop);
addIcon("monitor", Monitor);
addIcon("tag", Tag);
addIcon("ep:lollipop", Lollipop);
addIcon("ep:monitor", Monitor);
addIcon("ri:bookmark-2-line", Tag);
addIcon("table", Table);
addIcon("info", Info);
addIcon("artboard", Artboard);

View File

@@ -29,6 +29,10 @@ const props = {
columns: {
type: Array as PropType<TableColumnList>,
default: () => []
},
isExpandAll: {
type: Boolean,
default: true
}
};
@@ -38,10 +42,10 @@ export default defineComponent({
emits: ["refresh"],
setup(props, { emit, slots, attrs }) {
const size = ref("default");
const isExpandAll = ref(true);
const loading = ref(false);
const checkAll = ref(true);
const isIndeterminate = ref(false);
const isExpandAll = ref(props.isExpandAll);
const filterColumns = cloneDeep(props?.columns).filter(column =>
isBoolean(column?.hide)
? !column.hide

View File

@@ -12,7 +12,7 @@ export interface OptionsType {
/** 图标属性、样式配置 */
iconAttrs?: iconType;
/** 值 */
value?: string | number;
value?: any;
/** 是否禁用 */
disabled?: boolean;
/** `tooltip` 提示 */