optimize select style

dev_static
tangjiang 5 years ago
parent 32b6f8b552
commit 21a57b274d

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-12-30 13:51:19
* @LastEditors : tangjiang
* @LastEditTime : 2020-01-03 09:32:24
* @LastEditTime : 2020-01-03 18:56:36
*/
import './index.scss';
import React, { useState, useEffect } from 'react';
@ -49,7 +49,8 @@ function KnowLedge (props) {
}
// 过滤下拉列表项
const handleSelectChange = (value) => {
value = +value.join('');
// value = +value.join('');
value = +value;
const tempArr = [...selectValue];
const _result = selectOptions.filter(item => {
if (item.id === value && tempArr.findIndex(t => t.id === value) === -1) {
@ -103,7 +104,7 @@ function KnowLedge (props) {
return (
<Select
value={value}
mode="tags"
// mode="tags"
placeholder="请选择"
style={{ width: '100%' }}
onChange={handleSelectChange}

@ -4,7 +4,7 @@
* @Github:
* @Date: 2019-11-20 10:35:40
* @LastEditors : tangjiang
* @LastEditTime : 2020-01-03 11:28:26
* @LastEditTime : 2020-01-03 19:02:17
*/
import './index.scss';
// import 'katex/dist/katex.css';

Loading…
Cancel
Save