|
|
@@ -1,66 +0,0 @@
|
|
|
-import React, {Component} from 'react';
|
|
|
-import {Layout} from 'antd';
|
|
|
-import './index.css';
|
|
|
-import {Editor} from 'slate-react'
|
|
|
-import {Value} from 'slate'
|
|
|
-import {Link} from "react-router-dom";
|
|
|
-
|
|
|
-const {Content, Header} = Layout;
|
|
|
-
|
|
|
-const initialValue = Value.fromJSON({
|
|
|
- document: {
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- object: 'block',
|
|
|
- type: 'paragraph',
|
|
|
- nodes: [
|
|
|
- {
|
|
|
- object: 'text',
|
|
|
- leaves: [
|
|
|
- {
|
|
|
- text: 'A line of text in a paragraph.',
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
-});
|
|
|
-
|
|
|
-class Ticket extends Component {
|
|
|
- constructor() {
|
|
|
- super();
|
|
|
- this.state = {
|
|
|
- value: initialValue,
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- onChange = ({value}) => {
|
|
|
- this.setState({value})
|
|
|
- };
|
|
|
-
|
|
|
- render() {
|
|
|
- return (
|
|
|
-
|
|
|
- <Layout>
|
|
|
- <Header className="header" style={{position: 'fixed', zIndex: 1, width: '100%'}}>
|
|
|
- <Link to="/">
|
|
|
- <div className="logo-wrapper">
|
|
|
- <div className='logo'/>
|
|
|
- </div>
|
|
|
- </Link>
|
|
|
- </Header>
|
|
|
-
|
|
|
- <Layout style={{padding: '24px', zIndex: '0'}}>
|
|
|
- <Content style={{padding: '24px', minHeight: 280, background: '#fff'}}>
|
|
|
- <Editor value={this.state.value} onChange={this.onChange}/>
|
|
|
- </Content>
|
|
|
- </Layout>
|
|
|
- </Layout>
|
|
|
- )
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-export default Ticket;
|
|
|
-
|