zydx-plus 1.20.124 → 1.28.124
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/package.json +2 -1
- package/src/components/biz_header/src/button_name.js +25 -4
- package/src/components/choice/index.js +6 -0
- package/src/components/choice/src/choice.vue +149 -0
- package/src/components/editor2/src/editor.vue +6 -0
- package/src/components/preface/index.js +6 -0
- package/src/components/preface/src/preface.vue +114 -0
- package/src/index.js +9 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zydx-plus",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.124",
|
|
4
4
|
"description": "Vue.js",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"files": [
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"@tiptap/extension-image": "^2.0.3",
|
|
32
32
|
"@tiptap/starter-kit": "^2.0.3",
|
|
33
33
|
"@tiptap/vue-3": "^2.0.3",
|
|
34
|
+
"@tiptap/extension-text-align": "^2.0.3",
|
|
34
35
|
"@vue-office/docx": "^1.1.3",
|
|
35
36
|
"@vue-office/excel": "^1.1.3"
|
|
36
37
|
},
|
|
@@ -2006,18 +2006,18 @@ let buttonNames = {
|
|
|
2006
2006
|
headLevel: {
|
|
2007
2007
|
default: "demand",
|
|
2008
2008
|
demand: '训练要求',
|
|
2009
|
-
resourceIndex: '
|
|
2009
|
+
resourceIndex: '训练题目',
|
|
2010
2010
|
analyse: '训练分析',
|
|
2011
2011
|
countermeasure: '教学对策'
|
|
2012
2012
|
},
|
|
2013
2013
|
otherLevel: {
|
|
2014
2014
|
default: "singletonClass",
|
|
2015
|
-
singletonClass: this.getCurrentPrefix(item) + '
|
|
2016
|
-
allClass: this.getPrefix(item) + '
|
|
2015
|
+
singletonClass: this.getCurrentPrefix(item) + '题目',
|
|
2016
|
+
allClass: this.getPrefix(item) + '题目'
|
|
2017
2017
|
},
|
|
2018
2018
|
lowLevel: {
|
|
2019
2019
|
default: "singletonClass",
|
|
2020
|
-
singletonClass: this.getCurrentPrefix(item) + '
|
|
2020
|
+
singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
2023
|
}
|
|
@@ -2404,6 +2404,27 @@ let buttonNames = {
|
|
|
2404
2404
|
}
|
|
2405
2405
|
}
|
|
2406
2406
|
},
|
|
2407
|
+
resource_lesson_rhyme: {
|
|
2408
|
+
actionName: '课程歌诀',
|
|
2409
|
+
buttonList: {
|
|
2410
|
+
0: {
|
|
2411
|
+
headLevel: {
|
|
2412
|
+
default: "btnIndex1",
|
|
2413
|
+
btnIndex1: this.getCurrentPrefix(item) + '歌诀',
|
|
2414
|
+
btnIndex2: this.getPrefix(item) + '歌诀'
|
|
2415
|
+
},
|
|
2416
|
+
otherLevel: {
|
|
2417
|
+
default: "btnIndex1",
|
|
2418
|
+
btnIndex1: this.getCurrentPrefix(item) + '歌诀',
|
|
2419
|
+
btnIndex2: this.getPrefix(item) + '歌诀'
|
|
2420
|
+
},
|
|
2421
|
+
lowLevel: {
|
|
2422
|
+
default: "btnIndex1",
|
|
2423
|
+
btnIndex1: this.getCurrentPrefix(item) + '歌诀',
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
},
|
|
2407
2428
|
}[this.actionId];
|
|
2408
2429
|
},
|
|
2409
2430
|
// 获取前缀内容
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="choice">
|
|
3
|
+
<div class="choice-title">
|
|
4
|
+
<div class="choice-title-left">
|
|
5
|
+
<span><i>*</i>试题选项:</span>
|
|
6
|
+
<em>(每道多选题至少有两个正确项, 所有选项需给出至少一个答案)</em>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="choice-title-right">
|
|
9
|
+
<button class="but" @click="add('correct')">增正确项</button>
|
|
10
|
+
<button class="but" @click="add('interfere')">增干扰项</button>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="choice-list" v-for="(item,index) in list">
|
|
14
|
+
<div class="list-title" :class="{'lv-color': item.type === 'correct','red-color': item.type === 'interfere'}">
|
|
15
|
+
<span>{{ item.letter }} . {{ item.title }}</span>
|
|
16
|
+
<button class="but" @click="alternative(index)">增加备选</button>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="list-cont">
|
|
19
|
+
<div class="list-cont-li" v-for="(it,ins) in item.list">
|
|
20
|
+
<span>{{ ins + 1 }}.</span>
|
|
21
|
+
<div class="list-cont-input">
|
|
22
|
+
<input type="text" v-model="it.value" placeholder="请输入选项..." />
|
|
23
|
+
<img @click="del(index,ins)" v-if="ins !== 0" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAADgxJREFUeF7tnUmQHMUVht8bJgQnOxTBieDki20mvBzHqkxx9NWnQWKRkACBxKoN0C6x7/vi3QavzImjryizxByNHYPti0+ETopQ2CcgpElHEy3FMO6eqcp82V318tdV9V7n+159pdH8M91M+AMCIDCWAIMNCIDAeAIQBHcHCKxDAILg9gABCIJ7AATiCOBfkDhuqCqEAAQpZNEYM44ABInjhqpCCECQQhaNMeMIQJA4bqgqhAAEKWTRGDOOAASJ44aqQghAkEIWjTHjCECQOG6oKoQABClk0RgzjgAEieOGqkIIQJBCFo0x4whAkDhuqCqEAAQpZNEYM44ABInjhqpCCECQQhaNMeMIQJA4bqgqhAAEKWTRGDOOAASJ44aqQghAkEIWjTHjCECQOG6oKoQABClk0RgzjgAEieOGqkIIQJBCFo0x4whAkDhuqCqEAAQpZNEYM44ABInjhqpCCECQQhaNMeMIQJA4bqgqhAAEKWTRGDOOAASJ44aqQghAkEIWjTHjCECQOG6oKoQABClk0RgzjgAEieOGqkIIQJBCFo0x4whAkDhuqCqEAAQpZNEYM44ABInjhqpCCECQQhaNMeMIQJA4bqgqhAAEKWTRGDOOAASJ44a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/C0FdomBmESAevny5e/ffPPNf09h37VadYIsLi5uuuGGG/5DRNdFwi4qCFvNKDFI/fz8+fPfXFhY+DKSeyfL1AkyoOy9f4+IdkQQLyYAG8cmIVB93xizM4J5p0tUCrK0tHTTpUuXFolorin9UoKvJjwigtXl2dnZhfn5+U+b9O/TNSoFGSygjSQlBF5tb8oWAataOQbM1ArSQhLVQVdbMdb8n2SjoFW1HOoFaSCJ2oArRYw1kowLXNXLUYQgqyQZLPonRHQtEX0SQvhQY7AlJcbqPsPgdcBukC19QUQfzs7OPqHx/xxr+an+EmvtsMvLy5suXLjwbW3fq88hxaieg4zp+uuv/9fc3Jyqb+Wux68oQSZ1I+F19BCAIHp2iUkyEIAgGaCipR4CEETPLjFJBgIQJANUtNRDAILo2SUmyUAAgmSAipZ6CEAQPbvEJBkIQJAMUNFSDwEIomeXmCQDAQiSASpa6iEAQfTsEpNkIABBMkBFSz0EIIieXWKSDAQgSAaoaKmHAATRs0tMkoEABMkAFS31EIAgenaJSTIQgCAZoKKlHgIQRM8uMUkGAhAkA1S01EMAgujZJSbJQACCZICKlnoIQBA9u8QkGQhAkAxQ0VIPAQiiZ5eYJAMBCJIBKlrqIQBB9OwSk2QgAEEyQEVLPQQgiJ5dYpIMBCBIBqhoqYcABNGzS0ySgQAEyQAVLfUQgCB6dolJMhCAIBmgoqUeAhBEzy4xSQYCECQDVLTUQwCC6NklJslAAIJkgIqWeghAED27xCQZCECQDFDRUg8BCKJnl5gkAwEIkgEqWuohAEH07BKTZCAAQTJARUs9BCCInl1ikgwEIEgGqGiphwAE0bNLTJKBAATJABUt9RCAIHp2iUkyEIAgGaCipR4CEETPLjFJBgL/AxlskwUkBhJ9AAAAAElFTkSuQmCC" alt="" />
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default {
|
|
33
|
+
name: "zydx-choice",
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
list: [],
|
|
37
|
+
letter: {0:'A',1:'B',2:'C',3:'D',4:'E',5:'F',6:'G',7:'H'},
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
getContent() {
|
|
42
|
+
return this.list
|
|
43
|
+
},
|
|
44
|
+
add(str) {
|
|
45
|
+
const index = this.list.length
|
|
46
|
+
if(index === 8) return
|
|
47
|
+
this.list.push({
|
|
48
|
+
type: str,
|
|
49
|
+
letter: this.letter[index],
|
|
50
|
+
title: (str === 'correct')? '正确选项' : '干扰选项',
|
|
51
|
+
list: [{value: ''}]
|
|
52
|
+
})
|
|
53
|
+
},
|
|
54
|
+
alternative(index) {
|
|
55
|
+
this.list[index].list.push({value: ''})
|
|
56
|
+
},
|
|
57
|
+
del(index,ins) {
|
|
58
|
+
this.list[index].list.splice(ins, 1)
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped>
|
|
65
|
+
.list-cont-input{
|
|
66
|
+
width: 100%;
|
|
67
|
+
height: 30px;
|
|
68
|
+
border: 1px solid #ccc;
|
|
69
|
+
position: relative;
|
|
70
|
+
}
|
|
71
|
+
.list-cont-input input{
|
|
72
|
+
width: 100%;
|
|
73
|
+
height: 100%;
|
|
74
|
+
border: none;
|
|
75
|
+
outline: none;
|
|
76
|
+
padding: 0 30px 0 10px;
|
|
77
|
+
}
|
|
78
|
+
.list-cont-input img{
|
|
79
|
+
width: 18px;
|
|
80
|
+
height: 18px;
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: 5px;
|
|
84
|
+
right: 10px;
|
|
85
|
+
z-index: 1;
|
|
86
|
+
}
|
|
87
|
+
.list-cont-li{
|
|
88
|
+
padding: 2px 0;
|
|
89
|
+
display: flex;
|
|
90
|
+
}
|
|
91
|
+
.list-cont-li>span{
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
font-weight: 400;
|
|
94
|
+
margin-right: 5px;
|
|
95
|
+
line-height: 30px;
|
|
96
|
+
}
|
|
97
|
+
.list-cont{
|
|
98
|
+
padding: 0 0 8px 30px;
|
|
99
|
+
}
|
|
100
|
+
.lv-color span{
|
|
101
|
+
color: #13BF6C;
|
|
102
|
+
}
|
|
103
|
+
.red-color span{
|
|
104
|
+
color: #FF0000;
|
|
105
|
+
}
|
|
106
|
+
.list-title{
|
|
107
|
+
padding: 2px 0 2px 10px;
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
}
|
|
111
|
+
.list-title span{
|
|
112
|
+
font-size: 14px;
|
|
113
|
+
font-weight: 400;
|
|
114
|
+
flex: 1;
|
|
115
|
+
}
|
|
116
|
+
.choice-title{
|
|
117
|
+
display: flex;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
padding: 2px 0;
|
|
120
|
+
}
|
|
121
|
+
.choice-title-left{
|
|
122
|
+
flex: 1;
|
|
123
|
+
}
|
|
124
|
+
.choice-title-left span{
|
|
125
|
+
font-size: 14px;
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
}
|
|
128
|
+
.choice-title-left span i{
|
|
129
|
+
color: red;
|
|
130
|
+
margin-right: 2px;
|
|
131
|
+
font-style: normal;
|
|
132
|
+
}
|
|
133
|
+
.choice-title-left em{
|
|
134
|
+
font-size: 12px;
|
|
135
|
+
font-style: normal;
|
|
136
|
+
}
|
|
137
|
+
.but{
|
|
138
|
+
margin-left: 5px;
|
|
139
|
+
font-size: 12px;
|
|
140
|
+
background-color: transparent;
|
|
141
|
+
border: 1px solid #000;
|
|
142
|
+
border-radius: 3px;
|
|
143
|
+
padding: 2px 5px;
|
|
144
|
+
cursor: pointer;
|
|
145
|
+
min-width: 60px;
|
|
146
|
+
height: 21px;
|
|
147
|
+
display: inline-block;
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
@@ -80,6 +80,7 @@ import { html2json, json2html } from 'html2json'
|
|
|
80
80
|
import { Editor, EditorContent } from '@tiptap/vue-3'
|
|
81
81
|
import StarterKit from '@tiptap/starter-kit'
|
|
82
82
|
import Image from '@tiptap/extension-image'
|
|
83
|
+
import TextAlign from '@tiptap/extension-text-align'
|
|
83
84
|
export default {
|
|
84
85
|
name: 'zydx-xiao-editor',
|
|
85
86
|
components: {
|
|
@@ -207,6 +208,9 @@ export default {
|
|
|
207
208
|
editable: this.readOnly,
|
|
208
209
|
extensions: [
|
|
209
210
|
StarterKit,
|
|
211
|
+
TextAlign.configure({
|
|
212
|
+
types: ['heading', 'paragraph'],
|
|
213
|
+
}),
|
|
210
214
|
Image.configure({
|
|
211
215
|
inline: true,
|
|
212
216
|
HTMLAttributes: {
|
|
@@ -369,6 +373,8 @@ export default {
|
|
|
369
373
|
if(v === 'h2') this.editor.chain().focus().toggleHeading({level:2}).run()
|
|
370
374
|
if(v === 'h3') this.editor.chain().focus().toggleHeading({level:3}).run()
|
|
371
375
|
if(v === 'p') this.editor.chain().focus().setParagraph().run()
|
|
376
|
+
if(v === 'bold') this.editor.chain().focus().toggleBold().run()
|
|
377
|
+
if(v === 'center' || v === 'left' || v === 'right') this.editor.chain().focus().setTextAlign(v).run()
|
|
372
378
|
}
|
|
373
379
|
}
|
|
374
380
|
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="preface">
|
|
3
|
+
<div class="preface-left">
|
|
4
|
+
<span>题序设置:</span>
|
|
5
|
+
<div class="preface-input">
|
|
6
|
+
<input type="number" @input="numbers" @keypress="isNumberKey($event)" />
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="preface-right">
|
|
10
|
+
<span>难易设置:</span>
|
|
11
|
+
<div class="preface-list" v-for="(item,index) in radioList">
|
|
12
|
+
<label>
|
|
13
|
+
<input type="radio" name="difficulty" :value="item.value" @change="radioTao(item.value)" :checked="item.checked" />
|
|
14
|
+
<span>{{ item.label }}</span>
|
|
15
|
+
</label>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
export default {
|
|
23
|
+
name: "zydx-preface",
|
|
24
|
+
data() {
|
|
25
|
+
return {
|
|
26
|
+
radioList: [
|
|
27
|
+
{value: 1, label: '易',checked: true},
|
|
28
|
+
{value: 2, label: '中',checked: false},
|
|
29
|
+
{value: 3, label: '难',checked: false}
|
|
30
|
+
],
|
|
31
|
+
radioValue: 1,
|
|
32
|
+
inputValue: ''
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
emits: ['change'],
|
|
36
|
+
methods: {
|
|
37
|
+
radioTao(v) {
|
|
38
|
+
this.radioValue = v;
|
|
39
|
+
this.$emit('change', {
|
|
40
|
+
diffLeve: this.radioValue,
|
|
41
|
+
quesNo: this.inputValue
|
|
42
|
+
})
|
|
43
|
+
},
|
|
44
|
+
numbers(v) {
|
|
45
|
+
this.inputValue = v.target.value;
|
|
46
|
+
this.$emit('change', {
|
|
47
|
+
diffLeve: this.radioValue,
|
|
48
|
+
quesNo: this.inputValue
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
isNumberKey(event) {
|
|
52
|
+
const charCode = (event.which) ? event.which : event.keyCode;
|
|
53
|
+
if(event.target.value.length > 2) event.preventDefault();
|
|
54
|
+
if (charCode > 31 && (charCode < 48 || charCode > 57)) event.preventDefault();
|
|
55
|
+
if (this.valueState(event.target.value) && String.fromCharCode(charCode) === '0') event.preventDefault();
|
|
56
|
+
},
|
|
57
|
+
valueState(v) {
|
|
58
|
+
return v === '' || v === undefined || v === null;
|
|
59
|
+
},
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style scoped>
|
|
65
|
+
.preface{
|
|
66
|
+
display: flex;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
}
|
|
69
|
+
.preface-left{
|
|
70
|
+
flex: 1;
|
|
71
|
+
display: flex;
|
|
72
|
+
}
|
|
73
|
+
.preface-left>span,.preface-right>span{
|
|
74
|
+
font-size: 14px;
|
|
75
|
+
color: #000;
|
|
76
|
+
font-weight: 700;
|
|
77
|
+
line-height: 30px;
|
|
78
|
+
}
|
|
79
|
+
.preface-input{
|
|
80
|
+
width: 40px;
|
|
81
|
+
height: 30px;
|
|
82
|
+
border: 1px solid rgba(204, 204, 204, 1);
|
|
83
|
+
display: inline-block;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
}
|
|
86
|
+
.preface-input>input{
|
|
87
|
+
width: 50px;
|
|
88
|
+
height: 29px;
|
|
89
|
+
border: none;
|
|
90
|
+
padding-left: 5px;
|
|
91
|
+
}
|
|
92
|
+
.preface-right{
|
|
93
|
+
display: flex;
|
|
94
|
+
line-height: 30px;
|
|
95
|
+
}
|
|
96
|
+
.preface-list>label{
|
|
97
|
+
display: inline-block;
|
|
98
|
+
position: relative;
|
|
99
|
+
}
|
|
100
|
+
.preface-list input{
|
|
101
|
+
width: 16px;
|
|
102
|
+
height: 16px;
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: 7px;
|
|
105
|
+
left: 0;
|
|
106
|
+
z-index: 1;
|
|
107
|
+
}
|
|
108
|
+
.preface-list span{
|
|
109
|
+
font-size: 14px;
|
|
110
|
+
color: #666;
|
|
111
|
+
line-height: 30px;
|
|
112
|
+
padding: 0 10px 0 25px;
|
|
113
|
+
}
|
|
114
|
+
</style>
|
package/src/index.js
CHANGED
|
@@ -25,6 +25,8 @@ import textarea from './components/textarea/index';
|
|
|
25
25
|
import titleBox from './components/titleBox/index';
|
|
26
26
|
import input from './components/input/index';
|
|
27
27
|
import time from './components/time/index';
|
|
28
|
+
import preface from './components/preface/index';
|
|
29
|
+
import choice from './components/choice/index';
|
|
28
30
|
|
|
29
31
|
const components = [
|
|
30
32
|
Calendar,
|
|
@@ -51,7 +53,9 @@ const components = [
|
|
|
51
53
|
textarea,
|
|
52
54
|
titleBox,
|
|
53
55
|
input,
|
|
54
|
-
time
|
|
56
|
+
time,
|
|
57
|
+
preface,
|
|
58
|
+
choice
|
|
55
59
|
];
|
|
56
60
|
|
|
57
61
|
function install(app) {
|
|
@@ -63,7 +67,7 @@ function install(app) {
|
|
|
63
67
|
}
|
|
64
68
|
|
|
65
69
|
export default {
|
|
66
|
-
version: '1.
|
|
70
|
+
version: '1.28.124',
|
|
67
71
|
install,
|
|
68
72
|
Calendar,
|
|
69
73
|
Message,
|
|
@@ -91,6 +95,8 @@ export default {
|
|
|
91
95
|
textarea,
|
|
92
96
|
titleBox,
|
|
93
97
|
input,
|
|
94
|
-
time
|
|
98
|
+
time,
|
|
99
|
+
preface,
|
|
100
|
+
choice
|
|
95
101
|
};
|
|
96
102
|
|