解决方法:使用toRefs结构,使其具有响应式,再使用!
import { reactive, defineProps, toRefs } from 'vue';
const props = defineProps({
xAxisData: {
type: Array,
default: []
},
seriesDataEveryDay: {
type: Array,
default: []
},
seriesDataGu: {
type: Array,
default: []
},
seriesDataPing: {
type: Array,
default: []
},
seriesDataFeng: {
type: Array,
default: []
},
seriesDataHuan: {
type: Array,
default: []
},
graphicText: {
type: String,
default: ''
}
});
// 使用toRefs结构,使其具有响应式
const { xAxisData, seriesDataEveryDay, seriesDataGu, seriesDataPing, seriesDataFeng, seriesDataHuan, graphicText } = toRefs(props);
标签:Vue3,default,xAxisData,动态变化,toRefs,props,Array,type From: https://www.cnblogs.com/suihung/p/17004855.html