input.scss 20 KB

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