基础配置

创建于 2021-08-02 / 最近更新于 2024-04-30 / 26431
字体: [默认] [大] [更大]
base
    key_field               主键字段(唯一数据 id 字段名称)  必传
    status_field            数据主状态字段
    is_search               是否开启搜索(0|1)
    search_url              搜索 url 地址
    is_delete               是否开启删除操作(0|1)
    delete_url              删除 url 地址
    delete_form             删除列 name=字段名称key(默认自动取第一个 checkbox|radio 的 name 名称)未匹配到则 ids
    delete_key              请求 post 的 form字段key名称(默认使用 delete_form 的值)
    confirm_title           确认框提示(默认 温馨提示)
    confirm_msg             确认框提示信息(默认 删除后不可恢复、确认操作吗?)
    timeout                 异步请求超时时间(默认30000 毫秒)
    detail_title            加载详情的弹窗标题(可空)
    is_fields_sel           是否开启字段用户选择(0|1)、默认开启

    # v2.3.1新增 开始
    # 可开启导出excel
    is_data_export_excel    开启导出excel(使用数据配置模式下可用)

    # 可开启数据打印
    is_data_print           开启数据打印(页面需要自行开启引入打印组件)
    is_data_export_pdf      开启数据导出PDF(页面需要自行开启引入打印组件)
    data_print_template     数据打印模板(可这里配置或页面自行增加js变量 名称:print_template)

    # 详情avg页面
    detail_avg_sm_value     详情avg页面小屏展示数据数量值(默认 2)
    detail_avg_md_value     详情avg页面小屏展示数据数量值(默认 3)
    detail_avg_lg_value     详情avg页面小屏展示数据数量值(默认 4)
    # v2.3.1新增 结束

