1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
<div class='show-type'>
<button-group v-show="!showTypeDir">
<i-button class="collapse-btn" type="primary" @click="clickCollapse('left')">
<icon type="ios-arrow-back"/>
</i-button>
</button-group>
<button-group v-show="showTypeDir">
<el-tooltip :content="$t('components.appBuild.custom')">
<i-button icon="md-build" type="primary" @click="handleClick"></i-button>
</el-tooltip>
<i-button class="collapse-btn" type="primary" @click="clickCollapse('right')">
<icon type="ios-arrow-forward"/>
</i-button>
</button-group>
</div>
</template>
<script lang="ts">
import {Vue, Component, Prop, Watch} from 'vue-property-decorator';
@Component({
})
export default class AppBuild extends Vue {
/**
* 工具栏伸缩
*
* @protected
* @type {boolean}
* @memberof AppBuild
*/
public showTypeDir: boolean = false;
/**
* 点击伸缩
*
* @param {*} type
* @memberof AppBuild
*/
public clickCollapse(type: string) {
this.showTypeDir = Object.is(type, 'left') ? true : false;
}
/**
* 工具点击
*
*@memberof AppBuild
*/
public handleClick(){
this.$emit("handleClick")
}
}
</script>
<style lang="less">
@import './app-build.less';
</style>