mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Calendar): fix variable conflict #7803
This commit is contained in:
parent
2323e729c5
commit
455b9e6d44
@ -34,9 +34,9 @@ export default {
|
||||
const show = ref(false);
|
||||
|
||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||
const onConfirm = (date) => {
|
||||
const onConfirm = (value) => {
|
||||
show.value = false;
|
||||
date.value = formatDate(date);
|
||||
date.value = formatDate(value);
|
||||
};
|
||||
|
||||
return {
|
||||
@ -95,8 +95,8 @@ export default {
|
||||
const show = ref(false);
|
||||
|
||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||
const onConfirm = (date) => {
|
||||
const [start, end] = date;
|
||||
const onConfirm = (values) => {
|
||||
const [start, end] = values;
|
||||
show.value = false;
|
||||
date.value = `${formatDate(start)} - ${formatDate(end)}`;
|
||||
};
|
||||
|
@ -34,9 +34,9 @@ export default {
|
||||
const show = ref(false);
|
||||
|
||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||
const onConfirm = (date) => {
|
||||
const onConfirm = (value) => {
|
||||
show.value = false;
|
||||
date.value = formatDate(date);
|
||||
date.value = formatDate(value);
|
||||
};
|
||||
|
||||
return {
|
||||
@ -97,8 +97,8 @@ export default {
|
||||
const show = ref(false);
|
||||
|
||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||
const onConfirm = (date) => {
|
||||
const [start, end] = date;
|
||||
const onConfirm = (values) => {
|
||||
const [start, end] = values;
|
||||
show.value = false;
|
||||
date.value = `${formatDate(start)} - ${formatDate(end)}`;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user