npm install antd-input-tag``sh`
yarn add antd-input-tag
or
npm install antd-input-tag在线例子
支持键盘删除,enter自动分割(头条号搜索关键字)
sh
import React, { useRef, useCallback } from "react";
import AntdInputTag from "antd-input-tag";
export default function App() {
const childRef = useRef();
const updateChildState = () => {
// changeVal 子组件暴露方法
console.log(childRef.current.changeVal());
};
return (
);
}
``| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| value | 传入数据 | array | [] |
| ref | ref | ref | - |