Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jf-backend-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
stan.gao
jf-backend-template
Commits
6dd082ea
Commit
6dd082ea
authored
May 29, 2019
by
jason.xing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【删除】移除CKEditor的配置
parent
88302268
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
12876 deletions
+1
-12876
config-overrides.js
config-overrides.js
+0
-58
package.json
package.json
+0
-17
overall.js
src/page/overall/overall.js
+1
-103
yarn.lock
yarn.lock
+0
-12698
No files found.
config-overrides.js
View file @
6dd082ea
const
{
override
,
fixBabelImports
,
getBabelLoader
,
addDecoratorsLegacy
,
disableEsLint
}
=
require
(
'customize-cra'
);
const
{
override
,
fixBabelImports
,
getBabelLoader
,
addDecoratorsLegacy
,
disableEsLint
}
=
require
(
'customize-cra'
);
const
{
styles
}
=
require
(
'@ckeditor/ckeditor5-dev-utils'
);
const
CKEditorWebpackPlugin
=
require
(
'@ckeditor/ckeditor5-dev-webpack-plugin'
);
const
CKEditorPlugin
=
new
CKEditorWebpackPlugin
(
{
// Main language that will be built into the main bundle.
language
:
'zh-cn'
,
// Additional languages that will be emitted to the `outputDirectory`.
// This option can be set to an array of language codes or `'all'` to build all found languages.
// The bundle is optimized for one language when this option is omitted.
// additionalLanguages: 'all',
// Optional directory for emitted translations. Relative to the webpack's output.
// Defaults to `'translations'`.
// outputDirectory: 'ckeditor5-translations',
// Whether the build process should fail if an error occurs.
// Defaults to `false`.
// strict: true,
// Whether to log all warnings to the console.
// Defaults to `false`.
// verbose: true
}
)
const
fileLoaderMatcher
=
function
(
rule
)
{
const
fileLoaderMatcher
=
function
(
rule
)
{
return
rule
.
loader
&&
rule
.
loader
.
indexOf
(
`file-loader`
)
!==
-
1
;
return
rule
.
loader
&&
rule
.
loader
.
indexOf
(
`file-loader`
)
!==
-
1
;
...
@@ -74,38 +50,6 @@ function addPlugin(config) {
...
@@ -74,38 +50,6 @@ function addPlugin(config) {
]
]
},
},
/*-------------------------------------------ant design webpack config end-----------------------------------------------*/
/*-------------------------------------------ant design webpack config end-----------------------------------------------*/
/*-------------------------------------------ckeditor5 webpack config start-----------------------------------------------*/
{
test
:
/ckeditor5-
[^/\\]
+
[/\\]
theme
[/\\]
icons
[/\\][^/\\]
+
\.
svg$/
,
use
:
[
'raw-loader'
]
},
{
test
:
/ckeditor5-
[^/\\]
+
[/\\]
theme
[/\\]
.+
\.
css/
,
use
:
[
{
loader
:
'style-loader'
,
options
:
{
singleton
:
true
}
},
{
loader
:
'postcss-loader'
,
options
:
styles
.
getPostCssConfig
({
themeImporter
:
{
themePath
:
require
.
resolve
(
'@ckeditor/ckeditor5-theme-lark'
)
},
minify
:
true
})
}
]
},
{
test
:
/
\.
css$/
,
exclude
:
/ckeditor5-
[^/\\]
+
[/\\]
theme
[/\\]
.+
\.
css/
,
// (...)
}
/*-------------------------------------------ckeditor5 webpack config end-----------------------------------------------*/
],
],
...
config
.
module
.
rules
[
2
].
oneOf
...
config
.
module
.
rules
[
2
].
oneOf
];
];
...
@@ -122,8 +66,6 @@ function addPlugin(config) {
...
@@ -122,8 +66,6 @@ function addPlugin(config) {
l
.
exclude
=
reg
;
l
.
exclude
=
reg
;
}
}
config
.
plugins
.
push
(
CKEditorPlugin
);
return
config
;
return
config
;
}
}
...
...
package.json
View file @
6dd082ea
...
@@ -5,23 +5,6 @@
...
@@ -5,23 +5,6 @@
"dependencies"
:
{
"dependencies"
:
{
"
@babel/core
"
:
"7.2.2"
,
"
@babel/core
"
:
"7.2.2"
,
"
@babel/plugin-transform-react-jsx
"
:
"^7.3.0"
,
"
@babel/plugin-transform-react-jsx
"
:
"^7.3.0"
,
"
@ckeditor/ckeditor5-alignment
"
:
"^11.1.0"
,
"
@ckeditor/ckeditor5-basic-styles
"
:
"^11.1.0"
,
"
@ckeditor/ckeditor5-build-classic
"
:
"^12.1.0"
,
"
@ckeditor/ckeditor5-dev-utils
"
:
"^12.0.1"
,
"
@ckeditor/ckeditor5-dev-webpack-plugin
"
:
"^8.0.1"
,
"
@ckeditor/ckeditor5-easy-image
"
:
"^11.0.1"
,
"
@ckeditor/ckeditor5-editor-classic
"
:
"^12.1.0"
,
"
@ckeditor/ckeditor5-essentials
"
:
"^11.0.1"
,
"
@ckeditor/ckeditor5-font
"
:
"^11.1.0"
,
"
@ckeditor/ckeditor5-heading
"
:
"^11.0.1"
,
"
@ckeditor/ckeditor5-image
"
:
"^13.0.1"
,
"
@ckeditor/ckeditor5-link
"
:
"^11.0.1"
,
"
@ckeditor/ckeditor5-list
"
:
"^12.0.1"
,
"
@ckeditor/ckeditor5-paragraph
"
:
"^11.0.1"
,
"
@ckeditor/ckeditor5-react
"
:
"^1.1.3"
,
"
@ckeditor/ckeditor5-table
"
:
"^12.0.1"
,
"
@ckeditor/ckeditor5-theme-lark
"
:
"^13.0.1"
,
"
@svgr/webpack
"
:
"4.1.0"
,
"
@svgr/webpack
"
:
"4.1.0"
,
"
antd
"
:
"^3.18.1"
,
"
antd
"
:
"^3.18.1"
,
"
babel-core
"
:
"7.0.0-bridge.0"
,
"
babel-core
"
:
"7.0.0-bridge.0"
,
...
...
src/page/overall/overall.js
View file @
6dd082ea
...
@@ -4,81 +4,6 @@ import {JFLoading} from "../../component/JFLoading/JFLoading";
...
@@ -4,81 +4,6 @@ import {JFLoading} from "../../component/JFLoading/JFLoading";
import
{
observer
,
inject
}
from
"mobx-react/index"
;
import
{
observer
,
inject
}
from
"mobx-react/index"
;
import
{
JFPageHeader
}
from
"../../component/JFPageHeader/JFPageHeader"
;
import
{
JFPageHeader
}
from
"../../component/JFPageHeader/JFPageHeader"
;
import
{
JFContent
,
JFContentHeader
}
from
"../../component/JFContent/JFContent"
;
import
{
JFContent
,
JFContentHeader
}
from
"../../component/JFContent/JFContent"
;
import
{
Icon
,
Switch
}
from
'antd'
;
import
Clipboard
from
'react-clipboard.js'
;
import
{
CartesianGrid
,
Line
,
LineChart
,
ResponsiveContainer
,
Tooltip
,
XAxis
,
YAxis
}
from
"recharts"
;
import
{
Message
}
from
"../../common/message"
;
import
{
numberSplit
}
from
"../../common/utils"
;
import
CKEditor
from
'@ckeditor/ckeditor5-react'
;
import
ClassicEditor
from
'@ckeditor/ckeditor5-editor-classic/src/classiceditor'
;
import
Alignment
from
'@ckeditor/ckeditor5-alignment/src/alignment'
;
import
Heading
from
'@ckeditor/ckeditor5-heading/src/heading'
;
import
Bold
from
'@ckeditor/ckeditor5-basic-styles/src/bold'
;
import
Italic
from
'@ckeditor/ckeditor5-basic-styles/src/italic'
;
import
Paragraph
from
'@ckeditor/ckeditor5-paragraph/src/paragraph'
;
import
Link
from
'@ckeditor/ckeditor5-link/src/link'
;
import
Table
from
'@ckeditor/ckeditor5-table/src/table'
;
import
Essentials
from
'@ckeditor/ckeditor5-essentials/src/essentials'
;
import
TableToolbar
from
'@ckeditor/ckeditor5-table/src/tabletoolbar'
;
import
Font
from
'@ckeditor/ckeditor5-font/src/font'
;
import
List
from
'@ckeditor/ckeditor5-list/src/list'
;
import
Image
from
'@ckeditor/ckeditor5-image/src/image'
;
import
ImageToolbar
from
'@ckeditor/ckeditor5-image/src/imagetoolbar'
;
import
ImageCaption
from
'@ckeditor/ckeditor5-image/src/imagecaption'
;
import
ImageStyle
from
'@ckeditor/ckeditor5-image/src/imagestyle'
;
import
EasyImage
from
'@ckeditor/ckeditor5-easy-image/src/easyimage'
;
const
ckEditorConfig
=
{
plugins
:[
Essentials
,
Heading
,
Font
,
Alignment
,
Bold
,
Italic
,
Link
,
Table
,
TableToolbar
,
List
,
Image
,
ImageToolbar
,
ImageCaption
,
ImageStyle
,
EasyImage
],
toolbar
:
[
'heading'
,
'|'
,
'fontFamily'
,
'fontSize'
,
'fontColor'
,
'fontBackgroundColor'
,
'bulletedList'
,
'numberedList'
,
'alignment'
,
'bold'
,
'italic'
,
'link'
,
'insertTable'
,
'imageUpload'
,
'|'
,
'undo'
,
'redo'
],
table
:
{
contentToolbar
:
[
'tableColumn'
,
'tableRow'
,
'mergeTableCells'
]
},
fontFamily
:
{
options
:
[
'default'
,
'Arial, Helvetica, sans-serif'
,
'Courier New, Courier, monospace'
,
'Georgia, serif'
,
'Lucida Sans Unicode, Lucida Grande, sans-serif'
,
'Tahoma, Geneva, sans-serif'
,
'Times New Roman, Times, serif'
,
'Trebuchet MS, Helvetica, sans-serif'
,
'Verdana, Geneva, sans-serif'
]
},
fontSize
:
{
options
:
[
12
,
13
,
14
,
15
,
'default'
,
17
,
18
,
19
,
21
,
22
,
23
,
24
]
},
fontColor
:
{
columns
:
8
,
// ...
},
fontBackgroundColor
:
{
columns
:
8
,
// ...
},
image
:
{
toolbar
:
[
'imageTextAlternative'
,
'|'
,
'imageStyle:full'
,
'imageStyle:side'
],
styles
:
[
'full'
,
'side'
,
'alignLeft'
,
'alignCenter'
,
'alignRight'
]
},
// 图片上传配置
cloudServices
:
{
// tokenUrl: 'https://example.com/cs-token-endpoint',
// uploadUrl: 'https://your-organization-id.cke-cs.com/easyimage/upload/'
}
};
@
inject
(
'overallStore'
,
'appStore'
)
@
inject
(
'overallStore'
,
'appStore'
)
@
observer
@
observer
...
@@ -91,40 +16,13 @@ class Overall extends Component {
...
@@ -91,40 +16,13 @@ class Overall extends Component {
render
()
{
render
()
{
let
obj
=
{};
let
obj
=
{};
let
{
overallStore
,
appStore
}
=
this
.
props
;
let
{
overallStore
,
appStore
}
=
this
.
props
;
let
pvData
=
overallStore
.
pvInfo
.
filter
(({
day
,
flows
})
=>
{
return
flows
.
length
!==
0
})
.
map
(({
day
,
flows
})
=>
{
return
{
day
,...(
function
()
{
obj
=
{};
for
(
let
i
=
0
;
i
<
flows
.
length
;
i
++
)
{
obj
[
'f'
+
i
]
=
flows
[
i
].
count
}
return
obj
;
}())}});
return
(
return
(
<
Fragment
>
<
Fragment
>
<
JFLoading
loading
=
{
overallStore
.
loading
}
mask
=
{
true
}
/
>
<
JFLoading
loading
=
{
overallStore
.
loading
}
mask
=
{
true
}
/
>
<
div
className
=
{
'ps-overall'
}
>
<
div
className
=
{
'ps-overall'
}
>
<
JFPageHeader
routes
=
{[{
name
:
'总览'
}]}
/
>
<
JFPageHeader
routes
=
{[{
name
:
'总览'
}]}
/
>
<
JFContent
>
<
JFContent
>
<
CKEditor
editor
=
{
ClassicEditor
}
data
=
"<p>Hello from CKEditor 5!</p>"
config
=
{
ckEditorConfig
}
onInit
=
{
editor
=>
{
// You can store the "editor" and use when it is needed.
console
.
log
(
'Editor is ready to use!'
,
editor
);
}
}
onChange
=
{
(
event
,
editor
)
=>
{
const
data
=
editor
.
getData
();
console
.
log
(
{
event
,
editor
,
data
}
);
}
}
onBlur
=
{
editor
=>
{
console
.
log
(
'Blur.'
,
editor
);
}
}
onFocus
=
{
editor
=>
{
console
.
log
(
'Focus.'
,
editor
);
}
}
/
>
<
/JFContent
>
<
/JFContent
>
<
/div
>
<
/div
>
<
/Fragment
>
<
/Fragment
>
...
...
yarn.lock
deleted
100644 → 0
View file @
88302268
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment