From b7143b51f3a50b6fac9c139d291c1fad017daee6 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期五, 08 十二月 2023 15:50:50 +0800 Subject: [PATCH] 使用tinymce富文本 --- src/views/homePage.vue | 44 ++++++++++++++++++++------------------------ 1 files changed, 20 insertions(+), 24 deletions(-) diff --git a/src/views/homePage.vue b/src/views/homePage.vue index 100a502..ae5bf05 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -34,15 +34,16 @@ </div> <div :class="state.activeMenu == 4?'active': ''" @click="changeTab(4)"> <List style="width: 1em; height: 1em; margin-right: 8px" /> - <div>信息公示</div> + <div>机构公示</div> </div> </div> </div> <div class="content"> - <Home v-if="state.activeMenu==1" ref="homeRef" @toMore="changeTab"/> - <Notice v-if="state.activeMenu==2" ref="noticeRef"/> - <Laws v-if="state.activeMenu==3" ref="lawsRef"/> - <Publish v-if="state.activeMenu==4" ref="publishRef"/> + <Home v-if="state.activeMenu==1" ref="homeRef" @toMore="changeTab" @openDetails="openDetails"/> + <Notice v-if="state.activeMenu==2" ref="noticeRef" @openDetails="openDetails"/> + <Laws v-if="state.activeMenu==3" ref="lawsRef" @openDetails="openDetails"/> + <Publish v-if="state.activeMenu==4" ref="publishRef" @openDetails="openDetails"/> + <Details v-if="state.activeMenu==0" ref="detailsRef" @backJump="changeTab"></Details> </div> </div> <!-- 底部 --> @@ -59,7 +60,8 @@ import Notice from './components/notice' import Laws from './components/laws' import Publish from './components/publish' - +import Details from './components/details.vue' +const { proxy } = getCurrentInstance() const route = useRoute() const router = useRouter() // 时间格式化 @@ -77,18 +79,18 @@ const noticeRef = ref(null) const lawsRef = ref(null) const publishRef = ref(null) - +const detailsRef = ref(null) const state = reactive({ activeMenu: 1, date: '', weekDay: '', - dayTime: '' + dayTime: '', + checkDetails: false }) // 当前时间 const getDateTime = () => { const curTime = new Date().toLocaleString('zh', timeForm).replace(/\//g, '-'); - console.log(curTime,'time') state.date = curTime.slice(0, 10); let week = ['日', '一', '二', '三', '四', '五', '六']; let day = new Date().getDay(); @@ -128,21 +130,15 @@ const changeTab=(num)=>{ state.activeMenu = num - console.log(state.activeMenu) - // if(num == 1){ - // homeRef.value.getNoticeList() - // homeRef.value.getLawsList() - // homeRef.value.getPubList() - // } - // if(num == 2){ - // noticeRef.value.getData() - // } - // if(num == 3){ - // lawsRef.value.getData() - // } - // if(num == 4){ - // publishRef.value.getData() - // } +} + +const openDetails=(type,id)=>{ + state.activeMenu = 0 + nextTick(() => { + proxy.$refs.detailsRef.openDetail(type,id) + }) + // detailsRef.value.openDetail(type,id) + } </script> -- Gitblit v1.9.2