[新增] row 和 col 栅格组件
This commit is contained in:
10
src/css/all.css
Normal file
10
src/css/all.css
Normal file
@@ -0,0 +1,10 @@
|
||||
.grid-demo-bg1 {
|
||||
background-color: #63BA79;
|
||||
}
|
||||
.grid-demo {
|
||||
padding: 10px;
|
||||
line-height: 50px;
|
||||
text-align: center;
|
||||
background-color: #79C48C;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1058,7 +1058,7 @@ a cite {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: #23262E
|
||||
background-color: #393D49
|
||||
}
|
||||
|
||||
.layui-layout-admin .layui-side {
|
||||
|
||||
11
src/index.ts
11
src/index.ts
@@ -1,7 +1,8 @@
|
||||
import type { App } from 'vue'
|
||||
import type { IDefineComponent, InstallOptions } from './module/type/index'
|
||||
|
||||
import "./css/layui.css";
|
||||
import "./css/layui.css"
|
||||
import "./css/all.css"
|
||||
import LayRadio from './module/radio/index'
|
||||
import LayButton from './module/button/index'
|
||||
import LayButtonContainer from './module/buttonContainer/index'
|
||||
@@ -16,6 +17,8 @@ import LayFooter from "./module/footer/index"
|
||||
import LayLogo from "./module/logo/index"
|
||||
import LayPanel from "./module/panel/index"
|
||||
import LayProgress from "./module/panel/index"
|
||||
import LayCol from "./module/col/index"
|
||||
import LayRow from "./module/row/index"
|
||||
|
||||
const components: Record<string, IDefineComponent> = {
|
||||
LayRadio,
|
||||
@@ -31,7 +34,9 @@ const components: Record<string, IDefineComponent> = {
|
||||
LayCard,
|
||||
LayProgress,
|
||||
LayButtonGroup,
|
||||
LayButtonContainer
|
||||
LayButtonContainer,
|
||||
LayRow,
|
||||
LayCol,
|
||||
}
|
||||
|
||||
const install = (app: App, options?: InstallOptions): void => {
|
||||
@@ -59,6 +64,8 @@ export {
|
||||
LayProgress,
|
||||
LayButtonGroup,
|
||||
LayButtonContainer,
|
||||
LayRow,
|
||||
LayCol,
|
||||
install,
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
<template>
|
||||
<div class="layui-col" :class="[md?'layui-col-md' + md : '', xs?'layui-col-xs':'', sm?'layui-col-sm':'']">
|
||||
<slot></slot>
|
||||
<div
|
||||
class="layui-col"
|
||||
:class="[
|
||||
md ? 'layui-col-md' + md : '',
|
||||
xs ? 'layui-col-xs' + xs : '',
|
||||
sm ? 'layui-col-sm' + sm : '',
|
||||
lg ? 'layui-col-lg' + lg : '',
|
||||
mdOffset ? 'layui-col-md-offset' + mdOffset : '',
|
||||
xsOffset ? 'layui-col-xs-offset' + xsOffset : '',
|
||||
smOffset ? 'layui-col-sm-offset' + smOffset : '',
|
||||
lgOffset ? 'layui-col-lg-offset' + lgOffset : '',
|
||||
]"
|
||||
>
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -12,5 +24,10 @@ const props =
|
||||
md?: string
|
||||
xs?: string
|
||||
sm?: string
|
||||
lg?: string
|
||||
mdOffset?: string
|
||||
xsOffset?: string
|
||||
smOffset?: string
|
||||
lgOffset?: string
|
||||
}>()
|
||||
</script>
|
||||
Reference in New Issue
Block a user