|  | @@ -14,7 +14,7 @@ import { materialQueryPage } from '/src/views/natural-resources/api';
 | 
	
		
			
				|  |  |  import TheEmpty from '/src/components/TheEmpty';
 | 
	
		
			
				|  |  |  import { usePrepareStore } from '/src/store/modules/prepareLessons';
 | 
	
		
			
				|  |  |  import { saveCourseware } from '../../../api';
 | 
	
		
			
				|  |  | -import { useDebounceFn } from '@vueuse/core';
 | 
	
		
			
				|  |  | +import { useDebounceFn, useResizeObserver } from '@vueuse/core';
 | 
	
		
			
				|  |  |  import CardPreview from '/src/components/card-preview';
 | 
	
		
			
				|  |  |  import { eventGlobal } from '/src/utils';
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -40,7 +40,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |      const prepareStore = usePrepareStore();
 | 
	
		
			
				|  |  |      const message = useMessage();
 | 
	
		
			
				|  |  |      const { type } = toRefs(props);
 | 
	
		
			
				|  |  | +    const className = 'resourceSearchGroup' + +new Date();
 | 
	
		
			
				|  |  |      const state = reactive({
 | 
	
		
			
				|  |  | +      searchHeight: '0px',
 | 
	
		
			
				|  |  |        loading: false,
 | 
	
		
			
				|  |  |        finshed: false, // 是否加载完
 | 
	
		
			
				|  |  |        pagination: {
 | 
	
	
		
			
				|  | @@ -48,7 +50,10 @@ export default defineComponent({
 | 
	
		
			
				|  |  |          rows: 20
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |        searchGroup: {
 | 
	
		
			
				|  |  | -        type: type.value === 'shareResources' ? 'MUSIC' : '', //
 | 
	
		
			
				|  |  | +        type:
 | 
	
		
			
				|  |  | +          type.value === 'shareResources' || type.value === 'myResources'
 | 
	
		
			
				|  |  | +            ? 'MUSIC'
 | 
	
		
			
				|  |  | +            : '', //
 | 
	
		
			
				|  |  |          name: '',
 | 
	
		
			
				|  |  |          bookVersionId: null,
 | 
	
		
			
				|  |  |          subjectId: prepareStore.getSubjectId,
 | 
	
	
		
			
				|  | @@ -182,16 +187,34 @@ export default defineComponent({
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      onMounted(() => {
 | 
	
		
			
				|  |  |        getList();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +      useResizeObserver(
 | 
	
		
			
				|  |  | +        document.querySelector('.' + className) as HTMLElement,
 | 
	
		
			
				|  |  | +        (entries: any) => {
 | 
	
		
			
				|  |  | +          const entry = entries[0];
 | 
	
		
			
				|  |  | +          const { height } = entry.contentRect;
 | 
	
		
			
				|  |  | +          // document.documentElement.style.setProperty(
 | 
	
		
			
				|  |  | +          //   '--modal-lesson-search-height',
 | 
	
		
			
				|  |  | +          //   height + 'px'
 | 
	
		
			
				|  |  | +          // );
 | 
	
		
			
				|  |  | +          state.searchHeight = height + 'px';
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      );
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      return () => (
 | 
	
		
			
				|  |  |        <div>
 | 
	
		
			
				|  |  | -        <ResourceSearchGroup
 | 
	
		
			
				|  |  | -          type={props.type}
 | 
	
		
			
				|  |  | -          subjectId={prepareStore.getSubjectId as any}
 | 
	
		
			
				|  |  | -          onSearch={(item: any) => throttledFnSearch(item)}
 | 
	
		
			
				|  |  | -        />
 | 
	
		
			
				|  |  | +        <div class={className}>
 | 
	
		
			
				|  |  | +          <ResourceSearchGroup
 | 
	
		
			
				|  |  | +            type={props.type}
 | 
	
		
			
				|  |  | +            subjectId={prepareStore.getSubjectId as any}
 | 
	
		
			
				|  |  | +            onSearch={(item: any) => throttledFnSearch(item)}
 | 
	
		
			
				|  |  | +          />
 | 
	
		
			
				|  |  | +        </div>
 | 
	
		
			
				|  |  |          <NScrollbar
 | 
	
		
			
				|  |  |            class={styles.listContainer}
 | 
	
		
			
				|  |  | +          style={{
 | 
	
		
			
				|  |  | +            'max-height': `calc(85vh - var(--modal-lesson-tab-height) - ${state.searchHeight} - 12px) `
 | 
	
		
			
				|  |  | +          }}
 | 
	
		
			
				|  |  |            onScroll={(e: any) => {
 | 
	
		
			
				|  |  |              const clientHeight = e.target?.clientHeight;
 | 
	
		
			
				|  |  |              const scrollTop = e.target?.scrollTop;
 | 
	
	
		
			
				|  | @@ -208,6 +231,9 @@ export default defineComponent({
 | 
	
		
			
				|  |  |            }}>
 | 
	
		
			
				|  |  |            <NSpin show={state.loading} size={'small'}>
 | 
	
		
			
				|  |  |              <div
 | 
	
		
			
				|  |  | +              style={{
 | 
	
		
			
				|  |  | +                'min-height': `calc(85vh - var(--modal-lesson-tab-height) - ${state.searchHeight} - 12px)`
 | 
	
		
			
				|  |  | +              }}
 | 
	
		
			
				|  |  |                class={[
 | 
	
		
			
				|  |  |                  styles.listSection,
 | 
	
		
			
				|  |  |                  !state.loading && state.tableList.length <= 0
 |