小编Ben*_*Ben的帖子

接下来JS除了将图片放在public文件夹中之外,如何动态导入图片?

我正在制作一个教科书网站,其中作者每个人都贡献一个教科书文件夹,其中包含一个 markdown 文件夹和一个图像文件夹:

\n
textbooks\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80textbook-1\n\xe2\x94\x82   \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80images\n\xe2\x94\x82   \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80markdown-files\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80textbook-2\n    \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80images\n    \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80markdown-files\n
Run Code Online (Sandbox Code Playgroud)\n

我将教科书文件夹存储在项目根文件夹中,并使用 \'fs\' 在构建时读取文件。到目前为止,我必须手动将图像文件夹放入公共文件夹中,以便在 Markdown 页面中使用它们。有没有办法动态导入这些图像文件而不将它们放入公共文件夹中?

\n

我正在使用 ReactMarkdown 来渲染 markdown,我正在考虑类似的事情:

\n
textbooks\n\xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80textbook-1\n\xe2\x94\x82   \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80images\n\xe2\x94\x82   \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80markdown-files\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80textbook-2\n    \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80images\n    \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80markdown-files\n
Run Code Online (Sandbox Code Playgroud)\n

但它不起作用......

\n

javascript markdown node.js next.js

10
推荐指数
1
解决办法
4889
查看次数

如何使重置密码 url 动态化?

<?php

namespace Illuminate\Auth\Notifications;

use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Support\Facades\Lang;

class ResetPassword extends Notification
{
    /**
     * The password reset token.
     *
     * @var string
     */
    public $token;

    /**
     * The callback that should be used to create the reset password URL.
     *
     * @var \Closure|null
     */
    public static $createUrlCallback;

    /**
     * The callback that should be used to build the mail message.
     *
     * @var \Closure|null
     */
    public static $toMailCallback;

    /**
     * Create a notification instance.
     *
     * @param  string …
Run Code Online (Sandbox Code Playgroud)

authentication laravel

7
推荐指数
3
解决办法
2403
查看次数