swissup/module-tippyjs

高度可定制的纯JS tooltip/popover 库,适用于 Magento 2

安装数: 195,459

依赖关系: 1

建议者: 0

安全: 0

星标: 3

关注者: 8

分支: 0

开放问题: 0

语言:JavaScript

类型:magento2-module

6.0.1 2021-06-02 12:41 UTC

This package is auto-updated.

Last update: 2024-08-29 04:14:47 UTC


README

Tippyjs - 是一个将 Tippy 库 集成到 Magento 的 Magento 2 模块。

安装

composer require swissup/module-tippyjs
bin/magento setup:upgrade

使用方法

基本示例

require(['tippy'], function (tippy) {
    // Tippify all titled elements
    tippy('[title]');
});

查看所有可用选项,请访问官方网站: https://atomiks.github.io/tippyjs/v6/all-props/

高级示例(适用于动态添加的元素)

require([
    'Magento_Ui/js/lib/view/utils/async',
    'tippy'
], function ($, tippy) {
    $.async('[title]', function (el) {
        tippy(el);
    });
});