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
 
40
 
41
 var _loading2 = _interopRequireDefault(_loading);
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
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
47
 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
44
 
48
 
45
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
49
 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
159
       } else if (isPlaying) {
163
       } else if (isPlaying) {
160
         playIconElem = _react2.default.createElement(_icon2.default, { className: "pause", type: "pause" });
164
         playIconElem = _react2.default.createElement(_icon2.default, { className: "pause", type: "pause" });
161
       } else {
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
       return playIconElem;
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
 import utcPlugin from "dayjs/plugin/utc";
5
 import utcPlugin from "dayjs/plugin/utc";
6
 import "./index.less";
6
 import "./index.less";
7
 import iconLoading from "../../assert/loading.gif";
7
 import iconLoading from "../../assert/loading.gif";
8
+import btnAudioPlay from "../../assert/btn_audio_play.png";
8
 
9
 
9
 dayjs.extend(durationPlugin);
10
 dayjs.extend(durationPlugin);
10
 dayjs.extend(utcPlugin);
11
 dayjs.extend(utcPlugin);
88
     } else if (isPlaying) {
89
     } else if (isPlaying) {
89
       playIconElem = <Icon className="pause" type="pause" />;
90
       playIconElem = <Icon className="pause" type="pause" />;
90
     } else {
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
     return playIconElem;
96
     return playIconElem;
94
   }
97
   }