新年的第一次提交

This commit is contained in:
就眠儀式
2022-02-01 07:23:20 +08:00
parent 5fe02df5db
commit 126d20bc3f
77 changed files with 1393 additions and 1297 deletions

View File

@@ -1,41 +1,24 @@
@import "../../theme/variable.less";
.layui-card {
margin-bottom: 15px;
border-radius: 2px;
border-radius: @card-border-radius;
background-color: #fff;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
.layui-card-header {
height: 42px;
line-height: 42px;
padding: 0 15px;
border-bottom: 1px solid #f6f6f6;
color: #333;
font-size: 14px;
}
.layui-card-body {
padding: 10px 15px;
line-height: 24px;
}
}
.layui-card:last-child {
margin-bottom: 0;
}
.layui-card-header {
height: 42px;
line-height: 42px;
padding: 0 15px;
border-bottom: 1px solid #f6f6f6;
color: #333;
border-radius: 2px 2px 0 0;
font-size: 14px;
}
.layui-card-body {
padding: 10px 15px;
line-height: 24px;
}
.layui-card-body[pad15] {
padding: 15px;
}
.layui-card-body[pad20] {
padding: 20px;
}
.layui-card-body .layui-table {
margin: 5px 0;
}
.layui-card .layui-tab {
margin: 0;
}
}

View File

@@ -1,9 +1,8 @@
import type { App } from "vue";
import Component from "./index.vue";
import type { IDefineComponent } from "../../types/index";
Component.install = (app: App) => {
app.component(Component.name || "LayCard ", Component);
app.component(Component.name, Component);
};
export default Component as IDefineComponent;
export default Component;

View File

@@ -1,17 +1,10 @@
<template>
<div class="layui-card">
<div class="layui-card-header" v-if="slot.header || title">
<slot name="header" v-if="slot.header"></slot>
<span v-else>{{ title }}</span>
</div>
<div class="layui-card-body">
<slot name="body" v-if="slot.body"></slot>
<slot v-else></slot>
</div>
</div>
</template>
<script lang="ts">
export default {
name: "LayCard"
}
</script>
<script setup name="LayCard" lang="ts">
<script setup lang="ts">
import { useSlots } from "vue";
import "./index.less";
@@ -23,3 +16,16 @@ export interface LayCardProps {
const props = defineProps<LayCardProps>();
</script>
<template>
<div class="layui-card">
<div class="layui-card-header" v-if="slot.header || title">
<slot name="header" v-if="slot.header"></slot>
<span v-else>{{ title }}</span>
</div>
<div class="layui-card-body">
<slot name="body" v-if="slot.body"></slot>
<slot v-else></slot>
</div>
</div>
</template>