9090 <template #footer >
9191 <div >
9292 <el-button @click =" closeDrawer" >{{ $t('common.cancel') }}</el-button >
93- <el-button type =" primary" @click =" submit" :disabled =" loading"
94- > {{ $t('common.save') }}
93+ <el-button type =" primary" @click =" submit" :disabled =" loading" >
94+ {{ $t('common.save') }}
9595 </el-button >
9696 </div >
9797 </template >
@@ -107,11 +107,13 @@ import { MsgError, MsgSuccess } from '@/utils/message'
107107import { copyClick } from ' @/utils/clipboard'
108108import { t } from ' @/locales'
109109
110+ type PlatformType = ' wechat' | ' dingtalk' | ' wecom' | ' feishu' | ' slack'
111+
110112const formRef = ref <FormInstance >()
111113const visible = ref (false )
112114const loading = ref (false )
113115const dataLoaded = ref (false )
114- const configType = ref <' wechat ' | ' dingtalk ' | ' wecom ' | ' feishu ' >(' wechat' )
116+ const configType = ref <PlatformType >(' wechat' )
115117const route = useRoute ()
116118const emit = defineEmits ([' refresh' ])
117119const {
@@ -137,7 +139,7 @@ const form = reactive<any>({
137139 callback_url: ' '
138140 },
139141 feishu: { app_id: ' ' , app_secret: ' ' , verification_token: ' ' , callback_url: ' ' },
140- slack: { signing_secret: ' ' , bot_user_token: ' ' , callback_url: ' ' }
142+ slack: { signing_secret: ' ' , bot_user_token: ' ' , callback_url: ' ' }
141143})
142144
143145const rules = reactive <{ [propName : string ]: any }>({
@@ -306,16 +308,23 @@ const configFields: { [propName: string]: { [propName: string]: any } } = {
306308 }
307309}
308310
309- const passwordFields = new Set ([' app_secret' , ' client_secret' , ' secret' ])
311+ const passwordFields = new Set ([
312+ ' app_secret' ,
313+ ' client_secret' ,
314+ ' secret' ,
315+ ' bot_user_token' ,
316+ ' signing_secret'
317+ ])
310318
311319const drawerTitle = computed (
312320 () =>
313321 ({
314322 wechat: t (' views.application.applicationAccess.wechatSetting.title' ),
315323 dingtalk: t (' views.application.applicationAccess.dingtalkSetting.title' ),
316324 wecom: t (' views.application.applicationAccess.wecomSetting.title' ),
317- feishu: t (' views.application.applicationAccess.larkSetting.title' )
318- })[configType .value ]
325+ feishu: t (' views.application.applicationAccess.larkSetting.title' ),
326+ slack: t (' views.application.applicationAccess.slackSetting.title' )
327+ }[configType .value ])
319328)
320329
321330const infoTitle = computed (
@@ -324,8 +333,9 @@ const infoTitle = computed(
324333 wechat: t (' views.applicationOverview.appInfo.header' ),
325334 dingtalk: t (' views.applicationOverview.appInfo.header' ),
326335 wecom: t (' views.applicationOverview.appInfo.header' ),
327- feishu: t (' views.applicationOverview.appInfo.header' )
328- })[configType .value ]
336+ feishu: t (' views.applicationOverview.appInfo.header' ),
337+ slack: t (' views.applicationOverview.appInfo.header' )
338+ }[configType .value ])
329339)
330340
331341const passwordVisible = reactive <Record <string , boolean >>(
@@ -366,7 +376,7 @@ const submit = async () => {
366376 })
367377}
368378
369- const open = async (id : string , type : ' wechat ' | ' dingtalk ' | ' wecom ' | ' feishu ' ) => {
379+ const open = async (id : string , type : PlatformType ) => {
370380 visible .value = true
371381 configType .value = type
372382 loading .value = true
@@ -388,5 +398,3 @@ const open = async (id: string, type: 'wechat' | 'dingtalk' | 'wecom' | 'feishu'
388398
389399defineExpose ({ open })
390400 </script >
391-
392- <style lang="scss"></style >
0 commit comments