迁移UI框架至naive-ui,重构组件和样式,添加Gallery和Mask组件

This commit is contained in:
2025-12-28 16:45:58 +08:00
parent 4c097e4c40
commit 96edada2ff
54 changed files with 2482 additions and 2979 deletions

View File

@ -1,71 +1,29 @@
<template>
<div>
<PerfectScrollbar>
<lay-index></lay-index>
</PerfectScrollbar>
</div>
<d-modal class="!w-80" v-model="modal.visible" :title="modal.title">
{{ modal.content }}
<div class="mt-4 w-full flex justify-between">
<!-- <d-button @click="modal.handdleCancel" variant="text"
class="w-[49%] hover:bg-[#8a6684] hover:!text-white">{{modal.cancelText}}</d-button>
<span class="text-[20px]"> | </span>
<d-button @click="modal.handdleSubmit" variant="text" class="w-[49%] hover:bg-[#5c866a] hover:!text-white"
color="primary">{{modal.submitText}}</d-button> -->
<d-button class="w-[48%]" variant="solid" color="secondary" @click="modal.handdleCancel">{{modal.cancelText}}</d-button>
<d-button class="w-[48%]" variant="solid" color="primary" @click="modal.handdleSubmit">{{modal.submitText}}</d-button>
</div>
</d-modal>
<n-config-provider :theme-overrides="themeOverrides">
<n-message-provider>
<n-dialog-provider>
<n-modal-provider>
<n-scrollbar style="max-height: 100vh">
<lay-index></lay-index>
</n-scrollbar>
</n-modal-provider>
</n-dialog-provider>
</n-message-provider>
</n-config-provider>
</template>
<script setup lang="ts">
import layIndex from './Index.vue'
import themeOverrides from '@/util/theme.ts';
import layIndex from './Index.vue';
// 空白项目入口
const route = useRoute()
const logStatus = $store.log.useLogStore()
const modal = reactive<any>({
visible: false,
title: "",
content: "",
handdleCancel: () => { modal.visible = false },
handdleSubmit: () => { },
})
function comemodal(mv: any) {
if (!mv) return
modal.visible = true
modal.title = mv.title
modal.content = mv.content
modal.cancelText = mv.cancelText || "取消"
modal.submitText = mv.submitText || "确定"
if (mv.handdleCancel) modal.handdleCancel = () => {
mv.handdleCancel()
modal.visible = false
}
modal.handdleSubmit = () => {
mv.handdleSubmit()
modal.visible = false
}
}
window.$modal = comemodal
// 全局禁用右键菜单
document.oncontextmenu = function () {
return false;
};
onMounted(() => {
if($cookies.get('userinfo')) logStatus.setIsLogin(true)
if ($cookies.get('userinfo')) logStatus.setIsLogin(true)
})
</script>
<style scoped lang="less">
.ps {
width: 100vw;
height: 100vh;
padding-inline-start: 0;
}
</style>
<style scoped lang="less"></style>