af-mobile-client-vue3 1.3.76 → 1.3.77
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
|
@@ -455,7 +455,27 @@ function handleFunctionStyle(funcString, record) {
|
|
|
455
455
|
return {}
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
+
function handleFunctionShow(funcString, record) {
|
|
459
|
+
if (!funcString) {
|
|
460
|
+
return true
|
|
461
|
+
}
|
|
458
462
|
|
|
463
|
+
try {
|
|
464
|
+
// 同步执行函数
|
|
465
|
+
const obj = executeStrFunctionByContext(currInst, funcString, [record])
|
|
466
|
+
// 如果返回的是对象,则直接返回
|
|
467
|
+
// 如果返回的是布尔值,则直接返回
|
|
468
|
+
if (typeof obj === 'boolean') {
|
|
469
|
+
return obj
|
|
470
|
+
}
|
|
471
|
+
// 其他情况返回空对象
|
|
472
|
+
return true
|
|
473
|
+
}
|
|
474
|
+
catch (error) {
|
|
475
|
+
console.error('Error in handleFunctionShow:', error)
|
|
476
|
+
return true
|
|
477
|
+
}
|
|
478
|
+
}
|
|
459
479
|
// 逆序排列主要按钮
|
|
460
480
|
const reversedMainActions = computed(() => {
|
|
461
481
|
return [...mainActions.value].reverse()
|
|
@@ -881,7 +901,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
881
901
|
</VanRow>
|
|
882
902
|
<VanRow gutter="20" class="card_item_details" @click="handleCardClick(item, $event)">
|
|
883
903
|
<VanCol v-for="column of detailColumns" :key="`details_${column.dataIndex}`" :span="column.span">
|
|
884
|
-
<p>
|
|
904
|
+
<p v-if="handleFunctionShow(column.showFormItemFuncForMobile, item)">
|
|
885
905
|
{{ (column.showLabel === undefined || column.showLabel) ? `${column.title}: ` : '' }}
|
|
886
906
|
<XBadge
|
|
887
907
|
:style="handleFunctionStyle(column.styleFunctionForValue, item)"
|
|
@@ -902,7 +922,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
902
922
|
:key="`tag_${column.dataIndex}`"
|
|
903
923
|
>
|
|
904
924
|
<VanTag
|
|
905
|
-
|
|
925
|
+
:show="handleFunctionShow(column.showFormItemFuncForMobile, item)"
|
|
906
926
|
:text-color="column.tagColor"
|
|
907
927
|
:color="column.tagBorderColor"
|
|
908
928
|
size="large"
|
|
@@ -930,7 +950,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
|
|
|
930
950
|
@click="handleCardClick(item, $event)"
|
|
931
951
|
>
|
|
932
952
|
<VanCol v-for="column of footColumns" :key="`foot_${column.dataIndex}`" :span="12">
|
|
933
|
-
<p>
|
|
953
|
+
<p v-if="handleFunctionShow(column.showFormItemFuncForMobile, item)">
|
|
934
954
|
<span :style="handleFunctionStyle(column.styleFunctionForTitle, item)">
|
|
935
955
|
{{ (column.showLabel === undefined || column.showLabel) ? `${column.title}: ` : '' }}
|
|
936
956
|
</span>
|