::: title 快速上手 ::: ``` npm install @layui/layui-vue --save ``` ``` yarn add @layui/layui-vue --save ``` ``` pnpm install @layui/layui-vue --save ```
::: title 全局注册 ::: ```js import App from './App.vue' import { createApp } from 'vue' import Layui from '@layui/layui-vue' import '@layui/layui-vue/lib/index.css' createApp(App).use(Layui).mount('#app') ```
::: title 按需引入 ::: ```js import App from './App.vue' import { createApp } from 'vue' import { LayButton, LayTable } from '@layui/layui-vue' import '@layui/layui-vue/es/button/index.css'; import '@layui/layui-vue/es/table/index.css'; var app = createApp(App). app.component("LayButton", LayButton); app.component("LayTable", LayTable); app.mount('#app') ```
::: title 基础示例 ::: ```html Layui Admin pearadmin.com ```