# 插件配置

# 易语言助手 - 插件页面

1、易语言助手插件设置页面的数据结构为标准的JSON格式;
2、每个组件布局从上往下排版;
3、组件基本由以下参数组成:类型、名称、配置名、默认值,可选参数有:皮肤、尺寸、信息提示等;
4、配置页面可选组件从以下列表中选择;
5、插件配置文件后缀统一为 .json;
6、插件配置文件存放目录为 e\lib\eTools\Set;
7、插件配置文件名称必须与插件文件名一致;// 组件类型

名称描述示例特殊说明示例截图
button按钮{"type" : "button","id" : "打开词库","label" : "打开词库","skin" : "warm","size" : "max","radius" : "radius","event" : "click","param" : "参数名"}skin(皮肤):可空primary = 原始normal = 百搭warm = 暖色danger = 警告-size(大小):可空max = 最大lg = 特大sm = 小型xs = 迷你-radius = 圆角-event = 事件run = 运行(打开文件,打开目录)
-param = 参数名,根据event不同而不同
text文本框{"type" : "text","label" : "备份间隔","id" : "自动备份_间隔","placeholder" : "分钟自动备份1次,最小为1分钟","value" : "10"}value = 默认值
color颜色选择框{"type" : "color","label" : "文字颜色","id" : "文字颜色","placeholder" : "工作夹-文字颜色","value" : "#1c97f5"}value = 默认颜色
file文件框{"type" : "file","id" : "path","label" : "备份路径","placeholder" : "双击选择备份路径","value" : "C:\"}当type=file时,双击文本框会弹出选择目录框value = 默认值
textarea多行文本框{"type" : "textarea","label" : "黑名单列表","id" : "自动备份_黑名单","placeholder" : "如:助手.e","rows" : 8}rows = 行数
checkbox选择框{"type" : "checkbox","skin" : "primary","id" : "自动备份源码","label" : "自动备份源码","checked" : "checked"}skin(皮肤)可选值:空、primary、switchchecked = 默认选中
radio单选框{"type" : "radio","id" : "sex","label" : "性别","value" : [{"label" : "男","value" : "1"},{"label" : "女","value" : "2","checked" : "checked"}}

select组合框{"type" : "select","label" : "备份格式","id" : "自动备份_格式","value" : [{"text" : "名称_xx-xx-xx 12:00","value" : "0"},{"text" : "名称_xx年x月x日 12:00","value" : "1","selected" : "selected"}}selected = 默认选中第2项
card面板(卡片){"type" : "card","label" : "我是面板","text" : "{p} = 易语言根目录,如:D:\program files (x86)\e\{pt} = 易语言助手根目录,如:D:\program files (x86)\e\lib\eTools\"}

table表格"type" : "table","checkbox" : "checkbox","checked" : "checked","label" : "编辑区快捷键","value" : [["快捷键","功能描述"],["Ctrl + X","剪切光标所在行代码"],["F1","扩展或收缩当前命令参数"],["F12","跳转到定义处"],["ESC","回跳到F12之前所在代码位置"],["Ctrl + D","复制光标所在行代码"}
其中第一个成员表头checkbox = 第一列开启选项,默认每一行的第一列为选择框的ID
checked = 默认全选
dtabledtable1动态表格动态表格(多行){"type" : "dtable","id" : "QI_List","value" : [{"lable" : "快捷键","width" : "190","only" : "only","placeholder" : "如:ctrl + f1"},{"lable" : "替换值","width" : "403","placeholder" : "替换值,如:全_运行目录 = 取运行目录() + \"}}only 判断唯一值,只有第一个成员有效
quote引用区块{"type" : "quote","skin" : "gray","text" : "{p}upx.exe --lzma {f}{h}"}skin可选值:空 或 gray
separate分隔条{"type" : "separate","color" : "#FF6633","label" : "我是大分隔条"}其中color为可选color = 字体颜色
hr分隔线{"type" : "hr","color" : "green","label" : "我是分隔线"}其中color、label为可选color = 线条颜色

// 属性名称说明

名称描述适用组件必选
type组件类型全局
label组件标题全局
id组件ID (需保证唯一,radio除外)全局
value
针对 text、file、textarea为默认值
全局可选,其中select为必选
width宽度全局可选
hide隐藏控件(有些功能未实现,可以先隐藏)file、text、textarea、checkbox、radio、select可选
placeholder提示文本text、textarea、checkbox、radio、a可选
checked默认是否选中checkbox、radio可选
selected默认选中项select可选
rows默认行数textarea可选
skin皮肤quote、checkbox可选




punion联动(父)checkbox可选
union联动选择(选择框选中状态 联动 其它组件是否可用)全局可选
minvalue最小值(针对数字)text可选
maxvalue最大小(针对数字)text可选
key快捷键输入text可选
only唯一dtable可选