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

建议搜索 区域增加自定义查询功能 #189

Closed
zhaoyunqi888 opened this issue May 4, 2023 · 5 comments
Closed

建议搜索 区域增加自定义查询功能 #189

zhaoyunqi888 opened this issue May 4, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@zhaoyunqi888
Copy link

建议SearchForm 区域增加自定义查询功能
如 年龄查询 需要年龄段 查询 XX 至 XX 这样。

@HalseySpicy HalseySpicy added the enhancement New feature or request label May 6, 2023
@HalseySpicy
Copy link
Owner

等我想想这个功能怎么添加比较好,或者你有更好的建议,可以告诉我

@zhaoyunqi888
Copy link
Author

zhaoyunqi888 commented May 6, 2023

在掘金中看到一个帖子有如下代码 但个人初学前段 不会改在故把代码贴出来 看能否提供灵感:

<pro-table
    :columns="columns"
>
  <template #search>
    <el-radio-group>
        <el-radio-button label="全部"/>
        <el-radio-button label="本周"/>
        <el-radio-button label="本月"/>
    </el-radio-group>
  </template>
</pro-table>

对应的cloumns中配置:

{
label: "自定义搜索",
search: {
slot: "search"//跟slot名对应
}
}

在搜索列对应页面:

if (item.search?.slot) {
return _this?.slots?.[item?.search?.slot]?.()
}

掘金地址:https://juejin.cn/post/7182879856332374076

gitee代码地址:https://gitee.com/tian_may/easy-table/tree/master

@HalseySpicy
Copy link
Owner

我大概看了下,可以支持 tsx 组件渲染,插槽的话改动太大,需要将 SearchFormItem 组件整个重新,下个版本更新 tsx 组件支持
image

@zhaoyunqi888
Copy link
Author

楼主 V5

@HalseySpicy
Copy link
Owner

已更新

linruohan pushed a commit to linruohan/Geeker-Admin that referenced this issue Nov 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants