在本地跑是完全没问题,也不报错,但是打包发布到线上就报了这个错就是用到了一个选择城市的组件,自己稍微封装了一下。map.js
只是静态的全国城市列表而已,巨佬们看看到底啥问题
// 组件所有代码
<template>
<el-cascader
v-model="modelValue"
:options="options"
clearable
separator="/"
:teleported="false"
style="width: 100%"
@change="handleChange"
/>
</template>
<script setup>
import options from "./map.js"
const cascaderProps = {
expandTrigger: 'hover',
}
const val = ref()
const emit = defineEmits(['update:toValue'])
const props = defineProps({
modelValue: [String, Number,Array,Object]
})
const value = computed(() => {
return peops.modelValue.split(",")
})
const handleChange = () => {
const value = props.modelValue
emit('update:toValue',value)
}
</script>
变量写错了, 是
props
不是peops