card-design.scss 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831
  1. // card-design
  2. .card-design {
  3. color: $--color-text-dark;
  4. background: $--color-background;
  5. // page-box
  6. .page-box {
  7. // box-shadow: $--shadow-light;
  8. // box-shadow: 0 0 1px #333;
  9. &::before {
  10. content: "";
  11. position: absolute;
  12. width: 100%;
  13. height: 100%;
  14. top: 0;
  15. left: 0;
  16. z-index: 7;
  17. // background-color: rgba($color: #ffffff, $alpha: 0.7);
  18. }
  19. }
  20. .page-column-main {
  21. &.is-active {
  22. &::before,
  23. .page-column-forbid-area {
  24. border-color: $--color-primary;
  25. }
  26. }
  27. &::before {
  28. content: "";
  29. display: block;
  30. position: absolute;
  31. top: 0;
  32. left: 0;
  33. right: 0;
  34. bottom: 0;
  35. z-index: 8;
  36. border: 1px dashed #d0d0d0;
  37. }
  38. }
  39. .topic-element-edit {
  40. .element-item-error {
  41. box-shadow: 0 0 10px $--color-danger;
  42. }
  43. .element-resize {
  44. background-color: #fff;
  45. > .resize-control {
  46. > .control-point,
  47. > .control-line {
  48. display: none;
  49. }
  50. }
  51. &:hover {
  52. > .resize-control {
  53. > .control-line {
  54. display: block;
  55. }
  56. }
  57. }
  58. &-act {
  59. > .resize-control {
  60. > .control-point,
  61. > .control-line {
  62. display: block;
  63. }
  64. }
  65. }
  66. }
  67. .element-resize-compact {
  68. > .resize-control {
  69. > .control-line {
  70. display: block;
  71. }
  72. }
  73. &:hover {
  74. > .resize-control {
  75. > .control-line {
  76. border-color: #617bea;
  77. }
  78. }
  79. }
  80. &.element-resize-act {
  81. > .resize-control {
  82. > .control-line {
  83. border-color: #617bea;
  84. &-left,
  85. &-right {
  86. border-left-style: solid;
  87. }
  88. &-top,
  89. &-bottom {
  90. border-top-style: solid;
  91. }
  92. }
  93. }
  94. }
  95. }
  96. .element-item-topic-number {
  97. position: absolute;
  98. left: -22px;
  99. top: 0;
  100. width: 20px;
  101. height: 20px;
  102. z-index: 99;
  103. line-height: 20px;
  104. font-size: 12px;
  105. text-align: center;
  106. background-color: $--color-primary;
  107. color: #fff;
  108. border-radius: 50% 0 50% 50%;
  109. cursor: pointer;
  110. &:hover {
  111. background-color: $--color-primary-light;
  112. }
  113. }
  114. // 编辑时,小题扩展答题区之间用虚线
  115. .element-item {
  116. &-explain {
  117. &::before {
  118. border-bottom: 1px dashed #333;
  119. }
  120. }
  121. &-type-last {
  122. &::before {
  123. border-bottom: 1px solid #333;
  124. }
  125. }
  126. }
  127. &:last-child {
  128. .element-item {
  129. &::before {
  130. border-bottom: 1px solid #333;
  131. }
  132. }
  133. .element-item-card-head.element-item-type-pre {
  134. &::before {
  135. border-bottom: none;
  136. }
  137. }
  138. }
  139. // elem-pane
  140. .elem-pane {
  141. width: 100%;
  142. height: 100%;
  143. }
  144. }
  145. .page-column-element {
  146. > .element-resize {
  147. width: 100% !important;
  148. }
  149. }
  150. // page-main-outer
  151. .page-main-outer {
  152. z-index: 1;
  153. background-color: rgba($color: #ffffff, $alpha: 0.7);
  154. &-act {
  155. z-index: 19;
  156. }
  157. }
  158. // design-other-pages
  159. .design-other-pages {
  160. position: absolute;
  161. width: 2000px;
  162. left: -9999px;
  163. top: 0;
  164. z-index: 1000;
  165. visibility: hidden;
  166. }
  167. // card-head-sample
  168. .card-head-sample {
  169. position: absolute;
  170. width: 2000px;
  171. left: -9999px;
  172. top: 0;
  173. z-index: 1001;
  174. visibility: hidden;
  175. }
  176. // card-head
  177. .card-head {
  178. &-top {
  179. .el-input > .el-input__inner {
  180. text-align: center;
  181. border-radius: 0;
  182. border: 0;
  183. background-color: transparent;
  184. box-shadow: 0 0 1px #ccc;
  185. color: #000;
  186. padding: 0;
  187. letter-spacing: -1px;
  188. }
  189. }
  190. &-title {
  191. .el-input__inner {
  192. font-size: 24px;
  193. font-family: "楷体";
  194. font-weight: bold;
  195. line-height: 33px;
  196. height: 33px;
  197. }
  198. }
  199. &-subtitle {
  200. .el-input__inner {
  201. line-height: 22px;
  202. height: 22px;
  203. padding: 0 10px;
  204. }
  205. }
  206. }
  207. }
  208. .design-header {
  209. position: fixed;
  210. width: 100%;
  211. height: 50px;
  212. top: 0;
  213. left: 0;
  214. z-index: 99;
  215. padding-left: 260px;
  216. background-color: $--color-text-dark;
  217. overflow: hidden;
  218. padding: 10px 20px 10px 260px;
  219. .design-steps {
  220. position: relative;
  221. text-align: center;
  222. height: 30px;
  223. &::after {
  224. content: "";
  225. position: absolute;
  226. width: 100%;
  227. left: 0;
  228. top: 14px;
  229. border-bottom: 1px dashed $--color-text-gray;
  230. z-index: 2;
  231. }
  232. .step-item {
  233. position: absolute;
  234. top: 0;
  235. z-index: 8;
  236. padding: 0 10px;
  237. color: $--color-text-gray;
  238. &::after {
  239. content: "";
  240. position: absolute;
  241. width: 100%;
  242. left: 0;
  243. top: 14px;
  244. border-bottom: 1px solid $--color-text-dark;
  245. z-index: 5;
  246. }
  247. > i {
  248. position: relative;
  249. display: inline-block;
  250. vertical-align: middle;
  251. height: 30px;
  252. width: 30px;
  253. border-radius: 50%;
  254. border: 2px solid $--color-text-gray;
  255. line-height: 26px;
  256. font-weight: bold;
  257. z-index: 8;
  258. }
  259. > span {
  260. position: relative;
  261. display: inline-block;
  262. vertical-align: middle;
  263. margin-left: 10px;
  264. font-weight: bold;
  265. color: #999;
  266. z-index: 8;
  267. }
  268. &:first-child {
  269. left: 0;
  270. padding-left: 0;
  271. }
  272. &:last-child {
  273. right: 0;
  274. padding-right: 0;
  275. }
  276. &:nth-of-type(2) {
  277. left: 33.3%;
  278. transform: translateX(-50%);
  279. }
  280. &:nth-of-type(3) {
  281. left: 66.7%;
  282. transform: translateX(-50%);
  283. }
  284. }
  285. }
  286. }
  287. .design-action {
  288. position: fixed;
  289. width: 240px;
  290. top: 0;
  291. left: 0;
  292. bottom: 0;
  293. z-index: 100;
  294. overflow: auto;
  295. font-size: 14px;
  296. padding: 20px;
  297. background: $--color-white;
  298. border-top-right-radius: $--border-radius-huge;
  299. border-bottom-right-radius: $--border-radius-huge;
  300. .design-logo {
  301. font-size: 20px;
  302. line-height: 40px;
  303. margin-bottom: 30px;
  304. i {
  305. cursor: pointer;
  306. font-weight: 600;
  307. &:hover {
  308. color: $--color-primary;
  309. }
  310. }
  311. }
  312. .action-part {
  313. margin-bottom: 5px;
  314. color: $--color-text-dark-1;
  315. &-title {
  316. padding-bottom: 10px;
  317. border-bottom: 1px solid $--color-border;
  318. }
  319. &-body {
  320. padding: 20px 0;
  321. }
  322. }
  323. // design-action
  324. .type-list {
  325. font-size: 0;
  326. }
  327. .type-item {
  328. font-size: 14px;
  329. display: inline-block;
  330. vertical-align: top;
  331. width: 50%;
  332. text-align: center;
  333. margin-bottom: 10px;
  334. border-radius: 10px;
  335. cursor: pointer;
  336. &:nth-of-type(even) {
  337. padding-left: 5px;
  338. }
  339. &:nth-of-type(odd) {
  340. padding-right: 5px;
  341. }
  342. .el-button {
  343. width: 100%;
  344. font-size: 14px;
  345. }
  346. i {
  347. margin-right: 2px;
  348. }
  349. }
  350. }
  351. .design-main {
  352. padding: 70px 20px 50px 260px;
  353. min-height: 100%;
  354. }
  355. .design-control {
  356. position: fixed;
  357. top: 50px;
  358. left: 240px;
  359. right: 0;
  360. height: 70px;
  361. z-index: 99;
  362. background-color: $--color-background;
  363. display: flex;
  364. align-items: center;
  365. justify-content: space-between;
  366. .control-right {
  367. padding: 20px 20px 20px 0;
  368. width: 240px;
  369. text-align: right;
  370. flex-grow: 0;
  371. .el-button {
  372. width: 60px;
  373. }
  374. }
  375. .control-left {
  376. padding: 20px 0 20px 20px;
  377. white-space: nowrap;
  378. overflow-y: hidden;
  379. overflow-x: auto;
  380. flex-grow: 2;
  381. }
  382. }
  383. .design-body {
  384. position: relative;
  385. min-height: 1242px;
  386. padding-top: 50px;
  387. }
  388. // topic-list
  389. .topic-list {
  390. position: absolute;
  391. top: -2000px;
  392. left: -5000px;
  393. z-index: auto;
  394. visibility: hidden;
  395. .element-item-card-head {
  396. width: 100% !important;
  397. height: auto !important;
  398. }
  399. .page-main-inner {
  400. overflow: hidden;
  401. }
  402. }
  403. // tool-tips
  404. .tool-tips {
  405. color: $--color-text-dark-1;
  406. }
  407. // page-prop-edit
  408. .page-prop-edit {
  409. .el-form-item {
  410. margin-bottom: 5px;
  411. }
  412. .el-form-item__label,
  413. .el-checkbox {
  414. color: $--color-text-dark-1;
  415. }
  416. .column-btn {
  417. padding: 0;
  418. border: none !important;
  419. vertical-align: middle;
  420. }
  421. .topicno-list {
  422. font-size: 0;
  423. line-height: 32px;
  424. li {
  425. display: inline-block;
  426. vertical-align: middle;
  427. margin: 0 5px 0 0;
  428. width: 20px;
  429. height: 20px;
  430. line-height: 20px;
  431. text-align: center;
  432. font-size: 12px;
  433. border-radius: 5px;
  434. background-color: $--color-primary;
  435. color: #fff;
  436. }
  437. }
  438. }
  439. // element-prop-edit
  440. .edit-dialog {
  441. .el-input-split {
  442. position: relative;
  443. display: inline-block;
  444. margin: 3px 10px;
  445. width: 10px;
  446. border-bottom: 2px solid #dddddd;
  447. }
  448. .el-input-number.is-without-controls {
  449. .el-input__inner {
  450. padding-left: 5px;
  451. padding-right: 5px;
  452. }
  453. }
  454. }
  455. // element-tier-edit
  456. .element-tier-edit {
  457. .tier-menu {
  458. font-size: 0;
  459. &-item {
  460. display: inline-block;
  461. vertical-align: top;
  462. height: 26px;
  463. line-height: 26px;
  464. padding: 0 10px;
  465. font-size: 13px;
  466. cursor: pointer;
  467. border: 1px solid #eff0f5;
  468. width: 25%;
  469. text-align: center;
  470. border-top-left-radius: 3px;
  471. border-top-right-radius: 3px;
  472. &:hover {
  473. color: $--color-primary;
  474. }
  475. &.is-active {
  476. background-color: #eff0f5;
  477. color: #333;
  478. }
  479. }
  480. }
  481. .tier-list {
  482. height: 240px;
  483. overflow: auto;
  484. background-color: #eff0f5;
  485. position: relative;
  486. padding: 3px 0;
  487. border-bottom-left-radius: 3px;
  488. border-bottom-right-radius: 3px;
  489. }
  490. .tier-item {
  491. position: relative;
  492. padding: 0 5px;
  493. &.after-drop {
  494. &::after {
  495. content: "";
  496. display: block;
  497. position: absolute;
  498. width: 100%;
  499. border-bottom: 2px solid $--color-text-dark;
  500. bottom: -2px;
  501. left: 0;
  502. z-index: 9;
  503. }
  504. }
  505. &.before-drop {
  506. &::before {
  507. content: "";
  508. display: block;
  509. position: absolute;
  510. width: 100%;
  511. border-top: 2px solid $--color-text-dark;
  512. top: -2px;
  513. left: 0;
  514. z-index: 9;
  515. }
  516. }
  517. &-cont {
  518. padding: 5px 10px;
  519. background-color: #fff;
  520. border: 1px solid #e0e0e0;
  521. border-radius: 3px;
  522. height: 30px;
  523. line-height: 20px;
  524. font-size: 13px;
  525. overflow: hidden;
  526. text-overflow: ellipsis;
  527. white-space: nowrap;
  528. cursor: pointer;
  529. &:hover {
  530. color: $--color-primary;
  531. }
  532. &.is-active {
  533. border-color: $--color-primary;
  534. color: $--color-primary;
  535. }
  536. }
  537. }
  538. }
  539. // right-menu-body
  540. .right-menu-body {
  541. border: 1px solid #cccccc;
  542. border-radius: 5px;
  543. overflow: hidden;
  544. background-color: #fff;
  545. font-size: 14px;
  546. color: #666666;
  547. box-shadow: 5px 5px 4px 0px rgba(0, 0, 0, 0.1);
  548. li {
  549. padding: 6px;
  550. font-weight: 400;
  551. cursor: pointer;
  552. &:hover {
  553. background-color: #f6f6f6;
  554. color: $--color-primary;
  555. }
  556. &.li-danger:hover {
  557. color: $--color-danger;
  558. }
  559. &:not(:last-child) {
  560. border-bottom: 1px solid #dddddd;
  561. }
  562. }
  563. }
  564. // design-preview-frame
  565. .design-preview-frame {
  566. position: absolute;
  567. width: 1000px;
  568. height: 600px;
  569. left: -9999px;
  570. top: 0;
  571. z-index: 1001;
  572. visibility: hidden;
  573. }
  574. // card custom-select
  575. .custom-select {
  576. width: 100%;
  577. .select-preview {
  578. height: 32px;
  579. line-height: 30px;
  580. border: 1px solid #e0e0e0;
  581. border-radius: 5px;
  582. position: relative;
  583. overflow: hidden;
  584. cursor: pointer;
  585. &:hover {
  586. border-color: #b0b0b0;
  587. }
  588. &-main {
  589. padding: 0 30px 0 15px;
  590. }
  591. &-icon {
  592. position: absolute;
  593. top: 0;
  594. right: 0;
  595. width: 30px;
  596. height: 100%;
  597. background-color: #fff;
  598. text-align: center;
  599. }
  600. }
  601. }
  602. // color-select
  603. .color-item {
  604. display: inline-block;
  605. vertical-align: middle;
  606. width: 100px;
  607. height: 26px;
  608. }
  609. .color-menu .el-dropdown-menu__item {
  610. line-height: 30px;
  611. padding: 0 15px;
  612. }
  613. // line-style-select
  614. .style-item {
  615. display: inline-block;
  616. vertical-align: middle;
  617. width: 100px;
  618. border-bottom-width: 2px;
  619. border-bottom-color: #000;
  620. }
  621. .line-style-menu .el-dropdown-menu__item {
  622. line-height: 24px;
  623. padding: 0 10px;
  624. }
  625. // line-width-select
  626. .width-item {
  627. display: inline-block;
  628. vertical-align: middle;
  629. width: 100px;
  630. > i {
  631. display: inline-block;
  632. vertical-align: middle;
  633. width: 65px;
  634. border-bottom: 1pt solid #000;
  635. }
  636. > span {
  637. display: block;
  638. float: right;
  639. line-height: 28px;
  640. width: 40px;
  641. margin-right: -10px;
  642. text-align: center;
  643. }
  644. }
  645. .line-width-menu .el-dropdown-menu__item {
  646. line-height: 24px;
  647. padding: 0 10px;
  648. }
  649. .edit-dialog {
  650. .el-dialog__footer {
  651. text-align: right;
  652. }
  653. }
  654. // paper-params
  655. .paper-params {
  656. .params-dialog-title {
  657. font-size: 16px;
  658. > span {
  659. font-size: 14px;
  660. margin-left: 24px;
  661. color: $--color-text-gray-1;
  662. }
  663. }
  664. .params-main {
  665. margin-top: -10px;
  666. padding: 0 10px;
  667. }
  668. .params-head {
  669. margin-bottom: 20px;
  670. }
  671. .params-part {
  672. margin: 15px 0;
  673. }
  674. .params-title {
  675. margin-bottom: 10px;
  676. }
  677. .params-subtitle {
  678. margin-bottom: 10px;
  679. > span {
  680. display: inline-block;
  681. vertical-align: middle;
  682. &:first-child {
  683. margin-right: 20px;
  684. }
  685. }
  686. .el-input-number {
  687. width: 60px;
  688. margin: 0 5px;
  689. }
  690. }
  691. .param-sum-score {
  692. color: $--color-danger;
  693. }
  694. }
  695. // element-guide-lines
  696. .element-guide-lines {
  697. .guide-line {
  698. position: absolute;
  699. z-index: 999;
  700. &-x {
  701. border-bottom: 1px solid $--color-success;
  702. }
  703. &-y {
  704. border-left: 1px solid $--color-success;
  705. }
  706. }
  707. }
  708. // card-free-design
  709. .card-free-design {
  710. .page-column-main {
  711. overflow: hidden;
  712. }
  713. .topic-design {
  714. position: absolute;
  715. }
  716. .design-header {
  717. &-cont {
  718. height: 100%;
  719. }
  720. .btn-help {
  721. font-size: 20px;
  722. padding: 0;
  723. }
  724. }
  725. .design-action {
  726. .action-part {
  727. &-title {
  728. padding-bottom: 5px;
  729. }
  730. &-body {
  731. padding: 10px 0;
  732. }
  733. }
  734. }
  735. .control-left {
  736. .el-button {
  737. position: relative;
  738. }
  739. .page-delete {
  740. display: block;
  741. position: absolute;
  742. top: 0;
  743. right: 0;
  744. margin-top: -8px;
  745. margin-right: -8px;
  746. font-size: 14px;
  747. color: $--color-danger;
  748. cursor: pointer;
  749. &:hover {
  750. color: mix(#000, $--color-danger, 20%);
  751. }
  752. }
  753. }
  754. }
  755. // shortcut-key-spin
  756. .shortcut-key-spin {
  757. position: relative;
  758. display: inline-block;
  759. vertical-align: middle;
  760. border-radius: 5px;
  761. padding: 0 5px;
  762. background-color: $--color-text-gray-5;
  763. color: $--color-text-dark-1;
  764. &:not(:first-child) {
  765. margin-left: 20px;
  766. &::before {
  767. content: "+";
  768. display: block;
  769. position: absolute;
  770. left: -15px;
  771. top: 50%;
  772. transform: translateY(-50%);
  773. }
  774. }
  775. }