5050 <template #default =" { row } " >
5151 <div v-if =" row.is_active" class =" flex align-center" >
5252 <el-icon class =" color-success mr-8" style =" font-size : 16px " >
53- <SuccessFilled />
53+ <SuccessFilled />
5454 </el-icon >
5555 <span class =" color-text-primary" >
5656 {{ $t('common.status.enabled') }}
100100 <el-table-column :label =" $t('common.operation')" align =" left" width =" 130" >
101101 <template #default =" { row } " >
102102 <span @click.stop >
103- <el-switch size =" small" v-model =" row.is_active" @change =" changeState($event, row)" />
103+ <el-switch size =" small" v-model =" row.is_active" @change =" changeState($event, row)" />
104104 </span >
105- <el-divider direction =" vertical" />
105+ <el-divider direction =" vertical" />
106106 <span class =" mr-4" >
107107 <el-tooltip effect =" dark" :content =" $t('common.setting')" placement =" top" >
108108 <el-button type =" primary" text @click.stop =" settingApiKey(row)" >
118118 </template >
119119 </el-table-column >
120120 </app-table >
121- <SettingAPIKeyDialog ref =" SettingAPIKeyDialogRef" @refresh =" refresh" />
121+ <SettingAPIKeyDialog ref =" SettingAPIKeyDialogRef" @refresh =" refresh" />
122122 </el-dialog >
123123</template >
124124<script setup lang="ts">
125- import { ref , watch , reactive } from ' vue'
126- import { useRoute } from ' vue-router'
127- import { copyClick } from ' @/utils/clipboard'
125+ import {ref , watch , reactive } from ' vue'
126+ import {useRoute } from ' vue-router'
127+ import {copyClick } from ' @/utils/clipboard'
128128import systemKeyApi from ' @/api/system/api-key'
129- import { datetimeFormat } from ' @/utils/time'
130- import { MsgSuccess , MsgConfirm } from ' @/utils/message'
131- import { t } from ' @/locales'
129+ import {datetimeFormat } from ' @/utils/time'
130+ import {MsgSuccess , MsgConfirm } from ' @/utils/message'
131+ import {t } from ' @/locales'
132132import SettingAPIKeyDialog from ' @/views/application-overview/component/SettingAPIKeyDrawer.vue'
133- import { fromNowDate } from ' @/utils/time'
133+ import {fromNowDate } from ' @/utils/time'
134134
135135const route = useRoute ()
136136const {
137- params : { id },
137+ params : {id },
138138} = route
139139
140140const props = defineProps ({
@@ -189,7 +189,8 @@ function deleteApiKey(row: any) {
189189 getApiKeyList ()
190190 })
191191 })
192- .catch (() => {})
192+ .catch (() => {
193+ })
193194}
194195
195196function changeState(bool : boolean , row : any ) {
@@ -205,6 +206,7 @@ function changeState(bool: boolean, row: any) {
205206
206207function createApiKey() {
207208 systemKeyApi .postAPIKey (loading ).then ((res ) => {
209+ MsgSuccess (t (' common.createSuccess' ))
208210 getApiKeyList ()
209211 })
210212}
@@ -235,7 +237,7 @@ function getExpiryClass(expireTime: any) {
235237 }
236238}
237239
238- function handleSortChange({ prop , order }: { prop: string ; order: string }) {
240+ function handleSortChange({prop , order }: { prop: string ; order: string }) {
239241 orderBy .value = order === ' ascending' ? prop : ` -${prop } `
240242 getApiKeyList ()
241243}
@@ -244,7 +246,7 @@ function refresh() {
244246 getApiKeyList ()
245247}
246248
247- defineExpose ({ open })
249+ defineExpose ({open })
248250 </script >
249251<style lang="scss" scoped>
250252.api-key-container {
0 commit comments