share.js icon indicating copy to clipboard operation
share.js copied to clipboard

两个div的问题

Open hustcc opened this issue 9 years ago • 9 comments

两个share.js的div,如下:

<p class="social-share" data-sites="">
    <a href="javascript:;" class="social-share-icon icon-heart"></a> 123
</p>

<div class="social-share">
    <a href="javascript:;" class="social-share-icon icon-heart"></a>
</div>

第一个div用来做喜欢操作,不做分享,第二个div,用来做分享,结果div中的配置信息串了。实际效果为第一个div显示正常,第二个div理论上应该显示所有的share按钮,实际只显示的heart,第二个div的配置和第一个串了。

hustcc avatar May 02 '16 04:05 hustcc

@hustcc 线上还是线下,我觉得可能不是串了,只是css的原因你看起来串了。所以如果有线上麻烦提供一下URL

overtrue avatar May 02 '16 04:05 overtrue

不是线上,本地开发的环境。简化了一下,你看看。

<!doctype html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta name="robots" content="index, follow">
        <meta name="theme-color" content="#f4f5f6">
        <meta name="apple-mobile-web-app-status-bar-style" content="#f4f5f6">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta name="description" content="">
        <link rel="stylesheet" href="res/css/share.min.css">
    </head>
    <body>
        <main class="wrapper">
            <section class="container" id="random_bq">
                <div class="row">
                    <div class="column">
                        <p class="social-share" data-sites="">
                            <a href="javascript:;" class="social-share-icon icon-heart"></a> 123
                        </p>
                        <div class="social-share">
                            <a href="javascript:;" class="social-share-icon icon-heart"></a>
                        </div>
                    </div>
                </div>
            </section>
        </main>
        <script src="res/js/social-share.min.js"></script>
    </body>
</html>

浏览器显示如下:

image

hustcc avatar May 02 '16 06:05 hustcc

另外,console报Javascript错: image

hustcc avatar May 02 '16 09:05 hustcc

@hustcc 请升级到 1.0.13

overtrue avatar May 02 '16 11:05 overtrue

ok,修复很快…赞👍🏻

hustcc avatar May 02 '16 12:05 hustcc

@hustcc 😄

overtrue avatar May 02 '16 12:05 overtrue

我是用的无jq版本,好像并没有看到提交~只看到jq版本的提交。

hustcc avatar May 02 '16 12:05 hustcc

@hustcc 好吧。

overtrue avatar May 02 '16 13:05 overtrue

想偷懒~~~

hustcc avatar May 02 '16 13:05 hustcc