Blame view

ant-design-vue-jeecg/src/components/_util/util.js 217 Bytes
肖超群 authored
1
2
3
4
5
6
7
8
9
/**
 * components util
 */

/**
 * 清理空值,对象
 * @param children
 * @returns {*[]}
 */
肖超群 authored
10
export function filterEmpty(children = []) {
肖超群 authored
11
12
  return children.filter(c => c.tag || (c.text && c.text.trim() !== ''))
}