Skip to content

Commit

Permalink
feat: 1.删除Demo登录。2.优化选中组件样式。
Browse files Browse the repository at this point in the history
  • Loading branch information
JackySoft authored and jianbing.chen committed Dec 18, 2024
1 parent 63939dd commit 9e6e55d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 144 deletions.
13 changes: 1 addition & 12 deletions packages/admin/src/pages/login/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { FormProps } from 'antd';
import { Button, Flex, Form, Input } from 'antd';
import { Button, Form, Input } from 'antd';
import { useNavigate } from 'react-router-dom';
import { login } from '@/api';
import storage from '@/utils/storage';
Expand Down Expand Up @@ -54,17 +54,6 @@ export default function Login() {
登录
</Button>
</Form.Item>
<Form.Item>
<Flex justify="center" gap={20}>
<a
onClick={() => {
form.setFieldsValue({ userName: '[email protected]', userPwd: 'marsview' });
}}
>
没有账号?使用体验号
</a>
</Flex>
</Form.Item>
</Form>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion packages/editor/src/components/Toolbar/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ const Toolbar = memo(({ hoverTarget, copyElement, pastElement, delElement }: any
* 当元素属性发生变化时,重新渲染工具条
*/
useEffect(() => {
if (!selectedElement) return;
if (!selectedElement) {
setSelectedStyle({});
setDirection('');
return;
}
setTimeout(() => {
const target: HTMLElement | null = document.querySelector(`[data-id=${selectedElement?.id}]`);
if (!target) return;
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/Toolbar/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
z-index: 999; //Modal为1000,防止遮挡属性中的弹框
pointer-events: none;
box-sizing: border-box;
transition: all 0.2s;
// transition: all 0.2s;
font-size: 12px;
top: 0;
left: 0;
Expand All @@ -16,7 +16,7 @@
display: block;
padding-left: 8px;
padding-right: 8px;
transition: all 0.2s;
// transition: all 0.2s;
height: 24px;
line-height: 24px;
cursor: pointer;
Expand Down
118 changes: 0 additions & 118 deletions packages/editor/src/pages/login/Demo.tsx

This file was deleted.

7 changes: 0 additions & 7 deletions packages/editor/src/pages/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,6 @@ export default function Login() {
<Form.Item style={{ marginTop: 40 }}>
<Flex justify="center" gap={20}>
<a onClick={onChange}>{type === 'login' ? '没有账号?去注册' : '已有账号?去登录'}</a>
<a
onClick={() => {
navigate('/demo');
}}
>
体验 Demo
</a>
</Flex>
</Form.Item>
</Form>
Expand Down
4 changes: 0 additions & 4 deletions packages/editor/src/router/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ export const router = [
path: '/login',
element: lazyLoad(React.lazy(() => import('@/pages/login/Login'))),
},
{
path: '/demo',
element: lazyLoad(React.lazy(() => import('@/pages/login/Demo'))),
},
{
path: '/',
loader: AuthLoader,
Expand Down

0 comments on commit 9e6e55d

Please sign in to comment.