refactor permission

This commit is contained in:
Timi
2026-08-11 15:24:29 +08:00
parent 45ea8b46aa
commit 575d41b2e2
20 changed files with 1789 additions and 625 deletions
+46
View File
@@ -0,0 +1,46 @@
<template>
<div class="card-title">
<h3 v-if="title || $slots.title" class="title">
<slot name="title">
<span v-text="title" />
</slot>
</h3>
<p v-if="description || $slots.description" class="description gray">
<slot name="description">
<span v-text="description" />
</slot>
</p>
</div>
</template>
<script setup lang="ts">
interface Props {
title?: string;
description?: string;
}
defineProps<Props>();
defineSlots<{
title?: () => unknown;
description?: () => unknown;
}>();
defineOptions({
name: "CardTitle"
});
</script>
<style lang="less" scoped>
.card-title {
margin: 1rem;
.title {
margin: 0;
}
.description {
margin: .5rem 0 0 0;
font-size: .875rem;
}
}
</style>