card-design.scss 15 KB

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