feat: 对话跳转
This commit is contained in:
@@ -94,6 +94,11 @@
|
||||
@click="selectStyle(item.value)"
|
||||
>
|
||||
<span class="fida-option-label">{{ $t(item.label) }}</span>
|
||||
<img
|
||||
v-show="tempSelectedValue === item.value"
|
||||
src="@/assets/images/checked.png"
|
||||
class="checked-item-icon"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="fida-style-popover-footer flex flex-center">
|
||||
@@ -138,7 +143,11 @@
|
||||
</el-popover>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="create-btn flex flex-center" v-if="!isAgentMode">
|
||||
<div
|
||||
class="create-btn flex flex-center"
|
||||
v-if="!isAgentMode"
|
||||
@click="handleCreateProject"
|
||||
>
|
||||
<img src="@/assets/images/shining.png" class="shining-icon" alt="" />
|
||||
<span class="create-btn-text">{{ $t('Input.createProject') }}</span>
|
||||
</div>
|
||||
@@ -161,10 +170,15 @@
|
||||
import { computed, ref, watch, nextTick, onMounted } from 'vue'
|
||||
import { areaList } from '@/utils/area'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useAgentStore } from '@/stores/agent'
|
||||
import lightIcon from '@/assets/images/light-icon.png'
|
||||
import closeIcon from '@/assets/images/close-icon.png'
|
||||
// import Tag from './Tag.vue'
|
||||
|
||||
const router = useRouter()
|
||||
const agentStore = useAgentStore()
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
isAgentMode?: boolean
|
||||
@@ -305,7 +319,11 @@
|
||||
if (reportTags.value.length > 0) {
|
||||
// 移除所有标签及其关联的零宽空格
|
||||
reportTags.value.forEach((tag) => {
|
||||
if (tag.nextSibling && tag.nextSibling.nodeType === Node.TEXT_NODE && tag.nextSibling.textContent === '\u200B') {
|
||||
if (
|
||||
tag.nextSibling &&
|
||||
tag.nextSibling.nodeType === Node.TEXT_NODE &&
|
||||
tag.nextSibling.textContent === '\u200B'
|
||||
) {
|
||||
tag.nextSibling.remove()
|
||||
}
|
||||
tag.remove()
|
||||
@@ -480,6 +498,27 @@
|
||||
value: key
|
||||
}))
|
||||
)
|
||||
|
||||
const handleCreateProject = () => {
|
||||
// 这里可以添加创建项目的逻辑
|
||||
const params = {
|
||||
type: typeValue.value,
|
||||
area: areaValue.value,
|
||||
style: styleValue.value
|
||||
}
|
||||
|
||||
// 保存初始数据到 store
|
||||
agentStore.setInitialProjectData({
|
||||
text: inputValue.value.trim(),
|
||||
images: uploadedImages.value,
|
||||
type: typeValue.value,
|
||||
area: areaValue.value,
|
||||
style: styleValue.value
|
||||
})
|
||||
|
||||
console.log('Create project with:', params)
|
||||
router.push('/home/agent', { query: params })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@@ -502,7 +541,7 @@
|
||||
border-radius: 2.2rem;
|
||||
width: 20rem;
|
||||
background-color: #fff;
|
||||
border: 1px solid #F6F4EF;
|
||||
border: 1px solid #f6f4ef;
|
||||
column-gap: 1.2rem;
|
||||
cursor: pointer;
|
||||
.c-svg {
|
||||
@@ -727,14 +766,21 @@
|
||||
font-size: 1.6rem;
|
||||
color: #000;
|
||||
margin-bottom: 2rem;
|
||||
padding: 2rem 2.4rem !important;
|
||||
// padding: 1.8rem 2rem 1.5rem;
|
||||
// border-bottom: 0.1rem solid #f0f0f0;
|
||||
}
|
||||
|
||||
.fida-style-popover-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
justify-content: center;
|
||||
height: 28.5rem;
|
||||
overflow-y: auto;
|
||||
// display: grid;
|
||||
// grid-template-columns: repeat(3, 1fr);
|
||||
// gap: 1rem;
|
||||
}
|
||||
|
||||
.fida-style-popover-item {
|
||||
@@ -747,6 +793,15 @@
|
||||
justify-content: center;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
position: relative;
|
||||
.checked-item-icon {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
transform: translate(50%, 50%);
|
||||
width: 2.4rem;
|
||||
height: 2.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.fida-style-popover-item:hover {
|
||||
@@ -772,6 +827,7 @@
|
||||
|
||||
.fida-style-popover-footer {
|
||||
// border-top: 0.1rem solid #f0f0f0;
|
||||
padding: 2.4rem 0 !important;
|
||||
margin-top: 2.4rem;
|
||||
.fida-confirm-btn {
|
||||
margin: 0 auto;
|
||||
|
||||
Reference in New Issue
Block a user