input.scss 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  1. /**Variable**/
  2. @import './helpers/mixin.scss';
  3. $iconWidth: 1.6em;
  4. .vxe-input--inner {
  5. width: 100%;
  6. height: 100%;
  7. border-radius: $vxe-border-radius;
  8. outline: 0;
  9. margin: 0;
  10. font-size: inherit;
  11. font-family: inherit;
  12. line-height: inherit;
  13. padding: 0 0.6em;
  14. color: $vxe-font-color;
  15. border: 1px solid $vxe-input-border-color;
  16. background-color: $vxe-input-background-color;
  17. box-shadow: none;
  18. &::placeholder {
  19. color: $vxe-input-placeholder-color;
  20. }
  21. &::-webkit-autofill {
  22. background-color: $vxe-input-background-color;
  23. }
  24. &[type="number"] {
  25. appearance: none;
  26. -moz-appearance: textfield;
  27. }
  28. &[type="search"],
  29. &[type="search"]::-webkit-search-cancel-button,
  30. &[type="number"]::-webkit-outer-spin-button,
  31. &[type="number"]::-webkit-inner-spin-button {
  32. appearance: none;
  33. }
  34. &[disabled] {
  35. cursor: not-allowed;
  36. color: $vxe-disabled-color;
  37. background-color: $vxe-input-disabled-background-color;
  38. }
  39. }
  40. .vxe-input {
  41. display: inline-block;
  42. position: relative;
  43. width: 180px;
  44. &.is--disabled {
  45. .vxe-input--date-picker-suffix,
  46. .vxe-input--search-suffix,
  47. .vxe-input--suffix,
  48. .vxe-input--password-suffix,
  49. .vxe-input--number-suffix {
  50. cursor: no-drop;
  51. }
  52. }
  53. &:not(.is--disabled) {
  54. .vxe-input--search-suffix,
  55. .vxe-input--clear-icon,
  56. .vxe-input--password-suffix,
  57. .vxe-input--number-suffix {
  58. cursor: pointer;
  59. }
  60. &.is--active {
  61. .vxe-input--inner {
  62. border: 1px solid $vxe-primary-color;
  63. }
  64. }
  65. }
  66. .vxe-input--prefix,
  67. .vxe-input--suffix,
  68. .vxe-input--extra-suffix {
  69. display: flex;
  70. position: absolute;
  71. top: 0;
  72. width: $iconWidth;
  73. height: 100%;
  74. user-select: none;
  75. align-items: center;
  76. justify-content: center;
  77. color: $vxe-table-column-icon-border-color;
  78. }
  79. }
  80. // 前缀图标
  81. .vxe-input {
  82. .vxe-input--prefix {
  83. left: 0.2em;
  84. }
  85. &.is--prefix {
  86. .vxe-input--inner {
  87. padding-left: $iconWidth + 0.2em;
  88. }
  89. }
  90. }
  91. // 后缀图标
  92. .vxe-input {
  93. .vxe-input--clear-icon {
  94. display: none;
  95. }
  96. .vxe-input--suffix,
  97. .vxe-input--extra-suffix {
  98. right: 0.2em;
  99. }
  100. &.is--suffix {
  101. .vxe-input--inner {
  102. padding-right: $iconWidth + 0.2em;
  103. }
  104. }
  105. &.is--left {
  106. .vxe-input--inner {
  107. text-align: left;
  108. }
  109. }
  110. &.is--center {
  111. .vxe-input--inner {
  112. text-align: center;
  113. }
  114. }
  115. &.is--right {
  116. .vxe-input--inner {
  117. text-align: right;
  118. }
  119. }
  120. &.is--controls {
  121. &.type--search,
  122. &.type--password,
  123. &.type--number,
  124. &.type--integer,
  125. &.type--float,
  126. &.type--date,
  127. &.type--datetime,
  128. &.type--week,
  129. &.type--month,
  130. &.type--quarter,
  131. &.type--year,
  132. &.type--time {
  133. .vxe-input--inner {
  134. padding-right: $iconWidth + 0.2em;
  135. }
  136. .vxe-input--suffix {
  137. right: $iconWidth;
  138. }
  139. }
  140. }
  141. &.is--suffix {
  142. &.is--controls {
  143. &.type--search,
  144. &.type--password,
  145. &.type--number,
  146. &.type--integer,
  147. &.type--float,
  148. &.type--date,
  149. &.type--datetime,
  150. &.type--week,
  151. &.type--month,
  152. &.type--quarter,
  153. &.type--year,
  154. &.type--time {
  155. .vxe-input--inner {
  156. padding-right: $iconWidth * 2;
  157. }
  158. }
  159. }
  160. }
  161. &.is--suffix {
  162. &:hover {
  163. .vxe-input--suffix {
  164. &.is--clear {
  165. .vxe-input--suffix-icon {
  166. display: none;
  167. }
  168. .vxe-input--clear-icon {
  169. display: inline;
  170. }
  171. }
  172. }
  173. }
  174. }
  175. &:not(.is--disabled) {
  176. .vxe-input--suffix {
  177. &:hover {
  178. .vxe-input--clear-icon {
  179. color: $vxe-font-color;
  180. }
  181. }
  182. &:active {
  183. .vxe-input--clear-icon {
  184. color: $vxe-primary-color;
  185. }
  186. }
  187. }
  188. .vxe-input--extra-suffix {
  189. &:hover {
  190. .vxe-input--search-suffix,
  191. .vxe-input--password-suffix {
  192. color: $vxe-font-color;
  193. }
  194. }
  195. &:active {
  196. .vxe-input--search-suffix,
  197. .vxe-input--password-suffix {
  198. color: $vxe-primary-color;
  199. }
  200. }
  201. }
  202. .vxe-input--number-prev,
  203. .vxe-input--number-next {
  204. &:hover {
  205. color: $vxe-font-color;
  206. }
  207. &:active {
  208. color: $vxe-primary-color;
  209. }
  210. &.is--disabled {
  211. cursor: no-drop;
  212. color: $vxe-input-number-disabled-color;
  213. }
  214. }
  215. }
  216. }
  217. .vxe-input {
  218. .vxe-input--password-suffix,
  219. .vxe-input--number-suffix,
  220. .vxe-input--date-picker-suffix,
  221. .vxe-input--search-suffix {
  222. position: relative;
  223. width: 100%;
  224. height: 100%;
  225. }
  226. .vxe-input--date-picker-icon,
  227. .vxe-input--search-icon,
  228. .vxe-input--password-icon {
  229. position: absolute;
  230. left: 50%;
  231. top: 50%;
  232. transform: translate(-50%, -50%);
  233. &[class*="vxe-icon-"] {
  234. font-size: 1.2em;
  235. }
  236. }
  237. .vxe-input--date-picker-suffix {
  238. display: flex;
  239. align-items: center;
  240. justify-content: center;
  241. .vxe-input--panel-icon {
  242. @include animatTransition(transform, .2s);
  243. }
  244. }
  245. .vxe-input--number-prev,
  246. .vxe-input--number-next {
  247. position: relative;
  248. display: block;
  249. height: 50%;
  250. width: 100%;
  251. text-align: center;
  252. }
  253. .vxe-input--number-prev-icon,
  254. .vxe-input--number-next-icon {
  255. line-height: 0.8em;
  256. position: absolute;
  257. left: 50%;
  258. transform: translateX(-50%);
  259. }
  260. .vxe-input--number-prev-icon {
  261. bottom: 0;
  262. }
  263. .vxe-input--number-next-icon {
  264. top: 0;
  265. }
  266. }
  267. .vxe-input--panel {
  268. display: none;
  269. position: absolute;
  270. left: 0;
  271. padding: 4px 0;
  272. color: $vxe-font-color;
  273. font-size: $vxe-font-size;
  274. text-align: left;
  275. &:not(.is--transfer) {
  276. min-width: 100%;
  277. }
  278. &.is--transfer {
  279. position: fixed;
  280. }
  281. &.animat--leave {
  282. display: block;
  283. opacity: 0;
  284. transform: scaleY(0.5);
  285. transition: transform .3s cubic-bezier(.23,1,.32,1), opacity .3s cubic-bezier(.23,1,.32,1);
  286. transform-origin: center top;
  287. backface-visibility: hidden;
  288. transform-style: preserve-3d;
  289. &[placement="top"] {
  290. transform-origin: center bottom;
  291. }
  292. }
  293. &.animat--enter {
  294. opacity: 1;
  295. transform: scaleY(1);
  296. }
  297. }
  298. .vxe-input--panel-wrapper,
  299. .vxe-input--panel-layout-wrapper {
  300. background-color: $vxe-input-panel-background-color;
  301. border: 1px solid $vxe-table-popup-border-color;
  302. box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
  303. border-radius: $vxe-border-radius;
  304. }
  305. .vxe-input--panel-wrapper {
  306. overflow-x: hidden;
  307. overflow-y: auto;
  308. }
  309. .vxe-input--panel-layout-wrapper {
  310. display: flex;
  311. flex-direction: row;
  312. }
  313. .vxe-input--panel {
  314. &.type--date,
  315. &.type--week,
  316. &.type--month,
  317. &.type--quarter,
  318. &.type--year {
  319. user-select: none;
  320. }
  321. &.type--datetime {
  322. .vxe-input--panel-right-wrapper {
  323. display: flex;
  324. flex-direction: column;
  325. border-left: 1px solid $vxe-input-border-color;
  326. }
  327. }
  328. &.type--date,
  329. &.type--datetime {
  330. .vxe-input--date-picker-body {
  331. th {
  332. width: 14.28571%;
  333. }
  334. }
  335. }
  336. &.type--week {
  337. .vxe-input--date-picker-body {
  338. table {
  339. th {
  340. width: 12%;
  341. &:first-child {
  342. width: 14%;
  343. }
  344. }
  345. }
  346. }
  347. }
  348. &.type--quarter {
  349. .vxe-input--date-picker-body {
  350. table {
  351. th {
  352. width: 50%;
  353. }
  354. }
  355. }
  356. }
  357. &.type--month,
  358. &.type--year {
  359. .vxe-input--date-picker-body {
  360. td {
  361. width: 25%;
  362. }
  363. }
  364. }
  365. }
  366. .vxe-input--time-picker-title {
  367. display: inline-block;
  368. text-align: center;
  369. border: 1px solid $vxe-input-border-color;
  370. border-radius: $vxe-border-radius;
  371. }
  372. .vxe-input--time-picker-confirm {
  373. position: absolute;
  374. right: 0;
  375. top: 0;
  376. }
  377. .vxe-input--time-picker-confirm,
  378. .vxe-input--date-picker-confirm {
  379. outline: 0;
  380. border: 1px solid $vxe-input-border-color;
  381. border-radius: $vxe-border-radius;
  382. cursor: pointer;
  383. color: $vxe-input-date-time-confirm-button-color;
  384. border-color: $vxe-primary-color;
  385. background-color: $vxe-primary-color;
  386. &:hover {
  387. background-color: lighten($vxe-primary-color, 6%);
  388. border-color: lighten($vxe-primary-color, 6%);
  389. }
  390. &:active {
  391. background-color: darken($vxe-primary-color, 3%);
  392. border-color: darken($vxe-primary-color, 3%);
  393. }
  394. }
  395. .vxe-input--time-picker-header {
  396. display: flex;
  397. position: relative;
  398. flex-shrink: 0;
  399. }
  400. .vxe-input--date-picker-header {
  401. display: flex;
  402. flex-direction: row;
  403. user-select: none;
  404. .vxe-input--date-picker-type-wrapper {
  405. flex-grow: 1;
  406. }
  407. .vxe-input--date-picker-btn-wrapper {
  408. flex-shrink: 0;
  409. text-align: center;
  410. }
  411. }
  412. .vxe-input--date-picker-type-wrapper {
  413. .vxe-input--date-picker-label,
  414. .vxe-input--date-picker-btn {
  415. display: inline-block;
  416. }
  417. }
  418. .vxe-input--date-picker-btn-wrapper {
  419. display: flex;
  420. flex-direction: row;
  421. }
  422. .vxe-input--date-picker-label,
  423. .vxe-input--date-picker-btn {
  424. display: inline-block;
  425. display: flex;
  426. align-items: center;
  427. justify-content: center;
  428. background-color: $vxe-button-default-background-color;
  429. }
  430. .vxe-input--date-picker-btn {
  431. &.is--disabled {
  432. color: $vxe-disabled-color;
  433. cursor: no-drop;
  434. }
  435. &:not(.is--disabled) {
  436. cursor: pointer;
  437. &:hover {
  438. background-color: lighten($vxe-button-default-background-color, 6%);
  439. }
  440. &:active {
  441. background-color: darken($vxe-button-default-background-color, 3%);
  442. }
  443. }
  444. }
  445. .vxe-input--date-picker-body {
  446. border-radius: $vxe-border-radius;
  447. border: 1px solid $vxe-table-popup-border-color;
  448. user-select: none;
  449. table {
  450. border: 0;
  451. width: 100%;
  452. border-spacing: 0;
  453. border-collapse: separate;
  454. text-align: center;
  455. table-layout: fixed
  456. }
  457. th,
  458. td {
  459. font-weight: normal;
  460. }
  461. th {
  462. box-shadow: inset 0 -1px 0 0 $vxe-table-popup-border-color;
  463. }
  464. td {
  465. &.is--prev,
  466. &.is--next {
  467. color: $vxe-disabled-color;
  468. .vxe-input--date-label,
  469. .vxe-input--date-festival {
  470. color: $vxe-disabled-color;
  471. }
  472. }
  473. &.is--now {
  474. box-shadow: inset 0 0 0 1px $vxe-table-popup-border-color;
  475. &:not(.is--selected) {
  476. &.is--current {
  477. color: $vxe-primary-color;
  478. .vxe-input--date-label,
  479. .vxe-input--date-festival {
  480. color: $vxe-primary-color;
  481. }
  482. }
  483. }
  484. }
  485. &.is--hover {
  486. background-color: $vxe-input-date-picker-hover-background-color;
  487. }
  488. &.is--selected {
  489. color: $vxe-input-date-picker-selected-color;
  490. background-color: $vxe-primary-color;
  491. &.is--prev,
  492. &.is--next {
  493. background-color: lighten($vxe-primary-color, 10%);
  494. }
  495. .vxe-input--date-label,
  496. .vxe-input--date-festival {
  497. color: $vxe-input-date-picker-festival-selected-color;
  498. }
  499. .vxe-input--date-label {
  500. &.is-notice {
  501. &:before {
  502. background-color: $vxe-input-date-picker-notice-selected-background-color;
  503. }
  504. }
  505. }
  506. }
  507. &:not(.is--disabled) {
  508. cursor: pointer;
  509. }
  510. &.is--disabled {
  511. cursor: no-drop;
  512. color: $vxe-input-disabled-color;
  513. background-color: $vxe-input-disabled-background-color;
  514. .vxe-input--date-label,
  515. .vxe-input--date-festival {
  516. color: $vxe-input-disabled-color;
  517. }
  518. }
  519. }
  520. }
  521. .vxe-input--date-week-view {
  522. th {
  523. &:first-child {
  524. box-shadow: inset -1px -1px 0 0 $vxe-table-popup-border-color;
  525. }
  526. }
  527. td {
  528. &:first-child {
  529. box-shadow: inset -1px 0 0 0 $vxe-table-popup-border-color;
  530. }
  531. }
  532. }
  533. .vxe-input--date-label,
  534. .vxe-input--date-festival {
  535. display: block;
  536. overflow: hidden;
  537. }
  538. .vxe-input--date-label {
  539. position: relative;
  540. &.is-notice {
  541. &:before {
  542. content: "";
  543. position: absolute;
  544. width: 4px;
  545. height: 4px;
  546. left: 0.8em;
  547. top: 0.1em;
  548. transform: translateX(-50%);
  549. border-radius: 100%;
  550. background-color: $vxe-input-date-notice-background-color;
  551. }
  552. }
  553. }
  554. .vxe-input--date-label--extra {
  555. position: absolute;
  556. right: 0.1em;
  557. top: -0.2em;
  558. font-size: 12px;
  559. line-height: 12px;
  560. transform: scale(0.7);
  561. color: $vxe-input-date-extra-color;
  562. &.is-important {
  563. color: $vxe-input-date-extra-important-color;
  564. }
  565. }
  566. .vxe-input--date-festival {
  567. color: $vxe-input-date-festival-color;
  568. height: 14px;
  569. line-height: 1;
  570. overflow: hidden;
  571. &.is-important {
  572. color: $vxe-input-date-festival-important-color;
  573. }
  574. }
  575. .vxe-input--date-festival--label {
  576. display: block;
  577. font-size: 12px;
  578. transform: scale(0.8);
  579. }
  580. @keyframes festivalOverlap2 {
  581. 0%, 45%, 100% {
  582. transform: translateY(0);
  583. }
  584. 50%, 95% {
  585. transform: translateY(-14px);
  586. }
  587. }
  588. @keyframes festivalOverlap3 {
  589. 0%, 20%, 100% {
  590. transform: translateY(0);
  591. }
  592. 25%, 45%, 75%, 95% {
  593. transform: translateY(-14px);
  594. }
  595. 50%, 70% {
  596. transform: translateY(-28px);
  597. }
  598. }
  599. .vxe-input--date-festival--overlap {
  600. display: block;
  601. font-size: 12px;
  602. &.overlap--2 {
  603. animation: festivalOverlap2 6s infinite ease-in-out;
  604. }
  605. &.overlap--3 {
  606. animation: festivalOverlap3 9s infinite ease-in-out;
  607. }
  608. & > span {
  609. height: 14px;
  610. display: block;
  611. transform: scale(0.8);
  612. }
  613. }
  614. .vxe-input--time-picker-body {
  615. position: relative;
  616. display: flex;
  617. flex-direction: row;
  618. border: 1px solid $vxe-table-popup-border-color;
  619. flex-grow: 1;
  620. border-radius: $vxe-border-radius;
  621. user-select: none;
  622. & > ul {
  623. height: 100%;
  624. overflow: hidden;
  625. margin: 0;
  626. padding: 0;
  627. &:before,
  628. &:after {
  629. content: " ";
  630. display: block;
  631. }
  632. &:hover {
  633. overflow-y: auto;
  634. }
  635. & > li {
  636. display: block;
  637. &:hover {
  638. background-color: $vxe-input-date-picker-hover-background-color;
  639. cursor: pointer;
  640. }
  641. &.is--selected {
  642. font-weight: 700;
  643. color: $vxe-primary-color;
  644. }
  645. }
  646. }
  647. .vxe-input--time-picker-minute-list {
  648. border-left: 1px solid $vxe-table-popup-border-color;
  649. }
  650. .vxe-input--time-picker-second-list {
  651. border-left: 1px solid $vxe-table-popup-border-color;
  652. }
  653. }
  654. .vxe-input {
  655. font-size: $vxe-font-size;
  656. height: $vxe-input-height-default;
  657. line-height: $vxe-input-height-default;
  658. .vxe-input--inner {
  659. &[type="date"]::-webkit-inner-spin-button,
  660. &[type="month"]::-webkit-inner-spin-button,
  661. &[type="week"]::-webkit-inner-spin-button {
  662. margin-top: 6px;
  663. }
  664. &[type="date"]::-webkit-inner-spin-button,
  665. &[type="month"]::-webkit-inner-spin-button,
  666. &[type="week"]::-webkit-inner-spin-button,
  667. &[type="number"]::-webkit-inner-spin-button {
  668. height: 24px;
  669. }
  670. }
  671. &.size--medium {
  672. font-size: $vxe-font-size-medium;
  673. height: $vxe-input-height-medium;
  674. line-height: $vxe-input-height-medium;
  675. .vxe-input--inner {
  676. &[type="date"]::-webkit-inner-spin-button,
  677. &[type="month"]::-webkit-inner-spin-button,
  678. &[type="week"]::-webkit-inner-spin-button {
  679. margin-top: 4px;
  680. }
  681. }
  682. }
  683. &.size--small {
  684. font-size: $vxe-font-size-small;
  685. height: $vxe-input-height-small;
  686. line-height: $vxe-input-height-small;
  687. .vxe-input--inner {
  688. &[type="date"]::-webkit-inner-spin-button,
  689. &[type="month"]::-webkit-inner-spin-button,
  690. &[type="week"]::-webkit-inner-spin-button {
  691. margin-top: 2px;
  692. }
  693. }
  694. }
  695. &.size--mini {
  696. font-size: $vxe-font-size-mini;
  697. height: $vxe-input-height-mini;
  698. line-height: $vxe-input-height-mini;
  699. .vxe-input--inner {
  700. &[type="date"]::-webkit-inner-spin-button,
  701. &[type="month"]::-webkit-inner-spin-button,
  702. &[type="week"]::-webkit-inner-spin-button {
  703. margin-top: 0;
  704. }
  705. }
  706. }
  707. }
  708. @mixin getPanelStyle ($sizeIndex) {
  709. $fontSizeList: $vxe-font-size, $vxe-font-size-medium, $vxe-font-size-small, $vxe-font-size-mini;
  710. $timeWeekRowHeightList: $vxe-input-date-time-week-row-height-default, $vxe-input-date-time-week-row-height-medium, $vxe-input-date-time-week-row-height-small, $vxe-input-date-time-week-row-height-mini;
  711. $monthYearRowHeightList: $vxe-input-date-month-year-row-height-default, $vxe-input-date-month-year-row-height-medium, $vxe-input-date-month-year-row-height-small, $vxe-input-date-month-year-row-height-mini;
  712. $quarterRowHeightList: $vxe-input-date-quarter-row-height-default, $vxe-input-date-quarter-row-height-medium, $vxe-input-date-quarter-row-height-small, $vxe-input-date-quarter-row-height-mini;
  713. $titleRowHeightList: $vxe-input-date-title-height-default, $vxe-input-date-title-height-medium, $vxe-input-date-title-height-small, $vxe-input-date-title-height-mini;
  714. font-size: nth($fontSizeList, $sizeIndex);
  715. .vxe-input--panel-wrapper {
  716. max-height: 400px - $sizeIndex * 20;
  717. }
  718. &.type--date,
  719. &.type--time,
  720. &.type--week,
  721. &.type--month,
  722. &.type--quarter,
  723. &.type--year {
  724. .vxe-input--panel-wrapper {
  725. padding: 12px - $sizeIndex;
  726. }
  727. }
  728. &.type--date,
  729. &.type--month,
  730. &.type--quarter,
  731. &.type--year {
  732. .vxe-input--panel-wrapper {
  733. $widthList: 336px, 336px, 312px, 288px;
  734. width: nth($widthList, $sizeIndex);
  735. }
  736. }
  737. &.type--week {
  738. .vxe-input--panel-wrapper {
  739. $widthList: 380px, 380px, 354px, 326px;
  740. width: nth($widthList, $sizeIndex);
  741. }
  742. }
  743. &.type--time {
  744. .vxe-input--panel-wrapper {
  745. $widthList: 170px, 168px, 154px, 146px;
  746. width: nth($widthList, $sizeIndex);
  747. }
  748. }
  749. &.type--datetime {
  750. .vxe-input--panel-left-wrapper {
  751. $widthList: 336px, 336px, 312px, 288px;
  752. width: nth($widthList, $sizeIndex);
  753. }
  754. .vxe-input--panel-left-wrapper,
  755. .vxe-input--panel-right-wrapper {
  756. padding: 12px - $sizeIndex;
  757. }
  758. }
  759. .vxe-input--time-picker-title {
  760. height: 31px - $sizeIndex;
  761. line-height: 31px - $sizeIndex;
  762. padding: 0 12px - $sizeIndex;
  763. }
  764. .vxe-input--date-picker-label,
  765. .vxe-input--date-picker-btn {
  766. height: 31px - $sizeIndex;
  767. line-height: 31px - $sizeIndex;
  768. }
  769. .vxe-input--date-picker-btn-wrapper {
  770. .vxe-input--date-picker-btn {
  771. margin-left: 9px - $sizeIndex;
  772. }
  773. .vxe-input--date-picker-prev-btn,
  774. .vxe-input--date-picker-current-btn,
  775. .vxe-input--date-picker-next-btn {
  776. width: 31px - $sizeIndex;
  777. border-radius: $vxe-border-radius;
  778. border: 1px solid $vxe-input-border-color;
  779. }
  780. }
  781. .vxe-input--date-picker-type-wrapper {
  782. .vxe-input--date-picker-label,
  783. .vxe-input--date-picker-btn {
  784. padding: 0 10px - $sizeIndex;
  785. }
  786. }
  787. .vxe-input--time-picker-header,
  788. .vxe-input--date-picker-header {
  789. $paddingBottomList: 8px, 7px, 6px, 5px;
  790. padding-bottom: nth($paddingBottomList, $sizeIndex);
  791. }
  792. .vxe-input--date-picker-body table,
  793. .vxe-input--time-picker-body {
  794. height: nth($timeWeekRowHeightList, $sizeIndex) * 6 + nth($titleRowHeightList, $sizeIndex);
  795. }
  796. .vxe-input--time-picker-body {
  797. $ulWidthList: 48px, 48px, 44px, 42px;
  798. & > ul {
  799. width: nth($ulWidthList, $sizeIndex);
  800. &:before,
  801. &:after {
  802. $heightList: 120px, 120px, 110px, 100px;
  803. height: nth($heightList, $sizeIndex);
  804. }
  805. & > li {
  806. height: 26px;
  807. padding-left: 10px - $sizeIndex;
  808. }
  809. }
  810. .vxe-input--time-picker-minute-list {
  811. left: nth($ulWidthList, $sizeIndex);
  812. }
  813. .vxe-input--time-picker-second-list {
  814. left: nth($ulWidthList, $sizeIndex) * 2;
  815. }
  816. }
  817. .vxe-input--date-day-view,
  818. .vxe-input--date-week-view {
  819. td {
  820. height: nth($timeWeekRowHeightList, $sizeIndex);
  821. }
  822. }
  823. .vxe-input--date-quarter-view {
  824. td {
  825. height: nth($quarterRowHeightList, $sizeIndex);
  826. }
  827. }
  828. .vxe-input--date-month-view,
  829. .vxe-input--date-year-view {
  830. td {
  831. height: nth($monthYearRowHeightList, $sizeIndex);
  832. }
  833. }
  834. .vxe-input--date-picker-body {
  835. th {
  836. height: nth($titleRowHeightList, $sizeIndex);
  837. }
  838. }
  839. .vxe-input--time-picker-confirm,
  840. .vxe-input--date-picker-confirm {
  841. height: 31px - $sizeIndex;
  842. padding: 0 10px - $sizeIndex;
  843. }
  844. .vxe-input--date-label {
  845. line-height: nth($fontSizeList, $sizeIndex) + 1;
  846. }
  847. }
  848. .vxe-input--panel {
  849. @include getPanelStyle(1);
  850. &.size--medium {
  851. @include getPanelStyle(2);
  852. }
  853. &.size--small {
  854. @include getPanelStyle(3);
  855. }
  856. &.size--mini {
  857. @include getPanelStyle(4);
  858. }
  859. }