getParam('value', 1, '0'); // 根据 format 调整渲染逻辑 $props = ['value' => $value]; $output = []; switch ($this->options['format']) { case 'react': $output = [ 'props' => base64_encode(\json_encode($props)), 'html' => '', 'tag' => 'span', 'tpl' => 'cf', ]; break; case 'unity': $output = [ 'props' => base64_encode(\json_encode($props)), 'tpl' => 'cf', ]; break; case 'markdown': $output = ["`$value`"]; break; case 'html': $output = ["{$value}"]; break; default: $output = [$value]; break; } return $output; } }