form
    label                   标题名称
    view_type               field 字段取值, many_text 多文本, many_images 多图展示, images 单图展示, qrcode 二维码生成展示, module 模块文件引入内容, status 状态操作
    view_key                展示数据的 key名称, 多个字段内容展示传数组, view_type为 module 的时候这里写文件路径
    template                模板路径(module类型下)
    params_where_name       指定参数、key值
    view_data               指定数据转换(一维/二维数组、一维数据值索引=>显示的数据)
    view_data_key           指定数据转换二维数组取值字段key名称,多图展示二级数据key名称
    view_key_join           view_key为多个字段(一维数组的时候),内容之间拼接的字符
    view_join_first         拼接展示的值(前面)仅 field 类型有效
    view_join_last          拼接展示的值(后面)仅 field 类型有效
    align                   内容位置(left 居左, center 居中, right 居右)默认 left
    grid_size               格子大小, xxxl 650px, xxl 550px, xl 450px, lg 350px, sm 200px, xs 150px, 默认空(100px)
    is_middle               上下居中(默认1居中 0或1)
    key_field               主键key字段(默认使用 base 中主键字段)
    post_url                接口地址
    is_form_su              status 状态更新组件 是否需要更新数据列表状态颜色(默认0, 0或1)
    is_loading              是否加载弹层(默认0, 0或1)(列表内置操作组件可用、如 status状态操作组件)
    loading_msg             加载弹层提示信息(列表内置操作组件可用、如 status状态操作组件)
    not_show_data           是否不显示控件数据(仅对checkbox | radio)有效
    not_show_key            是否不显示控件字段 key(仅对checkbox | radio)有效(默认主键 id)
    not_show_type           是否不显示控件的条件(0 eq 等于、 1 gt 大于、 2 lt 小于)、这个时候not_show_data不要传数组
    fixed                   固定(left|right  左固定|右固定)
    width                   设定宽度
    is_sort                 是否开启排序操作(0|1)、默认开启
    sort_field              排序指定字段名称(空则使用搜索条件的字段)
    is_list                 是否列表展示(0否, 1是)默认1
    is_detail               是否详情展示(0否, 1是)默认1

    # v2.3.1新增 开始
    # 文本截断和弹出提示
    text_truncate           文本截断(1 一行、2 两行)
    is_popover              显示弹出提示(仅field类型字段有效)
    popover_field           指定显示弹出提示数据字段(默认取view_key)

    # 图片参数
    images_width            指定图片宽度
    images_height           指定图片高度
    images_shape            round 椭圆, circle 圆形, radius 圆角

    # 圆点
    is_round_point          是否开启圆点(0否, 1是)默认0不开启,仅对field类型有效
    round_point_key         数据key
    round_point_style       圆点颜色数据(primary 主色, secondary 次色, success 绿色, warning 橙色, danger 红色),也可以直接写颜色值如:#f00,(默认空则黑色)

    # 小微章
    is_badge                是否开启小微章(0否, 1是)默认0不开启,仅对field类型有效
    badge_key               数据key
    badge_style             背景颜色数据(primary 主色, secondary 次色, success 绿色, warning 橙色, danger 红色),也可以直接写颜色值如:#f00,(默认空则黑色)
    badge_shape             round 椭圆, radius 圆角

    # 颜色
    is_color                是否开启颜色(0否, 1是)默认0不开启,仅对field类型有效
    color_key               数据key
    color_style             颜色数据(primary 主色, secondary 次色, success 绿色, warning 橙色, danger 红色),也可以直接写颜色值如:#f00,(默认空则黑色)

    # 图标+提示
    is_first_tips           数据前面增加提示(0否, 1是)默认0不开启,仅对field类型有效
    first_tips_icon         提示图标class(默认 exclamation-circle)
    first_tips_key          提示数据key
    first_tips_data         提示数据、如同时设置则(优先级低于first_tips_key)
    first_tips_style        提示样式(primary 主色, secondary 次色, success 绿色, warning 橙色, danger 红色)

    # 链接+提示
    is_first_link           是否开启后面展示连接
    first_link_icon         提示图标class(默认 external-link)
    first_link_key          链接数据key
    first_link_data         提示数据、如同时设置则(优先级低于first_link_key)
    first_link_popover      弹出提示信息
    first_link_style        提示样式(primary 主色, secondary 次色, success 绿色, warning 橙色, danger 红色)
    # v2.3.1新增 结束

    # v3.0.0新增 开始
    # 二维码生成并展示
    qrcode_type             二维码展示类型(0 二维码图标+内容文本+弹窗展示 / 默认, 1直接展示二维码+内容文本)
    is_qrcode_text          直接展示二维码 - 是否展示文本(0否 / 默认, 1是)
    images_width            直接展示二维码 - 指定图片宽度
    images_height           直接展示二维码 - 指定图片高度
    images_shape            直接展示二维码 - round 椭圆, circle 圆形, radius 圆角

    # 进度条
    progress_data_key       指定数据key(未定义则采用 view_key )
    progress_size           进度条大小(xs 小, sm 中, 不定义或空则默认大)
    is_radius               是否圆角(0否, 1是)
    is_striped              是否条纹(0否, 1是)
    is_active               是否激活(0否, 1是)
    color_style             样式class(primary 主色 / 默认, secondary 次色, success 绿色, warning 橙色, danger 红色)
    progress_text_key       展示文本key(未定义则不展示)
    progress_text_unit      展示文本单位(未定义则不展示)

    # 评分星星
    star_data_key           指定数据key(未定义则采用 view_key )
    star_max                星星最大数(默认 5)
    color_style             选中样式class(primary 主色 / 默认, secondary 次色, success 绿色, warning 橙色, danger 红色)
    color_value             选中样式颜色(色值,如 #f00)
    star_text_key           展示文本key(未定义则不展示)
    star_text_unit          展示文本单位(未定义则不展示)
    # v3.0.0新增 结束

    # v4.1.0 新增 开始
    # popup弹窗
    is_popup                是否开启popup窗口(0否, 1是)
    popup_url               popup窗口url
    popup_url_key           popup窗口url数据key(优先级高于 popup_url)
    popup_title             popup窗口标题
    popup_class             popup窗口添加的class
    popup_full              popup窗口满屏(0否, 1是)
    popup_full_max          popup窗口满屏系统最大宽度限制(0否, 1是)
    popup_full_max_size     popup窗口大小(默认空 最大1200、有效值 md 800, lg 1000)

    # modal弹窗
    is_modal                是否开启modal窗口(0否, 1是)
    modal_url               modal窗口url
    modal_url_key           modal窗口url数据key(优先级高于 modal_url)
    modal_width             modal宽度
    modal_height            modal高度
    # v4.1.0 新增 结束

    # v6.0.0 开始
    is_copy                 是否支持复制(仅 view_type=field下纯数据展示和数组数据解析展示模式下有效)
    # v6.0.0 结束


    search_config
        form_type               表单类型(input, select, section, datetime, date, ym)
        form_name               表单字段名称
        placeholder             提示信息
        is_seat_select          是否开启占位选择框
        seat_select_value       选择占位值(默认空)
        seat_select_text        选择占位文本(默认 placeholder 值)
        data                    条件数据(一维/二维数组、一维数据值索引=>显示的数据)
        data_key                二维数组数据key字段名称(默认取 id)
        data_name               二维数组数据 name 字段名称(默认取 name)
        template                模板路径(module类型下)
        where_type              条件类型(input|ym默认=, select默认in)=,like,in,section,datetime,date
        where_type_custom       条件符号自定义处理(未指定则使用 条件类型where_type,也可以定义方法接收 form_key, params,或者直接协条件符号值,模块中就不要定义方法)
        where_value_custom      条件值自定义处理(填写方法名称 接收参数 value, params)
        where_object_custom     条件处理自定义对象
        is_multiple             是否开启多选(开启后 is_seat_select 将失效)
        is_point                input 是否支持小数点
        is_disabled             是否禁止操作(0否、1是)


    view_type
        checkbox
            is_checked              是否选中(0|1)
            checked_text            选中文本
            not_checked_text        未选中文本
            view_key                默认(form_checkbox_value)

        radio
            label                   默认(单选)
                view_key                默认(form_radio_value)


data
    list_action             列表方法名称(默认['index'])
    detail_action           详情方法名称(默认['detail', 'saveinfo'])
    detail_dkey             详情数据库数据条件key字段(默认id)
    detail_pkey             详情参数数据条件key字段(默认id)
    detail_where            详情额外条件(二维数组形式传递)
    table_name              表名称
    table_obj               数据库对象(一般连表使用)
    select_field            读取字段(默认 *)
    page_tips_handle        自定义分页提示信息处理(服务层::方法)
    data_handle             自定义数据处理(服务层::方法)
    pages_params            分页组件额外参数
    data_params             数据外参数
    order_by                排序规则(默认 id desc)
    group                   分组去重(用于查询GROUP)
    distinct                去重(一般用于count获取总数使用)
    is_page                 是否使用分页功能(默认使用、0否、1是)

    # v2.3.1新增 开始
    # 是否处理时间字段
    is_handle_time_field    是否处理时间字段数据
    handle_time_format      指定时间字段数据格式(可字符串表示全部、数组key=>val指定字段)

    # 是否处理静态数据名称字段
    is_fixed_name_field     是否处理固定名称字段数据
    fixed_name_data         指定固定字段数据定义的数据和字段
        data        数据列表
        field       指定赋值字段(默认字段+_name、如:status_name)
        key         如果数据是二维、则读取名称(默认 name)

    # 是否处理附件字段
    is_handle_annex_field   是否处理附件字段
    handle_annex_fields     指定附件字段、默认(icon、images、images_url、video、video_url)

    data_merge              合并数据(数组)
    # v2.3.1新增 结束

    # v2.3.2新增 开始
    # 分页统计数据
    is_page_stats           是否分页统计数据(默认使用、0否、1是)
    page_stats_data         二维数组指定字段、名称、类型([['name'=>'总价', 'unit'=>'元']])
        name    显示名称
        field   数据字段、默认(id)
        fun     统计方法(常用 sum 总合(默认)、count 总数)
        unit    单位
    # v2.3.2新增 结束

    # v6.0.0新增 开始
    # 是否处理用户信息
    is_handle_user_field    是否处理用户字段数据
    handle_user_data        指定处理用户字段数据定义的字段(二维数组)
       key          数据key(未指定则默认 user_id)
       field        指定赋值字段(未指定则默认 user, 已指定key但未指定field则去除后面的_id作为field、不为_id结尾则使用key追加_user)

    # json数据处理
    is_json_data_handle     是否处理json数据(默认使用、0否、1是)
    json_config_data        二维数组 field => ['type'=>'annex', 'key'=>'url']
        field               定义数据字段名称(如果只是处理json数据解析则值为空即可 field => [])
            type            类型(annex 附件包含文件图片, 暂无更多类型)
            key             数据为二维数组、二级字段名称

    # 换行数据转为数组
    is_ln_to_array_handle   是否处理换行数据转为数组
    ln_to_array_fields      换行数据转为数组的字段(数组 ['field1', 'field2'])
    # v6.0.0新增 结束


206 人点赞过