File tree Expand file tree Collapse file tree 5 files changed +9587
-7562
lines changed
Expand file tree Collapse file tree 5 files changed +9587
-7562
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export default {
226226 application_true : 'Yes' ,
227227 application_false : 'No' ,
228228 application_create : 'Create a client' ,
229+ application_client_id_placeholder : 'Can be left empty, system will auto-generate' ,
229230 //api 监控
230231 api_monitor_total_totalCount : 'Total number of APIs' ,
231232 api_monitor_total_warningApiCount : 'Total API Access' ,
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ export default {
223223 application_true : '是' ,
224224 application_false : '否' ,
225225 application_create : '创建客户端' ,
226+ application_client_id_placeholder : '可留空,系统将自动生成' ,
226227 //api 监控
227228 api_monitor_total_totalCount : 'API总数' ,
228229 api_monitor_total_warningApiCount : 'API访问总数' ,
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ export default {
223223 application_true : '是' ,
224224 application_false : '否' ,
225225 application_create : '創建客戶端' ,
226+ application_client_id_placeholder : '可留空,系統將自動生成' ,
226227 //api 监控
227228 api_monitor_total_totalCount : 'API總數' ,
228229 api_monitor_total_warningApiCount : 'API訪問總數' ,
Original file line number Diff line number Diff line change 9292 <ElFormItem :label =" $t('application_header_client_name')" required prop =" clientName" >
9393 <ElInput v-model =" createForm.clientName" size =" mini" ></ElInput >
9494 </ElFormItem >
95+ <ElFormItem :label =" $t('application_header_id')" prop =" clientId" >
96+ <ElInput v-model =" createForm.clientId" size =" mini" :placeholder =" $t('application_client_id_placeholder')" ></ElInput >
97+ </ElFormItem >
9598 <ElFormItem :label =" $t('application_header_grant_type')" required prop =" grantTypes" >
9699 <ElSelect v-model =" createForm.grantTypes" multiple size =" mini" >
97100 <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: [],
@@ -240,6 +245,11 @@ export default {
240245 params .redirectUris = params .redirectUrisStr ? .split (' ,' ) || []
241246 delete params[' redirectUrisStr' ]
242247
248+ // 如果clientId为空,则不传递该字段
249+ if (! params .clientId || params .clientId .trim () === ' ' ) {
250+ delete params[' clientId' ]
251+ }
252+
243253 this .$refs .form .validate (valid => {
244254 if (valid) {
245255 applicationApi[method](params).then (() => {
You can’t perform that action at this time.
0 commit comments