mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-07 09:01:18 +08:00
代码生成优化
This commit is contained in:
31
x_admin_app/components/x-date/x-date.vue
Normal file
31
x_admin_app/components/x-date/x-date.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<view style="flex: 1" @click="calendarsRef.open()">
|
||||
<uv-input :modelValue="title" :readonly="true" placeholder="请选择时间">
|
||||
</uv-input>
|
||||
</view>
|
||||
<uv-calendars ref="calendarsRef" :date="props.time" @confirm="Confirm" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
|
||||
const emit = defineEmits(["update:time"]);
|
||||
const props = defineProps({
|
||||
time: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
});
|
||||
let calendarsRef = ref(null);
|
||||
function Confirm(e) {
|
||||
console.log(e);
|
||||
emit("update:time", e.fulldate);
|
||||
// emit("update:endTime", e.range.after);
|
||||
}
|
||||
|
||||
const title = computed(() => {
|
||||
return props.time;
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
Reference in New Issue
Block a user