hui
10 months ago
11 changed files with 75 additions and 81 deletions
@ -1,27 +1,25 @@ |
|||
import Vue from "vue"; |
|||
import { getDicts } from "@/api/system/dict/data"; |
|||
export default function(){ |
|||
getDicts('iot_device_font_type').then(res => { |
|||
let dic = {}; |
|||
res.data.forEach(item=>{ |
|||
dic[item.dictValue] = item.cssClass; |
|||
}); |
|||
Vue.prototype.fontTypeDic = dic; |
|||
Vue.prototype.fontTypeList = res.data; |
|||
// console.log(fontTypeList, "字体类型");
|
|||
}) |
|||
getDicts('iot_devices_font_color').then(res => { |
|||
|
|||
}) |
|||
getDicts('iot_device_font_inScreen_mode').then(res => { |
|||
|
|||
}) |
|||
getDicts('iot_template_category').then(res => { |
|||
|
|||
|
|||
}) |
|||
getDicts('iot_device_font_size').then(res => { |
|||
|
|||
}) |
|||
return Promise.all([ |
|||
getDicts('iot_device_font_type'), |
|||
// getDicts('iot_devices_font_color'),
|
|||
// getDicts('iot_device_font_inScreen_mode'),
|
|||
// getDicts('iot_template_category'),
|
|||
// getDicts('iot_device_font_size'),
|
|||
]).then(resArr=>{ |
|||
initFontType(resArr[0]); |
|||
|
|||
function initFontType(res){ |
|||
let dic = {}; |
|||
res.data.forEach(item => { |
|||
dic[item.dictValue] = item.cssClass; |
|||
}); |
|||
Vue.prototype.fontTypeDic = dic; |
|||
Vue.prototype.fontTypeList = res.data; |
|||
} |
|||
}); |
|||
|
|||
} |
Loading…
Reference in new issue