zydx-plus 1.33.409 → 1.33.411

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.409",
3
+ "version": "1.33.411",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -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] ? 'z-button active' : 'z-button'}
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
- .z-button.active {
240
- color: #00ff00 !important;
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;
@@ -120,7 +120,7 @@ export default {
120
120
  text-align: center;
121
121
  line-height: 26px;
122
122
  color: #333;
123
- font-size: 14px;
123
+ font-size: 12px;
124
124
  user-select: none;
125
125
  display: inline-block;
126
126
  }
@@ -124,6 +124,9 @@
124
124
  }
125
125
  .list-left{
126
126
  flex: 1;
127
+ white-space: nowrap; /* 确保文本在一行内显示 */
128
+ overflow: hidden; /* 隐藏超出容器的内容 */
129
+ text-overflow: ellipsis; /* 使用省略号表示被截断的文本 */
127
130
  }
128
131
  .list-left span{
129
132
  font-size: 16px;
@@ -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) // 行数
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.409',
86
+ version: '1.33.411',
87
87
  install,
88
88
  Calendar,
89
89
  Message,