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

[新功能需求] 希望能添加对PickerView 和 Picker 组件的自定义列表项label插槽支持 #805

Open
RanMaoting opened this issue Dec 25, 2024 · 0 comments
Labels
feature: need confirm 待确认的新特性

Comments

@RanMaoting
Copy link

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

现在这两个组件只能使用简单的字符串渲染,在某些情况下可能需要使用自定义插槽
image
k
看了下源码,如果添加一个label插槽应该改动不大

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

<wd-picker
          :placeholder="xxxx"
          label-width="48px"
          prop="promotion"
          v-model="xxxx"
          :columns="xxxx"
          value-key="type"
          label-key="name"
          :z-index="500"
        >
          <template #item-label>
            <div
              class="w-12 h-12 rounded-full bg-black text-white flex justify-center items-center"
            >
              xxxxxxxx x x
            </div>
          </template>
        </wd-picker>
@RanMaoting RanMaoting added the feature: need confirm 待确认的新特性 label Dec 25, 2024
@RanMaoting RanMaoting changed the title [新功能需求] 希望能添加对PickerView 和 Picker 组件的自定义label插槽支持 [新功能需求] 希望能添加对PickerView 和 Picker 组件的自定义列表项label插槽支持 Dec 25, 2024
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

1 participant