snipaste配置

{
    "jsFile": {
    "prefix": "jsFile",
    "body": [
      "/**",
      " *@description $1",
      " *@author 姓名 工号",
      " *@date ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
      "*/"
    ],
    "description": ""
  },
  "jsFn": {
    "prefix": "jsfn",
    "body": [
      "/**",
      " *@description:  $1",
      " *@param {$2} $3",
      "  @returns {$4} ",
      " *@author lqs 01402062",
      " *@date ${CURRENT_YEAR}-${CURRENT_MONTH}-${CURRENT_DATE} ${CURRENT_HOUR}:${CURRENT_MINUTE}:${CURRENT_SECOND}",
      "*/"
    ],
    "description": ""
  },
  "todo":{
    "prefix": "todo",
    "body": ["// TODO: penguin  $1"],
    "description": ""
  },
  "fixme":{
      "prefix": "fixme",
      "body":   ["// FIXME: penguin  $1"]
  },
// --------------------------------------------------------------------------------------------------dyform---------------------------------
"动态表单对象、基础配置": {
    "prefix": "dyformBase",
    "body": [
      "{",
      "\t\"type\":\"object\",\t//默认数据类型",
      "\t\"title\":${1:\"\"},\t//表格名称",
      "\t\"description\":${2:\"\"},\t//表格描述",
      "\t\"required\":[${3:\"xxx\"}],\t//必填字段名称",
      "\t\"properties\":\t{\t//表格包含的控件填在该对象上面",
      "\t\t${5}",
      "\t}",
      "}"
    ],
    "description": "表格基础配置"
},
// ----------------------------------------------------------------schema配置项start-----------------------------------------------------------------------------------------------------------
"表格基础-input:string": {
    "prefix": "dyformInput:sting",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型",
        "\t//\"ui:widget\":\"el-input\",\t//组件类型 string默认是input输入框",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t\"ui:placeHolder\":\"${3:请输入}\",",
        "\t//\"minLength\":${4:2}\t//最小输入位数限制",
        "\t//\"maxLength\":${5:8}\t//最多输入位数限制",
        "\t//\"pattern\":${6:\\d}\t//正则表达式-用于校验",
        "\t//\"format\":${7:\"uri\"}\t//常用类型校验,如 路径:uri 邮箱:email 颜色:color 时间戳:date  date-time  time base-64:data-url",
        "},"
    ],
    "description": "表格基础-输入框"
},
// FIXME:input不支持数字类型
// "表格基础-input:number": {
//     "prefix": "dyformInput:number",
//     "body": [
//         "{",
//         "\t\"type\":\"number\",\t//数据类型",
//         "\t\"ui:widget\":\"el-input\",\t//组件类型",
//         "\t\"title\":${1},\t//label名称,",
//         "\t\"default\":${2},\t//默认值-选填,",
//         "\t//\"minLength\":${3:2}\t//最小输入位数限制",
//         "\t//\"maxLength\":${4:8}\t//最多输入位数限制",
//         "\t//\"pattern\":${5:\\d}\t//正则表达式-用于校验",
//         "\t//\"format\":${6:\"uri\"}\t//常用类型校验,如 uri email",
//         "},"
//     ],
//     "description": "表格基础-输入框"
// },
// FIXME:input不支持数字类型
// "表格基础-计数器:string": {
//     "prefix": "dyformInputnumber:string",
//     "body": [
//         "{",
//         "\ttype:\"string\",\t//数据类型",
//         "\t\"ui:widget\": \"el-input-number\",\t//定义组件类型为计数器",
//         "\ttitle:${1},\t//label名称,",
//         "\tdefault:${2:1},\t//默认值-选填,",
//         "\tmultipleOf:${3:0.5}\t//基数,必须为基数的倍数-非必填",
//         "\t//minimum:${4:10}\t//最小值-选填",
//         "\t//maximum:${5:99}\t//最大值-选填",
//         "},"
//     ],
//     "description": "表格基础-计数器"
// },
"表格基础-计数器input-number:number": {
    "prefix": "dyformInputnumber:number",
    "body": [
        "{",
        "\t\"type\":\"number\",\t//数据类型 可以是number或者integer",
        "\t\"ui:widget\": \"el-input-number\",\t//定义组件类型为计数器",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2:1},\t//默认值-选填,",
        "\t\"multipleOf\":${3:0.5}\t//基数,必须为基数的倍数-非必填",
        "\t//\"minimum\":${4:10}\t//最小值-选填",
        "\t//\"maximum\":${5:99}\t//最大值-选填",
        "},"
    ],
    "description": "表格基础-计数器"
},
"表格基础-计数器input-number:integer": {
    "prefix": "dyformInputnumber:integer",
    "body": [
        "{",
        "\t\"type\":\"integer\",\t//数据类型 可以是number或者integer",
        "\t\"ui:widget\": \"el-input-number\",\t//定义组件类型为计数器",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2:1},\t//默认值-选填,",
        "\t\"multipleOf\":${3:0.5}\t//基数,必须为基数的倍数-非必填",
        "\t//\"minimum\":${4:10}\t//最小值-选填",
        "\t//\"maximum\":${5:99}\t//最大值-选填",
        "},"
    ],
    "description": "表格基础-计数器"
},
"表格基础-radio:string": {
    "prefix": "dyformRadio:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型 可以是string boolean number",
        "\t\"ui:widget\": \"RadioWidget\",\t//定义组件类型为Radio",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t\"enum\":[${3}],\t//枚举类型值",
        "\t\"enumNames\":[${4}]\t//枚举类型显示值",
        "\t//\"ui:enumNames\": [\"UiColor - 1\", \"UiColor - 2\", \"UiColor - 3\"]\t//覆盖enumNames配置",
        "},"
    ],
    "description": "表格基础-radio"
},
"表格基础-radio:boolean": {
    "prefix": "dyformRadio:boolean",
    "body": [
        "{",
        "\t\"type\":\"boolean\",\t//数据类型 可以是string boolean",
        "\t\"ui:widget\": \"RadioWidget\",\t//定义组件类型为Radio",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t\"enum\":[${3}],\t//枚举类型值",
        "\t\"enumNames\":[${4}]\t//枚举类型显示值",
        "\t//\"ui:enumNames\": [\"UiColor - 1\", \"UiColor - 2\", \"UiColor - 3\"]\t//覆盖enumNames配置",
        "},"
    ],
    "description": "表格基础-radio"
},
"表格基础-radio:number": {
    "prefix": "dyformRadio:number",
    "body": [
        "{",
        "\t\"type\":\"number\",\t//数据类型 可以是string boolean number",
        "\t\"ui:widget\": \"RadioWidget\",\t//定义组件类型为Radio",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t\"enum\":[${3}],\t//枚举类型值",
        "\t\"enumNames\":[${4}]\t//枚举类型显示值",
        "\t//\"ui:enumNames\": [\"UiColor - 1\", \"UiColor - 2\", \"UiColor - 3\"]\t//覆盖enumNames配置",
        "},"
    ],
    "description": "表格基础-radio"
},
"表格基础-checkBox:array": {
    "prefix": "dyformcheckBox:array",
    "body": [
        "{",
        "\t\"type\":\"array\",\t//数据类型 array",
        "\t\"ui:widget\": \"CheckboxesWidget\",\t//定义组件类型为checkBox",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t\"items\":{",
        "\t\t\"type\":\"${3:string}\",\t//勾选项数据类型",
        "\t\t\"enum\":[${4}],\t//枚举类型值",
        "\t\t\"enumNames\":[${5}]\t//枚举类型显示值",
        "\t},",
        "\t\"uniqueItems\": true\t//checkbox必填",
        "},"
    ],
    "description": "表格基础-checkBox"
},
"表格基础-select:string": {
    "prefix": "dyformSelect:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型 select的type可以为number string boolean",
        "\t\"ui:widget\": \"SelectWidget\",\t//定义组件类型为Select",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,填了后清空还是该值",
        "\t\"enum\":[${3}],\t//枚举类型值,只能是字符串",
        "\t\"enumNames\":[${4}],\t//枚举类型显示值",
        "\t\"ui:options\":{",
        "\t\t\"clearable\":true\t//透传给组件的配置属性",
        "\t}",
        "},"
    ],
    "description": "表格基础-筛选框"
},
"表格基础-select:number": {
    "prefix": "dyformSelect:number",
    "body": [
        "{",
        "\t\"type\":\"number\",\t//数据类型 select的type可以为number string boolean",
        "\t\"ui:widget\": \"SelectWidget\",\t//定义组件类型为Select",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,填了后清空还是该值",
        "\t\"enum\":[${3}],\t//枚举类型值,只能是数字",
        "\t\"enumNames\":[${4}],\t//枚举类型显示值",
        "\t\"ui:options\":{",
        "\t\t\"clearable\":true\t//透传给组件的配置属性",
        "\t}",
        "},"
    ],
    "description": "表格基础-筛选框"
},
"表格基础-select:boolean": {
    "prefix": "dyformSelect:boolean",
    "body": [
        "{",
        "\t\"type\":\"boolean\",\t//数据类型 select的type可以为number string boolean",
        "\t\"ui:widget\": \"SelectWidget\",\t//定义组件类型为Select",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2:true},\t//默认值-选填,填了后清空还是该值",
        "\t\"enum\":[${3:true,false}],\t//枚举类型值,只能是数字",
        "\t\"enumNames\":[${4:\"是\",\"否\"}],\t//枚举类型显示值",
        "\t\"ui:options\":{",
        "\t\t\"clearable\":true\t//透传给组件的配置属性",
        "\t}",
        "},"
    ],
    "description": "表格基础-筛选框"
},
"表格基础-slider:number": {
    "prefix": "dyformSlider:number",
    "body": [
        "{",
        "\t\"type\":\"number\",\t//数据类型 可以是number或者integer",
        "\t\"ui:widget\": \"el-slider\",\t//定义组件类型为Radio",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t//\"multipleOf\":${3:5}\t//基数,必须为基数的倍数-非必填",
        "\t//\"minimum\":${4:10}\t//最小值-选填",
        "\t//\"maximum\":${5:99}\t//最大值-选填",
        "},"
    ],
    "description": "表格基础-滑动条"
},
"表格基础-slider:integer": {
    "prefix": "dyformSlider:integer",
    "body": [
        "{",
        "\t\"type\":\"integer\",\t//数据类型 可以是number或者integer",
        "\t\"ui:widget\": \"el-slider\",\t//定义组件类型为Radio",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "\t//\"multipleOf\":${3:5}\t//基数,必须为基数的倍数-非必填",
        "\t//\"minimum\":${4:10}\t//最小值-选填",
        "\t//\"maximum\":${5:99}\t//最大值-选填",
        "},"
    ],
    "description": "表格基础-滑动条"
},
"表格基础-switch:boolean": {
    "prefix": "dyformSwitch:boolean",
    "body": [
        "{",
        "\t\"type\":\"boolean\",\t//数据类型",
        "\t\"ui:widget\": \"el-switch\",\t//定义组件类型为switch",
        "\t\"title\":${1},\t//label名称,",
        "\t\"default\":${2},\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-switch开关"
},
"表格基础-colorPicker:string": {
    "prefix": "dyformColorPicker:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型",
        "\t\"ui:widget\": \"el-color-picker\",\t//定义组件类型为ColorPicker",
        "\t\"title\":${1},\t//label名称,",
        "\t\"format\":\"color\",\t//这里是特殊定义必填color",
        "\t\"default\":\"${2:#151ce6}\",\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-ColorPicker选色器"
},
"表格基础-upload:string": {
    "prefix": "dyformUpload:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型 可以是string、array",
        "\t\"title\":${1},\t//label名称,",
        "\t\"ui:widget\": \"UploadWidget\",\t//定义组件类型为UploadWidget",
        "\t\"ui:btnText\": \"${2:上传}\",\t//按钮文本",
        "\t\"ui:action\": \"${3:https://run.mocky.io/v3/518d7af7-204f-45ab-9628-a6e121dab8ca}\",\t//上传地址",
        "\t\"default\":\"${4:http://img.alicdn.com/tfs/TB1vYlkdnZmx1VjSZFGXXax2XXa-468-644.jpg_320x5000q100.jpg_.webp}\",\t//默认值-选填,",
        "\t//\"ui:slots\":{",
        "\t\t//\"tip\":()=>{\t//插入到tip具名插槽中",
        "\t\t//return <div style={{'font':'inherit'}}>\"${5:只能上传jpg/png文件,且不超过500kb}\"</div>",
        "\t\t//},",
        "\t//},",
        "},"
    ],
    "description": "表格Upload-其中slot 可以通过 slots参数传入数组VNode list"
},
"表格基础-upload:array": {
    "prefix": "dyformUpload:array",
    "body": [
        "{",
        "\t\"type\":\"array\",\t//数据类型 可以是string、array",
        "\t\"title\":${1},\t//label名称,",
        "\t\"items\":{",
        "\t\t\"type\":\"${2:string}\",\t//勾选项数据类型",
        "\t},",
        "\t\"ui:widget\": \"UploadWidget\",\t//定义组件类型为UploadWidget",
        "\t\"ui:btnText\": \"${3:上传}\",\t//按钮文本",
        "\t\"ui:action\": \"${4:https://run.mocky.io/v3/518d7af7-204f-45ab-9628-a6e121dab8ca}\",\t//上传地址",
        "\t\"default\":[\"${5:http://img.alicdn.com/tfs/TB1vYlkdnZmx1VjSZFGXXax2XXa-468-644.jpg_320x5000q100.jpg_.webp}\"],\t//默认值-选填,",
        "\t//\"ui:slots\":{",
        "\t\t//\"tip\":()=>{\t//插入到tip具名插槽中",
        "\t\t//return <div style={{'font':'inherit'}}>\"${5:只能上传jpg/png文件,且不超过500kb}\"</div>",
        "\t\t//},",
        "\t//},",
        "},"
    ],
    "description": "表格Upload-其中slot 可以通过 slots参数传入数组VNode list"
},
"表格基础-DateTimePickerRange:array_string": {
    "prefix": "dyformDateTimePickerRange:array_string",
    "body": [
        "{",
        "\t\"type\":\"array\",\t//数据类型",
        "\t//\"ui:widget\": \"DateTimePickerWidget\",\t//定义组件类型为DateTimePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期时间区间选择\"},\t//label名称,",
        "\t\"format\":\"date-time\",\t//这里是特殊定义必填date-time,识别组件类型及校验",
        "\t\"default\":[${2:\"2021-10-31T16:00:00.000Z\",\"2021-11-04T16:00:00.000Z\"}],\t//默认值-选填,",
        "\t\"items\":{\t//格式 2018-11-13T20:20:39+00:00",
        "\t\t\"type\":\"string\",",
        "\t}",
        "},"
    ],
    "description": "表格基础-DateTimePicker日期时间选择器格式 [\"2021-10-31T16:00:00.000Z\",\"2021-11-04T16:00:00.000Z\"]"
},
"表格基础-DateTimePickerRange:array_number": {
    "prefix": "dyformDateTimePickerRange:array_number",
    "body": [
        "{",
        "\t\"type\":\"array\",\t//数据类型",
        "\t//\"ui:widget\": \"DateTimePickerWidget\",\t//定义组件类型为DateTimePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期时间区间选择\"},\t//label名称,",
        "\t\"format\":\"date-time\",\t//这里是特殊定义必填date-time,识别组件类型及校验",
        "\t\"default\":[${2:1635868800000,1635955200000}],\t//默认值-选填,",
        "\t\"items\":{\t//格式 时间戳",
        "\t\t\"type\":\"number\",",
        "\t}",
        "},"
    ],
    "description": "表格基础-DateTimePicker日期时间区间选择(number时间戳 [1635868800000,1635955200000])"
},
"表格基础-DateTimePicker:string": {
    "prefix": "dyformDateTimePicker:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型",
        "\t//\"ui:widget\": \"DateTimePickerWidget\",\t//定义组件类型为DateTimePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期时间选择\"},\t//label名称,",
        "\t\"format\":\"date-time\",\t//这里是特殊定义必填date-time,识别组件类型及校验",
        "\t\"default\":${2:\"2021-10-31T16:00:00.000Z\"},\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-DateTimePicker日期时间选择器格式 \"2021-10-31T16:00:00.000Z\""
},
"表格基础-DateTimePicker:number": {
    "prefix": "dyformDateTimePicker:number",
    "body": [
        "{",
        "\t\"type\":\"number\",\t//数据类型",
        "\t//\"ui:widget\": \"DateTimePickerWidget\",\t//定义组件类型为DateTimePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期时间选择\"},\t//label名称,",
        "\t\"format\":\"date-time\",\t//这里是特殊定义必填date-time,识别组件类型及校验",
        "\t\"default\":${2:1635868800000},\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-DateTimePicker日期时间区间选择(number时间戳 1635868800000)"
},
"表格基础-DatePickerRange:array_string": {
    "prefix": "dyformDatePickerRange:array_string",
    "body": [
        "{",
        "\t\"type\":\"array\",\t//数据类型",
        "\t//\"ui:widget\": \"DatePickerWidget\",\t//定义组件类型为DatePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期选择器\"},\t//label名称,",
        "\t\"format\":\"date\",\t//这里是特殊定义必填date,识别组件类型及校验",
        "\t\"default\":[${2:\"2021-11-10\",\"2021-11-11\"}],\t//默认值-选填,",
        "\t\"items\":{\t//格式 2021-11-10",
        "\t\t\"type\":\"string\",",
        "\t}",
        "},"
    ],
    "description": "表格基础-DatePicker日期选择器,格式[\"2018-11-13\",\"2021-11-11\"]"
},
"表格基础-DatePickerRange:array_number": {
    "prefix": "dyformDatePickerRange:array_number",
    "body": [
        "{",
        "\t\"type\":\"array\",\t//数据类型",
        "\t//\"ui:widget\": \"DatePickerWidget\",\t//定义组件类型为DatePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期选择器\"},\t//label名称,",
        "\t\"format\":\"date\",\t//这里是特殊定义必填date,识别组件类型及校验",
        "\t\"default\":[${2:1637596800000,1638201600000}],\t//默认值-选填,",
        "\t\"items\":{\t//格式 1637596800000",
        "\t\t\"type\":\"number\",",
        "\t}",
        "},"
    ],
    "description": "表格基础-DatePicker日期选择器(number时间戳 [1637596800000,1638201600000])"
},
"表格基础-DatePicker:string": {
    "prefix": "dyformDatePicker:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型",
        "\t//\"ui:widget\": \"DatePickerWidget\",\t//定义组件类型为DatePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期选择器\"},\t//label名称,",
        "\t\"format\":\"date\",\t//这里是特殊定义必填date,识别组件类型及校验",
        "\t\"default\":${2:\"2021-11-11\"},\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-DatePicker日期选择器,格式\"2021-11-11\""
},
"表格基础-DatePicker:number": {
    "prefix": "dyformDatePicker:number",
    "body": [
        "{",
        "\t\"type\":\"number\",\t//数据类型",
        "\t//\"ui:widget\": \"DatePickerWidget\",\t//定义组件类型为DatePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期选择器\"},\t//label名称,",
        "\t\"format\":\"date\",\t//这里是特殊定义必填date,识别组件类型及校验",
        "\t\"default\":${2:1637596800000},\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-DatePicker日期选择器(number时间戳 1637596800000)"
},
"表格基础-TimePicker:string": {
    "prefix": "dyformTimePicker:string",
    "body": [
        "{",
        "\t\"type\":\"string\",\t//数据类型",
        "\t//\"ui:widget\": \"TimePickerWidget\",\t//定义组件类型为TimePicker 可不填,内部通过format自动判别",
        "\t\"title\":${1:\"日期选择器\"},\t//label名称,",
        "\t\"format\":\"time\",\t//这里是特殊定义必填date,识别组件类型及校验",
        "\t\"default\":${2:\"17:39:18\"},\t//默认值-选填,",
        "},"
    ],
    "description": "表格基础-TimePicker时间选择器(string\"17:39:18\")"
},

// ----------------------------------------------------------------ui:配置项start-----------------------------------------------------------------------------------------------------------
// ui:order


"组件类型-widget":{
    "prefix": "dyformui:widget",
    "body": [
        "\"ui:widget\":${0:\"el-input\"},\t//控件类型类型,注意除了描述上的例外",
    ],
    "description": "组件控件类型类型,除了ButtonWidget、CheckboxesWidget、DatePickerWidget、DateTimePickerWidget、RadioWidget、SelectWidget、TimePickerWidget、UploadWidget"
},
"组件disabled":{
    "prefix": "dyformui:disabled",
    "body": [
        "\t\"ui:disabled\":${0:true},\t//可用mustache表达式" ,
    ],
    "description": "组件属性disabled(禁用状态)\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件readonly":{
    "prefix": "dyformui:readonly",
    "body": [
        "\t\"ui:readonly\":${0:true},\t//可用mustache表达式" ,
    ],
    "description": "组件属性readonly(只读状态)\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件labelWidth":{
    "prefix": "dyformui:labelWidth",
    "body": [
        "\t\"ui:labelWidth\":${0:\"50\"},\t//可用mustache表达式" ,
    ],
    "description": "组件属性labelWidth,fieldAttrs 中配置 labelWidth': '50px'\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件title":{
    "prefix": "dyformui:title",
    "body": [
        "\t\"ui:title\":\"${0}\",\t//可用mustache表达式" ,
    ],
    "description": "组件属性title(控件标签名字)\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件description":{
    "prefix": "dyformui:description",
    "body": [
        "\t\"ui:description\":\"${0}\",\t//可用mustache表达式",
    ],
    "description": "组件描述description\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件type":{
    "prefix": "dyformui:type",
    "body": [
        "\t\"ui:type\":\"${0}\",\t//可用mustache表达式",
    ],
    "description": "组件自身属性type,input控件可以是textarea input\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件placeHolder":{
    "prefix": "dyformui:placeHolder",
    "body": [
        "\t\"ui:placeHolder\":\"${0:请输入}\",\t//可用mustache表达式",
    ],
    "description": "组件属性placeholder\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件样式style":{
    "prefix": "dyformui:style",
    "body": [
        "\t\"ui:style\":{${1:\"boxShadow\"}: ${2:\"0 0 6px 2px pink\"}},\t//可用mustache表达式,\"{{ parentFormData.selectWidgetOptions === \"foo\"  ?  { boxShadow: \"0 0 6px 2px pink\"} : { boxShadow: \"0 0 6px 2px red\"} }}\"",
    ],
    "description": "组件属性style\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件样式class":{
    "prefix": "dyformui:class",
    "body": [
        "\t\"ui:class\":{${1:\"className_hei\"}: ${2:true}},\t//可用mustache表达式",
    ],
    "description": "组件属性classr\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件联动隐藏":{
    "prefix": "dyformui:hidden",
    "body": [
        "\t\"ui:hidden\":\"{{${0:rootFormData.name === '123'}}}\",\t//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值",
    ],
    "description": "组件属性hidden\t\n//可以通过mustache表达式获取到parentFormData当前节点父级的FormData值;rootFormData根节点的FormData值"
},
"组件属性透传-options":{
    "prefix": "dyformui:options",
    "body": [
        "\"ui:options\":{",
        "\t\"clearable\":true\t//透传给组件的配置属性",
        "}",
    ],
    "description": "组件属性透传,例如size、placeholder..."
},
// "ui:flex": {
//  "flex-direction": "row",
//  "justify-content": "center",
//  "align-item": "center",
//   },
"组件布局-flex":{
    "prefix": "dyformui:flex",
    "body": [
        "\"ui:flex\":{",
        "\t\"flex-direction\":\"row\",\t//flex布局",
        "\t\"justify-content\":\"center\",\t",
        "\t\"align-item\":\"row\",\t",
        "}"
    ],
    "description": "formItemn内部组件,可通过flex布局+ui:labelWidth配置布局"
},
"组件布局配置-default":{
    "prefix": "dyformui:layout-default",
    "body": [
        "\"ui:layout\":{",
        "\t\"type\":\"default\",\t//default配置项就会受外层layoutColumn配置影响",
        "\t\"content\":[${0:\"xxx\"}],\t//需要包含的控件字段名称,有子布局请放入childWrapper.x配置",
        "}"
    ],
    "description": "组件布局配置,有default默认流式布局,若数据结构平级有其他布局嵌套,请用childWrapper"
},
"组件布局配置-grid":{
    "prefix": "dyformui:layout-grid",
    "body": [
        "\"ui:layout\":{",
        "\t\"type\":\"grid\",\t//grid栅格配",
        "\t\"span\":\"${1:8:8:8}\",\t//只有grid才有,span代表栅格24格占比,只要相加24即可",
        "\t//\"gutter\":\"${2:10}\",\t//栅格间隔",
        "\t\"content\":[${0:\"xxx\"}],\t//需要包含的控件字段名称,有子布局请放入childWrapper.x配置",
        "}"
    ],
    "description": "组件布局配置,栅格配置,若数据结构平级有其他布局嵌套,请用childWrapper"
},
"组件布局配置-tabs":{
    "prefix": "dyformui:layout-tabs",
    "body": [
        "\"ui:layout\":{",
        "\t\"type\":\"tabs\",\t//tabs栅格配",
        "\t\"tabsNumber\":\"${0:2}\",\t//tabs开辟几个tab",
        "\t\"tabType\":\"${1:border-card}\",\t//卡片类型:border-card、card",
        "\t\"content\":[${0:\"xxx\"}],\t//需要包含的控件字段名称,有子布局请放入childWrapper.x配置",
        "//若有两个tabs,可单独配置childWrapper[{...},{...}],在content:[childWrapper.0,childWrapper.1]配置",
        "}"
    ],
    "description": "组件布局配置,tabs标签页布局,若数据结构平级有其他布局嵌套,请用childWrapper"
},

"组件布局配置嵌套布局配置-childWrapper":{
    "prefix": "dyformui:layout-childWrapper",
    "body": [
        "\"childWrapper\":[",
        "\t{",
        "\t\t\"type\":\"${0:grid}\",\t//包含grid、tabs两种",
        "\t\t\"span\":\"${1:8:8:8}\",\t//只有grid才有,span代表栅格24格占比,只要相加24即可",
        "\t\t//\"gutter\":\"${2:10}\",\t//栅格间隔",
        "\t\t\"content\":[${3:\"xxx\"}],\t//需要包含的控件字段名称",
        "\t}",
        "]"
    ],
    "description": "组件布局配置,有default默认流式布局"
},

// ----------------------------------------------------------------err:配置项start-----------------------------------------------------------------------------------------------------------

"组件错误提示-type":{
    "prefix": "dyformerr:type",
    "body": [
        "\t\"err:type\":\"${0}\",",
    ],
    "description": "组件校验字段类型失败时的文案"
},
"组件错误提示-required":{
    "prefix": "dyformerr:required",
    "body": [
        "\t\"err:required\":\"${0}\",",
    ],
    "description": "组件校验必填失败时显示的文案"
},
"组件错误提示-minLength":{
    "prefix": "dyformerr:minLength",
    "body": [
        "\t\"err:minLength\":\"${0}\",",
    ],
    "description": "组件最小长度不满足时显示的文案"
},
"组件错误提示-maxLength":{
    "prefix": "dyformerr:maxLength",
    "body": [
        "\t\"err:maxLength\":\"${0}\",",
    ],
    "description": "组件最da长度超过时显示的文案"
},
"组件错误提示-format":{
    "prefix": "dyformerr:format",
    "body": [
        "\t\"err:format\":\"${0}\",",
    ],
    "description": "组件校验规则失败时显示的文案"
},
"组件错误提示-pattern":{
    "prefix": "dyformerr:pattern",
    "body": [
        "\t\"err:pattern\":\"${0}\",",
    ],
    "description": "组件自定义正则校验失败时显示的文案"
},
"组件错误提示-uniqueItems":{
    "prefix": "dyformerr:uniqueItems",
    "body": [
        "\t\"err:uniqueItems\":\"${0}\",",
    ],
    "description": "组件子表单数组不能包含重复的值"
},

// ----------------------------------------------------------------customFormat/customRule配置项start-----------------------------------------------------------------------------------------------------------

"添加自定义校验的预设":{
    "prefix": "dyformcustomFormats",
    "body": [
        "customFormats:{",
        "//下面示例,price规则;添加完后通过format:price定义控件校验规则,err:format:'xxxx'定义校验不通过错误提示",
        "//自定义校验规则,调用 avj.addFormat 方法添加新的format",
        "\tprice(value){",
        "\t\treturn value !== '' && /^[0-9]\\d*$|^\\d+(\\.\\d{1,2})$/.test(value) && value >= 0 && value <= 999999.99",
        "\t}",
        "}"
    ],
    "description": "表单添加自定义校验的预设"
},
"添加自定义校验validator":{
    "prefix": "dyformcustomRule",
    "body": [
        "customRule:{",
        "//自动添加到每个控件的rulse的validator方法内",
        "//field: 当前节点的 field 路径,和 formData 数据结构对应, 通过 . 连接,如: imgList.0.imgUrl, 实在不清楚可以通过 Vue DevTools 查看对应组件的 curNodePath 参数",
        "//value:当前节点的值,响应式数据,避免直接修改数据",
        "//rootFormData:根节点formData数据,响应式数据,避免直接修改数据",
        "//callback:function 必须调用 callback 返回当前的校验结果,不传参数说明校验通过",
        "\tcustomRule({field, value, rootFormData, callback}){",
        "\t\t//通过field判断字段再加逻辑判断",
        "\t\tif (field === 'imgList.0.imgUrl') {",
        "\t\t\treturn callback('永远校验失败');",
        "\t\t}",
        "\t\treturn callback();",
        "\t}",
        "}"
    ],
    "description": "表单添加自定义校验validator"
},

//----------------------------------------------------from配置start------------------------------------------
"表格基本配置":{
    "prefix": "dyformsetting",
    "body": [
        "let formProps={",
        "\t\"layoutColumn\":${0:1},\t//支持 1 2 3 列布局,如果使用inline表单这里配置无效",
        "\t\"inline\":${1:false},\t//行内表单模式",
        "\t\"inlineFooter\":${2:true},\t// 如果想要保存按钮和表单元素一行显示,需要配置 true",
        "\t\"labelSuffix\":${3:\":\"},\t//label后缀",
        "\t\"labelPosition\":${4:\"left\"},\t//表单域标签的位置",
        "\t\"isMiniDes\":${5:false},\t//是否优先mini形式显示描述信息(label文字和描述信息同行显示)",
        "\t\"labelWidth\":${6:\"auto\"}\t//表单域标签的宽度,例如 '50px'",
        "}"
    ],
    "description": "表格基本配置,label宽度位置、整个表格默认几列等"
}
//--------------------------------------------------actionSchema配置------------------------------------------

}
posted @ 2021-11-11 09:56  little_ab  阅读(186)  评论(0编辑  收藏  举报