bar参数变量化

This commit is contained in:
murmur 2024-06-30 20:26:26 +08:00
parent e3943fe43e
commit 9b991deea1

View File

@ -181,6 +181,8 @@
"api": "/api/getStatus", // API
"data": {
"maxBarCnt":"60",
"width":"5px",
"height":"30px",
"items": [
//{"color": "#808080"},
//{"color": "#808080"},
@ -194,7 +196,7 @@
"name": "items",
"items": {
"type": "tpl",
"tpl": "<div style='width: 3px; height: 50px; border-radius: 2px; background-color: ${color[0]}; box-shadow: 0 0 5px ${color[0]}, 0 0 10px ${color[0]} inset' title='${state}'></div><br><div style='width: 3px; height: 50px; border-radius: 2px; background-color: ${color[1]}; box-shadow: 0 0 5px ${color[1]}, 0 0 10px ${color[1]} inset' title='${state}'></div><br><div style='width: 3px; height: 50px; border-radius: 2px; background-color: ${color[2]}; box-shadow: 0 0 5px ${color[2]}, 0 0 10px ${color[2]} inset' title='${state}'></div>",
"tpl": "<div style='width: ${width}; height: ${height}; border-radius: 2px; background-color: ${color[0]}; box-shadow: 0 0 5px ${color[0]}, 0 0 10px ${color[0]} inset' title='设备'></div><br><div style='width: ${width}; height: ${height}; border-radius: 2px; background-color: ${color[1]}; box-shadow: 0 0 5px ${color[1]}, 0 0 10px ${color[1]} inset' title='超短波'></div><br><div style='width: ${width}; height: ${height}; border-radius: 2px; background-color: ${color[2]}; box-shadow: 0 0 5px ${color[2]}, 0 0 10px ${color[2]} inset' title='${state}'></div>",
"style": {
"display": "inline-block",
"marginRight": "5px",