From 7043590a8a1d24a4c86472051c103a8e4dc2ddb4 Mon Sep 17 00:00:00 2001
From: PC-20250623MANY\Administrator <344137771@qq.com>
Date: Sat, 09 Aug 2025 17:34:01 +0800
Subject: [PATCH] 1
---
src/components/Dialog/index.vue | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/src/components/Dialog/index.vue b/src/components/Dialog/index.vue
index ef6d8a5..54e0bb8 100644
--- a/src/components/Dialog/index.vue
+++ b/src/components/Dialog/index.vue
@@ -11,10 +11,10 @@
<div class="footer">
<div class="cancel-dialog" @click="show = false" v-if="showCancelButton">
- {{ cancelButtonText }}
+ {{ $t(cancelButtonText) }}
</div>
- <div class="confirm-dialog" v-if="showConfirmButton">
- {{ confirmButtonText }}
+ <div class="confirm-dialog" v-if="showConfirmButton" @click="confirm">
+ {{ $t(confirmButtonText) }}
</div>
</div>
</van-dialog>
@@ -26,38 +26,42 @@
props: {
title: {
type: String,
- default: "标题",
+ default: "标题"
},
"confirm-button-text": {
type: String,
- default: "确定",
+ default: "hj161"
},
"cancel-button-text": {
type: String,
- default: "取消",
+ default: "qx"
},
"show-cancel-button": {
type: Boolean,
- default: true,
+ default: true
},
"show-confirm-button": {
type: Boolean,
- default: true,
+ default: true
},
+ confirm: {
+ type: Function,
+ default: () => {}
+ }
},
components: {
- [Dialog.Component.name]: Dialog.Component,
+ [Dialog.Component.name]: Dialog.Component
},
data() {
return {
- show: false,
+ show: false
};
},
- closeAll() {},
+ methods: {}
};
</script>
-<style scoped lang="less">
+<style scoped lang="less">
.zyd-dialog {
padding: 24px;
font-family: "PingFang SC";
@@ -73,7 +77,7 @@
display: flex;
justify-content: center;
text-align: center;
- line-height: 65px;
+ line-height: 55px;
margin-top: 40px;
.cancel-dialog {
flex: 1;
@@ -87,11 +91,11 @@
flex: 1;
height: 100%;
padding: 0 15px;
- background-color: #1989fa;
- border: 1px solid #1989fa;
+ background-color: #c4d600;
+ border: 1px solid #c4d600;
color: #fff;
margin-left: 20px;
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3