bm-admin-ui 1.2.26-alpha → 1.2.27-alpha

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.
@@ -18871,29 +18871,6 @@ const _sfc_main$7 = defineComponent({
18871
18871
  }
18872
18872
  }
18873
18873
  }));
18874
- const countText = computed(() => {
18875
- const cache = {};
18876
- props.rule.config.childRules?.forEach((rule) => {
18877
- if (rule.name === "numInput" && rule.config.count) {
18878
- cache[rule.field] = { title: rule.title.title, count: 0 };
18879
- }
18880
- });
18881
- data.forEach((row) => {
18882
- Object.keys(cache).forEach((key) => {
18883
- if (!isNaN(row[key]))
18884
- cache[key].count += row[key];
18885
- });
18886
- });
18887
- if (Object.keys(cache).length)
18888
- return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
18889
- if (index !== 0)
18890
- pre += "\u3001";
18891
- pre += `${cur.title}\uFF1A${cur.count}`;
18892
- return pre;
18893
- }, "")}\uFF09`;
18894
- else
18895
- return "";
18896
- });
18897
18874
  const xGrid = computed(() => bmFloatTableRef.value.xGrid || {});
18898
18875
  const inputRef = ref();
18899
18876
  const childRulesMap = computed(
@@ -18922,6 +18899,44 @@ const _sfc_main$7 = defineComponent({
18922
18899
  "activityApply"
18923
18900
  ].includes(tableConfig.value.template)
18924
18901
  );
18902
+ const countText = computed(() => {
18903
+ let cache = {};
18904
+ props.rule.config.childRules?.forEach((rule) => {
18905
+ if (rule.name === "numInput" && rule.config.count) {
18906
+ cache[rule.field] = { title: rule.title.title, count: 0 };
18907
+ }
18908
+ });
18909
+ data.forEach((row) => {
18910
+ Object.keys(cache).forEach((key) => {
18911
+ if (!isNaN(row[key]))
18912
+ cache[key].count += row[key];
18913
+ });
18914
+ });
18915
+ if (props.rule.config.showTotal) {
18916
+ cache = {
18917
+ _total: { title: "\u884C\u6570", count: data?.length || 0 },
18918
+ ...cache
18919
+ };
18920
+ }
18921
+ if (Object.keys(cache).length) {
18922
+ if (isProductCenter.value) {
18923
+ return `\uFF08${Object.values(cache).reduce((pre, cur, index) => {
18924
+ if (index !== 0)
18925
+ pre += "\u3001";
18926
+ pre += `${cur.title}\u603B\u8BA1\uFF1A${cur.count}`;
18927
+ return pre;
18928
+ }, "")}\uFF09`;
18929
+ }
18930
+ return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
18931
+ if (index !== 0)
18932
+ pre += "\u3001";
18933
+ pre += `${cur.title}\uFF1A${cur.count}`;
18934
+ return pre;
18935
+ }, "")}\uFF09`;
18936
+ } else {
18937
+ return "";
18938
+ }
18939
+ });
18925
18940
  function isShow(key) {
18926
18941
  return props.rule.config.tableAdvancedFeatures.includes(key);
18927
18942
  }
@@ -18885,29 +18885,6 @@ const _sfc_main$7 = vue.defineComponent({
18885
18885
  }
18886
18886
  }
18887
18887
  }));
18888
- const countText = vue.computed(() => {
18889
- const cache = {};
18890
- props.rule.config.childRules?.forEach((rule) => {
18891
- if (rule.name === "numInput" && rule.config.count) {
18892
- cache[rule.field] = { title: rule.title.title, count: 0 };
18893
- }
18894
- });
18895
- data.forEach((row) => {
18896
- Object.keys(cache).forEach((key) => {
18897
- if (!isNaN(row[key]))
18898
- cache[key].count += row[key];
18899
- });
18900
- });
18901
- if (Object.keys(cache).length)
18902
- return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
18903
- if (index !== 0)
18904
- pre += "\u3001";
18905
- pre += `${cur.title}\uFF1A${cur.count}`;
18906
- return pre;
18907
- }, "")}\uFF09`;
18908
- else
18909
- return "";
18910
- });
18911
18888
  const xGrid = vue.computed(() => bmFloatTableRef.value.xGrid || {});
18912
18889
  const inputRef = vue.ref();
18913
18890
  const childRulesMap = vue.computed(
@@ -18936,6 +18913,44 @@ const _sfc_main$7 = vue.defineComponent({
18936
18913
  "activityApply"
18937
18914
  ].includes(tableConfig.value.template)
18938
18915
  );
18916
+ const countText = vue.computed(() => {
18917
+ let cache = {};
18918
+ props.rule.config.childRules?.forEach((rule) => {
18919
+ if (rule.name === "numInput" && rule.config.count) {
18920
+ cache[rule.field] = { title: rule.title.title, count: 0 };
18921
+ }
18922
+ });
18923
+ data.forEach((row) => {
18924
+ Object.keys(cache).forEach((key) => {
18925
+ if (!isNaN(row[key]))
18926
+ cache[key].count += row[key];
18927
+ });
18928
+ });
18929
+ if (props.rule.config.showTotal) {
18930
+ cache = {
18931
+ _total: { title: "\u884C\u6570", count: data?.length || 0 },
18932
+ ...cache
18933
+ };
18934
+ }
18935
+ if (Object.keys(cache).length) {
18936
+ if (isProductCenter.value) {
18937
+ return `\uFF08${Object.values(cache).reduce((pre, cur, index) => {
18938
+ if (index !== 0)
18939
+ pre += "\u3001";
18940
+ pre += `${cur.title}\u603B\u8BA1\uFF1A${cur.count}`;
18941
+ return pre;
18942
+ }, "")}\uFF09`;
18943
+ }
18944
+ return `\uFF08\u5B57\u6BB5\u540D\u603B\u8BA1\uFF1A${Object.values(cache).reduce((pre, cur, index) => {
18945
+ if (index !== 0)
18946
+ pre += "\u3001";
18947
+ pre += `${cur.title}\uFF1A${cur.count}`;
18948
+ return pre;
18949
+ }, "")}\uFF09`;
18950
+ } else {
18951
+ return "";
18952
+ }
18953
+ });
18939
18954
  function isShow(key) {
18940
18955
  return props.rule.config.tableAdvancedFeatures.includes(key);
18941
18956
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bm-admin-ui",
3
- "version": "1.2.26-alpha",
3
+ "version": "1.2.27-alpha",
4
4
  "private": false,
5
5
  "description": "An Admin Component Library for Bm",
6
6
  "license": "UNLICENSED",