Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] 远程通用字典接口 #192

Open
okami-chen opened this issue Mar 16, 2024 · 1 comment
Open

[QUESTION] 远程通用字典接口 #192

okami-chen opened this issue Mar 16, 2024 · 1 comment
Labels
question stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@okami-chen
Copy link

okami-chen commented Mar 16, 2024

Before you submit this issue, you has been search all existed issues and search the documentation

filter 怎么使用动态值,比如使用当前编辑的数据某个字段值

Describe your question

  {
    title: "设备",
    dataIndex: "device_id",
    formType: "select",
    search: true,
    commonRules: {
      required: true,
      message: "请输入设备"
    },
    dict: {
      remote: 'mall/device/remote',
      // 指定组件接收的props
      props: {
        label: "title",
        value: "id"
      },
      // 开启分页
      openPage: false,
      // 远程请求配置项
      remoteOption: {
        // 按用户名排序
        sort: {id: 'desc'}, // 如果不指定排序方式,默认为正序排序
        // 设置查询的字段
        select: ['id', 'title'],
        filter: {
          // 查找 id 大于 2 的数据
          id: [ '>', 2],
          // 并且用户名包含字母 a 的用户
          username: [ 'like', 'a' ]
        },
      },
      translation: true
    }
  },
@kanyxmo
Copy link
Member

kanyxmo commented Mar 18, 2024

用crudRef.value.getColumnService()

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants