
Layui Vue是一套Vue 3.0桌面组件库,遵循Layuivue经典的设计规范,开箱即用。2022年Layui Vue发布了1.0版本,2023年发布了基于Vue 3的2.0版本。它是一个UI组件库,使用简单,稳定可靠,设计经典。
使用npm工具安装layui vue
npm install @layui/layui-vue --save
全局注册到 Vue
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')
按需引入
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')
Layui – Vue直接引入
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="//unpkg.com/@layui/layui-vue/lib/index.css" />
<script src="//unpkg.com/vue@3"></script>
<script src="//unpkg.com/@layui/layui-vue"></script>
</head>
<body>
<div id="app">
<lay-button type="primary">{{ message }}</lay-button>
</div>
<script>
const App = {
data() {
return {
message: "Hello World"
};
},
};
const app = Vue.createApp(App);
app.use(LayuiVue);
app.mount("#app");
</script>
</body>
</html>
基于Vite/TypeScript/Vue3/ElementPlus+TinkPHP6前后端一体框架——Niucloud Admin
免费开源的 Vue 3 桌面端 UI 组件库——Layui Vue
标签: Layui Vue, Vue3免费开源组件, Vue3组件库, 桌面端UI组件库
上面是“Layui - Vue 前端UI框架的调用”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://m.ipkd.cn/webs_12999.html
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

css3实现鼠标移上去隐藏提示框由上到下滑动效果
Github Proxy官网:一个在线重定向Github链接文件代理加速下载服务