update:新增ota
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script setup>
|
||||
import IconButton from "./IconButton.vue";
|
||||
|
||||
const props = defineProps({
|
||||
show: {
|
||||
type: Boolean,
|
||||
@@ -28,6 +30,14 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
confirmDisabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
showClose: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
onCancel: {
|
||||
type: Function,
|
||||
default: null,
|
||||
@@ -36,6 +46,10 @@ const props = defineProps({
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
onClose: {
|
||||
type: Function,
|
||||
default: null,
|
||||
},
|
||||
});
|
||||
|
||||
const handleCancel = () => {
|
||||
@@ -43,8 +57,13 @@ const handleCancel = () => {
|
||||
};
|
||||
|
||||
const handleConfirm = () => {
|
||||
if (props.confirmDisabled) return;
|
||||
props.onConfirm?.();
|
||||
};
|
||||
|
||||
const handleClose = () => {
|
||||
props.onClose?.();
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -89,6 +108,7 @@ const handleConfirm = () => {
|
||||
<view
|
||||
v-if="showConfirm"
|
||||
class="dialog-button confirm"
|
||||
:class="{ disabled: confirmDisabled }"
|
||||
@click="handleConfirm"
|
||||
>
|
||||
<text>{{ confirmText }}</text>
|
||||
@@ -96,6 +116,13 @@ const handleConfirm = () => {
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="showClose" class="dialog-close">
|
||||
<IconButton
|
||||
src="../static/close-gold-outline.png"
|
||||
:width="30"
|
||||
:onClick="handleClose"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -108,6 +135,7 @@ const handleConfirm = () => {
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0, 0, 0, 0.62);
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 999;
|
||||
@@ -116,6 +144,7 @@ const handleConfirm = () => {
|
||||
.modal-wrap {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 549rpx;
|
||||
min-height: 318rpx;;
|
||||
padding-top: 168rpx;
|
||||
@@ -222,6 +251,14 @@ const handleConfirm = () => {
|
||||
background-color: #ffda3f;
|
||||
}
|
||||
|
||||
.dialog-button.confirm.disabled {
|
||||
opacity: 0.62;
|
||||
}
|
||||
|
||||
.dialog-close {
|
||||
margin-top: 28rpx;
|
||||
}
|
||||
|
||||
@keyframes rotateLight {
|
||||
from {
|
||||
transform: translateX(-50%) rotate(0deg);
|
||||
|
||||
Reference in New Issue
Block a user