From b8fbb0e8eb3ffd450518d170c020dce58327f436 Mon Sep 17 00:00:00 2001 From: vapao Date: Fri, 21 Oct 2022 17:08:52 +0800 Subject: [PATCH] =?UTF-8?q?A=20=E8=B4=A6=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=92=E8=89=B2=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/system/account/Form.js | 15 +++++---------- spug_web/src/pages/system/account/Table.js | 5 +++++ spug_web/src/pages/system/account/index.js | 9 ++++++++- spug_web/src/pages/system/role/store.js | 8 ++++++++ 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/spug_web/src/pages/system/account/Form.js b/spug_web/src/pages/system/account/Form.js index e0f1de5..09e09d8 100644 --- a/spug_web/src/pages/system/account/Form.js +++ b/spug_web/src/pages/system/account/Form.js @@ -3,24 +3,19 @@ * Copyright (c) * Released under the AGPL-3.0 License. */ -import React, { useState, useEffect } from 'react'; +import React, { useState } from 'react'; +import { Link } from 'react-router-dom'; import { observer } from 'mobx-react'; import { Modal, Form, Select, Input, message } from 'antd'; import http from 'libs/http'; import store from './store'; -import roleStore from '../role/store'; -import { Link } from "react-router-dom"; +import rStore from '../role/store'; + export default observer(function () { const [form] = Form.useForm(); const [loading, setLoading] = useState(false); - useEffect(() => { - if (roleStore.records.length === 0) { - roleStore.fetchRecords() - } - }, []) - function handleSubmit() { setLoading(true); const formData = form.getFieldsValue(); @@ -55,7 +50,7 @@ export default observer(function () {