当前位置:网站首页>拿出接口数组对象中的所有name值,取出同一个值
拿出接口数组对象中的所有name值,取出同一个值
2022-08-05 05:14:00 【xx820702】
data() {
return {
chartInstance:null,
allData:null//服务器返回的数据
}
},
mounted() {
this.initCharet()
this.getData()
},
methods: {
// 初始化echartInstance对象
initCharet(){
this.chartInstance= this.$echarts.init(this.$refs.seller_ref)
},
// 获取服务器的数据
async getData(){
const {data:ret} = await this.$http.get('seller')
console.log(ret);
this.allData =ret
this.updateChart()
},
// 更新图表
updateChart(){
const sellerNames =this.allData.map((item)=>{
return item.name//拿出接口的name值
})
}
边栏推荐
- [Go through 3] Convolution & Image Noise & Edge & Texture
- 【解码工具】Bitcoin的一些在线工具
- What are the characteristics of the interface of the physical layer?What does each contain?
- 1.3 mysql batch insert data
- [Go through 7] Notes from the first section of the fully connected neural network video
- jvm three heap and stack
- Geek卸载工具
- server disk array
- Lecture 3 Gradient Tutorial Gradient Descent and Stochastic Gradient Descent
- Pandas(五)—— 分类数据、读取数据库
猜你喜欢
随机推荐
Convert the paper official seal in the form of a photo into an electronic official seal (no need to download ps)
Difference between for..in and for..of
【过一下4】09-10_经典网络解析
flink实例开发-batch批处理实例
Detailed Explanation of Redis Sentinel Mode Configuration File
1.3 mysql批量插入数据
【Untitled】
序列基础练习题
Using pip to install third-party libraries in Pycharm fails to install: "Non-zero exit code (2)" solution
Matplotlib(二)—— 子图
Structured Light 3D Reconstruction (2) Line Structured Light 3D Reconstruction
LeetCode: 1403. Minimum subsequence in non-increasing order [greedy]
机器学习(二) —— 机器学习基础
学习总结week2_1
OFDM Lecture 16 5 -Discrete Convolution, ISI and ICI on DMT/OFDM Systems
The mall background management system based on Web design and implementation
jvm three heap and stack
物理层的接口有哪几个方面的特性?各包含些什么内容?
第三讲 Gradient Tutorial梯度下降与随机梯度下降
学习总结week2_4