yangyin
2024-10-15 20dd2dc0554748c4f8e507374be31e3b5ec7a270
src/views/project/ch/home/Home.vue
@@ -5,29 +5,19 @@
            <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 />
                        </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="customDrawerRef" @updateChatInput="updateChatInput" />
                     </div>
                  </div>
                  <!-- <p class="declare">
@@ -50,20 +40,19 @@
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 customDrawerRef = 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;
};
//关闭高级示例
const closeExampleClick = (status: boolean) => {
   state.isShowAdvanceExample = status;
   state.rightBoxWidth = status ? 354 : 0;
   state.rightBox = status ? 354 : 0;
   if (status) {
      customDrawerRef.value.getTableData();
   }
};
</script>
<style scoped lang="scss">
@@ -90,30 +79,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;