From 044143571f433b7e84fd9b9706639495f04e2dc3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=A5=94=E8=B7=91=E7=9A=84=E9=9D=A2=E6=9D=A1?=
<1262327911@qq.com>
Date: Fri, 3 Jun 2022 14:48:58 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=B0=E5=A2=9E=E5=8F=91=E5=B8=83?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../chartEditStore/chartEditStore.d.ts | 11 +-
.../modules/chartEditStore/chartEditStore.ts | 3 +-
src/styles/common/animation.scss | 2 +-
.../ContentHeader/headerRightBtn/index.vue | 173 +++++++++++++++---
src/views/chart/hooks/useSync.hook.ts | 5 +-
.../components/ProjectItemsCard/index.vue | 2 +-
.../ProjectItemsModalCard/index.vue | 2 +-
7 files changed, 164 insertions(+), 34 deletions(-)
diff --git a/src/store/modules/chartEditStore/chartEditStore.d.ts b/src/store/modules/chartEditStore/chartEditStore.d.ts
index 022fc543..f824977d 100644
--- a/src/store/modules/chartEditStore/chartEditStore.d.ts
+++ b/src/store/modules/chartEditStore/chartEditStore.d.ts
@@ -15,14 +15,17 @@ export enum ProjectInfoEnum {
// 描述
REMARKS = 'remarks',
// 缩略图
- THUMBNAIL= 'thumbnail'
+ THUMBNAIL= 'thumbnail',
+ // 是否公开发布
+ RELEASE = 'release'
}
// 项目数据
export type ProjectInfoType = {
- projectName: string,
- remarks: string,
- thumbnail: string
+ [ProjectInfoEnum.PROJECT_NAME]: string,
+ [ProjectInfoEnum.REMARKS]: string,
+ [ProjectInfoEnum.THUMBNAIL]: string,
+ [ProjectInfoEnum.RELEASE]: boolean
}
// 编辑画布属性
diff --git a/src/store/modules/chartEditStore/chartEditStore.ts b/src/store/modules/chartEditStore/chartEditStore.ts
index 7d64add2..805fc033 100644
--- a/src/store/modules/chartEditStore/chartEditStore.ts
+++ b/src/store/modules/chartEditStore/chartEditStore.ts
@@ -38,7 +38,8 @@ export const useChartEditStore = defineStore({
projectInfo: {
projectName: '',
remarks: '',
- thumbnail: ''
+ thumbnail: '',
+ release: false
},
// 画布属性
editCanvas: {
diff --git a/src/styles/common/animation.scss b/src/styles/common/animation.scss
index 86294947..5f69c7d1 100644
--- a/src/styles/common/animation.scss
+++ b/src/styles/common/animation.scss
@@ -1,5 +1,5 @@
// 闪烁
-.animation-twinkle {
+.go-animation-twinkle {
animation: twinkle 2s ease;
animation-iteration-count: infinite;
opacity: 1;
diff --git a/src/views/chart/ContentHeader/headerRightBtn/index.vue b/src/views/chart/ContentHeader/headerRightBtn/index.vue
index 463508d6..ef56ac28 100644
--- a/src/views/chart/ContentHeader/headerRightBtn/index.vue
+++ b/src/views/chart/ContentHeader/headerRightBtn/index.vue
@@ -1,29 +1,100 @@
-
-
+
+
- {{ item.title }}
+ {{ item.title() }}
+
+
+
+
+
+
+ 发布管理
+
+
+
+
+
+
+
+
+
+ {{ previewPath() }}
+
+
+ 复制地址
+
+
+
+
+
+
+ 取消
+
+ {{ release ? '取消发布' : '发布' }}
+
+
+
+
+
+
diff --git a/src/views/chart/hooks/useSync.hook.ts b/src/views/chart/hooks/useSync.hook.ts
index ab551d56..00d95bfc 100644
--- a/src/views/chart/hooks/useSync.hook.ts
+++ b/src/views/chart/hooks/useSync.hook.ts
@@ -81,14 +81,17 @@ export const useSync = () => {
projectName: string,
indexImage: string,
remarks: string,
+ state: number
}) => {
- const { projectName, remarks, indexImage } = projectData
+ const { projectName, remarks, indexImage, state } = projectData
// 名称
chartEditStore.setProjectInfo(ProjectInfoEnum.PROJECT_NAME, projectName)
// 描述
chartEditStore.setProjectInfo(ProjectInfoEnum.REMARKS, remarks)
// 缩略图
chartEditStore.setProjectInfo(ProjectInfoEnum.THUMBNAIL, indexImage)
+ // 发布
+ chartEditStore.setProjectInfo(ProjectInfoEnum.RELEASE, state === 1)
}
// * 数据获取
diff --git a/src/views/project/items/components/ProjectItemsCard/index.vue b/src/views/project/items/components/ProjectItemsCard/index.vue
index afee408f..ada2c337 100644
--- a/src/views/project/items/components/ProjectItemsCard/index.vue
+++ b/src/views/project/items/components/ProjectItemsCard/index.vue
@@ -33,7 +33,7 @@
diff --git a/src/views/project/items/components/ProjectItemsModalCard/index.vue b/src/views/project/items/components/ProjectItemsModalCard/index.vue
index 623b2210..ab332fa6 100644
--- a/src/views/project/items/components/ProjectItemsModalCard/index.vue
+++ b/src/views/project/items/components/ProjectItemsModalCard/index.vue
@@ -41,7 +41,7 @@