<template>
  <div class="fixed-bottom-btns">
    <div class="btn-l">
      <template v-if="wfEnabled">
        <el-button class="btn" type="success"
                   icon="iconfont icon-tongguo" v-if="parentVue.showWfStartBtn" @click="parentVue.openStartWfDialog()">
          流程启动
        </el-button>
        <el-button class="btn" type="primary" icon="el-icon-edit"
                   v-if="parentVue.showWfModifyBtn" @click="parentVue.openWfModifyDialog()">修改单据
        </el-button>
      </template>
      <slot></slot>
    </div>
    <div class="btn-r" @click="parentVue.$refs.wfCardPane.$el.scrollIntoView()" v-if="wfEnabled && parentVue.hasWf">
      <i class="iconfont icon-chakanliucheng"></i>
      <span>流程查看</span>
    </div>
  </div>
</template>
<script>
import commonMixin from "../../../mixins/mobile/common/index";

export default {
  name: "h5ButtonGroup",
  props: {
    parentVue: Object,
    wfEnabled: {
      type: Boolean,
      default: () => false
    }
  },
  mixins: [commonMixin]
}
</script>
<style lang="scss" scoped>
@import "~@/resources/css/h5.scss";
</style>
