https://github.com/quansitech/qscmf-builderitem-radio-text
radio+自定义文本组件
https://github.com/quansitech/qscmf-builderitem-radio-text
Last synced: 10 months ago
JSON representation
radio+自定义文本组件
- Host: GitHub
- URL: https://github.com/quansitech/qscmf-builderitem-radio-text
- Owner: quansitech
- License: mit
- Created: 2023-08-30T02:39:13.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T09:43:06.000Z (almost 3 years ago)
- Last Synced: 2025-07-14T01:26:56.582Z (11 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qscmf-builderitem-radio-text
radio-text builder组件
#### 效果截图
##### form_type

##### column_type

#### 安装
```php
composer require quansitech/qscmf-builderitem-radio-text
```
#### 如何使用
+ FormType
```php
// title: 选项标题
// key: 选现对应的键值
// need_text 是否需要填写额外的文本项
$option = [
[
'title' => '网站开发',
'key' => 1,
],
[
'title' => '公众号运维',
'key' => 2,
],
[
'title' => '其他',
'key' => 3,
'need_text' => true,
]
];
->addFormItem("main_business", "radio_text", "主营业务", "", $option)
//注意:组件会自动构造好json格式的数据提交,直接存入对应的数据库字段即可
```
+ ColumnType
```php
$option = [
[
'title' => '网站开发',
'key' => 1,
],
[
'title' => '公众号运维',
'key' => 2,
],
[
'title' => '其他',
'key' => 3,
'need_text' => true,
]
];
->addTableColumn("main_business", "主营业务", "radio_text", $option)
```