Update hailo style (#218)
This commit is contained in:
1 parent
33a3004f0c
commit
3fcd661da4
6 files changed
+84
-57
No files matched your search
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"type": "patch",
|
||||||
|
"comment": "update hailuo style",
|
||||||
|
"packageName": "@acedatacloud/nexior",
|
||||||
|
"email": "cqc@cuiqingcai.com",
|
||||||
|
"dependentChangeType": "patch"
|
||||||
|
}
|
||||||
@@ -1,26 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="field">
|
<div class="relative">
|
||||||
<h2 class="title font-bold">{{ $t('hailuo.name.startImageUrl') }}</h2>
|
<div class="flex justify-between">
|
||||||
<div class="upload-wrapper">
|
<div class="flex justify-start items-center">
|
||||||
<el-upload
|
<span class="text-sm font-bold">{{ $t('hailuo.name.startImageUrl') }}</span>
|
||||||
v-model:file-list="fileList"
|
<info-icon :content="$t('hailuo.description.startImageUrl')" class="info" />
|
||||||
accept=".png,.jpg,.jpeg,.gif,.bmp,.webp"
|
</div>
|
||||||
name="file"
|
|
||||||
class="value"
|
|
||||||
:show-file-list="true"
|
|
||||||
:limit="1"
|
|
||||||
:multiple="false"
|
|
||||||
:action="uploadUrl"
|
|
||||||
:on-exceed="onExceed"
|
|
||||||
:on-error="onError"
|
|
||||||
:on-remove="onRemove"
|
|
||||||
:on-success="onSuccess"
|
|
||||||
:headers="headers"
|
|
||||||
>
|
|
||||||
<el-button size="small" type="primary" round>{{ $t('hailuo.button.uploadStartImageUrl') }}</el-button>
|
|
||||||
</el-upload>
|
|
||||||
</div>
|
</div>
|
||||||
<info-icon :content="$t('hailuo.description.startImageUrl')" class="info" />
|
<el-upload
|
||||||
|
v-model:file-list="fileList"
|
||||||
|
accept=".png,.jpg,.jpeg,.gif,.bmp,.webp"
|
||||||
|
name="file"
|
||||||
|
class="upload-wrapper"
|
||||||
|
:show-file-list="true"
|
||||||
|
:limit="1"
|
||||||
|
:multiple="false"
|
||||||
|
list-type="picture"
|
||||||
|
:action="uploadUrl"
|
||||||
|
:on-exceed="onExceed"
|
||||||
|
:on-error="onError"
|
||||||
|
:on-remove="onRemove"
|
||||||
|
:on-success="onSuccess"
|
||||||
|
:headers="headers"
|
||||||
|
>
|
||||||
|
<template #file="{ file }">
|
||||||
|
<image-preview
|
||||||
|
:url="file.url || file.response?.file_url"
|
||||||
|
:name="file.name"
|
||||||
|
:percentage="file.percentage"
|
||||||
|
@remove="fileList.splice(fileList.indexOf(file), 1)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<el-button size="small" type="primary" class="btn btn-upload" round>{{
|
||||||
|
$t('hailuo.button.uploadStartImageUrl')
|
||||||
|
}}</el-button>
|
||||||
|
</el-upload>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -29,6 +42,8 @@ import { defineComponent } from 'vue';
|
|||||||
import { ElButton, ElUpload, ElMessage, UploadFiles } from 'element-plus';
|
import { ElButton, ElUpload, ElMessage, UploadFiles } from 'element-plus';
|
||||||
import { getBaseUrlPlatform } from '@/utils';
|
import { getBaseUrlPlatform } from '@/utils';
|
||||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||||
|
import ImagePreview from '@/components/common/ImagePreview.vue';
|
||||||
|
|
||||||
export const DEFAULT_CONTENT = '';
|
export const DEFAULT_CONTENT = '';
|
||||||
|
|
||||||
interface IData {
|
interface IData {
|
||||||
@@ -41,7 +56,8 @@ export default defineComponent({
|
|||||||
components: {
|
components: {
|
||||||
ElUpload,
|
ElUpload,
|
||||||
ElButton,
|
ElButton,
|
||||||
InfoIcon
|
InfoIcon,
|
||||||
|
ImagePreview
|
||||||
},
|
},
|
||||||
data(): IData {
|
data(): IData {
|
||||||
return {
|
return {
|
||||||
@@ -103,25 +119,14 @@ export default defineComponent({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.field {
|
.title {
|
||||||
display: flex;
|
font-size: 14px;
|
||||||
flex-direction: row;
|
margin-bottom: 0;
|
||||||
align-items: center;
|
width: 30%;
|
||||||
justify-content: space-between; // Distribute space evenly
|
}
|
||||||
.title {
|
.btn.btn-upload {
|
||||||
font-size: 14px;
|
position: absolute;
|
||||||
margin: 0;
|
top: 5px;
|
||||||
width: 30%;
|
right: 0;
|
||||||
}
|
|
||||||
.value {
|
|
||||||
flex: 1;
|
|
||||||
margin-left: 60px; // Adjust this value as needed
|
|
||||||
}
|
|
||||||
.upload-wrapper {
|
|
||||||
transform: translate(-26px, 5px); // Move left and down
|
|
||||||
}
|
|
||||||
.info {
|
|
||||||
margin-left: auto; // Pushes the info icon to the right
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
<model-selector class="mb-4" />
|
<model-selector class="mb-4" />
|
||||||
<mode-selector class="mb-4" />
|
<mode-selector class="mb-4" />
|
||||||
<ratio-selector class="mb-4" />
|
<ratio-selector class="mb-4" />
|
||||||
<start-image class="mb-4" />
|
<start-image class="mb-2" />
|
||||||
<end-image class="mb-4" />
|
<end-image class="mb-2" />
|
||||||
<cfg-scale-selector class="mb-4" />
|
<cfg-scale-selector class="mb-4" />
|
||||||
<duration-selector class="mb-4" />
|
<duration-selector class="mb-4" />
|
||||||
<negative-prompt-input class="mb-4" />
|
<negative-prompt-input class="mb-4" />
|
||||||
|
|||||||
@@ -19,6 +19,14 @@
|
|||||||
:on-success="onSuccess"
|
:on-success="onSuccess"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
>
|
>
|
||||||
|
<template #file="{ file }">
|
||||||
|
<image-preview
|
||||||
|
:url="file.url || file.response?.file_url"
|
||||||
|
:name="file.name"
|
||||||
|
:percentage="file.percentage"
|
||||||
|
@remove="fileList.splice(fileList.indexOf(file), 1)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<el-button round type="primary" size="small" class="btn btn-upload">
|
<el-button round type="primary" size="small" class="btn btn-upload">
|
||||||
<font-awesome-icon icon="fa-solid fa-upload" class="icon mr-1" />
|
<font-awesome-icon icon="fa-solid fa-upload" class="icon mr-1" />
|
||||||
{{ $t('kling.button.uploadReferences') }}
|
{{ $t('kling.button.uploadReferences') }}
|
||||||
@@ -33,6 +41,7 @@ import { ElUpload, ElButton, UploadFiles, UploadFile, ElMessage } from 'element-
|
|||||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||||
import { getBaseUrlPlatform } from '@/utils';
|
import { getBaseUrlPlatform } from '@/utils';
|
||||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||||
|
import ImagePreview from '@/components/common/ImagePreview.vue';
|
||||||
|
|
||||||
interface IData {
|
interface IData {
|
||||||
fileList: UploadFiles;
|
fileList: UploadFiles;
|
||||||
@@ -44,6 +53,7 @@ export default defineComponent({
|
|||||||
components: {
|
components: {
|
||||||
ElUpload,
|
ElUpload,
|
||||||
ElButton,
|
ElButton,
|
||||||
|
ImagePreview,
|
||||||
InfoIcon,
|
InfoIcon,
|
||||||
FontAwesomeIcon
|
FontAwesomeIcon
|
||||||
},
|
},
|
||||||
@@ -114,14 +124,3 @@ export default defineComponent({
|
|||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.upload-wrapper {
|
|
||||||
height: auto;
|
|
||||||
display: flex;
|
|
||||||
.el-upload-list {
|
|
||||||
margin: 0;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -19,6 +19,14 @@
|
|||||||
:on-success="onSuccess"
|
:on-success="onSuccess"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
>
|
>
|
||||||
|
<template #file="{ file }">
|
||||||
|
<image-preview
|
||||||
|
:url="file.url || file.response?.file_url"
|
||||||
|
:name="file.name"
|
||||||
|
:percentage="file.percentage"
|
||||||
|
@remove="fileList.splice(fileList.indexOf(file), 1)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<el-button round type="primary" size="small" class="btn btn-upload">
|
<el-button round type="primary" size="small" class="btn btn-upload">
|
||||||
<font-awesome-icon icon="fa-solid fa-upload" class="icon mr-1" />
|
<font-awesome-icon icon="fa-solid fa-upload" class="icon mr-1" />
|
||||||
{{ $t('kling.button.uploadReferences') }}
|
{{ $t('kling.button.uploadReferences') }}
|
||||||
@@ -33,6 +41,7 @@ import { ElUpload, ElButton, UploadFiles, UploadFile, ElMessage } from 'element-
|
|||||||
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
||||||
import { getBaseUrlPlatform } from '@/utils';
|
import { getBaseUrlPlatform } from '@/utils';
|
||||||
import InfoIcon from '@/components/common/InfoIcon.vue';
|
import InfoIcon from '@/components/common/InfoIcon.vue';
|
||||||
|
import ImagePreview from '@/components/common/ImagePreview.vue';
|
||||||
|
|
||||||
interface IData {
|
interface IData {
|
||||||
fileList: UploadFiles;
|
fileList: UploadFiles;
|
||||||
@@ -45,7 +54,8 @@ export default defineComponent({
|
|||||||
ElUpload,
|
ElUpload,
|
||||||
ElButton,
|
ElButton,
|
||||||
InfoIcon,
|
InfoIcon,
|
||||||
FontAwesomeIcon
|
FontAwesomeIcon,
|
||||||
|
ImagePreview
|
||||||
},
|
},
|
||||||
emits: ['change'],
|
emits: ['change'],
|
||||||
data(): IData {
|
data(): IData {
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
{{ modelValue?.response?.error?.message }}
|
{{ modelValue?.response?.error?.message }}
|
||||||
<copy-to-clipboard :content="modelValue?.response?.error?.message!" class="btn-copy" />
|
<copy-to-clipboard :content="modelValue?.response?.error?.message!" class="btn-copy" />
|
||||||
</p>
|
</p>
|
||||||
<p class="description">
|
<p v-if="modelValue?.response?.trace_id" class="description">
|
||||||
<font-awesome-icon icon="fa-solid fa-hashtag" class="mr-1" />
|
<font-awesome-icon icon="fa-solid fa-hashtag" class="mr-1" />
|
||||||
{{ $t('kling.name.traceId') }}:
|
{{ $t('kling.name.traceId') }}:
|
||||||
{{ modelValue?.response?.trace_id }}
|
{{ modelValue?.response?.trace_id }}
|
||||||
@@ -99,6 +99,12 @@
|
|||||||
{{ modelValue?.id }}
|
{{ modelValue?.id }}
|
||||||
<copy-to-clipboard :content="modelValue?.id!" class="btn-copy" />
|
<copy-to-clipboard :content="modelValue?.id!" class="btn-copy" />
|
||||||
</p>
|
</p>
|
||||||
|
<p v-if="modelValue?.response?.trace_id" class="description">
|
||||||
|
<font-awesome-icon icon="fa-solid fa-hashtag" class="mr-1" />
|
||||||
|
{{ $t('kling.name.traceId') }}:
|
||||||
|
{{ modelValue?.response?.trace_id }}
|
||||||
|
<copy-to-clipboard :content="modelValue?.response?.trace_id" class="btn-copy" />
|
||||||
|
</p>
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in new issue
Block a user