PHPackages                             thefunpower/element - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. thefunpower/element

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

thefunpower/element
===================

vue element table form

v2.0.30(1y ago)089Apache-2.0PHP

Since Apr 18Pushed 1y agoCompare

[ Source](https://github.com/thefunpower/element)[ Packagist](https://packagist.org/packages/thefunpower/element)[ RSS](/packages/thefunpower-element/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)DependenciesVersions (31)Used By (0)

vue element
===========

[](#vue-element)

安装
==

[](#安装)

在composer.json中添加

```
composer require thefunpower/element

```

使用
==

[](#使用)

搜索

```

```

其中`data`为`list`,将自动触发 `load_filter_list()`

表格

```

```

点击表格展开后显示表格或HTML

```

```

其中`tpl`也支持直接写`type`

```
"tpl"=>[
    //'type'=>'html', //此行可以没有
    "html"=>"
        {{scope.row.product_num}}
    "
]

```

分页

```

```

指定为vue变量

```

```

vue3

```
\element\table::$scope = '#default';

```

表单

```
element\form::$model = 'form';
echo element('form',[
    ['type'=>'open','model'=>'form','label-width'=>'180px'],
    [
        'type'=>'input','name'=>'title','label'=>'标题',
        'attr'=>['required'],
        'attr_element'=>['placeholder'=>'演示标题'],
    ],
    ['type'=>'close']
]);

```

```
