zydx-plus 1.32.283 → 1.32.285

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.32.283",
3
+ "version": "1.32.285",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -0,0 +1,6 @@
1
+ import main from './src/word';
2
+
3
+ main.install = function(Vue) {
4
+ Vue.component(main.name, main);
5
+ };
6
+ export default main;
@@ -0,0 +1,92 @@
1
+ <template>
2
+ <div class="svg-choice" v-if="radio">
3
+ <div v-if="state === 'default'">
4
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" width="14"
5
+ height="14">
6
+ <path :fill="disabled? 'rgba(0, 0, 0, .2)': 'rgba(24, 144, 255, 1)'"
7
+ d="M100,200A100,100,0,1,1,200,100,100,100,0,0,1,100,200Zm0-12.5A87.5,87.5,0,1,0,12.5,100,87.51,87.51,0,0,0,100,187.5Z"/>
8
+ <circle v-if="select" fill="rgba(24, 144, 255, 1)" cx="98.5" cy="98.5" r="62.5"/>
9
+ </svg>
10
+ </div>
11
+ <div v-else>
12
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 174.95 174.95" width="14"
13
+ height="14">
14
+ <path :fill="state === 'correct'?'rgba(67, 207, 124, 1)': 'rgba(255, 0, 0, 1)'"
15
+ d="M100.91,12.49A87.48,87.48,0,1,0,188.39,100,87.48,87.48,0,0,0,100.91,12.49Z"
16
+ transform="translate(-13.44 -12.49)"/>
17
+ <path v-if="state === 'correct'" fill="rgba(255, 255, 255, 1)"
18
+ d="M160.36,76.87,97.93,139.3l-.07.08a12.51,12.51,0,0,1-17.68,0l-.08-.08L42.68,101.87A12.49,12.49,0,1,1,60.35,84.2L89,112.86,142.68,59.2a12.5,12.5,0,1,1,17.68,17.67Z"
19
+ transform="translate(-15.01 -10.54)"/>
20
+ <path v-else fill="rgba(255, 255, 255, 1)" d="M151.43,134.15a35.64,35.64,0,0,1,5.81,7.52q1.84,3.41-.61,7.79c-.37.55-.87,1.21-1.51,2s-1.3,1.53-2,2.26a26.89,26.89,0,0,1-2,2,13.1,13.1,0,0,1-1.71,1.3,10.89,10.89,0,0,1-8.07,1.09,16.26,16.26,0,0,1-8.34-4.65l-5.74-5.74L119.57,140l-9-9-9.85-9.84-17.5,17.5q-8.07,8.07-13.12,13.26-5.2,5.19-10.33,6.43A9.56,9.56,0,0,1,50.66,156l-1-1-1.5-1.5-1.5-1.5a5.93,5.93,0,0,1-1-1.1A8.08,8.08,0,0,1,44,147.07a8.74,8.74,0,0,1,.34-3.9,13.88,13.88,0,0,1,1.85-3.69,23.41,23.41,0,0,1,2.73-3.28q1.23-1.09,4.38-4.11l7.38-7.65q4.52-4.38,10-9.85t11.56-11.48q-6.57-6.57-12.52-12.44L59.07,80.14q-4.73-4.65-7.73-7.59l-3.69-3.62c-2.37-2.37-3.57-4.72-3.62-7.05a11.89,11.89,0,0,1,2.39-7,28.65,28.65,0,0,1,3.15-3.21,29.25,29.25,0,0,1,2.87-2.39c2.73-1.83,5.19-2.62,7.38-2.4s4.38,1.49,6.56,3.76l4.24,4.24q3.15,3.15,7.8,7.66T88.88,72.69L101,84.51q5.19-5.19,10.18-10.12t9.3-9.22q4.31-4.32,7.79-7.73t5.82-5.74a16.23,16.23,0,0,1,7.11-4.17,8.12,8.12,0,0,1,7.38,1.71,10.87,10.87,0,0,0,.89.68,18,18,0,0,1,1.5,1.23l1.44,1.3a5.46,5.46,0,0,0,1,.75c2.47,2.37,3.67,4.95,3.63,7.73a11.07,11.07,0,0,1-3.63,7.72q-2.46,2.46-6.08,6.15c-2.42,2.47-5.1,5.16-8.07,8.07s-6.08,6-9.36,9.3l-10.39,10.39q5.06,4.92,9.91,9.64c3.23,3.15,6.24,6.08,9,8.82s5.29,5.24,7.52,7.52,4.08,4.15,5.54,5.61Z"
21
+ transform="translate(14.88 14.81) scale(0.7)"/>
22
+ </svg>
23
+ </div>
24
+ </div>
25
+ <div v-else class="svg-choice">
26
+ <div v-if="state === 'default'">
27
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 175 175" width="14" height="14">
28
+ <path :fill="disabled? 'rgba(0, 0, 0, .2)': 'rgba(24, 144, 255, 1)'"
29
+ d="M172.92,12.5H27.08A14.58,14.58,0,0,0,12.5,27.08V172.92A14.58,14.58,0,0,0,27.08,187.5H172.92a14.58,14.58,0,0,0,14.58-14.58V27.08A14.58,14.58,0,0,0,172.92,12.5Zm0,160.42H27.08V27.08H172.92V172.92Z"
30
+ transform="translate(-12.5 -12.5)"/>
31
+ <path v-if="select" fill="rgba(24, 144, 255, 1)"
32
+ d="M45.56,38.76H154.44a6.79,6.79,0,0,1,6.8,6.8h0V154.44a6.79,6.79,0,0,1-6.8,6.8H45.56a6.8,6.8,0,0,1-6.8-6.8h0V45.56a6.8,6.8,0,0,1,6.8-6.8Z"
33
+ transform="translate(-12.5 -12.5)"/>
34
+ </svg>
35
+ </div>
36
+ <div v-else>
37
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 175 175" width="19" height="19">
38
+ <path :fill="state === 'correct'?'rgba(67, 207, 124, 1)': 'rgba(255, 0, 0, 1)'"
39
+ d="M45.56,38.76H154.44a6.79,6.79,0,0,1,6.8,6.8h0V154.44a6.79,6.79,0,0,1-6.8,6.8H45.56a6.8,6.8,0,0,1-6.8-6.8h0V45.56a6.8,6.8,0,0,1,6.8-6.8Z"
40
+ transform="translate(-32.5 -12.5)"/>
41
+ <path v-if="state === 'correct'" fill="rgba(255, 255, 255, 1)"
42
+ d="M160.36,76.87,97.93,139.3l-.07.08a12.51,12.51,0,0,1-17.68,0l-.08-.08L42.68,101.87A12.49,12.49,0,1,1,60.35,84.2L89,112.86,142.68,59.2a12.5,12.5,0,1,1,17.68,17.67Z"
43
+ transform="translate(1.01 16.54) scale(0.7)"/>
44
+ <path v-else fill="rgba(255, 255, 255, 1)" d="M151.43,134.15a35.64,35.64,0,0,1,5.81,7.52q1.84,3.41-.61,7.79c-.37.55-.87,1.21-1.51,2s-1.3,1.53-2,2.26a26.89,26.89,0,0,1-2,2,13.1,13.1,0,0,1-1.71,1.3,10.89,10.89,0,0,1-8.07,1.09,16.26,16.26,0,0,1-8.34-4.65l-5.74-5.74L119.57,140l-9-9-9.85-9.84-17.5,17.5q-8.07,8.07-13.12,13.26-5.2,5.19-10.33,6.43A9.56,9.56,0,0,1,50.66,156l-1-1-1.5-1.5-1.5-1.5a5.93,5.93,0,0,1-1-1.1A8.08,8.08,0,0,1,44,147.07a8.74,8.74,0,0,1,.34-3.9,13.88,13.88,0,0,1,1.85-3.69,23.41,23.41,0,0,1,2.73-3.28q1.23-1.09,4.38-4.11l7.38-7.65q4.52-4.38,10-9.85t11.56-11.48q-6.57-6.57-12.52-12.44L59.07,80.14q-4.73-4.65-7.73-7.59l-3.69-3.62c-2.37-2.37-3.57-4.72-3.62-7.05a11.89,11.89,0,0,1,2.39-7,28.65,28.65,0,0,1,3.15-3.21,29.25,29.25,0,0,1,2.87-2.39c2.73-1.83,5.19-2.62,7.38-2.4s4.38,1.49,6.56,3.76l4.24,4.24q3.15,3.15,7.8,7.66T88.88,72.69L101,84.51q5.19-5.19,10.18-10.12t9.3-9.22q4.31-4.32,7.79-7.73t5.82-5.74a16.23,16.23,0,0,1,7.11-4.17,8.12,8.12,0,0,1,7.38,1.71,10.87,10.87,0,0,0,.89.68,18,18,0,0,1,1.5,1.23l1.44,1.3a5.46,5.46,0,0,0,1,.75c2.47,2.37,3.67,4.95,3.63,7.73a11.07,11.07,0,0,1-3.63,7.72q-2.46,2.46-6.08,6.15c-2.42,2.47-5.1,5.16-8.07,8.07s-6.08,6-9.36,9.3l-10.39,10.39q5.06,4.92,9.91,9.64c3.23,3.15,6.24,6.08,9,8.82s5.29,5.24,7.52,7.52,4.08,4.15,5.54,5.61Z"
45
+ transform="translate(6.88 24.81) scale(0.6)"/>
46
+ </svg>
47
+ </div>
48
+ </div>
49
+ </template>
50
+
51
+ <script>
52
+ export default {
53
+ data() {
54
+ return {}
55
+ },
56
+ props: {
57
+ radio: { // 单选
58
+ type: Boolean,
59
+ default: false
60
+ },
61
+ select: { // 选中
62
+ type: Boolean,
63
+ default: false
64
+ },
65
+ state: { // 状态
66
+ type: String,
67
+ default: 'default'
68
+ },
69
+ disabled: { // 禁用
70
+ type: Boolean,
71
+ default: false
72
+ }
73
+ },
74
+ watch: {
75
+ select: {
76
+ handler(val) {
77
+ console.log(val)
78
+ },
79
+ deep: true
80
+ }
81
+ }
82
+ }
83
+ </script>
84
+
85
+ <style scoped>
86
+ .svg-choice {
87
+ position: absolute;
88
+ top: 2px;
89
+ left: 0;
90
+ z-index: 1;
91
+ }
92
+ </style>
@@ -0,0 +1,246 @@
1
+ .paper{
2
+ background: #fff;
3
+ padding: 40px;
4
+ border: 1px solid #ccc;
5
+ width: 793px;
6
+ margin: 0 auto;
7
+ }
8
+ .parer-name{
9
+ text-align: right;
10
+ }
11
+ .parer-name-list{
12
+ height: 25px;
13
+ line-height: 25px;
14
+ font-size: 12px;
15
+ }
16
+ .choice:after {
17
+ content: "";
18
+ clear: left;
19
+ display: block;
20
+ }
21
+ .text{
22
+ letter-spacing: 25px;
23
+ margin-right: -25px;
24
+ }
25
+ .parer-name-list span{
26
+ line-height: 25px;
27
+ display: inline-block;
28
+ }
29
+ .parer-name-list em{
30
+ display: inline-block;
31
+ min-width: 100px;
32
+ border-bottom: 1px solid #000;
33
+ height: 25px;
34
+ line-height: 25px;
35
+ text-align: left;
36
+ margin-left: 10px;
37
+ font-style: normal;
38
+ }
39
+ .parer-title{
40
+ padding: 30px 0;
41
+ text-align: center;
42
+ }
43
+ .parer-title span{
44
+ font-size: 14px;
45
+ }
46
+ .parer-title p{
47
+ font-size: 20px;
48
+ margin-top: 5px;
49
+ }
50
+ .parer-cont>p{
51
+ font-size: 12px;
52
+ line-height: 18px;
53
+ font-weight: bold;
54
+ }
55
+ .parer-cont>p>span{
56
+ font-weight: normal;
57
+ }
58
+ .parer-table{
59
+ width: 100%;
60
+ margin: 5px 0;
61
+ }
62
+ .parer-table>table{
63
+ width: 100%;
64
+ border-left: 1px solid #ccc;
65
+ border-top: 1px solid #ccc;
66
+ }
67
+ .parer-table>table th,.parer-table>table td{
68
+ line-height: 30px;
69
+ font-weight: normal;
70
+ text-align: center;
71
+ border-bottom: 1px solid #ccc;
72
+ border-right: 1px solid #ccc;
73
+ font-size: 14px;
74
+ }
75
+ .choice-title{
76
+ font-size: 16px;
77
+ font-weight: 700;
78
+ line-height: 23px;
79
+ }
80
+ .subject{
81
+ font-size: 14px;
82
+ line-height: 25px;
83
+ display: flex;
84
+ align-items: center;
85
+ }
86
+ .subject-title{
87
+ flex: 1;
88
+ position: relative;
89
+ line-height: 24px;
90
+ }
91
+ .subject-title label{
92
+ display: inline-block;
93
+ }
94
+ .subject-title label input{
95
+ position: absolute;
96
+ top: 5px;
97
+ left: 0;
98
+ z-index: 1;
99
+ }
100
+ .subject span{
101
+ text-align: justify;
102
+ padding-left: 2em;
103
+ }
104
+ .subject span em{
105
+ font-style: normal;
106
+ padding-left: 5px;
107
+ }
108
+ .choice-box{
109
+ text-indent: 2em;
110
+ line-height: 24px;
111
+ font-size: 14px;
112
+ position: relative;
113
+ }
114
+ .choice-input{
115
+ position: absolute;
116
+ top: 7px;
117
+ left: 2em;
118
+ z-index: 1;
119
+ }
120
+ .choice-span{
121
+ padding-left: 20px;
122
+ }
123
+ .choice-color{
124
+ color: #00ff00;
125
+ }
126
+ .paper-textarea{
127
+ width: calc(100% - 2em);
128
+ height: 85px;
129
+ margin-left: 2em;
130
+ resize: none;
131
+ padding: 10px;
132
+ box-sizing: border-box;
133
+ font-size: 14px;
134
+ }
135
+ .array-ch .choice-box{
136
+ float: left;
137
+ width: 50%;
138
+ }
139
+ .but{
140
+ margin-left: 5px;
141
+ font-size: 12px;
142
+ background-color: transparent;
143
+ border: 1px solid #000;
144
+ border-radius: 3px;
145
+ padding: 2px 5px;
146
+ cursor: pointer;
147
+ min-width: 60px;
148
+ height: 21px;
149
+ }
150
+ .buts-actives{
151
+ color: #00ff00 !important;
152
+ }
153
+ input[name='check'] {
154
+ width: 15px;
155
+ height: 15px;
156
+ position: absolute;
157
+ top: 5px;
158
+ left: 0;
159
+ }
160
+ .subject-but{
161
+ position: relative;
162
+ }
163
+ .subject-but b{
164
+ position: absolute;
165
+ z-index: 1;
166
+ display: flex;
167
+ }
168
+ .subject-html-title{
169
+ text-indent: 2em;
170
+ font-weight: bold;
171
+ font-size: 14px;
172
+ line-height: 24px;
173
+ }
174
+ .subject-html-cont{
175
+ text-align: justify;
176
+ line-height: 24px;
177
+ text-indent: 2em;
178
+ }
179
+ .table{
180
+ width: 100%;
181
+ margin: 5px 0;
182
+ }
183
+ .table table{
184
+ width: 100%;
185
+ border-left: 1px solid #ccc;
186
+ border-top: 1px solid #ccc;
187
+ }
188
+ .table table td{
189
+ line-height: 30px;
190
+ font-weight: normal;
191
+ text-align: center;
192
+ border-bottom: 1px solid #ccc;
193
+ border-right: 1px solid #ccc;
194
+ font-size: 14px;
195
+ }
196
+ .table table td:first-child{
197
+ width: 110px;
198
+ }
199
+ .tab-title{
200
+ font-weight: 700 !important;
201
+ }
202
+ .reasoning{
203
+ font-size: 16px;
204
+ font-weight: 700;
205
+ text-indent: 1.7em;
206
+ display: inline-block;
207
+ padding-bottom: 8px;
208
+ }
209
+ .subject-student-edi{
210
+ text-indent: 2em;
211
+ padding: 2px 0;
212
+ }
213
+ .review{
214
+ padding-left: 2em;
215
+ box-sizing: border-box;
216
+ }
217
+ .review-title{
218
+ padding: 6px 0 4px 0;
219
+ display: flex;
220
+ justify-content: center;
221
+ }
222
+ .review-title span{
223
+ flex: 1;
224
+ font-size: 16px;
225
+ font-weight: 700;
226
+ }
227
+ .table td>input{
228
+ width: 80px;
229
+ border: 0;
230
+ text-align: center;
231
+ }
232
+ .choice-red{
233
+ color: red;
234
+ }
235
+ .task {
236
+ display: flex;
237
+ justify-content: center;
238
+ }
239
+ .task>span{
240
+ font-size: 16px;
241
+ font-weight: 700;
242
+ flex: 1;
243
+ }
244
+ .padd{
245
+ padding-bottom: 24px;
246
+ }
@@ -0,0 +1,219 @@
1
+ <template>
2
+ <div :class="{paper: borderShow}">
3
+ <div class="parer-cont" ref="parer">
4
+ <div class="paper-choice" :class="{'array-ch': !styleText(item.testKey)}" v-for="(item,index) in value">
5
+ <div class="subject">
6
+ <div class="subject-title" :class="{'padd': item.top !== 0}" v-if="item.subject">
7
+ <input v-if="multipleShow" type="checkbox" :checked="item.checked" @change="checkboxChange($event,index)"
8
+ name="check"/>
9
+ <span>{{ item.order ? item.order : index + 1 }}{{ item.order === ' ' ? '' : '.' }}<em
10
+ v-html="item.title"></em><em v-if="scoreShow">({{ item.score }}分)</em>
11
+ <i class="subject-but" ref="subject">
12
+ <b :style="{right: -item.right + 'px', top: item.top + 'px'}" ref="b">
13
+ <button class="but" v-for="(it) in item.customBut" :class="{'buts-actives': it.active}" @click="customButTap(it,item)">{{ it.active? it.nameActive: it.name }}</button>
14
+ </b>
15
+ </i>
16
+ </span>
17
+ </div>
18
+ </div>
19
+ <div v-if="item.alist" class="subject-html" v-show="item.open">
20
+ <div v-for="(it,ind) in item.alist">
21
+ <div v-if="it.annexType === '0'">
22
+ <div class="subject-html-title">{{ titleText }}{{ ind + 1 }}</div>
23
+ <div class="subject-html-cont" v-html="annexHtml(it.annexContent)"></div>
24
+ </div>
25
+ </div>
26
+ </div>
27
+ <div class="choice" v-if="item.testKey" v-show="item.open">
28
+ <div class="choice-box" v-for="(ts,ind) in item.testKey">
29
+ <label>
30
+ <input class="choice-input" style="display: none;" :disabled="disabled" :checked="ts.checked"
31
+ @change="answerChange($event,item,`${id}${index}`,ts)" :type="ques(item.quesType)? 'radio': 'checkbox'"
32
+ :name="`${id}${index}`"/>
33
+ <svgs v-if="chooseAnswer" :radio="ques(item.quesType)" :select="ts.checked" :disabled="disabled" :state="stateFun(ts,item)"></svgs>
34
+ <span :class="{'choice-span': chooseAnswer}">{{
35
+ ts.index
36
+ }}. {{ ts.content[0] }}</span>
37
+ </label>
38
+ </div>
39
+ </div>
40
+ <slot name="content" :row="item"></slot>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ </template>
45
+
46
+ <script>
47
+ import {html2json, json2html} from 'html2json'
48
+ import svgs from './icon.vue'
49
+
50
+ export default {
51
+ name: "zydx-seek2",
52
+ components: {svgs},
53
+ data() {
54
+ return {
55
+ value: [],
56
+ multipleShow: false,
57
+ id: null
58
+ }
59
+ },
60
+ props: {
61
+ data: {
62
+ type: Array,
63
+ default: []
64
+ },
65
+ disabled: {
66
+ type: Boolean,
67
+ default: false
68
+ },
69
+ multiple: {
70
+ type: Boolean,
71
+ default: false
72
+ },
73
+ borderShow: {
74
+ type: Boolean,
75
+ default: true
76
+ },
77
+ titleText: {
78
+ type: String,
79
+ default: '材料'
80
+ },
81
+ chooseAnswer: {
82
+ type: Boolean,
83
+ default: true
84
+ },
85
+ scoreShow: {
86
+ type: Boolean,
87
+ default: false
88
+ },
89
+ },
90
+ watch: {
91
+ data: {
92
+ handler: function (val, oldVal) {
93
+ this.init()
94
+ },
95
+ immediate: true,
96
+ deep: true,
97
+ },
98
+ multiple: {
99
+ handler: function (val, oldVal) {
100
+ this.multipleShow = val
101
+ },
102
+ immediate: true,
103
+ deep: true
104
+ },
105
+ replace: {
106
+ handler: function (val, oldVal) {
107
+ this.replaceShow = val
108
+ },
109
+ deep: true
110
+ }
111
+ },
112
+ mounted() {
113
+ this.id = this.randomId()
114
+ },
115
+ emits: ['change', 'butChange', 'changeAll', 'judgeAnswer'],
116
+ methods: {
117
+ stateFun(ts,item) {
118
+ if(this.disabled&&ts.checked&&!item.error&&!this.nothing) return 'correct'
119
+ if(this.disabled&&ts.checked&&item.error&&!this.nothing) return 'error'
120
+ return 'default'
121
+ },
122
+ customButTap(e,d) {
123
+ if(e.key === 'option') d.open = !d.open
124
+ if(e.butStart) e.active = !e.active
125
+ this.$emit('butChange',e,d)
126
+ },
127
+ annexHtml(x) {
128
+ return json2html({node: "root", child: typeof x === 'string' ? JSON.parse(x) : x})
129
+ },
130
+ init() {
131
+ const val = JSON.parse(JSON.stringify(this.data))
132
+ this.value = val.map((item, index) => { // 转换html
133
+ item.choice = true
134
+ item.right = 0
135
+ item.top = 0
136
+ item.open = item.open !== undefined ? item.open : true
137
+ item.error = item.error !== undefined ? item.error : false
138
+ item.subject = item.subject !== undefined ? item.subject : true
139
+ if (item.testKey) {
140
+ item.testKey = typeof item.testKey === 'string' ? JSON.parse(item.testKey) : item.testKey
141
+ let judge = item?.judgeAnswer
142
+ if (item.stuAnswer) judge = item.stuAnswer?.answer
143
+ item.testKey = item.testKey.map(x => {
144
+ if (this.ques(item.quesType)) { // 判断是否单选
145
+ x.checked = x.index === judge; //答案
146
+ } else {
147
+ for (let i = 0; i < judge?.length; i++) {
148
+ if (x.index === judge[i]) {
149
+ x.checked = true
150
+ break
151
+ } else {
152
+ x.checked = false
153
+ }
154
+ }
155
+ }
156
+ return x
157
+ })
158
+ }
159
+ return item
160
+ })
161
+ this.$nextTick(() => { // 保证所有的数据都渲染完毕
162
+ const w = this.$refs.parer.offsetWidth // 获取父级宽度
163
+ for (let i = 0; i < this.$refs?.subject?.length; i++) {
164
+ this.value[i].right = w - this.$refs.subject[i].offsetLeft
165
+ if (this.$refs.b && this.$refs.b.length > 0) {
166
+ if (this.value[i].right < this.$refs.b[i].offsetWidth) this.value[i].top = 25 // 判断是否换行
167
+ }
168
+ }
169
+ })
170
+ },
171
+ randomId() { // 生成随机id
172
+ const id = Math.random().toString(36).substr(2)
173
+ return id.replace(/[0-9]/g, '')
174
+ },
175
+ answerChange(e, v, id, check) {
176
+ if(this.ques(v.quesType)) {
177
+ v.testKey.map(x => {
178
+ x.checked = false
179
+ return x
180
+ })
181
+ }
182
+ check.checked = e.target.checked
183
+ let answerArr = []
184
+ const ids = document.getElementsByName(id)
185
+ ids.forEach((x, index) => {
186
+ if (x.checked) {
187
+ answerArr.push(v.testKey[index].index)
188
+ }
189
+ })
190
+ this.$emit('judgeAnswer', {
191
+ ...v,
192
+ judgeAnswer: this.ques(v.quesType) ? answerArr[0] : answerArr
193
+ })
194
+ },
195
+ checkboxChange(e, index) {
196
+ this.value[index].checked = e.target.checked
197
+ this.$emit('change', {
198
+ data: this.value[index],
199
+ value: e.target.checked
200
+ })
201
+ this.$emit('changeAll', this.value)
202
+ },
203
+ ques(v) {
204
+ return v.indexOf('101') > -1
205
+ },
206
+ styleText(v) {
207
+ if (!v || v === 'null') return
208
+ for (let i = 0; i < v.length; i++) {
209
+ if (v[i].content[0]?.length > 10) {
210
+ return true
211
+ }
212
+ }
213
+ return false
214
+ },
215
+ }
216
+ }
217
+ </script>
218
+
219
+ <style scoped src="./word.css"></style>
@@ -122,7 +122,7 @@
122
122
  </tr>
