- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在维护一个使用 Angular 7.0.7 和 Node 10.20.1 的应用程序。
我工作正常,我很久以前安装了 Sweetalert 并且插件工作正常。昨天我的电脑重新启动,当我运行时 ng serve
我收到这个错误
ERROR in node_modules/sweetalert2/sweetalert2.d.ts(277,39): error TS1005: ',' expected. node_modules/sweetalert2/sweetalert2.d.ts(277,68): error TS1011: An element access expression should take an argument. node_modules/sweetalert2/sweetalert2.d.ts(277,69): error TS1005: ';' expected. node_modules/sweetalert2/sweetalert2.d.ts(277,70): error TS1128: Declaration or statement expected. node_modules/sweetalert2/sweetalert2.d.ts(277,82): error TS1005: '(' expected.
{
"name": "frontend",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --proxy-config proxy.conf.json",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"test2": "ng test"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.0.4",
"@angular/cdk": "^7.3.0",
"@angular/common": "~7.0.0",
"@angular/compiler": "~7.0.0",
"@angular/core": "~7.0.0",
"@angular/forms": "~7.0.0",
"@angular/http": "~7.0.0",
"@angular/material": "^7.3.0",
"@angular/material-moment-adapter": "^9.2.3",
"@angular/platform-browser": "~7.0.0",
"@angular/platform-browser-dynamic": "~7.0.0",
"@angular/router": "~7.0.0",
"@fortawesome/fontawesome-free": "^5.13.0",
"@sweetalert2/theme-material-ui": "^3.1.4",
"bootstrap": "^4.2.1",
"core-js": "^2.5.4",
"devextreme": "^18.2.5",
"flagkit-web": "0.0.3",
"font-awesome": "^4.7.0",
"hammerjs": "^2.0.8",
"intro.js": "^2.9.3",
"ionicons": "^4.5.5",
"moment": "^2.25.3",
"ngx-bootstrap": "^5.5.0",
"ngx-toastr": "^10.0.4",
"pixeden-stroke-7-icon": "^1.2.3",
"rxjs": "~6.3.3",
"sweetalert2": "^9.14.0",
"xlsx": "^0.15.6",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.10.0",
"@angular/cli": "~7.0.5",
"@angular/compiler-cli": "~7.0.0",
"@angular/language-service": "~7.0.0",
"@types/intro.js": "^2.4.6",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"pe7-icon": "^1.0.4",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.1.6"
}
}
npm install
删除并安装所有 node_modules , 不起作用 npm uninstall sweetalert2 && npm install sweetalert2
重新安装了 Sweetalert , 不起作用 npm audit fix
, 我收到了很多关于应用程序的问题,没有用 /**
* Provide an array of SweetAlert2 parameters to show multiple popups, one popup after another.
*
* @param steps The steps' configuration.
*/
function queue<T>(steps: readonly (SweetAlertOptions | string)[]): Promise<T>;
最佳答案
您好,我也开始面临同样的问题。在此期间找到了一个修复程序,直到出现更好的解决方案。我只是将其降级。检查它是否适合您。
npm 安装 sweetalert2@v9.11.0
关于angular - Sweetalert 没有运行,我的 TS 文件出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62136974/
我可以将 inputType 设置为密码。支持哪些其他输入类型? swal({ title: "Are you sure?",
我正在链接到这个 SweetAlert 库 https://unpkg.com/sweetalert/dist/sweetalert.min.js,当我在移动设备上显示警报时,它显示得非常小。我增加了
这可能是 ServiceNow 问题,但我添加了一个 Sweet Alert 来显示一个选择框,这样我就可以收集一个值以传递给下一条记录......但选择框没有显示,弹出窗口只是没有框或选项。我错过了
在 sweet alert 2 中,如何在输入中加载设置值我的甜蜜警报代码 swal({ title: 'Are you sure?', tex
我想替换 javascript confirm with sweetalert,在下面的代码片段中,但是我发现了两个限制,1) sweetalert 不会像 confirm 那样暂停执行,2) swe
我想问一下如何用图片更改sweetalert中的icon图片? 我尝试用 assets 中的图像更改 Swal.fire 中的 icon 图像,但它不起作用 这是脚本 Swal.fire({
我正在使用 sweetAlert 进行对话框显示。在我的对话框中,我必须显示一个大字符串,中间有换行符。我的示例字符串如下: var str="Task1Name : Succ
我正在使用 Sweet Alert,当从 Sweet Alert 调用错误函数时,出现以下错误。当 php 文件的操作成功时,它就可以正常工作。如何解决这个问题呢?非常感谢 SweetAlert: M
我正在使用 SweetAlert,它在我的页面中使用此按钮运行良好: Title 但是我希望当有人进入页面时弹出该消息,而无需按按钮。 我必须做什么? 谢谢 最佳答案 window.onload
我知道以前有人问过这个问题,但我似乎找不到答案,我想询问 sweetalert 在 sweetalert 包含服务中的组件中不起作用用于删除数据。 组件 Swal({ title: 'Are
我正在使用 sweetalert 显示数据列表(大数据),然后允许用户从数据列表中进行选择。 sweetalert 的 HTML 是由后端生成的,但当我尝试打开此列表时,需要 10-15 秒的时间。
使用 SweetAlert 时,我在使用单引号时遇到问题,例如下面的代码有效 function test() { Swal.fire({ title: 'Are you sure?', te
您好,我正在使用 Sweet Alert 从我的网站中删除产品我想使用它有两个选项第一个是“确定”,第二个是“取消” 但是当我点击页面上的任何位置时,它会删除并且取消按钮不起作用 这是我的代码 $(
我有这个函数可以在用户按下删除然后再次按下确定后重置游戏。 function confirmReset() { swal({ title: "Are you sure yo
我目前正在使用 sweetalert2 从对话框中捕获用户的输入。我想在链接队列对话框中使用下拉菜单,但我似乎找不到在下拉列表中动态添加项目的方法。假设我想从 JSON 格式检索数据并将其放入下拉列表
我在 html 中使用以下代码 在该函数中,我检查错误并在发现错误时发出警报: function SveFrm(){ .... if (err > 0){ swal({ t
我正在使用 SweetAlert2,并且有一个选择列表。我的挑战是选择列表中的值是以编程方式添加的。当我的代码运行时,下拉列表具有正确的 NUMBER 个值,文本显示 [object Object]
我希望当用户尝试提交空表单时警报不会消失,相反它应该在同一警报中显示一些错误。我尝试执行 swal.showInputError("some error") 但它给出了一个错误它不是 有效的功能。我试
我正在使用 SweetAlert 的版本 1: https://github.com/errakeshpd/sweetalert-1 我的示例 ajax 代码如下,我保存用户数据的地方。 $.ajax
我正在使用 swal ( http://t4t5.github.io/sweetalert ) 在用户点击某些内容时从他们那里获取一些数据。然后我想从调用 swal 的函数中返回它。换句话说,对于下面
我是一名优秀的程序员,十分优秀!