feat(package): 新增一些案例;但是 tailwindcss 仅在子项目生效
This commit is contained in:
33
packages/nanxing-admin/components/layouts/default/Index.vue
Normal file
33
packages/nanxing-admin/components/layouts/default/Index.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
import { useLoadingBar } from 'naive-ui';
|
||||
import { loadingBarRef } from '../../../core/router/guards';
|
||||
import { onMounted } from 'vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useLocalConfigStore } from '../../../stores/useLocalConfigStore';
|
||||
|
||||
const { primaryColor } = storeToRefs(useLocalConfigStore());
|
||||
const loadingBar = useLoadingBar();
|
||||
|
||||
onMounted(() => {
|
||||
loadingBarRef.value = loadingBar;
|
||||
});
|
||||
|
||||
function pickerThemeColor() {
|
||||
loadingBarRef.value?.start();
|
||||
setTimeout(() => {
|
||||
loadingBarRef.value?.finish();
|
||||
}, 500);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-layout position="absolute">
|
||||
<n-layout-header bordered class="h-12"> </n-layout-header>
|
||||
<n-layout position="absolute" has-sider class="top-12!">
|
||||
<n-layout-sider bordered />
|
||||
<n-layout-content>
|
||||
<slot />
|
||||
</n-layout-content>
|
||||
</n-layout>
|
||||
</n-layout>
|
||||
</template>
|
||||
Reference in New Issue
Block a user