| | |
| | |
|
| | | <script>
|
| | | import draggable from 'vuedraggable'
|
| | | import { saveAs } from 'file-saver'
|
| | | import beautifier from 'js-beautify'
|
| | | import ClipboardJS from 'clipboard'
|
| | | import render from '@/utils/generator/render'
|
| | | import RightPanel from './RightPanel'
|
| | | import {
|
| | | inputComponents,
|
| | | selectComponents,
|
| | | layoutComponents,
|
| | | formConf
|
| | | } from '@/utils/generator/config'
|
| | | import {
|
| | | exportDefault, beautifierConf, isNumberStr, titleCase
|
| | | } from '@/utils/index'
|
| | | import {
|
| | | makeUpHtml, vueTemplate, vueScript, cssStyle
|
| | | } from '@/utils/generator/html'
|
| | | import { inputComponents, selectComponents, layoutComponents, formConf } from '@/utils/generator/config'
|
| | | import { beautifierConf, titleCase } from '@/utils/index'
|
| | | import { makeUpHtml, vueTemplate, vueScript, cssStyle } from '@/utils/generator/html'
|
| | | import { makeUpJs } from '@/utils/generator/js'
|
| | | import { makeUpCss } from '@/utils/generator/css'
|
| | | import drawingDefalut from '@/utils/generator/drawingDefalut'
|
| | |
| | | import CodeTypeDialog from './CodeTypeDialog'
|
| | | import DraggableItem from './DraggableItem'
|
| | |
|
| | | const emptyActiveData = { style: {}, autosize: {} }
|
| | | let oldActiveId
|
| | | let tempActiveData
|
| | |
|
| | |
| | | activeData: drawingDefalut[0]
|
| | | }
|
| | | },
|
| | | computed: {
|
| | | created() {
|
| | | // 防止 firefox 下 拖拽 会新打卡一个选项卡
|
| | | document.body.ondrop = event => {
|
| | | event.preventDefault()
|
| | | event.stopPropagation()
|
| | | }
|
| | | },
|
| | | watch: {
|
| | | // eslint-disable-next-line func-names
|
| | |
| | | execDownload(data) {
|
| | | const codeStr = this.generateCode()
|
| | | const blob = new Blob([codeStr], { type: 'text/plain;charset=utf-8' })
|
| | | saveAs(blob, data.fileName)
|
| | | this.$download.saveAs(blob, data.fileName)
|
| | | },
|
| | | execCopy(data) {
|
| | | document.getElementById('copyNode').click()
|
| | |
| | | padding: 12px 18px 15px 15px;
|
| | | }
|
| | | }
|
| | | .el-scrollbar__wrap {
|
| | | .left-scrollbar .el-scrollbar__wrap {
|
| | | box-sizing: border-box;
|
| | | overflow-x: hidden !important;
|
| | | margin-bottom: 0 !important;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | .el-scrollbar__view{
|
| | | .left-scrollbar .el-scrollbar__view{
|
| | | overflow-x: hidden;
|
| | | }
|
| | |
|