add selector

dev_new_shixunsrepository
tangjiang 5 years ago
parent e4446a1ff3
commit f7f4c41371

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-30 13:51:19
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-30 16:54:30
* @LastEditTime : 2019-12-30 18:02:20
*/
import './index.scss';
import React, { useState } from 'react';
@ -33,6 +33,8 @@ function KnowLedge (props) {
}
const handleSelectChange = (value) => {
console.log(value);
const _result = selectOptions.filter(item => item !== value);
setSelectOptions(_result);
}
// 渲染下拉列表
@ -43,8 +45,6 @@ function KnowLedge (props) {
placeholder="请选择"
style={{ width: '100%' }}
onChange={handleSelectChange}
autoClearSearchValue={true}
maxTagCount={0}
>
{renderOptions(options)}
</Select>
@ -54,9 +54,6 @@ function KnowLedge (props) {
return (
<div className="knowledge-select-area">
{ renderSelect(selectOptions, selectValue) }
<div className="knowledge-select-result">
</div>
</div>
);
}

@ -0,0 +1,5 @@
.knowledge-select-area{
.ant-select-selection__rendered{
margin-bottom: 0 !important;
}
}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 10:35:40
* @LastEditors : tangjiang
* @LastEditTime : 2019-12-30 16:42:36
* @LastEditTime : 2019-12-30 17:53:18
*/
import './index.scss';
// import 'katex/dist/katex.css';

Loading…
Cancel
Save