0.0.0 • Published 11 months ago

v3-select v0.0.0

Weekly downloads
-
License
-
Repository
-
Last release
11 months ago

v3-select

A selector component for Vue 3.x.

alt v3-select

Features

Usage

Three ways are supported to use the component, here are the examples.

Use library as global variable

Request the theme CSS and script files from CDN.

<link rel="stylesheet" type="text/css" href="https://unpkg.com/v3-select@latest/dist/lib/v3-select-theme.min.css"/>
<script src="https://unpkg.com/vue@3.5.12/dist/vue.global.prod.js"></script>
<script src="https://unpkg.com/v3-select@latest/dist/lib/v3-select.umd.js"></script>

Use a div element with an id to mount the app.

<div id="app">
    <v3-select/>
</div>

Write the script to create the Vue app.

const {createApp} = Vue;

const app = createApp({
    data: () => {
        return {
        };
    }
});
app.component('v3-select', V3DTable);
app.mount('#app');

ES Module

Request the theme CSS file and import the libraries from CDN.

<link rel="stylesheet" type="text/css" href="https://unpkg.com/v3-select@latest/dist/lib/v3-select-theme.min.css"/>
<script type="importmap">
    {"imports": {
        "vue": "https://unpkg.com/vue@3.5.12/dist/vue.esm-browser.prod.js",
        "v3-select": "https://unpkg.com/v3-select@latest/dist/lib/v3-select.es.js"
    }}
</script>

Use a div element with an id to mount the app.

<div id="app">
    <v3-select/>
</div>

Write the script to create the Vue app with type="module" attribute.

import {createApp} from 'vue';
import V3DTable from 'v3-select';

const app = createApp({
    data: () => {
        return {
        };
    }
});
app.component('v3-select', V3DTable);
app.mount('#app');

npm & Vue

Install the library from npm.

npm install v3-select

Use the component in your Vue app.

<script setup>
import V3DTable from 'v3-select';
import 'v3-select/v3-select.css';
</script>

<template>
    <v3-select/>
</template>

Configuration

0.0.0

11 months ago