style: 优化全局 loading 及 empty 配置

This commit is contained in:
2024-05-21 23:24:01 +08:00
parent 43ac334ba0
commit 7e329fcffa
5 changed files with 36 additions and 29 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
<svg class="force-icon force-icon-loading arco-icon-loading" width="1em" height="1em" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" style="font-size: 40px;"><path fill-rule="evenodd" clip-rule="evenodd" d="M13.7998 5.85002C12.4998 5.45002 11.0998 5.50002 9.79984 6.00002C8.49984 6.50002 7.39984 7.35002 6.64984 8.50002C5.89984 9.65002 5.54984 11 5.59984 12.4C5.64984 13.8 6.19984 15.1 7.09984 16.15C7.99984 17.2 9.19984 17.95 10.5498 18.25C11.8998 18.55 13.2998 18.45 14.5498 17.85C15.4498 17.45 16.4998 17.85 16.8998 18.75C17.2998 19.65 16.8998 20.7 15.9998 21.1C14.0498 21.95 11.8498 22.2 9.74984 21.7C7.64984 21.2 5.74984 20.05 4.34984 18.45C2.99984 16.85 2.14984 14.8 1.99984 12.65C1.89984 10.5 2.44984 8.35002 3.59984 6.55002C4.79984 4.75002 6.49984 3.35002 8.54984 2.65002C10.5498 1.90002 12.7998 1.85002 14.8498 2.45002C16.8998 3.05002 18.7498 4.30002 19.9998 6.00002C21.2998 7.75002 21.9998 9.80002 21.9998 12C21.9998 13 21.1998 13.8 20.1998 13.8C19.1998 13.8 18.3998 13 18.3998 12C18.3998 10.6 17.9498 9.30002 17.1498 8.15002C16.2998 7.05002 15.1498 6.25002 13.7998 5.85002Z" fill="url(#svg_2fc1cd5fdf__paint0_linear_118545_226288)"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M13.7998 5.85002C12.4998 5.45002 11.0998 5.50002 9.79984 6.00002C8.49984 6.50002 7.39984 7.35002 6.64984 8.50002C5.89984 9.65002 5.54984 11 5.59984 12.4C5.64984 13.8 6.19984 15.1 7.09984 16.15C7.99984 17.2 9.19984 17.95 10.5498 18.25C11.8998 18.55 13.2998 18.45 14.5498 17.85C15.4498 17.45 16.4998 17.85 16.8998 18.75C17.2998 19.65 16.8998 20.7 15.9998 21.1C14.0498 21.95 11.8498 22.2 9.74984 21.7C7.64984 21.2 5.74984 20.05 4.34984 18.45C2.99984 16.85 2.14984 14.8 1.99984 12.65C1.89984 10.5 2.44984 8.35002 3.59984 6.55002C4.79984 4.75002 6.49984 3.35002 8.54984 2.65002C10.5498 1.90002 12.7998 1.85002 14.8498 2.45002C16.8998 3.05002 18.7498 4.30002 19.9998 6.00002C21.2998 7.75002 21.9998 9.80002 21.9998 12C21.9998 13 21.1998 13.8 20.1998 13.8C19.1998 13.8 18.3998 13 18.3998 12C18.3998 10.6 17.9498 9.30002 17.1498 8.15002C16.2998 7.05002 15.1498 6.25002 13.7998 5.85002Z" fill="url(#svg_2fc1cd5fdf__paint1_linear_118545_226288)"></path><defs><linearGradient id="svg_2fc1cd5fdf__paint0_linear_118545_226288" x1="13.215" y1="6.907" x2="10.715" y2="16.282" gradientUnits="userSpaceOnUse"><stop stop-color="#1765FF"></stop><stop offset=".031" stop-color="#1765FF" stop-opacity=".969"></stop><stop offset="1" stop-color="#1765FF" stop-opacity="0"></stop></linearGradient><linearGradient id="svg_2fc1cd5fdf__paint1_linear_118545_226288" x1="-.574" y1="9.566" x2="18.802" y2="13.316" gradientUnits="userSpaceOnUse"><stop stop-color="#ADC9FF"></stop><stop offset="1" stop-color="#8AB1FF" stop-opacity="0"></stop></linearGradient></defs></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@@ -144,37 +144,35 @@ onMounted(() => {
</script>
<style lang="scss" scoped>
:deep(.arco-tree-node-title) {
margin-left: 0;
}
:deep(.arco-tree-node-title-text) {
width: 100%;
white-space: nowrap;
}
:deep(.arco-tree-node) {
line-height: normal;
border-radius: var(--border-radius-medium);
&:hover {
background-color: var(--color-secondary-hover);
}
.arco-tree-node-switcher {
width: 0;
margin-right: 0;
}
.arco-tree-node-title {
border-radius: var(--border-radius-medium);
&:hover {
background-color: var(--color-secondary-hover);
background-color: transparent;
}
}
}
:deep(.arco-tree-node-selected) {
.arco-tree-node-title {
font-weight: bold;
background-color: rgba(var(--primary-6), 0.1);
&:hover {
background-color: rgba(var(--primary-6), 0.1);
&:hover {
background-color: rgba(var(--primary-6), 0.1);
}
}
}

View File

@@ -55,7 +55,7 @@
</a-row>
<!-- 文件列表-宫格模式 -->
<a-spin id="fileMain" class="file-main__list" :loading="loading" @scroll="handleScroll">
<a-spin id="fileMain" class="file-main__list" :loading="loading">
<FileGrid v-show="fileList.length && mode === 'grid'" :data="fileList" :is-batch-mode="isBatchMode"
:selected-file-ids="selectedFileIds" @click="handleClickFile" @select="handleSelectFile"
@right-menu-click="handleRightMenuClick"></FileGrid>
@@ -65,7 +65,7 @@
:selected-file-ids="selectedFileIds" @click="handleClickFile" @select="handleSelectFile"
@right-menu-click="handleRightMenuClick"></FileList>
<a-empty v-show="!fileList.length"></a-empty>
<a-empty v-if="!fileList.length" />
</a-spin>
<div class="pagination">
<a-pagination v-bind="pagination" />
@@ -187,19 +187,19 @@ const handleMulDelete = () => {
const handleUpload = (options: RequestOption) => {
const controller = new AbortController()
; (async function requestWrap() {
const { onProgress, onError, onSuccess, fileItem, name = 'file' } = options
onProgress(20)
const formData = new FormData()
formData.append(name as string, fileItem.file as Blob)
try {
const res = await uploadFile(formData)
Message.success('上传成功')
onSuccess(res)
search()
} catch (error) {
onError(error)
}
})()
const { onProgress, onError, onSuccess, fileItem, name = 'file' } = options
onProgress(20)
const formData = new FormData()
formData.append(name as string, fileItem.file as Blob)
try {
const res = await uploadFile(formData)
Message.success('上传成功')
onSuccess(res)
search()
} catch (error) {
onError(error)
}
})()
return {
abort() {
controller.abort()

View File

@@ -185,6 +185,7 @@ onMounted(() => {
}
:deep(.arco-tree-node-selected) {
font-weight: bold;
background-color: rgba(var(--primary-6), 0.1);
&:hover {
background-color: rgba(var(--primary-6), 0.1);