Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit153b336

Browse files
improve loading
1 parent1d8636e commit153b336

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

‎components/CaLoading/CaLoading.vue‎

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<divclass="bx--loading-overlay">
3-
<divdata-loadingclass="bx--loading">
2+
<div:class="overlayClass">
3+
<divdata-loadingclass="bx--loading":class="smallClass">
44
<svgclass="bx--loading__svg"viewBox="-75 -75 150 150">
55
<title>Loading</title>
66
<circlecx="0"cy="0"r="37.5" />
@@ -19,14 +19,37 @@
1919
};
2020
},
2121
props:{
22-
show:false
22+
show: {
23+
type:Boolean,
24+
default:true
25+
},
26+
withoutOverlay: {
27+
type:Boolean,
28+
default:false
29+
},
30+
small: {
31+
type:Boolean,
32+
default:false
33+
}
2334
},
2435
name:'ca-loading',
2536
watch: {
2637
show (newValue) {
2738
this.loading.set(newValue)
2839
}
2940
},
41+
computed: {
42+
overlayClass () {
43+
return {
44+
'bx--loading-overlay':!this.withoutOverlay
45+
}
46+
},
47+
smallClass () {
48+
return {
49+
'bx--loading--small':this.small
50+
}
51+
}
52+
},
3053
mounted() {
3154
this.loading=Loading.create(this.$el.querySelector('[data-loading]'));
3255
this.loading.set(this.show);

‎stories/loading.stories.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ storiesOf('Loading', module)
55
template:`
66
<ca-loading></ca-loading>
77
`,
8+
})).add('small',()=>({
9+
template:`
10+
<ca-loading small></ca-loading>
11+
`,
12+
})).add('withoutOverlay',()=>({
13+
template:`
14+
<ca-loading withoutOverlay></ca-loading>
15+
`,
816
}))
917
.add('with para',()=>({
1018
data:()=>({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp