index.vue 19 KB

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