star-horse-lowcode 2.7.57 → 2.7.58

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/dist/index.es.js CHANGED
@@ -133808,7 +133808,7 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
133808
133808
  let showType = computed(
133809
133809
  () => configStore.configFormInfo?.buttonShowType || "dropdown"
133810
133810
  );
133811
- let permissions = ref({});
133811
+ let permissions = computed(() => props.btnPermissions || pagePermission.addRoute(route));
133812
133812
  const dataForm = ref({});
133813
133813
  const tableCompFunc = (funcName) => {
133814
133814
  emits("tableCompFunc", funcName);
@@ -133938,11 +133938,6 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
133938
133938
  dataForm.value = { ...val };
133939
133939
  };
133940
133940
  const init = async () => {
133941
- if (props.btnPermissions && Object.keys(props.btnPermissions).length > 0) {
133942
- permissions.value = props.btnPermissions;
133943
- } else {
133944
- permissions.value = await pagePermission.addRoute(route);
133945
- }
133946
133941
  };
133947
133942
  onMounted(() => {
133948
133943
  init();
@@ -133991,7 +133986,6 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
133991
133986
  default: withCtx(() => [
133992
133987
  createVNode(_component_star_horse_icon, {
133993
133988
  "icon-class": item.icon || "edit",
133994
- width: "27px",
133995
133989
  size: "18px",
133996
133990
  color: item.authority == "delete" || item.authority == "batchDelete" ? "#f56c6c" : "var(--star-horse-style)"
133997
133991
  }, null, 8, ["icon-class", "color"]),
@@ -134012,7 +134006,6 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
134012
134006
  default: withCtx(() => [
134013
134007
  createVNode(_component_star_horse_icon, {
134014
134008
  "icon-class": item.icon,
134015
- width: "27px",
134016
134009
  size: "18px"
134017
134010
  }, null, 8, ["icon-class"]),
134018
134011
  createTextVNode(" " + toDisplayString(item.btnName) + " ", 1)
@@ -134197,7 +134190,7 @@ const _sfc_main$1o = /* @__PURE__ */ defineComponent({
134197
134190
 
134198
134191
  /* unplugin-vue-components disabled */
134199
134192
 
134200
- const __unplugin_components_2 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["__scopeId", "data-v-1d3217a8"]]);
134193
+ const __unplugin_components_2 = /* @__PURE__ */ _export_sfc(_sfc_main$1o, [["__scopeId", "data-v-7940df05"]]);
134201
134194
 
134202
134195
  const StarHorseButtonList = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
134203
134196
  __proto__: null,
@@ -134782,14 +134775,17 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
134782
134775
  let params = [];
134783
134776
  let keys = props.primaryKey;
134784
134777
  if (ids.length > 0) {
134785
- let isArr = Array.isArray(keys);
134786
- if (isArr) {
134778
+ if (Array.isArray(keys)) {
134787
134779
  for (let key of keys) {
134788
134780
  let temp = [];
134789
134781
  for (let id in ids) {
134790
- temp.push(id[key]);
134782
+ if (id[key]) {
134783
+ temp.push(id[key]);
134784
+ }
134785
+ }
134786
+ if (temp.length > 0) {
134787
+ params.push(createCondition(key, temp, "in"));
134791
134788
  }
134792
- params.push(createCondition(key, temp, "in"));
134793
134789
  }
134794
134790
  } else {
134795
134791
  params.push(createCondition(keys, ids, "in"));
@@ -134797,6 +134793,9 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
134797
134793
  } else {
134798
134794
  params = searchFields;
134799
134795
  }
134796
+ if (params.length == 0) {
134797
+ params = searchFields;
134798
+ }
134800
134799
  let defaultcond = removeEmptyCondition(props.compUrl?.condition);
134801
134800
  if (defaultcond && defaultcond.length > 0) {
134802
134801
  params.push(...defaultcond);
@@ -135728,7 +135727,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
135728
135727
 
135729
135728
  /* unplugin-vue-components disabled */
135730
135729
 
135731
- const __unplugin_components_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["__scopeId", "data-v-49d9026c"]]);
135730
+ const __unplugin_components_1$1 = /* @__PURE__ */ _export_sfc(_sfc_main$1l, [["__scopeId", "data-v-4f7eba77"]]);
135732
135731
 
135733
135732
  const StarHorseTableComp = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
135734
135733
  __proto__: null,
@@ -139052,7 +139051,7 @@ const checkIsDisabled = (attrs) => {
139052
139051
  };
139053
139052
  const initCompCallEvent = (props, emits, formData) => {
139054
139053
  const events = Object.keys(props.field.actions || {});
139055
- if (!props.isSearch && !props.field.preps["stopInitCallAction"] && events?.length > 0) {
139054
+ if (!props.isSearch && !props.field.preps?.["stopInitCallAction"] && events?.length > 0) {
139056
139055
  if (Object.keys(formData.value || {}).length == 0 || !formData.value[props.field.fieldName]) {
139057
139056
  const stop = watch(
139058
139057
  () => formData.value[props.field.fieldName],
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "star-horse-lowcode",
3
3
  "private": false,
4
4
  "author": "l_1019@163.com",
5
- "version": "2.7.57",
5
+ "version": "2.7.58",
6
6
  "type": "module",
7
7
  "description": "星马低代码核心库,提供了低代码平台的基础功能和组件库。此库可引用到您的项目中,快速构建表单和列表。",
8
8
  "keywords": [