element-plus / element-plus-icons

Main package for storing Element Plus icon resources.
MIT License
138 stars 100 forks source link

[error] Uncaught (in promise) TypeError: (0 , _vue_reactivity__WEBPACK_IMPORTED_MODULE_1__.track)(...) is not a function #60

Closed jarryxy closed 9 months ago

jarryxy commented 1 year ago

Uncaught (in promise) TypeError: (0 , _vue_reactivity__WEBPACK_IMPORTED_MODULE_1__.track)(...) is not a function

安装引入都没有问题,在尝试在页面使用时,会出现此错误,未引用不会出现错误。 版本:"@element-plus/icons-vue": "^2.1.0",

<template>
<div>
  <el-row :gutter="20">
    <el-col :span="8">
      <el-button type="primary">
        <el-icon><Plus /></el-icon>
        添加组
      </el-button>

    </el-col>
    <el-col :span="16"><div class="grid-content ep-bg-purple" /></el-col>
  </el-row>
</div>
</template>
<script setup>
import { Plus } from '@element-plus/icons-vue'

</script>

image

main.js

import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import App from './App.vue'
import router from './router'
import store from './store'

const app = createApp(App)
app.use(store).use(router).use(ElementPlus)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')
tt0411 commented 1 year ago

+1

sxzz commented 1 year ago

Please provide a minimal reproduction. Thanks.

https://antfu.me/posts/why-reproductions-are-required