zydx-plus 1.33.441 → 1.33.442

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.33.441",
3
+ "version": "1.33.442",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -150,9 +150,9 @@
150
150
  word-break: break-all;
151
151
  text-justify: distribute;
152
152
  }
153
- .buts-actives{
153
+ /* .buts-actives{
154
154
  color: #00ff00 !important;
155
- }
155
+ } */
156
156
  input[name='check'] {
157
157
  width: 15px;
158
158
  height: 15px;
@@ -10,7 +10,7 @@
10
10
  v-html="item.title"></em><em v-if="scoreShow">({{ item.score }}分)</em>
11
11
  <i class="subject-but" ref="subject">
12
12
  <b :style="{right: -item.right + 'px', top: item.top + 'px'}" ref="b">
13
- <button class="but" :disabled="it.disabled" v-for="(it) in item.customBut" :class="{'buts-actives': it.active&&it.butStart,'buts-disabled': it.disabled}" @click="customButTap(it,item)">{{ it.active? it.nameActive: it.name }}</button>
13
+ <button class="but" :disabled="it.disabled" v-for="(it) in item.customBut" :class="{'buts-actives theme-text': it.active&&it.butStart,'buts-disabled': it.disabled}" @click="customButTap(it,item)">{{ it.active? it.nameActive: it.name }}</button>
14
14
  </b>
15
15
  </i>
16
16
  </span>
@@ -149,6 +149,7 @@ export default {
149
149
  },
150
150
  init() {
151
151
  const val = JSON.parse(JSON.stringify(this.data))
152
+ let copy = this.value.length?this.value:[]
152
153
  this.value = val.map((item, index) => { // 转换html
153
154
  item.choice = true
154
155
  item.right = 0
@@ -178,6 +179,14 @@ export default {
178
179
  }
179
180
  return item
180
181
  })
182
+ if( copy.length && this.value.length) {
183
+ copy.forEach((item, index) => {
184
+ if(item.resourceId===this.value[index].resourceId){
185
+ this.value[index].open = item.open
186
+ this.value[index].customBut[0].active = item.open
187
+ }
188
+ })
189
+ }
181
190
  this.$nextTick(() => { // 保证所有的数据都渲染完毕
182
191
  const w = this.$refs.parer.offsetWidth // 获取父级宽度
183
192
  for (let i = 0; i < this.$refs?.subject?.length; i++) {
@@ -95,7 +95,7 @@
95
95
  v-model="item.value" :disabled="item.disabled"/>
96
96
  <Year v-if="tipYear" style="top: 35px;" @confirm="confirmYear($event,item)"></Year>
97
97
  </div>
98
- <div v-if="item.type === 'text'" class="text">{{ item.value }}</div>
98
+ <div v-if="item.type === 'text'" class="text" v-html="item.value"></div>
99
99
  <div v-if="item.type === 'code'" class="ph-code">
100
100
  <input type="text" v-model="item.value" :maxlength="item.maxlength" :placeholder="item.placeholder"/>
101
101
  <button ref="tipID" @click="item.codeTap($refs.tipID[0],inputArr)">{{
@@ -1,30 +1,22 @@
1
1
  <template>
2
2
  <div class="list-tree">
3
3
  <div class="list-cont" v-if="list.length > 0">
4
- <div :class="{'list-li':true, 'theme-text': active === index}"
4
+ <div :class="{'list-li':true, 'theme-text': active === index, pos: multiple}"
5
5
  :style="{'border-bottom': (link)? '1px solid #ccc': '0', 'color': (active === index)? activeColor : '#333'}"
6
- @click="listTap(item,index)" v-for="(item,index) in list" :key="index">
7
- <div class="list-title">
8
- <!-- <span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}">{{
9
- index + 1
10
- }}. {{ (angleBrackets) ? '《' : '' }} {{ item[column[0].label] }} {{
11
- (angleBrackets) ? '》' : ''
12
- }}</span> -->
6
+ v-for="(item,index) in listCopy" :key="index">
7
+ <input v-if="multiple" :checked="item.box" @change="checkboxChange($event,index)" class="box-list" type="checkbox" name="boxList" />
8
+ <div class="list-title" @click="listTap(item,index)">
13
9
  <span :style="{'font-size': column[0].fontSize + 'px', 'font-weight': column[0].fontWeight}" v-html="(index + 1) + '.' + (angleBrackets ? '《' : '') + item[column[0].label] + (angleBrackets ? '》' : '')"></span>
14
10
  <button v-if="delShow" @click="del(item)" v-html="delText"></button>
15
11
  </div>
16
12
  <div class="list-cont" v-if="open">
17
13
  <div class="list-li-cont">
18
- <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{
19
- item[it.label]
20
- }}</p>
14
+ <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{ item[it.label] }}</p>
21
15
  </div>
22
16
  </div>
23
17
  <div class="list-cont" v-else>
24
18
  <div class="list-li-cont" v-if="active === index">
25
- <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{
26
- item[it.label]
27
- }}</p>
19
+ <p v-for="(it,ind) in column.slice(1, column.length)" :key="ind">{{ it.name }}:{{ item[it.label] }}</p>
28
20
  </div>
29
21
  </div>
30
22
  </div>
@@ -39,6 +31,7 @@ export default {
39
31
  data() {
40
32
  return {
41
33
  active: this.actives,
34
+ listCopy: []
42
35
  }
43
36
  },
44
37
  props: {
@@ -77,16 +70,41 @@ export default {
77
70
  delText: {
78
71
  type: String,
79
72
  default: '删除'
80
- }
73
+ },
74
+ multiple: {
75
+ type: Boolean,
76
+ default: false
77
+ }
81
78
  },
82
79
  watch: {
83
80
  actives(val) {
84
- console.log(val)
85
81
  if (val === -1) return
86
82
  this.active = val
87
- }
83
+ },
84
+ list: {
85
+ handler(val) {
86
+ let list = JSON.parse(JSON.stringify(val))
87
+ this.listCopy = list.map(x => {
88
+ x.box = false
89
+ return x
90
+ })
91
+ },
92
+ deep: true,
93
+ immediate: true
94
+ }
88
95
  },
89
96
  methods: {
97
+ multipleChoice(v) {
98
+ this.listCopy.map(x => {
99
+ x.box = v
100
+ return x
101
+ })
102
+ },
103
+ checkboxChange(e,v) {
104
+ this.listCopy[v].box = e.target.checked
105
+ const data = this.listCopy.filter(x => x.box)
106
+ this.$emit('multipleData', data)
107
+ },
90
108
  del(data) {
91
109
  this.$emit('del', data)
92
110
  },
@@ -99,6 +117,16 @@ export default {
99
117
  </script>
100
118
 
101
119
  <style scoped>
120
+ .pos{
121
+ position: relative;
122
+ padding-left: 20px;
123
+ }
124
+ .box-list{
125
+ position: absolute;
126
+ top: 9px;
127
+ left: 0;
128
+ z-index: 1;
129
+ }
102
130
  .wu {
103
131
  text-align: center;
104
132
  font-size: 18px;
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.441',
86
+ version: '1.33.442',
87
87
  install,
88
88
  Calendar,
89
89
  Message,