docs: 更新日志, 修复文档细节
This commit is contained in:
@@ -19,4 +19,11 @@
|
||||
border-color: @panel-border-color;
|
||||
background-color: @panel-back-color;
|
||||
color: @panel-fore-color;
|
||||
.is-hover-shadow:hover {
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
.shadow {
|
||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,10 +6,27 @@ export default {
|
||||
|
||||
<script setup lang="ts">
|
||||
import "./index.less";
|
||||
import {computed} from "vue";
|
||||
import {PanelShadow} from "./interface";
|
||||
|
||||
export interface LayPanelProps {
|
||||
shadow?: PanelShadow;
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<LayPanelProps>(), {
|
||||
shadow: "always",
|
||||
});
|
||||
|
||||
const classes = computed(() => {
|
||||
return {
|
||||
shadow: props.shadow === "always",
|
||||
"is-hover-shadow": props.shadow === "hover",
|
||||
};
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="layui-panel">
|
||||
<div class="layui-panel" :class="classes">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
1
src/component/panel/interface.ts
Normal file
1
src/component/panel/interface.ts
Normal file
@@ -0,0 +1 @@
|
||||
export type PanelShadow = "always" | "hover" | "never";
|
||||
Reference in New Issue
Block a user