tianheng-ui 0.1.30 → 0.1.31

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,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.1.30",
4
+ "version": "0.1.31",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -421,7 +421,10 @@ export default {
421
421
  this.$message.warning("请选择字段类型");
422
422
  return reject();
423
423
  }
424
- if (!this.formConfig.config.fieldsApi) {
424
+ if (
425
+ this.formConfig.config.fieldsType === "fieldsApi" &&
426
+ !this.formConfig.config.fieldsApi
427
+ ) {
425
428
  this.$message.warning("请选择字段接口");
426
429
  return reject();
427
430
  }
@@ -186,6 +186,11 @@ export default {
186
186
  this.$emit("click", val, data);
187
187
  },
188
188
  handleDialogOpen(action, data = {}) {
189
+ if (action === "preview") {
190
+ const { href } = this.$router.resolve({ path: "" });
191
+ window.open(href, "_blank");
192
+ return;
193
+ }
189
194
  switch (action) {
190
195
  case "generateJson":
191
196
  const configText = JSON.stringify(this.config, null, 2);
@@ -144,12 +144,15 @@ export default {
144
144
  this.$message.warning("请选择字段表");
145
145
  return reject();
146
146
  }
147
- if (!this.tableConfig.table.title) {
148
- this.$message.warning("请选择列表名称");
147
+ if (
148
+ this.tableConfig.table.fieldsTable === "fieldsApi" &&
149
+ !this.tableConfig.table.mounted.api
150
+ ) {
151
+ this.$message.warning("请选择列表接口");
149
152
  return reject();
150
153
  }
151
- if (!this.tableConfig.table.mounted.api) {
152
- this.$message.warning("请选择列表接口");
154
+ if (!this.tableConfig.table.title) {
155
+ this.$message.warning("请选择列表名称");
153
156
  return reject();
154
157
  }
155
158
  const data = deepClone(this.tableConfig);