123
123
  </table>
124
124
  </div>
125
- <slot></slot>
125
+ <slot name="content" :row="item"></slot>
126
126
  </div>
127
127
  </div>
128
128
  </div>
@@ -142,7 +142,8 @@ export default {
142
142
  choiceState: true,
143
143
  replaceShow: this.replace,
144
144
  replaceOpen: false,
145
- id: null
145
+ id: null,
146
+ states: false
146
147
  }
147
148
  },
148
149
  props: {
@@ -232,10 +233,11 @@ export default {
232
233
  watch: {
233
234
  data: {
234
235
  handler: function (val, oldVal) {
235
- if (this.state) return
236
+ if (this.states) return
236
237
  this.init()
237
238
  },
238
239
  immediate: true,
240
+ deep: true,
239
241
  },
240
242
  multiple: {
241
243
  handler: function (val, oldVal) {
@@ -248,11 +250,18 @@ export default {
248
250
  this.replaceShow = val
249
251
  },
250
252
  deep: true
253
+ },
254
+ state: {
255
+ handler: function (val) {
256
+ this.states = val
257
+ },
258
+ deep: true,
259
+ immediate: true
251
260
  }
252
261
  },
253
262
  mounted() {
254
263
  this.id = this.randomId()
255
- if (!this.state) return
264
+ if (!this.states) return
256
265
  this.init()
257
266
  },
258
267
  emits: ['change', 'modify', 'del', 'changeAll', 'replaceData', 'choiceData', 'judgeAnswer', 'openReasoning', 'review', 'subject'],
@@ -390,7 +399,7 @@ export default {
390
399
  styleText(v) {
391
400
  if (!v || v === 'null') return
392
401
  for (let i = 0; i < v.length; i++) {
393
- if (v[i].content[0].length > 10) {
402
+ if (v[i].content[0]?.length > 10) {
394
403
  return true
395
404
  }
396
405
  }
package/src/index.js CHANGED
@@ -33,6 +33,7 @@ import lessonTemplate from './components/lesson_template/index';
33
33
  import paper from './components/word2/index';
34
34
  import question from './components/question/index';
35
35
  import tagging from './components/tagging/index';
36
+ import seek from './components/seek/index';
36
37
 
37
38
  const components = [
38
39
  Calendar,
@@ -67,7 +68,8 @@ const components = [
67
68
  lessonTemplate,
68
69
  paper,
69
70
  question,
70
- tagging
71
+ tagging,
72
+ seek
71
73
  ];
72
74
 
73
75
  function install(app) {
@@ -79,7 +81,7 @@ function install(app) {
79
81
  }
80
82
 
81
83
  export default {
82
- version: '1.32.283',
84
+ version: '1.32.285',
83
85
  install,
84
86
  Calendar,
85
87
  Message,
@@ -115,6 +117,7 @@ export default {
115
117
  lessonTemplate,
116
118
  paper,
117
119
  question,
118
- tagging
120
+ tagging,
121
+ seek
119
122
  };
120
123