File tree Expand file tree Collapse file tree 4 files changed +14
-0
lines changed
Expand file tree Collapse file tree 4 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,8 @@ export default {
228228 application_show_menu : 'Show to the menu' ,
229229 application_true : 'Yes' ,
230230 application_false : 'No' ,
231+ application_client_id_placeholder : 'Can be left empty, system will auto-generate' ,
232+ //api 监控
231233 application_create : 'Create Client' ,
232234 application_edit : 'Edit client' ,
233235 api_monitor_total_totalCount : 'Total number of APIs' ,
Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ export default {
225225 application_true : '是' ,
226226 application_false : '否' ,
227227 application_create : '创建客户端' ,
228+ application_client_id_placeholder : '可留空,系统将自动生成' ,
228229 application_edit : '编辑客户端' ,
229230 //api 监控
230231 api_monitor_total_totalCount : 'API总数' ,
Original file line number Diff line number Diff line change @@ -225,6 +225,7 @@ export default {
225225 application_true : '是' ,
226226 application_false : '否' ,
227227 application_create : '創建客戶端' ,
228+ application_client_id_placeholder : '可留空,系統將自動生成' ,
228229 application_edit : '編輯客戶端' ,
229230 //api 监控
230231 api_monitor_total_totalCount : 'API總數' ,
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ export default {
3030 roles: [],
3131 createForm: {
3232 clientName: ' ' ,
33+ clientId: ' ' ,
3334 grantTypes: [],
3435 clientSecret: ' ' ,
3536 scopes: [],
@@ -63,6 +64,7 @@ export default {
6364 this .createDialogVisible = true
6465 this .createForm = {
6566 clientName: ' ' ,
67+ clientId: ' ' ,
6668 grantTypes: [' implicit' , ' client_credentials' ],
6769 clientSecret: ' ' ,
6870 scopes: [],
@@ -112,6 +114,11 @@ export default {
112114 params .redirectUris = params .redirectUrisStr ? .split (' ,' ) || []
113115 delete params .redirectUrisStr
114116
117+ // 如果clientId为空,则不传递该字段
118+ if (! params .clientId || params .clientId .trim () === ' ' ) {
119+ delete params[' clientId' ]
120+ }
121+
115122 this .$refs .form .validate ((valid ) => {
116123 if (valid) {
117124 method (params).then (() => {
@@ -335,6 +342,9 @@ export default {
335342 >
336343 < ElInput v- model= " createForm.clientName" / >
337344 < / ElFormItem>
345+ < ElFormItem : label= " $t('application_header_id')" prop= " clientId" >
346+ < ElInput v- model= " createForm.clientId" : placeholder= " $t('application_client_id_placeholder')" >< / ElInput>
347+ < / ElFormItem>
338348 < ElFormItem
339349 : label= " $t('application_header_grant_type')"
340350 required
You can’t perform that action at this time.
0 commit comments