yangyin
2024-11-25 016bcbc267215c77bbc4480e7cead625159b0e70
src/layout/component/sidebar/SidebarOther.vue
@@ -32,6 +32,7 @@
                  <span class="use_name">{{ firstUserCharacter }}</span>
               </div>
               <div class="isShow_Profile" v-show="isShowExitLogin">
                  <div class="exit" @click="feedbackClick"><i class="ywifont ywicon-youxiang"></i> 用户反馈</div>
                  <div class="exit" @click="logoutClick"><i class="ywifont ywicon-tuichu"></i> 退出登录</div>
               </div>
            </div>
@@ -91,8 +92,17 @@
         </div>
      </div>
      <div class="expand-sidebar" @click="toggleSidebar" v-if="!isSharePage">
         <i class="text-[#fff] transition-all ywifont ywicon-zuoyoujiantou1" ></i>
         <i class="text-[#fff] transition-all ywifont ywicon-zuoyoujiantou1"></i>
      </div>
      <el-dialog v-model="userFeedbackVisible" title="用户反馈" width="500" :before-close="handleCloseFeedback">
         <el-input v-model="userFeedbackText" :rows="8" type="textarea" placeholder="欢迎说说你的想法" />
         <template #footer>
            <div class="dialog-footer">
               <el-button @click="handleCloseFeedback">取消</el-button>
               <el-button type="primary" @click="confirmFeedback" :disabled="is_input_title"> 确 定 </el-button>
            </div>
         </template>
      </el-dialog>
   </div>
</template>
@@ -165,6 +175,27 @@
   gotoRoute({ name: 'AboutUs' });
};
//#endregion
//#region ====================== 用户反馈 ======================
const userFeedbackVisible = ref(false);
const userFeedbackText = ref('');
const is_input_title = computed(() => {
   return userFeedbackText.value == '' ? true : false;
});
const feedbackClick = () => {
   userFeedbackVisible.value = true;
};
const handleCloseFeedback = () => {
   userFeedbackVisible.value = false;
};
const confirmFeedback = () => {
   const data = {
      content: userFeedbackText.value,
      contact: '用户反馈',
   }; //TODO 发送用户反馈
   handleCloseFeedback();
};
//#endregion
//#region ====================== 显示/退出登录 ======================
//登录
const openLoginDlg = async () => {
@@ -182,6 +213,7 @@
   isLoginStatus.value = false;
   LoginInfo.remove();
};
const toggleExitLoginBtnRef = ref<HTMLDivElement>(null);
onClickOutside(toggleExitLoginBtnRef, () => {
@@ -358,6 +390,9 @@
         padding: 16px 12px;
         gap: 8px;
         cursor: pointer;
         &:hover {
            background-color: rgba(0, 0, 0, 0.04);
         }
      }
   }
}