cnhis-design-vue 2.1.57 → 2.1.58

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": "cnhis-design-vue",
3
- "version": "2.1.57",
3
+ "version": "2.1.58",
4
4
  "description": "前端业务UI库",
5
5
  "keyword": "cnhis-design-vue vue cnhis",
6
6
  "homepage": "http://dv.cnhis.com/",
@@ -296,6 +296,10 @@ export default {
296
296
  cur.showLabel = "";
297
297
  cur.myUniqueKey = cur[myUniqueKey] || "";
298
298
  cur.myUniqueLabel = reqUniqueKey || "";
299
+ cur.copyRowObj = {
300
+ // 全部备份一下
301
+ ...cur
302
+ };
299
303
  if (wordbook.render_key && wordbook.render_key.length > 0) {
300
304
  wordbook.render_key.forEach(ren => {
301
305
  cur.showLabel += `≌${this.formatField(cur[ren])}`;
@@ -157,6 +157,9 @@ export default create(defineComponent({
157
157
 
158
158
  onMounted(() => {
159
159
  setDefSize();
160
+ if (!isNil(minW.value) && defW < minW.value) {
161
+ State.width = minW.value;
162
+ }
160
163
  open.value && initEvents();
161
164
  });
162
165
 
@@ -27,7 +27,7 @@
27
27
  @click="selectData(item, $event)"
28
28
  >
29
29
  <td v-for="column in columns" :key="column.dataIndex">
30
- <c-ellipsis :content="item[column.key]" />
30
+ <c-ellipsis :content="showLabel(item, column.key)" />
31
31
  </td>
32
32
  </tr>
33
33
  </tbody>
@@ -158,6 +158,22 @@ export default defineComponent({
158
158
  }))
159
159
  );
160
160
 
161
+ const showLabel = (item, key) => {
162
+ const copyRowObj = item.copyRowObj || item;
163
+
164
+ let res = copyRowObj[key];
165
+ try {
166
+ if (res && typeof res == "string" && res.startsWith("###")) {
167
+ res = res.slice(3);
168
+ res = JSON.parse(res);
169
+ res = res.change_text;
170
+ }
171
+ return res || "";
172
+ } catch (error) {
173
+ return "";
174
+ }
175
+ };
176
+
161
177
  const findOptionVNode = val => {
162
178
  return options.value.find(i => getProps(i).value === val);
163
179
  };
@@ -333,7 +349,8 @@ export default defineComponent({
333
349
  isActive,
334
350
  isDisabled,
335
351
  selectData,
336
- handlerKeyDown
352
+ handlerKeyDown,
353
+ showLabel
337
354
  };
338
355
  }
339
356
  });