ol-base-components 3.2.0 → 3.2.1

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": "ol-base-components",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "bin": {
package/src/App.vue CHANGED
@@ -1,6 +1,9 @@
1
1
  <template>
2
2
  <div id="app">
3
- <ol-customSearch :form-search-data="formSearchData" @onSave="saveHandler"></ol-customSearch>
3
+ <ol-customSearch
4
+ :form-search-data="formSearchData"
5
+ @handleSearch="handleSearch"
6
+ ></ol-customSearch>
4
7
  =========
5
8
  <!-- <div>table组件案例</div> -->
6
9
  <!-- url="/api/app/stock-in/stock-in-pages" -->
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <ol-search
3
3
  :form-search-data="formSearchData"
4
- @handleSearch="handleSearch"
5
4
  @onSave="onSave"
6
5
  v-bind="$attrs"
7
6
  v-on="$listeners"
@@ -27,5 +27,3 @@ const translateWord = async word => {
27
27
  return word.charAt(0).toUpperCase() + word.slice(1);
28
28
  }
29
29
  };
30
-
31
- // 由于配置更新children
@@ -164,7 +164,7 @@
164
164
  {{ expend ? "收起" : "展开" }}</el-button
165
165
  >
166
166
  <el-button
167
- v-if="formSearchData.enableConfig"
167
+ v-if="formSearchData.customs && formSearchData.customs.length"
168
168
  plain
169
169
  size="small"
170
170
  icon="el-icon-setting"
@@ -266,7 +266,7 @@ export default {
266
266
  // 表格框架各种样式
267
267
  options: {},
268
268
  reset: false, // 是否要重置
269
- enableConfig: false, // 是否启用配置功能
269
+ customs: [], //根据customs确定是动态还是swagger配置
270
270
  };
271
271
  },
272
272
  },
@@ -643,11 +643,11 @@ export default {
643
643
 
644
644
  let response;
645
645
  if (method === "post") {
646
- response = await this.$http.post(apiUrl);
646
+ response = await this.post({ url: apiUrl });
647
647
  } else {
648
- response = await this.$http.get(apiUrl);
648
+ response = await this.get({ url: apiUrl });
649
649
  }
650
-
650
+ if (response.code !== 200) return;
651
651
  if (response.result && Array.isArray(response.result)) {
652
652
  const { valueField, labelField } = item.optionSource;
653
653
  const children = response.result.map(d => ({