|
|
@@ -1,111 +1,108 @@
|
|
|
<!-- index.vue -->
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
- <!-- 列表区域 -->
|
|
|
- <view class="list-item" @click="showModal">
|
|
|
- <view>
|
|
|
- <uni-icons type="locked" size="20"></uni-icons>
|
|
|
- <text>修改密码</text>
|
|
|
+ <view class="container">
|
|
|
+ <!-- 列表区域 -->
|
|
|
+ <view class="list-item" @click="">
|
|
|
+ <view>
|
|
|
+ <uni-icons type="locked" size="20"></uni-icons>
|
|
|
+ <text>修改密码</text>
|
|
|
+ </view>
|
|
|
+ <text>></text>
|
|
|
</view>
|
|
|
- <text>></text>
|
|
|
- </view>
|
|
|
- <view class="list-item" @click="showModal">
|
|
|
- <view>
|
|
|
- <uni-icons type="refreshempty" size="20"></uni-icons>
|
|
|
- <text>检查更新</text>
|
|
|
+ <view class="list-item" @click="">
|
|
|
+ <view>
|
|
|
+ <uni-icons type="refreshempty" size="20"></uni-icons>
|
|
|
+ <text>检查更新</text>
|
|
|
+ </view>
|
|
|
+ <text>></text>
|
|
|
</view>
|
|
|
- <text>></text>
|
|
|
- </view>
|
|
|
- <view class="list-item" @click="showModal">
|
|
|
- <view>
|
|
|
- <uni-icons type="trash" size="20"></uni-icons>
|
|
|
- <text>清理缓存</text>
|
|
|
+ <view class="list-item" @click="">
|
|
|
+ <view>
|
|
|
+ <uni-icons type="trash" size="20"></uni-icons>
|
|
|
+ <text>清理缓存</text>
|
|
|
+ </view>
|
|
|
+ <text>></text>
|
|
|
</view>
|
|
|
- <text>></text>
|
|
|
- </view>
|
|
|
|
|
|
- <!-- 弹出框 -->
|
|
|
- <uni-popup ref="popup" type="center">
|
|
|
- <view class="modal-content">
|
|
|
- <text class="modal-title">系统提示</text>
|
|
|
- <text class="modal-text">确定注销并退出系统吗?</text>
|
|
|
- <view class="modal-buttons">
|
|
|
- <button class="modal-button-cancel" @click="hideModal">取消</button>
|
|
|
- <button class="modal-button-confirm" @click="confirmLogout">确定</button>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </uni-popup>
|
|
|
- </view>
|
|
|
+ <!-- 弹出框 -->
|
|
|
+ <uni-popup ref="popup" type="center">
|
|
|
+ <view class="modal-content">
|
|
|
+ <text class="modal-title">系统提示</text>
|
|
|
+ <text class="modal-text">确定注销并退出系统吗?</text>
|
|
|
+ <view class="modal-buttons">
|
|
|
+ <button class="modal-button-cancel" @click="hideModal">取消</button>
|
|
|
+ <button class="modal-button-confirm" @click="confirmLogout">确定</button>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
-export default {
|
|
|
- methods: {
|
|
|
- showModal() {
|
|
|
- this.$refs.popup.open();
|
|
|
- },
|
|
|
- hideModal() {
|
|
|
- this.$refs.popup.close();
|
|
|
- },
|
|
|
- confirmLogout() {
|
|
|
- // 这里处理确认注销的逻辑
|
|
|
- console.log('User confirmed logout');
|
|
|
- this.hideModal();
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+<script setup>
|
|
|
+ function showModal() {
|
|
|
+ this.$refs.popup.open();
|
|
|
+ };
|
|
|
+
|
|
|
+ function hideModal() {
|
|
|
+ this.$refs.popup.close();
|
|
|
+ };
|
|
|
+
|
|
|
+ function confirmLogout() {
|
|
|
+ // 这里处理确认注销的逻辑
|
|
|
+ console.log('User confirmed logout');
|
|
|
+ this.hideModal();
|
|
|
+ };
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
-/* 添加必要的样式 */
|
|
|
-.container {
|
|
|
- padding: 20px;
|
|
|
-}
|
|
|
-
|
|
|
-.list-item {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- height: 50px;
|
|
|
- border-bottom: 1px solid #eee;
|
|
|
- font-size: 16px;
|
|
|
-}
|
|
|
+ /* 添加必要的样式 */
|
|
|
+ .container {
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
|
|
|
-.arrow-icon {
|
|
|
- width: 24px;
|
|
|
- height: 24px;
|
|
|
-}
|
|
|
+ .list-item {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ height: 50px;
|
|
|
+ border-bottom: 1px solid #eee;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
|
|
|
-.modal-content {
|
|
|
- background-color: white;
|
|
|
- padding: 30px;
|
|
|
- border-radius: 8px;
|
|
|
-}
|
|
|
+ .arrow-icon {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
|
|
|
-.modal-title {
|
|
|
- text-align: center;
|
|
|
- margin-bottom: 15px;
|
|
|
- font-weight: bold;
|
|
|
-}
|
|
|
+ .modal-content {
|
|
|
+ background-color: white;
|
|
|
+ padding: 30px;
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
|
|
|
-.modal-text {
|
|
|
- text-align: center;
|
|
|
- margin-bottom: 25px;
|
|
|
-}
|
|
|
+ .modal-title {
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
|
|
|
-.modal-buttons {
|
|
|
- display: flex;
|
|
|
- justify-content: space-around;
|
|
|
-}
|
|
|
+ .modal-text {
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 25px;
|
|
|
+ }
|
|
|
|
|
|
-.modal-button-cancel,
|
|
|
-.modal-button-confirm {
|
|
|
- flex: 1;
|
|
|
- margin-left: 10px;
|
|
|
-}
|
|
|
+ .modal-buttons {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ }
|
|
|
|
|
|
-.modal-button-confirm {
|
|
|
- color: blue;
|
|
|
-}
|
|
|
-</style>
|
|
|
+ .modal-button-cancel,
|
|
|
+ .modal-button-confirm {
|
|
|
+ flex: 1;
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
|
|
|
+ .modal-button-confirm {
|
|
|
+ color: blue;
|
|
|
+ }
|
|
|
+</style>
|