Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 018ddc75
authored
Dec 09, 2024
by
Netfan
Committed by
GitHub
Dec 09, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: add default `placeholder` for `ApiSelect` (#5078)
1 parent
d085736b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
8 additions
and
6 deletions
apps/web-antd/src/adapter/component/index.ts
apps/web-ele/src/adapter/component/index.ts
apps/web-ele/src/views/demos/form/basic.vue
apps/web-naive/src/adapter/component/index.ts
apps/web-naive/src/views/demos/form/basic.vue
playground/src/adapter/component/index.ts
playground/src/views/examples/form/basic.vue
apps/web-antd/src/adapter/component/index.ts
View file @
018ddc7
...
@@ -84,6 +84,7 @@ async function initComponentAdapter() {
...
@@ -84,6 +84,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
Select
,
component
:
Select
,
...
@@ -98,6 +99,7 @@ async function initComponentAdapter() {
...
@@ -98,6 +99,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
TreeSelect
,
component
:
TreeSelect
,
...
...
apps/web-ele/src/adapter/component/index.ts
View file @
018ddc7
...
@@ -74,6 +74,7 @@ async function initComponentAdapter() {
...
@@ -74,6 +74,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
ElSelectV2
,
component
:
ElSelectV2
,
...
@@ -87,6 +88,7 @@ async function initComponentAdapter() {
...
@@ -87,6 +88,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
ElTreeSelect
,
component
:
ElTreeSelect
,
...
...
apps/web-ele/src/views/demos/form/basic.vue
View file @
018ddc7
...
@@ -36,7 +36,6 @@ const [Form, formApi] = useVbenForm({
...
@@ -36,7 +36,6 @@ const [Form, formApi] = useVbenForm({
},
},
// 菜单接口
// 菜单接口
api
:
getAllMenusApi
,
api
:
getAllMenusApi
,
placeholder
:
'请选择'
,
},
},
// 字段名
// 字段名
fieldName
:
'api'
,
fieldName
:
'api'
,
...
@@ -52,7 +51,6 @@ const [Form, formApi] = useVbenForm({
...
@@ -52,7 +51,6 @@ const [Form, formApi] = useVbenForm({
childrenField
:
'children'
,
childrenField
:
'children'
,
// 菜单接口转options格式
// 菜单接口转options格式
labelField
:
'name'
,
labelField
:
'name'
,
placeholder
:
'请选择'
,
valueField
:
'path'
,
valueField
:
'path'
,
},
},
// 字段名
// 字段名
...
...
apps/web-naive/src/adapter/component/index.ts
View file @
018ddc7
...
@@ -72,6 +72,7 @@ async function initComponentAdapter() {
...
@@ -72,6 +72,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
NSelect
,
component
:
NSelect
,
...
@@ -84,6 +85,7 @@ async function initComponentAdapter() {
...
@@ -84,6 +85,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
NTreeSelect
,
component
:
NTreeSelect
,
...
...
apps/web-naive/src/views/demos/form/basic.vue
View file @
018ddc7
...
@@ -35,7 +35,6 @@ const [Form, formApi] = useVbenForm({
...
@@ -35,7 +35,6 @@ const [Form, formApi] = useVbenForm({
},
},
// 菜单接口
// 菜单接口
api
:
getAllMenusApi
,
api
:
getAllMenusApi
,
placeholder
:
'请选择'
,
},
},
// 字段名
// 字段名
fieldName
:
'api'
,
fieldName
:
'api'
,
...
@@ -51,7 +50,6 @@ const [Form, formApi] = useVbenForm({
...
@@ -51,7 +50,6 @@ const [Form, formApi] = useVbenForm({
childrenField
:
'children'
,
childrenField
:
'children'
,
// 菜单接口转options格式
// 菜单接口转options格式
labelField
:
'name'
,
labelField
:
'name'
,
placeholder
:
'请选择'
,
valueField
:
'path'
,
valueField
:
'path'
,
},
},
// 字段名
// 字段名
...
...
playground/src/adapter/component/index.ts
View file @
018ddc7
...
@@ -85,6 +85,7 @@ async function initComponentAdapter() {
...
@@ -85,6 +85,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
Select
,
component
:
Select
,
...
@@ -99,6 +100,7 @@ async function initComponentAdapter() {
...
@@ -99,6 +100,7 @@ async function initComponentAdapter() {
return
h
(
return
h
(
ApiSelect
,
ApiSelect
,
{
{
placeholder
:
$t
(
'ui.placeholder.select'
),
...
props
,
...
props
,
...
attrs
,
...
attrs
,
component
:
TreeSelect
,
component
:
TreeSelect
,
...
...
playground/src/views/examples/form/basic.vue
View file @
018ddc7
...
@@ -55,7 +55,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
...
@@ -55,7 +55,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
},
},
// 菜单接口
// 菜单接口
api
:
getAllMenusApi
,
api
:
getAllMenusApi
,
placeholder
:
'请选择'
,
},
},
// 字段名
// 字段名
fieldName
:
'api'
,
fieldName
:
'api'
,
...
@@ -71,7 +70,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
...
@@ -71,7 +70,6 @@ const [BaseForm, baseFormApi] = useVbenForm({
childrenField
:
'children'
,
childrenField
:
'children'
,
// 菜单接口转options格式
// 菜单接口转options格式
labelField
:
'name'
,
labelField
:
'name'
,
placeholder
:
'请选择'
,
valueField
:
'path'
,
valueField
:
'path'
,
},
},
// 字段名
// 字段名
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment