首页和library布局调整
This commit is contained in:
@@ -4,6 +4,7 @@ import {RootState} from '../index'
|
||||
interface DesignDetail{
|
||||
designCollectionList:any,
|
||||
likeDesignCollectionList:any,
|
||||
deleteDesignCollectionList:any,
|
||||
userGroupId:any,
|
||||
designCollectionId:any,
|
||||
templateId:any,
|
||||
@@ -16,6 +17,7 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
state:{
|
||||
designCollectionList:[],
|
||||
likeDesignCollectionList:[],
|
||||
deleteDesignCollectionList:[],
|
||||
userGroupId:'',
|
||||
designCollectionId:'',
|
||||
templateId:'',
|
||||
@@ -32,6 +34,16 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
},
|
||||
setLikeDesignCollectionList(state,data){
|
||||
state.likeDesignCollectionList = data
|
||||
},
|
||||
setDeleteDesignCollectionList(state,data){
|
||||
let obj = state.designCollectionList.splice(data,1)
|
||||
state.deleteDesignCollectionList.unshift(...obj)
|
||||
},
|
||||
cancelDeleteDesignCollectionList(state,data){
|
||||
let obj = state.deleteDesignCollectionList.splice(data,1)
|
||||
console.log(obj);
|
||||
|
||||
state.designCollectionList.unshift(...obj)
|
||||
},
|
||||
setSingleDesignCollectionList(state,data){
|
||||
state.designCollectionList[data.index] = data.design
|
||||
@@ -73,6 +85,7 @@ const HomeStoreModule : Module<DesignDetail,RootState> = {
|
||||
state.designCollectionList=[]
|
||||
state.likeDesignCollectionList = []
|
||||
state.designCollectionId = ''
|
||||
state.deleteDesignCollectionList = []
|
||||
},
|
||||
setTemplateData(state,data){
|
||||
state.templateId=data.id
|
||||
|
||||
Reference in New Issue
Block a user