export function toList(val: T | T[]): T[] { if (val === false) { return [false, false] as T[]; } return Array.isArray(val) ? val : [val]; } export function getNode(dom: React.ReactNode, defaultNode: React.ReactNode, needDom?: boolean) { if (dom === true || dom === undefined) { return defaultNode; } return dom || (needDom && defaultNode); }