zydx-plus 1.32.211 → 1.32.213

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.211",
3
+ "version": "1.32.213",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -141,7 +141,7 @@ export default {
141
141
  hard: '-',
142
142
  mid: '-',
143
143
  allScore: '-',
144
- count: '-',
144
+ count: '-'
145
145
  }]
146
146
  this.empty = true
147
147
  }else {
@@ -345,4 +345,4 @@ export default {
345
345
  display: inline-block;
346
346
  font-weight: bold;
347
347
  }
348
- </style>
348
+ </style>
@@ -62,6 +62,11 @@
62
62
  v-model="item.value" :disabled="item.disabled"/>
63
63
  <Calendar v-if="tip" style="top: 35px;" @confirm="confirm($event,item)"></Calendar>
64
64
  </div>
65
+ <div class="cal" v-if="item.type === 'calenderYear'">
66
+ <input type="text" :placeholder="item.placeholder" @focus="focusYear" :maxlength="item.maxlength"
67
+ v-model="item.value" :disabled="item.disabled"/>
68
+ <Year v-if="tipYear" style="top: 35px;" @confirm="confirmYear($event,item)"></Year>
69
+ </div>
65
70
  <div v-if="item.type === 'text'" class="text">{{ item.value }}</div>
66
71
  <div v-if="item.type === 'code'" class="ph-code">
67
72
  <input type="text" v-model="item.value" :maxlength="item.maxlength" :placeholder="item.placeholder"/>
@@ -86,13 +91,15 @@
86
91
  <script>
87
92
  import Select from '../../select/src/select.vue'
88
93
  import Calendar from '../../calendar/src/Calendar'
94
+ import Year from '../../year/src/year'
89
95
 
90
96
  export default {
91
97
  name: 'zydx-tip-box',
92
- components: {Select, Calendar},
98
+ components: {Select, Calendar,Year},
93
99
  data() {
94
100
  return {
95
101
  tip: false,
102
+ tipYear: false,
96
103
  fileName: ''
97
104
  }
98
105
  },
@@ -188,6 +195,13 @@ export default {
188
195
  })
189
196
  this.radioArr[index].checked = true
190
197
  },
198
+ focusYear() {
199
+ this.tipYear = true
200
+ },
201
+ confirmYear(e, data) {
202
+ data.value = e
203
+ this.tipYear = false
204
+ },
191
205
  focus() {
192
206
  this.tip = true
193
207
  },
@@ -115,7 +115,8 @@ export default {
115
115
  })
116
116
  }
117
117
  if(item.testKey) {
118
- item.testKey = JSON.parse(item.testKey).map(x => {
118
+ item.testKey = typeof item.testKey === 'string'? JSON.parse(item.testKey): item.testKey
119
+ item.testKey = item.testKey.map(x => {
119
120
  if(this.ques(item.quesType)) { // 判断是否单选
120
121
  x.checked = x.index === item?.judgeAnswer; //答案
121
122
  }else {
@@ -135,7 +136,7 @@ export default {
135
136
  })
136
137
  this.$nextTick(() => { // 保证所有的数据都渲染完毕
137
138
  const w = this.$refs.parer.offsetWidth // 获取父级宽度
138
- for(let i = 0; i< this.$refs.subject.length; i++) {
139
+ for(let i = 0; i< this.$refs?.subject?.length; i++) {
139
140
  this.value[i].right = w - this.$refs.subject[i].offsetLeft
140
141
  if(this.$refs.b && this.$refs.b.length > 0) {
141
142
  if(this.value[i].right < this.$refs.b[i].offsetWidth) this.value[i].top = 25 // 判断是否换行
package/src/index.js CHANGED
@@ -32,6 +32,7 @@ import pictureViewer from './components/pictureViewer/index';
32
32
  import lessonTemplate from './components/lesson_template/index';
33
33
  import paper from './components/word2/index';
34
34
  import question from './components/question/index';
35
+ import tagging from './components/tagging/index';
35
36
 
36
37
  const components = [
37
38
  Calendar,
@@ -65,7 +66,8 @@ const components = [
65
66
  pictureViewer,
66
67
  lessonTemplate,
67
68
  paper,
68
- question
69
+ question,
70
+ tagging
69
71
  ];
70
72
 
71
73
  function install(app) {
@@ -77,7 +79,7 @@ function install(app) {
77
79
  }
78
80
 
79
81
  export default {
80
- version: '1.32.211',
82
+ version: '1.32.213',
81
83
  install,
82
84
  Calendar,
83
85
  Message,
@@ -112,6 +114,7 @@ export default {
112
114
  pictureViewer,
113
115
  lessonTemplate,
114
116
  paper,
115
- question
117
+ question,
118
+ tagging
116
119
  };
117
120