index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794
  1. <template>
  2. <div class="container">
  3. <div class="left-board">
  4. <div class="logo-wrapper">
  5. <div class="logo">
  6. <img :src="logo" alt="logo"> Form Generator
  7. </div>
  8. </div>
  9. <el-scrollbar class="left-scrollbar">
  10. <div class="components-list">
  11. <div class="components-title">
  12. <svg-icon icon-class="component" />输入型组件
  13. </div>
  14. <draggable
  15. class="components-draggable"
  16. :list="inputComponents"
  17. :group="{ name: 'componentsGroup', pull: 'clone', put: false }"
  18. :clone="cloneComponent"
  19. draggable=".components-item"
  20. :sort="false"
  21. @end="onEnd"
  22. >
  23. <div
  24. v-for="(element, index) in inputComponents" :key="index" class="components-item"
  25. @click="addComponent(element)"
  26. >
  27. <div class="components-body">
  28. <svg-icon :icon-class="element.tagIcon" />
  29. {{ element.label }}
  30. </div>
  31. </div>
  32. </draggable>
  33. <div class="components-title">
  34. <svg-icon icon-class="component" />选择型组件
  35. </div>
  36. <draggable
  37. class="components-draggable"
  38. :list="selectComponents"
  39. :group="{ name: 'componentsGroup', pull: 'clone', put: false }"
  40. :clone="cloneComponent"
  41. draggable=".components-item"
  42. :sort="false"
  43. @end="onEnd"
  44. >
  45. <div
  46. v-for="(element, index) in selectComponents"
  47. :key="index"
  48. class="components-item"
  49. @click="addComponent(element)"
  50. >
  51. <div class="components-body">
  52. <svg-icon :icon-class="element.tagIcon" />
  53. {{ element.label }}
  54. </div>
  55. </div>
  56. </draggable>
  57. <div class="components-title">
  58. <svg-icon icon-class="component" /> 布局型组件
  59. </div>
  60. <draggable
  61. class="components-draggable" :list="layoutComponents"
  62. :group="{ name: 'componentsGroup', pull: 'clone', put: false }" :clone="cloneComponent"
  63. draggable=".components-item" :sort="false" @end="onEnd"
  64. >
  65. <div
  66. v-for="(element, index) in layoutComponents" :key="index" class="components-item"
  67. @click="addComponent(element)"
  68. >
  69. <div class="components-body">
  70. <svg-icon :icon-class="element.tagIcon" />
  71. {{ element.label }}
  72. </div>
  73. </div>
  74. </draggable>
  75. </div>
  76. </el-scrollbar>
  77. </div>
  78. <div class="center-board">
  79. <div class="action-bar">
  80. <el-button icon="el-icon-download" type="text" @click="download">
  81. 导出vue文件
  82. </el-button>
  83. <el-button class="copy-btn-main" icon="el-icon-document-copy" type="text" @click="copy">
  84. 复制代码
  85. </el-button>
  86. <el-button class="delete-btn" icon="el-icon-delete" type="text" @click="empty">
  87. 清空
  88. </el-button>
  89. </div>
  90. <el-scrollbar class="center-scrollbar">
  91. <el-row class="center-board-row" :gutter="formConf.gutter">
  92. <el-form
  93. :size="formConf.size"
  94. :label-position="formConf.labelPosition"
  95. :disabled="formConf.disabled"
  96. :label-width="formConf.labelWidth + 'px'"
  97. >
  98. <draggable class="drawing-board" :list="drawingList" :animation="340" group="componentsGroup">
  99. <draggable-item
  100. v-for="(element, index) in drawingList"
  101. :key="element.renderKey"
  102. :drawing-list="drawingList"
  103. :element="element"
  104. :index="index"
  105. :active-id="activeId"
  106. :form-conf="formConf"
  107. @activeItem="activeFormItem"
  108. @copyItem="drawingItemCopy"
  109. @deleteItem="drawingItemDelete"
  110. />
  111. </draggable>
  112. <div v-show="!drawingList.length" class="empty-info">
  113. 从左侧拖入或点选组件进行表单设计
  114. </div>
  115. </el-form>
  116. </el-row>
  117. </el-scrollbar>
  118. </div>
  119. <right-panel
  120. :active-data="activeData"
  121. :form-conf="formConf"
  122. :show-field="!!drawingList.length"
  123. @tag-change="tagChange"
  124. />
  125. <code-type-dialog
  126. :visible.sync="dialogVisible"
  127. title="选择生成类型"
  128. :show-file-name="showFileName"
  129. @confirm="generate"
  130. />
  131. <input id="copyNode" type="hidden">
  132. </div>
  133. </template>
  134. <script>
  135. import draggable from 'vuedraggable'
  136. import { saveAs } from 'file-saver'
  137. import beautifier from 'js-beautify'
  138. import ClipboardJS from 'clipboard'
  139. import render from '@/utils/generator/render'
  140. import RightPanel from './RightPanel'
  141. import {
  142. inputComponents,
  143. selectComponents,
  144. layoutComponents,
  145. formConf
  146. } from '@/utils/generator/config'
  147. import {
  148. exportDefault, beautifierConf, isNumberStr, titleCase
  149. } from '@/utils/index'
  150. import {
  151. makeUpHtml, vueTemplate, vueScript, cssStyle
  152. } from '@/utils/generator/html'
  153. import { makeUpJs } from '@/utils/generator/js'
  154. import { makeUpCss } from '@/utils/generator/css'
  155. import drawingDefalut from '@/utils/generator/drawingDefalut'
  156. import logo from '@/assets/logo/logo.png'
  157. import CodeTypeDialog from './CodeTypeDialog'
  158. import DraggableItem from './DraggableItem'
  159. const emptyActiveData = { style: {}, autosize: {} }
  160. let oldActiveId
  161. let tempActiveData
  162. export default {
  163. components: {
  164. draggable,
  165. render,
  166. RightPanel,
  167. CodeTypeDialog,
  168. DraggableItem
  169. },
  170. data() {
  171. return {
  172. logo,
  173. idGlobal: 100,
  174. formConf,
  175. inputComponents,
  176. selectComponents,
  177. layoutComponents,
  178. labelWidth: 100,
  179. drawingList: drawingDefalut,
  180. drawingData: {},
  181. activeId: drawingDefalut[0].formId,
  182. drawerVisible: false,
  183. formData: {},
  184. dialogVisible: false,
  185. generateConf: null,
  186. showFileName: false,
  187. activeData: drawingDefalut[0]
  188. }
  189. },
  190. created() {
  191. // 防止 firefox 下 拖拽 会新打卡一个选项卡
  192. document.body.ondrop = event => {
  193. event.preventDefault()
  194. event.stopPropagation()
  195. }
  196. },
  197. watch: {
  198. // eslint-disable-next-line func-names
  199. 'activeData.label': function (val, oldVal) {
  200. if (
  201. this.activeData.placeholder === undefined
  202. || !this.activeData.tag
  203. || oldActiveId !== this.activeId
  204. ) {
  205. return
  206. }
  207. this.activeData.placeholder = this.activeData.placeholder.replace(oldVal, '') + val
  208. },
  209. activeId: {
  210. handler(val) {
  211. oldActiveId = val
  212. },
  213. immediate: true
  214. }
  215. },
  216. mounted() {
  217. const clipboard = new ClipboardJS('#copyNode', {
  218. text: trigger => {
  219. const codeStr = this.generateCode()
  220. this.$notify({
  221. title: '成功',
  222. message: '代码已复制到剪切板,可粘贴。',
  223. type: 'success'
  224. })
  225. return codeStr
  226. }
  227. })
  228. clipboard.on('error', e => {
  229. this.$message.error('代码复制失败')
  230. })
  231. },
  232. methods: {
  233. activeFormItem(element) {
  234. this.activeData = element
  235. this.activeId = element.formId
  236. },
  237. onEnd(obj, a) {
  238. if (obj.from !== obj.to) {
  239. this.activeData = tempActiveData
  240. this.activeId = this.idGlobal
  241. }
  242. },
  243. addComponent(item) {
  244. const clone = this.cloneComponent(item)
  245. this.drawingList.push(clone)
  246. this.activeFormItem(clone)
  247. },
  248. cloneComponent(origin) {
  249. const clone = JSON.parse(JSON.stringify(origin))
  250. clone.formId = ++this.idGlobal
  251. clone.span = formConf.span
  252. clone.renderKey = +new Date() // 改变renderKey后可以实现强制更新组件
  253. if (!clone.layout) clone.layout = 'colFormItem'
  254. if (clone.layout === 'colFormItem') {
  255. clone.vModel = `field${this.idGlobal}`
  256. clone.placeholder !== undefined && (clone.placeholder += clone.label)
  257. tempActiveData = clone
  258. } else if (clone.layout === 'rowFormItem') {
  259. delete clone.label
  260. clone.componentName = `row${this.idGlobal}`
  261. clone.gutter = this.formConf.gutter
  262. tempActiveData = clone
  263. }
  264. return tempActiveData
  265. },
  266. AssembleFormData() {
  267. this.formData = {
  268. fields: JSON.parse(JSON.stringify(this.drawingList)),
  269. ...this.formConf
  270. }
  271. },
  272. generate(data) {
  273. const func = this[`exec${titleCase(this.operationType)}`]
  274. this.generateConf = data
  275. func && func(data)
  276. },
  277. execRun(data) {
  278. this.AssembleFormData()
  279. this.drawerVisible = true
  280. },
  281. execDownload(data) {
  282. const codeStr = this.generateCode()
  283. const blob = new Blob([codeStr], { type: 'text/plain;charset=utf-8' })
  284. saveAs(blob, data.fileName)
  285. },
  286. execCopy(data) {
  287. document.getElementById('copyNode').click()
  288. },
  289. empty() {
  290. this.$confirm('确定要清空所有组件吗?', '提示', { type: 'warning' }).then(
  291. () => {
  292. this.drawingList = []
  293. }
  294. )
  295. },
  296. drawingItemCopy(item, parent) {
  297. let clone = JSON.parse(JSON.stringify(item))
  298. clone = this.createIdAndKey(clone)
  299. parent.push(clone)
  300. this.activeFormItem(clone)
  301. },
  302. createIdAndKey(item) {
  303. item.formId = ++this.idGlobal
  304. item.renderKey = +new Date()
  305. if (item.layout === 'colFormItem') {
  306. item.vModel = `field${this.idGlobal}`
  307. } else if (item.layout === 'rowFormItem') {
  308. item.componentName = `row${this.idGlobal}`
  309. }
  310. if (Array.isArray(item.children)) {
  311. item.children = item.children.map(childItem => this.createIdAndKey(childItem))
  312. }
  313. return item
  314. },
  315. drawingItemDelete(index, parent) {
  316. parent.splice(index, 1)
  317. this.$nextTick(() => {
  318. const len = this.drawingList.length
  319. if (len) {
  320. this.activeFormItem(this.drawingList[len - 1])
  321. }
  322. })
  323. },
  324. generateCode() {
  325. const { type } = this.generateConf
  326. this.AssembleFormData()
  327. const script = vueScript(makeUpJs(this.formData, type))
  328. const html = vueTemplate(makeUpHtml(this.formData, type))
  329. const css = cssStyle(makeUpCss(this.formData))
  330. return beautifier.html(html + script + css, beautifierConf.html)
  331. },
  332. download() {
  333. this.dialogVisible = true
  334. this.showFileName = true
  335. this.operationType = 'download'
  336. },
  337. run() {
  338. this.dialogVisible = true
  339. this.showFileName = false
  340. this.operationType = 'run'
  341. },
  342. copy() {
  343. this.dialogVisible = true
  344. this.showFileName = false
  345. this.operationType = 'copy'
  346. },
  347. tagChange(newTag) {
  348. newTag = this.cloneComponent(newTag)
  349. newTag.vModel = this.activeData.vModel
  350. newTag.formId = this.activeId
  351. newTag.span = this.activeData.span
  352. delete this.activeData.tag
  353. delete this.activeData.tagIcon
  354. delete this.activeData.document
  355. Object.keys(newTag).forEach(key => {
  356. if (this.activeData[key] !== undefined
  357. && typeof this.activeData[key] === typeof newTag[key]) {
  358. newTag[key] = this.activeData[key]
  359. }
  360. })
  361. this.activeData = newTag
  362. this.updateDrawingList(newTag, this.drawingList)
  363. },
  364. updateDrawingList(newTag, list) {
  365. const index = list.findIndex(item => item.formId === this.activeId)
  366. if (index > -1) {
  367. list.splice(index, 1, newTag)
  368. } else {
  369. list.forEach(item => {
  370. if (Array.isArray(item.children)) this.updateDrawingList(newTag, item.children)
  371. })
  372. }
  373. }
  374. }
  375. }
  376. </script>
  377. <style lang='scss'>
  378. body, html{
  379. margin: 0;
  380. padding: 0;
  381. background: #fff;
  382. -moz-osx-font-smoothing: grayscale;
  383. -webkit-font-smoothing: antialiased;
  384. text-rendering: optimizeLegibility;
  385. font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
  386. }
  387. input, textarea{
  388. font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
  389. }
  390. .editor-tabs{
  391. background: #121315;
  392. .el-tabs__header{
  393. margin: 0;
  394. border-bottom-color: #121315;
  395. .el-tabs__nav{
  396. border-color: #121315;
  397. }
  398. }
  399. .el-tabs__item{
  400. height: 32px;
  401. line-height: 32px;
  402. color: #888a8e;
  403. border-left: 1px solid #121315 !important;
  404. background: #363636;
  405. margin-right: 5px;
  406. user-select: none;
  407. }
  408. .el-tabs__item.is-active{
  409. background: #1e1e1e;
  410. border-bottom-color: #1e1e1e!important;
  411. color: #fff;
  412. }
  413. .el-icon-edit{
  414. color: #f1fa8c;
  415. }
  416. .el-icon-document{
  417. color: #a95812;
  418. }
  419. }
  420. // home
  421. .right-scrollbar {
  422. .el-scrollbar__view {
  423. padding: 12px 18px 15px 15px;
  424. }
  425. }
  426. .left-scrollbar .el-scrollbar__wrap {
  427. box-sizing: border-box;
  428. overflow-x: hidden !important;
  429. margin-bottom: 0 !important;
  430. }
  431. .center-tabs{
  432. .el-tabs__header{
  433. margin-bottom: 0!important;
  434. }
  435. .el-tabs__item{
  436. width: 50%;
  437. text-align: center;
  438. }
  439. .el-tabs__nav{
  440. width: 100%;
  441. }
  442. }
  443. .reg-item{
  444. padding: 12px 6px;
  445. background: #f8f8f8;
  446. position: relative;
  447. border-radius: 4px;
  448. .close-btn{
  449. position: absolute;
  450. right: -6px;
  451. top: -6px;
  452. display: block;
  453. width: 16px;
  454. height: 16px;
  455. line-height: 16px;
  456. background: rgba(0, 0, 0, 0.2);
  457. border-radius: 50%;
  458. color: #fff;
  459. text-align: center;
  460. z-index: 1;
  461. cursor: pointer;
  462. font-size: 12px;
  463. &:hover{
  464. background: rgba(210, 23, 23, 0.5)
  465. }
  466. }
  467. & + .reg-item{
  468. margin-top: 18px;
  469. }
  470. }
  471. .action-bar{
  472. & .el-button+.el-button {
  473. margin-left: 15px;
  474. }
  475. & i {
  476. font-size: 20px;
  477. vertical-align: middle;
  478. position: relative;
  479. top: -1px;
  480. }
  481. }
  482. .custom-tree-node{
  483. width: 100%;
  484. font-size: 14px;
  485. .node-operation{
  486. float: right;
  487. }
  488. i[class*="el-icon"] + i[class*="el-icon"]{
  489. margin-left: 6px;
  490. }
  491. .el-icon-plus{
  492. color: #409EFF;
  493. }
  494. .el-icon-delete{
  495. color: #157a0c;
  496. }
  497. }
  498. .left-scrollbar .el-scrollbar__view{
  499. overflow-x: hidden;
  500. }
  501. .el-rate{
  502. display: inline-block;
  503. vertical-align: text-top;
  504. }
  505. .el-upload__tip{
  506. line-height: 1.2;
  507. }
  508. $selectedColor: #f6f7ff;
  509. $lighterBlue: #409EFF;
  510. .container {
  511. position: relative;
  512. width: 100%;
  513. height: 100%;
  514. }
  515. .components-list {
  516. padding: 8px;
  517. box-sizing: border-box;
  518. height: 100%;
  519. .components-item {
  520. display: inline-block;
  521. width: 48%;
  522. margin: 1%;
  523. transition: transform 0ms !important;
  524. }
  525. }
  526. .components-draggable{
  527. padding-bottom: 20px;
  528. }
  529. .components-title{
  530. font-size: 14px;
  531. color: #222;
  532. margin: 6px 2px;
  533. .svg-icon{
  534. color: #666;
  535. font-size: 18px;
  536. }
  537. }
  538. .components-body {
  539. padding: 8px 10px;
  540. background: $selectedColor;
  541. font-size: 12px;
  542. cursor: move;
  543. border: 1px dashed $selectedColor;
  544. border-radius: 3px;
  545. .svg-icon{
  546. color: #777;
  547. font-size: 15px;
  548. }
  549. &:hover {
  550. border: 1px dashed #787be8;
  551. color: #787be8;
  552. .svg-icon {
  553. color: #787be8;
  554. }
  555. }
  556. }
  557. .left-board {
  558. width: 260px;
  559. position: absolute;
  560. left: 0;
  561. top: 0;
  562. height: 100vh;
  563. }
  564. .left-scrollbar{
  565. height: calc(100vh - 42px);
  566. overflow: hidden;
  567. }
  568. .center-scrollbar {
  569. height: calc(100vh - 42px);
  570. overflow: hidden;
  571. border-left: 1px solid #f1e8e8;
  572. border-right: 1px solid #f1e8e8;
  573. box-sizing: border-box;
  574. }
  575. .center-board {
  576. height: 100vh;
  577. width: auto;
  578. margin: 0 350px 0 260px;
  579. box-sizing: border-box;
  580. }
  581. .empty-info{
  582. position: absolute;
  583. top: 46%;
  584. left: 0;
  585. right: 0;
  586. text-align: center;
  587. font-size: 18px;
  588. color: #ccb1ea;
  589. letter-spacing: 4px;
  590. }
  591. .action-bar{
  592. position: relative;
  593. height: 42px;
  594. text-align: right;
  595. padding: 0 15px;
  596. box-sizing: border-box;;
  597. border: 1px solid #f1e8e8;
  598. border-top: none;
  599. border-left: none;
  600. .delete-btn{
  601. color: #F56C6C;
  602. }
  603. }
  604. .logo-wrapper{
  605. position: relative;
  606. height: 42px;
  607. background: #fff;
  608. border-bottom: 1px solid #f1e8e8;
  609. box-sizing: border-box;
  610. }
  611. .logo{
  612. position: absolute;
  613. left: 12px;
  614. top: 6px;
  615. line-height: 30px;
  616. color: #00afff;
  617. font-weight: 600;
  618. font-size: 17px;
  619. white-space: nowrap;
  620. > img{
  621. width: 30px;
  622. height: 30px;
  623. vertical-align: top;
  624. }
  625. .github{
  626. display: inline-block;
  627. vertical-align: sub;
  628. margin-left: 15px;
  629. > img{
  630. height: 22px;
  631. }
  632. }
  633. }
  634. .center-board-row {
  635. padding: 12px 12px 15px 12px;
  636. box-sizing: border-box;
  637. & > .el-form {
  638. // 69 = 12+15+42
  639. height: calc(100vh - 69px);
  640. }
  641. }
  642. .drawing-board {
  643. height: 100%;
  644. position: relative;
  645. .components-body {
  646. padding: 0;
  647. margin: 0;
  648. font-size: 0;
  649. }
  650. .sortable-ghost {
  651. position: relative;
  652. display: block;
  653. overflow: hidden;
  654. &::before {
  655. content: " ";
  656. position: absolute;
  657. left: 0;
  658. right: 0;
  659. top: 0;
  660. height: 3px;
  661. background: rgb(89, 89, 223);
  662. z-index: 2;
  663. }
  664. }
  665. .components-item.sortable-ghost {
  666. width: 100%;
  667. height: 60px;
  668. background-color: $selectedColor;
  669. }
  670. .active-from-item {
  671. & > .el-form-item{
  672. background: $selectedColor;
  673. border-radius: 6px;
  674. }
  675. & > .drawing-item-copy, & > .drawing-item-delete{
  676. display: initial;
  677. }
  678. & > .component-name{
  679. color: $lighterBlue;
  680. }
  681. }
  682. .el-form-item{
  683. margin-bottom: 15px;
  684. }
  685. }
  686. .drawing-item{
  687. position: relative;
  688. cursor: move;
  689. &.unfocus-bordered:not(.activeFromItem) > div:first-child {
  690. border: 1px dashed #ccc;
  691. }
  692. .el-form-item{
  693. padding: 12px 10px;
  694. }
  695. }
  696. .drawing-row-item{
  697. position: relative;
  698. cursor: move;
  699. box-sizing: border-box;
  700. border: 1px dashed #ccc;
  701. border-radius: 3px;
  702. padding: 0 2px;
  703. margin-bottom: 15px;
  704. .drawing-row-item {
  705. margin-bottom: 2px;
  706. }
  707. .el-col{
  708. margin-top: 22px;
  709. }
  710. .el-form-item{
  711. margin-bottom: 0;
  712. }
  713. .drag-wrapper{
  714. min-height: 80px;
  715. }
  716. &.active-from-item{
  717. border: 1px dashed $lighterBlue;
  718. }
  719. .component-name{
  720. position: absolute;
  721. top: 0;
  722. left: 0;
  723. font-size: 12px;
  724. color: #bbb;
  725. display: inline-block;
  726. padding: 0 6px;
  727. }
  728. }
  729. .drawing-item, .drawing-row-item{
  730. &:hover {
  731. & > .el-form-item{
  732. background: $selectedColor;
  733. border-radius: 6px;
  734. }
  735. & > .drawing-item-copy, & > .drawing-item-delete{
  736. display: initial;
  737. }
  738. }
  739. & > .drawing-item-copy, & > .drawing-item-delete{
  740. display: none;
  741. position: absolute;
  742. top: -10px;
  743. width: 22px;
  744. height: 22px;
  745. line-height: 22px;
  746. text-align: center;
  747. border-radius: 50%;
  748. font-size: 12px;
  749. border: 1px solid;
  750. cursor: pointer;
  751. z-index: 1;
  752. }
  753. & > .drawing-item-copy{
  754. right: 56px;
  755. border-color: $lighterBlue;
  756. color: $lighterBlue;
  757. background: #fff;
  758. &:hover{
  759. background: $lighterBlue;
  760. color: #fff;
  761. }
  762. }
  763. & > .drawing-item-delete{
  764. right: 24px;
  765. border-color: #F56C6C;
  766. color: #F56C6C;
  767. background: #fff;
  768. &:hover{
  769. background: #F56C6C;
  770. color: #fff;
  771. }
  772. }
  773. }
  774. </style>