zydx-plus 1.33.409 → 1.33.410
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
|
@@ -19,7 +19,11 @@ export default defineComponent({
|
|
|
19
19
|
reset: {
|
|
20
20
|
type: Boolean,
|
|
21
21
|
default: false
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
activeColor: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: '#00ff00'
|
|
26
|
+
},
|
|
23
27
|
},
|
|
24
28
|
data() {
|
|
25
29
|
return {
|
|
@@ -83,13 +87,15 @@ export default defineComponent({
|
|
|
83
87
|
switch (type) {
|
|
84
88
|
case 'button': {
|
|
85
89
|
let curr_name = this.active_state[idx] ? active_name : name
|
|
90
|
+
let style = {color:this.active_state[idx] ? this.activeColor:'#000000'}
|
|
86
91
|
let btn = h(
|
|
87
92
|
<button
|
|
88
|
-
class={this.active_state[idx] ?
|
|
93
|
+
class={this.active_state[idx] ? 'z-button z-active' : 'z-button'}
|
|
89
94
|
data-id={data_id}
|
|
90
95
|
onClick={() => { onClick(); ignore ? () => null : trackClick(idx) }
|
|
91
96
|
}
|
|
92
97
|
disabled={disabled}
|
|
98
|
+
style={style}
|
|
93
99
|
>
|
|
94
100
|
</button>,
|
|
95
101
|
{
|
|
@@ -236,9 +242,12 @@ export default defineComponent({
|
|
|
236
242
|
border: none;
|
|
237
243
|
}
|
|
238
244
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
245
|
+
/*
|
|
246
|
+
*/
|
|
247
|
+
/* .z-button.textActivep {
|
|
248
|
+
color: rgba(75, 12, 119, 1) !important;
|
|
249
|
+
} */
|
|
250
|
+
|
|
242
251
|
|
|
243
252
|
.z-button:disabled {
|
|
244
253
|
background-color: #ffffff;
|
|
@@ -160,6 +160,7 @@ export default {
|
|
|
160
160
|
let text = data[i].offsetHeight
|
|
161
161
|
if ((pHeight + text) > max) {
|
|
162
162
|
const {start, end, size} = this.rows(data[i], max - pHeight)
|
|
163
|
+
console.log(start, end, size);
|
|
163
164
|
html += `<p class="text"><span style="font-size: ${size}px">${start.data}</span></p>`
|
|
164
165
|
this.htmlArr.push(html)
|
|
165
166
|
pHeight = 0
|
|
@@ -215,8 +216,13 @@ export default {
|
|
|
215
216
|
})
|
|
216
217
|
},
|
|
217
218
|
rows(data,num) {
|
|
219
|
+
let line = ''
|
|
220
|
+
if(window.getComputedStyle(data, null).lineHeight === 'normal') {
|
|
221
|
+
line = 16.8
|
|
222
|
+
} else {
|
|
223
|
+
line = parseInt(window.getComputedStyle(data, null).lineHeight)
|
|
224
|
+
}
|
|
218
225
|
let size = parseInt(window.getComputedStyle(data, null).fontSize)
|
|
219
|
-
let line = parseInt(window.getComputedStyle(data, null).lineHeight)
|
|
220
226
|
let width = data.offsetWidth
|
|
221
227
|
let height = data.offsetHeight
|
|
222
228
|
let rows = Math.round(num / line) // 行数
|