From adeb8b768926ed50a3fb0857f366d6a0308d2cc0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 29 八月 2025 17:45:57 +0800
Subject: [PATCH] 修改组件

---
 src/components/FooterButtons.vue |  108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 108 insertions(+), 0 deletions(-)

diff --git a/src/components/FooterButtons.vue b/src/components/FooterButtons.vue
new file mode 100644
index 0000000..b57fbb3
--- /dev/null
+++ b/src/components/FooterButtons.vue
@@ -0,0 +1,108 @@
+<template>
+  <view class="footer-btns" v-if="show">
+    <u-button 
+      class="cancel-btn" 
+      @click="handleCancel"
+      :disabled="cancelDisabled"
+    >
+      {{ cancelText }}
+    </u-button>
+    <u-button 
+      class="save-btn" 
+      type="primary" 
+      @click="handleConfirm"
+      :disabled="confirmDisabled"
+      :loading="loading"
+    >
+      {{ confirmText }}
+    </u-button>
+  </view>
+</template>
+
+<script setup>
+import { defineProps, defineEmits } from 'vue'
+
+// 瀹氫箟 props
+const props = defineProps({
+  // 鏄惁鏄剧ず鎸夐挳缁�
+  show: {
+    type: Boolean,
+    default: true
+  },
+  // 鍙栨秷鎸夐挳鏂囨湰
+  cancelText: {
+    type: String,
+    default: '鍙栨秷'
+  },
+  // 纭鎸夐挳鏂囨湰
+  confirmText: {
+    type: String,
+    default: '淇濆瓨'
+  },
+  // 鍙栨秷鎸夐挳鏄惁绂佺敤
+  cancelDisabled: {
+    type: Boolean,
+    default: false
+  },
+  // 纭鎸夐挳鏄惁绂佺敤
+  confirmDisabled: {
+    type: Boolean,
+    default: false
+  },
+  // 纭鎸夐挳鏄惁鏄剧ず鍔犺浇鐘舵��
+  loading: {
+    type: Boolean,
+    default: false
+  }
+})
+
+// 瀹氫箟浜嬩欢
+const emit = defineEmits(['cancel', 'confirm'])
+
+// 澶勭悊鍙栨秷浜嬩欢
+const handleCancel = () => {
+  emit('cancel')
+}
+
+// 澶勭悊纭浜嬩欢
+const handleConfirm = () => {
+  emit('confirm')
+}
+</script>
+
+<style scoped lang="scss">
+/* 搴曢儴鎸夐挳鏍峰紡 */
+.footer-btns {
+  position: fixed;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: #fff;
+  display: flex;
+  justify-content: space-around;
+  align-items: center;
+  padding: 0.75rem 0;
+  box-shadow: 0 -0.125rem 0.5rem rgba(0,0,0,0.05);
+  z-index: 1000;
+}
+
+.cancel-btn {
+  font-weight: 400;
+  font-size: 1rem;
+  color: #FFFFFF;
+  width: 6.375rem;
+  background: #C7C9CC;
+  box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2);
+  border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+}
+
+.save-btn {
+  font-weight: 400;
+  font-size: 1rem;
+  color: #FFFFFF;
+  width: 14rem;
+  background: linear-gradient(140deg, #00BAFF 0%, #006CFB 100%);
+  box-shadow: 0 0.25rem 0.625rem 0 rgba(3,88,185,0.2);
+  border-radius: 2.5rem 2.5rem 2.5rem 2.5rem;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3