| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 | import {  Cell,  CellGroup,  Skeleton,  SkeletonImage,  SkeletonParagraph} from 'vant';import { defineComponent, onMounted, reactive, watch } from 'vue';import styles from './component.module.less';export default defineComponent({  name: 'skeleton-modal',  props: {    show: {      type: Boolean,      default: false    },    showCount: {      type: Array,      default: () => [1, 2, 3, 4, 5]    }  },  setup(props, { slots }) {    const forms = reactive({      loading: false    });    onMounted(() => {      forms.loading = props.show;    });    watch(      () => props.show,      () => {        forms.loading = props.show;      }    );    return () => (      <Skeleton loading={forms.loading} style="flex-wrap: wrap">        {{          template: () => (            <div              style={{                height: `calc(100vh - var(--header-height))`,                overflow: 'hidden',                width: '100%'              }}>              {props.showCount.map(() => (                <Cell center>                  {{                    icon: () => (                      <div class={styles.iconGroup}>                        <SkeletonImage class={styles.iconStudent} />                      </div>                    ),                    title: () => (                      <div class={styles.userInfo}>                        <SkeletonParagraph                          class={styles.name}                          rowWidth={'60%'}                        />                        <SkeletonParagraph rowWidth={'40%'} />                      </div>                    ),                    value: () => (                      <div class={styles.after} style={{ width: '80px' }}>                        <SkeletonParagraph rowWidth={'100%'} />                      </div>                    )                  }}                </Cell>              ))}            </div>          ),          default: () => slots.default && slots.default()        }}      </Skeleton>    );  }});
 |