优化组件类型声明,添加视频播放功能,更新依赖项,重构多个组件,改进路由配置及页面元信息
This commit is contained in:
21
src/App.vue
21
src/App.vue
@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<PerfectScrollbar>
|
||||
<!-- <login v-if="route.path == '/login'"></login> -->
|
||||
<!-- <router-view></router-view> -->
|
||||
<lay-index></lay-index>
|
||||
|
||||
</PerfectScrollbar>
|
||||
</div>
|
||||
|
||||
@ -10,10 +12,10 @@
|
||||
{{ modal.content }}
|
||||
<div class="mt-10 w-full flex justify-between">
|
||||
<d-button @click="modal.handdleCancel" variant="text"
|
||||
class="w-[49%] hover:bg-[#8a6684] hover:!text-white">取消</d-button>
|
||||
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">确定</d-button>
|
||||
color="primary">{{modal.submitText}}</d-button>
|
||||
</div>
|
||||
</d-modal>
|
||||
</template>
|
||||
@ -21,6 +23,8 @@
|
||||
<script setup lang="ts">
|
||||
import layIndex from './Index.vue'
|
||||
// 空白项目入口
|
||||
const route = useRoute()
|
||||
|
||||
const modal = reactive<any>({
|
||||
visible: false,
|
||||
title: "",
|
||||
@ -30,10 +34,16 @@ const modal = reactive<any>({
|
||||
})
|
||||
|
||||
function comemodal(mv: any) {
|
||||
if (!mv) return
|
||||
modal.visible = true
|
||||
modal.title = mv.title
|
||||
modal.content = mv.content
|
||||
if (mv.handdleCancel) modal.handdleCancel = mv.handdleCancel
|
||||
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
|
||||
@ -42,6 +52,11 @@ function comemodal(mv: any) {
|
||||
|
||||
window.$modal = comemodal
|
||||
|
||||
// 全局禁用右键菜单
|
||||
document.oncontextmenu = function () {
|
||||
return false;
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user