如何解决Laravel Yoeunes / toastr得到白色背景和白色文本
我正在使用laravel7。在这里,我使用了yoeunes / toastr(https://packagist.org/packages/yoeunes/toastr)。但是烤面包机的背景颜色和文本颜色是白色。还尝试了其他烤面包机。发生同样的事情。当我删除所有布局文件(js,jquery,css链接头文件)时,toastr可以正常工作。但是对于布局文件,toastr无法正常工作。
我将代码用作文档
解决方法
在布局文件(js,jquery,css链接的头文件)之后使用@toastr_css 。 扩展布局后,在这样的部分中使用@toastr_css
// First check if there is data saved in localStorage
var retrievedData = localStorage.getItem("localStorageMyData");
// ...and if there is data execute them
if (retrievedData) {
var myValue = JSON.parse(retrievedData);
var id1 = myValue.id1;
var id2 = myValue.id2;
document.getElementById('id1').setAttribute('style',id1);
document.getElementById('id2').setAttribute('style',id2);
}
function toggleTable() {
if (document.getElementById('id1').style.display == 'none') {
document.getElementById('id2').style.display = 'none';
document.getElementById('id1').style.display = 'block';
} else {
document.getElementById('id1').style.display = 'none';
document.getElementById('id2').style.display = 'block';
}
// The information is saved in localStorage with each click
var id1 = document.getElementById('id1').getAttribute("style");
var id2 = document.getElementById('id2').getAttribute("style");
var myValue = ({ id1: id1,id2: id2 });
localStorage.setItem("localStorageMyData",JSON.stringify(myValue));
}
那么它不会影响您的布局文件
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。