'1', 'falseValue' => '0' ]; /** * @var array */ protected static $propsRule = [ 'size' => 'string', 'disabled' => 'boolean', 'trueValue' => 'string', 'falseValue' => 'string' ]; /** * 自定义显示打开时的内容 * * @param $open * @return $this */ public function openStr($open) { $this->slot['open'] = (string)$open; return $this; } /** * 自定义显示关闭时的内容 * * @param $close * @return $this */ public function closeStr($close) { $this->slot['close'] = (string)$close; return $this; } public function getValidateHandler() { return Validate::str(); } /** * @return array */ public function build() { return [ 'type' => $this->name, 'field' => $this->field, 'title' => $this->title, 'value' => $this->value, 'props' => (object)$this->props, 'slot' => (object)$this->slot, 'validate' => $this->validate, 'col' => $this->col ]; } }