承接 skoyah/nova-toasted 相关项目开发

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

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

skoyah/nova-toasted

最新稳定版本:v0.1

Composer 安装命令:

composer require skoyah/nova-toasted

包简介

Customize and create your Laravel Nova notifications.

README 文档

README

Latest Stable Version License

A package to customize your Laravel Nova toasted notifications.

Instalation

composer require skoyah/nova-toasted
php artisan vendor:publish --tag=nova-toasted

After publishing the assets, in your config folder there's now a toasted.php file with the default options used by Nova and the Toasted plugin itself. Feel free to change them according to your needs. For more information about this values, check the toasted documentation

The toasts key is where you will register all custom toasted components for your application:

    'toasts' => [
        [
            'name' => 'forbidden',
            'message' => 'Sorry! You are not authorized.',
            'options' => [
                'type' => 'error',
                'duration' => 2000,
            ],
        ],
    ],

Usage

After registering the components, you are able to use them globally, with one of the following forms:

this.$toasted.forbidden(); //inside vue components

Nova.bus.$toasted.forbidden(); //globally available

Additionaly, you can still use custom messages and options for a particullar situation:

this.$toasted.forbidden('Access denied.', { duration: 5000 });

Styling

To style your custom theme and toasted components and to override the default ones, in you css file:

/* styling your custom theme */
.my-custom-theme {
  //...
}

/* use this classes override default components */
.toasted.default {
  //...
}

.toasted.success {
  //...
}

.toasted.error {
  //...
}

.toasted.info {
  //...
}

.toasted.warning {
  //...
}

/* custom components */
.toasted.forbidden {
  //...
}

Example

.my-theme {
  padding: 20px !important;
  color: white;
}

.toasted.forbidden {
  background-color: blueviolet;
}

Example

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-04-07