File tree 3 files changed +16
-8
lines changed
fighting-components/image/src
3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 47
47
/>
48
48
</div >
49
49
50
- <div v-else class =" f-image f-image -error" >
50
+ <div v-else class =" f-image-error" >
51
51
<slot name =" error" >
52
52
<span class =" f-image-error-text" >{{ alt || '加载失败' }}</span >
53
53
</slot >
Original file line number Diff line number Diff line change 146
146
}
147
147
148
148
// 加载失败
149
- .f-image.f-image -error {
149
+ .f-image-error {
150
150
display : inline-block ;
151
- background-color : #eee ;
152
- padding : 0 3px ;
153
- border-radius : 3px ;
151
+
154
152
.f-image-error-text {
153
+ display : inline-block ;
154
+ background-color : #eee ;
155
+ padding : 0 3px ;
156
+ border-radius : 3px ;
155
157
font-size : 15px ;
156
158
color : #333 ;
157
159
}
Original file line number Diff line number Diff line change 2
2
<div style =" height : 1000px " ></div >
3
3
<f-image
4
4
root-margin =" 100px"
5
- src =" https://tianyuhao.cn/images/auto/1.png "
6
- err-src =" https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg "
5
+ src =" https://tianyuhao.cn/images/auto/1.png2 "
6
+ err-src =" https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg2 "
7
7
:draggable =" false"
8
8
lazy
9
9
alt =" ada"
17
17
preview-round =" 120px"
18
18
caption =" 回到家啊回到家萨的好时机啊"
19
19
:preview-show-index =" 32"
20
- />
20
+ @load =" load"
21
+ @error =" err"
22
+ >
23
+ <template #error >
24
+ <h1 >加载失败</h1 >
25
+ </template >
26
+ </f-image >
21
27
<span >12</span >
22
28
</template >
23
29
You can’t perform that action at this time.
0 commit comments