bindview-component 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,257 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8"/>
5
+ <title>iconfont Demo</title>
6
+ <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
7
+ <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
8
+ <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
9
+ <link rel="stylesheet" href="demo.css">
10
+ <link rel="stylesheet" href="iconfont.css">
11
+ <script src="iconfont.js"></script>
12
+ <!-- jQuery -->
13
+ <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
14
+ <!-- 代码高亮 -->
15
+ <script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
16
+ <style>
17
+ .main .logo {
18
+ margin-top: 0;
19
+ height: auto;
20
+ }
21
+
22
+ .main .logo a {
23
+ display: flex;
24
+ align-items: center;
25
+ }
26
+
27
+ .main .logo .sub-title {
28
+ margin-left: 0.5em;
29
+ font-size: 22px;
30
+ color: #fff;
31
+ background: linear-gradient(-45deg, #3967FF, #B500FE);
32
+ -webkit-background-clip: text;
33
+ -webkit-text-fill-color: transparent;
34
+ }
35
+ </style>
36
+ </head>
37
+ <body>
38
+ <div class="main">
39
+ <h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">
40
+ <img width="200" src="https://img.alicdn.com/imgextra/i3/O1CN01Mn65HV1FfSEzR6DKv_!!6000000000514-55-tps-228-59.svg">
41
+
42
+ </a></h1>
43
+ <div class="nav-tabs">
44
+ <ul id="tabs" class="dib-box">
45
+ <li class="dib active"><span>Unicode</span></li>
46
+ <li class="dib"><span>Font class</span></li>
47
+ <li class="dib"><span>Symbol</span></li>
48
+ </ul>
49
+
50
+ <a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=5139297" target="_blank" class="nav-more">查看项目</a>
51
+
52
+ </div>
53
+ <div class="tab-container">
54
+ <div class="content unicode" style="display: block;">
55
+ <ul class="icon_lists dib-box">
56
+
57
+ <li class="dib">
58
+ <span class="icon iconfont">&#x10225;</span>
59
+ <div class="name">删除</div>
60
+ <div class="code-name">&amp;#x10225;</div>
61
+ </li>
62
+
63
+ <li class="dib">
64
+ <span class="icon iconfont">&#x10226;</span>
65
+ <div class="name">向后</div>
66
+ <div class="code-name">&amp;#x10226;</div>
67
+ </li>
68
+
69
+ <li class="dib">
70
+ <span class="icon iconfont">&#x10227;</span>
71
+ <div class="name">向前</div>
72
+ <div class="code-name">&amp;#x10227;</div>
73
+ </li>
74
+
75
+ </ul>
76
+ <div class="article markdown">
77
+ <h2 id="unicode-">Unicode 引用</h2>
78
+ <hr>
79
+
80
+ <p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
81
+ <ul>
82
+ <li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
83
+ <li>默认情况下不支持多色,直接添加多色图标会自动去色。</li>
84
+ </ul>
85
+ <blockquote>
86
+ <p>注意:新版 iconfont 支持两种方式引用多色图标:SVG symbol 引用方式和彩色字体图标模式。(使用彩色字体图标需要在「编辑项目」中开启「彩色」选项后并重新生成。)</p>
87
+ </blockquote>
88
+ <p>Unicode 使用步骤如下:</p>
89
+ <h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
90
+ <pre><code class="language-css"
91
+ >@font-face {
92
+ font-family: 'iconfont';
93
+ src: url('iconfont.woff2?t=1773497950088') format('woff2'),
94
+ url('iconfont.woff?t=1773497950088') format('woff'),
95
+ url('iconfont.ttf?t=1773497950088') format('truetype');
96
+ }
97
+ </code></pre>
98
+ <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
99
+ <pre><code class="language-css"
100
+ >.iconfont {
101
+ font-family: "iconfont" !important;
102
+ font-size: 16px;
103
+ font-style: normal;
104
+ -webkit-font-smoothing: antialiased;
105
+ -moz-osx-font-smoothing: grayscale;
106
+ }
107
+ </code></pre>
108
+ <h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
109
+ <pre>
110
+ <code class="language-html"
111
+ >&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
112
+ </code></pre>
113
+ <blockquote>
114
+ <p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
115
+ </blockquote>
116
+ </div>
117
+ </div>
118
+ <div class="content font-class">
119
+ <ul class="icon_lists dib-box">
120
+
121
+ <li class="dib">
122
+ <span class="icon iconfont icon-shanchu"></span>
123
+ <div class="name">
124
+ 删除
125
+ </div>
126
+ <div class="code-name">.icon-shanchu
127
+ </div>
128
+ </li>
129
+
130
+ <li class="dib">
131
+ <span class="icon iconfont icon-xianghou"></span>
132
+ <div class="name">
133
+ 向后
134
+ </div>
135
+ <div class="code-name">.icon-xianghou
136
+ </div>
137
+ </li>
138
+
139
+ <li class="dib">
140
+ <span class="icon iconfont icon-xiangqian"></span>
141
+ <div class="name">
142
+ 向前
143
+ </div>
144
+ <div class="code-name">.icon-xiangqian
145
+ </div>
146
+ </li>
147
+
148
+ </ul>
149
+ <div class="article markdown">
150
+ <h2 id="font-class-">font-class 引用</h2>
151
+ <hr>
152
+
153
+ <p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
154
+ <p>与 Unicode 使用方式相比,具有如下特点:</p>
155
+ <ul>
156
+ <li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
157
+ <li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
158
+ </ul>
159
+ <p>使用步骤如下:</p>
160
+ <h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
161
+ <pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
162
+ </code></pre>
163
+ <h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
164
+ <pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
165
+ </code></pre>
166
+ <blockquote>
167
+ <p>"
168
+ iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
169
+ </blockquote>
170
+ </div>
171
+ </div>
172
+ <div class="content symbol">
173
+ <ul class="icon_lists dib-box">
174
+
175
+ <li class="dib">
176
+ <svg class="icon svg-icon" aria-hidden="true">
177
+ <use xlink:href="#icon-shanchu"></use>
178
+ </svg>
179
+ <div class="name">删除</div>
180
+ <div class="code-name">#icon-shanchu</div>
181
+ </li>
182
+
183
+ <li class="dib">
184
+ <svg class="icon svg-icon" aria-hidden="true">
185
+ <use xlink:href="#icon-xianghou"></use>
186
+ </svg>
187
+ <div class="name">向后</div>
188
+ <div class="code-name">#icon-xianghou</div>
189
+ </li>
190
+
191
+ <li class="dib">
192
+ <svg class="icon svg-icon" aria-hidden="true">
193
+ <use xlink:href="#icon-xiangqian"></use>
194
+ </svg>
195
+ <div class="name">向前</div>
196
+ <div class="code-name">#icon-xiangqian</div>
197
+ </li>
198
+
199
+ </ul>
200
+ <div class="article markdown">
201
+ <h2 id="symbol-">Symbol 引用</h2>
202
+ <hr>
203
+
204
+ <p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
205
+ 这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
206
+ <ul>
207
+ <li>支持多色图标了,不再受单色限制。</li>
208
+ <li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
209
+ <li>兼容性较差,支持 IE9+,及现代浏览器。</li>
210
+ <li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
211
+ </ul>
212
+ <p>使用步骤如下:</p>
213
+ <h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
214
+ <pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
215
+ </code></pre>
216
+ <h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
217
+ <pre><code class="language-html">&lt;style&gt;
218
+ .icon {
219
+ width: 1em;
220
+ height: 1em;
221
+ vertical-align: -0.15em;
222
+ fill: currentColor;
223
+ overflow: hidden;
224
+ }
225
+ &lt;/style&gt;
226
+ </code></pre>
227
+ <h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
228
+ <pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
229
+ &lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
230
+ &lt;/svg&gt;
231
+ </code></pre>
232
+ </div>
233
+ </div>
234
+
235
+ </div>
236
+ </div>
237
+ <script>
238
+ $(document).ready(function () {
239
+ $('.tab-container .content:first').show()
240
+
241
+ $('#tabs li').click(function (e) {
242
+ var tabContent = $('.tab-container .content')
243
+ var index = $(this).index()
244
+
245
+ if ($(this).hasClass('active')) {
246
+ return
247
+ } else {
248
+ $('#tabs li').removeClass('active')
249
+ $(this).addClass('active')
250
+
251
+ tabContent.hide().eq(index).fadeIn()
252
+ }
253
+ })
254
+ })
255
+ </script>
256
+ </body>
257
+ </html>
@@ -0,0 +1,27 @@
1
+ @font-face {
2
+ font-family: "iconfont";
3
+ /* Project id 5139297 */
4
+ src: url('iconfont.woff2?t=1773497950088') format('woff2'),
5
+ url('iconfont.woff?t=1773497950088') format('woff'),
6
+ url('iconfont.ttf?t=1773497950088') format('truetype');
7
+ }
8
+
9
+ .iconfont {
10
+ font-family: "iconfont" !important;
11
+ font-size: 28px;
12
+ font-style: normal;
13
+ -webkit-font-smoothing: antialiased;
14
+ -moz-osx-font-smoothing: grayscale;
15
+ }
16
+
17
+ .icon-shanchu:before {
18
+ content: "\10225";
19
+ }
20
+
21
+ .icon-xianghou:before {
22
+ content: "\10226";
23
+ }
24
+
25
+ .icon-xiangqian:before {
26
+ content: "\10227";
27
+ }
@@ -0,0 +1 @@
1
+ window._iconfont_svg_string_5139297='<svg><symbol id="icon-shanchu" viewBox="0 0 1024 1024"><path d="M562.8416 512l326.2464-326.2464a35.84 35.84 0 0 0-50.688-50.688L512 461.312 185.9072 135.0656a35.84 35.84 0 0 0-50.688 50.688L461.4656 512l-326.2464 326.2464a35.84 35.84 0 0 0 50.688 50.688L512 562.688l326.2464 326.2464a35.84 35.84 0 0 0 50.688-50.688z" fill="#5A5E65" ></path></symbol><symbol id="icon-xianghou" viewBox="0 0 1024 1024"><path d="M356.7104 936.448a35.84 35.84 0 0 1-26.6752-59.8016l318.0032-353.9968a22.6816 22.6816 0 0 0 0-30.3104L330.0352 138.24a35.84 35.84 0 0 1 53.3504-47.872L701.44 444.4672a94.1568 94.1568 0 0 1 0 126.1056l-317.952 353.9968a35.84 35.84 0 0 1-26.7776 11.8784z" fill="#5A5E65" ></path></symbol><symbol id="icon-xiangqian" viewBox="0 0 1024 1024"><path d="M672.9216 936.448a35.84 35.84 0 0 1-26.6752-11.8784l-317.952-353.9968a94.1568 94.1568 0 0 1 0-126.1056l317.952-353.9968A35.84 35.84 0 0 1 699.5456 138.24l-317.952 354.0992a22.6816 22.6816 0 0 0 0 30.3104l317.952 353.9968a35.84 35.84 0 0 1-26.624 59.8016z" fill="#5A5E65" ></path></symbol></svg>',(n=>{var t=(e=(e=document.getElementsByTagName("script"))[e.length-1]).getAttribute("data-injectcss"),e=e.getAttribute("data-disable-injectsvg");if(!e){var i,o,a,l,d,s=function(t,e){e.parentNode.insertBefore(t,e)};if(t&&!n.__iconfont__svg__cssinject__){n.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(t){console&&console.log(t)}}i=function(){var t,e=document.createElement("div");e.innerHTML=n._iconfont_svg_string_5139297,(e=e.getElementsByTagName("svg")[0])&&(e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.width=0,e.style.height=0,e.style.overflow="hidden",e=e,(t=document.body).firstChild?s(e,t.firstChild):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),i()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(a=i,l=n.document,d=!1,r(),l.onreadystatechange=function(){"complete"==l.readyState&&(l.onreadystatechange=null,c())})}function c(){d||(d=!0,a())}function r(){try{l.documentElement.doScroll("left")}catch(t){return void setTimeout(r,50)}c()}})(window);
@@ -0,0 +1,30 @@
1
+ {
2
+ "id": "5139297",
3
+ "name": "tupian",
4
+ "font_family": "iconfont",
5
+ "css_prefix_text": "icon-",
6
+ "description": "",
7
+ "glyphs": [
8
+ {
9
+ "icon_id": "47042993",
10
+ "name": "删除",
11
+ "font_class": "shanchu",
12
+ "unicode": "10225",
13
+ "unicode_decimal": 66085
14
+ },
15
+ {
16
+ "icon_id": "47042994",
17
+ "name": "向后",
18
+ "font_class": "xianghou",
19
+ "unicode": "10226",
20
+ "unicode_decimal": 66086
21
+ },
22
+ {
23
+ "icon_id": "47043001",
24
+ "name": "向前",
25
+ "font_class": "xiangqian",
26
+ "unicode": "10227",
27
+ "unicode_decimal": 66087
28
+ }
29
+ ]
30
+ }
@@ -0,0 +1,73 @@
1
+ import s from "./index.less"
2
+ import React from "../../React";
3
+
4
+ import { propsType, createApp } from "bindview"
5
+
6
+ function View(props) {
7
+
8
+ // 属性校验,src 支持字符串或数组
9
+ const { src, index, func } = propsType(props, {
10
+ src: ["string", "array"],
11
+ index: "number",
12
+ func: "function"
13
+ });
14
+
15
+
16
+ return {
17
+ name: 'ImageView',
18
+ render() {
19
+ const { data: _ } = this;
20
+ // 判断src类型,获取当前图片
21
+ let imgSrc = Array.isArray(src) ? src[_.index] : src;
22
+ return (
23
+ <div className={s.imageView}>
24
+ <div className={s.left}>
25
+ <span
26
+ className={`${s.up} iconfont icon-xiangqian`}
27
+ onClick={() => {
28
+ if (Array.isArray(src) && _.index > 0) {
29
+ _.index = _.index - 1
30
+ }
31
+ }}
32
+ ></span>
33
+ </div>
34
+ <div className={s.center}>
35
+ <img src={imgSrc} />
36
+ <span className={`${s.pag}`} >{_.index + 1}/{src.length}</span>
37
+ </div>
38
+ <div className={s.right}>
39
+ <span
40
+ className={`${s.down} iconfont icon-xianghou`}
41
+ onClick={() => {
42
+ if (Array.isArray(src) && _.index < src.length - 1) {
43
+ _.index = _.index + 1
44
+ }
45
+ }}
46
+ ></span>
47
+ <span className={`${s.close} iconfont icon-shanchu`} onClick={func}></span>
48
+ </div>
49
+ </div>
50
+ );
51
+ },
52
+ data: () => ({
53
+ index: typeof index === "number" ? index : 0,
54
+ })
55
+ };
56
+ }
57
+
58
+ export default function ImageView(src, ind) {
59
+
60
+ const box = document.createElement("div")
61
+ box.className = s.view
62
+ document.body.append(box)
63
+
64
+ const vm = createApp(View, {
65
+ src,
66
+ index: ind ? ind : 0,
67
+ func() {
68
+ vm.$remove()
69
+ box.remove()
70
+ }
71
+ }).$mount(box)
72
+ }
73
+
@@ -0,0 +1,123 @@
1
+ @import url("./font/iconfont.css");
2
+
3
+ .view {
4
+ position: absolute;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100vw;
8
+ height: 100vh;
9
+ z-index: 10000;
10
+ }
11
+
12
+ .imageView {
13
+ display: flex;
14
+ flex-direction: column;
15
+ align-items: center;
16
+ width: 100%;
17
+ }
18
+
19
+ .imageView {
20
+ flex-direction: row;
21
+ justify-content: center;
22
+ height: 100%;
23
+ background-color: rgb(209 209 209 / 63%);
24
+ }
25
+
26
+ .left,
27
+ .right {
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ width: 60px;
33
+ }
34
+
35
+ .center {
36
+ flex: 1;
37
+ display: flex;
38
+ align-items: center;
39
+ justify-content: center;
40
+ position: relative;
41
+ height: 100vh
42
+ }
43
+
44
+ .center img {
45
+ max-width: 100%;
46
+ max-height: 90vh;
47
+ border-radius: 8px;
48
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
49
+ }
50
+
51
+ .pag {
52
+ position: absolute;
53
+ left: 50%;
54
+ bottom: 24px;
55
+ transform: translateX(-50%);
56
+ background: rgba(0, 0, 0, 0.45);
57
+ color: #fff;
58
+ font-size: 16px;
59
+ padding: 6px 18px;
60
+ border-radius: 16px;
61
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
62
+ letter-spacing: 2px;
63
+ user-select: none;
64
+ pointer-events: none;
65
+ }
66
+
67
+
68
+ .iconfont {
69
+ font-size: 28px;
70
+ cursor: pointer;
71
+ margin: 12px 0;
72
+ color: #888;
73
+ transition: color 0.2s, background 0.2s, transform 0.2s;
74
+ padding: 8px;
75
+ border-radius: 50%;
76
+ background: transparent;
77
+ box-shadow: none;
78
+
79
+ .up,
80
+ .down {
81
+ background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
82
+ color: #1976d2;
83
+ box-shadow: 0 2px 8px rgba(25, 118, 210, 0.12);
84
+ border: 1px solid #90caf9;
85
+ }
86
+
87
+ .up:hover,
88
+ .down:hover {
89
+ background: linear-gradient(135deg, #1976d2 0%, #90caf9 100%);
90
+ color: #fff;
91
+ border: 1px solid #1976d2;
92
+ box-shadow: 0 4px 16px rgba(25, 118, 210, 0.18);
93
+ transform: scale(1.18);
94
+ }
95
+ }
96
+
97
+
98
+ .iconfont:hover {
99
+ color: #1976d2;
100
+ background: rgba(25, 118, 210, 0.08);
101
+ transform: scale(1.15);
102
+ box-shadow: 0 2px 8px rgba(25, 118, 210, 0.12);
103
+ }
104
+
105
+ .close {
106
+ position: absolute;
107
+ top: 16px;
108
+ right: 16px;
109
+ color: #e74c3c;
110
+ font-size: 28px;
111
+ z-index: 10;
112
+ background: rgba(255, 255, 255, 0.85);
113
+ border-radius: 50%;
114
+ padding: 8px;
115
+ box-shadow: 0 2px 8px rgba(231, 76, 60, 0.12);
116
+ transition: color 0.2s, background 0.2s, transform 0.2s;
117
+ }
118
+
119
+ .close:hover {
120
+ color: #c0392b;
121
+ background: rgba(231, 76, 60, 0.08);
122
+ transform: scale(1.15);
123
+ }
@@ -0,0 +1,19 @@
1
+ import s from "./index.less"
2
+ import React from "../../React"
3
+ /**
4
+ * 加载等待动画
5
+ * @returns
6
+ */
7
+ export default function Loading() {
8
+ return {
9
+ name: 'BvLoading',
10
+ render() {
11
+ return (
12
+ <div class={s['box']}>
13
+ <div class={s['Masking']}></div>
14
+ <div class={s["loading"]}></div>
15
+ </div>
16
+ )
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,86 @@
1
+ .box {
2
+ .Masking {
3
+ position: absolute;
4
+ display: block;
5
+ top: 0;
6
+ left: 0;
7
+ width: 100%;
8
+ height: 100%;
9
+ background-color: rgb(186 184 184 / 18%);
10
+ justify-content: center;
11
+ align-items: center;
12
+ }
13
+ }
14
+
15
+
16
+ .box {
17
+ position: fixed;
18
+ top: 0;
19
+ left: 0;
20
+ width: 100vw;
21
+ height: 100vh;
22
+ display: flex;
23
+ justify-content: center;
24
+ align-items: center;
25
+ z-index: 9999;
26
+
27
+ .Masking {
28
+ position: absolute;
29
+ top: 0;
30
+ left: 0;
31
+ width: 100vw;
32
+ height: 100vh;
33
+ background: rgba(186, 184, 184, 0.18);
34
+ backdrop-filter: blur(2px);
35
+ }
36
+ }
37
+
38
+
39
+ .loading {
40
+ display: block;
41
+ width: 8px;
42
+ height: 16px;
43
+ animation: rectangle infinite 1s ease-in-out -0.2s;
44
+ background: linear-gradient(180deg, #3498db 0%, #b3d8f7 100%);
45
+ border-radius: 4px;
46
+ position: relative;
47
+ margin: 0 auto;
48
+ }
49
+
50
+
51
+ .loading:before,
52
+ .loading:after {
53
+ position: absolute;
54
+ width: 8px;
55
+ height: 16px;
56
+ content: "";
57
+ background: linear-gradient(180deg, #3498db 0%, #b3d8f7 100%);
58
+ border-radius: 4px;
59
+ }
60
+
61
+
62
+ .loading:before {
63
+ left: -18px;
64
+ animation: rectangle infinite 1s ease-in-out -0.4s;
65
+ }
66
+
67
+ .loading:after {
68
+ right: -18px;
69
+ animation: rectangle infinite 1s ease-in-out;
70
+ }
71
+
72
+
73
+ @keyframes rectangle {
74
+
75
+ 0%,
76
+ 80%,
77
+ 100% {
78
+ height: 16px;
79
+ box-shadow: 0 0 #b3d8f7;
80
+ }
81
+
82
+ 40% {
83
+ height: 28px;
84
+ box-shadow: 0 -16px #3498db;
85
+ }
86
+ }
package/src/index.js ADDED
@@ -0,0 +1,29 @@
1
+ import BvLoading from "./components/Loading"
2
+ import BvDialog from "./components/Dialog"
3
+ import ImageView from "./components/ImageView"
4
+
5
+ import config from "../package.json"
6
+
7
+ console.log(`%c bindview-component %c v${config.version ? config.version : '❓🤔'} `,
8
+ 'background: #35495e; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;',
9
+ 'background: #41b883; padding: 1px; border-radius: 0 3px 3px 0; color: #fff',
10
+ '\n',
11
+ 'https://github.com/bronze-ding/bindview-component');
12
+
13
+ const components = {
14
+ BvLoading,
15
+ BvDialog,
16
+ }
17
+
18
+ // 插件导入
19
+ export default function Components(vm) {
20
+ vm.components(components)
21
+ }
22
+
23
+ // F 结尾的组件需要函数调用,用户单独引入这些组件,而不需要引入整个组件库
24
+ //按需导入
25
+ export {
26
+ BvLoading,
27
+ BvDialog,
28
+ ImageView as ImageViewF
29
+ }