af-mobile-client-vue3 1.3.74 → 1.3.76

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,7 +1,7 @@
1
1
  {
2
2
  "name": "af-mobile-client-vue3",
3
3
  "type": "module",
4
- "version": "1.3.74",
4
+ "version": "1.3.76",
5
5
  "packageManager": "pnpm@10.13.1",
6
6
  "description": "Vue + Vite component lib",
7
7
  "engines": {
@@ -882,9 +882,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
882
882
  <VanRow gutter="20" class="card_item_details" @click="handleCardClick(item, $event)">
883
883
  <VanCol v-for="column of detailColumns" :key="`details_${column.dataIndex}`" :span="column.span">
884
884
  <p>
885
- <span :style="handleFunctionStyle(column.styleFunctionForTitle, item)">
886
- {{ (column.showLabel === undefined || column.showLabel) ? `${column.title}: ` : '' }}
887
- </span>
885
+ {{ (column.showLabel === undefined || column.showLabel) ? `${column.title}: ` : '' }}
888
886
  <XBadge
889
887
  :style="handleFunctionStyle(column.styleFunctionForValue, item)"
890
888
  :dict-name="column.dictName"
@@ -904,6 +902,7 @@ function handleCheckboxChange(item: any, checked: boolean) {
904
902
  :key="`tag_${column.dataIndex}`"
905
903
  >
906
904
  <VanTag
905
+ v-if="handleFunctionStyle(column.showFormItemFuncForMobile, item)"
907
906
  :text-color="column.tagColor"
908
907
  :color="column.tagBorderColor"
909
908
  size="large"
@@ -0,0 +1,27 @@
1
+ // 时间工具:提供简单的日期时间格式化
2
+
3
+ export function pad2(num: number): string {
4
+ return num < 10 ? `0${num}` : `${num}`
5
+ }
6
+
7
+ /**
8
+ * 按照简单占位符格式化当前时间
9
+ * 支持占位:YYYY MM DD HH mm ss
10
+ * @param format 默认 'YYYY-MM-DD HH:mm:ss'
11
+ */
12
+ export function formatNow(format: string = 'YYYY-MM-DD HH:mm:ss'): string {
13
+ const d = new Date()
14
+ const map: Record<string, string> = {
15
+ YYYY: `${d.getFullYear()}`,
16
+ MM: pad2(d.getMonth() + 1),
17
+ DD: pad2(d.getDate()),
18
+ HH: pad2(d.getHours()),
19
+ mm: pad2(d.getMinutes()),
20
+ ss: pad2(d.getSeconds()),
21
+ }
22
+ let out = format
23
+ Object.keys(map).forEach((k) => {
24
+ out = out.replace(new RegExp(k, 'g'), map[k])
25
+ })
26
+ return out
27
+ }
@@ -12,7 +12,7 @@ const router = useRouter()
12
12
  // const idKey = ref('o_id')
13
13
 
14
14
  // 简易crud表单测试
15
- const configName = ref('ceshiCRUD')
15
+ const configName = ref('mobile_casualSecurityCheckCRUD')
16
16
  const serviceName = ref('af-safecheck')
17
17
 
18
18
  // 资源权限测试