forked from gzt/A8000
6 changed files with 195 additions and 50 deletions
-
1components.d.ts
-
124src/components/Confirm.vue
-
1src/components/index.ts
-
3src/main.ts
-
112src/pages/Index/Index.vue
-
4src/utils/getServerInfo.ts
@ -0,0 +1,124 @@ |
|||||
|
import { default } from './SimpleKeyboard.vue'; |
||||
|
<template> |
||||
|
<div class="loading-overlay" v-if="isLoading"> |
||||
|
<div class="loading-content"> |
||||
|
<div class="main"> |
||||
|
<div class="title">{{ confirmInfo.title }}</div> |
||||
|
<div class="content">{{ confirmInfo.message }}</div> |
||||
|
<div style="display: flex;"> |
||||
|
<button class="centerBtn" @click="onCancel">{{ confirmInfo.cancelBtn }}</button> |
||||
|
<button class="OkBtn" @click="onConfirm">{{ confirmInfo.OkBtn }}</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
const props = defineProps({ |
||||
|
isLoading: { |
||||
|
type:Boolean, |
||||
|
default: false, |
||||
|
}, |
||||
|
|
||||
|
message: { |
||||
|
type: String, |
||||
|
default: '正在加载中' |
||||
|
}, |
||||
|
|
||||
|
confirmInfo:{ |
||||
|
type:Object, |
||||
|
default:()=>{} |
||||
|
} |
||||
|
}) |
||||
|
|
||||
|
const onConfirm = ()=> { |
||||
|
props.confirmInfo.confirmCallback() |
||||
|
} |
||||
|
|
||||
|
const onCancel = ()=>{ |
||||
|
props.confirmInfo.cancelCallback() |
||||
|
} |
||||
|
</script> |
||||
|
<style scoped lang="less"> |
||||
|
.loading-overlay { |
||||
|
position: fixed; |
||||
|
top: 0; |
||||
|
left: 0; |
||||
|
width: 100vw; |
||||
|
height: 100vh; |
||||
|
background: rgba(0, 0, 0, 0.7); |
||||
|
backdrop-filter: blur(4px); |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
z-index: 9998; |
||||
|
} |
||||
|
|
||||
|
.loading-content { |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
align-items: center; |
||||
|
gap: 20px; |
||||
|
} |
||||
|
|
||||
|
.loading-spinner { |
||||
|
width: 60px; |
||||
|
height: 60px; |
||||
|
border: 4px solid #f3f3f3; |
||||
|
border-top: 4px solid #4caf50; |
||||
|
border-radius: 50%; |
||||
|
animation: spin 1s linear infinite; |
||||
|
} |
||||
|
|
||||
|
.loading-text { |
||||
|
color: white; |
||||
|
font-size: 24px; |
||||
|
font-weight: 500; |
||||
|
} |
||||
|
|
||||
|
.loading-progress { |
||||
|
width: 300px; |
||||
|
height: 6px; |
||||
|
background: rgba(255, 255, 255, 0.2); |
||||
|
border-radius: 3px; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
|
||||
|
.main{ |
||||
|
height: 16rem; |
||||
|
width: 30rem; |
||||
|
background: white; |
||||
|
text-align: left; |
||||
|
font-size: 1rem; |
||||
|
font-weight: 800; |
||||
|
padding-left: 10px; |
||||
|
padding-top: 5px; |
||||
|
border-radius: 10px; |
||||
|
.title{ |
||||
|
text-align: left; |
||||
|
font-size: 2rem; |
||||
|
font-weight: 800; |
||||
|
} |
||||
|
.content{ |
||||
|
height: 8.75rem; |
||||
|
display: flex; |
||||
|
justify-content:center; |
||||
|
align-items: center; |
||||
|
font-size: 24px; |
||||
|
} |
||||
|
.OkBtn{ |
||||
|
background: #408cff; |
||||
|
color: white; |
||||
|
border-radius: 0.3125rem; |
||||
|
height: 3rem; |
||||
|
width: 6rem; |
||||
|
} |
||||
|
|
||||
|
.centerBtn{ |
||||
|
width: 6rem; |
||||
|
margin-left: 50%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
</style> |
@ -1,2 +1,3 @@ |
|||||
export { default as Keyboard } from './Keyboard.vue' |
export { default as Keyboard } from './Keyboard.vue' |
||||
export { default as SimpleKeyboard } from './SimpleKeyboard.vue' |
export { default as SimpleKeyboard } from './SimpleKeyboard.vue' |
||||
|
export { default as Confirm } from './Confirm.vue' |
Write
Preview
Loading…
Cancel
Save
Reference in new issue