通用评论

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