通用评论

index.js 540B

1234567891011121314151617181920212223242526
  1. import React from "react";
  2. import ReactDOM from "react-dom";
  3. import App, { Editor } from "./App";
  4. import registerServiceWorker from "./registerServiceWorker";
  5. const props = {
  6. type: 1,
  7. businessId: "1",
  8. API: "http://api.links123.net/comment/v1",
  9. showList: false
  10. };
  11. const editorProps = {
  12. showEmoji: true,
  13. placeholder: "说点什么吧",
  14. rows: 5
  15. };
  16. ReactDOM.render(
  17. <App {...props}>
  18. <Editor {...editorProps} onSubmit={v => console.log()} />
  19. </App>,
  20. document.getElementById("root-comment")
  21. );
  22. registerServiceWorker();