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

[新功能需求] tabs、picker 等组件允许 null 、undefined等值 #912

Open
DoveAz opened this issue Feb 22, 2025 · 1 comment
Open
Labels
feature: need confirm 待确认的新特性

Comments

@DoveAz
Copy link

DoveAz commented Feb 22, 2025

这个功能解决了什么问题?

picker tabs 有时用作筛选,其中难免要有全部选项,一般全部的值 传给后端都是 null 或 undefined, 现在只能像下面一样写,不太优雅

 <wd-picker
          :columns="platformList"
          clearable
          :modelValue="filterForm.platformId === null ? -99 : filterForm.platformId"
          @update:modelValue="
            val => {
              filterForm.platformId = val === -99 ? null : val;
            }
          "
          use-default-slot
        >
          <div class="text-#9F9F9F px-14px bg-#F8F8F8 space-x-4 rounded-full py-1 text-xs">
            <text>{{
              filterForm.platformId ? getLabel(platformList, filterForm.platformId) : '平台'
            }}</text>
            <wd-icon name="arrow-down" />
          </div>
        </wd-picker>

你期望的 API 是什么样子的?

允许 null 、undefined 值

@DoveAz DoveAz added the feature: need confirm 待确认的新特性 label Feb 22, 2025
@TAYUN
Copy link

TAYUN commented Feb 27, 2025

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: need confirm 待确认的新特性
Projects
None yet
Development

No branches or pull requests

2 participants