The local web page is introduced using iframe relative path in VUE, and the error is reported after packaging.

introduce local pages directly using iframe in vue:
< template >

<div>
    <iframe src="../../../static/yuanhoutaiyemian/admin/dk/html/LoanPlatformConfig.html" frameborder="0" width="100%" height="100%"></iframe>
</div>

< / template >
the local file is in the static file. If the local service is not packaged, there will be no problem when the service is run. The page inside the iframe on the server will report an error if it is packaged. It feels like a path problem. It is an attempt to change the src inside the iframe before packaging or add a folder outside to copy the local file to the path folder of the src structure. No, no, no. useless.

Nov.19,2021

<iframe src="/static/yuanhoutaiyemian/admin/dk/html/LoanPlatformConfig.html" frameborder="0" width="100%" height="100%"></iframe>
</div>

/ static/xxx/xxx/xxx.html are you sure you can access it normally after it is introduced into packaging? Why is mine still 404?


have you finally solved the problem? I can't use the absolute path

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3dcc7-2c3cc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3dcc7-2c3cc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?