Skip to content

Commit 28310e3

Browse files
committed
fix(ui): keep button text centered when loading
1 parent 0440815 commit 28310e3

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/views/home/SubTable.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<input class="form-control" placeholder="点击获取短链" v-model.trim="result.shortUrl" />
9595
</div>
9696
<div class="col-12 col-md-2">
97-
<el-button type="primary" :loading="isShortUrlLoading" @click="getShortUrl()" style="width: 100%">短链</el-button>
97+
<el-button type="primary" :loading="isShortUrlLoading" @click="getShortUrl()" style="width: 100%" class="short-url-btn">短链</el-button>
9898
</div>
9999
</div>
100100
</div>
@@ -349,4 +349,16 @@ export default {
349349
.dark-style .form-control::placeholder {
350350
color: #5c617a;
351351
}
352+
353+
/* Fix button text shifting on loading */
354+
.short-url-btn {
355+
position: relative;
356+
}
357+
.short-url-btn :deep(.el-icon.is-loading) {
358+
position: absolute;
359+
left: 15px;
360+
top: 50%;
361+
transform: translateY(-50%);
362+
margin-right: 0 !important;
363+
}
352364
</style>

0 commit comments

Comments
 (0)