Skip to content

Commit caf7d3f

Browse files
committed
first run
1 parent 0caa975 commit caf7d3f

File tree

19 files changed

+1084
-455
lines changed

19 files changed

+1084
-455
lines changed

mock/article.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,41 @@
11
const Mock = require('mockjs')
2+
const Random = Mock.Random;
23

34
const List = []
45
const count = 100
56

67
const baseContent = '<p>I am testing data, I am testing data.</p><p><img src="https://wpimg.wallstcn.com/4c69009c-0fd4-4153-b112-6cb53d1cf943"></p>'
78
const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
8-
99
for (let i = 0; i < count; i++) {
10+
// List.push(Mock.mock({
11+
// id: '@increment',
12+
// timestamp: +Mock.Random.date('T'),
13+
// author: '@first',
14+
// reviewer: '@first',
15+
// title: '@title(5, 10)',
16+
// content_short: 'mock data',
17+
// content: baseContent,
18+
// forecast: '@float(0, 100, 2, 2)',
19+
// importance: '@integer(1, 3)',
20+
// 'type|1': ['CN', 'US', 'JP', 'EU'],
21+
// 'status|1': ['published', 'draft'],
22+
// display_time: '@datetime',
23+
// comment_disabled: true,
24+
// pageviews: '@integer(300, 5000)',
25+
// image_uri,
26+
// platforms: ['a-platform']
27+
// }))
1028
List.push(Mock.mock({
1129
id: '@increment',
1230
timestamp: +Mock.Random.date('T'),
1331
author: '@first',
32+
'location|1': ['丰县', '沛县', '睢宁县', '云龙区', '鼓楼区', '泉山区', '铜山区', '贾汪区'],
33+
'name|1': ['拖拉机', '无人机', '推土机', '抽水机', '除草机器人'],
34+
PurchaseDate: '@datetime',
35+
'state|1': ['使用中', '维修中', '未使用', '已报废'],
36+
'brand': '@id',
37+
description: Random.sentence(),
38+
owner: '@cname',
1439
reviewer: '@first',
1540
title: '@title(5, 10)',
1641
content_short: 'mock data',

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@
1515
"test:ci": "npm run lint && npm run test:unit"
1616
},
1717
"dependencies": {
18+
"@babel/core": "^7.21.0",
19+
"@toast-ui/editor": "^3.1.3",
1820
"axios": "0.18.1",
21+
"body-parser": "^1.20.2",
22+
"cache-loader": "^4.1.0",
1923
"clipboard": "2.0.4",
2024
"codemirror": "5.45.0",
21-
"core-js": "3.6.5",
25+
"core-js": "^3.29.0",
2226
"driver.js": "0.9.5",
2327
"dropzone": "5.5.1",
2428
"echarts": "4.2.1",
@@ -31,19 +35,22 @@
3135
"normalize.css": "7.0.0",
3236
"nprogress": "0.2.0",
3337
"path-to-regexp": "2.4.0",
38+
"regenerator-runtime": "^0.13.11",
3439
"screenfull": "4.2.0",
3540
"script-loader": "0.7.2",
3641
"sortablejs": "1.8.4",
37-
"tui-editor": "1.3.3",
42+
"svg-baker-runtime": "^1.4.7",
3843
"vue": "2.6.10",
3944
"vue-count-to": "1.0.13",
4045
"vue-router": "3.0.2",
4146
"vue-splitpane": "1.0.4",
47+
"vue-style-loader": "^4.1.3",
4248
"vuedraggable": "2.20.0",
4349
"vuex": "3.1.0",
4450
"xlsx": "0.14.1"
4551
},
4652
"devDependencies": {
53+
"@babel/runtime": "^7.21.0",
4754
"@vue/cli-plugin-babel": "4.4.4",
4855
"@vue/cli-plugin-eslint": "4.4.4",
4956
"@vue/cli-plugin-unit-jest": "4.4.4",
@@ -70,7 +77,8 @@
7077
"serve-static": "1.13.2",
7178
"svg-sprite-loader": "4.1.3",
7279
"svgo": "1.2.0",
73-
"vue-template-compiler": "2.6.10"
80+
"vue-template-compiler": "2.6.10",
81+
"webpack": "^4.0.0"
7482
},
7583
"browserslist": [
7684
"> 1%",

src/components/MarkdownEditor/index.vue

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44

55
<script>
66
// deps for editor
7-
import 'codemirror/lib/codemirror.css' // codemirror
8-
import 'tui-editor/dist/tui-editor.css' // editor ui
9-
import 'tui-editor/dist/tui-editor-contents.css' // editor content
7+
// import 'codemirror/lib/codemirror.css' // codemirror
8+
// import 'tui-editor/dist/tui-editor.css' // editor ui
9+
// import 'tui-editor/dist/tui-editor-contents.css' // editor content
1010
11-
import Editor from 'tui-editor'
11+
import 'codemirror/lib/codemirror.css'
12+
import '@toast-ui/editor/dist/toastui-editor.css'
13+
import Editor from '@toast-ui/editor'
1214
import defaultOptions from './default-options'
1315
16+
// import Editor from 'tui-editor'
17+
// import defaultOptions from './default-options'
18+
1419
export default {
1520
name: 'MarkdownEditor',
1621
props: {
@@ -101,10 +106,10 @@ export default {
101106
this.editor.off('change')
102107
this.editor.remove()
103108
},
104-
setValue(value) {
109+
setMarkdown(value) {
105110
this.editor.setValue(value)
106111
},
107-
getValue() {
112+
getMarkdown() {
108113
return this.editor.getValue()
109114
},
110115
setHtml(value) {

0 commit comments

Comments
 (0)