Skip to content

Commit b88a48f

Browse files
committed
project pref
1 parent bf7ea34 commit b88a48f

7 files changed

+83
-45
lines changed

LICENSE

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT LICENSE
2+
3+
Copyright (c) 2015-present Ant UED, https://xtech.antfin.com/
4+
5+
Permission is hereby granted, free of charge, to any person obtaining
6+
a copy of this software and associated documentation files (the
7+
"Software"), to deal in the Software without restriction, including
8+
without limitation the rights to use, copy, modify, merge, publish,
9+
distribute, sublicense, and/or sell copies of the Software, and to
10+
permit persons to whom the Software is furnished to do so, subject to
11+
the following conditions:
12+
13+
The above copyright notice and this permission notice shall be
14+
included in all copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

+21-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# vue-iconfont-component
22

3-
> vue使用iconfont组件,仅支持symbol方式
3+
[![https://img.shields.io/npm/v/vue-iconfont-component.svg](https://img.shields.io/npm/v/vue-iconfont-component.svg)](https://www.npmjs.com/package/vue-iconfont-component)
4+
[![https://img.shields.io/npm/dt/vue-iconfont-component.svg](https://img.shields.io/npm/dt/vue-iconfont-component.svg)](https://www.npmjs.com/package/vue-iconfont-component)
5+
[![https://img.shields.io/npm/dm/vue-iconfont-component.svg](https://img.shields.io/npm/dm/vue-iconfont-component.svg)](https://www.npmjs.com/package/vue-iconfont-component)
6+
[![https://img.shields.io/npm/l/vue-iconfont-component.svg](https://img.shields.io/npm/l/vue-iconfont-component.svg)](https://github.com/loveyunk/vue-iconfont-component/blob/master/LICENSE)
7+
8+
> A Vue component for use iconfont
49
510
### How to use?
6-
```
11+
12+
```bash
713
npm install vue-iconfont-component --save
814
```
915

1016
### Example
11-
``` js
17+
18+
```js
1219
<template>
1320
<vue-iconfont type="icon-xiaoxi" size="55" color="e5d"></vue-iconfont>
1421
</template>
@@ -21,15 +28,16 @@ npm install vue-iconfont-component --save
2128
</script>
2229
```
2330

24-
### Options:
31+
### Options
32+
33+
| Property | Description | Type | default |
34+
| -------- | --------------------------- | -------------- | ------- |
35+
| type | the value of iconfont type | String | - |
36+
| size | the value of iconfont size | Number, String | - |
37+
| color | the value of iconfont color | String | - |
2538

26-
| Property | Description | Type | default |
27-
| --- | --- | --- | --- |
28-
| type | the value of iconfont type | String | - |
29-
| size | the value of iconfont size | Number,String | - |
30-
| color | the value of iconfont color | String | - |
39+
### Events
3140

32-
### Functions
33-
| Function Name | Description |
34-
| --- | --- |
35-
| on-click | triggers when clicking the icon |
41+
| Function Name | Description |
42+
| ------------- | ------------------------------- |
43+
| on-click | triggers when clicking the icon |

demo/index.html

+24-29
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,27 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
4-
<head>
5-
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8-
<title>Document</title>
9-
</head>
10-
11-
<body>
12-
13-
<div id="app">
14-
<vue-iconfont type="icon-shouye" size="39" color="red"></vue-iconfont>
15-
<vue-iconfont type="icon-xiaoxi" size="55" color="e5d"></vue-iconfont>
16-
<vue-iconfont type="icon-shoucang"></vue-iconfont>
17-
</div>
18-
19-
<script src="http://at.alicdn.com/t/font_718440_c0f0x2i8biw.js"></script>
20-
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
21-
<script src="../dist/vue-iconfont-component.min.js"></script>
22-
<script>
23-
24-
new Vue({
25-
el: '#app'
26-
});
27-
28-
</script>
29-
30-
</body>
31-
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
7+
<title>Document</title>
8+
</head>
9+
10+
<body>
11+
<div id="app">
12+
<vue-iconfont type="icon-shouye" size="39" color="red"></vue-iconfont>
13+
<vue-iconfont type="icon-xiaoxi" size="55" color="e5d"></vue-iconfont>
14+
<vue-iconfont type="icon-shoucang"></vue-iconfont>
15+
<vue-iconfont></vue-iconfont>
16+
</div>
17+
18+
<script src="http://at.alicdn.com/t/font_718440_c0f0x2i8biw.js"></script>
19+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
20+
<script src="../dist/vue-iconfont-component.min.js"></script>
21+
<script>
22+
new Vue({
23+
el: "#app"
24+
});
25+
</script>
26+
</body>
3227
</html>

dist/vue-iconfont-component.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/vue-iconfont-component.min.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+10
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,16 @@
2121
"type": "git",
2222
"url": "git+https://github.com/loveyunk/vue-iconfont-component.git"
2323
},
24+
"keywords": [
25+
"icon",
26+
"iconfont",
27+
"vue",
28+
"component"
29+
],
30+
"bugs": {
31+
"url": "https://github.com/loveyunk/vue-iconfont-component/issues"
32+
},
33+
"homepage": "https://github.com/loveyunk/vue-iconfont-component#readme",
2434
"devDependencies": {
2535
"babel-core": "^6.26.0",
2636
"babel-loader": "^7.1.2",

src/vue-iconfont-component.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
<script>
88
export default {
99
props: {
10-
type: String,
10+
type: {
11+
type: String,
12+
default: ""
13+
},
1114
size: [Number, String],
1215
color: String
1316
},

0 commit comments

Comments
 (0)