|
|
@ -4,7 +4,7 @@
|
|
|
|
* @Github:
|
|
|
|
* @Github:
|
|
|
|
* @Date: 2019-12-30 13:51:19
|
|
|
|
* @Date: 2019-12-30 13:51:19
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
* @LastEditTime : 2019-12-30 20:44:38
|
|
|
|
* @LastEditTime : 2019-12-31 09:06:44
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
import './index.scss';
|
|
|
|
import './index.scss';
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
@ -46,16 +46,15 @@ function KnowLedge (props) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return item.id !== value;
|
|
|
|
return item.id !== value;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
console.log(tempArr)
|
|
|
|
|
|
|
|
setSelectValue(tempArr);
|
|
|
|
setSelectValue(tempArr);
|
|
|
|
setSelectOptions(_result);
|
|
|
|
setSelectOptions(_result);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 渲染下拉结果
|
|
|
|
// 渲染下拉结果
|
|
|
|
const renderResult = (arrs) => {
|
|
|
|
const renderResult = (arrs) => {
|
|
|
|
return arrs.map(item => (
|
|
|
|
return arrs.map((item) => (
|
|
|
|
<div className="knowledge-item" key={`item_$(item.id)`}>
|
|
|
|
<div className="knowledge-item" key={`item_${item.name}`}>
|
|
|
|
<span className="knowledge-item-txt"></span>
|
|
|
|
<span className="knowledge-item-txt">{item.name}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -79,7 +78,11 @@ function KnowLedge (props) {
|
|
|
|
{ renderSelect(selectOptions) }
|
|
|
|
{ renderSelect(selectOptions) }
|
|
|
|
{/* 渲染下拉选择项 */}
|
|
|
|
{/* 渲染下拉选择项 */}
|
|
|
|
<div className="knowledge-result">
|
|
|
|
<div className="knowledge-result">
|
|
|
|
{ renderResult(selectValue) }
|
|
|
|
{/* { renderResult(selectValue) } */}
|
|
|
|
|
|
|
|
{/* <div className="knowledge-item">1111</div> */}
|
|
|
|
|
|
|
|
<div className="knowledge-item">
|
|
|
|
|
|
|
|
<span className="knowledge-item-txt">JAVA</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
);
|
|
|
|