Browse Source

feat: add default `placeholder` for `ApiSelect` (#5078)

pull/5083/head
Netfan 1 year ago
committed by GitHub
parent
commit
018ddc75c6
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      apps/web-antd/src/adapter/component/index.ts
  2. 2
      apps/web-ele/src/adapter/component/index.ts
  3. 2
      apps/web-ele/src/views/demos/form/basic.vue
  4. 2
      apps/web-naive/src/adapter/component/index.ts
  5. 2
      apps/web-naive/src/views/demos/form/basic.vue
  6. 2
      playground/src/adapter/component/index.ts
  7. 2
      playground/src/views/examples/form/basic.vue

2
apps/web-antd/src/adapter/component/index.ts

@ -84,6 +84,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: Select,
@ -98,6 +99,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: TreeSelect,

2
apps/web-ele/src/adapter/component/index.ts

@ -74,6 +74,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: ElSelectV2,
@ -87,6 +88,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: ElTreeSelect,

2
apps/web-ele/src/views/demos/form/basic.vue

@ -36,7 +36,6 @@ const [Form, formApi] = useVbenForm({
},
//
api: getAllMenusApi,
placeholder: '请选择',
},
//
fieldName: 'api',
@ -52,7 +51,6 @@ const [Form, formApi] = useVbenForm({
childrenField: 'children',
// options
labelField: 'name',
placeholder: '请选择',
valueField: 'path',
},
//

2
apps/web-naive/src/adapter/component/index.ts

@ -72,6 +72,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: NSelect,
@ -84,6 +85,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: NTreeSelect,

2
apps/web-naive/src/views/demos/form/basic.vue

@ -35,7 +35,6 @@ const [Form, formApi] = useVbenForm({
},
//
api: getAllMenusApi,
placeholder: '请选择',
},
//
fieldName: 'api',
@ -51,7 +50,6 @@ const [Form, formApi] = useVbenForm({
childrenField: 'children',
// options
labelField: 'name',
placeholder: '请选择',
valueField: 'path',
},
//

2
playground/src/adapter/component/index.ts

@ -85,6 +85,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: Select,
@ -99,6 +100,7 @@ async function initComponentAdapter() {
return h(
ApiSelect,
{
placeholder: $t('ui.placeholder.select'),
...props,
...attrs,
component: TreeSelect,

2
playground/src/views/examples/form/basic.vue

@ -55,7 +55,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
},
//
api: getAllMenusApi,
placeholder: '请选择',
},
//
fieldName: 'api',
@ -71,7 +70,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
childrenField: 'children',
// options
labelField: 'name',
placeholder: '请选择',
valueField: 'path',
},
//

Loading…
Cancel
Save