mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-13 14:57:14 +08:00
style: 优化全局 loading 及 empty 配置
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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()
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user