代码更新
This commit is contained in:
@@ -45,19 +45,13 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<up-datetime-picker @cancel="timeCancel" @confirm="timeConfirm" :show="time.show" v-model="time.val" mode="time"></up-datetime-picker>
|
||||
<up-datetime-picker @cancel="timeCancel" @confirm="timeConfirm" format="HH:mm" :show="time.show" v-model="time.val" mode="time"></up-datetime-picker>
|
||||
</view>
|
||||
</up-popup>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
reactive,
|
||||
ref,
|
||||
watch,
|
||||
onMounted,
|
||||
computed
|
||||
} from 'vue';
|
||||
import { reactive, ref, watch, computed } from 'vue';
|
||||
import infoBox from '@/commons/utils/infoBox.js'
|
||||
const props = defineProps({
|
||||
show: {
|
||||
@@ -78,21 +72,20 @@
|
||||
saleStartTime:'',
|
||||
})
|
||||
|
||||
|
||||
const time=reactive({
|
||||
show:false,
|
||||
val:'',
|
||||
key:''
|
||||
})
|
||||
function timeCancel(){
|
||||
time.show=false
|
||||
time.show = false
|
||||
}
|
||||
function timeConfirm(e){
|
||||
console.log(e);
|
||||
if(time.key=='start'){
|
||||
category.saleStartTime=e.value
|
||||
category.saleStartTime=e.value+':00'
|
||||
}else{
|
||||
category.saleEndTime=e.value
|
||||
category.saleEndTime=e.value+':00'
|
||||
}
|
||||
time.val=''
|
||||
time.show=false
|
||||
@@ -102,22 +95,11 @@
|
||||
time.val=key=='start'?category.saleStartTime:category.saleEndTime
|
||||
time.show=true;
|
||||
}
|
||||
|
||||
function changeShowRecoders(show) {
|
||||
recoders.show = show
|
||||
}
|
||||
|
||||
const data = ref(props.item)
|
||||
const emits = defineEmits(['update:show', 'save'])
|
||||
const form = reactive({
|
||||
note: ''
|
||||
})
|
||||
let popShow = ref(props.show)
|
||||
let name = ref('')
|
||||
|
||||
watch(() => props.item.name, (newval) => {
|
||||
name.value = newval
|
||||
})
|
||||
let popShow = ref(props.show)
|
||||
|
||||
watch(() => props.show, (newval) => {
|
||||
popShow.value = newval
|
||||
|
||||
Reference in New Issue
Block a user