@fecp/designer 5.5.7 → 5.5.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.
@@ -1,4 +1,4 @@
1
- const version = "5.5.7";
1
+ const version = "5.5.8";
2
2
  const packageJson = {
3
3
  version
4
4
  };
@@ -1,4 +1,4 @@
1
- import DialogDialog from "./index.vue.mjs";
1
+ import DialogDialog from "./index.vue2.mjs";
2
2
  import { ref } from "vue";
3
3
  function useDialogDialog() {
4
4
  const dialogDialogVisible = ref(false);
@@ -1,4 +1,4 @@
1
- import DialogGlobalDialog from "./index.vue.mjs";
1
+ import DialogGlobalDialog from "./index.vue2.mjs";
2
2
  import { ref } from "vue";
3
3
  function useDialogGlobalDialog() {
4
4
  const dialogGlobalDialogVisible = ref(false);
@@ -52,8 +52,8 @@ import _export_sfc from "../../../../../_virtual/_plugin-vue_export-helper.mjs";
52
52
  import "../../../components/TemplateSelector.vue.mjs";
53
53
  import "../../table/default.mjs";
54
54
  /* empty css */
55
- /* empty css */
56
- /* empty css */
55
+ /* empty css */
56
+ /* empty css */
57
57
  import "../../../store/index.mjs";
58
58
  /* empty css */
59
59
  import { ElCollapse, ElCollapseItem } from "../../../../../node_modules/element-plus/es/components/collapse/index.mjs";
@@ -3,7 +3,7 @@ import { createDataSource } from "../packages/utils/datasource.mjs";
3
3
  import { getEditConfigDataSources } from "../packages/utils/common.mjs";
4
4
  import { getDataSourceWithConcurrencyControl, getDictionaryWithConcurrencyControl } from "./simpleCache.mjs";
5
5
  import api from "../api/index.mjs";
6
- async function loadOptions(ctx2, config, callback) {
6
+ async function loadOptions(ctx, config, callback) {
7
7
  const { fieldType, optionConfig = {} } = config;
8
8
  if (fieldType !== "select" && fieldType !== "multipleSelection" && fieldType !== "cascader" && fieldType !== "area" && fieldType !== "industry" && fieldType !== "radio" && fieldType !== "checkbox") {
9
9
  const result = optionConfig.options || [];
@@ -13,7 +13,7 @@ async function loadOptions(ctx2, config, callback) {
13
13
  const rawData = await getDataSourceWithConcurrencyControl(
14
14
  "sysArea",
15
15
  async () => {
16
- const data = await api.getDataDicArea4Cascader(ctx2.$http);
16
+ const data = await api.getDataDicArea4Cascader(ctx.$http);
17
17
  return data;
18
18
  }
19
19
  );
@@ -22,7 +22,7 @@ async function loadOptions(ctx2, config, callback) {
22
22
  const rawData = await getDataSourceWithConcurrencyControl(
23
23
  "sysIndustry",
24
24
  async () => {
25
- const data = await api.getDataDicTrade4Cascader(ctx2.$http);
25
+ const data = await api.getDataDicTrade4Cascader(ctx.$http);
26
26
  return data;
27
27
  }
28
28
  );
@@ -42,6 +42,7 @@ async function loadOptions(ctx2, config, callback) {
42
42
  try {
43
43
  if (optionSource === "dataSource" && dataSourceValue) {
44
44
  const result = await loadDataSourceOptions(
45
+ ctx,
45
46
  dataSourceValue,
46
47
  displayField,
47
48
  valueField,
@@ -52,7 +53,7 @@ async function loadOptions(ctx2, config, callback) {
52
53
  }
53
54
  if (optionSource === "dictionary" && dictionaryValue) {
54
55
  const result = await loadDictionaryOptions(
55
- ctx2,
56
+ ctx,
56
57
  dictionaryValue,
57
58
  staticOptions
58
59
  );
@@ -66,7 +67,7 @@ async function loadOptions(ctx2, config, callback) {
66
67
  return staticOptions;
67
68
  }
68
69
  }
69
- async function loadDataSourceOptions(dataSourceValue, displayField, valueField, fallbackOptions = []) {
70
+ async function loadDataSourceOptions(ctx, dataSourceValue, displayField, valueField, fallbackOptions = []) {
70
71
  var _a, _b;
71
72
  try {
72
73
  const dataSources = getEditConfigDataSources();
@@ -105,11 +106,11 @@ async function loadDataSourceOptions(dataSourceValue, displayField, valueField,
105
106
  return fallbackOptions;
106
107
  }
107
108
  }
108
- async function loadDictionaryOptions(ctx2, dictionaryValue, fallbackOptions = []) {
109
+ async function loadDictionaryOptions(ctx, dictionaryValue, fallbackOptions = []) {
109
110
  try {
110
111
  const dictData = await getDictionaryWithConcurrencyControl(
111
112
  dictionaryValue,
112
- () => api.getDicDataByKey(ctx2.$http, dictionaryValue)
113
+ () => api.getDicDataByKey(ctx.$http, dictionaryValue)
113
114
  );
114
115
  const result = [];
115
116
  for (const key in dictData) {
@@ -124,7 +125,7 @@ async function loadDictionaryOptions(ctx2, dictionaryValue, fallbackOptions = []
124
125
  return fallbackOptions;
125
126
  }
126
127
  }
127
- function useOptions(ctx2, config) {
128
+ function useOptions(ctx, config) {
128
129
  const options = ref([]);
129
130
  const loading = ref(false);
130
131
  const configRef = isRef(config) ? config : ref(config);
@@ -135,7 +136,7 @@ function useOptions(ctx2, config) {
135
136
  if (!newConfig) return;
136
137
  loading.value = true;
137
138
  try {
138
- const result = await loadOptions(ctx2, newConfig);
139
+ const result = await loadOptions(ctx, newConfig);
139
140
  options.value = result;
140
141
  } catch (error) {
141
142
  console.error("加载选项失败:", error);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const version = "5.5.7";
3
+ const version = "5.5.8";
4
4
  const packageJson = {
5
5
  version
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.vue.js");
3
+ const index = require("./index.vue2.js");
4
4
  const vue = require("vue");
5
5
  function useDialogDialog() {
6
6
  const dialogDialogVisible = vue.ref(false);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index.vue.js");
3
+ const index = require("./index.vue2.js");
4
4
  const vue = require("vue");
5
5
  function useDialogGlobalDialog() {
6
6
  const dialogGlobalDialogVisible = vue.ref(false);
@@ -54,8 +54,8 @@ const _pluginVue_exportHelper = require("../../../../../_virtual/_plugin-vue_exp
54
54
  require("../../../components/TemplateSelector.vue.js");
55
55
  require("../../table/default.js");
56
56
  ;/* empty css */
57
- ;/* empty css */
58
- ;/* empty css */
57
+ ;/* empty css */
58
+ ;/* empty css */
59
59
  require("../../../store/index.js");
60
60
  ;/* empty css */
61
61
  const index$2 = require("../../../../../node_modules/element-plus/es/components/collapse/index.js");
@@ -5,7 +5,7 @@ const datasource = require("../packages/utils/datasource.js");
5
5
  const common = require("../packages/utils/common.js");
6
6
  const simpleCache = require("./simpleCache.js");
7
7
  const index = require("../api/index.js");
8
- async function loadOptions(ctx2, config, callback) {
8
+ async function loadOptions(ctx, config, callback) {
9
9
  const { fieldType, optionConfig = {} } = config;
10
10
  if (fieldType !== "select" && fieldType !== "multipleSelection" && fieldType !== "cascader" && fieldType !== "area" && fieldType !== "industry" && fieldType !== "radio" && fieldType !== "checkbox") {
11
11
  const result = optionConfig.options || [];
@@ -15,7 +15,7 @@ async function loadOptions(ctx2, config, callback) {
15
15
  const rawData = await simpleCache.getDataSourceWithConcurrencyControl(
16
16
  "sysArea",
17
17
  async () => {
18
- const data = await index.default.getDataDicArea4Cascader(ctx2.$http);
18
+ const data = await index.default.getDataDicArea4Cascader(ctx.$http);
19
19
  return data;
20
20
  }
21
21
  );
@@ -24,7 +24,7 @@ async function loadOptions(ctx2, config, callback) {
24
24
  const rawData = await simpleCache.getDataSourceWithConcurrencyControl(
25
25
  "sysIndustry",
26
26
  async () => {
27
- const data = await index.default.getDataDicTrade4Cascader(ctx2.$http);
27
+ const data = await index.default.getDataDicTrade4Cascader(ctx.$http);
28
28
  return data;
29
29
  }
30
30
  );
@@ -44,6 +44,7 @@ async function loadOptions(ctx2, config, callback) {
44
44
  try {
45
45
  if (optionSource === "dataSource" && dataSourceValue) {
46
46
  const result = await loadDataSourceOptions(
47
+ ctx,
47
48
  dataSourceValue,
48
49
  displayField,
49
50
  valueField,
@@ -54,7 +55,7 @@ async function loadOptions(ctx2, config, callback) {
54
55
  }
55
56
  if (optionSource === "dictionary" && dictionaryValue) {
56
57
  const result = await loadDictionaryOptions(
57
- ctx2,
58
+ ctx,
58
59
  dictionaryValue,
59
60
  staticOptions
60
61
  );
@@ -68,7 +69,7 @@ async function loadOptions(ctx2, config, callback) {
68
69
  return staticOptions;
69
70
  }
70
71
  }
71
- async function loadDataSourceOptions(dataSourceValue, displayField, valueField, fallbackOptions = []) {
72
+ async function loadDataSourceOptions(ctx, dataSourceValue, displayField, valueField, fallbackOptions = []) {
72
73
  var _a, _b;
73
74
  try {
74
75
  const dataSources = common.getEditConfigDataSources();
@@ -107,11 +108,11 @@ async function loadDataSourceOptions(dataSourceValue, displayField, valueField,
107
108
  return fallbackOptions;
108
109
  }
109
110
  }
110
- async function loadDictionaryOptions(ctx2, dictionaryValue, fallbackOptions = []) {
111
+ async function loadDictionaryOptions(ctx, dictionaryValue, fallbackOptions = []) {
111
112
  try {
112
113
  const dictData = await simpleCache.getDictionaryWithConcurrencyControl(
113
114
  dictionaryValue,
114
- () => index.default.getDicDataByKey(ctx2.$http, dictionaryValue)
115
+ () => index.default.getDicDataByKey(ctx.$http, dictionaryValue)
115
116
  );
116
117
  const result = [];
117
118
  for (const key in dictData) {
@@ -126,7 +127,7 @@ async function loadDictionaryOptions(ctx2, dictionaryValue, fallbackOptions = []
126
127
  return fallbackOptions;
127
128
  }
128
129
  }
129
- function useOptions(ctx2, config) {
130
+ function useOptions(ctx, config) {
130
131
  const options = vue.ref([]);
131
132
  const loading = vue.ref(false);
132
133
  const configRef = isRef(config) ? config : vue.ref(config);
@@ -137,7 +138,7 @@ function useOptions(ctx2, config) {
137
138
  if (!newConfig) return;
138
139
  loading.value = true;
139
140
  try {
140
- const result = await loadOptions(ctx2, newConfig);
141
+ const result = await loadOptions(ctx, newConfig);
141
142
  options.value = result;
142
143
  } catch (error) {
143
144
  console.error("加载选项失败:", error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fecp/designer",
3
- "version": "5.5.7",
3
+ "version": "5.5.8",
4
4
  "main": "lib/designer/index.js",
5
5
  "module": "es/designer/index.mjs",
6
6
  "files": [