¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <toolbar class="toolbar"> |
| | | <template> |
| | | <toolbar-button command="undo" text="æ¤é"/> |
| | | <toolbar-button command="redo" text="éå"/> |
| | | <!-- <toolbar-button command="copy" text="å¤å¶"/>--> |
| | | <!-- <toolbar-button command="paste" text="ç²è´´"/>--> |
| | | <div class="split"></div> |
| | | </template> |
| | | <toolbar-button command="zoomIn" icon="zoom-in" text="æ¾å¤§"/> |
| | | <toolbar-button command="zoomOut" icon="zoom-out" text="缩å°"/> |
| | | <toolbar-button command="autoZoom" icon="fit" text="èªéåº"/> |
| | | <toolbar-button command="resetZoom" icon="actual-size" text="å®é
尺寸"/> |
| | | <template> |
| | | <div class="split"></div> |
| | | <!-- <toolbar-button command="toBack" icon="to-back" text="åä¸ä¸å±" /> --> |
| | | <!-- <toolbar-button command="toFront" icon="to-front" text="åä¸ä¸å±" /> --> |
| | | <!-- <toolbar-button command="addGroup" icon="group" text="ç¼ç»" /> --> |
| | | <!-- <toolbar-button command="unGroup" icon="ungroup" text="åæ¶ç¼ç»" /> --> |
| | | <toolbar-button command="selectAll" icon="select-all" text="å
¨é"/> |
| | | <toolbar-button command="multiSelect" icon="select" text="æ¡é"/> |
| | | <div v-if="disabledBtn" class="split"></div> |
| | | <toolbar-button command="delete" text="å é¤"/> |
| | | <toolbar-button command="clear" icon="clear" text="æ¸
空ç»å¸"/> |
| | | </template> |
| | | <template> |
| | | <div class="split"></div> |
| | | <toolbar-button |
| | | command="downloadImage" |
| | | icon="image" |
| | | text="ä¸è½½å¾å" |
| | | /> |
| | | </template> |
| | | <!-- <el-button>{{this.$store}}</el-button>--> |
| | | <el-button :disabled="!disabledBtn" icon="el-icon-check" plain size="small" type="success" |
| | | @click="saveClickHandler">ä¿å |
| | | </el-button> |
| | | <el-button :disabled="!disabledBtn" icon="el-icon-close" plain size="small" type="danger" |
| | | @click="removeClickHandler">åæ¶ |
| | | </el-button> |
| | | <!-- right toolbar button --> |
| | | <!-- <div class="pull-right">--> |
| | | <!-- <toolbar-button--> |
| | | <!-- command="generateData"--> |
| | | <!-- icon="save"--> |
| | | <!-- text="çææ°æ®"--> |
| | | <!-- label="ä¿åæ°æ®"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | </toolbar> |
| | | </template> |
| | | |
| | | <script> |
| | | import {Toolbar} from 'vue-flowchart-editor' |
| | | import ToolbarButton from './ToolbarButton' |
| | | |
| | | export default { |
| | | name: 'FlowToolbar', |
| | | |
| | | components: { |
| | | Toolbar, |
| | | ToolbarButton, |
| | | }, |
| | | |
| | | props: ['chartData', 'toggleReadOnly'], |
| | | created() { |
| | | |
| | | }, |
| | | computed: { |
| | | disabledBtn() { |
| | | return this.$store.state.flow.methodBtn; |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | // åæ¶æé®ç¹å» |
| | | removeClickHandler() { |
| | | this.$confirm("æ¨ç¡®è®¤æ§è¡åæ¶æä½?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | this.$store.dispatch('updateMethodBtn', false); |
| | | this.$store.dispatch('typeChange', ''); |
| | | console.log(this.$s) |
| | | // this.$emit('reset-tree'); // 触åç¶ç»ä»¶éç½® |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // ä¿åæé®ç¹å»äºä»¶ |
| | | saveClickHandler(){ |
| | | this.$emit('handler-save'); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .toolbar { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 27px; |
| | | |
| | | .split { |
| | | width: 10px; |
| | | height: 100%; |
| | | border-right: 1px solid #eee; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .pull-right { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .command { |
| | | margin-right: 15px; |
| | | display: flex; |
| | | color: #333; |
| | | |
| | | i { |
| | | display: block; |
| | | width: 27px; |
| | | height: 27px; |
| | | margin: 0 6px; |
| | | padding-top: 10px; |
| | | text-align: center; |
| | | border: 1px solid #fff; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | span { |
| | | display: block; |
| | | font-size: 12px; |
| | | padding-top: 10px; |
| | | margin-left: -6px; |
| | | padding-right: 6px; |
| | | line-height: 20px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | &:hover { |
| | | color: #1890ff; |
| | | } |
| | | } |
| | | |
| | | .disable { |
| | | color: rgba(0, 0, 0, 0.25); |
| | | |
| | | i { |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | span { |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | &:hover { |
| | | color: rgba(0, 0, 0, 0.25); |
| | | } |
| | | } |
| | | } |
| | | </style> |