承接 webcito/bs-toast 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webcito/bs-toast

Composer 安装命令:

composer require webcito/bs-toast

包简介

description

README 文档

README

1. Installation

You can include bs-toast.js in your project using Composer or by manually downloading the script file.

Composer

Use the following command to install via composer:

composer require bs-toast:dev-main

Manual Installation

To manually install the script, download bs-toast.js and include it in your project's JavaScript files.

2. Options

bsToast file has a number of options you can customize. The options for the toast feature include:

  • type: The type of the toast. It could be one of 'info', 'warning', 'success', 'danger'. The default value is 'info'.
  • title: The title of the toast. By default, it's null.
  • message: The message of the toast. The default message is 'Always be informed'.
  • start: The starting time of the toast, it is 0 by default.
  • delay: Delay before the toast disappears, 5000ms as default.
  • autoHide: A boolean indicating whether to hide the toast automatically. It's by default set to true.
  • animation: A boolean indicating whether the toast should be animated or not, also set to true by default.
  • placement: The placement of the toast. The possible values are 'top-start' or 'ts', 'top-center' or 'tc', 'top-end' or 'te', 'middle-start' or 'ms', 'middle-center' or 'mc', 'middle-end' or 'me', 'bottom-start' or 'bs', 'bottom-center' or 'bc', 'bottom-end' or 'be'. By default, it's 'bottom-end'.

3. Events

The script triggers various events that allow your application to react to the different states of the toast lifecycle:

  • onShow: This event is fired when the toast starts showing.
  • onShown: Firing after the toast has been shown.
  • onHide: This event is fired when the toast starts hiding.
  • onHidden: Firing after the toast has been hidden.

4. Methods

const myToast = $.bsToast({
    ...
}); // The plugin returns the toast

myToast.isExists() // bool
// The bootstrap methods
myToast.hide()
myToast.isShown() // bool

const allToast = $.bsToast.getToasts();
// Close all opened toasts
$.bsToast.closeAll();

5. Example

Here is an example of how to use the bsToast.:

$(document).ready(function() {
    const myToast = $.bsToast({
        type: 'info',
        title: 'Hello, User',
        message: 'This toast is a toast example.',
        autoHide: false,
        placement: 'tc',
        onShow: function() {
            // Write your code here for the onShow event.
        },
        onShown: function() {
            // Write your code here for the onShown event.
        },
        onHide: function() {
            // Write your code here for the onHide event.
        },
        onHidden: function() {
            // Write your code here for the onHidden event.
        },
    });
});

5. Further Information

For further information or to address additional queries, please feel free to open an issue in the repository or contact the maintainers.

webcito/bs-toast 适用场景与选型建议

webcito/bs-toast 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 62 次下载、GitHub Stars 达 1, 最近一次更新时间为 2024 年 10 月 31 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 webcito/bs-toast 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 webcito/bs-toast 我们能提供哪些服务?
定制开发 / 二次开发

基于 webcito/bs-toast 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 62
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: HTML

其他信息

  • 授权协议: proprietary
  • 更新时间: 2024-10-31