[Little Tail UI Component Library] Configuration and use of component library

Article archived at: https://www.yuque.com/u27599042/row3c6

Component library address

download

  • npm
npm i xwb-ui
  • pnpm
pnpm i xwb-ui
  • yarn
yarn add xwb-ui

UI style configuration

  • In the main.js / main.ts file, introduce the component library UI style
import 'xwb-ui/style.css' // 导入小尾巴 UI 样式

Import UI component library

import on demand

import {
    
    
  // 组件名
} from 'xwb-ui'

full import

  • Register all components in the component library as global components through the built-in plug-in XWB_UI in the UI component library.
import {
    
    createApp} from 'vue'
import App from './App.vue'

import 'xwb-ui/style.css' // 导入小尾巴 UI 样式
import XWB_UI from 'xwb-ui' // 导入将组件库中所有组件注册为全局组件的插件

const app = createApp(App)

// 使用 XWB_UI 插件
app.use(XWB_UI)

app.mount('#app')

Description and use of each component

Guess you like

Origin blog.csdn.net/m0_53022813/article/details/132770037