zydx-plus 1.35.623 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.35.623",
3
+ "version": "1.35.624",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -252,9 +252,6 @@ export default {
252
252
  </script>
253
253
 
254
254
  <style scoped>
255
- .choice-list{
256
- text-indent: 27px;
257
- }
258
255
  .list-cont-input{
259
256
  width: 100%;
260
257
  height: 30px;
@@ -37,8 +37,8 @@ export default {
37
37
  type: Object,
38
38
  default: () => {
39
39
  return {
40
- diffLeve: 1,
41
- quesNo: ''
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.diffLeve === undefined)? null :v.diffLeve;
61
+ this.radioValue = (v.difficulty === undefined)? null :v.difficulty;
62
62
  this.radioList.map(x => {
63
- x.checked = x.value === v.diffLeve;
63
+ x.checked = x.value === v.difficulty;
64
64
  })
65
- this.inputValue = (v.quesNo === undefined)? '': v.quesNo;
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
- diffLeve: this.radioValue,
71
- quesNo: this.inputValue
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
- diffLeve: this.radioValue,
78
- quesNo: this.inputValue
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.quesType)? 'radio': 'checkbox'"
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.quesType)" :select="ts.checked" :disabled="disabled" :state="stateFun(ts,item)"></svgs>-->
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.quesType)) { // 判断是否单选
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.resourceId===this.value[index].resourceId){
197
+ if(item.questionId===this.value[index].questionId){
198
198
  this.value[index].open = item.open
199
- if (item.quesType === '101' || item.quesType === '102' || item.quesType === '102_1' || item.quesType === '102_2') { // 解决主观题点击完成按钮‘试题设置’按钮收起问题
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.quesType)) {
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.quesType) ? answerArr[0] : answerArr
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: 200
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
  }
@@ -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>
package/src/index.js CHANGED
@@ -87,7 +87,7 @@ function install(app) {
87
87
  }
88
88
 
89
89
  export default {
90
- version: '1.35.623',
90
+ version: '1.35.624',
91
91
  install,
92
92
  Calendar,
93
93
  Message,