适配深色模式、生成动画的文件chatloading改为generateLoading
This commit is contained in:
@@ -3,38 +3,47 @@ import { onMounted, onUnmounted, reactive, toRefs } from "vue";
|
||||
import HeaderTitle from '@/components/HeaderTitle.vue'
|
||||
import FooterNavigation from '@/components/FooterNavigation.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import GenerateLoading from '@/views/asistant/components/GenerateLoading.vue'
|
||||
const router = useRouter()
|
||||
//const props = defineProps({
|
||||
//})
|
||||
const emit = defineEmits(['view-type'])
|
||||
// let data = reactive({
|
||||
// modelList:
|
||||
// [
|
||||
let data = reactive({
|
||||
modelList:
|
||||
[
|
||||
|
||||
// ],
|
||||
// selectedModelId: null,
|
||||
// })
|
||||
],
|
||||
isLoading: false,
|
||||
})
|
||||
|
||||
// const setSelectedModelId = (item)=>{
|
||||
// data.selectedModelId = item.id;
|
||||
// }
|
||||
|
||||
|
||||
const onContinue = ()=>{
|
||||
router.push('uploadFace')
|
||||
}
|
||||
|
||||
const changeModel = ()=>{
|
||||
router.push('selectModel')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
emit('view-type', 1)
|
||||
data.isLoading = true;
|
||||
setTimeout(()=>{
|
||||
data.isLoading = false;
|
||||
}, 2000)
|
||||
})
|
||||
onUnmounted(()=>{
|
||||
})
|
||||
defineExpose({})
|
||||
// const { modelList, selectedModelId } = toRefs(data);
|
||||
const { isLoading } = toRefs(data);
|
||||
</script>
|
||||
<template>
|
||||
<header-title style-type="2" />
|
||||
<div class="selectModelContinue">
|
||||
<div class="selectModelContinue" v-if="!isLoading">
|
||||
<div class="text">
|
||||
<div class="title">
|
||||
Go with this Look?
|
||||
@@ -58,12 +67,15 @@ defineExpose({})
|
||||
</div>
|
||||
</div>
|
||||
<div class="again">
|
||||
<div>Re-try?</div>
|
||||
<div @click="changeModel">Change Model</div>
|
||||
<div @click="onContinue">Continue</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer-navigation is-placeholder />
|
||||
<footer-navigation is-placeholder v-if="!isLoading"/>
|
||||
<div class="loading-container" v-if="isLoading">
|
||||
<GenerateLoading title="Generating Results..." />
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
.selectModelContinue{
|
||||
@@ -157,4 +169,11 @@ defineExpose({})
|
||||
}
|
||||
}
|
||||
}
|
||||
.loading-container{
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -66,8 +66,8 @@ let data = reactive({
|
||||
|
||||
}
|
||||
})
|
||||
const toSelectModel = ()=>{
|
||||
router.push({ path: 'selectModel' })
|
||||
const toSelectModelContinue = ()=>{
|
||||
router.push({ path: 'selectModelContinue' })
|
||||
}
|
||||
onMounted(()=>{
|
||||
emit('view-type', 1)
|
||||
@@ -94,7 +94,7 @@ const { selectList, select } = toRefs(data);
|
||||
</div>
|
||||
<div class="footer placeholder"></div>
|
||||
<div class="footer">
|
||||
<button @click.stop="toSelectModel">Continue</button>
|
||||
<button @click.stop="toSelectModelContinue">Continue</button>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="less" scoped>
|
||||
|
||||
Reference in New Issue
Block a user