Authored by htoooth

fix

@@ -123,6 +123,7 @@ import _ from 'lodash'; @@ -123,6 +123,7 @@ import _ from 'lodash';
123 123
124 import ProductCreateService from 'services/product/product-create-service'; 124 import ProductCreateService from 'services/product/product-create-service';
125 import ProductService from 'services/product/product-service'; 125 import ProductService from 'services/product/product-service';
  126 +import {edit} from './store';
126 127
127 export default { 128 export default {
128 props: { 129 props: {
@@ -134,42 +135,7 @@ export default { @@ -134,42 +135,7 @@ export default {
134 } 135 }
135 }, 136 },
136 data() { 137 data() {
137 - return {  
138 - showLoading: true,  
139 - product: null,  
140 - table: {  
141 - data: [],  
142 - defaultSelectedSizes: [],  
143 - defaultSelectedColors: [],  
144 - },  
145 - desc: '',  
146 - render: {  
147 - goodsImagesReqStr: [],  
148 - productStandardRelationStr: [],  
149 - attributeProValuesOne: [],  
150 - attributeProValuesTwo: [],  
151 - productMaterial: {}  
152 - },  
153 - ruleValidate: {  
154 - productName: [  
155 - { required: true, message: '商品名不能为空', trigger: 'blur' }  
156 - ],  
157 - phrase: [  
158 - { required: true, message: '商品卖点不能为空', trigger: 'blur' }  
159 - ],  
160 - expectSaleTimeStr: [  
161 - { required: true, message: '上市时间不能为空', trigger: 'change' }  
162 - ],  
163 - seasons: [  
164 - { required: true, message: '适销季不能为空', trigger: 'change' }  
165 - ],  
166 - ageLevel: [  
167 - { required: true, message: '年龄层不能为空', trigger: 'change' }  
168 - ]  
169 - },  
170 - colors: [],  
171 - sizes: []  
172 - }; 138 + return edit.call(this);
173 }, 139 },
174 created() { 140 created() {
175 this.productService = new ProductService(); 141 this.productService = new ProductService();
  1 +
  2 +export default function() {
  3 + return {
  4 + showLoading: true,
  5 + product: null,
  6 + table: {
  7 + data: [],
  8 + defaultSelectedSizes: [],
  9 + defaultSelectedColors: [],
  10 + },
  11 + desc: '',
  12 + render: {
  13 + goodsImagesReqStr: [],
  14 + productStandardRelationStr: [],
  15 + attributeProValuesOne: [],
  16 + attributeProValuesTwo: [],
  17 + productMaterial: {}
  18 + },
  19 + ruleValidate: {
  20 + productName: [
  21 + {required: true, message: '商品名不能为空', trigger: 'blur'}
  22 + ],
  23 + phrase: [
  24 + {required: true, message: '商品卖点不能为空', trigger: 'blur'}
  25 + ],
  26 + expectSaleTimeStr: [
  27 + {required: true, message: '上市时间不能为空', trigger: 'change'}
  28 + ],
  29 + seasons: [
  30 + {required: true, message: '适销季不能为空', trigger: 'change'}
  31 + ],
  32 + ageLevel: [
  33 + {required: true, message: '年龄层不能为空', trigger: 'change'}
  34 + ]
  35 + },
  36 + colors: [],
  37 + sizes: []
  38 + };
  39 +};
  1 +
  2 +
  3 +import edit from './edit';
  4 +
  5 +export {
  6 + edit
  7 +};