941477276 / vue3-country-intl

基于vue3的国际化的国籍/手机区号组件!
30 stars 3 forks source link

项目报错 #2

Closed chenxin9482 closed 2 years ago

chenxin9482 commented 2 years ago

image

"vite": "^2.4.4",
"vue": "^3.1.5",
"vue3-country-intl": "^1.0.4",
chenxin9482 commented 2 years ago

这是我的调用方式

<template>
  <Vue3CountryIntl v-model="state.userInfo.phoneCode" />
</template>
<script>
import Vue3CountryIntl from 'vue3-country-intl'
import 'vue3-country-intl/lib/vue3-country-intl.css'
export default {
  components: {  Vue3CountryIntl },
}
</script>
941477276 commented 2 years ago

将vue3升级到最新版本试下,3.2.30

chenxin9482 commented 2 years ago

还是报错

941477276 commented 2 years ago

node_modules删掉再重装试下,出现这个问题的就是引入了多次vue,我之前也遇到过,我打包后的代码并不包含vue本身

chenxin9482 commented 2 years ago

还是这样 12个报错 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isCE')

chenxin9482 commented 2 years ago

怎么处理可以不包含vue?

941477276 commented 2 years ago

你是打包还是本地调试?

chenxin9482 commented 2 years ago

本地

941477276 commented 2 years ago

那不应该呀,你建个新项目试下,只引入我的这个插件

chenxin9482 commented 2 years ago

还真没报错,可是这样我怎么排查呢?还请大佬教教

941477276 commented 2 years ago

你看下你有没有引入其他的组件,查查其他组件中是否将vue本身打包进去了,或者看下你自己的代码是否即有使用import形式导入vue,然后还有<script>标签形式引入vue

chenxin9482 commented 2 years ago

呃 不知道怎么看其他组件中是否将vue本身打包进去了 第二种情况是没有的

941477276 commented 2 years ago

查找Vue关键字,看有没有定义Vue的地方

chenxin9482 commented 2 years ago

没找到 可以加你微信帮我排查下么 会给你报酬的

941477276 commented 2 years ago

地址栏上有我QQ

chenxin9482 commented 2 years ago

添加了

magina000 commented 2 years ago

地址栏上有我QQ

现在有解决吗,我也出现一样的问题

941477276 commented 2 years ago

还没有,不知道为什么在你们一用就 会出现这个问题,我本地引用打包后的代码都不会出现这个问题,方便的话加QQ详聊下

941477276 commented 2 years ago

问题已解决,更新至1.0.8版本即可 @magina000 @chenxin9482