Skip to content

Commit

Permalink
Merge pull request HalseySpicy#355 from TopYou/feature-searchForm
Browse files Browse the repository at this point in the history
feat: searchFormItem搜索组件时间区间添加placeholder和rangeSeparator的定制
  • Loading branch information
HalseySpicy authored Dec 2, 2023
2 parents c610755 + 9c13297 commit 2d5799c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/SearchForm/components/SearchFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ const handleSearchProps = computed(() => {
const placeholder = computed(() => {
const search = props.column.search;
if (["datetimerange", "daterange", "monthrange"].includes(search?.props?.type) || search?.props?.isRange) {
return { rangeSeparator: "", startPlaceholder: "开始时间", endPlaceholder: "结束时间" };
return {
rangeSeparator: search?.props?.rangeSeparator ?? "",
startPlaceholder: search?.props?.startPlaceholder ?? "开始时间",
endPlaceholder: search?.props?.endPlaceholder ?? "结束时间"
};
}
const placeholder = search?.props?.placeholder ?? (search?.el?.includes("input") ? "请输入" : "请选择");
return { placeholder };
Expand Down

0 comments on commit 2d5799c

Please sign in to comment.