itmister-date-picker.nvue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727
  1. <template>
  2. <view>
  3. <view v-if="isShow">
  4. <view class="date-picker-mask" bubble='true' @click="hide" :class="[isOpen?'show-date-picker-mask':'hide-date-picekr-mask']"
  5. :style="{backgroundColor:maskColor}"></view>
  6. <view class="date-picker-container" @click.stop="handleClick" :class="[isOpen?'show-date-picker':'hide-date-picekr']">
  7. <!-- 操作 -->
  8. <view class="date-picker-title row between-center">
  9. <text class="date-picker-cancel" @click="hide">取消</text>
  10. <text class="date-picker-confirm" @click="dateConfirm">确定</text>
  11. </view>
  12. <!-- 内容 -->
  13. <picker-view class="date-picker-box" v-if="visible" :indicator-style="indicatorStyle" :value="value" @change="bindChange">
  14. <picker-view-column class="center">
  15. <view class="date-picker-item center" v-for="(item,index) in years" :key="index">
  16. <text >{{item}}</text>
  17. </view>
  18. </picker-view-column>
  19. <picker-view-column>
  20. <view class="date-picker-item center" v-for="(item,index) in months" :key="index">
  21. <text>{{item}}</text>
  22. </view>
  23. </picker-view-column>
  24. <picker-view-column>
  25. <view class="date-picker-item center" v-for="(item,index) in days" :key="index">
  26. <text>{{item}}</text>
  27. </view>
  28. </picker-view-column>
  29. </picker-view>
  30. </view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. var that
  36. /**
  37. * 日期控件
  38. * @property {String} maskColor 模态框背景色
  39. * @property {String,Number} checkYear 控件打开默认选中的年份(未传值或传空字符串默认选中的年份为当年)
  40. * @property {String,Number} checkMonth 控件打开默认选中的月份(未传值或传空字符串默认选中的年份为当月)
  41. * @property {String,Number} checkDay 控件打开默认选中的日期(未传值或传空字符串默认选中的年份为当日)
  42. * @property {String,Number} startYear 开始年份,默认为1940
  43. * @property {String,Number} futureYear 终止年份,今年向后多少年,可选的最晚年份(截止日期未传时生效)
  44. * @property {Boolean} periodOfValidity = [true | false] 是否是有效期(开启之后选择今天及之前的日期提示日期已过期)
  45. * @property {Boolean} isShow = [true | false] 开启|关闭
  46. * @property {String} overdueContent 开启periodOfValidity之后,选择今天及之前的日期提示日期已过期的内容文字
  47. * @property {Object} endDate 截止日期,可选的最晚日期
  48. * @property {String,Number} dateStatus 日期类型,默认0没有长期和随时,1长期,2随时
  49. */
  50. export default {
  51. name: "datePicker",
  52. props: {
  53. maskColor: {
  54. type: String,
  55. default: 'rgba(0,0,0,0.3)'
  56. },
  57. checkYear:{
  58. type: [String,Number],
  59. default: new Date().getFullYear()
  60. },
  61. checkMonth:{
  62. type: [String,Number],
  63. default: new Date().getMonth() + 1
  64. },
  65. checkDay:{
  66. type: [String,Number],
  67. default: new Date().getDate()
  68. },
  69. startYear:{
  70. type: [String,Number],
  71. default: 1940
  72. },
  73. futureYear:{
  74. type: [String,Number],
  75. default: 10
  76. },
  77. periodOfValidity:{
  78. type: Boolean,
  79. default: false
  80. },
  81. overdueContent:{
  82. type: String,
  83. default: ''
  84. },
  85. endDate: {
  86. type: Object,
  87. default: () => ({})
  88. },
  89. dateStatus:{
  90. type: [String,Number],
  91. default: 0
  92. }
  93. },
  94. data() {
  95. const date = new Date();
  96. let years = [],months = [];
  97. if(this.dateStatus==1){
  98. years = ['长期'];
  99. months = [''];
  100. }
  101. if(this.dateStatus==2){
  102. years = ['随时'];
  103. months = [''];
  104. }
  105. const currectyear = date.getFullYear()
  106. const currectmonth = date.getMonth() + 1
  107. const currectday = date.getDate()
  108. // console.log(this.checkYear)
  109. // const month = date.getMonth() + 1
  110. // const day = date.getDate();
  111. // 传截止日期设置起始年份和终止年份
  112. if(JSON.stringify(this.endDate)!='{}'){
  113. if(this.endDate.year&&this.endDate.year<currectyear){
  114. this.showtoast('截止日期年份必须大于等于当前年份')
  115. return
  116. }
  117. if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month<currectmonth){
  118. this.showtoast('截止日期月份必须大于等于当前月份')
  119. return
  120. }
  121. if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month==currectmonth&&this.endDate.day&&this.endDate.day<currectday){
  122. this.showtoast('截止日期必须大于等于今天')
  123. return
  124. }
  125. var obj=this.createExpirationDate()
  126. // console.log(obj)
  127. years=obj.years
  128. months=obj.months
  129. }
  130. const year = this.checkYear?this.checkYear:currectyear
  131. const month = this.checkMonth?Number(this.checkMonth):currectmonth
  132. const day = this.checkDay?Number(this.checkDay):currectday
  133. console.log(year,month,day)
  134. // 未传截止日期设置起始年份和终止年份
  135. if(JSON.stringify(this.endDate)=='{}'){
  136. for (let i = this.startYear; i <= currectyear + this.futureYear; i++) {
  137. years.push(i);
  138. }
  139. if(this.dateStatus==0&&year=='长期'||this.dateStatus==0&&year=='随时'){
  140. this.showtoast('当前日期选择器未带长期和随时选项,请修改当前类型')
  141. return
  142. }
  143. if(year!='长期'&&year!='随时'){
  144. for (let i = 1; i <= 12; i++) {
  145. months.push(i);
  146. }
  147. }
  148. }
  149. return {
  150. isShow: false, // 是否弹出
  151. isOpen: false,
  152. years,
  153. months,
  154. days: [''],
  155. year,
  156. month,
  157. day,
  158. value: this.dateStatus==0?[Number(year - this.startYear), month-1 , day]:year=='长期'||year=='随时'?[0,0,0]:[Number(year - this.startYear+1), month , day], // 默认选中当天
  159. visible: true,
  160. indicatorStyle: `height: ${Math.round(uni.getSystemInfoSync().screenWidth/(750/100))}px;`
  161. }
  162. },
  163. methods: {
  164. setYearList(){
  165. const date = new Date();
  166. let years = [],months = [];
  167. if(this.dateStatus==1){
  168. years = ['长期'];
  169. months = [''];
  170. }
  171. if(this.dateStatus==2){
  172. years = ['随时'];
  173. months = [''];
  174. }
  175. const currectyear = date.getFullYear()
  176. const currectmonth = date.getMonth() + 1
  177. const currectday = date.getDate()
  178. // console.log(this.checkYear)
  179. // const month = date.getMonth() + 1
  180. // const day = date.getDate();
  181. // 传截止日期设置起始年份和终止年份
  182. if(JSON.stringify(this.endDate)!='{}'){
  183. if(this.endDate.year&&this.endDate.year<currectyear){
  184. this.showtoast('截止日期年份必须大于等于当前年份')
  185. return
  186. }
  187. if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month<currectmonth){
  188. this.showtoast('截止日期月份必须大于等于当前月份')
  189. return
  190. }
  191. if(this.endDate.year&&this.endDate.year==currectyear&&this.endDate.month&&this.endDate.month==currectmonth&&this.endDate.day&&this.endDate.day<currectday){
  192. this.showtoast('截止日期必须大于等于今天')
  193. return
  194. }
  195. var obj=this.createExpirationDate()
  196. // console.log(obj)
  197. years=obj.years
  198. }
  199. // console.log(year,month,day)
  200. // 未传截止日期设置起始年份和终止年份
  201. if(JSON.stringify(this.endDate)=='{}'){
  202. for (let i = this.startYear; i <= currectyear + this.futureYear; i++) {
  203. years.push(i);
  204. }
  205. }
  206. // console.log(years,2222222)
  207. this.years=years
  208. },
  209. createExpirationDate(){
  210. let years = [],months = [];
  211. if(this.dateStatus==1){
  212. years = ['长期'];
  213. months = [''];
  214. }
  215. if(this.dateStatus==2){
  216. years = ['随时'];
  217. months = [''];
  218. }
  219. var year=this.checkYear?this.checkYear:this.year?this.year:new Date().getFullYear()
  220. if(this.dateStatus==0&&year=='长期'||this.dateStatus==0&&year=='随时'){
  221. this.showtoast('当前日期选择器未带长期和随时选项,请修改当前类型')
  222. return
  223. }
  224. for (let i = this.startYear; i <= this.endDate.year; i++) {
  225. years.push(i);
  226. }
  227. if(year==this.endDate.year&&this.endDate.month){
  228. if(year!='长期'||year!='随时'){
  229. for (let i = 1; i <= this.endDate.month; i++) {
  230. months.push(i);
  231. }
  232. }
  233. }
  234. if(year!=this.endDate.year){
  235. for (let i = 1; i <= 12; i++) {
  236. months.push(i);
  237. }
  238. }
  239. return {years,months}
  240. },
  241. showtoast(content){
  242. // #ifdef APP-PLUS
  243. plus.nativeUI.toast(`<font style=\"font-size:15px;margin:20px;\" color="#f56c6c">&nbsp&nbsp&nbsp&nbsp${content?content:this.overdueContent}!&nbsp&nbsp&nbsp&nbsp</font>`, {
  244. icon : "icon URL",// eg. "/img/add.png"
  245. duration : "long",// 持续3.5s,short---2s
  246. align : "center",// 水平居中
  247. verticalAlign : "center",// 垂直底部
  248. background:'#FEF0F0',
  249. type: "richtext",
  250. })
  251. // #endif
  252. // #ifdef H5
  253. uni.showToast({
  254. title: (content?content:this.overdueContent)+'!',
  255. icon:'none',
  256. duration: 2000
  257. });
  258. // #endif
  259. },
  260. setValue(){
  261. var val=[]
  262. console.log(this.days)
  263. for (let i = 0; i < this.years.length; i++) {
  264. if(this.year==this.years[i]){
  265. val[0]=i
  266. }
  267. }
  268. for (let i = 0; i < this.months.length; i++) {
  269. if(Number(this.month)==this.months[i]){
  270. val[1]=i
  271. }
  272. }
  273. for (let i = 0; i < this.days.length; i++) {
  274. if(Number(this.day)==this.days[i]){
  275. val[2]=i
  276. }
  277. }
  278. return val
  279. },
  280. // 选中日期
  281. dateConfirm() {
  282. if(this.month==''&&this.year!='长期'&&this.month==''&&this.year!='随时'){
  283. this.showtoast('未选择月份')
  284. return
  285. }
  286. if(this.day==''&&this.year!='长期'&&this.day==''&&this.year!='随时'){
  287. this.showtoast('未选择日期')
  288. return
  289. }
  290. if(this.periodOfValidity&&this.year!='长期'&&this.periodOfValidity&&this.year!='随时'){
  291. const date=new Date()
  292. const currectyear = date.getFullYear()
  293. const currectmonth = date.getMonth() + 1
  294. const currectday = date.getDate()
  295. if(this.year<currectyear){
  296. this.showtoast()
  297. return
  298. }
  299. if(this.year==currectyear&&this.month<currectmonth){
  300. this.showtoast()
  301. return
  302. }
  303. if(this.year==currectyear&&this.month==currectmonth&&this.day<=currectday){
  304. this.showtoast()
  305. return
  306. }
  307. }
  308. let dateobj={
  309. year:this.year,
  310. month:this.month?this.month > 9 ? this.month : '0' + this.month:'',
  311. day:this.day?this.day > 9 ? this.day :'0' + this.day:'',
  312. date:''
  313. }
  314. if(this.year!='长期'&&this.year!='随时'){
  315. this.value=this.setValue()
  316. dateobj.date= this.year + '-' + (this.month > 9 ? this.month : '0' + this.month) + '-' + (this.day > 9 ? this.day :
  317. '0' + this.day);
  318. }else{
  319. this.value=[0,0,0]
  320. dateobj.date = this.year
  321. }
  322. // 发送一个点击事件,并把当前选中的日期发送出去
  323. this.$emit('dateConfirm', dateobj);
  324. this.hide();
  325. },
  326. bindChange(e) {
  327. const date = new Date();
  328. const year = date.getFullYear()
  329. const month = date.getMonth() + 1
  330. const day = date.getDate()
  331. // console.log(this.value,e)
  332. const val = e.detail.value;
  333. this.year = this.years[val[0]];
  334. this.month = this.months[val[1]];
  335. this.day = this.days[val[2]];
  336. // this.value=[this.year, this.month, this.day]
  337. },
  338. // 弹出
  339. show() {
  340. this.isShow = true;
  341. this.$nextTick(() => {
  342. setTimeout(() => {
  343. this.isOpen = true;
  344. }, 20);
  345. });
  346. },
  347. // 关闭
  348. hide() {
  349. this.isOpen = false;
  350. setTimeout(() => {
  351. this.isShow = false;
  352. }, 200);
  353. },
  354. // 阻止冒泡
  355. handleClick(event) {
  356. event.stopPropagation();
  357. }
  358. },
  359. watch: {
  360. "checkYear":{
  361. handler(val){
  362. // console.log(val)
  363. this.checkYear=val
  364. this.year=val
  365. this.$nextTick(() => {
  366. setTimeout(() => {
  367. if(val=='长期'||val=='随时'){
  368. this.value=[0,0,0]
  369. }
  370. }, 500);
  371. })
  372. }
  373. },
  374. 'dateStatus':{
  375. handler(val){
  376. this.dateStatus=val
  377. this.setYearList()
  378. // console.log(this.years,3333333)
  379. },
  380. deep: true,
  381. immediate: true
  382. },
  383. "endDate":{
  384. handler(val){
  385. this.endDate=val
  386. },
  387. deep: true,
  388. immediate: true
  389. },
  390. "checkMonth":{
  391. handler(val){
  392. this.checkMonth=val
  393. this.month=val
  394. this.$nextTick(() => {
  395. setTimeout(() => {
  396. // console.log(this.month,this.day,this.days)
  397. if(val!='长期'&&val!='随时'){
  398. this.value=this.setValue()
  399. // console.log(this.value)
  400. }
  401. }, 500);
  402. })
  403. // this.$nextTick(() => {
  404. // setTimeout(() => {
  405. // if(val!='长期'&&val!='随时'){
  406. // this.value=this.setValue()
  407. // // console.log(this.value)
  408. // }else{
  409. // this.value=[0,0,0]
  410. // }
  411. // }, 350);
  412. // })
  413. }
  414. },
  415. "checkDay":{
  416. handler(val){
  417. console.log(val,333333)
  418. this.checkDay=val
  419. this.day=val
  420. // this.$nextTick(() => {
  421. // setTimeout(() => {
  422. // if(val!='长期'&&val!='随时'){
  423. // this.value=this.setValue()
  424. // // console.log(this.value)
  425. // }else{
  426. // this.value=[0,0,0]
  427. // }
  428. // }, 350);
  429. // })
  430. }
  431. },
  432. "month": { // 监听月份变化,改变当前月份天数值
  433. handler(val) {
  434. console.log(this.endDate)
  435. if (val < 8&&this.year!='长期'&&val < 8&&this.year!='随时') {
  436. if (val % 2 !== 0) {
  437. this.days = [''];
  438. if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
  439. for (let i = 1; i <= this.endDate.day; i++) {
  440. this.days.push(i);
  441. }
  442. }else{
  443. for (let i = 1; i <= 31; i++) {
  444. this.days.push(i);
  445. }
  446. }
  447. } else {
  448. this.days = [''];
  449. if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
  450. for (let i = 1; i <= this.endDate.day; i++) {
  451. this.days.push(i);
  452. }
  453. }else{
  454. for (let i = 1; i <= 30; i++) {
  455. this.days.push(i);
  456. }
  457. }
  458. }
  459. }
  460. if (val > 7&&this.year!='长期'&&val > 7&&this.year!='随时') {
  461. if (val % 2 === 0) {
  462. this.days = [''];
  463. if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
  464. for (let i = 1; i <= this.endDate.day; i++) {
  465. this.days.push(i);
  466. }
  467. }else{
  468. for (let i = 1; i <= 31; i++) {
  469. this.days.push(i);
  470. }
  471. }
  472. } else {
  473. this.days = [''];
  474. if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
  475. for (let i = 1; i <= this.endDate.day; i++) {
  476. this.days.push(i);
  477. }
  478. }else{
  479. for (let i = 1; i <= 30; i++) {
  480. this.days.push(i);
  481. }
  482. }
  483. }
  484. }
  485. if (val === 2&&this.year!='长期'&&val === 2&&this.year!='随时') {
  486. if (this.year % 4 === 0) {
  487. this.days = [''];
  488. if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
  489. for (let i = 1; i <= this.endDate.day; i++) {
  490. this.days.push(i);
  491. }
  492. }else{
  493. for (let i = 1; i <= 29; i++) {
  494. this.days.push(i);
  495. }
  496. }
  497. } else {
  498. this.days = [''];
  499. if(this.endDate.day&&val===this.endDate.month&&this.year===this.endDate.year){
  500. for (let i = 1; i <= this.endDate.day; i++) {
  501. this.days.push(i);
  502. }
  503. }else{
  504. for (let i = 1; i <= 28; i++) {
  505. this.days.push(i);
  506. }
  507. }
  508. }
  509. }
  510. },
  511. deep: true,
  512. immediate: true
  513. },
  514. "year": { // 监听年份变化,处理2月份天数变化
  515. handler(val) {
  516. if(val=='长期'||val=='随时'){
  517. this.months=[''];
  518. this.days = [''];
  519. }else{
  520. const months = [''];
  521. // console.log(this.endDate)
  522. if(this.endDate.year&&val===this.endDate.year&&this.endDate.month){
  523. for (let i = 1; i <= this.endDate.month; i++) {
  524. months.push(i);
  525. }
  526. }else{
  527. for (let i = 1; i <= 12; i++) {
  528. months.push(i);
  529. }
  530. }
  531. this.months=months
  532. if (val % 4 === 0) {
  533. if (this.month === 2) {
  534. this.days = [''];
  535. if(this.endDate.year&&val===this.endDate.year&&this.endDate.month&&this.endDate.month===this.month&&this.endDate.day){
  536. for (let i = 1; i <= this.endDate.day; i++) {
  537. this.days.push(i);
  538. }
  539. }else{
  540. for (let i = 1; i <= 29; i++) {
  541. this.days.push(i);
  542. }
  543. }
  544. }
  545. } else {
  546. if (this.month === 2) {
  547. this.days = [''];
  548. if(this.endDate.year&&val===this.endDate.year&&this.endDate.month&&this.endDate.month===this.month&&this.endDate.day){
  549. for (let i = 1; i <= this.endDate.day; i++) {
  550. this.days.push(i);
  551. }
  552. }else{
  553. for (let i = 1; i <= 28; i++) {
  554. this.days.push(i);
  555. }
  556. }
  557. }
  558. }
  559. }
  560. }
  561. },
  562. deep: true,
  563. immediate: true
  564. }
  565. }
  566. </script>
  567. <style lang="scss">
  568. .date-picker-mask {
  569. position: fixed;
  570. left: 0;
  571. right: 0;
  572. top: 0;
  573. bottom: 0;
  574. z-index: 99988;
  575. }
  576. .date-picker-container {
  577. position: fixed;
  578. left: 0;
  579. right: 0;
  580. bottom: 0;
  581. z-index: 99999;
  582. background-color: #FFFFFF;
  583. }
  584. .show-date-picker-mask {
  585. transition-property: opacity;
  586. transition-duration: 0.2s;
  587. transition-timing-function: ease;
  588. opacity: 1;
  589. }
  590. .hide-date-picekr-mask {
  591. transition-property: opacity;
  592. transition-duration: 0.2s;
  593. transition-timing-function: ease;
  594. opacity: 0;
  595. }
  596. .show-date-picker {
  597. transition-property: transform, opacity;
  598. transition-duration: 0.2s;
  599. transition-timing-function: ease;
  600. transform: translateY(0);
  601. opacity: 1;
  602. /* #ifndef APP-PLUS-NVUE */
  603. -moz-transition-property: transform, opacity;
  604. -webkit-transition-property: transform, opacity;
  605. -o-transition-property: transform, opacity;
  606. -moz-transition-duration: 0.2s;
  607. -webkit-transition-duration: 0.2s;
  608. -webkit-transition-duration: 0.2s;
  609. -moz-transition-timing-function: ease;
  610. -webkit-transition-timing-function: ease;
  611. -o-transition-timing-function: ease;
  612. -moz-transform: translateY(0);
  613. -webkit-transform: translateY(0);
  614. -o-transform: translateY(0);
  615. /* #endif */
  616. }
  617. .hide-date-picekr {
  618. transition-property: transform, opacity;
  619. transition-duration: 0.2s;
  620. transition-timing-function: ease;
  621. transform: translateY(500px);
  622. opacity: 1;
  623. /* #ifndef APP-PLUS-NVUE */
  624. -moz-transition-property: transform, opacity;
  625. -webkit-transition-property: transform, opacity;
  626. -o-transition-property: transform, opacity;
  627. -moz-transition-duration: 0.2s;
  628. -webkit-transition-duration: 0.2s;
  629. -webkit-transition-duration: 0.2s;
  630. -moz-transition-timing-function: ease;
  631. -webkit-transition-timing-function: ease;
  632. -o-transition-timing-function: ease;
  633. -moz-transform: translateY(500px);
  634. -webkit-transform: translateY(500px);
  635. -o-transform: translateY(500px);
  636. /* #endif */
  637. }
  638. // 确定、取消
  639. .date-picker-title {
  640. height: 100rpx;
  641. padding: 0 20rpx;
  642. // box-shadow: 0 1rpx 1rpx #e4e4e4;
  643. }
  644. .date-picker-confirm {
  645. padding: 10rpx 30rpx;
  646. font-size: 32rpx;
  647. color: #007AFF;
  648. }
  649. .date-picker-cancel {
  650. padding: 10rpx 30rpx;
  651. font-size: 32rpx;
  652. // color: red;
  653. }
  654. // 内容
  655. .date-picker-box {
  656. width: 750rpx;
  657. height: 500rpx;
  658. padding: 0 20rpx;
  659. /* #ifndef APP-PLUS-NVUE */
  660. box-sizing: border-box;
  661. /* #endif */
  662. background-color: #FFF;
  663. }
  664. .date-picker-item {
  665. height: 100rpx;
  666. }
  667. // flex
  668. .row {
  669. /* #ifndef APP-PLUS-NVUE */
  670. display: flex;
  671. /* #endif */
  672. flex-direction: row;
  673. }
  674. .center {
  675. /* #ifndef APP-PLUS-NVUE */
  676. display: flex;
  677. /* #endif */
  678. justify-content: center;
  679. align-items: center;
  680. }
  681. .between-center {
  682. justify-content: space-between;
  683. align-items: center;
  684. }
  685. </style>