romegadigital / ie11compatibility
为 Laravel Nova 添加 IE11 支持。
Requires
- php: >=7.1.0
This package is auto-updated.
Last update: 2024-09-06 11:38:19 UTC
README
为 Laravel Nova 添加 IE11 支持。基于 Nova 2.8.0 的最新 CSS 构建。
安装
composer require romegadigital/ie11compatibility
以下命令将覆盖 Nova 发布的 user.blade.php
并使用兼容 IE11 的版本。对 user.blade.php
的任何自定义设置都将丢失
php artisan vendor:publish --tag=nova-ie11-views --force
以下命令将覆盖 Nova 发布的 /public/vendor/nova/app.css
并使用兼容 IE11 的版本。
php artisan vendor:publish --tag=nova-ie11-styles --force
概述
默认情况下,使用 IE11 登录 Laravel Nova 后将显示错误消息。错误消息可能如下所示
Unhandled promise rejection TypeError: Unable to get property 'start' of undefined or null reference
或
Unhandled promise rejection TypeError: Unable to get property 'finish' of undefined or null reference
或
Unhandled promise rejection ReferenceError: 'Promise' is undefined
错误是由于 IE 无法像 Babel 那样处理解构,因此不能直接包含到您的 blade 模板中。
发布的新 Nova 部分默认包含解构需求。
此外,IE11 没有处理承诺的能力。
此包为您提供的 user.blade.php
元素提供了针对解构限制的解决方案,并为承诺提供了 polyfill。
此外,还包括了一些常见的 Tailwind CSS 样式。这仍然是 WIP,如果有人能帮助使其更加完善,将非常欢迎。
扩展
resources/views/vendor/nova/partials/user.blade.php
可以更新为所需的任何内容。