* zin: refactor dtable with zui

This commit is contained in:
Hao Sun
2023-02-17 15:36:45 +08:00
parent 4340704e6f
commit ecabeac970
+1 -12
View File
@@ -4,19 +4,8 @@ namespace zin;
class dtable extends wg
{
protected static $defineProps = 'data,height,plugins,responsive';
protected function build()
{
$id = $this->prop('id');
$options = json_encode($this->props->skip('id'));
return h::div(
setId($id),
h::js(<<<END
var options = $options;
console.log(options);
const dtable = new zui.DTable('#$id', options);
END)
);
return zui::dtable(inherit($this));
}
}