处理修复BUG
This commit is contained in:
@@ -50,6 +50,16 @@
|
||||
<div v-if="fileName" class="ai-asset-dropzone__footer">
|
||||
<span class="ai-asset-dropzone__filename">{{ fileName }}</span>
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
v-if="allowUrl"
|
||||
:model-value="sourceUrl"
|
||||
class="ai-asset-dropzone__url"
|
||||
clearable
|
||||
:placeholder="urlPlaceholder"
|
||||
@change="(value) => $emit('url-change', value)"
|
||||
@clear="$emit('url-change', '')"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -66,6 +76,9 @@ withDefaults(
|
||||
fileName?: string
|
||||
previewUrl?: string
|
||||
previewKind?: 'image' | 'video' | 'file'
|
||||
allowUrl?: boolean
|
||||
sourceUrl?: string
|
||||
urlPlaceholder?: string
|
||||
}>(),
|
||||
{
|
||||
description: '',
|
||||
@@ -75,12 +88,16 @@ withDefaults(
|
||||
fileName: '',
|
||||
previewUrl: '',
|
||||
previewKind: 'file',
|
||||
allowUrl: false,
|
||||
sourceUrl: '',
|
||||
urlPlaceholder: '也可以粘贴视频在线链接',
|
||||
},
|
||||
)
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'select', file: File): void
|
||||
(event: 'clear'): void
|
||||
(event: 'url-change', value: string): void
|
||||
}>()
|
||||
|
||||
function handleChange(uploadFile: UploadFile, _files: UploadFiles) {
|
||||
@@ -189,4 +206,13 @@ function handleChange(uploadFile: UploadFile, _files: UploadFiles) {
|
||||
font-size: 12px;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.ai-asset-dropzone__url {
|
||||
--el-input-bg-color: #171717;
|
||||
--el-input-border-color: #383838;
|
||||
--el-input-hover-border-color: #5a5a5a;
|
||||
--el-input-focus-border-color: #8c63ff;
|
||||
--el-input-text-color: #f2f2f2;
|
||||
--el-input-placeholder-color: #777;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user