@abi-software/map-side-bar 中文文档教程

发布于 3年前 浏览 16 更新于 3年前

map-side-bar

npm version

这个项目旨在提供一个侧边栏来搜索 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

npm version

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.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文