zydx-plus 1.35.622 → 1.35.624
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 +1 -1
- package/src/components/choice/src/choice.vue +0 -3
- package/src/components/preface/src/preface.vue +9 -9
- package/src/components/seek/src/word.vue +7 -7
- package/src/components/textarea/src/textarea.vue +11 -5
- package/src/components/tipBox/index.js +2 -2
- package/src/components/tipBox/src/main.vue +6 -1
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -37,8 +37,8 @@ export default {
|
|
|
37
37
|
type: Object,
|
|
38
38
|
default: () => {
|
|
39
39
|
return {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
difficulty: 1,
|
|
41
|
+
sort: ''
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
@@ -58,24 +58,24 @@ export default {
|
|
|
58
58
|
emits: ['change'],
|
|
59
59
|
methods: {
|
|
60
60
|
updateData(v) {
|
|
61
|
-
this.radioValue = (v.
|
|
61
|
+
this.radioValue = (v.difficulty === undefined)? null :v.difficulty;
|
|
62
62
|
this.radioList.map(x => {
|
|
63
|
-
x.checked = x.value === v.
|
|
63
|
+
x.checked = x.value === v.difficulty;
|
|
64
64
|
})
|
|
65
|
-
this.inputValue = (v.
|
|
65
|
+
this.inputValue = (v.sort === undefined)? '': v.sort;
|
|
66
66
|
},
|
|
67
67
|
radioTao(v) {
|
|
68
68
|
this.radioValue = v;
|
|
69
69
|
this.$emit('change', {
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
difficulty: this.radioValue,
|
|
71
|
+
sort: this.inputValue
|
|
72
72
|
})
|
|
73
73
|
},
|
|
74
74
|
numbers(v) {
|
|
75
75
|
this.inputValue = v.target.value;
|
|
76
76
|
this.$emit('change', {
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
difficulty: this.radioValue,
|
|
78
|
+
sort: this.inputValue
|
|
79
79
|
})
|
|
80
80
|
},
|
|
81
81
|
isNumberKey(event) {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
<div class="choice-box" v-for="(ts,ind) in item.testKey">
|
|
37
37
|
<label>
|
|
38
38
|
<input class="choice-input" style="display: none;" :disabled="disabled" :checked="ts.checked"
|
|
39
|
-
@change="answerChange($event,item,`${id}${index}`,ts)" :type="ques(item.
|
|
39
|
+
@change="answerChange($event,item,`${id}${index}`,ts)" :type="ques(item.type)? 'radio': 'checkbox'"
|
|
40
40
|
:name="`${id}${index}`"/>
|
|
41
|
-
<!-- <svgs v-if="chooseAnswer" :radio="ques(item.
|
|
41
|
+
<!-- <svgs v-if="chooseAnswer" :radio="ques(item.type)" :select="ts.checked" :disabled="disabled" :state="stateFun(ts,item)"></svgs>-->
|
|
42
42
|
<svgs v-if="chooseAnswer" :radio="false" :select="ts.checked" :disabled="disabled" :state="stateFun(ts,item)"></svgs>
|
|
43
43
|
<span :class="{'choice-span': chooseAnswer}">{{
|
|
44
44
|
ts.index
|
|
@@ -174,7 +174,7 @@ export default {
|
|
|
174
174
|
let judge = item?.judgeAnswer
|
|
175
175
|
if (item.stuAnswer) judge = item.stuAnswer?.answer
|
|
176
176
|
item.testKey = item.testKey.map(x => {
|
|
177
|
-
if (this.ques(item.
|
|
177
|
+
if (this.ques(item.type)) { // 判断是否单选
|
|
178
178
|
x.checked = x.index === judge; //答案
|
|
179
179
|
} else {
|
|
180
180
|
for (let i = 0; i < judge?.length; i++) {
|
|
@@ -194,9 +194,9 @@ export default {
|
|
|
194
194
|
if( copy.length && this.value.length) {
|
|
195
195
|
copy.forEach((item, index) => {
|
|
196
196
|
if(this.value[index]){
|
|
197
|
-
if(item.
|
|
197
|
+
if(item.questionId===this.value[index].questionId){
|
|
198
198
|
this.value[index].open = item.open
|
|
199
|
-
if (item.
|
|
199
|
+
if (item.type === '101' || item.type === '102' || item.type === '102_1' || item.type === '102_2') { // 解决主观题点击完成按钮‘试题设置’按钮收起问题
|
|
200
200
|
if (this.isLook) {
|
|
201
201
|
if(this.value[index].customBut) this.value[index].customBut[0].active = item.open
|
|
202
202
|
}
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
220
220
|
return id.replace(/[0-9]/g, '')
|
|
221
221
|
},
|
|
222
222
|
answerChange(e, v, id, check) {
|
|
223
|
-
if(this.ques(v.
|
|
223
|
+
if(this.ques(v.type)) {
|
|
224
224
|
v.testKey.map(x => {
|
|
225
225
|
x.checked = false
|
|
226
226
|
return x
|
|
@@ -236,7 +236,7 @@ export default {
|
|
|
236
236
|
})
|
|
237
237
|
this.$emit('judgeAnswer', {
|
|
238
238
|
...v,
|
|
239
|
-
judgeAnswer: this.ques(v.
|
|
239
|
+
judgeAnswer: this.ques(v.type) ? answerArr[0] : answerArr
|
|
240
240
|
})
|
|
241
241
|
},
|
|
242
242
|
checkboxChange(e, index) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="textarea">
|
|
3
|
-
<div class="text" :style="{
|
|
3
|
+
<div class="textarea-text" :style="{
|
|
4
|
+
'text-indent': `${indent? '17px': '0'}`,
|
|
4
5
|
'min-height': height + 'px',
|
|
5
6
|
border: (readable)? '1px solid #ccc': 'none',
|
|
6
7
|
'background-color': (readable)? '#fff': 'transparent'
|
|
@@ -27,7 +28,7 @@ export default {
|
|
|
27
28
|
},
|
|
28
29
|
height: {
|
|
29
30
|
type: Number,
|
|
30
|
-
default:
|
|
31
|
+
default: 100
|
|
31
32
|
},
|
|
32
33
|
maxLength: {
|
|
33
34
|
type: Number,
|
|
@@ -44,6 +45,10 @@ export default {
|
|
|
44
45
|
lineNum: {
|
|
45
46
|
type: Number,
|
|
46
47
|
default: 5
|
|
48
|
+
},
|
|
49
|
+
indent: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
default: true
|
|
47
52
|
}
|
|
48
53
|
},
|
|
49
54
|
watch: {
|
|
@@ -144,16 +149,17 @@ export default {
|
|
|
144
149
|
color: #666;
|
|
145
150
|
}
|
|
146
151
|
|
|
147
|
-
.text {
|
|
152
|
+
.textarea-text {
|
|
148
153
|
width: 100%;
|
|
149
154
|
border: 1px solid #ccc;
|
|
150
155
|
line-height: 24px;
|
|
151
156
|
box-sizing: border-box;
|
|
152
|
-
text-indent: 2em;
|
|
153
157
|
background-color: #fff;
|
|
158
|
+
padding: 0 10px;
|
|
159
|
+
text-align: justify;
|
|
154
160
|
}
|
|
155
161
|
|
|
156
|
-
.text[contenteditable]:empty:before {
|
|
162
|
+
.textarea-text[contenteditable]:empty:before {
|
|
157
163
|
content: attr(placeholder);
|
|
158
164
|
color: gray;
|
|
159
165
|
}
|
|
@@ -8,7 +8,7 @@ render(divNode, document.body)
|
|
|
8
8
|
const container = divNode.el
|
|
9
9
|
|
|
10
10
|
// 导出函数可通过调用 Confirm() 函数动态创建 XtxConfirm 组件
|
|
11
|
-
const Confirm = ({ className, type, url ,title,radioArr,checkboxArr,submitText,cancelText,closeShow, promptContent, middle, cancelShow, inputArr, countdown, components }) => {
|
|
11
|
+
const Confirm = ({ className, type, url ,title,radioArr,checkboxArr,submitText,cancelText,closeShow, promptContent, middle, cancelShow, inputArr, countdown, components, slotProps }) => {
|
|
12
12
|
// 返回 Promise 对象
|
|
13
13
|
return new Promise((resolve, reject) => {
|
|
14
14
|
// 2. 点击确认按钮,触发resolve同时销毁组件
|
|
@@ -52,7 +52,7 @@ const Confirm = ({ className, type, url ,title,radioArr,checkboxArr,submitText,c
|
|
|
52
52
|
render(null, container)
|
|
53
53
|
}
|
|
54
54
|
// 1. 创建 XtxConfirm 组件
|
|
55
|
-
const VNode = createVNode(XtxConfirm, { className, type, url ,title, submitText, cancelText, closeShow,promptContent,radioArr,checkboxArr, middle, cancelShow, inputArr,countdown,components, submit, cancel, close })
|
|
55
|
+
const VNode = createVNode(XtxConfirm, { className, type, url ,title, submitText, cancelText, closeShow,promptContent,radioArr,checkboxArr, middle, cancelShow, inputArr,countdown,components, slotProps, submit, cancel, close })
|
|
56
56
|
render(VNode, container)
|
|
57
57
|
})
|
|
58
58
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<div class="tip-boxContent" ref="tip-boxContent" :style="overflowShow?'overflow-y: scroll':''">
|
|
12
12
|
<div class="tap-p" ref="tapP">
|
|
13
13
|
<div v-if="type === 'slot'">
|
|
14
|
-
<component :is="components"></component>
|
|
14
|
+
<component :is="components" v-bind="slotProps"></component>
|
|
15
15
|
</div>
|
|
16
16
|
<div class="tip-title2" ref="tipTitle" v-if="type === 'text'"
|
|
17
17
|
:style="{'text-align': (middles)? 'center': 'left', 'text-indent': indent? '2em': '0' }">
|
|
@@ -79,6 +79,7 @@
|
|
|
79
79
|
:height="item.height?item.height:100"
|
|
80
80
|
:placeholder="item.placeholder"
|
|
81
81
|
:value="item.value"
|
|
82
|
+
:indent="item.indent"
|
|
82
83
|
:maxLength="item.maxLength?item.maxLength:0"
|
|
83
84
|
:lineNum="item.lineNum?item.lineNum:3">
|
|
84
85
|
</zydx-textarea>
|
|
@@ -241,6 +242,10 @@ export default {
|
|
|
241
242
|
components: { // 模版组件
|
|
242
243
|
type: Object,
|
|
243
244
|
default: () => {}
|
|
245
|
+
},
|
|
246
|
+
slotProps: {
|
|
247
|
+
type: Object,
|
|
248
|
+
default: () => {}
|
|
244
249
|
}
|
|
245
250
|
},
|
|
246
251
|
mounted() {
|