编辑新增产品添加取消逻辑
Showing
1 changed file
with
4 additions
and
5 deletions
1 | <template> | 1 | <template> |
2 | <Card> | 2 | <Card> |
3 | <GoBack class="go-back mb10"></GoBack> | ||
4 | <h4 class="mb10">产品基本属性</h4> | 3 | <h4 class="mb10">产品基本属性</h4> |
5 | <el-form | 4 | <el-form |
6 | class="count-form" | 5 | class="count-form" |
... | @@ -124,6 +123,7 @@ | ... | @@ -124,6 +123,7 @@ |
124 | </el-form-item> | 123 | </el-form-item> |
125 | </el-form> | 124 | </el-form> |
126 | <div class="bottom"> | 125 | <div class="bottom"> |
126 | <el-button @click="goBack">取消</el-button> | ||
127 | <el-button type="primary" @click="submit">提交</el-button> | 127 | <el-button type="primary" @click="submit">提交</el-button> |
128 | </div> | 128 | </div> |
129 | </Card> | 129 | </Card> |
... | @@ -143,15 +143,11 @@ import { | ... | @@ -143,15 +143,11 @@ import { |
143 | productEdit, | 143 | productEdit, |
144 | productAdd | 144 | productAdd |
145 | } from '@/api/productInforManagement' | 145 | } from '@/api/productInforManagement' |
146 | import GoBack from '_c/goBack' | ||
147 | 146 | ||
148 | const urlReg = /[a-zA-z]+:\/\/[^\s]*/ | 147 | const urlReg = /[a-zA-z]+:\/\/[^\s]*/ |
149 | 148 | ||
150 | export default { | 149 | export default { |
151 | props: ['idAndCode'], | 150 | props: ['idAndCode'], |
152 | components: { | ||
153 | GoBack | ||
154 | }, | ||
155 | data() { | 151 | data() { |
156 | const validateCode = async (rule, value, callback) => { | 152 | const validateCode = async (rule, value, callback) => { |
157 | if (!value) { | 153 | if (!value) { |
... | @@ -348,6 +344,9 @@ export default { | ... | @@ -348,6 +344,9 @@ export default { |
348 | console.log(error) | 344 | console.log(error) |
349 | } | 345 | } |
350 | }, | 346 | }, |
347 | goBack() { | ||
348 | this.$router.go(-1) | ||
349 | }, | ||
351 | async editOrAdd() { | 350 | async editOrAdd() { |
352 | const formData = this.constructorFormData() | 351 | const formData = this.constructorFormData() |
353 | if (this.idAndCode) { | 352 | if (this.idAndCode) { | ... | ... |
-
Please register or sign in to post a comment