@scx-js/scx-ui 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +44 -44
- package/package.json +29 -29
- package/scx-context-menu/index.css +50 -50
- package/scx-context-menu/index.js +65 -65
- package/scx-context-menu/index.vue +86 -86
- package/scx-drag/index.js +30 -30
- package/scx-group/index.css +65 -65
- package/scx-group/index.vue +154 -154
- package/scx-icon/index.css +3 -3
- package/scx-icon/index.vue +20 -20
- package/scx-input/index.css +39 -39
- package/scx-input/index.vue +44 -44
- package/scx-panel/index.css +47 -47
- package/scx-panel/index.vue +28 -28
- package/scx-panel/scx-panel-item.css +36 -36
- package/scx-panel/scx-panel-item.vue +22 -22
- package/scx-progress/index.css +33 -33
- package/scx-progress/index.vue +29 -29
- package/scx-switch/index.css +109 -109
- package/scx-switch/index.vue +31 -31
- package/scx-upload/helper.js +177 -177
- package/scx-upload/index.css +204 -204
- package/scx-upload/index.vue +235 -235
- package/scx-upload-list/index.css +89 -89
- package/scx-upload-list/index.vue +228 -228
- package/style/changeTheme.js +13 -13
- package/style/dark.css +59 -59
- package/style/default.css +98 -98
- package/style/normalize.css +35 -35
package/scx-upload/index.vue
CHANGED
@@ -1,235 +1,235 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="scx-upload">
|
3
|
-
|
4
|
-
<!-- 隐藏的 input 用于触发点击上传事件 -->
|
5
|
-
<input ref="hiddenInputRef" placeholder="file" style="display: none" type="file" @change="onHiddenInputChange"/>
|
6
|
-
|
7
|
-
<!-- 有文件时预览文件 -->
|
8
|
-
<div v-if="proxyModelValue" class="preview">
|
9
|
-
<!-- 有预览图时显示预览图 -->
|
10
|
-
<img v-if="uploadInfo.previewURL" :src="uploadInfo.previewURL" alt="img" class="preview-image">
|
11
|
-
<!-- 没有预览图但是有文件名时显示文件名 -->
|
12
|
-
<div v-else-if="uploadInfo.fileName" class="preview-text">
|
13
|
-
<div>{{ uploadInfo.fileName }}</div>
|
14
|
-
</div>
|
15
|
-
<!-- 都没有时显示文件 id -->
|
16
|
-
<div v-else class="preview-text">
|
17
|
-
<div>{{ proxyModelValue }}</div>
|
18
|
-
</div>
|
19
|
-
<!-- 操作项 -->
|
20
|
-
<div class="operation">
|
21
|
-
<a :href="uploadInfo.downloadURL" class="item-download">
|
22
|
-
下载
|
23
|
-
</a>
|
24
|
-
<div v-if="!disabled" class="item-replace" @click="selectFile">
|
25
|
-
替换
|
26
|
-
</div>
|
27
|
-
<div v-if="!disabled" class="item-delete" @click="deleteFile">
|
28
|
-
删除
|
29
|
-
</div>
|
30
|
-
</div>
|
31
|
-
</div>
|
32
|
-
|
33
|
-
<!-- 没有文件且允许上传时显示 -->
|
34
|
-
<div v-else-if="!disabled" :class="dragover ?'dragover ':''" class="no-preview" @click="selectFile"
|
35
|
-
@dragleave="callDragleave"
|
36
|
-
@dragover="callDragover" @drop="callDrop">
|
37
|
-
<scx-icon icon="outlined-plus-circle"/>
|
38
|
-
<span>点击或拖拽</span>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<!-- 没有文件且不允许上传时 -->
|
42
|
-
<div v-else class="no-preview">
|
43
|
-
<scx-icon icon="outlined-question"/>
|
44
|
-
<span>无图片</span>
|
45
|
-
</div>
|
46
|
-
|
47
|
-
<img v-if="uploadInfo.progressVisible" :src="uploadInfo.previewURL" alt="img" class="progress-preview">
|
48
|
-
|
49
|
-
<div v-if="uploadInfo.progressVisible" class="progress">
|
50
|
-
<div class="temp-file-name">
|
51
|
-
<div>
|
52
|
-
{{ uploadInfo.fileName }}
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
<div class="progress-state">
|
56
|
-
<div class="progress-state-text">
|
57
|
-
{{ uploadInfo.progressState }}
|
58
|
-
</div>
|
59
|
-
<!-- 以下为进度条 -->
|
60
|
-
<scx-progress v-model="uploadInfo.progressValue"/>
|
61
|
-
</div>
|
62
|
-
|
63
|
-
</div>
|
64
|
-
|
65
|
-
</div>
|
66
|
-
</template>
|
67
|
-
|
68
|
-
<script>
|
69
|
-
import "./index.css";
|
70
|
-
import {computed, reactive, ref, watch} from "vue";
|
71
|
-
import {percentage} from "@scx-js/scx-common";
|
72
|
-
import {ScxFSSHelper, UploadInfo} from "./helper.js";
|
73
|
-
import {useScxFSS} from "@scx-js/scx-app-x";
|
74
|
-
import ScxProgress from "../scx-progress/index.vue";
|
75
|
-
import ScxIcon from "../scx-icon/index.vue";
|
76
|
-
|
77
|
-
export default {
|
78
|
-
name: "scx-upload",
|
79
|
-
components: {
|
80
|
-
ScxProgress,
|
81
|
-
ScxIcon
|
82
|
-
},
|
83
|
-
props: {
|
84
|
-
modelValue: {
|
85
|
-
type: String,
|
86
|
-
default: null
|
87
|
-
},
|
88
|
-
uploadHandler: {
|
89
|
-
type: Function,
|
90
|
-
default: null
|
91
|
-
},
|
92
|
-
fileInfoHandler: {
|
93
|
-
type: Function,
|
94
|
-
default: null
|
95
|
-
},
|
96
|
-
beforeUpload: {
|
97
|
-
type: Function,
|
98
|
-
default: null
|
99
|
-
},
|
100
|
-
onError: {
|
101
|
-
type: Function,
|
102
|
-
default: null
|
103
|
-
},
|
104
|
-
disabled: {
|
105
|
-
type: Boolean,
|
106
|
-
default: false
|
107
|
-
},
|
108
|
-
beforeDelete: {
|
109
|
-
type: Function,
|
110
|
-
default: null
|
111
|
-
}
|
112
|
-
},
|
113
|
-
setup(props, ctx) {
|
114
|
-
const scxFSS = useScxFSS();
|
115
|
-
const scxFSSHelper = new ScxFSSHelper(scxFSS);
|
116
|
-
|
117
|
-
function getFileInfoHandler() {
|
118
|
-
return props.fileInfoHandler ? props.fileInfoHandler : (fileID) => scxFSSHelper.fileInfoHandler(fileID);
|
119
|
-
}
|
120
|
-
|
121
|
-
function getUploadHandler() {
|
122
|
-
return props.uploadHandler ? props.uploadHandler : (needUploadFile, progress) => scxFSSHelper.uploadHandler(needUploadFile, progress);
|
123
|
-
}
|
124
|
-
|
125
|
-
function getOnError() {
|
126
|
-
return props.onError ? props.onError : (error, file) => console.error(error, file);
|
127
|
-
}
|
128
|
-
|
129
|
-
const hiddenInputRef = ref(null);
|
130
|
-
|
131
|
-
function selectFile() {
|
132
|
-
hiddenInputRef.value.click();
|
133
|
-
}
|
134
|
-
|
135
|
-
function onHiddenInputChange(e) {
|
136
|
-
const needUploadFile = e.target.files[0];
|
137
|
-
//重置 上传 input 的值 保证即使点击重复文件也可以上传
|
138
|
-
hiddenInputRef.value.value = null;
|
139
|
-
callUploadHandler(needUploadFile);
|
140
|
-
}
|
141
|
-
|
142
|
-
const proxyModelValue = computed({
|
143
|
-
get() {
|
144
|
-
return props.modelValue;
|
145
|
-
},
|
146
|
-
set(value) {
|
147
|
-
ctx.emit("update:modelValue", value);
|
148
|
-
}
|
149
|
-
});
|
150
|
-
|
151
|
-
async function deleteFile() {
|
152
|
-
if (props.beforeDelete) {
|
153
|
-
const result = await props.beforeDelete(uploadInfo.copy());
|
154
|
-
if (!result) {
|
155
|
-
return;
|
156
|
-
}
|
157
|
-
}
|
158
|
-
proxyModelValue.value = "";
|
159
|
-
}
|
160
|
-
|
161
|
-
const uploadInfo = reactive(new UploadInfo());
|
162
|
-
|
163
|
-
async function callUploadHandler(needUploadFile) {
|
164
|
-
if (props.beforeUpload) {
|
165
|
-
const result = await props.beforeUpload(needUploadFile);
|
166
|
-
if (!result) {
|
167
|
-
return;
|
168
|
-
}
|
169
|
-
}
|
170
|
-
//设定初始值
|
171
|
-
uploadInfo.progressVisible = true;
|
172
|
-
uploadInfo.fileName = needUploadFile.name;
|
173
|
-
uploadInfo.previewURL = URL.createObjectURL(needUploadFile);
|
174
|
-
//上传回调函数
|
175
|
-
const progress = (v, s = "上传中") => {
|
176
|
-
//处理一下百分比的格式防止 33.33333333333339 这种情况出现
|
177
|
-
uploadInfo.progressState = s;
|
178
|
-
uploadInfo.progressValue = percentage(v, 100);
|
179
|
-
};
|
180
|
-
//开始上传
|
181
|
-
try {
|
182
|
-
proxyModelValue.value = await getUploadHandler()(needUploadFile, progress);
|
183
|
-
uploadInfo.progressState = "上传完毕";
|
184
|
-
uploadInfo.progressVisible = false;
|
185
|
-
uploadInfo.progressValue = 0;
|
186
|
-
} catch (e) {
|
187
|
-
getOnError()(e, needUploadFile);
|
188
|
-
uploadInfo.progressState = "上传失败";
|
189
|
-
}
|
190
|
-
}
|
191
|
-
|
192
|
-
function callFileInfoHandler(fileID) {
|
193
|
-
if (fileID) {
|
194
|
-
getFileInfoHandler()(fileID).then(item => uploadInfo.fill(item));
|
195
|
-
} else {
|
196
|
-
uploadInfo.reset();
|
197
|
-
}
|
198
|
-
}
|
199
|
-
|
200
|
-
//我们根据 proxyModelValue 实时更新 fileInfo
|
201
|
-
watch(proxyModelValue, (newVal) => callFileInfoHandler(newVal), {immediate: true});
|
202
|
-
const dragover = ref(false);
|
203
|
-
|
204
|
-
function callDrop(e) {
|
205
|
-
e.preventDefault();
|
206
|
-
dragover.value = false;
|
207
|
-
const needUploadFile = e.dataTransfer.files[0];
|
208
|
-
callUploadHandler(needUploadFile);
|
209
|
-
}
|
210
|
-
|
211
|
-
function callDragover(e) {
|
212
|
-
e.preventDefault();
|
213
|
-
dragover.value = true;
|
214
|
-
}
|
215
|
-
|
216
|
-
function callDragleave(e) {
|
217
|
-
e.preventDefault();
|
218
|
-
dragover.value = false;
|
219
|
-
}
|
220
|
-
|
221
|
-
return {
|
222
|
-
hiddenInputRef,
|
223
|
-
proxyModelValue,
|
224
|
-
uploadInfo,
|
225
|
-
dragover,
|
226
|
-
onHiddenInputChange,
|
227
|
-
selectFile,
|
228
|
-
deleteFile,
|
229
|
-
callDrop,
|
230
|
-
callDragover,
|
231
|
-
callDragleave
|
232
|
-
};
|
233
|
-
}
|
234
|
-
};
|
235
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div class="scx-upload">
|
3
|
+
|
4
|
+
<!-- 隐藏的 input 用于触发点击上传事件 -->
|
5
|
+
<input ref="hiddenInputRef" placeholder="file" style="display: none" type="file" @change="onHiddenInputChange"/>
|
6
|
+
|
7
|
+
<!-- 有文件时预览文件 -->
|
8
|
+
<div v-if="proxyModelValue" class="preview">
|
9
|
+
<!-- 有预览图时显示预览图 -->
|
10
|
+
<img v-if="uploadInfo.previewURL" :src="uploadInfo.previewURL" alt="img" class="preview-image">
|
11
|
+
<!-- 没有预览图但是有文件名时显示文件名 -->
|
12
|
+
<div v-else-if="uploadInfo.fileName" class="preview-text">
|
13
|
+
<div>{{ uploadInfo.fileName }}</div>
|
14
|
+
</div>
|
15
|
+
<!-- 都没有时显示文件 id -->
|
16
|
+
<div v-else class="preview-text">
|
17
|
+
<div>{{ proxyModelValue }}</div>
|
18
|
+
</div>
|
19
|
+
<!-- 操作项 -->
|
20
|
+
<div class="operation">
|
21
|
+
<a :href="uploadInfo.downloadURL" class="item-download">
|
22
|
+
下载
|
23
|
+
</a>
|
24
|
+
<div v-if="!disabled" class="item-replace" @click="selectFile">
|
25
|
+
替换
|
26
|
+
</div>
|
27
|
+
<div v-if="!disabled" class="item-delete" @click="deleteFile">
|
28
|
+
删除
|
29
|
+
</div>
|
30
|
+
</div>
|
31
|
+
</div>
|
32
|
+
|
33
|
+
<!-- 没有文件且允许上传时显示 -->
|
34
|
+
<div v-else-if="!disabled" :class="dragover ?'dragover ':''" class="no-preview" @click="selectFile"
|
35
|
+
@dragleave="callDragleave"
|
36
|
+
@dragover="callDragover" @drop="callDrop">
|
37
|
+
<scx-icon icon="outlined-plus-circle"/>
|
38
|
+
<span>点击或拖拽</span>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<!-- 没有文件且不允许上传时 -->
|
42
|
+
<div v-else class="no-preview">
|
43
|
+
<scx-icon icon="outlined-question"/>
|
44
|
+
<span>无图片</span>
|
45
|
+
</div>
|
46
|
+
|
47
|
+
<img v-if="uploadInfo.progressVisible" :src="uploadInfo.previewURL" alt="img" class="progress-preview">
|
48
|
+
|
49
|
+
<div v-if="uploadInfo.progressVisible" class="progress">
|
50
|
+
<div class="temp-file-name">
|
51
|
+
<div>
|
52
|
+
{{ uploadInfo.fileName }}
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
<div class="progress-state">
|
56
|
+
<div class="progress-state-text">
|
57
|
+
{{ uploadInfo.progressState }}
|
58
|
+
</div>
|
59
|
+
<!-- 以下为进度条 -->
|
60
|
+
<scx-progress v-model="uploadInfo.progressValue"/>
|
61
|
+
</div>
|
62
|
+
|
63
|
+
</div>
|
64
|
+
|
65
|
+
</div>
|
66
|
+
</template>
|
67
|
+
|
68
|
+
<script>
|
69
|
+
import "./index.css";
|
70
|
+
import {computed, reactive, ref, watch} from "vue";
|
71
|
+
import {percentage} from "@scx-js/scx-common";
|
72
|
+
import {ScxFSSHelper, UploadInfo} from "./helper.js";
|
73
|
+
import {useScxFSS} from "@scx-js/scx-app-x";
|
74
|
+
import ScxProgress from "../scx-progress/index.vue";
|
75
|
+
import ScxIcon from "../scx-icon/index.vue";
|
76
|
+
|
77
|
+
export default {
|
78
|
+
name: "scx-upload",
|
79
|
+
components: {
|
80
|
+
ScxProgress,
|
81
|
+
ScxIcon
|
82
|
+
},
|
83
|
+
props: {
|
84
|
+
modelValue: {
|
85
|
+
type: String,
|
86
|
+
default: null
|
87
|
+
},
|
88
|
+
uploadHandler: {
|
89
|
+
type: Function,
|
90
|
+
default: null
|
91
|
+
},
|
92
|
+
fileInfoHandler: {
|
93
|
+
type: Function,
|
94
|
+
default: null
|
95
|
+
},
|
96
|
+
beforeUpload: {
|
97
|
+
type: Function,
|
98
|
+
default: null
|
99
|
+
},
|
100
|
+
onError: {
|
101
|
+
type: Function,
|
102
|
+
default: null
|
103
|
+
},
|
104
|
+
disabled: {
|
105
|
+
type: Boolean,
|
106
|
+
default: false
|
107
|
+
},
|
108
|
+
beforeDelete: {
|
109
|
+
type: Function,
|
110
|
+
default: null
|
111
|
+
}
|
112
|
+
},
|
113
|
+
setup(props, ctx) {
|
114
|
+
const scxFSS = useScxFSS();
|
115
|
+
const scxFSSHelper = new ScxFSSHelper(scxFSS);
|
116
|
+
|
117
|
+
function getFileInfoHandler() {
|
118
|
+
return props.fileInfoHandler ? props.fileInfoHandler : (fileID) => scxFSSHelper.fileInfoHandler(fileID);
|
119
|
+
}
|
120
|
+
|
121
|
+
function getUploadHandler() {
|
122
|
+
return props.uploadHandler ? props.uploadHandler : (needUploadFile, progress) => scxFSSHelper.uploadHandler(needUploadFile, progress);
|
123
|
+
}
|
124
|
+
|
125
|
+
function getOnError() {
|
126
|
+
return props.onError ? props.onError : (error, file) => console.error(error, file);
|
127
|
+
}
|
128
|
+
|
129
|
+
const hiddenInputRef = ref(null);
|
130
|
+
|
131
|
+
function selectFile() {
|
132
|
+
hiddenInputRef.value.click();
|
133
|
+
}
|
134
|
+
|
135
|
+
function onHiddenInputChange(e) {
|
136
|
+
const needUploadFile = e.target.files[0];
|
137
|
+
//重置 上传 input 的值 保证即使点击重复文件也可以上传
|
138
|
+
hiddenInputRef.value.value = null;
|
139
|
+
callUploadHandler(needUploadFile);
|
140
|
+
}
|
141
|
+
|
142
|
+
const proxyModelValue = computed({
|
143
|
+
get() {
|
144
|
+
return props.modelValue;
|
145
|
+
},
|
146
|
+
set(value) {
|
147
|
+
ctx.emit("update:modelValue", value);
|
148
|
+
}
|
149
|
+
});
|
150
|
+
|
151
|
+
async function deleteFile() {
|
152
|
+
if (props.beforeDelete) {
|
153
|
+
const result = await props.beforeDelete(uploadInfo.copy());
|
154
|
+
if (!result) {
|
155
|
+
return;
|
156
|
+
}
|
157
|
+
}
|
158
|
+
proxyModelValue.value = "";
|
159
|
+
}
|
160
|
+
|
161
|
+
const uploadInfo = reactive(new UploadInfo());
|
162
|
+
|
163
|
+
async function callUploadHandler(needUploadFile) {
|
164
|
+
if (props.beforeUpload) {
|
165
|
+
const result = await props.beforeUpload(needUploadFile);
|
166
|
+
if (!result) {
|
167
|
+
return;
|
168
|
+
}
|
169
|
+
}
|
170
|
+
//设定初始值
|
171
|
+
uploadInfo.progressVisible = true;
|
172
|
+
uploadInfo.fileName = needUploadFile.name;
|
173
|
+
uploadInfo.previewURL = URL.createObjectURL(needUploadFile);
|
174
|
+
//上传回调函数
|
175
|
+
const progress = (v, s = "上传中") => {
|
176
|
+
//处理一下百分比的格式防止 33.33333333333339 这种情况出现
|
177
|
+
uploadInfo.progressState = s;
|
178
|
+
uploadInfo.progressValue = percentage(v, 100);
|
179
|
+
};
|
180
|
+
//开始上传
|
181
|
+
try {
|
182
|
+
proxyModelValue.value = await getUploadHandler()(needUploadFile, progress);
|
183
|
+
uploadInfo.progressState = "上传完毕";
|
184
|
+
uploadInfo.progressVisible = false;
|
185
|
+
uploadInfo.progressValue = 0;
|
186
|
+
} catch (e) {
|
187
|
+
getOnError()(e, needUploadFile);
|
188
|
+
uploadInfo.progressState = "上传失败";
|
189
|
+
}
|
190
|
+
}
|
191
|
+
|
192
|
+
function callFileInfoHandler(fileID) {
|
193
|
+
if (fileID) {
|
194
|
+
getFileInfoHandler()(fileID).then(item => uploadInfo.fill(item));
|
195
|
+
} else {
|
196
|
+
uploadInfo.reset();
|
197
|
+
}
|
198
|
+
}
|
199
|
+
|
200
|
+
//我们根据 proxyModelValue 实时更新 fileInfo
|
201
|
+
watch(proxyModelValue, (newVal) => callFileInfoHandler(newVal), {immediate: true});
|
202
|
+
const dragover = ref(false);
|
203
|
+
|
204
|
+
function callDrop(e) {
|
205
|
+
e.preventDefault();
|
206
|
+
dragover.value = false;
|
207
|
+
const needUploadFile = e.dataTransfer.files[0];
|
208
|
+
callUploadHandler(needUploadFile);
|
209
|
+
}
|
210
|
+
|
211
|
+
function callDragover(e) {
|
212
|
+
e.preventDefault();
|
213
|
+
dragover.value = true;
|
214
|
+
}
|
215
|
+
|
216
|
+
function callDragleave(e) {
|
217
|
+
e.preventDefault();
|
218
|
+
dragover.value = false;
|
219
|
+
}
|
220
|
+
|
221
|
+
return {
|
222
|
+
hiddenInputRef,
|
223
|
+
proxyModelValue,
|
224
|
+
uploadInfo,
|
225
|
+
dragover,
|
226
|
+
onHiddenInputChange,
|
227
|
+
selectFile,
|
228
|
+
deleteFile,
|
229
|
+
callDrop,
|
230
|
+
callDragover,
|
231
|
+
callDragleave
|
232
|
+
};
|
233
|
+
}
|
234
|
+
};
|
235
|
+
</script>
|
@@ -1,89 +1,89 @@
|
|
1
|
-
.scx-upload-list {
|
2
|
-
width: 100%;
|
3
|
-
}
|
4
|
-
|
5
|
-
.scx-upload-list > .scx-group {
|
6
|
-
padding: 0;
|
7
|
-
}
|
8
|
-
|
9
|
-
.scx-upload-list .scx-group-item {
|
10
|
-
border-radius: 4px;
|
11
|
-
overflow: hidden;
|
12
|
-
border: 1px solid var(--scx-theme);
|
13
|
-
padding: 5px;
|
14
|
-
display: flex;
|
15
|
-
column-gap: 10px;
|
16
|
-
}
|
17
|
-
|
18
|
-
.scx-upload-list .scx-group-item:hover {
|
19
|
-
background: var(--scx-theme-secondary);
|
20
|
-
}
|
21
|
-
|
22
|
-
.scx-upload-list .upload-button {
|
23
|
-
align-self: start;
|
24
|
-
}
|
25
|
-
|
26
|
-
.scx-upload-list .preview-image {
|
27
|
-
height: 60px;
|
28
|
-
width: 60px;
|
29
|
-
flex-shrink: 0;
|
30
|
-
border: 1px solid var(--scx-theme);
|
31
|
-
border-radius: 4px;
|
32
|
-
box-sizing: border-box;
|
33
|
-
}
|
34
|
-
|
35
|
-
.scx-upload-list .preview-text {
|
36
|
-
display: flex;
|
37
|
-
position: relative;
|
38
|
-
width: 100%;
|
39
|
-
flex-direction: column;
|
40
|
-
justify-content: space-between;
|
41
|
-
align-items: flex-start;
|
42
|
-
overflow: hidden;
|
43
|
-
line-height: normal;
|
44
|
-
}
|
45
|
-
|
46
|
-
.scx-upload-list .file-name {
|
47
|
-
max-width: calc(100% - 70px);
|
48
|
-
overflow: hidden;
|
49
|
-
text-overflow: ellipsis;
|
50
|
-
white-space: nowrap;
|
51
|
-
color: var(--scx-theme);
|
52
|
-
font-weight: 600;
|
53
|
-
font-size: 16px;
|
54
|
-
}
|
55
|
-
|
56
|
-
.scx-upload-list .preview-text > a {
|
57
|
-
text-decoration: unset;
|
58
|
-
}
|
59
|
-
|
60
|
-
.scx-upload-list .preview-text > a:hover {
|
61
|
-
text-decoration: underline;
|
62
|
-
}
|
63
|
-
|
64
|
-
.scx-upload-list .progress-state {
|
65
|
-
display: flex;
|
66
|
-
align-items: center;
|
67
|
-
column-gap: 10px;
|
68
|
-
width: 100%;
|
69
|
-
}
|
70
|
-
|
71
|
-
.scx-upload-list .progress-state > .progress-state-text {
|
72
|
-
flex-shrink: 0;
|
73
|
-
font-weight: 600;
|
74
|
-
font-size: 14px;
|
75
|
-
}
|
76
|
-
|
77
|
-
.scx-upload-list .progress-state > .scx-progress {
|
78
|
-
width: 100%;
|
79
|
-
}
|
80
|
-
|
81
|
-
.scx-upload-list .item-info {
|
82
|
-
display: flex;
|
83
|
-
font-weight: 600;
|
84
|
-
font-size: 14px;
|
85
|
-
max-width: 100%;
|
86
|
-
overflow-x: auto;
|
87
|
-
overflow-y: hidden;
|
88
|
-
white-space: nowrap;
|
89
|
-
}
|
1
|
+
.scx-upload-list {
|
2
|
+
width: 100%;
|
3
|
+
}
|
4
|
+
|
5
|
+
.scx-upload-list > .scx-group {
|
6
|
+
padding: 0;
|
7
|
+
}
|
8
|
+
|
9
|
+
.scx-upload-list .scx-group-item {
|
10
|
+
border-radius: 4px;
|
11
|
+
overflow: hidden;
|
12
|
+
border: 1px solid var(--scx-theme);
|
13
|
+
padding: 5px;
|
14
|
+
display: flex;
|
15
|
+
column-gap: 10px;
|
16
|
+
}
|
17
|
+
|
18
|
+
.scx-upload-list .scx-group-item:hover {
|
19
|
+
background: var(--scx-theme-secondary);
|
20
|
+
}
|
21
|
+
|
22
|
+
.scx-upload-list .upload-button {
|
23
|
+
align-self: start;
|
24
|
+
}
|
25
|
+
|
26
|
+
.scx-upload-list .preview-image {
|
27
|
+
height: 60px;
|
28
|
+
width: 60px;
|
29
|
+
flex-shrink: 0;
|
30
|
+
border: 1px solid var(--scx-theme);
|
31
|
+
border-radius: 4px;
|
32
|
+
box-sizing: border-box;
|
33
|
+
}
|
34
|
+
|
35
|
+
.scx-upload-list .preview-text {
|
36
|
+
display: flex;
|
37
|
+
position: relative;
|
38
|
+
width: 100%;
|
39
|
+
flex-direction: column;
|
40
|
+
justify-content: space-between;
|
41
|
+
align-items: flex-start;
|
42
|
+
overflow: hidden;
|
43
|
+
line-height: normal;
|
44
|
+
}
|
45
|
+
|
46
|
+
.scx-upload-list .file-name {
|
47
|
+
max-width: calc(100% - 70px);
|
48
|
+
overflow: hidden;
|
49
|
+
text-overflow: ellipsis;
|
50
|
+
white-space: nowrap;
|
51
|
+
color: var(--scx-theme);
|
52
|
+
font-weight: 600;
|
53
|
+
font-size: 16px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.scx-upload-list .preview-text > a {
|
57
|
+
text-decoration: unset;
|
58
|
+
}
|
59
|
+
|
60
|
+
.scx-upload-list .preview-text > a:hover {
|
61
|
+
text-decoration: underline;
|
62
|
+
}
|
63
|
+
|
64
|
+
.scx-upload-list .progress-state {
|
65
|
+
display: flex;
|
66
|
+
align-items: center;
|
67
|
+
column-gap: 10px;
|
68
|
+
width: 100%;
|
69
|
+
}
|
70
|
+
|
71
|
+
.scx-upload-list .progress-state > .progress-state-text {
|
72
|
+
flex-shrink: 0;
|
73
|
+
font-weight: 600;
|
74
|
+
font-size: 14px;
|
75
|
+
}
|
76
|
+
|
77
|
+
.scx-upload-list .progress-state > .scx-progress {
|
78
|
+
width: 100%;
|
79
|
+
}
|
80
|
+
|
81
|
+
.scx-upload-list .item-info {
|
82
|
+
display: flex;
|
83
|
+
font-weight: 600;
|
84
|
+
font-size: 14px;
|
85
|
+
max-width: 100%;
|
86
|
+
overflow-x: auto;
|
87
|
+
overflow-y: hidden;
|
88
|
+
white-space: nowrap;
|
89
|
+
}
|