javascript - Vue 2 google-map 不会在故事书中呈现
问题描述
我正在使用vue2-google-maps包,并且我有一个工作地图组件。现在我尝试在故事书中为这个组件创建一个故事,但我得到了如下错误:
Unknown custom element <GmapMap>
Unknown custom element <GmapMarker>
Unknown custom element <GmapInfoWindow>.
这是我的故事:
export default {
title: "Components/GoogleMap",
component: GoogleMap,
argTypes: {
size: {
options: ["big"],
control: "radio"
}
}
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { GoogleMap },
template: `<GoogleMap v-bind="$props" />`
});
export const Big = Template.bind({});
Big.args = {
size: "big",
addresses: [...]
};
export const Small = Template.bind({});
Small.args = {
...
};
有人对此有任何想法吗?
解决方案
推荐阅读
- node.js - 如何知道服务器也返回了我的应用程序
- sql - 上升一个已经下降的结果?
- python - 如何在一定时间后停止“输入()”功能?
- javascript - date-fns isToday() 返回一个令人困惑的值
- c - 试图清空链表
- sql - 如何将多行合并为一而不重复
- iis - IIS URL 重写入站规则条件失败
- c# - 单击按钮时如何使文本显示在网格中
- ios - Xcode 11 Beta 7 命令 PhaseScriptExecution 失败,退出代码非零([CP] Copy Pods Resources)
- javascript - MapBox GL JS:使非交互式地图交互