应用插件 版主:官方插件技术组
全局表单,后台显示在读取数据时,字段如何统一加上空
类型:迅睿CMS 更新时间:2022-07-23 15:30:10 全局表单
插件 全局表单 V2.3
应用作者 迅睿官方团队
发布时间 2021-03-24 10:37:32
更新时间 2024-01-14 17:07:49

全局表单,在后台读取数据时,kssfzh 字段 如果在值最后统一加上空格?




1



mytable.html


 // 按自定义字段显示

    {loop $list_field $i $tt}

    field_columns.push({

        // field: '{$i}',

        field: '{if $i=="kssfzh"}kssfzh{else}{$i}{/if}',

        title: '{dr_lang($tt.name)}',

        align: '{if $tt.center}center{else}left{/if}',

        switchable: true,

        sortable: true,

        {if $tt.width}width: '{$tt.width}px',{/if}

        visible: true

    });

    {/list}


/App/Form/Control/Admin/Form.php


// 后台查看表单列表

    protected function _Admin_List() {


        $this->is_ajax_list = true;

        list($tpl) = $this->_List();


        $this->mytable = [

            'foot_tpl' => '',

            'link_tpl' => '',

            'link_var' => 'html = html.replace(/\{id\}/g, row.id);

            html = html.replace(/\{cid\}/g, row.id);

            html = html.replace(/\{fid\}/g, "'.\Phpcmf\Service::L('Router')->class.'");',

        ];

        

        $uriprefix = APP_DIR.'/'.\Phpcmf\Service::L('Router')->class;

     


应用版权:官方
应用名称:全局表单

插件教程:https://www.xunruicms.com/doc/app-710.html