Skip to content

Conversation

bypanghu
Copy link
Member

优化字典页面,现支持拖拽显示大小,防止左侧列表折叠
字典支持树形结构。

`
/**

  • 获取字典数据
  • @param {string} type - 字典类型,必填
  • @param {Object} options - 可选参数
  • @param {number} options.depth - 指定获取字典的深度,默认为0(完整树形结构)
  • @param {string|number|null} options.value - 指定节点的value,获取该节点的children,默认为null
  • @returns {Promise} 字典数据数组
  • @example
  • // 获取完整的字典树形结构
  • const dictTree = await getDict('user_status')
  • // 获取指定深度的扁平化字典数据
  • const dictFlat = await getDict('user_status', {
  • depth: 2
  • })
  • // 获取指定节点的children
  • const children = await getDict('user_status', {
  • value: 'active'
  • })
    */
    `
    js 调用函数支持原始函数,如果为树形结构则返回树形结构,否则返回 array。支持根据 depth、value 过滤,属非强制字段

@pixelmaxQm pixelmaxQm merged commit c9bb6f5 into flipped-aurora:dev-286 Oct 9, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants