w-component-vue

2.3.87 • Public • Published

w-component-vue

A simple component for vue(vue2).

language language npm version license gzip file size npm download npm download jsdelivr download

Documentation

To view documentation or get support, visit docs.

Example

To view some examples for more understanding, visit examples:

all components: web [source code]

Installation

Using npm(ES6 module):

Note: w-component-vue is mainly dependent on vuetify and @mdi/js.

npm i w-component-vue

Import all components:

//choose component
<w-text
    ...
></w-text>

//import
import WComponentVue from 'w-component-vue'

//use
Vue.use(WComponentVue)

Import one component:

//choose component
<w-text
    ...
></w-text>

//import
import WText from 'w-component-vue/src/components/WText.vue'

//component
Vue.component('w-text',WText)
//or
export default {
    components: {
        WText,
        //or
        'w-text': WText,
    },
    ...
}

In a browser(UMD module):

Note: umd file of w-component-vue is mainly dependent on vue and vuetify.

[Optional] Add script with nomodule for IE11.

<script nomodule src="https://cdn.jsdelivr.net/npm/@babel/polyfill/dist/polyfill.min.js"></script>

[Necessary] Add script for vue.

<script src="https://cdn.jsdelivr.net/npm/vue@2.x/dist/vue.min.js"></script>

[Optional] Add link for icon.

<link href="https://cdn.jsdelivr.net/npm/@mdi/font@7.2.96/css/materialdesignicons.min.css" rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.2/css/all.min.css" rel="stylesheet">

[Necessary] Add script and link for vuetify.

<link href="https://cdn.jsdelivr.net/npm/vuetify@2.6.14/dist/vuetify.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.6.14/dist/vuetify.min.js"></script>

[Necessary] Add script for w-component-vue.

<script src="https://cdn.jsdelivr.net/npm/w-component-vue@2.3.87/dist/w-component-vue.umd.js"></script>

Directly use:

//app and component
<div id="app">
    <w-text
        ...
    ></w-text>
</div>

//use
Vue.use(window['w-component-vue'])

//new
new Vue({
    el: '#app',
    data: {
        ...
    }
})

Readme

Keywords

Package Sidebar

Install

npm i w-component-vue

Weekly Downloads

221

Version

2.3.87

License

MIT

Unpacked Size

25.7 MB

Total Files

1757

Last publish

Collaborators

  • semisphere