bl-common-vue3 3.8.52 → 3.8.53

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": "bl-common-vue3",
3
- "version": "3.8.52",
3
+ "version": "3.8.53",
4
4
  "main": "index.js",
5
5
  "module": "index.js",
6
6
  "description": "bailing vue3 common components lib",
@@ -568,7 +568,15 @@ const utils = {
568
568
  if (!window.microApp) {
569
569
  window.microApp = microApp;
570
570
  }
571
- }
571
+ },
572
+
573
+ // 是否是开发环境
574
+ isEnv: () => {
575
+ if (process.env.NODE_ENV === "production") {
576
+ return false;
577
+ }
578
+ return true;
579
+ },
572
580
  };
573
581
 
574
582
  export default utils;
@@ -4,18 +4,18 @@
4
4
  <div class="visitoeTitleText">
5
5
  <span v-for="(filter, filterIndex) in filterParams" :key="filterIndex">
6
6
  <a-tag v-if="(
7
- filter?.input_type == 'input' ||
8
- filter?.input_type == 'inputNumber' ||
9
- filter?.input_type == 'datePicker' ||
10
- filter?.input_type == 'dateTimePicker' ||
7
+ filter?.input_type == 'input' ||
8
+ filter?.input_type == 'inputNumber' ||
9
+ filter?.input_type == 'datePicker' ||
10
+ filter?.input_type == 'dateTimePicker' ||
11
11
  filter?.input_type == 'timePicker'
12
12
  ) && (filter?.value || filter?.value === 0)" color="blue" closable @close.prevent="closeTages(filter?.field)" style="margin-bottom: 5px;">
13
13
  {{ filter?.label }}:{{ filter?.value }}
14
14
  </a-tag>
15
15
  <a-tag v-if="(
16
- filter?.input_type == 'dateRangePicker' ||
17
- filter?.input_type == 'dateTimeRangePicker' ||
18
- filter?.input_type == 'timeRangePicker' ||
16
+ filter?.input_type == 'dateRangePicker' ||
17
+ filter?.input_type == 'dateTimeRangePicker' ||
18
+ filter?.input_type == 'timeRangePicker' ||
19
19
  filter?.input_type == 'numberRange'
20
20
  ) && filter?.value && filter?.value.length > 0" color="blue" closable @close.prevent="closeTages(filter?.field)" style="margin-bottom: 5px;">
21
21
  {{ filter?.label }}:{{ filter?.value[0] }} ~ {{ filter?.value[1] }}
