【发布时间】:2020-03-30 12:27:44
【问题描述】:
我基本上是在尝试使用 json 文件来存储少量数据并在组件中使用它们。
[
{
"heroTitle": [
"Banner image",
"assets/images/banner/sunset.jpg",
"sunset.jpg"
],
}
]
上面是一个示例 json 下面是我的组件
<template>
<header>
<div class="hero">
<h1 class="hero__title">"banner name here"</h1>
<img src="image path and file here" alt="alt text here" />
</div>
</header>
</template>
另外,有没有办法从应用程序本身编辑 jason?
【问题讨论】: