export default {
  methods: {
    //编辑的时候提交
    editAlert() {
      return new Promise((resolve, reject) => {
        if (this.isEdit) {
          this.$confirm('若已修改本次游戏奖品，已发放的积分和卡券无法回溯，后果自负?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          })
            .then(res => {
              console.log(res);
              resolve(res === 'cancel');
            })
            .catch(err => {
              console.log(err);
            });
        } else {
          resolve(false);
        }
      });
    }
  }
};
