fix: 修复内置表单switch错误
This commit is contained in:
@@ -396,9 +396,15 @@ class FormBuilder
|
|||||||
{
|
{
|
||||||
$value = $this->formtype ? 'value="{$data.' . $data['name'] . '}"' : '';
|
$value = $this->formtype ? 'value="{$data.' . $data['name'] . '}"' : '';
|
||||||
$param = '$data.' . $data['name'];
|
$param = '$data.' . $data['name'];
|
||||||
|
if ($this->formtype) {
|
||||||
|
return <<<Eof
|
||||||
|
<input type="hidden" type="checkbox" name="{$data['name']}" value="0" />
|
||||||
|
<input type="checkbox" name="{$data['name']}" value="$value" <eq name="{$param}" value="1" > checked </eq> lay-skin="switch" />
|
||||||
|
Eof;
|
||||||
|
}
|
||||||
return <<<Eof
|
return <<<Eof
|
||||||
<input type="hidden" type="checkbox" name="{$data['name']}" value="0" />
|
<input type="hidden" type="checkbox" name="{$data['name']}" value="0" />
|
||||||
<input type="checkbox" name="{$data['name']}" value="1" <eq name="{$param}" value="1" > checked </eq> lay-skin="switch" />
|
<input type="checkbox" name="{$data['name']}" value="1" lay-skin="switch" />
|
||||||
Eof;
|
Eof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user