A loading

This commit is contained in:
zhenorzz 2021-04-30 14:42:26 +08:00
parent a31202e8fd
commit b3f9088758
4 changed files with 13 additions and 8 deletions

View File

@ -191,7 +191,7 @@
<el-button slot="reference" icon="el-icon-notebook-2" style="width: 220px;">Filter({{ previewFilterlength }})</el-button>
</el-popover>
<el-button type="warning" icon="el-icon-refresh" @click="refreshSearchPreviewCondition" />
<el-button type="primary" icon="el-icon-search" style="margin-left: 2px;" @click="searchPreviewList" />
<el-button :loading="searchPreview.loading" type="primary" icon="el-icon-search" style="margin-left: 2px;" @click="searchPreviewList" />
</el-row>
<el-radio-group v-model="publishToken" @change="handleTraceChange">
<el-row v-for="(item, index) in gitTraceList" :key="index">

View File

@ -100,7 +100,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-row type="flex" justify="space-between">
<el-button type="success" @click="check">{{ $t('monitorPage.testAppState') }}</el-button>
<el-button :loading="formProps.loading" type="success" @click="check">{{ $t('monitorPage.testAppState') }}</el-button>
<el-row>
<el-button @click="dialogVisible = false">{{ $t('cancel') }}</el-button>
<el-button :disabled="formProps.disabled" type="primary" @click="submit">{{ $t('confirm') }}</el-button>

View File

@ -3,7 +3,7 @@
<el-row class="app-bar" type="flex" justify="space-between">
<el-row>
<el-input v-model="projectName" style="width:200px" placeholder="Filter the project name" />
<el-button type="primary" icon="el-icon-search" @click="searchProjectList" />
<el-button :loading="tableloading" type="primary" icon="el-icon-search" @click="searchProjectList" />
</el-row>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd" />
</el-row>
@ -107,9 +107,9 @@
<el-row type="flex">
<el-input v-model.trim="formData.url" autocomplete="off" placeholder="HTTPS、HTTP、SSH" @change="formProps.branch = []" />
<el-button
:icon="formProps.lsBranchLoading ? 'el-icon-loading' : 'el-icon-view'"
:icon="'el-icon-view'"
type="success"
:disabled="formProps.lsBranchLoading"
:loading="formProps.lsBranchLoading"
@click="getRemoteBranchList"
>{{ $t('projectPage.testConnection') }}</el-button>
</el-row>
@ -142,9 +142,9 @@
/>
</el-select>
<el-button
:icon="formProps.lsBranchLoading ? 'el-icon-loading' : 'el-icon-search'"
:icon="'el-icon-search'"
type="success"
:disabled="formProps.lsBranchLoading"
:loading="formProps.lsBranchLoading"
@click="getRemoteBranchList"
>{{ $t('projectPage.lishBranch') }}</el-button>
</el-row>

View File

@ -68,6 +68,7 @@
<el-button
:icon="'el-icon-copy-document'"
type="success"
:loading="formProps.copyPubLoading"
:disabled="formData.path===''"
@click="getPublicKey"
>{{ $t('serverPage.copyPub') }}</el-button>
@ -86,7 +87,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-row type="flex" justify="space-between">
<el-button type="success" @click="check">{{ $t('serverPage.testConnection') }}</el-button>
<el-button :loading="formProps.loading" type="success" @click="check">{{ $t('serverPage.testConnection') }}</el-button>
<el-row>
<el-button @click="dialogVisible = false">{{ $t('cancel') }}</el-button>
<el-button :disabled="formProps.disabled" type="primary" @click="submit">{{ $t('confirm') }}</el-button>
@ -138,6 +139,7 @@ export default {
tempFormData: {},
formProps: {
loading: false,
copyPubLoading: false,
disabled: false
},
formData: {
@ -200,8 +202,11 @@ export default {
},
getPublicKey() {
this.formProps.copyPubLoading = true
getPublicKey(this.formData.path).then((response) => {
this.copy(response.data, this.$t('serverPage.copyPubTips'))
}).finally(() => {
this.formProps.copyPubLoading = false
})
},