Skip to content

antd-mini 升级到2.0后 selector组建 minSelectedCount 与 multiple属性不能同时生效 #944

Closed
@zixuanMoon

Description

@zixuanMoon

组件

基础库版本

2.8.12

设备机型

手机系统

  • iOS

APP

组件库版本

"antd-mini": "^2.15.0"

预期行为

复现步骤

  1. 在0.5版本 multiple和 minSelectedCount="{{1}}"能实现多选且最少选择一项的效果,但是升级之后不行

复现 demo

<selector
    defaultValue="{{['1']}}"
    options="{{items1}}"
    multiple
    minSelectedCount="{{1}}"
    onSelectMin="onSelectMin"
  />
Component<IData, IProps, IMethods>({
  data: {
    items1: [
      { text: '毛发检测', value: '1' },
      { text: '养发生发', value: '2' },
      { text: '植发植眉', value: '3' },
    ],
  },
  props: {
    item: {},
  },
  methods: {
    handleChangeSelector(value) {
      // const intention = convertIntentionToString(value);
      console.log('value===>', value);
    },
    onSelectMin(value, item) {
      console.log('不允许清空', value, item);
      my.alert({ content: '不允许清空' });
    },
  },
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions