## 组件基本配置项
组件类似模板,但是比模板更加灵活易用
>基础配置项
| 参数 | 默认值 | 说明 |
| --- | --- | --- |
| template_path | template | 全部组件存放目录 |
| model | default | 单个组件存放具体目录 |
>使用组件
实例化一个组件:
~~~
$component = new Conpment(array $config = []);
~~~
参数`$config`参考基础配置项
例子:
~~~
$component = new Conpment([
'template_path' => 'template',
'model' => 'default'
]);
~~~