gerson
2024-08-25 9a8a56f6d2cfe0ab9ec9368d58d03d1cf10ade28
src/views/project/ch/home/Home.vue
@@ -5,29 +5,23 @@
            <div class="w100 h100 overflow-hidden">
               <div class="pc-chatRoom w100 h100">
                  <div class="homeBox w100 h-full">
                     <div class="flex items-center h-full relative overflow-hidden">
                        <div class="flex items-center flex-column">
                           <waterTop />
                     <div class="flex items-center h-full ">
                        <div class="flex items-center flex-column" style="overflow: unset !important;">
                           <waterTop ref="topRef" />
                           <waterCenter
                              @advanceExampleClick="advanceExampleClick"
                              :isShowAdvanceExample="state.isShowAdvanceExample"
                              ref="waterCenterRef"
                              @updateChatInput="updateChatInput"
                           />
                           <waterBottom />
                           <waterBottom  />
                        </div>
                        <div
                           class="retract_icon"
                           :style="`right: ${state.rightBox}px;`"
                           @click="advanceExampleClick(!state.isShowAdvanceExample)"
                        >
                           <i
                              class="text-[#fff] transition-all"
                              :class="state.isShowAdvanceExample ? 'ywicon icon-zuoyoujiantou1' : 'ywicon icon-zuoyoujiantou'"
                           ></i>
                        </div>
                        <div class="h100" :style="`width: ${state.rightBoxWidth}px;transition:width 0.8s;`">
                           <CustomDrawer :isShowAdvanceExample="state.isShowAdvanceExample" @closeExampleClick="closeExampleClick" />
                        </div>
                        <CustomDrawer
                           v-model:isShow="state.isShowAdvanceExample"
                           ref="customDrawerrRef"
                           @updateChatInput="updateChatInput"
                        />
                     </div>
                  </div>
                  <!-- <p class="declare">
@@ -50,21 +44,22 @@
import CustomDrawer from '/@/components/drawer/CustomDrawer.vue';
let state = reactive({
   isShowAdvanceExample: false,
   rightBoxWidth: 0,
   rightBox: 0,
});
const topRef = ref(null);
const waterCenterRef = ref(null);
const customDrawerrRef = ref(null);
const updateChatInput = (val) => {
   topRef.value.updateChatInput(val);
};
const advanceExampleClick = (status: boolean) => {
   state.isShowAdvanceExample = status;
   state.rightBoxWidth = status ? 354 : 0;
   state.rightBox = status ? 354 : 0;
   if (status) {
      customDrawerrRef.value.getTableData();
   }
};
//关闭高级示例
const closeExampleClick = (status: boolean) => {
   state.isShowAdvanceExample = status;
   state.rightBoxWidth = status ? 354 : 0;
   state.rightBox = status ? 354 : 0;
};
</script>
<style scoped lang="scss">
.pc-chat_room {
@@ -90,30 +85,7 @@
   width: 100%;
   padding: 18px;
}
.retract_icon {
   width: 20px;
   height: 48px;
   background: rgba(0, 0, 0, 0.2);
   position: absolute;
   top: 50%;
   right: 0;
   // -webkit-transform: translate(100%, -50%);
   // -ms-transform: translate(100%, -50%);
   // transform: translate(100%, -50%);
   z-index: 9;
   cursor: pointer;
   display: -webkit-box;
   display: -ms-flexbox;
   display: flex;
   -webkit-box-align: center;
   -ms-flex-align: center;
   align-items: center;
   -webkit-box-pack: center;
   -ms-flex-pack: center;
   justify-content: center;
   padding: 0 3px;
   border-radius: 5px 5px 0px;
}
.layout-logo-medium-img {
   width: 28px;
   margin-right: 7px;