通用评论

App.js 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.RenderText = exports.Editor = undefined;
  6. var _message2 = require("antd/es/message");
  7. var _message3 = _interopRequireDefault(_message2);
  8. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  9. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  10. require("antd/es/message/style/css");
  11. var _react = require("react");
  12. var _react2 = _interopRequireDefault(_react);
  13. var _propTypes = require("prop-types");
  14. var _propTypes2 = _interopRequireDefault(_propTypes);
  15. var _axios = require("axios");
  16. var _axios2 = _interopRequireDefault(_axios);
  17. var _reactIntlUniversal = require("react-intl-universal");
  18. var _reactIntlUniversal2 = _interopRequireDefault(_reactIntlUniversal);
  19. var _constant = require("./constant");
  20. var _Comment = require("./Comment");
  21. var _helper = require("./helper");
  22. var _CommentInput = require("./components/CommentInput");
  23. var _CommentInput2 = _interopRequireDefault(_CommentInput);
  24. var _CommentList = require("./components/CommentList");
  25. var _CommentList2 = _interopRequireDefault(_CommentList);
  26. var _Editor = require("./components/Editor");
  27. var _Editor2 = _interopRequireDefault(_Editor);
  28. var _RenderText = require("./components/RenderText");
  29. var _RenderText2 = _interopRequireDefault(_RenderText);
  30. var _lang = require("./lang");
  31. require("./App.css");
  32. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  33. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  34. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  35. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  36. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  37. var App = function (_Component) {
  38. _inherits(App, _Component);
  39. function App(props) {
  40. _classCallCheck(this, App);
  41. var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this, props));
  42. _this.state = {
  43. loading: {},
  44. // oss 配置
  45. oss: {},
  46. // 评论数据
  47. list: [],
  48. page: 1,
  49. total: 0,
  50. // 是否没有更多评论了
  51. isNoMoreComment: false,
  52. initDone: false,
  53. locale: "zh-CN"
  54. };
  55. _this.handleChangeLoading = _this.handleChangeLoading.bind(_this);
  56. _this.sCreateComment = _this.sCreateComment.bind(_this);
  57. _this.sDeleteComment = _this.sDeleteComment.bind(_this);
  58. _this.sCommentFavor = _this.sCommentFavor.bind(_this);
  59. _this.sCreateReply = _this.sCreateReply.bind(_this);
  60. _this.sDeleteReply = _this.sDeleteReply.bind(_this);
  61. _this.errorHandler = _this.errorHandler.bind(_this);
  62. _this.sGetComment = _this.sGetComment.bind(_this);
  63. _this.sReplyFavor = _this.sReplyFavor.bind(_this);
  64. _this.sGetReply = _this.sGetReply.bind(_this);
  65. _this.sOssSts = _this.sOssSts.bind(_this);
  66. return _this;
  67. }
  68. _createClass(App, [{
  69. key: "componentWillMount",
  70. value: function componentWillMount() {
  71. this.axios = _axios2.default;
  72. this.axios.defaults.withCredentials = true;
  73. if (this.props.token) {
  74. this.axios.defaults.headers.common["Authorization"] = "Bearer " + this.props.token;
  75. }
  76. }
  77. }, {
  78. key: "componentDidMount",
  79. value: function componentDidMount() {
  80. this.loadLocales();
  81. }
  82. /**
  83. * 加载语言包
  84. * 只能根据url或者传入的props来确定加载哪个语言包
  85. * 优先级:传入的props > url
  86. */
  87. }, {
  88. key: "loadLocales",
  89. value: function loadLocales() {
  90. var _this2 = this;
  91. var currentLocale = this.props.locales;
  92. if (!currentLocale) {
  93. currentLocale = _reactIntlUniversal2.default.determineLocale({
  94. urlLocaleKey: "lang"
  95. });
  96. }
  97. currentLocale = _lang.SUPPORT_LOCALES.find(function (item) {
  98. return item.value === currentLocale;
  99. }) ? currentLocale : "zh-CN";
  100. var version = require('./version.json').hash;
  101. // 使用绝对路径
  102. var languageURL = _constant.LANGUAGE_LINK + "/" + currentLocale + ".json?v=" + version;
  103. return fetch(languageURL).then(function (response) {
  104. if (response.status >= 400) {
  105. throw new Error("Bad response from server");
  106. }
  107. return response.json();
  108. }).then(function (data) {
  109. // console.log('data: ', data);
  110. _reactIntlUniversal2.default.init({
  111. currentLocale: currentLocale,
  112. locales: _defineProperty({}, currentLocale, data)
  113. }).then(function () {
  114. _this2.setState({ initDone: true, locale: currentLocale });
  115. });
  116. });
  117. }
  118. }, {
  119. key: "error",
  120. value: function error(msg) {
  121. var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  122. if (this.props.showError) {
  123. _message3.default.error(msg);
  124. }
  125. if (this.props.onError) {
  126. this.props.onError(msg, info);
  127. }
  128. }
  129. }, {
  130. key: "errorHandler",
  131. value: function errorHandler(error) {
  132. var locale = this.state.locale;
  133. var localResponse = _lang.LOCALES_RESPONSE[locale];
  134. if (error.response && error.response.data && error.response.data.msg) {
  135. this.error(localResponse[error.response.data.msg] || _constant.ERROR_DEFAULT, {
  136. response: error.response
  137. });
  138. return;
  139. }
  140. this.error(localResponse[error.response.data.msg] || _constant.ERROR_DEFAULT, {
  141. response: error.response
  142. });
  143. }
  144. /**
  145. * 改变 loading 状态
  146. * @param {string} key key
  147. * @param {string} value value
  148. */
  149. }, {
  150. key: "handleChangeLoading",
  151. value: function handleChangeLoading(key, value) {
  152. var loading = this.state.loading;
  153. loading[key] = value;
  154. this.setState({ loading: loading });
  155. }
  156. /**
  157. * 获取评论列表
  158. */
  159. }, {
  160. key: "sGetComment",
  161. value: function sGetComment() {
  162. var _this3 = this;
  163. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  164. _ref$page = _ref.page,
  165. page = _ref$page === undefined ? 1 : _ref$page;
  166. var pageType = this.props.pageType;
  167. this.handleChangeLoading("sGetComment", true);
  168. var _props = this.props,
  169. API = _props.API,
  170. type = _props.type,
  171. businessId = _props.businessId,
  172. limit = _props.limit;
  173. this.axios.get(API + "/comments?type=" + type + "&business_id=" + businessId + "&page=" + page + "&limit=" + limit).then(function (response) {
  174. var _response$data = response.data,
  175. list = _response$data.list,
  176. page = _response$data.page,
  177. total = _response$data.total;
  178. if (list) {
  179. var newList = list;
  180. var oldList = _this3.state.list;
  181. if (pageType === "more") {
  182. if (page > 1) {
  183. // 删除临时数据
  184. oldList = oldList.filter(function (o) {
  185. return !o.isTemporary;
  186. });
  187. newList = oldList.concat(newList);
  188. }
  189. } else if (pageType === "pagination") {
  190. // TODO 滚动到顶部
  191. window.scrollTo(0, 0);
  192. }
  193. _this3.setState({
  194. list: newList,
  195. page: page,
  196. total: total
  197. });
  198. _this3.props.onCountChange(total);
  199. } else {
  200. _message3.default.info(_reactIntlUniversal2.default.get("message.noMoreComment"));
  201. _this3.setState({
  202. isNoMoreComment: true
  203. });
  204. }
  205. }).catch(this.errorHandler).finally(function () {
  206. _this3.handleChangeLoading("sGetComment", false);
  207. });
  208. }
  209. /**
  210. * 获取更多回复
  211. */
  212. }, {
  213. key: "sGetReply",
  214. value: function sGetReply() {
  215. var _this4 = this;
  216. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  217. commentId = _ref2.commentId,
  218. _ref2$page = _ref2.page,
  219. page = _ref2$page === undefined ? 1 : _ref2$page;
  220. this.handleChangeLoading("sGetReply", true);
  221. var _props2 = this.props,
  222. API = _props2.API,
  223. limit = _props2.limit;
  224. this.axios.get(API + "/replies?comment_id=" + commentId + "&page=" + page + "&limit=" + limit).then(function (response) {
  225. if (!response.data.list) {
  226. _message3.default.info(_reactIntlUniversal2.default.get("message.noMoreData"));
  227. }
  228. var list = _this4.state.list.map(function (item) {
  229. if (item.id === commentId) {
  230. if (!item.replies) item.replies = [];
  231. if (response.data.list) {
  232. if (page === 1) {
  233. // 如果当前页数为第一页,则清空当前所有的 replies
  234. // 并将获取到的 replies 存放在 state
  235. item.replies = response.data.list;
  236. } else {
  237. item.replies = item.replies.filter(function (o) {
  238. return !o.isTemporary;
  239. }).concat(response.data.list);
  240. // 如果当前页数非第一页,则合并 replies
  241. }
  242. item.reply_count = response.data.total;
  243. item.reply_page = response.data.page;
  244. } else {
  245. item.isNoMoreReply = true;
  246. }
  247. }
  248. return item;
  249. });
  250. _this4.setState({ list: list });
  251. }).catch(this.errorHandler).finally(function () {
  252. _this4.handleChangeLoading("sGetReply", false);
  253. });
  254. }
  255. /**
  256. * 添加评论
  257. * @param {object} {content} comment content
  258. */
  259. }, {
  260. key: "sCreateComment",
  261. value: function sCreateComment() {
  262. var _this5 = this;
  263. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  264. content = _ref3.content;
  265. var cb = arguments[1];
  266. if (!content) return this.error(_reactIntlUniversal2.default.get("message.notNull"));
  267. this.handleChangeLoading("sCreateComment", true);
  268. var _props3 = this.props,
  269. API = _props3.API,
  270. type = _props3.type,
  271. businessId = _props3.businessId,
  272. businessUserId = _props3.businessUserId;
  273. this.axios(API + "/comments", {
  274. method: "post",
  275. data: {
  276. type: type,
  277. business_id: businessId,
  278. business_user_id: businessUserId,
  279. content: content
  280. },
  281. withCredentials: true
  282. }).then(function (response) {
  283. if (_this5.props.showAlertComment) {
  284. _message3.default.success(_reactIntlUniversal2.default.get("message.success"));
  285. }
  286. if ((0, _helper.isFunction)(cb)) cb();
  287. // 将数据写入到 list 中
  288. // 临时插入
  289. // 等到获取数据之后,删除临时数据
  290. var _state = _this5.state,
  291. list = _state.list,
  292. total = _state.total;
  293. list.unshift(_extends({}, response.data, {
  294. isTemporary: true // 临时的数据
  295. }));
  296. _this5.setState({ list: list, total: total + 1 });
  297. _this5.props.onCountChange(total + 1);
  298. }).catch(this.errorHandler).finally(function () {
  299. _this5.handleChangeLoading("sCreateComment", false);
  300. });
  301. }
  302. /**
  303. * 删除评论
  304. */
  305. }, {
  306. key: "sDeleteComment",
  307. value: function sDeleteComment(commentId) {
  308. var _this6 = this;
  309. this.handleChangeLoading("sDeleteComment", true);
  310. var API = this.props.API;
  311. this.axios(API + "/comments/" + commentId, {
  312. method: "delete",
  313. withCredentials: true
  314. }).then(function () {
  315. var _state2 = _this6.state,
  316. list = _state2.list,
  317. total = _state2.total;
  318. var res = list.filter(function (item) {
  319. return item.id !== commentId;
  320. });
  321. _this6.setState({ list: res, total: total - 1 });
  322. _this6.props.onDelete(_constant.COMMENT_TYPE.COMMENT);
  323. _this6.props.onCountChange(total - 1);
  324. }).catch(this.errorHandler).finally(function () {
  325. _this6.handleChangeLoading("sDeleteComment", false);
  326. });
  327. }
  328. /**
  329. * 添加回复
  330. * 回复评论/回复回复
  331. * @param {object} data { comment_id, content, [reply_id] }
  332. */
  333. }, {
  334. key: "sCreateReply",
  335. value: function sCreateReply(data, cb) {
  336. var _this7 = this;
  337. if (!data.content) return this.error(_reactIntlUniversal2.default.get("message.replyNoNull"));
  338. this.handleChangeLoading("sCreateReply", true);
  339. var API = this.props.API;
  340. this.axios(API + "/replies", {
  341. method: "post",
  342. data: data,
  343. withCredentials: true
  344. }).then(function (response) {
  345. if (_this7.props.showAlertReply) {
  346. _message3.default.success(_reactIntlUniversal2.default.get("message.replySuccess"));
  347. }
  348. if ((0, _helper.isFunction)(cb)) cb();
  349. // 将数据写入到 list 中
  350. // 临时插入
  351. // 等到获取数据之后,删除临时数据
  352. var list = _this7.state.list.map(function (item) {
  353. if (item.id === data.comment_id) {
  354. if (!item.replies) item.replies = [];
  355. item.replies.push(_extends({}, response.data, {
  356. isTemporary: true // 临时的数据
  357. }));
  358. item.reply_count += 1;
  359. }
  360. return item;
  361. });
  362. _this7.setState({ list: list });
  363. }).catch(this.errorHandler).finally(function () {
  364. _this7.handleChangeLoading("sCreateReply", false);
  365. });
  366. }
  367. /**
  368. * 删除回复
  369. * @param {*} replyId
  370. * @param {*} commentId
  371. */
  372. }, {
  373. key: "sDeleteReply",
  374. value: function sDeleteReply(replyId, commentId) {
  375. var _this8 = this;
  376. this.handleChangeLoading("sDeleteReply", true);
  377. var API = this.props.API;
  378. this.axios(API + "/replies/" + replyId + "?CommentID=" + commentId, {
  379. method: "delete",
  380. withCredentials: true
  381. }).then(function () {
  382. var list = _this8.state.list.map(function (item) {
  383. if (item.id === commentId) {
  384. var replies = item.replies.filter(function (item) {
  385. return item.id !== replyId;
  386. });
  387. item.replies = replies;
  388. item.reply_count -= 1;
  389. }
  390. return item;
  391. });
  392. _this8.setState({ list: list });
  393. _this8.props.onDelete(_constant.COMMENT_TYPE.REPLY);
  394. }).catch(this.errorHandler).finally(function () {
  395. _this8.handleChangeLoading("sDeleteReply", false);
  396. });
  397. }
  398. /**
  399. * 评论 点赞/取消点赞
  400. * @param {string} commentId { commentId }
  401. * @param {boolean} favored 是否已经点过赞
  402. */
  403. }, {
  404. key: "sCommentFavor",
  405. value: function sCommentFavor(commentId, favored) {
  406. var _this9 = this;
  407. this.handleChangeLoading("sCommentFavor", true);
  408. var API = this.props.API;
  409. this.axios(API + "/comments/" + commentId + "/favor", {
  410. method: favored ? "delete" : "put",
  411. withCredentials: true
  412. }).then(function (response) {
  413. if (_this9.props.showAlertFavor) {
  414. _message3.default.success(favored ? _reactIntlUniversal2.default.get("message.cancelLickSuccess") : _reactIntlUniversal2.default.get("message.likeSuccess"));
  415. }
  416. // 更新 list 中的该项数据的 favored
  417. var list = _this9.state.list.map(function (item) {
  418. if (item.id === commentId) {
  419. item.favored = !favored;
  420. item.favor_count += favored ? -1 : 1;
  421. }
  422. return item;
  423. });
  424. _this9.setState({ list: list });
  425. }).catch(this.errorHandler).finally(function () {
  426. _this9.handleChangeLoading("sCommentFavor", false);
  427. });
  428. }
  429. /**
  430. * 回复 点赞/取消点赞
  431. * @param {string} replyId replyId
  432. * @param {string} commentId commentId
  433. * @param {boolean} favored 是否已经点过赞
  434. */
  435. }, {
  436. key: "sReplyFavor",
  437. value: function sReplyFavor(replyId, commentId, favored) {
  438. var _this10 = this;
  439. this.handleChangeLoading("sReplyFavor", true);
  440. var API = this.props.API;
  441. this.axios(API + "/replies/" + replyId + "/favor", {
  442. method: favored ? "delete" : "put",
  443. data: {
  444. comment_id: commentId
  445. },
  446. withCredentials: true
  447. }).then(function (response) {
  448. _message3.default.success(favored ? _reactIntlUniversal2.default.get("message.cancelLickSuccess") : _reactIntlUniversal2.default.get("message.likeSuccess"));
  449. // 更新 list 中的该项数据的 favored
  450. var list = _this10.state.list.map(function (item) {
  451. if (item.id === commentId) {
  452. item.replies = item.replies.map(function (r) {
  453. if (r.id === replyId) {
  454. r.favored = !favored;
  455. // r.favor_count = response.data.favor_count;
  456. // 点赞数 +1,而不是使用后端返回的点赞数
  457. // 不然如果返回的不是增加 1,用户可能以为程序错误
  458. r.favor_count += favored ? -1 : 1;
  459. }
  460. return r;
  461. });
  462. }
  463. return item;
  464. });
  465. _this10.setState({ list: list });
  466. }).catch(this.errorHandler).finally(function () {
  467. _this10.handleChangeLoading("sReplyFavor", false);
  468. });
  469. }
  470. /**
  471. * 获取 OSS 上传的参数
  472. */
  473. }, {
  474. key: "sOssSts",
  475. value: function sOssSts() {
  476. var _this11 = this;
  477. this.handleChangeLoading("sOssSts", true);
  478. var API = this.props.API;
  479. this.axios.get(API + "/oss/sts").then(function (response) {
  480. _this11.setState({ oss: _extends({}, response.data) });
  481. }).catch(this.errorHandler).finally(function () {
  482. _this11.handleChangeLoading("sOssSts", false);
  483. });
  484. }
  485. }, {
  486. key: "render",
  487. value: function render() {
  488. // 添加到 Context 的数据
  489. var value = _extends({}, this.state, this.props, {
  490. sCreateComment: this.sCreateComment,
  491. sGetComment: this.sGetComment,
  492. sCommentFavor: this.sCommentFavor,
  493. sReplyFavor: this.sReplyFavor,
  494. sCreateReply: this.sCreateReply,
  495. sGetReply: this.sGetReply,
  496. sOssSts: this.sOssSts,
  497. sDeleteComment: this.sDeleteComment,
  498. sDeleteReply: this.sDeleteReply
  499. });
  500. return this.state.initDone && _react2.default.createElement(
  501. _Comment.CommentContext.Provider,
  502. { value: value },
  503. _react2.default.createElement(
  504. "div",
  505. { className: "comment" },
  506. this.props.showEditor && _react2.default.createElement(_CommentInput2.default, { content: this.props.children }),
  507. this.props.showList && _react2.default.createElement(
  508. "div",
  509. { style: { marginTop: 20 } },
  510. _react2.default.createElement(_CommentList2.default, null)
  511. )
  512. )
  513. );
  514. }
  515. }]);
  516. return App;
  517. }(_react.Component);
  518. App.propTypes = {
  519. type: _propTypes2.default.number.isRequired, // 评论的 type
  520. businessId: _propTypes2.default.string.isRequired, // 评论的 business_id
  521. businessUserId: _propTypes2.default.number,
  522. API: _propTypes2.default.string, // 评论的 API 前缀
  523. showList: _propTypes2.default.bool, // 是否显示评论列表
  524. showEditor: _propTypes2.default.bool, // 是否显示评论输入框
  525. showAlertComment: _propTypes2.default.bool, // 评论成功之后,是否通过 Antd 的 Message 组件进行提示
  526. showAlertReply: _propTypes2.default.bool, // 回复成功之后,是否通过 Antd 的 Message 组件进行提示
  527. showAlertFavor: _propTypes2.default.bool, // 点赞/取消点赞成功之后,是否通过 Antd 的 Message 组件进行提示
  528. showError: _propTypes2.default.bool, // 是否使用Antd的Message组件提示错误信息
  529. onError: _propTypes2.default.func, // 错误回调, 出错了会被调用
  530. userId: _propTypes2.default.number, // 用户id, comment内部不维护用户id, 调用组件时传递过来, 目前用于判断是否显示删除按钮
  531. pageType: _propTypes2.default.string, // 分页类型
  532. page: _propTypes2.default.number, // 页码
  533. limit: _propTypes2.default.number, // 一次加载评论数量
  534. onPageChange: _propTypes2.default.func, // 页码变化回调
  535. onGetMoreBtnClick: _propTypes2.default.func, // 点击查看更多按钮回调
  536. onDelete: _propTypes2.default.func,
  537. locales: _propTypes2.default.string, // 传入的语言环境, en-US/zh-CN
  538. onCountChange: _propTypes2.default.func // 评论数量变更时的回调
  539. };
  540. App.defaultProps = {
  541. businessUserId: 0,
  542. API: "//api.links123.net/comment/v1",
  543. showList: true,
  544. showEditor: true,
  545. showAlertComment: false,
  546. showAlertReply: false,
  547. showAlertFavor: false,
  548. showError: true,
  549. pageType: "more",
  550. limit: _constant.LIMIT,
  551. onGetMoreBtnClick: function onGetMoreBtnClick() {},
  552. onPageChange: function onPageChange(page) {},
  553. onDelete: function onDelete() {},
  554. onCountChange: function onCountChange() {}
  555. };
  556. exports.Editor = _Editor2.default;
  557. exports.RenderText = _RenderText2.default;
  558. exports.default = App;
  559. //# sourceMappingURL=App.js.map