Skip to content

Commit

Permalink
feat: add default placeholder for ApiSelect (#5078)
Browse files Browse the repository at this point in the history
  • Loading branch information
mynetfan authored Dec 9, 2024
1 parent d085736 commit 018ddc7
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions apps/web-antd/src/adapter/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: Select,
Expand All @@ -98,6 +99,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: TreeSelect,
Expand Down
2 changes: 2 additions & 0 deletions apps/web-ele/src/adapter/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: ElSelectV2,
Expand All @@ -87,6 +88,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: ElTreeSelect,
Expand Down
2 changes: 0 additions & 2 deletions apps/web-ele/src/views/demos/form/basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const [Form, formApi] = useVbenForm({
},
// 菜单接口
api: getAllMenusApi,
placeholder: '请选择',
},
// 字段名
fieldName: 'api',
Expand All @@ -52,7 +51,6 @@ const [Form, formApi] = useVbenForm({
childrenField: 'children',
// 菜单接口转options格式
labelField: 'name',
placeholder: '请选择',
valueField: 'path',
},
// 字段名
Expand Down
2 changes: 2 additions & 0 deletions apps/web-naive/src/adapter/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: NSelect,
Expand All @@ -84,6 +85,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: NTreeSelect,
Expand Down
2 changes: 0 additions & 2 deletions apps/web-naive/src/views/demos/form/basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ const [Form, formApi] = useVbenForm({
},
// 菜单接口
api: getAllMenusApi,
placeholder: '请选择',
},
// 字段名
fieldName: 'api',
Expand All @@ -51,7 +50,6 @@ const [Form, formApi] = useVbenForm({
childrenField: 'children',
// 菜单接口转options格式
labelField: 'name',
placeholder: '请选择',
valueField: 'path',
},
// 字段名
Expand Down
2 changes: 2 additions & 0 deletions playground/src/adapter/component/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: Select,
Expand All @@ -99,6 +100,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: TreeSelect,
Expand Down
2 changes: 0 additions & 2 deletions playground/src/views/examples/form/basic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
},
// 菜单接口
api: getAllMenusApi,
placeholder: '请选择',
},
// 字段名
fieldName: 'api',
Expand All @@ -71,7 +70,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
childrenField: 'children',
// 菜单接口转options格式
labelField: 'name',
placeholder: '请选择',
valueField: 'path',
},
// 字段名
Expand Down

0 comments on commit 018ddc7

Please sign in to comment.