Brain777 最近的时间轴更新
Brain777

Brain777

V2EX 第 662928 号会员,加入于 2023-11-16 17:59:27 +08:00
Brain777 最近回复了
86 天前
回复了 semxau789 创建的主题 问与答 给六年级的小学生送什么好
乐高 法拉利
// 调用
<DataRange v-model="date_range" />

// 二次封装的 DateRange 组件
<template>
<el-date-picker
v-model="date"/>
</template>
<script setup lang="ts">

interface Props {
modelValue: string | Date;
}

const props = withDefaults(defineProps<Props>(), {
modelValue: "",
});

const emit = defineEmits(["update:modelValue"]);

const date = ref<string | Date>("")

watch(date,(value) => emit("update:modelValue", value))
</script>

可以这样写
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3215 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 12ms · UTC 12:17 · PVG 20:17 · LAX 05:17 · JFK 08:17
Developed with CodeLauncher
♥ Do have faith in what you're doing.