feat: 优化菜单管理页面

master
绝弹 2023-11-23 21:23:25 +08:00
parent 7148e464be
commit e5c6b080a8
7 changed files with 14 additions and 33 deletions

4
.env
View File

@ -8,7 +8,7 @@ VITE_SUBTITLE = 快速开发web应用的模板工具
# 部署路径: 当为 ./ 时路由模式需为 hash
VITE_BASE = /
# 接口前缀:参见 axios 的 baseURL
VITE_API = https://appnify.app.juetan.cn/
VITE_API = http://127.0.0.1:3030/
# 首页路径
VITE_HOME_PATH = /home
# 路由模式web(路径) hash(锚点)
@ -24,7 +24,7 @@ VITE_PORT = 3020
# 代理前缀
VITE_PROXY_PREFIX = /api,/upload
# 代理地址
VITE_PROXY = https://appnify.app.juetan.cn/
VITE_PROXY = http://127.0.0.1:3030/
# API文档 说明:需返回符合 OPENAPI 规范的json内容
VITE_OPENAPI = http://127.0.0.1:3030/openapi.json
# 文件后缀 说明设为dev时会优先加载index.dev.vue文件否则回退至index.vue文件

View File

@ -1,3 +1,4 @@
import { merge } from 'lodash-es';
import { AnForm, AnFormInstance, AnFormProps } from '../components/Form';
import { FormItem, useItems } from './useItems';
@ -17,7 +18,8 @@ export type FormUseOptions = Partial<Omit<AnFormProps, 'items'>> & {
};
export function useFormProps(options: FormUseOptions): Required<AnFormProps> {
const { model = {}, items: _items = [], submit = () => null, formProps = {} } = options;
const { model: _model = {}, items: _items = [], submit = () => null, formProps = {} } = options;
const model = merge({ id: undefined }, _model);
const items = useItems(_items ?? [], model);
return {
model,

View File

@ -19,11 +19,11 @@
<script setup lang="tsx">
import { FileCategory, api } from '@/api';
import { useCreateColumn, useTable, useTableDelete, useUpdateColumn } from '@/components/AnTable';
import { getIcon } from './components/util';
import { Message } from '@arco-design/web-vue';
import numeral from 'numeral';
import AnGroup from './components/AnGroup.vue';
import AnUpload from './components/AnUpload.vue';
import { Message } from '@arco-design/web-vue';
import { getIcon } from './components/util';
const visible = ref(false);
const current = ref<FileCategory>();
@ -80,8 +80,8 @@ const {
>
{record.name}
</span>
<span class="hidden group-hover:inline text-xs text-gray-400 ml-0" title="复制地址" onClick={() => copyLink(record)}>
<i class=" icon-park-outline-copy hover:text-gray-700 cursor-pointer"></i>
<span class="inline-block w-5 text-xs text-gray-400 ml-0" title="复制地址" onClick={() => copyLink(record)}>
<i class="hidden! group-hover:inline-block! icon-park-outline-copy hover:text-gray-700 cursor-pointer"></i>
</span>
</span>
<div class="h-5 inline-flex items-center text-xs text-gray-400 space-x-4">

View File

@ -35,19 +35,6 @@ const { component: LoginLogTable } = useTable({
return api.log.getLoginLogs(model);
},
columns: [
// {
// title: '',
// dataIndex: 'nickname',
// width: 140,
// render({ record }) {
// return (
// <div class="overflow-hidden">
// <i class="icon-park-outline-user mr-2"></i>
// <span>{record.nickname}</span>
// </div>
// );
// },
// },
{
title: '操作描述',
dataIndex: 'description',

View File

@ -72,10 +72,6 @@ const [menuTable, menu] = useAniTable({
type: "button",
width: 200,
buttons: [
{
type: "modify",
text: "修改",
},
{
text: "新增子项",
disabled: ({ record }) => record.type === MenuType.BUTTON,
@ -83,6 +79,10 @@ const [menuTable, menu] = useAniTable({
console.log(record);
},
},
{
type: "modify",
text: "修改",
},
{
text: "删除",
type: "delete",

View File

@ -33,7 +33,7 @@ const { component: UserTable } = useTable({
</div>
<div class="w-full text-gray-400 space-x-4 text-xs">
<span>
<i class="icon-park-outline-mail mr-1 align-[-3px]"></i>
<i class="icon-park-outline-mail mr-1 align-[-4px]"></i>
contact@juetan.cn
</span>
<span>

View File

@ -13,7 +13,6 @@ declare module '@vue/runtime-core' {
ABreadcrumb: typeof import('@arco-design/web-vue')['Breadcrumb']
ABreadcrumbItem: typeof import('@arco-design/web-vue')['BreadcrumbItem']
AButton: typeof import('@arco-design/web-vue')['Button']
ACard: typeof import('@arco-design/web-vue')['Card']
ACheckbox: typeof import('@arco-design/web-vue')['Checkbox']
ACheckboxGroup: typeof import('@arco-design/web-vue')['CheckboxGroup']
AConfigProvider: typeof import('@arco-design/web-vue')['ConfigProvider']
@ -26,7 +25,6 @@ declare module '@vue/runtime-core' {
AEmpty: typeof import('@arco-design/web-vue')['Empty']
AForm: typeof import('@arco-design/web-vue')['Form']
AFormItem: typeof import('@arco-design/web-vue')['FormItem']
AImage: typeof import('@arco-design/web-vue')['Image']
AImagePreview: typeof import('@arco-design/web-vue')['ImagePreview']
AInput: typeof import('@arco-design/web-vue')['Input']
AInputNumber: typeof import('@arco-design/web-vue')['InputNumber']
@ -37,15 +35,11 @@ declare module '@vue/runtime-core' {
ALayoutHeader: typeof import('@arco-design/web-vue')['LayoutHeader']
ALayoutSider: typeof import('@arco-design/web-vue')['LayoutSider']
ALink: typeof import('@arco-design/web-vue')['Link']
AList: typeof import('@arco-design/web-vue')['List']
AListItem: typeof import('@arco-design/web-vue')['ListItem']
AListItemMeta: typeof import('@arco-design/web-vue')['ListItemMeta']
AMenu: typeof import('@arco-design/web-vue')['Menu']
AMenuItem: typeof import('@arco-design/web-vue')['MenuItem']
AModal: typeof import('@arco-design/web-vue')['Modal']
AnEmpty: typeof import('./../components/AnEmpty/AnEmpty.vue')['default']
AnForbidden: typeof import('./../components/AnForbidden/AnForbidden.vue')['default']
AnForbiden: typeof import('./../components/AnForbidden/AnForbiden.vue')['default']
AnToast: typeof import('./../components/AnToast/AnToast.vue')['default']
APagination: typeof import('@arco-design/web-vue')['Pagination']
APopover: typeof import('@arco-design/web-vue')['Popover']
@ -62,7 +56,6 @@ declare module '@vue/runtime-core' {
ATag: typeof import('@arco-design/web-vue')['Tag']
ATextarea: typeof import('@arco-design/web-vue')['Textarea']
ATooltip: typeof import('@arco-design/web-vue')['Tooltip']
ATree: typeof import('@arco-design/web-vue')['Tree']
AUpload: typeof import('@arco-design/web-vue')['Upload']
BaseOption: typeof import('./../components/editor/components/BaseOption.vue')['default']
BreadCrumb: typeof import('./../components/breadcrumb/bread-crumb.vue')['default']
@ -77,7 +70,6 @@ declare module '@vue/runtime-core' {
InputTexter: typeof import('./../components/editor/components/InputTexter.vue')['default']
Marquee: typeof import('./../components/editor/blocks/text/marquee.vue')['default']
Option: typeof import('./../components/editor/blocks/date/option.vue')['default']
Page403: typeof import('./../components/AnForbiden/page-403.vue')['default']
PanelHeader: typeof import('./../components/editor/components/PanelHeader.vue')['default']
PanelLeft: typeof import('./../components/editor/components/PanelLeft.vue')['default']
PanelMain: typeof import('./../components/editor/components/PanelMain.vue')['default']