|
@ -1,6 +1,6 @@ |
|
|
import Glass from '@/components/glass' |
|
|
import Glass from '@/components/glass' |
|
|
import { useTranslation } from '@/i18n.ts' |
|
|
import { useTranslation } from '@/i18n.ts' |
|
|
import { usePageStoreOptions } from '@/store' |
|
|
|
|
|
|
|
|
|
|
|
import { PlusOutlined } from '@ant-design/icons' |
|
|
import { PlusOutlined } from '@ant-design/icons' |
|
|
import { PageContainer, ProCard } from '@ant-design/pro-components' |
|
|
import { PageContainer, ProCard } from '@ant-design/pro-components' |
|
|
import { Button, Form, Input, Radio, TreeSelect, InputNumber, notification, Alert, InputRef, Divider } from 'antd' |
|
|
import { Button, Form, Input, Radio, TreeSelect, InputNumber, notification, Alert, InputRef, Divider } from 'antd' |
|
@ -11,7 +11,7 @@ import ButtonTable from './components/ButtonTable.tsx' |
|
|
import { Flexbox } from 'react-layout-kit' |
|
|
import { Flexbox } from 'react-layout-kit' |
|
|
import { DraggablePanel } from '@/components/draggable-panel' |
|
|
import { DraggablePanel } from '@/components/draggable-panel' |
|
|
import { useStyle } from './style.ts' |
|
|
import { useStyle } from './style.ts' |
|
|
import { MenuItem } from '@/types' |
|
|
|
|
|
|
|
|
import { MenuItem } from '@/global' |
|
|
import MenuTree from './components/MenuTree.tsx' |
|
|
import MenuTree from './components/MenuTree.tsx' |
|
|
import BatchButton from '@/pages/system/menus/components/BatchButton.tsx' |
|
|
import BatchButton from '@/pages/system/menus/components/BatchButton.tsx' |
|
|
import { useEffect, useRef } from 'react' |
|
|
import { useEffect, useRef } from 'react' |
|
@ -21,9 +21,9 @@ const Menus = () => { |
|
|
const { styles, cx } = useStyle() |
|
|
const { styles, cx } = useStyle() |
|
|
const { t } = useTranslation() |
|
|
const { t } = useTranslation() |
|
|
const [ form ] = Form.useForm() |
|
|
const [ form ] = Form.useForm() |
|
|
const { mutate, isPending, error, isError } = useAtomValue(saveOrUpdateMenuAtom, usePageStoreOptions()) |
|
|
|
|
|
const { data = [] } = useAtomValue(menuDataAtom, usePageStoreOptions()) |
|
|
|
|
|
const [ currentMenu, setMenuData ] = useAtom<MenuItem>(selectedMenuAtom, usePageStoreOptions()) ?? {} |
|
|
|
|
|
|
|
|
const { mutate, isPending, error, isError } = useAtomValue(saveOrUpdateMenuAtom) |
|
|
|
|
|
const { data = [] } = useAtomValue(menuDataAtom) |
|
|
|
|
|
const [ currentMenu, setMenuData ] = useAtom<MenuItem>(selectedMenuAtom) ?? {} |
|
|
const menuInputRef = useRef<InputRef | undefined>(undefined) |
|
|
const menuInputRef = useRef<InputRef | undefined>(undefined) |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|