【问题标题】:Inertia.JS Render View To StringInertia.JS 将视图渲染为字符串
【发布时间】:2022-01-14 11:04:29
【问题描述】:

我有一个 laravel jetstream 应用程序,我想将 vue 视图渲染成一个 html 字符串,然后我将在其他地方处理。

我想要

$htmlStr = Inertia::render('Claims/Show', ['claim' => $claim,  'permissions' => $permissions]);

有没有办法将惯性模板呈现为字符串?

【问题讨论】:

    标签: php laravel vue.js inertiajs


    【解决方案1】:

    不,不可能。它呈现无法转换为 html 字符串的视图响应。

    【讨论】:

    • 你觉得有什么办法吗?像一种让 php/laravel 将 vue 模板渲染成 html 字符串的方法吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-24
    • 2015-11-01
    • 1970-01-01
    • 1970-01-01
    • 2019-08-08
    相关资源
    最近更新 更多