import React from 'react'; import './ablt.less'; import { Tag, Input, Tooltip, Button, Spin } from 'antd'; class EditableTagGroup extends React.Component { constructor(props) { super(props); this.state = { tags: ['我的标签:', '标签1', '标签2'], inputVisible: false, inputValue: '', } } handleClose(removedTag) { const tags = this.state.tags.filter(tag => tag !== removedTag); this.props.tagsArr(tags); this.setState({ tags }); } showInput() { this.setState({ inputVisible: true }, () => this.input.focus()); } handleInputChange(e) { this.setState({ inputValue: e.target.value }); } handleInputConfirm() { const state = this.state; const inputValue = state.inputValue; let tags = state.tags; if (inputValue && tags.indexOf(inputValue) === -1) { tags = [...tags, inputValue]; } this.props.tagsArr(tags); this.setState({ tags, inputVisible: false, inputValue: '', }); } render() { const { tags, inputVisible, inputValue } = this.state; return (
能力标签
最多可设置10个标签。请用简洁明确的关键词来展示你的职业能力。