File tree Expand file tree Collapse file tree
frontend/packages/web/src
views/customer/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 329329 }
330330 }
331331
332- onBeforeMount (() => {
333- loadFollowList (true );
334- });
335-
336332 watch (
337333 () => props .refreshKey ,
338334 (val ) => {
341337 }
342338 }
343339 );
340+
341+ watch (
342+ () => props .activeType ,
343+ () => {
344+ loadFollowList (true );
345+ },
346+ { immediate: true }
347+ );
344348 </script >
345349
346350<style lang="less" scoped>
Original file line number Diff line number Diff line change @@ -270,15 +270,6 @@ export default function useFollowApi(followProps: {
270270 }
271271 }
272272
273- watch (
274- ( ) => type . value ,
275- ( val ) => {
276- if ( [ 'followPlan' , 'followRecord' ] . includes ( val ) ) {
277- loadFollowList ( true ) ;
278- }
279- }
280- ) ;
281-
282273 return {
283274 data,
284275 loading,
Original file line number Diff line number Diff line change 219219 }
220220 );
221221
222+ watch (
223+ () => showDrawer .value ,
224+ (val ) => {
225+ if (! val ) {
226+ activeTab .value = cachedList .value [0 ]?.name as string ;
227+ }
228+ }
229+ );
230+
222231 defineExpose ({
223232 layout ,
224233 });
Original file line number Diff line number Diff line change 4545 :form-key =" FormDesignKeyEnum.CUSTOMER_CONTACT"
4646 />
4747 <FollowDetail
48- v-else-if =" ['followRecord', 'followPlan'].includes(activeTab)"
48+ v-else-if =" ['followRecord', 'followPlan'].includes(activeTab) && show "
4949 :active-type =" (activeTab as 'followRecord'| 'followPlan')"
5050 wrapper-class =" h-[calc(100vh-162px)]"
5151 virtual-scroll-height =" calc(100vh - 254px)"
109109
110110 import CrmCard from ' @/components/pure/crm-card/index.vue' ;
111111 import type { ActionsItem } from ' @/components/pure/crm-more-action/type' ;
112- import FollowDetail from ' @/components/business/crm-follow-detail/index.vue' ;
113112 import ContactTable from ' @/components/business/crm-form-create-table/contactTable.vue' ;
114113 import CrmFormDescription from ' @/components/business/crm-form-description/index.vue' ;
115114 import CrmHeaderTable from ' @/components/business/crm-header-table/index.vue' ;
125124 import useModal from ' @/hooks/useModal' ;
126125 import { hasAnyPermission } from ' @/utils/permission' ;
127126
127+ const FollowDetail = defineAsyncComponent (() => import (' @/components/business/crm-follow-detail/index.vue' ));
128+
128129 const props = defineProps <{
129130 sourceId: string ;
130131 readonly? : boolean ;
You can’t perform that action at this time.
0 commit comments