Showing
1 changed file
with
18 additions
and
4 deletions
| 1 | 1 | import { BasicColumn, FormSchema } from '/@/components/Table'; | 
| 2 | 2 | import moment from 'moment'; | 
| 3 | +import { h } from 'vue'; | |
| 3 | 4 | |
| 4 | 5 | // 表格配置 | 
| 5 | 6 | export const columns: BasicColumn[] = [ | 
| ... | ... | @@ -57,7 +58,20 @@ export const searchFormSchema: FormSchema[] = [ | 
| 57 | 58 | }, | 
| 58 | 59 | ]; | 
| 59 | 60 | |
| 60 | -export const defaultScriptContent = ` | |
| 61 | - out.msg= "hello"+params; | |
| 62 | - `; | |
| 63 | -export const defaultTitle = '格式:' + defaultScriptContent; | |
| 61 | +export const defaultTitle = h('div', { style: 'background:#404040' }, [ | |
| 62 | + h('h3', { style: 'color:white' }, '示例:'), | |
| 63 | + h('h3', { style: 'color:white' }, '输入参数:0103040150008D3BBB'), | |
| 64 | + h('h3', { style: 'color:white' }, [ | |
| 65 | + h( | |
| 66 | + 'h3', | |
| 67 | + { style: 'color:white' }, | |
| 68 | + "脚本内容:out.humidity = (parseInt('0x'+params.substr(6, 4))*0.1).toFixed(2);" | |
| 69 | + ), | |
| 70 | + h( | |
| 71 | + 'h3', | |
| 72 | + { style: 'color:white' }, | |
| 73 | + "out.temperature = (parseInt('0x'+params.substr(10, 4))*0.1).toFixed(2);" | |
| 74 | + ), | |
| 75 | + h('h3', { style: 'color:white' }, "输出参数:{'humidity':'33.60','temperature':'14.10'}"), | |
| 76 | + ]), | |
| 77 | +]); | ... | ... |