摘要:
const arrUnique = (arr, key) => { let ojb = {}; return arr.reduce((pre, item) => { ojb[item[key]] ? '' : ojb[item[key]] = true && pre.push(item); retu 阅读全文
摘要:
// 页面加载时及监听时 useEffect(() => { getContentModuleData(); }, [xx.current, xx.name]); // 页面销毁时 useEffect(() => () => { // do something... }, []); 阅读全文
摘要:
declare module '@alipay/bigfish' { function useModel<S>(initialState: string); function request<S>(url: string, options: any); export const history: { 阅读全文
摘要:
.ant-dropdown { pointer-events: auto!important; opacity: 1!important; } .slide-up-enter, .slide-up-appear { animation-duration: 0s; } 添加以上即可,但取消了初始下拉的 阅读全文
摘要:
interface ContentTableBizType { text: string; value: string; } // react const [bizType, setBizType] = useState<ContentTableBizType[]>([]); // 初始化 useE 阅读全文
摘要:
const textarea = document.createElement("textarea"); textarea.setAttribute("readonly", true); textarea.value = '传入的值'; document.body.appendChild(texta 阅读全文
摘要:
const PASSIVE = function (e) { e.preventDefault(); } // 禁止 document.body.style.overflow = 'hidden'; document.addEventListener('touchmove', PASSIVE, { 阅读全文