reg2005 / oc-range
october CMS 的组件范围
1.0.4
2016-07-24 05:09 UTC
This package is not auto-updated.
Last update: 2024-09-20 18:08:22 UTC
README
如何使用
1. 只需将其添加到您的插件或项目的 composer.json 文件中
{ "require": { "reg2005/oc-range": "1.0.*" } }
2. 前往您的 october 项目目录,使用终端,并运行以下命令
composer update
3. 在 Plugin.php 中添加以下内容
public function registerFormWidgets() { return [ 'reg2005\Widgets\Range\Widget' => [ 'label' => 'range', 'code' => 'range' ] ]; }
在 fields.yaml 中添加类似以下内容
money: customLabel: Price type: range default: 300 minMax: min: - 50 10%: - 500 - 1000 20%: - 1500 - 2000 50%: - 4000 - 6000 60%: - 6000 - 10000 max: - 10000 span: full
或者
money: customLabel: Price type: range default: 300 minMax: min: 50 max: 1000 span: full