Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yoho-activity-platform
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
李奇
6 years ago
Commit
8c98c3d0a9aa655486ff49c759c9ac42af7cea65
1 parent
f646a496
fixed:奖品编辑
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
public/vue/wheel-surf/components/add-prize.vue
public/vue/wheel-surf/components/add-prize.vue
View file @
8c98c3d
...
...
@@ -46,7 +46,7 @@
</Form>
<div class="add-btn">
<Button v-show="!isEditing && canAdd" type="primary" @click="addPrize">添加</Button>
<Button v-show="isEditing" type="primary" @click="confirmEdit">
确认
</Button>
<Button v-show="isEditing" type="primary" @click="confirmEdit">
暂存
</Button>
<Button v-show="canAdd" type="error" @click="savePrize">保存右侧已添加商品</Button>
<Button v-show="needSave && !canAdd" type="error" @click="prizesUpdate">保存修改</Button>
</div>
...
...
@@ -317,19 +317,25 @@
});
},
confirmEdit() {
const form = 'prizeForm';
this.validateForm(form).then(() => {
let editIdx = this.prize['_editIdx'];
delete this.prize._editIdx;
this.prizes.splice(editIdx, 1, Object.assign({}, this.prize));
this.isEditing = false;
this.needSave = true;
this.formReset('prizeForm');
}).catch(() => {});
this.$Modal.warning({
title: '注意',
content: '暂存之后需要再次点击底部【保存修改】按钮才能完成修改',
cancelText: '取消',
okText: '确定',
onOk: () => {
const form = 'prizeForm';
this.validateForm(form).then(() => {
let editIdx = this.prize['_editIdx'];
delete this.prize._editIdx;
this.prizes.splice(editIdx, 1, Object.assign({}, this.prize));
this.isEditing = false;
this.needSave = true;
this.formReset('prizeForm');
}).catch(() => {});
}
});
},
prizesUpdate() {
let len = this.prizes.length;
...
...
Please
register
or
login
to post a comment