src/Leevel/View/Compiler.php
public function ifJsCompiler(array &$theme): void
    {
        $this->checkNode($theme, true);
        $attr = $this->getNodeAttribute($theme);

        $attr = $this->parseExpression(implode(' ', $attr));

        $theme['content'] = $this->withPhpTag("if ({$attr}):");
        $theme['content'] .= $this->getNodeBody($theme);
        $theme['content'] .= $this->withPhpTag('endif;');
    }
public function ifJsCompiler(array &$theme): void
    {
        $this->checkNode($theme, true);
        $attr = $this->getNodeAttribute($theme);

        $attr = $this->parseExpression(implode(' ', $attr));

        $theme['content'] = $this->withPhpTag("if ({$attr}):");
        $theme['content'] .= $this->getNodeBody($theme);
        $theme['content'] .= $this->withPhpTag('endif;');
    }
if 编译器.

@param array $theme