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 前端UI框架的调用”的全面内容,想了解更多关于 vuejs 内容,请继续关注web建站教程。
当前网址:https://ipkd.cn/webs_12999.html
workflows工作流
一个孤独的身影在未来主义城市
一朵在晨光中带着露珠的蓝玫瑰
沙漠里一只红黑相间的蝎子
一位美丽的女士在座机上讲话ComfyUI工作流
一辆在泥潭中奔跑的布加迪ComfyUI工作流
一个黑人在森林中穿着折纸的衣服ComfyUI工作流
广阔的沙漠中矗立着一个生锈的巨大头盔
一支令人难忘的狙击步枪ComfyUI工作流
猜你喜欢
声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

一起去看流星雨(代码)
利用canvas画几个好玩的星云物种
html5如何3D立方体旋转特效
利用css3做一个动态loading效果
css3绘制一个会动的大嘴鸟
3d文字360度旋转







