素材网站建设需要多少费用,谷歌浏览器网页版在线,品牌网站建设基本流程,建立新网站要多少钱进入页面#xff0c;调接口#xff0c;后端返回数据#xff0c;indexType为0或者1#xff0c;要用这个数据显示字典的内容
用插槽拿到数据
写一个函数#xff0c;在模板中使用
const { proxy } getCurrentInstance();
// 字典-指标类型
const { index_type } proxy.u…进入页面调接口后端返回数据indexType为0或者1要用这个数据显示字典的内容
用插槽拿到数据
写一个函数在模板中使用
const { proxy } getCurrentInstance();
// 字典-指标类型
const { index_type } proxy.useDict(index_type);
// 写方法处理指标类型的显示-注意如果这个函数最后返回的是undefined,undefined在模板上是不显示的
const handleIndexType (data) {return index_type.value.find((item) {return item.value data;})?.label;
};