Browse Source

fix: 修复跟读 loading 空白问题

Allen 4 years ago
parent
commit
6365ddacee

BIN
lib/assert/btn_audio_play.png View File


+ 5
- 1
lib/components/AudioPlayer/index.js View File

@@ -40,6 +40,10 @@ var _loading = require("../../assert/loading.gif");
40 40
 
41 41
 var _loading2 = _interopRequireDefault(_loading);
42 42
 
43
+var _btn_audio_play = require("../../assert/btn_audio_play.png");
44
+
45
+var _btn_audio_play2 = _interopRequireDefault(_btn_audio_play);
46
+
43 47
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44 48
 
45 49
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -159,7 +163,7 @@ var AudioPlayer = function (_React$Component) {
159 163
       } else if (isPlaying) {
160 164
         playIconElem = _react2.default.createElement(_icon2.default, { className: "pause", type: "pause" });
161 165
       } else {
162
-        playIconElem = _react2.default.createElement("i", { className: "schedule schedule-icon_image_audio" });
166
+        playIconElem = _react2.default.createElement("img", { className: "icon-loading", src: _btn_audio_play2.default, alt: "iconPlaying" });
163 167
       }
164 168
       return playIconElem;
165 169
     }

+ 1
- 1
lib/components/AudioPlayer/index.js.map
File diff suppressed because it is too large
View File


BIN
src/assert/btn_audio_play.png View File


+ 4
- 1
src/components/AudioPlayer/index.js View File

@@ -5,6 +5,7 @@ import durationPlugin from "dayjs/plugin/duration";
5 5
 import utcPlugin from "dayjs/plugin/utc";
6 6
 import "./index.less";
7 7
 import iconLoading from "../../assert/loading.gif";
8
+import btnAudioPlay from "../../assert/btn_audio_play.png";
8 9
 
9 10
 dayjs.extend(durationPlugin);
10 11
 dayjs.extend(utcPlugin);
@@ -88,7 +89,9 @@ class AudioPlayer extends React.Component {
88 89
     } else if (isPlaying) {
89 90
       playIconElem = <Icon className="pause" type="pause" />;
90 91
     } else {
91
-      playIconElem = <i className="schedule schedule-icon_image_audio" />;
92
+      playIconElem = (
93
+        <img className="icon-loading" src={btnAudioPlay} alt="iconPlaying" />
94
+      );
92 95
     }
93 96
     return playIconElem;
94 97
   }