我有这个:
data.data.message = 'User created';
app.successMsg = data.data.message + '...Redirecting';
我想在...Redirecting
之前添加一行。我已经尝试了\n
,\r
,但它们都无法正常工作。我也在这里阅读了一些文章,但他们都告诉他们使用\n
和\r
,但它并不适合我。我只是学习,请耐心等待。
----------------------------------------------- - - - - - - - - 编辑 - - - - - - - - - - - - - - - - - -----------------------------
当我使用'<br />.... Redirecting'
时会发生这种情况:
谢谢!
答案 0 :(得分:3)
您可以使用Failed building wheel for ecos
Running setup.py clean for ecos
Failed to build ecos
Installing collected packages: dill, multiprocess, ecos, cvxpy, fancyimpute
Found existing installation: dill 0.2.5
DEPRECATION: Uninstalling a distutils installed project (dill) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
Uninstalling dill-0.2.5:
Exception:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 538, in move
os.rename(src, real_dst)
PermissionError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\dill-0.2.5-py3.6.egg-info' -> 'C:\\Users\\Archit\\AppData\\Local\\Temp\\pip-hir5dush-uninstall\\programdata\\anaconda3\\lib\\site-packages\\dill-0.2.5-py3.6.egg-info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_set.py", line 778, in install
requirement.uninstall(auto_confirm=True)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_install.py", line 754, in uninstall
paths_to_remove.remove(auto_confirm)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\req\req_uninstall.py", line 115, in remove
renames(path, new_path)
File "C:\ProgramData\Anaconda3\lib\site-packages\pip\utils\__init__.py", line 267, in renames
shutil.move(old, new)
File "C:\ProgramData\Anaconda3\lib\shutil.py", line 553, in move
os.unlink(src)
PermissionError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\dill-0.2.5-py3.6.egg-info'
标记来获取新行。
除此之外,您可以使用任何块元素(例如div)将其显示到其他行。它实际上将它放在另一个元素中,并且块元素始终以新行呈现,因此数据将转到下一行。然后你也可以将CSS应用到它。
答案 1 :(得分:1)
如果您在浏览器中运行它,那么我的猜测是它呈现为HTML。 HTML忽略换行符,并将所有内容放在同一行。因此,您可以将上述文字放在<pre>
括号之间,或者在我们需要新行的地方回显<br />
。希望有所帮助。