云链智安app
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844
  1. <script>
  2. import dayjs from "./day";
  3. import {
  4. monthsChinese,
  5. weeksChinese,
  6. closable,
  7. left,
  8. left_double,
  9. } from "./utils";
  10. import KButton from "../k-bottom-button/KBottomButton.vue";
  11. import KBottomPopup from "../k-bottom-popup/KBottomPopup.vue";
  12. export default {
  13. components: {KBottomPopup, KButton},
  14. options: {
  15. virtualHost: true,
  16. },
  17. // #ifndef VUE3
  18. model: {
  19. prop: "value",
  20. event: "input",
  21. },
  22. // #endif
  23. props: {
  24. // #ifndef VUE3
  25. value: {
  26. type: Boolean,
  27. default: false,
  28. },
  29. // #endif
  30. confirmText: {
  31. type: String,
  32. default: "确定",
  33. },
  34. title: {
  35. type: String,
  36. default: "请选择",
  37. },
  38. // #ifdef VUE3
  39. modelValue: {
  40. type: Boolean,
  41. default: false,
  42. },
  43. // #endif
  44. defaultValue: {
  45. type: [String, Number, Array],
  46. },
  47. type: {
  48. type: String, //"day" | "month" | "year"
  49. default: "day",
  50. },
  51. /** 限制开始时间 **/
  52. limitStartDate: {
  53. type: [String, Number],
  54. },
  55. /** 限制结束时间 **/
  56. limitEndDate: {
  57. type: [String, Number],
  58. },
  59. /** 格式化数据 **/
  60. formatter: {
  61. type: String,
  62. },
  63. /** 是否为范围选择器 **/
  64. range: {
  65. type: Boolean,
  66. default: () => false,
  67. },
  68. /** 是否为多选 **/
  69. multiple: {
  70. type: Boolean,
  71. default: () => false,
  72. },
  73. isDisabled: {
  74. type: Function,
  75. }
  76. },
  77. computed: {
  78. briefDate() {
  79. if (this.type === "day") {
  80. return this.currentDay.format("YYYY年MM月");
  81. }
  82. if (this.type === "month") {
  83. return this.currentDay.format("YYYY年");
  84. }
  85. if (this.type === "year") {
  86. return `${this.startYear.format("YYYY")} - ${this.startYear.add(9, "year").format("YYYY")}`;
  87. }
  88. },
  89. selectedDate() {
  90. const formatMap = {
  91. day: "YYYY-MM-DD",
  92. month: "YYYY-MM",
  93. year: "YYYY年",
  94. };
  95. const format = formatMap[this.type];
  96. if (this.range) {
  97. return `${this.rangeStart ? this.rangeStart.format(format) : "-"} 至 ${this.rangeEnd ? this.rangeEnd.format(format) : "-"}`;
  98. } else {
  99. if (this.checked.length > 0) {
  100. return this.checked.map((item) => item.format(format)).join("、");
  101. } else {
  102. return "-";
  103. }
  104. }
  105. },
  106. backText() {
  107. if (this.type === "day") {
  108. return this.currentDay.format("M");
  109. }
  110. return "";
  111. },
  112. blocks() {
  113. const dates =
  114. this.type === "day"
  115. ? this.days
  116. : this.type === "month"
  117. ? this.months
  118. : this.years;
  119. const result = [];
  120. const chineseMap = {
  121. day: (date) => {
  122. return date.format("D");
  123. },
  124. month: (date) => {
  125. return monthsChinese[date.month()];
  126. },
  127. year: (date) => {
  128. return date.format("YYYY年");
  129. },
  130. };
  131. for (const date of dates) {
  132. if (!date) {
  133. result.push(date);
  134. } else {
  135. const obj = {
  136. date,
  137. chinese: chineseMap[this.type](date),
  138. isLimit: this.isDisabled ? this.isDisabled(date.startOf(this.type).valueOf()) : ((this.limitStartDate &&
  139. date.isBefore(dayjs(this.limitStartDate).startOf(this.type))) ||
  140. (this.limitEndDate && date.isAfter(dayjs(this.limitEndDate).endOf(this.type)))),
  141. isCurrent: date
  142. .startOf(this.type)
  143. .isSame(this.sameDay.startOf(this.type)),
  144. isSelect:
  145. this.checked.findIndex(
  146. (item) => item.valueOf() === date.valueOf(),
  147. ) !== -1,
  148. isStart:
  149. this.rangeStart &&
  150. date
  151. .startOf(this.type)
  152. .isSame(this.rangeStart.startOf(this.type)),
  153. isEnd:
  154. this.rangeEnd &&
  155. date.startOf(this.type).isSame(this.rangeEnd.startOf(this.type)),
  156. isInRange:
  157. this.rangeStart &&
  158. this.rangeEnd &&
  159. date
  160. .startOf(this.type)
  161. .isAfter(this.rangeStart.startOf(this.type)) &&
  162. date
  163. .startOf(this.type)
  164. .isBefore(this.rangeEnd.startOf(this.type)),
  165. };
  166. // 若果既是范围起点又是范围终点,那么设置为选中
  167. if (this.range) {
  168. obj.isSelect = obj.isStart && obj.isEnd;
  169. }
  170. result.push(obj);
  171. }
  172. }
  173. return result;
  174. },
  175. days() {
  176. const result = [];
  177. let start = this.currentDay.startOf("month");
  178. const end = this.currentDay.endOf("month");
  179. //计算当前月的第一天是星期几,然后在result头部补上空字符串
  180. const firstDayWeek = start.day();
  181. for (let i = 0; i < firstDayWeek; i++) {
  182. result.push("");
  183. }
  184. while (start.isBefore(end)) {
  185. result.push(start);
  186. start = start.add(1, "day");
  187. }
  188. return result;
  189. },
  190. months() {
  191. const result = [];
  192. for (let i = 0; i < 12; i++) {
  193. const date = this.currentDay.startOf("year").add(i, "month");
  194. result.push(date);
  195. }
  196. return result;
  197. },
  198. startYear() {
  199. return this.currentDay.subtract(this.currentDay.year() % 10, "year");
  200. },
  201. years() {
  202. // 根据currentDay生成10个年份,如果是当前年则加上is-current
  203. const result = [];
  204. // 从startYear开始生成一个10年的数组
  205. for (let i = 0; i < 10; i++) {
  206. const date = this.startYear.add(i, "year");
  207. result.push(date);
  208. }
  209. return result;
  210. },
  211. },
  212. data() {
  213. return {
  214. sameDay: dayjs(), // 当日
  215. rangeStart: null, // 范围选择器开始日期
  216. rangeEnd: null, // 范围选择器结束日期
  217. checked: [], // 选中的日期
  218. currentDay: dayjs(), // 当前选择器显示的日期
  219. weeksChinese,
  220. left,
  221. closable,
  222. left_double,
  223. show: false,
  224. };
  225. },
  226. methods: {
  227. onClick() {
  228. if (this.range) {
  229. const _rangeStart = this.rangeStart
  230. ? this.formatter
  231. ? this.rangeStart.format(this.formatter)
  232. : this.rangeStart.valueOf()
  233. : null;
  234. const _rangeEnd = this.rangeEnd
  235. ? this.formatter
  236. ? this.rangeEnd.format(this.formatter)
  237. : this.rangeEnd.endOf(this.type).valueOf()
  238. : null;
  239. this.$emit("change", [_rangeStart, _rangeEnd]);
  240. } else {
  241. const _checked =
  242. this.selectedDate !== "-"
  243. ? this.multiple
  244. ? this.checked.map((item) =>
  245. this.formatter ? item.format(this.formatter) : item.valueOf(),
  246. )
  247. : this.formatter
  248. ? this.checked[0].format(this.formatter)
  249. : this.checked[0].valueOf()
  250. : null;
  251. this.$emit("change", _checked);
  252. }
  253. },
  254. handleClickItem(block) {
  255. this.show = true
  256. /**当day为空字符串或者在限制开始时间之前,限制开始时间之后 不允许点击 **/
  257. if (
  258. block === "" ||
  259. (this.isDisabled ? this.isDisabled(block.date.startOf(this.type).valueOf()) : (
  260. (this.limitEndDate && block.date.isAfter(dayjs(this.limitEndDate).endOf(this.type))) ||
  261. (this.limitStartDate && block.date.isBefore(dayjs(this.limitStartDate).startOf(this.type)))
  262. ))
  263. )
  264. return;
  265. if (this.range) {
  266. //如果有结束日期和开始日期,并且点击的不是开始日期和结束日期,则将其设置为开始日期并清除结束日期
  267. if (
  268. this.rangeStart &&
  269. this.rangeEnd &&
  270. !block.isStart &&
  271. !block.isEnd
  272. ) {
  273. this.rangeStart = block.date;
  274. this.rangeEnd = null;
  275. return;
  276. }
  277. // 如果点击的是选择的日期,那么就清除这些选项
  278. if (block.isSelect) {
  279. this.rangeStart = null;
  280. this.rangeEnd = null;
  281. return;
  282. }
  283. // 如果重复点击开始日期或者结束日期则取消选择
  284. if (block.isStart) {
  285. // 如果没有结束日期 那么将结束日期设置为开始日期
  286. if (!this.rangeEnd) {
  287. this.rangeEnd = block.date;
  288. return;
  289. }
  290. this.rangeStart = null;
  291. return;
  292. }
  293. if (block.isEnd) {
  294. this.rangeEnd = null;
  295. return;
  296. }
  297. const setStartAndEndDay = (start) => {
  298. if (block.date.isBefore(start)) {
  299. this.rangeEnd = start;
  300. this.rangeStart = block.date;
  301. } else {
  302. this.rangeEnd = block.date;
  303. }
  304. };
  305. if (this.rangeStart) {
  306. setStartAndEndDay(this.rangeStart);
  307. } else {
  308. // 如果有结束日期,需要判断是否在结束日期之前
  309. if (this.rangeEnd) {
  310. setStartAndEndDay(this.rangeEnd);
  311. } else {
  312. this.rangeStart = block.date;
  313. }
  314. }
  315. } else {
  316. // 如果重复点击则取消选择
  317. if (block.isSelect) {
  318. this.checked = this.checked.filter(
  319. (item) => item.valueOf() !== block.date.valueOf(),
  320. );
  321. return;
  322. }
  323. this.multiple
  324. ? this.checked.push(block.date)
  325. : (this.checked = [block.date]);
  326. }
  327. },
  328. toggle(type, direction) {
  329. if (this.type === "day") {
  330. this.currentDay = this.currentDay.add(
  331. direction === "left" ? -1 : 1,
  332. type === "single" ? "month" : "year",
  333. );
  334. }
  335. if (this.type === "month") {
  336. this.currentDay = this.currentDay.add(
  337. direction === "left" ? -1 : 1,
  338. "year",
  339. );
  340. }
  341. if (this.type === "year") {
  342. this.currentDay = this.currentDay.add(
  343. direction === "left" ? -10 : 10,
  344. "year",
  345. );
  346. }
  347. },
  348. close() {
  349. // #ifndef VUE3
  350. this.$emit("input", false);
  351. // #endif
  352. // #ifdef VUE3
  353. this.$emit("update:modelValue", false);
  354. // #endif
  355. },
  356. init() {
  357. // 检查类型是否为 day | month | year
  358. if (!["day", "month", "year"].includes(this.type)) {
  359. console.error("类型必须为 day | month | year");
  360. return;
  361. }
  362. // 检查 isRange和 multiple 是否同时为 true
  363. if (this.range && this.multiple) {
  364. console.error("目前暂不支持时间段的多选");
  365. return;
  366. }
  367. // 清空原数据
  368. this.checked = [];
  369. this.rangeStart = null;
  370. this.rangeEnd = null;
  371. // 初始化数据
  372. if (!this.defaultValue) return;
  373. if (this.range) {
  374. if (
  375. !Array.isArray(this.defaultValue) ||
  376. this.defaultValue.length !== 2
  377. ) {
  378. console.error("区间选择器的默认值必须为长度为2的数组");
  379. return;
  380. }
  381. this.currentDay = this.defaultValue[0]
  382. ? dayjs(this.defaultValue[0])
  383. : dayjs();
  384. this.defaultValue[0] && (this.rangeStart = dayjs(this.defaultValue[0]));
  385. this.defaultValue[1] && (this.rangeEnd = dayjs(this.defaultValue[1]));
  386. } else {
  387. if (this.multiple && Array.isArray(this.defaultValue)) {
  388. this.checked = this.defaultValue.map((item) => dayjs(item));
  389. } else {
  390. this.checked = [dayjs(this.defaultValue)];
  391. }
  392. this.currentDay = this.checked[0] ? dayjs(this.checked[0]) : dayjs();
  393. }
  394. },
  395. },
  396. mounted() {
  397. this.init();
  398. },
  399. watch: {
  400. // #ifdef VUE3
  401. modelValue: {
  402. handler(value) {
  403. this.show = !!value;
  404. },
  405. },
  406. // #endif
  407. // #ifndef VUE3
  408. value: {
  409. handler(value) {
  410. this.show = !!value;
  411. },
  412. },
  413. // #endif
  414. show: {
  415. handler(value) {
  416. // #ifdef VUE3
  417. this.$emit("update:modelValue", value);
  418. // #endif
  419. // #ifndef VUE3
  420. this.$emit("input", value);
  421. // #endif
  422. },
  423. },
  424. range: {
  425. handler() {
  426. this.init();
  427. },
  428. },
  429. multiple: {
  430. handler() {
  431. this.init();
  432. },
  433. },
  434. type: {
  435. handler() {
  436. this.init();
  437. },
  438. },
  439. defaultValue: {
  440. handler() {
  441. this.init();
  442. },
  443. deep: true,
  444. },
  445. },
  446. };
  447. </script>
  448. <template>
  449. <KBottomPopup v-model="show">
  450. <view class="k-date-picker">
  451. <view class="inner-top">
  452. <view>
  453. <slot name="left">
  454. <text>{{ title }}</text>
  455. </slot>
  456. </view>
  457. <view @click="close">
  458. <slot name="right">
  459. <image :src="closable" class="image-closable"></image>
  460. </slot>
  461. </view>
  462. </view>
  463. <view class="inner-body">
  464. <view class="inner-body__arrow">
  465. <image
  466. v-if="type === 'day'"
  467. class="image-arrow"
  468. :src="left_double"
  469. @click="toggle('double', 'left')"
  470. />
  471. <image
  472. class="image-arrow"
  473. :src="left"
  474. @click="toggle('single', 'left')"
  475. />
  476. <view class="brief">{{ briefDate }}</view>
  477. <image
  478. class="image-arrow right-arrow"
  479. :src="left"
  480. @click="toggle('single', 'right')"
  481. />
  482. <image
  483. v-if="type === 'day'"
  484. class="image-arrow right-arrow"
  485. :src="left_double"
  486. @click="toggle('double', 'right')"
  487. />
  488. </view>
  489. <view class="inner-body__calendar">
  490. <view
  491. class="inner-body__calendar_week"
  492. :style="{ columnGap: range ? '0' : '12rpx' }"
  493. v-if="type === 'day'"
  494. >
  495. <view
  496. class="inner-body__calendar_week--item"
  497. v-for="(item, index) in weeksChinese"
  498. :key="index"
  499. >{{ item }}
  500. </view
  501. >
  502. </view>
  503. <view
  504. class="inner-body__calendar_block"
  505. :class="{
  506. 'is-day': type === 'day',
  507. 'is-month': type === 'month',
  508. 'is-year': type === 'year',
  509. }"
  510. :data-text="backText"
  511. :style="{ columnGap: range ? '0' : '12rpx' }"
  512. >
  513. <view
  514. class="inner-body__calendar_block--item"
  515. :class="{
  516. 'is-current': block.isCurrent,
  517. 'is-start': block.isStart,
  518. 'is-end': block.isEnd,
  519. 'is-in-range': block.isInRange,
  520. 'is-selected': block.isSelect,
  521. 'is-limit': block.isLimit,
  522. }"
  523. v-for="(block, index) in blocks"
  524. :key="index"
  525. @click="handleClickItem(block)"
  526. >
  527. {{ block.chinese || "" }}
  528. </view>
  529. </view>
  530. </view>
  531. <!-- 多选由于需要显示的数据可能会较多,这里不再就多选的数据进行展示,需要显示可以自己处理展示方式-->
  532. <view class="selected-wrap" v-if="!multiple">
  533. <view class="selected-date">
  534. {{ selectedDate }}
  535. </view>
  536. </view>
  537. </view>
  538. </view>
  539. <KButton
  540. :label="confirmText"
  541. :box-shadow="false"
  542. :safe-area="true"
  543. @onClick="onClick"
  544. ></KButton>
  545. </KBottomPopup>
  546. </template>
  547. <style lang="scss">
  548. .k-date-picker {
  549. /** 控制提示文字的位置 **/
  550. --bottom-offset: 10%;
  551. /** 控制提示文字的大小 **/
  552. --bottom-font-size: 18rpx;
  553. /** 选中时字体的颜色**/
  554. --seletct--text-color: white;
  555. /** 选中时背景颜色 **/
  556. --seletct--background-color: #005ceeff;
  557. /** 处于区间的字体颜色 **/
  558. --in-range--text-color: #005ceeff;
  559. /** 处于区间的背景颜色 **/
  560. --in-range--background-color: #f2f6fc;
  561. /** 限制的字体颜色 **/
  562. --limit--text-color: #a8abb2;
  563. /** 限制的背景颜色 **/
  564. --limit--background-color: #f5f7fa;
  565. /** current的背景颜色 **/
  566. --current--background-color: #e4edfe;
  567. /** current的字体颜色 **/
  568. --current--text-color: #7994b2;
  569. box-sizing: border-box;
  570. width: 100%;
  571. padding: 30rpx 30rpx 20rpx;
  572. background-color: white;
  573. border-radius: 10px 10px 0 0;
  574. position: relative;
  575. display: flex;
  576. flex-direction: column;
  577. .is-current {
  578. border-radius: 8rpx;
  579. background-color: var(--current--background-color);
  580. position: relative;
  581. --color: var(--current--text-color);
  582. &:after {
  583. color: var(--color);
  584. position: absolute;
  585. left: 50%;
  586. bottom: var(--bottom-offset);
  587. transform: translate(-50%);
  588. font-size: var(--bottom-font-size);
  589. line-height: var(--bottom-font-size);
  590. /* #ifdef APP-PLUS */
  591. font-weight: 500;
  592. /* #endif */
  593. }
  594. }
  595. .is-day {
  596. grid-template-columns: repeat(7, minmax(0, 1fr));
  597. .is-current:after {
  598. content: "本日";
  599. }
  600. .is-start:after {
  601. content: "开始";
  602. }
  603. .is-end:after {
  604. content: "结束";
  605. }
  606. }
  607. .is-month {
  608. grid-template-columns: repeat(4, minmax(0, 1fr));
  609. margin-top: 24rpx;
  610. .is-current:after {
  611. content: "本月";
  612. }
  613. .is-start:after {
  614. content: "开始";
  615. }
  616. .is-end:after {
  617. content: "结束";
  618. }
  619. }
  620. .is-year {
  621. grid-template-columns: repeat(4, minmax(0, 1fr));
  622. margin-top: 24rpx;
  623. .is-current:after {
  624. content: "本年";
  625. }
  626. .is-start:after {
  627. content: "开始";
  628. }
  629. .is-end:after {
  630. content: "结束";
  631. }
  632. }
  633. .inner-top {
  634. display: flex;
  635. flex-direction: row;
  636. justify-content: space-between;
  637. align-items: center;
  638. padding-bottom: 30rpx;
  639. }
  640. .inner-body {
  641. &__arrow {
  642. display: flex;
  643. flex-direction: row;
  644. align-items: center;
  645. justify-content: center;
  646. }
  647. &__calendar {
  648. &_week {
  649. display: grid;
  650. grid-template-columns: repeat(7, minmax(0, 1fr));
  651. &--item {
  652. /* #ifdef MP-WEIXIN */
  653. font-weight: bolder;
  654. /* #endif */
  655. /* #ifdef APP-PLUS */
  656. font-weight: 500;
  657. /* #endif */
  658. color: #303133;
  659. font-size: 30rpx;
  660. display: flex;
  661. flex-direction: column;
  662. align-items: center;
  663. justify-content: center;
  664. height: 88rpx;
  665. }
  666. }
  667. &_block {
  668. &:after {
  669. display: block;
  670. content: attr(data-text);
  671. color: #eef2f8ff;
  672. font-size: 280rpx;
  673. position: absolute;
  674. left: 50%;
  675. top: 50%;
  676. transform: translate(-50%, -50%);
  677. z-index: 1;
  678. }
  679. position: relative;
  680. display: grid;
  681. row-gap: 20rpx;
  682. &--item {
  683. z-index: 2;
  684. font-size: 30rpx;
  685. color: #7994b2;
  686. display: flex;
  687. flex-direction: column;
  688. align-items: center;
  689. justify-content: center;
  690. aspect-ratio: 1;
  691. }
  692. }
  693. }
  694. }
  695. .is-limit {
  696. color: var(--limit--text-color) !important;
  697. background-color: var(--limit--background-color);
  698. }
  699. .is-in-range {
  700. --color: var(--in-range--text-color) !important;
  701. background-color: var(--in-range--background-color) !important;
  702. border-radius: 0 !important;
  703. color: var(--in-range--text-color) !important;
  704. }
  705. .is-selected {
  706. &:after {
  707. content: "已选" !important;
  708. color: var(--seletct--text-color) !important;
  709. position: absolute;
  710. left: 50%;
  711. bottom: var(--bottom-offset);
  712. transform: translate(-50%);
  713. font-size: var(--bottom-font-size);
  714. line-height: var(--bottom-font-size);
  715. /* #ifdef APP-PLUS */
  716. font-weight: 500;
  717. /* #endif */
  718. }
  719. position: relative;
  720. background-color: var(--seletct--background-color) !important;
  721. color: var(--seletct--text-color) !important;
  722. border-radius: 8rpx !important;
  723. }
  724. .is-start {
  725. &:after {
  726. content: "开始";
  727. color: var(--seletct--text-color) !important;
  728. position: absolute;
  729. left: 50%;
  730. bottom: var(--bottom-offset);
  731. transform: translate(-50%);
  732. font-size: var(--bottom-font-size);
  733. line-height: var(--bottom-font-size);
  734. /* #ifdef APP-PLUS */
  735. font-weight: 500;
  736. /* #endif */
  737. }
  738. position: relative;
  739. background-color: var(--seletct--background-color) !important;
  740. color: var(--seletct--text-color) !important;
  741. border-radius: 8rpx 0 0 8rpx;
  742. }
  743. .is-end {
  744. &:after {
  745. content: "结束";
  746. color: var(--seletct--text-color) !important;
  747. position: absolute;
  748. left: 50%;
  749. bottom: var(--bottom-offset);
  750. transform: translate(-50%);
  751. font-size: var(--bottom-font-size);
  752. line-height: var(--bottom-font-size);
  753. /* #ifdef APP-PLUS */
  754. font-weight: 500;
  755. /* #endif */
  756. }
  757. position: relative;
  758. background-color: var(--seletct--background-color) !important;
  759. color: var(--seletct--text-color) !important;
  760. border-radius: 0 8rpx 8rpx 0;
  761. }
  762. .image-closable {
  763. width: 36rpx;
  764. height: 36rpx;
  765. }
  766. .image-arrow {
  767. width: 36rpx;
  768. height: 36rpx;
  769. }
  770. .right-arrow {
  771. transform: rotate(180deg);
  772. }
  773. .brief {
  774. margin: 0 30rpx;
  775. color: #000000d9;
  776. font-size: 30rpx;
  777. /* #ifdef MP-WEIXIN */
  778. font-weight: bolder;
  779. /* #endif */
  780. /* #ifdef APP-PLUS */
  781. font-weight: 500;
  782. /* #endif */
  783. }
  784. .selected-date {
  785. display: flex;
  786. flex-direction: row;
  787. align-items: center;
  788. justify-content: center;
  789. padding: 10rpx 0;
  790. color: #94a0b4ff;
  791. font-size: 30rpx;
  792. margin-top: 20rpx;
  793. width: 600rpx;
  794. }
  795. .selected-wrap {
  796. display: flex;
  797. flex-direction: row;
  798. align-items: center;
  799. justify-content: center;
  800. width: 100%;
  801. }
  802. }
  803. </style>