Skip to content

Commit aa3e88f

Browse files
committed
update: README.md
1 parent 2d54302 commit aa3e88f

File tree

2 files changed

+30
-81
lines changed

2 files changed

+30
-81
lines changed

README.md

Lines changed: 28 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
Import the npm package and only one prop to show highlightCode
44

5+
[![vue 3](https://img.shields.io/badge/vue-3-42b983.svg?style=flat-square)](https://vuejs.org)
6+
7+
<p>
8+
<a href="https://npm-stat.com/charts.html?package=vue-highlight-code">
9+
<img alt="Downloads" src="https://img.shields.io/npm/dm/vue-highlight-code.svg">
10+
</a>
11+
<a href="https://npmjs.com/package/vue-highlight-code">
12+
<img alt="Version" src="https://img.shields.io/npm/v/vue-highlight-code.svg"/>
13+
</a>
14+
<a href="http://packagequality.com/#?package=vue-highlight-code">
15+
<img alt="Quality" src="https://npm.packagequality.com/shield/vue-highlight-code.svg">
16+
</a>
17+
</p>
518
```
619
yarn add highlight.js vue-highlight-code
720
```
@@ -35,83 +48,20 @@ export default {
3548

3649

3750

38-
### 2. Props
51+
### Component Props
3952

40-
#### codeValue `String`
41-
42-
Description: Highlight Code
43-
44-
45-
46-
#### lang `String`
47-
48-
default: 'javascript' (such as 'vue','html','css')
49-
50-
Description: Highlight Code Type
51-
52-
53-
54-
#### theme `String`
55-
56-
default: 'dark' (only ['dark','light'])
57-
58-
Description: Highlight Code theme
59-
60-
#### codeLines `Boolean`
61-
62-
default: false
63-
64-
Description: Support Code lines
65-
66-
#### langName `String`
67-
68-
Description: Highlight Code Name (Upper left corner display)
69-
70-
71-
72-
#### width `String`
73-
74-
default: '620px'
75-
76-
Description: the component width
77-
78-
79-
80-
#### height `String`
81-
82-
Description: the component height
83-
84-
85-
86-
#### maxWidth `String`
87-
88-
Description: the component max-width
89-
90-
91-
92-
#### maxHeight `String`
93-
94-
Description: the component max-height
95-
96-
97-
98-
#### fontSize `Number`
99-
100-
Description: the highlight code font-size
101-
102-
103-
104-
#### scrollStyleBool `Boolean`
105-
106-
default: true
107-
108-
Description: scroll bar style
109-
110-
111-
112-
#### copy `Boolean`
113-
114-
default: true
115-
116-
Description: whether the code can copy
53+
| prop | description | type | default |
54+
| :-------------- | :---------------------------------------------- | :-------- | :--------------------------------------- |
55+
| codeValue | Highlight Code Source | `String` | `''` |
56+
| lang | Highlight Code Type | `String` | `javascript` (such as 'vue','html','css) |
57+
| theme | Component Highlight Code theme | `String` | default: `dark`(only ['dark','light']) |
58+
| codeLines | Show Code lines | `Boolean` | `false` |
59+
| langName | Highlight Code Name (Upper left corner display) | `String` | `` |
60+
| width | component style width | `String` | `620px` |
61+
| height | component style height | `String` | `` |
62+
| maxWidth | component style max-width | `String` | `` |
63+
| maxHight | component style max-height`String` | `String` | `` |
64+
| fontSize | highlight code font-size | `Number` | - |
65+
| scrollStyleBool | component scroll bar style | `Boolean` | `true` |
66+
| copy | whether the code can copy | `Boolean` | `true` |
11767

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-highlight-code",
33
"private": false,
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"license": "MIT",
66
"main": "./dist/vue3-highlight.umd.js",
77
"module": "./dist/vue3-highlight.es.js",
@@ -22,8 +22,7 @@
2222
},
2323
"dependencies": {
2424
"highlight.js": "^11.5.1",
25-
"vue": "^3.2.25",
26-
"vue-highlight-code": "^0.1.1"
25+
"vue": "^3.2.25"
2726
},
2827
"devDependencies": {
2928
"@vitejs/plugin-vue": "^2.3.3",

0 commit comments

Comments
 (0)