老师 忽略上个问题,看这个 是为啥,这个警告怎么清除

来源:7-1 业务组件-ShopView 商家详情页

unbreakable_全栈

2023-03-17

<template>
  <div class="shop-page">
    <VanNavBar left-text="返回" left-arrow @click-left="onClickLeft"></VanNavBar>
    <OpLoadingView :loading="pending" type="skeleton">
      {{ data.shopName }}
    </OpLoadingView>
  </div>
</template>
<!-- 商家详情页面 -->
<script lang="ts">
import OpLoadingView from '@/components/OpLoadingView.vue'
import { reactive, toRefs } from 'vue'
import { useRoute } from 'vue-router'
import { useAsync } from '@/use/useAsync'
import { fetchShopPageData } from '@/api/shop'
export default {
  setup() {
    const state = reactive({
      count: 0,
    })

    const route = useRoute()
    const { id } = route.params
    const { data, pending } = useAsync(() => fetchShopPageData(id as string), {
      announcement: '',
      discounts: [],
      redbags: [],
      activitys: [],
      branch: '',
      comments: [],
      deliveryDistance: '',
      deliveryStrategy: '',
      deliveryStratingPrice: '',
      deliveryTags: [],
      deliveryTime: '',
      id: '',
      monthlyCount: 0,
      postUrl: '',
      bgUrl: '',
      score: 0,
      services: [],
      shopName: '',
      tops: [],
    })

    const methods = {
      onClickLeft() {
        history.back()
      },
    }

    return {
      ...toRefs(state),
      ...methods,
      pending,
      data,
    }
  },
}
</script>

<style lang="scss" scoped></style>

Failed to resolve component: OpLoadingView
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.
at <ShopView onVnodeUnmounted=fn ref=Ref< undefined > >
at
at

写回答

1回答

one_pieces

2023-03-17

同学你好,应该是你没 import 这个组件

0
2
one_pieces
回复
unbreakable_全栈
同学先看清楚错误是什么哈,这里是说 OpLoadingView
2023-03-17
共2条回复

Vue3+Pinia+Vite+TS 还原高性能外卖APP项目

Vue3+Pinia+Vite+TS 还原高性能外卖APP项目

392 学习 · 251 问题

查看课程