Skip to content

日历中无法获取data中的数据 #5957

@zxh5

Description

@zxh5

重现链接

list: [
{
date: "2025-01-01",
price: "¥199",
},
{
date: "2025-01-02",
price: "¥199",
},
{
date: "2025-01-03",
price: "¥199",
},
],
methods: {
formatter(day) {
// console.log(this.list);

  const month = day.date.getMonth() + 1;
  const date = day.date.getDate();

  if (day.type === "start") {
    day.bottomInfo = "入住";
  } else if (day.type === "end") {
    day.bottomInfo = "离店";
  }
  return day;
},

},

Vant Weapp 版本

1.11.6

描述一下你遇到的问题。

获取不到this.list

重现步骤

日历组件加载时获取不到

设备/浏览器

uni微信小程序

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions