Skip to content

Commit 2720c44

Browse files
committed
feat: add alt & perf css
1 parent 306c426 commit 2720c44

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

README.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ A Vue image component. Simple realization of image shadow.
88

99
Online: https://image-component.github.io/vue-image-shadow/
1010

11+
## 🌀 Template
12+
13+
https://github.com/one-template/vue-component-template
14+
1115
## 📦 Install
1216

1317
```bash
@@ -26,14 +30,15 @@ Vue.component('image-shadow', ImageShadow)
2630

2731
## 📔 API
2832

29-
| Property | Description | Type | Required | Default |
30-
| ------------ | ----------------------------------- | ------------- | -------- | ------- |
31-
| className | Component extra class. | string || - |
32-
| shadowBlur | The shadow blur of the image. | number || 20 |
33-
| shadowHover | Whether to support the mouse hover. | boolean || false |
34-
| shadowRadius | The border radius of the image. | number || 8 |
35-
| src | The src of the image. | string || - |
36-
| width | The width of the image. | number || 300 |
33+
| Property | Description | Type | Required | Default | Version |
34+
| ------------ | ----------------------------------- | ------- | -------- | ------- | ------- |
35+
| alt | The alt of the image. | string || - | 1.1.0 |
36+
| className | Component extra class. | string || - | 1.0.0 |
37+
| shadowBlur | The shadow blur of the image. | number || 20 | 1.0.0 |
38+
| shadowHover | Whether to support the mouse hover. | boolean || false | 1.0.0 |
39+
| shadowRadius | The border radius of the image. | number || 8 | 1.0.0 |
40+
| src | The src of the image. | string || - | 1.0.0 |
41+
| width | The width of the image. | number || 300 | 1.0.0 |
3742

3843
## 🔨 Development
3944

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# 🔖 Changelog
22

3+
## 1.1.0
4+
5+
`2020-12-15`
6+
7+
- feat: add alt.
8+
- perf: optimize img css.
9+
310
## 1.0.1
411

512
`2020-12-10`

src/image-shadow.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<img
77
class="vue-image-shadow-img"
88
:src="src"
9+
:alt="alt"
910
:width="width"
1011
:style="imgStyle"
1112
/>
@@ -39,6 +40,9 @@ export default {
3940
type: String,
4041
required: true
4142
},
43+
alt: {
44+
type: String,
45+
},
4246
width: {
4347
type: Number,
4448
default: 300
@@ -88,6 +92,7 @@ export default {
8892
8993
img {
9094
transition: all 0.4s ease;
95+
display: block;
9196
}
9297
9398
&-card {

0 commit comments

Comments
 (0)