英文:
How to add quotes in Swal text without being replaced with "?
问题
const sc = {...swalConfig.confirm};
sc.text = "{{ __('将记录从表格 \"USERS\" 复制到表格 \"ROLES\",不进行任何额外操作。') }}";
我有这段代码。但在浏览器中渲染时,\"显示为"。有什么办法可以避免这种情况?
英文:
const sc = {...swalConfig.confirm};
sc.text = "{{ __('Taking the records from the table \"USERS\" to the "ROLES" table, without any additional action.') }}";
I have this code. But when rendered in browser the \" is shown as ". Any idea how to avoid this?
答案1
得分: 1
var text = {!! __('从表格 "USERS" 拿记录到 "ROLES" 表,不需要任何额外操作。') !!}
;
console.log(text);
英文:
You should embed it as html. Try this:
var text = `{!! __('Taking the records from the table \"USERS\" to the \"ROLES\" table, without any additional action.') !!}`;
console.log(text);
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论