|
|
|
@ -4,12 +4,13 @@
|
|
|
|
|
* @Github:
|
|
|
|
|
* @Date: 2019-12-30 13:51:19
|
|
|
|
|
* @LastEditors : tangjiang
|
|
|
|
|
* @LastEditTime : 2020-01-03 18:56:36
|
|
|
|
|
* @LastEditTime : 2020-01-07 11:08:58
|
|
|
|
|
*/
|
|
|
|
|
import './index.scss';
|
|
|
|
|
import React, { useState, useEffect } from 'react';
|
|
|
|
|
import { Select, notification } from 'antd';
|
|
|
|
|
|
|
|
|
|
import { CNotificationHOC} from 'educoder';
|
|
|
|
|
// import {} from 'antd';
|
|
|
|
|
const { Option } = Select;
|
|
|
|
|
|
|
|
|
|
function KnowLedge (props) {
|
|
|
|
@ -114,15 +115,29 @@ function KnowLedge (props) {
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 添加知识点
|
|
|
|
|
const handleAddKnowledge = () => {
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const _styles = {
|
|
|
|
|
display: selectOptions.length > 0 || selectValue.length > 0 ? 'inline-block' : 'none'
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="knowledge-select-area">
|
|
|
|
|
{ renderSelect(selectOptions) }
|
|
|
|
|
{/* 渲染下拉选择项 */}
|
|
|
|
|
<div className="knowledge-result">
|
|
|
|
|
<i
|
|
|
|
|
style={_styles}
|
|
|
|
|
className="iconfont icon-roundaddfill icon-add-knowledge"
|
|
|
|
|
onClick={handleAddKnowledge}
|
|
|
|
|
></i>
|
|
|
|
|
{ renderResult(selectValue) }
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default KnowLedge;
|
|
|
|
|
export default CNotificationHOC()(KnowLedge);
|
|
|
|
|