card-design.scss 15 KB

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