Skip to content

【t-checkbox-group】与微信小程序form 组件结合 form 无法拿到t-checkbox-group的value #4006

@FanBoB

Description

@FanBoB

tdesign-miniprogram 版本

1.11.0

重现链接

No response

重现步骤

`



筛选

<view class="popup-body">
  <view class="filter-section">
  <scroll-view scroll-y style="height:600rpx;">
      <view class="popup-items">
        <checkbox-group name="checkbox-group" >
          <checkbox value="checkbox1" label="露营" />
          <checkbox value="checkbox2" label="徒步" />
          <checkbox value="checkbox3" label="城市" />
          <checkbox value="checkbox4" label="攀岩" />
          <checkbox value="checkbox5" label="赛事" />
        </checkbox-group>
        <view class="filter-section-title">活动类型</view>
        <t-checkbox-group t-class="campsite-checkbox-popup" bind:change="handleCheckboxGroup" name="checkbox" default-value="{{['checkbox1']}}">
          <t-checkbox value="checkbox1" t-class="campsite-checkbox-items" t-class-label="campsite-checkbox-label" label="露营" icon="none" />
          <t-checkbox value="checkbox2" t-class="campsite-checkbox-items" t-class-label="campsite-checkbox-label" label="徒步" icon="none" />
          <t-checkbox value="checkbox3" t-class="campsite-checkbox-items" t-class-label="campsite-checkbox-label" label="城市" icon="none" />
          <t-checkbox value="checkbox4" t-class="campsite-checkbox-items" t-class-label="campsite-checkbox-label" label="攀岩" icon="none" />
          <t-checkbox value="checkbox5" t-class="campsite-checkbox-items" t-class-label="campsite-checkbox-label" label="赛事" icon="none" />
        </t-checkbox-group>
        <t-divider />
      </view>

   </scroll-view>
  </view>
</view>

<view class="popup-footer">
  <t-button variant="outline" t-class="popup-button" bindtap="onResetFilters">重置</t-button>
  <t-button type="submit" t-class="popup-button popup-button-submit" >确定</t-button>
</view>
`

期望结果

t-checkbox 通过form 拿到值

实际结果

t-checkbox 拿不到数据、使用原生checkbox可以拿到

基础库版本

No response

补充说明

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions