diff --git a/src/assets/icons/history.svg b/src/assets/icons/history.svg index 66e5f25..241ea67 100644 --- a/src/assets/icons/history.svg +++ b/src/assets/icons/history.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/src/components/RouteCache.vue b/src/components/RouteCache.vue index 2e0feb1..dce33f4 100644 --- a/src/components/RouteCache.vue +++ b/src/components/RouteCache.vue @@ -1,6 +1,6 @@
- + @@ -14,6 +14,13 @@ import { useRoute } from 'vue-router' import { useRouter } from 'vue-router' import MyEvent from '@/utils/myEvent' +const props = defineProps({ + viewType: { + type: String, + default: '' + } +}) + const route = useRoute() // 缓存的组件名称列表 @@ -59,17 +66,6 @@ onMounted(() => { MyEvent.add('clearAllCache', clearCache) }) -//根据viewType设置布局风格样式 -const viewType = ref(0) -const changeViewType = (v: number) => { - viewType.value = v -} -const router = useRouter() -watch( - () => router.currentRoute.value, - () => (viewType.value = 0) -) - // 暴露方法供外部使用 defineExpose({ clearCache, diff --git a/src/components/gradientButton.vue b/src/components/gradientButton.vue index 3acfb3a..a2968d9 100644 --- a/src/components/gradientButton.vue +++ b/src/components/gradientButton.vue @@ -48,11 +48,11 @@ const {} = toRefs(data); left: 50%; border-radius: var(--gradientButtonBorderRadius); transform: translate(-50%, -50%); - background: linear-gradient(125deg, - #f1f1f1 0%, - #000 40%, - #000 65%, - #fff 100%); + background: linear-gradient(156deg, + #d3d3d3 0%, + #8a8682 40%, + #8a8682 65%, + #ebebeb 100%); } } \ No newline at end of file diff --git a/src/components/selectStyle/selectItem.vue b/src/components/selectStyle/selectItem.vue index c9baa4b..c3c2c73 100644 --- a/src/components/selectStyle/selectItem.vue +++ b/src/components/selectStyle/selectItem.vue @@ -82,22 +82,11 @@ const {} = toRefs(data);
-
- + - -
+ --> @@ -109,7 +98,7 @@ const {} = toRefs(data); flex-wrap: wrap; justify-content: space-between; > .item{ - width: calc(50% - 3.1rem / 2); + width: calc(50% - 3.5rem / 2); position: relative; // margin-bottom: 3.3rem; display: flex; @@ -126,7 +115,7 @@ const {} = toRefs(data); align-items: center; flex-wrap: wrap; height: 45rem; - margin: 2.4rem 0; + margin: 2.3rem 0; background-color: #fff; justify-content: center; border: .6px solid #acacac; @@ -170,26 +159,26 @@ const {} = toRefs(data); // max-height: 50%; } } - > .btn{ - display: flex; - align-items: center; - justify-content: flex-end; - > div{ - color: #000; - margin-right: 1.2rem; - border-radius: 50%; - width: 5.2rem; - height: 5.2rem; - padding: 1rem; - background-color: #fff; - &:last-child{ - margin-right: 0rem; - } - &:hover{ - color: #000; - } - } - } + // > .btn{ + // display: flex; + // align-items: center; + // justify-content: flex-end; + // > div{ + // color: #000; + // margin-right: 1.2rem; + // border-radius: 50%; + // width: 5.2rem; + // height: 5.2rem; + // padding: 1rem; + // background-color: #fff; + // &:last-child{ + // margin-right: 0rem; + // } + // &:hover{ + // color: #000; + // } + // } + // } } } \ No newline at end of file diff --git a/src/router/index.ts b/src/router/index.ts index 307d257..4eed819 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -121,7 +121,7 @@ const router = createRouter({ { path: '/workshop/selectStyle', name: 'selectStyle', - component: () => import('../views/Workshop/selectStyle.vue'), + component: () => import('../views/Workshop/selectStyle/index.vue'), meta: { verify: () => VerifyIDs(2) } }, { diff --git a/src/stores/modules/generate.ts b/src/stores/modules/generate.ts index 4be5501..f985ef3 100644 --- a/src/stores/modules/generate.ts +++ b/src/stores/modules/generate.ts @@ -15,7 +15,12 @@ export const useGenerateStore = defineStore({ isLike: false, //是否喜欢 status: '' }, - styleList: [{}, {}, {}, {}], + styleList: [ + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + ], model: { id: '' }, @@ -98,6 +103,12 @@ export const useGenerateStore = defineStore({ taskId:'', status: '' } + this.styleList = [ + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + ] }, //模特相关 selectModel(data: any) { @@ -107,7 +118,12 @@ export const useGenerateStore = defineStore({ this.isGenerate = isGenerate }, clearProductData() { - this.styleList = [{}, {}, {}, {}] + this.styleList = [ + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + {id:'',taskId:'',status:'',path:''}, + ] this.style = { id: '', path: '', diff --git a/src/views/Workshop/creation/creation-list.vue b/src/views/Workshop/creation/creation-list.vue index 2a336ad..2671bf0 100644 --- a/src/views/Workshop/creation/creation-list.vue +++ b/src/views/Workshop/creation/creation-list.vue @@ -12,7 +12,6 @@ import { useRouter } from 'vue-router' import MyEvent from '@/utils/myEvent' const router = useRouter() - const emit = defineEmits(['view-type']) const query = computed(() => router.currentRoute.value.query) const visitRecordId = computed(() => query.value.visitRecordId) // 访问记录ID import { useGenerateStore, useHGenerateStore } from '@/stores' @@ -22,9 +21,6 @@ // 是否单选模式 isChooseOne: { type: Boolean, default: false } }) - onMounted(() => { - emit('view-type', 1) - }) const list = reactive([]) const size = ref(10) const page = computed(() => Math.ceil(list.length / size.value) + 1) diff --git a/src/views/Workshop/creation/index.vue b/src/views/Workshop/creation/index.vue index 37ead49..556bf8a 100644 --- a/src/views/Workshop/creation/index.vue +++ b/src/views/Workshop/creation/index.vue @@ -7,16 +7,8 @@ const router = useRouter() const route = useRoute() const styleUrl = computed(() => router.currentRoute.value.query.styleUrl) - const emit = defineEmits(['view-type']) - watch( - () => router.currentRoute.value, - () => emit('view-type', 1) - ) const isChooseOne = computed(() => route.query.flowType === FlowType.HISTORY) - onMounted(() => { - emit('view-type', 1) - })