yks-element 1.0.319 → 1.0.322
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/yks.css +1 -1
- package/package.json +1 -1
- package/packages/Tinymce/src/index.vue +0 -4
- package/packages/Topic/index.js +23 -9
- package/packages/Topic/src/attachment.vue +1 -1
- package/packages/Topic/src/audioFrequency.vue +1 -1
- package/packages/Topic/src/clozeFillInBlanks.vue +1 -1
- package/packages/Topic/src/compound.vue +1 -1
- package/packages/Topic/src/config.js +132 -0
- package/packages/Topic/src/fillInBlanks.vue +1 -1
- package/packages/Topic/src/judgment.vue +1 -1
- package/packages/Topic/src/multiple.vue +1 -1
- package/packages/Topic/src/pictureAnswer.vue +1 -1
- package/packages/Topic/src/shortAnswer.vue +1 -1
- package/packages/Topic/src/single.vue +1 -1
- package/packages/UploadFile/src/index.vue +1 -2
- package/packages/index.js +5 -24
package/package.json
CHANGED
package/packages/Topic/index.js
CHANGED
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import Single from './src/single'
|
|
2
|
+
import Multiple from './src/multiple'
|
|
3
|
+
import Judgment from './src/judgment'
|
|
4
|
+
import FillInBlanks from './src/fillInBlanks'
|
|
5
|
+
import ShortAnswer from './src/shortAnswer'
|
|
6
|
+
import PictureAnswer from './src/pictureAnswer'
|
|
7
|
+
import Compound from './src/compound'
|
|
8
|
+
import AudioFrequency from './src/audioFrequency'
|
|
9
|
+
import Attachment from './src/attachment'
|
|
10
|
+
|
|
11
|
+
const components = [
|
|
12
|
+
Single,
|
|
13
|
+
Multiple,
|
|
14
|
+
Judgment,
|
|
15
|
+
FillInBlanks,
|
|
16
|
+
ShortAnswer,
|
|
17
|
+
PictureAnswer,
|
|
18
|
+
Compound,
|
|
19
|
+
AudioFrequency,
|
|
20
|
+
Attachment
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
export default components
|
|
@@ -55,7 +55,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
55
55
|
import { stemItemType, shortItemType, analysisItemType } from './config'
|
|
56
56
|
|
|
57
57
|
export default {
|
|
58
|
-
name: '
|
|
58
|
+
name: 'YksAttachment',
|
|
59
59
|
components: { YksTinymce },
|
|
60
60
|
mixins: [TopicMixins],
|
|
61
61
|
methods: {
|
|
@@ -56,7 +56,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
56
56
|
import { stemItemType, shortItemType, analysisItemType } from './config'
|
|
57
57
|
|
|
58
58
|
export default {
|
|
59
|
-
name: '
|
|
59
|
+
name: 'YksAudiofrequency',
|
|
60
60
|
components: { YksTinymce },
|
|
61
61
|
mixins: [TopicMixins],
|
|
62
62
|
methods: {
|
|
@@ -110,7 +110,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
110
110
|
import { stemItemType, optionItemType, analysisItemType } from './config'
|
|
111
111
|
|
|
112
112
|
export default {
|
|
113
|
-
name: '
|
|
113
|
+
name: 'YksClozefillinblanks',
|
|
114
114
|
components: { YksTinymce },
|
|
115
115
|
mixins: [TopicMixins],
|
|
116
116
|
methods: {
|
|
@@ -83,7 +83,7 @@ import { analysisItemType, stemItemType, itemDataLists } from './config'
|
|
|
83
83
|
import { Single, Multiple, Judgment, ShortAnswer } from '../index'
|
|
84
84
|
|
|
85
85
|
export default {
|
|
86
|
-
name: '
|
|
86
|
+
name: 'YksCompound',
|
|
87
87
|
components: { YksTinymce, Single, Multiple, Judgment, ShortAnswer },
|
|
88
88
|
mixins: [TopicMixins],
|
|
89
89
|
methods: {
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* uploadRecording 录音
|
|
3
|
+
* uploadVideo 视频
|
|
4
|
+
* uploadAudio 音频
|
|
5
|
+
* uploadFile 文件
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export const toolbar = [
|
|
9
|
+
'bold underline italic strikethrough | kityformula-editor subscript superscript charmap | link image | table | removeformat | uploadRecording uploadVideo uploadAudio uploadFile'
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
/* 选项、填空等 */
|
|
13
|
+
export const toolbarSpare = ['kityformula-editor subscript superscript charmap']
|
|
14
|
+
|
|
15
|
+
/* 插件 */
|
|
16
|
+
export const plugins = ['kityformula-editor powerpaste lists image media table charmap imagetools']
|
|
17
|
+
|
|
18
|
+
/* 选项字符 */
|
|
19
|
+
export const letter = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N']
|
|
20
|
+
|
|
21
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件):题干 / 标题 - 类型 */
|
|
22
|
+
export const stemItemType = {
|
|
23
|
+
recording: 'stem_voiceRecord',
|
|
24
|
+
video: 'stem_video',
|
|
25
|
+
audio: 'stem_audio',
|
|
26
|
+
file: 'stem_document'
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件): 标准答案 - 类型 */
|
|
30
|
+
export const shortItemType = {
|
|
31
|
+
recording: 'answer_voiceRecord',
|
|
32
|
+
video: 'answer_video',
|
|
33
|
+
audio: 'answer_audio',
|
|
34
|
+
file: 'answer_document'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件): 选项 - 类型 */
|
|
38
|
+
export const optionItemType = {
|
|
39
|
+
recording: 'option_voiceRecord',
|
|
40
|
+
video: 'option_video',
|
|
41
|
+
audio: 'option_audio',
|
|
42
|
+
file: 'option_document'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* 自定义添加菜单项(录音、上传视频、上传音乐、上传文件): 答案解析 - 类型 */
|
|
46
|
+
export const analysisItemType = {
|
|
47
|
+
recording: 'description_voiceRecord',
|
|
48
|
+
video: 'description_video',
|
|
49
|
+
audio: 'description_audio',
|
|
50
|
+
file: 'description_document'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 获取题类型
|
|
55
|
+
* @param {string} type
|
|
56
|
+
* @return {Object}
|
|
57
|
+
*/
|
|
58
|
+
export const getFileType = (type, data) => {
|
|
59
|
+
if (data) {
|
|
60
|
+
let params = {}
|
|
61
|
+
switch (type) {
|
|
62
|
+
case 'stem':
|
|
63
|
+
params = {
|
|
64
|
+
stem_voiceRecord: 'recording',
|
|
65
|
+
stem_video: 'video',
|
|
66
|
+
stem_audio: 'audio',
|
|
67
|
+
stem_document: 'file'
|
|
68
|
+
}
|
|
69
|
+
break
|
|
70
|
+
case 'answer':
|
|
71
|
+
params = {
|
|
72
|
+
answer_voiceRecord: 'recording',
|
|
73
|
+
answer_video: 'video',
|
|
74
|
+
answer_audio: 'audio',
|
|
75
|
+
answer_document: 'file'
|
|
76
|
+
}
|
|
77
|
+
break
|
|
78
|
+
case 'option':
|
|
79
|
+
params = {
|
|
80
|
+
option_voiceRecord: 'recording',
|
|
81
|
+
option_video: 'video',
|
|
82
|
+
option_audio: 'audio',
|
|
83
|
+
option_document: 'file'
|
|
84
|
+
}
|
|
85
|
+
break
|
|
86
|
+
case 'analysis':
|
|
87
|
+
params = {
|
|
88
|
+
description_voiceRecord: 'recording',
|
|
89
|
+
description_video: 'video',
|
|
90
|
+
description_audio: 'audio',
|
|
91
|
+
description_document: 'file'
|
|
92
|
+
}
|
|
93
|
+
break
|
|
94
|
+
}
|
|
95
|
+
const fileType = params[data.type]
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
...data,
|
|
99
|
+
fileType
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return false
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const itemDataLists = () => {
|
|
106
|
+
return [
|
|
107
|
+
{
|
|
108
|
+
optionName: 'A',
|
|
109
|
+
content: '',
|
|
110
|
+
optionAttrs: [],
|
|
111
|
+
score: ''
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
optionName: 'B',
|
|
115
|
+
content: '',
|
|
116
|
+
optionAttrs: [],
|
|
117
|
+
score: ''
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
optionName: 'C',
|
|
121
|
+
content: '',
|
|
122
|
+
optionAttrs: [],
|
|
123
|
+
score: ''
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
optionName: 'D',
|
|
127
|
+
content: '',
|
|
128
|
+
optionAttrs: [],
|
|
129
|
+
score: ''
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
@@ -116,7 +116,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
116
116
|
import { stemItemType, optionItemType, analysisItemType } from './config'
|
|
117
117
|
|
|
118
118
|
export default {
|
|
119
|
-
name: '
|
|
119
|
+
name: 'YksFillinblanks',
|
|
120
120
|
components: { YksTinymce },
|
|
121
121
|
mixins: [TopicMixins],
|
|
122
122
|
methods: {
|
|
@@ -81,7 +81,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
81
81
|
import { letter, stemItemType, optionItemType, analysisItemType } from './config'
|
|
82
82
|
|
|
83
83
|
export default {
|
|
84
|
-
name: '
|
|
84
|
+
name: 'YksMultiple',
|
|
85
85
|
components: { YksTinymce },
|
|
86
86
|
mixins: [TopicMixins],
|
|
87
87
|
methods: {
|
|
@@ -56,7 +56,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
56
56
|
import { stemItemType, shortItemType, analysisItemType } from './config'
|
|
57
57
|
|
|
58
58
|
export default {
|
|
59
|
-
name: '
|
|
59
|
+
name: 'YksPictureanswer',
|
|
60
60
|
components: { YksTinymce },
|
|
61
61
|
mixins: [TopicMixins],
|
|
62
62
|
methods: {
|
|
@@ -66,7 +66,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
66
66
|
import { stemItemType, shortItemType, analysisItemType } from './config'
|
|
67
67
|
|
|
68
68
|
export default {
|
|
69
|
-
name: '
|
|
69
|
+
name: 'YksShortanswer',
|
|
70
70
|
components: { YksTinymce },
|
|
71
71
|
mixins: [TopicMixins],
|
|
72
72
|
methods: {
|
|
@@ -81,7 +81,7 @@ import TopicMixins from '../../assets/mixins/topic'
|
|
|
81
81
|
import { letter, stemItemType, optionItemType, analysisItemType } from './config'
|
|
82
82
|
|
|
83
83
|
export default {
|
|
84
|
-
name: '
|
|
84
|
+
name: 'YksSingle',
|
|
85
85
|
components: { YksTinymce },
|
|
86
86
|
mixins: [TopicMixins],
|
|
87
87
|
methods: {
|
package/packages/index.js
CHANGED
|
@@ -92,19 +92,8 @@ import YksScrollbar from './Scrollbar'
|
|
|
92
92
|
import YksTable from './Table'
|
|
93
93
|
import YksUploadfile from './UploadFile'
|
|
94
94
|
import YksVideo from './Video'
|
|
95
|
-
import YksOption from './option
|
|
96
|
-
|
|
97
|
-
import {
|
|
98
|
-
Single,
|
|
99
|
-
Multiple,
|
|
100
|
-
Judgment,
|
|
101
|
-
FillInBlanks,
|
|
102
|
-
ShortAnswer,
|
|
103
|
-
PictureAnswer,
|
|
104
|
-
Compound,
|
|
105
|
-
AudioFrequency,
|
|
106
|
-
Attachment
|
|
107
|
-
} from './Topic/index'
|
|
95
|
+
import YksOption from './option'
|
|
96
|
+
import YksTopic from './Topic'
|
|
108
97
|
|
|
109
98
|
import locale from 'element-ui/src/locale'
|
|
110
99
|
const components = [
|
|
@@ -118,7 +107,8 @@ const components = [
|
|
|
118
107
|
YksTable,
|
|
119
108
|
YksUploadfile,
|
|
120
109
|
YksOption,
|
|
121
|
-
YksVideo
|
|
110
|
+
YksVideo,
|
|
111
|
+
...YksTopic
|
|
122
112
|
]
|
|
123
113
|
const install = function (Vue, opts = {}) {
|
|
124
114
|
locale.use(opts.locale)
|
|
@@ -148,19 +138,10 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
148
138
|
install(window.Vue)
|
|
149
139
|
}
|
|
150
140
|
export default {
|
|
151
|
-
version: '1.0.
|
|
141
|
+
version: '1.0.322',
|
|
152
142
|
locale: locale.use,
|
|
153
143
|
i18n: locale.i18n,
|
|
154
144
|
install,
|
|
155
|
-
Single,
|
|
156
|
-
Multiple,
|
|
157
|
-
Judgment,
|
|
158
|
-
FillInBlanks,
|
|
159
|
-
ShortAnswer,
|
|
160
|
-
PictureAnswer,
|
|
161
|
-
Compound,
|
|
162
|
-
AudioFrequency,
|
|
163
|
-
Attachment,
|
|
164
145
|
/* element-ui */
|
|
165
146
|
Pagination,
|
|
166
147
|
Dialog,
|