Skip to content

Commit 65c46b3

Browse files
李钿李钿
authored andcommitted
修改样式文件为 css 格式
1 parent 9a9a22c commit 65c46b3

File tree

5 files changed

+93
-95
lines changed

5 files changed

+93
-95
lines changed

gulpfile.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,14 @@ gulp.task('publish:less', ["publish:clean"], function () {
6464
.pipe(gulp.dest('dist'));
6565
});
6666

67+
//发布 css 文件
68+
gulp.task('publish:css', ["publish:clean"], function(){
69+
return gulp.src('src/**/*.css')
70+
.pipe(gulp.dest('dist'))
71+
})
72+
6773
//打包发布 npm
68-
gulp.task('publish', ["publish:clean", 'publish:js', 'publish:less']);
74+
gulp.task('publish', ["publish:clean", 'publish:js', 'publish:css']);
6975

7076
gulp.task('demo', ['deploy:demo']);
7177

src/components/WxImageViewer.css

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@charset 'utf-8';
2+
.wx-image-viewer {
3+
position: fixed;
4+
left: 0;
5+
top: 0;
6+
width: 100%;
7+
height: 100%;
8+
}
9+
.wx-image-viewer .viewer-cover {
10+
position: absolute;
11+
left: 0;
12+
top: 0;
13+
width: 100%;
14+
height: 100%;
15+
background-color: #000000;
16+
}
17+
.wx-image-viewer .viewer-list-container {
18+
position: absolute;
19+
left: 0;
20+
top: 0;
21+
width: 100%;
22+
height: 100%;
23+
}
24+
.wx-image-viewer .viewer-image-container {
25+
position: absolute;
26+
top: 0;
27+
left: 0;
28+
overflow: hidden;
29+
}
30+
.wx-image-viewer .viewer-image-container img {
31+
position: absolute;
32+
}
33+
.wx-image-viewer .viewer-image-pointer {
34+
position: fixed;
35+
bottom: 10px;
36+
left: 0;
37+
width: 100%;
38+
text-align: center;
39+
}
40+
.wx-image-viewer .viewer-image-pointer .pointer {
41+
display: inline-block;
42+
width: 8px;
43+
height: 8px;
44+
margin: 0 5px;
45+
border-radius: 100%;
46+
background-color: #333;
47+
}
48+
.wx-image-viewer .viewer-image-pointer .pointer.on {
49+
background-color: #fff;
50+
}
51+
.wx-image-viewer .viewer-image-loading {
52+
position: absolute;
53+
margin: auto;
54+
left: 0;
55+
right: 0;
56+
top: 0;
57+
bottom: 0;
58+
width: 32px;
59+
height: 32px;
60+
box-sizing: border-box;
61+
border-radius: 100%;
62+
border-width: 4px;
63+
border-style: solid;
64+
border-color: #333;
65+
border-bottom-color: #FFF;
66+
-webkit-animation: roll 1s linear infinite;
67+
animation: roll 1s linear infinite;
68+
}
69+
@-webkit-keyframes roll {
70+
from {
71+
-webkit-transform: rotate(0deg);
72+
}
73+
to {
74+
-webkit-transform: rotate(360deg);
75+
}
76+
}
77+
@keyframes roll {
78+
from {
79+
transform: rotate(0deg);
80+
}
81+
to {
82+
transform: rotate(360deg);
83+
}
84+
}

src/components/WxImageViewer.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
44

55
import WrapViewer from './WrapViewer';
66

7-
import './WxImageViewer.less';
7+
import './WxImageViewer.css';
88

99
const renderSubtreeIntoContainer = ReactDOM.unstable_renderSubtreeIntoContainer;
1010

src/components/WxImageViewer.less

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import WxImageViewer from './components/WxImageViewer.jsx';
1+
import WxImageViewer from './components/WxImageViewer';
22

33
export default WxImageViewer;

0 commit comments

Comments
 (0)