当尝试在 laravel VITE 中导入 jquery 时出现错误,jquery 似乎已加载到我编译的 javascript 中:
Uncaught TypeError: window.$ is not a function
at dashboard:1823:12
(anonimo) @ dashboard:1823
[Violation]Forced reflow while executing JavaScript took 72ms
dashboard:101
Uncaught Error: Bootstrap's JavaScript requires jQuery
at app.0bbf2228.js:50:31
Run Code Online (Sandbox Code Playgroud)
App.js 是:
import vue from "vue";
window.Vue = vue;
import jQuery from 'jquery'
window.$ = jQuery;
import './bootstrap';
Run Code Online (Sandbox Code Playgroud) 我想在我的颤动通知中添加一个按钮。按钮已显示,但我无法捕捉到该操作。
AwesomeNotifications().createNotification(
content: NotificationContent(
id: 888,
channelKey: 'NetVideo',
title: 'NetVideo',
body: 'Server in ascolto'),
actionButtons: <NotificationActionButton>[
NotificationActionButton(key: 'yes', label: 'Yes'),
],
);
Run Code Online (Sandbox Code Playgroud)
AwesomeNotifications().actionStream 仍然存在吗?