File tree Expand file tree Collapse file tree 5 files changed +8961
-4902
lines changed
Expand file tree Collapse file tree 5 files changed +8961
-4902
lines changed Original file line number Diff line number Diff line change @@ -229,6 +229,7 @@ export default {
229229 application_true : 'Yes' ,
230230 application_false : 'No' ,
231231 application_create : 'Create a client' ,
232+ application_client_id_placeholder : 'Can be left empty, system will auto-generate' ,
232233 //api 监控
233234 api_monitor_total_totalCount : 'Total number of APIs' ,
234235 api_monitor_total_warningApiCount : 'Total API Access' ,
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 //api 监控
229230 api_monitor_total_totalCount : 'API总数' ,
230231 api_monitor_total_warningApiCount : '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 //api 监控
229230 api_monitor_total_totalCount : 'API總數' ,
230231 api_monitor_total_warningApiCount : 'API訪問總數' ,
Original file line number Diff line number Diff line change 8787 <ElFormItem :label =" $t('application_header_client_name')" required prop =" clientName" >
8888 <ElInput v-model =" createForm.clientName" ></ElInput >
8989 </ElFormItem >
90+ <ElFormItem :label =" $t('application_header_id')" prop =" clientId" >
91+ <ElInput v-model =" createForm.clientId" size =" mini" :placeholder =" $t('application_client_id_placeholder')" ></ElInput >
92+ </ElFormItem >
9093 <ElFormItem :label =" $t('application_header_grant_type')" required prop =" grantTypes" >
9194 <ElSelect v-model =" createForm.grantTypes" multiple >
9295 <ElOption label =" Implicit" value =" implicit" ></ElOption >
@@ -159,6 +162,7 @@ export default {
159162 roles: [],
160163 createForm: {
161164 clientName: ' ' ,
165+ clientId: ' ' ,
162166 grantTypes: [],
163167 clientSecret: ' ' ,
164168 scopes: [],
@@ -195,6 +199,7 @@ export default {
195199 })
196200 this .createForm = {
197201 clientName: ' ' ,
202+ clientId: ' ' ,
198203 grantTypes: [' implicit' , ' client_credentials' ],
199204 clientSecret: ' ' ,
200205 scopes: [],
@@ -239,6 +244,11 @@ export default {
239244 params .redirectUris = params .redirectUrisStr ? .split (' ,' ) || []
240245 delete params[' redirectUrisStr' ]
241246
247+ // 如果clientId为空,则不传递该字段
248+ if (! params .clientId || params .clientId .trim () === ' ' ) {
249+ delete params[' clientId' ]
250+ }
251+
242252 this .$refs .form .validate ((valid ) => {
243253 if (valid) {
244254 applicationApi[method](params).then (() => {
You can’t perform that action at this time.
0 commit comments