@@ -1611,12 +1611,12 @@ export default defineComponent({
1611
1611
  default: true,
1612
1612
  },
1613
1613
  // 刷新的时候清除列表(滚动条会滚动到顶部)
1614
- ClearList: {
1614
+ ClearList: {
1615
1615
  type: Boolean,
1616
1616
  default: true,
1617
1617
  },
1618
1618
  // 显示搜索项
1619
- displayTitleCollapsed: {
1619
+ displayTitleCollapsed: {
1620
1620
  type: Boolean,
1621
1621
  default: false,
1622
1622
  },
@@ -1732,12 +1732,12 @@ export default defineComponent({
1732
1732
  if(state.filterList[i].input_type == 'input' || state.filterList[i].input_type == 'inputNumber'){
1733
1733
  state.filterList[i].value = ''
1734
1734
  }
1735
- if(
1736
- state.filterList[i].input_type == 'datePicker' ||
1737
- state.filterList[i].input_type == 'dateTimePicker' ||
1738
- state.filterList[i].input_type == 'timePicker' ||
1739
- state.filterList[i].input_type == 'dateRangePicker' ||
1740
- state.filterList[i].input_type == 'dateTimeRangePicker' ||
1735
+ if(
1736
+ state.filterList[i].input_type == 'datePicker' ||
1737
+ state.filterList[i].input_type == 'dateTimePicker' ||
1738
+ state.filterList[i].input_type == 'timePicker' ||
1739
+ state.filterList[i].input_type == 'dateRangePicker' ||
1740
+ state.filterList[i].input_type == 'dateTimeRangePicker' ||
1741
1741
  state.filterList[i].input_type == 'timeRangePicker'
1742
1742
  ){
1743
1743
  state.filterList[i].value = null
@@ -1769,7 +1769,7 @@ export default defineComponent({
1769
1769
  }
1770
1770
  }
1771
1771
  }
1772
-
1772
+
1773
1773
  handleSearch()
1774
1774
  }
1775
1775
 
@@ -2003,10 +2003,12 @@ export default defineComponent({
2003
2003
 
2004
2004
  /* 导出 */
2005
2005
  const handleExport = () => {
2006
- console.log(
2007
- "localRowSelection.value",
2008
- localRowSelection.value?.selectedRowKeys
2009
- );
2006
+ if (utils.isEnv()) {
2007
+ console.log(
2008
+ "localRowSelection.value",
2009
+ localRowSelection.value?.selectedRowKeys
2010
+ );
2011
+ }
2010
2012
  if (localRowSelection.value?.selectedRowKeys.length > 0) {
2011
2013
  state.listParams.filters.push({
2012
2014
  field: "ids",
@@ -2241,11 +2243,13 @@ export default defineComponent({
2241
2243
  if (props.hasPagination) {
2242
2244
  localPagination.total = res?.total || 0;
2243
2245
  }
2244
- console.log("process_alias", res?.process_alias);
2245
- console.log(
2246
- "ApprovalProcessSettings",
2247
- props.ApprovalProcessSettings
2248
- );
2246
+ if (utils.isEnv()) {
2247
+ console.log("process_alias", res?.process_alias);
2248
+ console.log(
2249
+ "ApprovalProcessSettings",
2250
+ props.ApprovalProcessSettings
2251
+ );
2252
+ }
2249
2253
  if (res?.process_alias && props.ApprovalProcessSettings) {
2250
2254
  state.alias = res?.process_alias || "";
2251
2255
  getApprovalList();
@@ -2297,13 +2301,15 @@ export default defineComponent({
2297
2301
  sorter,
2298
2302
  { currentDataSource }
2299
2303
  ) => {
2300
- console.log(
2301
- "handleTableChange:pagination, filters, sorter, currentDataSource",
2302
- pagination,
2303
- filters,
2304
- sorter,
2305
- currentDataSource
2306
- );
2304
+ if (utils.isEnv()) {
2305
+ console.log(
2306
+ "handleTableChange:pagination, filters, sorter, currentDataSource",
2307
+ pagination,
2308
+ filters,
2309
+ sorter,
2310
+ currentDataSource
2311
+ );
2312
+ }
2307
2313
  localPagination.current = pagination.current;
2308
2314
  localPagination.pageSize = pagination.pageSize;
2309
2315
  if (Array.isArray(sorter)) {
@@ -2605,14 +2611,16 @@ export default defineComponent({
2605
2611
  if (tPagHeight) {
2606
2612
  tPagHeight = tPagHeight + 32; // 分页的margin距离
2607
2613
  }
2608
- console.log(
2609
- props.tableHeight,
2610
- tTitleHeight,
2611
- tHeaderHeight,
2612
- tPagHeight,
2613
- tableRef.value.$el.getElementsByClassName("ant-table-thead")[0],
2614
- "0000000000000000000"
2615
- );
2614
+ if (utils.isEnv()) {
2615
+ console.log(
2616
+ props.tableHeight,
2617
+ tTitleHeight,
2618
+ tHeaderHeight,
2619
+ tPagHeight,
2620
+ tableRef.value.$el.getElementsByClassName("ant-table-thead")[0],
2621
+ "0000000000000000000"
2622
+ );
2623
+ }
2616
2624
  let tableScrollHeight =
2617
2625
  props.tableHeight -
2618
2626
  tTitleHeight -
@@ -2836,7 +2844,9 @@ export default defineComponent({
2836
2844
  }
2837
2845
  }
2838
2846
  state.filterParams = _.cloneDeep(state.filterList);
2839
- console.log('====================' , state.filterParams);
2847
+ if (utils.isEnv()) {
2848
+ console.log('====================' , state.filterParams);
2849
+ }
2840
2850
  loadData(true);
2841
2851
  };
2842
2852