yh-hiprint 2.2.7 → 2.2.8

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.
@@ -222,7 +222,7 @@
222
222
  label-position="top"
223
223
  size="small">
224
224
  <el-form-item label="表数据选择">
225
- <template v-if="formCode">
225
+ <template v-if="hasDataSource">
226
226
  <el-select
227
227
  v-model="listCode"
228
228
  @change="tableFieldChange">
@@ -243,7 +243,7 @@
243
243
  :span="12"
244
244
  v-for="col in currentElementObjColumns">
245
245
  <el-form-item :label="col.title">
246
- <template v-if="formCode">
246
+ <template v-if="hasDataSource">
247
247
  <el-select v-model="col.field">
248
248
  <el-option
249
249
  v-for="d in listColumns"
@@ -601,6 +601,10 @@ async function updateTemplate(code) {
601
601
  }
602
602
  updateing = false;
603
603
  }
604
+
605
+ const hasDataSource = computed(() => {
606
+ return Array.isArray(formCode.value) ? formCode.value.length > 0 : formCode.value;
607
+ });
604
608
  onActivated(() => {
605
609
  updateTemplate(route.query.code);
606
610
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yh-hiprint",
3
- "version": "2.2.7",
3
+ "version": "2.2.8",
4
4
  "description": "Hiprint for Vue3 by NoahLiu in ForceCon in Hunan Changesha",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",