docs(Calendar): fix variable conflict #7803

This commit is contained in:
chenjiahan 2020-12-26 14:12:29 +08:00
parent 2323e729c5
commit 455b9e6d44
2 changed files with 10 additions and 10 deletions

View File

@ -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)}`;
};

View File

@ -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)}`;
};