alibaba / x-render

🚴‍♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案
https://xrender.fun
7.05k stars 998 forks source link

表达式中引用了多选组件的时候,表达式失效 #1367

Closed MoYuM closed 1 year ago

MoYuM commented 1 year ago

1.依赖仓库的版本(Dependencies versions)

2.问题描述(Bug description): 在下拉框选择‘早’的时候,隐藏下面输入框,但是在取消选择‘早’ 的时候,并没有取消隐藏输入框

3.出现问题的 schema demo(Reproduction schema demo)

const schema = {
  type: 'object',
  properties: {
    select: {
      title: '下拉框',
      type: 'string',
      widget: 'select',
      props: {
        mode: 'multiple',
        options: [
          { label: '早', value: 'a' },
          { label: '中', value: 'b' },
          { label: '晚', value: 'c' }
        ]
      }
    },
    input: {
      title: '输入框',
      type: 'string',
      widget: 'input',
      hidden: "{{formData.select.includes('a')}}"
    },
  }
}

4.最小复现 demo(Reproduction demo)

form-render demo https://codesandbox.io/s/unruffled-flower-jl78h table-render demo https://codesandbox.io/s/sweet-euler-bdoty fr-generator demo https://codesandbox.io/s/s13sh

MoYuM commented 1 year ago

2023-08-21 12 02 46