[优化] 组件代码

This commit is contained in:
就眠儀式
2021-11-17 23:37:54 +08:00
parent 117ef91144
commit 624d4916e1
14 changed files with 245 additions and 204 deletions

View File

@@ -0,0 +1,14 @@
.layui-elem-quote {
margin-bottom: 10px;
padding: 15px;
line-height: 1.6;
border-left: 5px solid #5fb878;
border-radius: 0 2px 2px 0;
background-color: #fafafa;
}
.layui-quote-nm {
border-style: solid;
border-width: 1px 1px 1px 5px;
background: 0 0;
}

View File

@@ -1,13 +1,20 @@
<template>
<blockquote class="layui-elem-quote" :class="[nm ? 'layui-quote-nm' : '']">
<slot />
</blockquote>
</template>
<script lang="ts">
export default {
name: "LayBlock",
};
</script>
<script setup name="LayBlock" lang="ts">
import { defineProps } from 'vue'
<script setup lang="ts">
import { defineProps } from "vue";
import "./index.less"
const props = defineProps<{
nm?: boolean
}>()
nm?: boolean;
}>();
</script>
<template>
<blockquote class="layui-elem-quote" :class="{ 'layui-quote-nm': nm }">
<slot />
</blockquote>
</template>