Browse Source

Merge pull request 'refactor(tips): 修改任务状态方法重构' (#34) from wrr into develop

Reviewed-on: https://dd.tall.wiki/gitea/wally/TALL-MUI-3/pulls/34
develop
wally 4 years ago
parent
commit
15623a4a3d
  1. 1
      CHANGELOG.md
  2. 29
      src/components/Tips/Tips.vue

1
CHANGELOG.md

@ -96,6 +96,7 @@
store/home | 删除store/home | db8a3b4
task beginTime | 格式化任务开始时间 | fbc0301
template | eslint prettier sass uview tailwindcss | 9c966a1
tip | 任务状态显示及tip组件数据的重构 | 78a5750
- | 下滑时间轴添加备注 | 4fd20e3
- | 任务状态重构 | 4693655
- | 删除多余的技术验证界面 | 542ae5b

29
src/components/Tips/Tips.vue

@ -20,11 +20,11 @@
<view class="" slot="body"> {{ tip.text }} </view>
<view class="flex justify-end" slot="foot">
<u-button size="mini" @tap="onCancel">取消</u-button>
<u-button v-if="tip.status === 1" size="mini" @tap="onPause">暂停</u-button>
<u-button v-if="tip.status === 2" size="mini" @tap="onContinu">继续</u-button>
<u-button v-if="tip.status === 1 || tip.status === 2" size="mini" @tap="onRestart">重新开始</u-button>
<u-button v-if="tip.status === 1 || tip.status === 2" type="primary" size="mini" @tap="onComplete">结束</u-button>
<u-button v-if="tip.status === 0 || tip.status === 3" type="primary" size="mini" @tap="onConfirm">确定</u-button>
<u-button v-if="tip.status === 1" size="mini" @tap="onChangeStatus(1)">暂停</u-button>
<u-button v-if="tip.status === 2" size="mini" @tap="onChangeStatus(2)">继续</u-button>
<u-button v-if="tip.status === 1 || tip.status === 2" size="mini" @tap="onChangeStatus(0)">重新开始</u-button>
<u-button v-if="tip.status === 1 || tip.status === 2" type="primary" size="mini" @tap="onChangeStatus(3)">结束</u-button>
<u-button v-if="tip.status === 0 || tip.status === 3" type="primary" size="mini" @tap="onChangeStatus(0)">确定</u-button>
</view>
</u-card>
</view>
@ -58,17 +58,14 @@ export default {
this.onCancel();
},
// TODO:
onPause() {},
//
onRestart() {},
//
onComplete() {},
//
onContinu() {},
/**
* 执行修改任务状态的动作
* @param {number} type 状态码 0开始 1暂停 2继续 3完成 默认0
*/
onChangeStatus(type) {
const param = { id: this.tip.taskId, type };
// TODO:
},
//
onCancel() {

Loading…
Cancel
Save