card-design.scss 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833
  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-weight: bold;
  194. line-height: 33px;
  195. height: 33px;
  196. }
  197. }
  198. &-subtitle {
  199. .el-input__inner {
  200. line-height: 22px;
  201. height: 22px;
  202. padding: 0 10px;
  203. }
  204. }
  205. }
  206. }
  207. .design-header {
  208. position: fixed;
  209. width: 100%;
  210. height: 50px;
  211. top: 0;
  212. left: 0;
  213. z-index: 99;
  214. padding-left: 260px;
  215. background-color: $--color-text-dark;
  216. overflow: hidden;
  217. padding: 10px 20px 10px 260px;
  218. .design-steps {
  219. position: relative;
  220. text-align: center;
  221. height: 30px;
  222. &::after {
  223. content: "";
  224. position: absolute;
  225. width: 100%;
  226. left: 0;
  227. top: 14px;
  228. border-bottom: 1px dashed $--color-text-gray;
  229. z-index: 2;
  230. }
  231. .step-item {
  232. position: absolute;
  233. top: 0;
  234. z-index: 8;
  235. padding: 0 10px;
  236. color: $--color-text-gray;
  237. &::after {
  238. content: "";
  239. position: absolute;
  240. width: 100%;
  241. left: 0;
  242. top: 14px;
  243. border-bottom: 1px solid $--color-text-dark;
  244. z-index: 5;
  245. }
  246. > i {
  247. position: relative;
  248. display: inline-block;
  249. vertical-align: middle;
  250. height: 30px;
  251. width: 30px;
  252. border-radius: 50%;
  253. border: 2px solid $--color-text-gray;
  254. line-height: 26px;
  255. font-weight: bold;
  256. z-index: 8;
  257. }
  258. > span {
  259. position: relative;
  260. display: inline-block;
  261. vertical-align: middle;
  262. margin-left: 10px;
  263. font-weight: bold;
  264. color: #999;
  265. z-index: 8;
  266. }
  267. &:first-child {
  268. left: 0;
  269. padding-left: 0;
  270. }
  271. &:last-child {
  272. right: 0;
  273. padding-right: 0;
  274. }
  275. &:nth-of-type(2) {
  276. left: 33.3%;
  277. transform: translateX(-50%);
  278. }
  279. &:nth-of-type(3) {
  280. left: 66.7%;
  281. transform: translateX(-50%);
  282. }
  283. }
  284. }
  285. }
  286. .design-action {
  287. position: fixed;
  288. width: 240px;
  289. top: 0;
  290. left: 0;
  291. bottom: 0;
  292. z-index: 100;
  293. overflow: auto;
  294. font-size: 14px;
  295. padding: 20px;
  296. background: $--color-white;
  297. border-top-right-radius: $--border-radius-huge;
  298. border-bottom-right-radius: $--border-radius-huge;
  299. .design-logo {
  300. font-size: 20px;
  301. line-height: 40px;
  302. margin-bottom: 30px;
  303. i {
  304. cursor: pointer;
  305. font-weight: 600;
  306. &:hover {
  307. color: $--color-primary;
  308. }
  309. }
  310. }
  311. .action-part {
  312. margin-bottom: 5px;
  313. color: $--color-text-dark-1;
  314. &-title {
  315. padding-bottom: 10px;
  316. border-bottom: 1px solid $--color-border;
  317. }
  318. &-body {
  319. padding: 20px 0;
  320. }
  321. }
  322. // design-action
  323. .type-list {
  324. font-size: 0;
  325. }
  326. .type-item {
  327. font-size: 14px;
  328. display: inline-block;
  329. vertical-align: top;
  330. width: 50%;
  331. text-align: center;
  332. margin-bottom: 10px;
  333. border-radius: 10px;
  334. cursor: pointer;
  335. &:nth-of-type(even) {
  336. padding-left: 5px;
  337. }
  338. &:nth-of-type(odd) {
  339. padding-right: 5px;
  340. }
  341. .el-button {
  342. width: 100%;
  343. font-size: 14px;
  344. }
  345. i {
  346. margin-right: 2px;
  347. }
  348. }
  349. }
  350. .design-main {
  351. padding: 70px 20px 50px 260px;
  352. min-height: 100%;
  353. }
  354. .design-control {
  355. position: fixed;
  356. top: 50px;
  357. left: 240px;
  358. right: 0;
  359. height: 70px;
  360. z-index: 99;
  361. background-color: $--color-background;
  362. display: flex;
  363. align-items: center;
  364. justify-content: space-between;
  365. .control-right {
  366. padding: 20px 20px 20px 0;
  367. width: 240px;
  368. text-align: right;
  369. flex-grow: 0;
  370. .el-button {
  371. width: 60px;
  372. }
  373. }
  374. .control-left {
  375. padding: 20px 0 20px 20px;
  376. white-space: nowrap;
  377. overflow-y: hidden;
  378. overflow-x: auto;
  379. flex-grow: 2;
  380. }
  381. }
  382. .design-body {
  383. position: relative;
  384. min-height: 1242px;
  385. padding-top: 50px;
  386. }
  387. // topic-list
  388. .topic-list {
  389. position: absolute;
  390. top: -2000px;
  391. left: -5000px;
  392. z-index: auto;
  393. visibility: hidden;
  394. .element-item-card-head {
  395. width: 100% !important;
  396. height: auto !important;
  397. }
  398. .page-main-inner {
  399. overflow: hidden;
  400. }
  401. }
  402. // tool-tips
  403. .tool-tips {
  404. color: $--color-text-dark-1;
  405. }
  406. // page-prop-edit
  407. .page-prop-edit {
  408. .el-form-item {
  409. margin-bottom: 5px;
  410. }
  411. .el-form-item__label,
  412. .el-checkbox {
  413. color: $--color-text-dark-1;
  414. }
  415. .el-form-item__label {
  416. padding-right: 10px;
  417. }
  418. .column-btn {
  419. padding: 0;
  420. border: none !important;
  421. vertical-align: middle;
  422. }
  423. .topicno-list {
  424. font-size: 0;
  425. line-height: 32px;
  426. li {
  427. display: inline-block;
  428. vertical-align: middle;
  429. margin: 0 5px 0 0;
  430. width: 20px;
  431. height: 20px;
  432. line-height: 20px;
  433. text-align: center;
  434. font-size: 12px;
  435. border-radius: 5px;
  436. background-color: $--color-primary;
  437. color: #fff;
  438. }
  439. }
  440. }
  441. // element-prop-edit
  442. .edit-dialog {
  443. .el-input-split {
  444. position: relative;
  445. display: inline-block;
  446. margin: 3px 10px;
  447. width: 10px;
  448. border-bottom: 2px solid #dddddd;
  449. }
  450. .el-input-number.is-without-controls {
  451. .el-input__inner {
  452. padding-left: 5px;
  453. padding-right: 5px;
  454. }
  455. }
  456. }
  457. // element-tier-edit
  458. .element-tier-edit {
  459. .tier-menu {
  460. font-size: 0;
  461. &-item {
  462. display: inline-block;
  463. vertical-align: top;
  464. height: 26px;
  465. line-height: 26px;
  466. padding: 0 10px;
  467. font-size: 13px;
  468. cursor: pointer;
  469. border: 1px solid #eff0f5;
  470. width: 25%;
  471. text-align: center;
  472. border-top-left-radius: 3px;
  473. border-top-right-radius: 3px;
  474. &:hover {
  475. color: $--color-primary;
  476. }
  477. &.is-active {
  478. background-color: #eff0f5;
  479. color: #333;
  480. }
  481. }
  482. }
  483. .tier-list {
  484. height: 240px;
  485. overflow: auto;
  486. background-color: #eff0f5;
  487. position: relative;
  488. padding: 3px 0;
  489. border-bottom-left-radius: 3px;
  490. border-bottom-right-radius: 3px;
  491. }
  492. .tier-item {
  493. position: relative;
  494. padding: 0 5px;
  495. &.after-drop {
  496. &::after {
  497. content: "";
  498. display: block;
  499. position: absolute;
  500. width: 100%;
  501. border-bottom: 2px solid $--color-text-dark;
  502. bottom: -2px;
  503. left: 0;
  504. z-index: 9;
  505. }
  506. }
  507. &.before-drop {
  508. &::before {
  509. content: "";
  510. display: block;
  511. position: absolute;
  512. width: 100%;
  513. border-top: 2px solid $--color-text-dark;
  514. top: -2px;
  515. left: 0;
  516. z-index: 9;
  517. }
  518. }
  519. &-cont {
  520. padding: 5px 10px;
  521. background-color: #fff;
  522. border: 1px solid #e0e0e0;
  523. border-radius: 3px;
  524. height: 30px;
  525. line-height: 20px;
  526. font-size: 13px;
  527. overflow: hidden;
  528. text-overflow: ellipsis;
  529. white-space: nowrap;
  530. cursor: pointer;
  531. &:hover {
  532. color: $--color-primary;
  533. }
  534. &.is-active {
  535. border-color: $--color-primary;
  536. color: $--color-primary;
  537. }
  538. }
  539. }
  540. }
  541. // right-menu-body
  542. .right-menu-body {
  543. border: 1px solid #cccccc;
  544. border-radius: 5px;
  545. overflow: hidden;
  546. background-color: #fff;
  547. font-size: 14px;
  548. color: #666666;
  549. box-shadow: 5px 5px 4px 0px rgba(0, 0, 0, 0.1);
  550. li {
  551. padding: 6px;
  552. font-weight: 400;
  553. cursor: pointer;
  554. &:hover {
  555. background-color: #f6f6f6;
  556. color: $--color-primary;
  557. }
  558. &.li-danger:hover {
  559. color: $--color-danger;
  560. }
  561. &:not(:last-child) {
  562. border-bottom: 1px solid #dddddd;
  563. }
  564. }
  565. }
  566. // design-preview-frame
  567. .design-preview-frame {
  568. position: absolute;
  569. width: 1000px;
  570. height: 600px;
  571. left: -9999px;
  572. top: 0;
  573. z-index: 1001;
  574. visibility: hidden;
  575. }
  576. // card custom-select
  577. .custom-select {
  578. width: 100%;
  579. .select-preview {
  580. height: 32px;
  581. line-height: 30px;
  582. border: 1px solid #e0e0e0;
  583. border-radius: 5px;
  584. position: relative;
  585. overflow: hidden;
  586. cursor: pointer;
  587. &:hover {
  588. border-color: #b0b0b0;
  589. }
  590. &-main {
  591. padding: 0 30px 0 15px;
  592. }
  593. &-icon {
  594. position: absolute;
  595. top: 0;
  596. right: 0;
  597. width: 30px;
  598. height: 100%;
  599. background-color: #fff;
  600. text-align: center;
  601. }
  602. }
  603. }
  604. // color-select
  605. .color-item {
  606. display: inline-block;
  607. vertical-align: middle;
  608. width: 100px;
  609. height: 26px;
  610. }
  611. .color-menu .el-dropdown-menu__item {
  612. line-height: 30px;
  613. padding: 0 15px;
  614. }
  615. // line-style-select
  616. .style-item {
  617. display: inline-block;
  618. vertical-align: middle;
  619. width: 100px;
  620. border-bottom-width: 2px;
  621. border-bottom-color: #000;
  622. }
  623. .line-style-menu .el-dropdown-menu__item {
  624. line-height: 24px;
  625. padding: 0 10px;
  626. }
  627. // line-width-select
  628. .width-item {
  629. display: inline-block;
  630. vertical-align: middle;
  631. width: 100px;
  632. > i {
  633. display: inline-block;
  634. vertical-align: middle;
  635. width: 65px;
  636. border-bottom: 1pt solid #000;
  637. }
  638. > span {
  639. display: block;
  640. float: right;
  641. line-height: 28px;
  642. width: 40px;
  643. margin-right: -10px;
  644. text-align: center;
  645. }
  646. }
  647. .line-width-menu .el-dropdown-menu__item {
  648. line-height: 24px;
  649. padding: 0 10px;
  650. }
  651. .edit-dialog {
  652. .el-dialog__footer {
  653. text-align: right;
  654. }
  655. }
  656. // paper-params
  657. .paper-params {
  658. .params-dialog-title {
  659. font-size: 16px;
  660. > span {
  661. font-size: 14px;
  662. margin-left: 24px;
  663. color: $--color-text-gray-1;
  664. }
  665. }
  666. .params-main {
  667. margin-top: -10px;
  668. padding: 0 10px;
  669. }
  670. .params-head {
  671. margin-bottom: 20px;
  672. }
  673. .params-part {
  674. margin: 15px 0;
  675. }
  676. .params-title {
  677. margin-bottom: 10px;
  678. }
  679. .params-subtitle {
  680. margin-bottom: 10px;
  681. > span {
  682. display: inline-block;
  683. vertical-align: middle;
  684. &:first-child {
  685. margin-right: 20px;
  686. }
  687. }
  688. .el-input-number {
  689. width: 60px;
  690. margin: 0 5px;
  691. }
  692. }
  693. .param-sum-score {
  694. color: $--color-danger;
  695. }
  696. }
  697. // element-guide-lines
  698. .element-guide-lines {
  699. .guide-line {
  700. position: absolute;
  701. z-index: 999;
  702. &-x {
  703. border-bottom: 1px solid $--color-success;
  704. }
  705. &-y {
  706. border-left: 1px solid $--color-success;
  707. }
  708. }
  709. }
  710. // card-free-design
  711. .card-free-design {
  712. .page-column-main {
  713. overflow: hidden;
  714. }
  715. .topic-design {
  716. position: absolute;
  717. }
  718. .design-header {
  719. &-cont {
  720. height: 100%;
  721. }
  722. .btn-help {
  723. font-size: 20px;
  724. padding: 0;
  725. }
  726. }
  727. .design-action {
  728. .action-part {
  729. &-title {
  730. padding-bottom: 5px;
  731. }
  732. &-body {
  733. padding: 10px 0;
  734. }
  735. }
  736. }
  737. .control-left {
  738. .el-button {
  739. position: relative;
  740. }
  741. .page-delete {
  742. display: block;
  743. position: absolute;
  744. top: 0;
  745. right: 0;
  746. margin-top: -8px;
  747. margin-right: -8px;
  748. font-size: 14px;
  749. color: $--color-danger;
  750. cursor: pointer;
  751. &:hover {
  752. color: mix(#000, $--color-danger, 20%);
  753. }
  754. }
  755. }
  756. }
  757. // shortcut-key-spin
  758. .shortcut-key-spin {
  759. position: relative;
  760. display: inline-block;
  761. vertical-align: middle;
  762. border-radius: 5px;
  763. padding: 0 5px;
  764. background-color: $--color-text-gray-5;
  765. color: $--color-text-dark-1;
  766. &:not(:first-child) {
  767. margin-left: 20px;
  768. &::before {
  769. content: "+";
  770. display: block;
  771. position: absolute;
  772. left: -15px;
  773. top: 50%;
  774. transform: translateY(-50%);
  775. }
  776. }
  777. }