40 lines
903 B
TypeScript
40 lines
903 B
TypeScript
|
|
import {Module} from 'vuex'
|
||
|
|
import {RootState} from '../index'
|
||
|
|
|
||
|
|
interface DesignDetailCopy{
|
||
|
|
designDetail:any,
|
||
|
|
designPreviewData:any,
|
||
|
|
frontBack:any,
|
||
|
|
}
|
||
|
|
|
||
|
|
const DesignDetailCopy : Module<DesignDetailCopy,RootState> = {
|
||
|
|
namespaced: true,
|
||
|
|
state:{
|
||
|
|
designDetail:null,
|
||
|
|
designPreviewData:{},
|
||
|
|
frontBack:{},
|
||
|
|
},
|
||
|
|
mutations:{
|
||
|
|
setDesignDetail(state,files){
|
||
|
|
state.designDetail = files
|
||
|
|
},
|
||
|
|
setDesignColthes(state,data){
|
||
|
|
state.designDetail.clothes[data.index] = data.clothes
|
||
|
|
},
|
||
|
|
setDesignOthers(state,data){
|
||
|
|
state.designDetail.others[data.index] = data.others
|
||
|
|
},
|
||
|
|
|
||
|
|
setFrontBack(state,files){
|
||
|
|
state.frontBack = files
|
||
|
|
}
|
||
|
|
// setDesignItemOthers(state,data){
|
||
|
|
// state.designDetail.others[data.index] = data.others
|
||
|
|
// },
|
||
|
|
},
|
||
|
|
actions:{
|
||
|
|
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default DesignDetailCopy
|