diff --git a/spug_web/src/pages/schedule/Step2.js b/spug_web/src/pages/schedule/Step2.js index 623c823..68a4186 100644 --- a/spug_web/src/pages/schedule/Step2.js +++ b/spug_web/src/pages/schedule/Step2.js @@ -3,51 +3,61 @@ * Copyright (c) * Released under the AGPL-3.0 License. */ -import React from 'react'; +import React, { useState } from 'react'; import { observer } from 'mobx-react'; import { MinusCircleOutlined, PlusOutlined } from '@ant-design/icons'; import { Form, Select, Button } from 'antd'; +import HostSelector from 'pages/host/Selector'; import store from './store'; import hostStore from 'pages/host/store'; import styles from './index.module.css'; export default observer(function () { + const [visible, setVisible] = useState(false) + return ( -
- - {store.targets.map((id, index) => ( - - - {store.targets.length > 1 && ( - store.delTarget(index)}/> - )} - - ))} - - - - + + + + {store.targets.map((id, index) => ( + + + {store.targets.length > 1 && ( + store.delTarget(index)}/> + )} + + ))} + + + + + setVisible(false)} + onOk={(_, ids) => store.targets = ids}/> + - +
) }) diff --git a/spug_web/src/pages/schedule/index.module.css b/spug_web/src/pages/schedule/index.module.css index 30bddd7..dd9a3e0 100644 --- a/spug_web/src/pages/schedule/index.module.css +++ b/spug_web/src/pages/schedule/index.module.css @@ -6,7 +6,8 @@ .delIcon { font-size: 24px; position: relative; - top: 4px + top: 4px; + color: #999999; } .delIcon:hover { diff --git a/spug_web/src/pages/schedule/store.js b/spug_web/src/pages/schedule/store.js index c5c03b0..d90910c 100644 --- a/spug_web/src/pages/schedule/store.js +++ b/spug_web/src/pages/schedule/store.js @@ -71,10 +71,6 @@ class Store { this.record = info }; - addTarget = () => { - this.targets.push(undefined) - }; - editTarget = (index, v) => { this.targets[index] = v };