|
@@ -2,7 +2,7 @@ import OHeader from '@/components/o-header'
|
|
import item from '@/student/coupons/item'
|
|
import item from '@/student/coupons/item'
|
|
import dayjs from 'dayjs'
|
|
import dayjs from 'dayjs'
|
|
import { Button, Cell, CellGroup, Popup, showToast, Sticky, TimePicker } from 'vant'
|
|
import { Button, Cell, CellGroup, Popup, showToast, Sticky, TimePicker } from 'vant'
|
|
-import { defineComponent, onMounted, reactive } from 'vue'
|
|
|
|
|
|
+import { defineComponent, onMounted, reactive, watch } from 'vue'
|
|
import styles from './index.module.less'
|
|
import styles from './index.module.less'
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
@@ -132,7 +132,14 @@ export default defineComponent({
|
|
state.selectTimeStatus = false
|
|
state.selectTimeStatus = false
|
|
}
|
|
}
|
|
|
|
|
|
- onMounted(() => {
|
|
|
|
|
|
+ watch(
|
|
|
|
+ () => props.timerList,
|
|
|
|
+ () => {
|
|
|
|
+ init()
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+ const init = () => {
|
|
console.log(props.timerList, 'timerList')
|
|
console.log(props.timerList, 'timerList')
|
|
state.calendarDate = props.timerList?.calendarDate
|
|
state.calendarDate = props.timerList?.calendarDate
|
|
const timeDetailList = props.timerList?.timeDetailList || []
|
|
const timeDetailList = props.timerList?.timeDetailList || []
|
|
@@ -160,6 +167,10 @@ export default defineComponent({
|
|
state.minMinute = temp.startMinute
|
|
state.minMinute = temp.startMinute
|
|
state.maxMinute = 60
|
|
state.maxMinute = 60
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ onMounted(() => {
|
|
|
|
+ init()
|
|
})
|
|
})
|
|
return () => (
|
|
return () => (
|
|
<div class={styles.timer}>
|
|
<div class={styles.timer}>
|