@abi-software/map-side-bar 中文文档教程
map-side-bar
这个项目旨在提供一个侧边栏来搜索 SPARC 门户网站。
Project installation
npm i @abi-software/map-side-bar
Project setup
npm install
npm run serve
Compiles and minifies for production
npm run build-bundle
How to use
在脚本中包含包。
import '@abi-software/map-side-bar'
import '@abi-software/map-side-bar/dist/map-side-bar.css'
Template
代码看起来应该像这样
<SideBar :envVars="envVars"
:visible="sideBarVisibility"
@actionClick="actionClick">
</SideBar>
envVars 包含这样的环境变量:
{
API_LOCATION: 'http://localhost:5000/',
ALGOLIA_KEY: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
ALGOLIA_ID: 'xxxxx',
ALGOLIA_INDEX: 'k-core_dev_published_time_desc',
}
actionClick 事件在单击操作按钮时调用。
map-side-bar
This project aims to provide a sidebar for searching capability for SPARC portal.
Project installation
npm i @abi-software/map-side-bar
Project setup
npm install
npm run serve
Compiles and minifies for production
npm run build-bundle
How to use
Include the package in your script.
import '@abi-software/map-side-bar'
import '@abi-software/map-side-bar/dist/map-side-bar.css'
Template
The code should looks like this
<SideBar :envVars="envVars"
:visible="sideBarVisibility"
@actionClick="actionClick">
</SideBar>
envVars contains environment varibables like so:
{
API_LOCATION: 'http://localhost:5000/',
ALGOLIA_KEY: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
ALGOLIA_ID: 'xxxxx',
ALGOLIA_INDEX: 'k-core_dev_published_time_desc',
}
actionClick event is called when an action button has benn clicked on.