docs(Calendar): fix variable conflict #7803
This commit is contained in:
@@ -34,9 +34,9 @@ export default {
|
|||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||||
const onConfirm = (date) => {
|
const onConfirm = (value) => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
date.value = formatDate(date);
|
date.value = formatDate(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -95,8 +95,8 @@ export default {
|
|||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||||
const onConfirm = (date) => {
|
const onConfirm = (values) => {
|
||||||
const [start, end] = date;
|
const [start, end] = values;
|
||||||
show.value = false;
|
show.value = false;
|
||||||
date.value = `${formatDate(start)} - ${formatDate(end)}`;
|
date.value = `${formatDate(start)} - ${formatDate(end)}`;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -34,9 +34,9 @@ export default {
|
|||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||||
const onConfirm = (date) => {
|
const onConfirm = (value) => {
|
||||||
show.value = false;
|
show.value = false;
|
||||||
date.value = formatDate(date);
|
date.value = formatDate(value);
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -97,8 +97,8 @@ export default {
|
|||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
|
|
||||||
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
const formatDate = (date) => `${date.getMonth() + 1}/${date.getDate()}`;
|
||||||
const onConfirm = (date) => {
|
const onConfirm = (values) => {
|
||||||
const [start, end] = date;
|
const [start, end] = values;
|
||||||
show.value = false;
|
show.value = false;
|
||||||
date.value = `${formatDate(start)} - ${formatDate(end)}`;
|
date.value = `${formatDate(start)} - ${formatDate(end)}`;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user