card-design.scss 16 KB

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