* [task#135805 doing 0.3h 2h] import JS file for the thinkbcg widget.
This commit is contained in:
@@ -10,6 +10,11 @@ requireWg('thinkModel');
|
||||
*/
|
||||
class thinkBcg extends thinkModel
|
||||
{
|
||||
public static function getPageJS(): ?string
|
||||
{
|
||||
return file_get_contents(__DIR__ . DS . 'js' . DS . 'v1.js');
|
||||
}
|
||||
|
||||
protected function buildEcharts(): node
|
||||
{
|
||||
$blocks = $this->prop('blocks');
|
||||
@@ -73,6 +78,12 @@ class thinkBcg extends thinkModel
|
||||
|
||||
protected function build(): node
|
||||
{
|
||||
return div(setClass('model-appeals my-1 flex col flex-wrap justify-between'), $this->buildBody());
|
||||
$mode = $this->prop('mode');
|
||||
return div
|
||||
(
|
||||
setClass('model-bcg my-1 flex col flex-wrap justify-between'),
|
||||
$this->buildBody(),
|
||||
$mode == 'view' ? on::init()->call('initBcgModel') : null
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user