All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.wslxm.springbootplus2.manage.gc.template.vue3.Vue3MainTemplate Maven / Gradle / Ivy

There is a newer version: 2.3.0
Show newest version
package io.github.wslxm.springbootplus2.manage.gc.template.vue3;

/**
 * @author wangsong
 * 复选Html 模板配置
 */
public interface Vue3MainTemplate {


    /**
     * 文本  {label}  {prop} {search} {searchSpan}
     */
    String TEXT = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    search: {search},\n" +
            "                    searchSpan: {searchSpan},\n" +
            "                    overHidden: true,\n" +
            "                },\n";

    /**
     * 字典 (单选) {label}  {prop} {search}
     */
    String TEXT_DICT = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    type: 'select',\n" +
            "                    search: {search},\n" +
            "                    searchSpan: 5,\n" +
            "                    filterable:true,\n" +
            "                    overHidden: true,\n" +
            "                    dicData: this.dict.get({dictCode}),\n" +
            "                },\n";


    /**
     * 字典(多选) {label}  {prop} {search}
     */
    String TEXT_DICT_CHECKBOX = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    type: 'select',\n" +
            "                    search: {search},\n" +
            "                    searchSpan: 5,\n" +
            "                    overHidden: true,\n" +
            "                    dataType: 'string',\n" +
            "                    dicData: this.dict.get({dictCode}),\n" +
            "                },\n";


    /**
     * 时间-小时选择 {label}  {prop} {search}
     */
    String TIME = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    search: {search},\n" +
            "                    searchSpan: 5,\n" +
            "                    overHidden: true,\n" +
            "                    type: \"time\",\n" +
            "                    pickerOptions:{\n" +
            "                        start: '06:00',\n" +
            "                        step: '00:30',\n" +
            "                        end: '23:00'\n" +
            "                    }\n" +
            "                },\n";


    /**
     * 图片,支持多图/单图) {label}  {prop}
     */
    String IMG = "                {\n" +
            "                    label: '{label} ',\n" +
            "                    prop: '{prop}',\n" +
            "                    search: false,\n" +
            "                    overHidden: true,\n" +
            "                    html: true,\n" +
            "                    formatter: (row) => {\n" +
            "                        if(row.{prop} == null || row.{prop} == ''){\n" +
            "                            return \"\";\n" +
            "                        }else{\n" +
            "                            let imgs = row.{prop}.split(\",\");\n" +
            "                            let html = \"\"; \n" +
            "                            imgs.forEach(item => html += \"\")\n" +
            "                            return html;\n" +
            "                        }\n" +
            "                    }\n" +
            "                },\n";


    /**
     * 图标
     * {label}  {prop}
     */
    String ICON = "                {\n" +
            "                    label: '{label} ',\n" +
            "                    prop: '{prop}',\n" +
            "                    html: true,\n" +
            "                    formatter: (row) => {\n" +
            "                        return row.{prop}\n" +
            "                    }\n" +
            "                },\n";

    /**
     * 颜色
     * {label}  {prop}
     */
    String COLOR = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    type: 'color',\n" +
            "                    overHidden: true,\n" +
            "                    colorFormat: \"hex\",\n" +
            "                    showAlpha: false\n" +
            "                },\n";

    /**
     * 地图
     * {label}  {prop}
     */
    String MAP = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    overHidden: true,\n" +
            "                    html: true,\n" +
            "                    formatter: (row) => {\n" +
            "                        if (row.{prop} != null && row.{prop}.split(',').length >= 3) {\n" +
            "                            return row.{prop}.split(',')[2];\n" +
            "                        }\n" +
            "                        return ''\n" +
            "                    }\n" +
            "                },\n";


    /**
     * 级联选择器的搜索   {label}  {prop} {search}
     */
    String CASCADER = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    search: {search},\n" +
            "                    searchSpan: 5,\n" +
            "                    type: 'cascader',\n" +
            "                    dataType: 'string',\n" +
            "                    overHidden: true,\n" +
            "                    filterable: true, \n" +
            "                    // 在 mounted 事件使用 let res = await this.crud.get() 同步获取数据替换字典数据 \n" +
            "                    dicData: this.defaultdata.dicData, \n" +
            "                    props: {\n" +
            "                        value: \"id\",\n" +
            "                        label: \"name\",\n" +
            "                        children: \"children\"\n" +
            "                    }\n" +
            "                },\n";

    /**
     *  树结构   {label}  {prop} {search}
     */
    String TREE = "                {\n" +
            "                    label: '{label}',\n" +
            "                    prop: '{prop}',\n" +
            "                    search: {search},\n" +
            "                    searchSpan: 5,\n" +
            "                    overHidden: true,\n" +
            "                    type: 'tree',\n" +
            "                    // 在 mounted 事件使用 let res = await this.crud.get() 同步获取数据替换字典数据 \n" +
            "                    dicData: {dicData}, \n" +
            "                    props: {\n" +
            "                        value: \"id\",\n" +
            "                        label: \"name\",\n" +
            "                        children: \"children\"\n" +
            "                    },\n" +
            "                },\n";
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy