u-calendar.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. <template>
  2. <u-popup closeable :maskCloseAble="maskCloseAble" mode="bottom" :popup="false" v-model="value" length="auto"
  3. :safeAreaInsetBottom="safeAreaInsetBottom" @close="close" :z-index="uZIndex" :border-radius="borderRadius" :closeable="closeable">
  4. <view class="u-calendar">
  5. <view class="u-calendar__header">
  6. <view class="u-calendar__header__text" v-if="!$slots['tooltip']">
  7. {{toolTip}}
  8. </view>
  9. <slot v-else name="tooltip" />
  10. </view>
  11. <view class="u-calendar__action u-flex u-row-center">
  12. <view class="u-calendar__action__icon">
  13. <u-icon v-if="changeYear" name="arrow-left-double" :color="yearArrowColor" @click="changeYearHandler(0)"></u-icon>
  14. </view>
  15. <view class="u-calendar__action__icon">
  16. <u-icon v-if="changeMonth" name="arrow-left" :color="monthArrowColor" @click="changeMonthHandler(0)"></u-icon>
  17. </view>
  18. <view class="u-calendar__action__text">{{ showTitle }}</view>
  19. <view class="u-calendar__action__icon">
  20. <u-icon v-if="changeMonth" name="arrow-right" :color="monthArrowColor" @click="changeMonthHandler(1)"></u-icon>
  21. </view>
  22. <view class="u-calendar__action__icon">
  23. <u-icon v-if="changeYear" name="arrow-right-double" :color="yearArrowColor" @click="changeYearHandler(1)"></u-icon>
  24. </view>
  25. </view>
  26. <view class="u-calendar__week-day">
  27. <view class="u-calendar__week-day__text" v-for="(item, index) in weekDayZh" :key="index">{{item}}</view>
  28. </view>
  29. <view class="u-calendar__content">
  30. <!-- 前置空白部分 -->
  31. <block v-for="(item, index) in weekdayArr" :key="index">
  32. <view class="u-calendar__content__item"></view>
  33. </block>
  34. <view class="u-calendar__content__item" :class="{
  35. 'u-hover-class':openDisAbled(year,month,index+1),
  36. 'u-calendar__content--start-date': (mode == 'range' && startDate==`${year}-${month}-${index+1}`) || mode== 'date',
  37. 'u-calendar__content--end-date':(mode== 'range' && endDate==`${year}-${month}-${index+1}`) || mode == 'date'
  38. }"
  39. :style="{backgroundColor: getColor(index,1)}" v-for="(item, index) in daysArr" :key="index" @tap="dateClick(index)">
  40. <view class="u-calendar__content__item__inner" :style="{color: getColor(index,2)}">
  41. <view>{{ index + 1 }}</view>
  42. </view>
  43. <view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="filterAvailable(`${year}-${month}-${index+1}`)">{{availableText}}</view>
  44. <view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="filterActive(`${year}-${month}-${index+1}`)">{{activeText}}</view>
  45. <view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="mode== 'range' && startDate==`${year}-${month}-${index+1}` && startDate!=endDate">{{startText}}</view>
  46. <view class="u-calendar__content__item__tips" :style="{color:activeColor}" v-if="mode== 'range' && endDate==`${year}-${month}-${index+1}`">{{endText}}</view>
  47. </view>
  48. <view class="u-calendar__content__bg-month">{{month}}</view>
  49. </view>
  50. <view class="u-calendar__bottom" v-if="handleStatus">
  51. <view class="u-calendar__bottom__choose">
  52. <text>{{mode == 'date' ? activeDate : startDate}}</text>
  53. <text v-if="endDate">至{{endDate}}</text>
  54. </view>
  55. <view class="u-calendar__bottom__btn">
  56. <u-button :type="btnType" shape="circle" size="default" @click="btnFix(false)">确定</u-button>
  57. </view>
  58. </view>
  59. </view>
  60. </u-popup>
  61. </template>
  62. <script>
  63. /**
  64. * calendar 日历
  65. * @description 此组件用于单个选择日期,范围选择日期等,日历被包裹在底部弹起的容器中。
  66. * @tutorial http://uviewui.com/components/calendar.html
  67. * @property {String} mode 选择日期的模式,date-为单个日期,range-为选择日期范围
  68. * @property {Boolean} v-model 布尔值变量,用于控制日历的弹出与收起
  69. * @property {Boolean} safe-area-inset-bottom 是否开启底部安全区适配(默认false)
  70. * @property {Boolean} change-year 是否显示顶部的切换年份方向的按钮(默认true)
  71. * @property {Boolean} change-month 是否显示顶部的切换月份方向的按钮(默认true)
  72. * @property {String Number} max-year 可切换的最大年份(默认2050)
  73. * @property {String Number} min-year 最小可选日期(默认1950)
  74. * @property {String Number} min-date 可切换的最小年份(默认1950-01-01)
  75. * @property {String Number} max-date 最大可选日期(默认当前日期)
  76. * @property {String Number} 弹窗顶部左右两边的圆角值,单位rpx(默认20)
  77. * @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭日历(默认true)
  78. * @property {String} month-arrow-color 月份切换按钮箭头颜色(默认#606266)
  79. * @property {String} year-arrow-color 年份切换按钮箭头颜色(默认#909399)
  80. * @property {String} color 日期字体的默认颜色(默认#303133)
  81. * @property {String} active-bg-color 起始/结束日期按钮的背景色(默认#2979ff)
  82. * @property {String Number} z-index 弹出时的z-index值(默认10075)
  83. * @property {String} active-color 起始/结束日期按钮的字体颜色(默认#ffffff)
  84. * @property {String} range-bg-color 起始/结束日期之间的区域的背景颜色(默认rgba(41,121,255,0.13))
  85. * @property {String} range-color 选择范围内字体颜色(默认#2979ff)
  86. * @property {String} start-text 起始日期底部的提示文字(默认 '开始')
  87. * @property {String} end-text 结束日期底部的提示文字(默认 '结束')
  88. * @property {String} btn-type 底部确定按钮的主题(默认 'primary')
  89. * @property {String} toolTip 顶部提示文字,如设置名为tooltip的slot,此参数将失效(默认 '选择日期')
  90. * @property {Boolean} closeable 是否显示右上角的关闭图标(默认true)
  91. * @example <u-calendar v-model="show" :mode="mode"></u-calendar>
  92. */
  93. export default {
  94. name: 'u-calendar',
  95. props: {
  96. safeAreaInsetBottom: {
  97. type: Boolean,
  98. default: false
  99. },
  100. // 是否允许通过点击遮罩关闭Picker
  101. maskCloseAble: {
  102. type: Boolean,
  103. default: true
  104. },
  105. // 通过双向绑定控制组件的弹出与收起
  106. value: {
  107. type: Boolean,
  108. default: false
  109. },
  110. // 弹出的z-index值
  111. zIndex: {
  112. type: [String, Number],
  113. default: 0
  114. },
  115. // 是否允许切换年份
  116. changeYear: {
  117. type: Boolean,
  118. default: true
  119. },
  120. // 是否允许切换月份
  121. changeMonth: {
  122. type: Boolean,
  123. default: true
  124. },
  125. // date-单个日期选择,range-开始日期+结束日期选择
  126. mode: {
  127. type: String,
  128. default: 'date'
  129. },
  130. // 可切换的最大年份
  131. maxYear: {
  132. type: [Number, String],
  133. default: 2050
  134. },
  135. // 可切换的最小年份
  136. minYear: {
  137. type: [Number, String],
  138. default: 1950
  139. },
  140. // 最小可选日期(不在范围内日期禁用不可选)
  141. minDate: {
  142. type: [Number, String],
  143. default: '1950-01-01'
  144. },
  145. /**
  146. * 最大可选日期
  147. * 默认最大值为今天,之后的日期不可选
  148. * 2030-12-31
  149. * */
  150. maxDate: {
  151. type: [Number, String],
  152. default: ''
  153. },
  154. // 弹窗顶部左右两边的圆角值
  155. borderRadius: {
  156. type: [String, Number],
  157. default: 20
  158. },
  159. // 月份切换按钮箭头颜色
  160. monthArrowColor: {
  161. type: String,
  162. default: '#606266'
  163. },
  164. // 年份切换按钮箭头颜色
  165. yearArrowColor: {
  166. type: String,
  167. default: '#909399'
  168. },
  169. // 默认日期字体颜色
  170. color: {
  171. type: String,
  172. default: '#303133'
  173. },
  174. // 选中|起始结束日期背景色
  175. activeBgColor: {
  176. type: String,
  177. default: '#2979ff'
  178. },
  179. // 选中|起始结束日期字体颜色
  180. activeColor: {
  181. type: String,
  182. default: '#ffffff'
  183. },
  184. // 范围内日期背景色
  185. rangeBgColor: {
  186. type: String,
  187. default: 'rgba(41,121,255,0.13)'
  188. },
  189. // 范围内日期字体颜色
  190. rangeColor: {
  191. type: String,
  192. default: '#2979ff'
  193. },
  194. // mode=range时生效,起始日期自定义文案
  195. startText: {
  196. type: String,
  197. default: '开始'
  198. },
  199. // mode=range时生效,结束日期自定义文案
  200. endText: {
  201. type: String,
  202. default: '结束'
  203. },
  204. //按钮样式类型
  205. btnType: {
  206. type: String,
  207. default: 'primary'
  208. },
  209. // 当前选中日期带选中效果
  210. isActiveCurrent: {
  211. type: Boolean,
  212. default: true
  213. },
  214. // 切换年月是否触发事件 mode=date时生效
  215. isChange: {
  216. type: Boolean,
  217. default: false
  218. },
  219. // 是否显示右上角的关闭图标
  220. closeable: {
  221. type: Boolean,
  222. default: true
  223. },
  224. // 顶部的提示文字
  225. toolTip: {
  226. type: String,
  227. default: '选择日期'
  228. },
  229. // 可用提示背景色
  230. availableBgColor: {
  231. type: String,
  232. default: '#fcbd71'
  233. },
  234. // 可用提示文字
  235. availableText: {
  236. type: String,
  237. default: '可用'
  238. },
  239. // 可用日期列表
  240. available: {
  241. type: Array,
  242. default () {
  243. return []
  244. }
  245. },
  246. // 可用提示文字
  247. activeText: {
  248. type: String,
  249. default: ''
  250. },
  251. // 激活列表
  252. activeList: {
  253. type: Array,
  254. default () {
  255. return []
  256. }
  257. },
  258. handleStatus: {
  259. type: Boolean,
  260. default: true
  261. }
  262. },
  263. data() {
  264. return {
  265. // 星期几,值为1-7
  266. weekday: 1,
  267. weekdayArr: [],
  268. // 当前月有多少天
  269. days: 0,
  270. daysArr: [],
  271. showTitle: '',
  272. year: 2020,
  273. month: 0,
  274. day: 0,
  275. startYear: 0,
  276. startMonth: 0,
  277. startDay: 0,
  278. endYear: 0,
  279. endMonth: 0,
  280. endDay: 0,
  281. today: '',
  282. activeDate: '',
  283. startDate: '',
  284. endDate: '',
  285. isStart: true,
  286. min: null,
  287. max: null,
  288. weekDayZh: ['日', '一', '二', '三', '四', '五', '六']
  289. };
  290. },
  291. computed: {
  292. dataChange() {
  293. return `${this.mode}-${this.minDate}-${this.maxDate}`;
  294. },
  295. uZIndex() {
  296. // 如果用户有传递z-index值,优先使用
  297. return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
  298. }
  299. },
  300. watch: {
  301. dataChange(val) {
  302. this.init()
  303. }
  304. },
  305. created() {
  306. this.init()
  307. },
  308. methods: {
  309. getColor(index, type) {
  310. let color = type == 1 ? '' : this.color;
  311. let day = index + 1
  312. let date = `${this.year}-${this.month}-${day}`
  313. let timestamp = new Date(date.replace(/\-/g, '/')).getTime();
  314. let start = this.startDate.replace(/\-/g, '/')
  315. let end = this.endDate.replace(/\-/g, '/')
  316. if ((this.isActiveCurrent && this.activeDate == date) || this.startDate == date || this.endDate == date) {
  317. color = type == 1 ? this.activeBgColor : this.activeColor;
  318. } else if (this.endDate && timestamp > new Date(start).getTime() && timestamp < new Date(end).getTime()) {
  319. color = type == 1 ? this.rangeBgColor : this.rangeColor;
  320. }
  321. if (this.available.length && !(this.isActiveCurrent && this.activeDate == date)) {
  322. if (this.filterAvailable(`${this.year}-${this.month}-${day}`)) {
  323. return type == 1 ? this.availableBgColor : this.activeColor;
  324. }
  325. }
  326. if (this.activeList.length && !(this.isActiveCurrent && this.activeDate == date)) {
  327. if (this.filterActive(`${this.year}-${this.month}-${day}`)) {
  328. return type == 1 ? this.activeBgColor : this.activeColor;
  329. }
  330. }
  331. return color;
  332. },
  333. filterAvailable(date) {
  334. return this.available.filter(site => site == date).length
  335. },
  336. filterActive(date) {
  337. return this.activeList.filter(site => site == date).length
  338. },
  339. init() {
  340. let now = new Date();
  341. this.year = now.getFullYear();
  342. this.month = now.getMonth() + 1;
  343. this.day = now.getDate();
  344. this.today = `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
  345. this.activeDate = this.today;
  346. this.min = this.initDate(this.minDate);
  347. this.max = this.initDate(this.maxDate || this.today);
  348. this.startDate = "";
  349. this.startYear = 0;
  350. this.startMonth = 0;
  351. this.startDay = 0;
  352. this.endYear = 0;
  353. this.endMonth = 0;
  354. this.endDay = 0;
  355. this.endDate = "";
  356. this.isStart = true;
  357. this.changeData();
  358. },
  359. //日期处理
  360. initDate(date) {
  361. let fdate = date.split('-');
  362. return {
  363. year: Number(fdate[0] || 1920),
  364. month: Number(fdate[1] || 1),
  365. day: Number(fdate[2] || 1)
  366. }
  367. },
  368. openDisAbled: function(year, month, day) {
  369. let bool = true;
  370. let date = `${year}/${month}/${day}`;
  371. // let today = this.today.replace(/\-/g, '/');
  372. let min = `${this.min.year}/${this.min.month}/${this.min.day}`;
  373. let max = `${this.max.year}/${this.max.month}/${this.max.day}`;
  374. let timestamp = new Date(date).getTime();
  375. if (timestamp >= new Date(min).getTime() && timestamp <= new Date(max).getTime()) {
  376. bool = false;
  377. }
  378. return bool;
  379. },
  380. generateArray: function(start, end) {
  381. return Array.from(new Array(end + 1).keys()).slice(start);
  382. },
  383. formatNum: function(num) {
  384. return num < 10 ? '0' + num : num + '';
  385. },
  386. //一个月有多少天
  387. getMonthDay(year, month) {
  388. let days = new Date(year, month, 0).getDate();
  389. return days;
  390. },
  391. getWeekday(year, month) {
  392. let date = new Date(`${year}/${month}/01 00:00:00`);
  393. return date.getDay();
  394. },
  395. checkRange(year) {
  396. let overstep = false;
  397. if (year < this.minYear || year > this.maxYear) {
  398. uni.showToast({
  399. title: "日期超出范围啦~",
  400. icon: 'none'
  401. })
  402. overstep = true;
  403. }
  404. return overstep;
  405. },
  406. changeMonthHandler(isAdd) {
  407. if (isAdd) {
  408. let month = this.month + 1;
  409. let year = month > 12 ? this.year + 1 : this.year;
  410. if (!this.checkRange(year)) {
  411. this.month = month > 12 ? 1 : month;
  412. this.year = year;
  413. this.changeData();
  414. }
  415. } else {
  416. let month = this.month - 1;
  417. let year = month < 1 ? this.year - 1 : this.year;
  418. if (!this.checkRange(year)) {
  419. this.month = month < 1 ? 12 : month;
  420. this.year = year;
  421. this.changeData();
  422. }
  423. }
  424. },
  425. changeYearHandler(isAdd) {
  426. let year = isAdd ? this.year + 1 : this.year - 1;
  427. if (!this.checkRange(year)) {
  428. this.year = year;
  429. this.changeData();
  430. }
  431. },
  432. changeData() {
  433. this.days = this.getMonthDay(this.year, this.month);
  434. this.daysArr = this.generateArray(1, this.days)
  435. this.weekday = this.getWeekday(this.year, this.month);
  436. this.weekdayArr = this.generateArray(1, this.weekday)
  437. this.showTitle = `${this.year}年${this.month}月`;
  438. if (this.isChange && this.mode == 'date') {
  439. this.btnFix(true);
  440. }
  441. },
  442. dateClick: function(day) {
  443. day += 1;
  444. if (!this.openDisAbled(this.year, this.month, day)) {
  445. this.day = day;
  446. let date = `${this.year}-${this.month}-${day}`;
  447. if (this.mode == 'date') {
  448. this.activeDate = date;
  449. } else {
  450. let compare = new Date(date.replace(/\-/g, '/')).getTime() < new Date(this.startDate.replace(/\-/g, '/')).getTime()
  451. if (this.isStart || compare) {
  452. this.startDate = date;
  453. this.startYear = this.year;
  454. this.startMonth = this.month;
  455. this.startDay = this.day;
  456. this.endYear = 0;
  457. this.endMonth = 0;
  458. this.endDay = 0;
  459. this.endDate = "";
  460. this.activeDate = "";
  461. this.isStart = false;
  462. } else {
  463. this.endDate = date;
  464. this.endYear = this.year;
  465. this.endMonth = this.month;
  466. this.endDay = this.day;
  467. this.isStart = true;
  468. }
  469. }
  470. }
  471. },
  472. close() {
  473. // 修改通过v-model绑定的父组件变量的值为false,从而隐藏日历弹窗
  474. this.$emit('input', false);
  475. },
  476. getWeekText(date) {
  477. date = new Date(`${date.replace(/\-/g, '/')} 00:00:00`);
  478. let week = date.getDay();
  479. return '星期' + ['日', '一', '二', '三', '四', '五', '六'][week];
  480. },
  481. btnFix(show) {
  482. if (!show) {
  483. this.close();
  484. }
  485. if (this.mode == 'date') {
  486. let arr = this.activeDate.split('-')
  487. let year = this.isChange ? this.year : Number(arr[0]);
  488. let month = this.isChange ? this.month : Number(arr[1]);
  489. let day = this.isChange ? this.day : Number(arr[2]);
  490. //当前月有多少天
  491. let days = this.getMonthDay(year, month);
  492. let result = `${year}-${this.formatNum(month)}-${this.formatNum(day)}`;
  493. let weekText = this.getWeekText(result);
  494. let isToday = false;
  495. if (`${year}-${month}-${day}` == this.today) {
  496. //今天
  497. isToday = true;
  498. }
  499. this.$emit('change', {
  500. year: year,
  501. month: month,
  502. day: day,
  503. days: days,
  504. result: result,
  505. week: weekText,
  506. isToday: isToday,
  507. // switch: show //是否是切换年月操作
  508. });
  509. } else {
  510. if (!this.startDate || !this.endDate) return;
  511. let startMonth = this.formatNum(this.startMonth);
  512. let startDay = this.formatNum(this.startDay);
  513. let startDate = `${this.startYear}-${startMonth}-${startDay}`;
  514. let startWeek = this.getWeekText(startDate)
  515. let endMonth = this.formatNum(this.endMonth);
  516. let endDay = this.formatNum(this.endDay);
  517. let endDate = `${this.endYear}-${endMonth}-${endDay}`;
  518. let endWeek = this.getWeekText(endDate);
  519. this.$emit('change', {
  520. startYear: this.startYear,
  521. startMonth: this.startMonth,
  522. startDay: this.startDay,
  523. startDate: startDate,
  524. startWeek: startWeek,
  525. endYear: this.endYear,
  526. endMonth: this.endMonth,
  527. endDay: this.endDay,
  528. endDate: endDate,
  529. endWeek: endWeek
  530. });
  531. }
  532. }
  533. }
  534. };
  535. </script>
  536. <style scoped lang="scss">
  537. @import "../../libs/css/style.components.scss";
  538. .u-calendar {
  539. color: $u-content-color;
  540. &__header {
  541. width: 100%;
  542. box-sizing: border-box;
  543. font-size: 30rpx;
  544. background-color: #fff;
  545. color: $u-main-color;
  546. &__text {
  547. margin-top: 30rpx;
  548. padding: 0 60rpx;
  549. @include vue-flex;
  550. justify-content: center;
  551. align-items: center;
  552. }
  553. }
  554. &__action {
  555. padding: 40rpx 0 40rpx 0;
  556. &__icon {
  557. margin: 0 16rpx;
  558. }
  559. &__text {
  560. padding: 0 16rpx;
  561. color: $u-main-color;
  562. font-size: 32rpx;
  563. line-height: 32rpx;
  564. font-weight: bold;
  565. }
  566. }
  567. &__week-day {
  568. @include vue-flex;
  569. align-items: center;
  570. justify-content: center;
  571. padding: 6px 0;
  572. overflow: hidden;
  573. &__text {
  574. flex: 1;
  575. text-align: center;
  576. }
  577. }
  578. &__content {
  579. width: 100%;
  580. @include vue-flex;
  581. flex-wrap: wrap;
  582. padding: 6px 0;
  583. box-sizing: border-box;
  584. background-color: #fff;
  585. position: relative;
  586. &--end-date {
  587. border-top-right-radius: 8rpx;
  588. border-bottom-right-radius: 8rpx;
  589. }
  590. &--start-date {
  591. border-top-left-radius: 8rpx;
  592. border-bottom-left-radius: 8rpx;
  593. }
  594. &__item {
  595. width: 14.2857%;
  596. @include vue-flex;
  597. align-items: center;
  598. justify-content: center;
  599. padding: 5px 0;
  600. overflow: hidden;
  601. position: relative;
  602. z-index: 2;
  603. border: 1px solid #ffffff;
  604. box-sizing: border-box;
  605. &__inner {
  606. height: 84rpx;
  607. @include vue-flex;
  608. align-items: center;
  609. justify-content: center;
  610. flex-direction: column;
  611. font-size: 32rpx;
  612. position: relative;
  613. border-radius: 50%;
  614. &__desc {
  615. width: 100%;
  616. font-size: 24rpx;
  617. line-height: 24rpx;
  618. transform: scale(0.75);
  619. transform-origin: center center;
  620. position: absolute;
  621. left: 0;
  622. text-align: center;
  623. bottom: 2rpx;
  624. }
  625. }
  626. &__tips {
  627. width: 100%;
  628. font-size: 24rpx;
  629. line-height: 24rpx;
  630. position: absolute;
  631. left: 0;
  632. transform: scale(0.8);
  633. transform-origin: center center;
  634. text-align: center;
  635. bottom: 8rpx;
  636. z-index: 2;
  637. }
  638. }
  639. &__bg-month {
  640. position: absolute;
  641. font-size: 130px;
  642. line-height: 130px;
  643. left: 50%;
  644. top: 50%;
  645. transform: translate(-50%, -50%);
  646. color: #e4e7ed;
  647. z-index: 1;
  648. }
  649. }
  650. &__bottom {
  651. width: 100%;
  652. @include vue-flex;
  653. align-items: center;
  654. justify-content: center;
  655. flex-direction: column;
  656. background-color: #fff;
  657. padding: 0 40rpx 30rpx;
  658. box-sizing: border-box;
  659. font-size: 24rpx;
  660. color: $u-tips-color;
  661. &__choose {
  662. height: 50rpx;
  663. }
  664. &__btn {
  665. width: 100%;
  666. }
  667. }
  668. }
  669. </style>