nocloud-ui

1.0.19 • Public • Published

NoCloud UI

UI library based on VUE for NoCloud or other projects.

Instalation

yarn install nocloud-ui

// or

npm install nocloud-ui
  • components
    • map

map

A map component for displaying locations and/or setting them up.

Map Component Example

<nc-map v-model="selectedLocation" :markers="locations" />
import { NcMap } from "nocloud-ui";

export default {
 name: 'app',
 components: { NcMap },
 data: () => ({ selectedLocation: "", locations: [] })
}

Location is an object with fields:

const location = {
 title: "[display name of the location next to the marker]", // string
 id: "[two-letter country code, with some exceptions*]", // string
 x: "[marker display coordinate on the map along the x-axis]", // number
 y: "[marker display coordinate on the map along the y-axis]", // number
 extra: "[additional location information**]" // object
};

// *for example, for OVH, the datacenter will be indicated with a hyphen - "PL-WAW" (PL - country code, WAW - datacenter)
// **for example, for OVH, there will be field "region" with a datacenter inside - { extra: { region: "WAW" } }

Country codes are in the map.json file at the root of the repository.

Readme

Keywords

Package Sidebar

Install

npm i nocloud-ui

Weekly Downloads

51

Version

1.0.19

License

Apache-2.0

Unpacked Size

1.79 MB

Total Files

113

Last publish

Collaborators

  • slnt_opp