elbytes/nova-tooltip-field 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

elbytes/nova-tooltip-field

最新稳定版本:1.1

Composer 安装命令:

composer require elbytes/nova-tooltip-field

包简介

A tooltip field for Nova apps

README 文档

README

Latest Version on Packagist Total Downloads

With this tooltip field, you can hide some optional content.
On the index page, this field will work as a tooltip, on all other pages, it's just a text field.

Demo video

Installation

You can install the package in to a Laravel app that uses Nova via composer:

composer require elbytes/nova-tooltip-field

Usage

In your resource class, add the following to your fields method:

use Elbytes\NovaTooltipField\Tooltip;

....

Tooltip::make('Type', 'type'), 

// OR

Tooltip::make('Type', 'type')
       ->setDefaultIcon('<svg width="18" height="18">...</svg>') // Optional
       ->setDependIcons([
           'fieldValue' => '<svg width="18" height="18">...</svg>',
           'fieldValue2' => '<svg width="18" height="18">...</svg>',
       ]), // Optional

Using with your own icon

To change the default icon, you need to use the setDefaultIcon method.

use Elbytes\NovaTooltipField\Tooltip;

....

Tooltip::make('Type', 'type')
    ->setDefaultIcon('<svg class="h-5 w-5">...</svg>')

Value-dependent icons

Sometimes the icon has to change depending on the value of the field, you can use the setDependIcons method for this.

use Elbytes\NovaTooltipField\Tooltip;

....

Tooltip::make('Type', 'type')
       ->setDependIcons([
           'fieldValue' => '<svg class="h-5 w-5">...</svg>',
           'fieldValue2' => '<svg class="h-5 w-5">...</svg>',
       ]),

Contribution

All contributions, big or small, are welcome!

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 3
  • 开发语言: Vue

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-03-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固