import { ApolloTextArea } from '../textarea'; export const ApolloTextLink = ApolloTextArea; // import React, { useEffect, useState } from 'react'; // import { Input, Modal } from 'antd'; // import styles from './styles.less'; // import { onBlurFn } from '../onBlurFn'; // import { antiAssign } from '../../../../utils/utils'; // import { ApolloTextAreaProps } from '../editInterface'; // import { Consumer } from '../../../context'; // // export const ApolloTextLink = (props: ApolloTextAreaProps) => { // const { maxLength, onChange, value, onEmitChange, columnConfig, origin, tableId } = props; // const { columnChsName } = columnConfig; // const selfProps = antiAssign(props, [ // 'columnConfig', // 'onChange', // 'value', // 'cutLength', // 'getDetail', // 'rowData', // 'onEmitChange', // 'isMultiple', // 'origin', // 'tableId', // 'cellRenderProps', // 'maxPopHeight', // 'getPopupContainer', // 'getCalendarContainer', // 'disableOptions', // 'rowId', // 'onBlurFn', // 'getInstanceDetail', // ]); // selfProps.disabled = !!props.disabled; // const [curValue, setCurValue] = useState(value); // const [visible, setVisible] = useState(false); // useEffect(() => { // if (origin !== 'editForm') { // getMore(); // } // }, []); // const [inputVal, setInputVal] = useState(value); // useEffect(() => { // setInputVal(value); // }, [value]); // // useEffect(() => { // // if (value && value.length === cutLength) { // // getMore(); // // } // // }, []); // const inputOnBlurFn = () => { // if (typeof onBlurFn === 'function') { // onBlurFn(props); // } // }; // const changeValue = (e) => { // if (typeof onChange === 'function') { // onChange(e.target.value); // } // }; // // const changeCurValue = (e) => { // if (typeof onChange === 'function') { // setCurValue(e.target.value); // } // }; // // const clearEdit = () => { // // 清除所有dom的编辑状态 // const doms = document.querySelectorAll(`.cellUnit.table_${tableId}`); // if (doms) { // doms.forEach((item) => { // item.setAttribute('data-editing-cell', '0'); // }); // } // }; // // const hide = () => { // if (typeof onEmitChange === 'function') { // onEmitChange(value); // } // clearEdit(); // setVisible(false); // }; // // const confirmChange = () => { // if (typeof onEmitChange === 'function') { // onEmitChange(curValue); // } // clearEdit(); // setVisible(false); // }; // // const getMore = async () => { // setVisible(true); // }; // // if (origin === 'editForm') { // return ( // // {({ locale }) => { // return ( //
// { // changeValue(e); // setInputVal(e.target.value); // }} // /> // {!!maxLength && ( // // {`${locale.alreadyInput} ${(value || '').length}/${maxLength}`} // // )} //
// ); // }} //
// ); // } // // return ( // // {({ locale }) => { // return ( //
// // // // {!!maxLength && ( // // {`${locale.alreadyInput} ${(curValue || '').length}/${maxLength}`} // // )} // //
// ); // }} //
// ); // };