nocloud-ui
v1.0.19
Published
NoCloud UI Design Library
Downloads
284
Readme
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.
<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.