index.vue 19 KB

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