af-mobile-client-vue3 1.1.47 → 1.1.49

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,112 +1,113 @@
1
- {
2
- "name": "af-mobile-client-vue3",
3
- "type": "module",
4
- "version": "1.1.47",
5
- "description": "Vue + Vite component lib",
6
- "license": "MIT",
7
- "engines": {
8
- "node": ">=18.12.0",
9
- "pnpm": ">=8.15.0"
10
- },
11
- "scripts": {
12
- "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
13
- "build": "vue-tsc --noEmit && vite build",
14
- "build:dev": "vue-tsc --noEmit && vite build --mode=development",
15
- "preview": "vite preview",
16
- "lint": "eslint . && vue-tsc --noEmit",
17
- "lint:fix": "eslint . --fix",
18
- "test": "vitest",
19
- "release": "bumpp --commit --push --tag"
20
- },
21
- "dependencies": {
22
- "@iconify/vue": "4.3.0",
23
- "@micro-zoe/micro-app": "1.0.0-rc.24",
24
- "@unhead/vue": "^2.0.5",
25
- "@vant/area-data": "^2.0.0",
26
- "@vant/touch-emulator": "^1.4.0",
27
- "@vant/use": "^1.6.0",
28
- "@vueuse/core": "^13.1.0",
29
- "animate.css": "^4.1.1",
30
- "axios": "^1.8.4",
31
- "crypto-js": "^4.2.0",
32
- "echarts": "^5.6.0",
33
- "lodash-es": "^4.17.21",
34
- "nprogress": "^0.2.0",
35
- "ol": "^10.5.0",
36
- "pinia": "^3.0.2",
37
- "pinia-plugin-persistedstate": "^4.2.0",
38
- "qs": "^6.14.0",
39
- "resize-detector": "^0.3.0",
40
- "store": "^2.0.12",
41
- "vant": "^4.9.18",
42
- "vconsole": "^3.15.1",
43
- "vue": "^3.5.13",
44
- "vue-router": "^4.5.0",
45
- "vue3-hash-calendar": "^1.1.3"
46
- },
47
- "devDependencies": {
48
- "@antfu/eslint-config": "^4.12.0",
49
- "@iconify/json": "2.2.318",
50
- "@types/crypto-js": "^4.2.2",
51
- "@types/lodash-es": "^4.17.12",
52
- "@types/node": "^22.14.1",
53
- "@types/nprogress": "^0.2.3",
54
- "@types/store": "^2.0.5",
55
- "@unocss/eslint-plugin": "^66.1.0-beta.11",
56
- "@unocss/preset-rem-to-px": "66.1.0-beta.11",
57
- "@vitejs/plugin-legacy": "^6.0.2",
58
- "@vitejs/plugin-vue": "^5.2.3",
59
- "autoprefixer": "^10.4.21",
60
- "bumpp": "^10.1.0",
61
- "commitizen": "^4.3.1",
62
- "consola": "^3.4.2",
63
- "cross-env": "^7.0.3",
64
- "cz-emoji-chinese": "^0.3.1",
65
- "eslint": "^9.24.0",
66
- "eslint-ts-patch": "^8.57.0-0",
67
- "husky": "^9.1.7",
68
- "less": "^4.3.0",
69
- "mockjs": "^1.1.0",
70
- "postcss-mobile-forever": "^5.0.0",
71
- "rollup": "^4.40.0",
72
- "terser": "^5.39.0",
73
- "typescript": "^5.8.3",
74
- "unocss": "^66.1.0-beta.11",
75
- "unplugin-auto-import": "^19.1.2",
76
- "unplugin-vue-components": "^28.4.1",
77
- "unplugin-vue-router": "^0.12.0",
78
- "vite": "^6.2.6",
79
- "vite-plugin-compression": "^0.5.1",
80
- "vite-plugin-mock-dev-server": "^1.8.5",
81
- "vite-plugin-pwa": "^1.0.0",
82
- "vite-plugin-sitemap": "^0.7.1",
83
- "vite-plugin-svg-icons": "^2.0.1",
84
- "vite-plugin-vconsole": "^2.1.1",
85
- "vite-plugin-vue-devtools": "^7.7.2",
86
- "vite-plugin-vue-layouts": "^0.11.0",
87
- "vitest": "^3.1.1",
88
- "vue-tsc": "^2.2.8"
89
- },
90
- "pnpm": {
91
- "peerDependencyRules": {
92
- "ignoreMissing": [
93
- "postcss",
94
- "esbuild"
95
- ],
96
- "allowedVersions": {
97
- "rollup": "^4.x"
98
- }
99
- }
100
- },
101
- "config": {
102
- "commitizen": {
103
- "path": "./node_modules/cz-emoji-chinese"
104
- },
105
- "cz-emoji-chinese": {
106
- "skipQuestions": [
107
- "body",
108
- "scope"
109
- ]
110
- }
111
- }
112
- }
1
+ {
2
+ "name": "af-mobile-client-vue3",
3
+ "type": "module",
4
+ "version": "1.1.49",
5
+ "description": "Vue + Vite component lib",
6
+ "license": "MIT",
7
+ "engines": {
8
+ "node": ">=18.12.0",
9
+ "pnpm": ">=8.15.0"
10
+ },
11
+ "scripts": {
12
+ "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
13
+ "build": "vue-tsc --noEmit && vite build",
14
+ "build:dev": "vue-tsc --noEmit && vite build --mode=development",
15
+ "preview": "vite preview",
16
+ "lint": "eslint . && vue-tsc --noEmit",
17
+ "lint:fix": "eslint . --fix",
18
+ "test": "vitest",
19
+ "release": "bumpp --commit --push --tag"
20
+ },
21
+ "dependencies": {
22
+ "@iconify/vue": "4.3.0",
23
+ "@micro-zoe/micro-app": "1.0.0-rc.24",
24
+ "@unhead/vue": "^2.0.5",
25
+ "@vant/area-data": "^2.0.0",
26
+ "@vant/touch-emulator": "^1.4.0",
27
+ "@vant/use": "^1.6.0",
28
+ "@vueuse/core": "^13.1.0",
29
+ "animate.css": "^4.1.1",
30
+ "axios": "^1.8.4",
31
+ "crypto-js": "^4.2.0",
32
+ "dayjs": "^1.11.13",
33
+ "echarts": "^5.6.0",
34
+ "lodash-es": "^4.17.21",
35
+ "nprogress": "^0.2.0",
36
+ "ol": "^10.5.0",
37
+ "pinia": "^3.0.2",
38
+ "pinia-plugin-persistedstate": "^4.2.0",
39
+ "qs": "^6.14.0",
40
+ "resize-detector": "^0.3.0",
41
+ "store": "^2.0.12",
42
+ "vant": "^4.9.18",
43
+ "vconsole": "^3.15.1",
44
+ "vue": "^3.5.13",
45
+ "vue-router": "^4.5.0",
46
+ "vue3-hash-calendar": "^1.1.3"
47
+ },
48
+ "devDependencies": {
49
+ "@antfu/eslint-config": "^4.12.0",
50
+ "@iconify/json": "2.2.318",
51
+ "@types/crypto-js": "^4.2.2",
52
+ "@types/lodash-es": "^4.17.12",
53
+ "@types/node": "^22.14.1",
54
+ "@types/nprogress": "^0.2.3",
55
+ "@types/store": "^2.0.5",
56
+ "@unocss/eslint-plugin": "^66.1.0-beta.11",
57
+ "@unocss/preset-rem-to-px": "66.1.0-beta.11",
58
+ "@vitejs/plugin-legacy": "^6.0.2",
59
+ "@vitejs/plugin-vue": "^5.2.3",
60
+ "autoprefixer": "^10.4.21",
61
+ "bumpp": "^10.1.0",
62
+ "commitizen": "^4.3.1",
63
+ "consola": "^3.4.2",
64
+ "cross-env": "^7.0.3",
65
+ "cz-emoji-chinese": "^0.3.1",
66
+ "eslint": "^9.24.0",
67
+ "eslint-ts-patch": "^8.57.0-0",
68
+ "husky": "^9.1.7",
69
+ "less": "^4.3.0",
70
+ "mockjs": "^1.1.0",
71
+ "postcss-mobile-forever": "^5.0.0",
72
+ "rollup": "^4.40.0",
73
+ "terser": "^5.39.0",
74
+ "typescript": "^5.8.3",
75
+ "unocss": "^66.1.0-beta.11",
76
+ "unplugin-auto-import": "^19.1.2",
77
+ "unplugin-vue-components": "^28.4.1",
78
+ "unplugin-vue-router": "^0.12.0",
79
+ "vite": "^6.2.6",
80
+ "vite-plugin-compression": "^0.5.1",
81
+ "vite-plugin-mock-dev-server": "^1.8.5",
82
+ "vite-plugin-pwa": "^1.0.0",
83
+ "vite-plugin-sitemap": "^0.7.1",
84
+ "vite-plugin-svg-icons": "^2.0.1",
85
+ "vite-plugin-vconsole": "^2.1.1",
86
+ "vite-plugin-vue-devtools": "^7.7.2",
87
+ "vite-plugin-vue-layouts": "^0.11.0",
88
+ "vitest": "^3.1.1",
89
+ "vue-tsc": "^2.2.8"
90
+ },
91
+ "pnpm": {
92
+ "peerDependencyRules": {
93
+ "ignoreMissing": [
94
+ "postcss",
95
+ "esbuild"
96
+ ],
97
+ "allowedVersions": {
98
+ "rollup": "^4.x"
99
+ }
100
+ }
101
+ },
102
+ "config": {
103
+ "commitizen": {
104
+ "path": "./node_modules/cz-emoji-chinese"
105
+ },
106
+ "cz-emoji-chinese": {
107
+ "skipQuestions": [
108
+ "body",
109
+ "scope"
110
+ ]
111
+ }
112
+ }
113
+ }
@@ -685,6 +685,8 @@ defineExpose({
685
685
  </p>
686
686
  </VanCol>
687
687
  </VanRow>
688
+ <!-- 添加详情插槽 -->
689
+ <slot name="item-detail" :item="item" />
688
690
  <VanRow v-if="allActions.length > 0" gutter="20" class="card_item_bottom">
689
691
  <VanCol span="4">
690
692
  <VanPopover
@@ -14,6 +14,7 @@ import { getDict } from '@af-mobile-client-vue3/utils/dictUtil'
14
14
  import { getRangeByType } from '@af-mobile-client-vue3/utils/queryFormDefaultRangePicker'
15
15
  import { executeStrFunctionByContext } from '@af-mobile-client-vue3/utils/runEvalFunction'
16
16
  import { areaList } from '@vant/area-data'
17
+ import dayjs from 'dayjs'
17
18
  import { debounce } from 'lodash-es'
18
19
  import {
19
20
  Area as VanArea,
@@ -196,6 +197,71 @@ function getDefaultValue() {
196
197
  }
197
198
  }
198
199
 
200
+ function getDateRange({
201
+ type,
202
+ formDefault: defaultValue,
203
+ queryType,
204
+ queryValueFormat: defaultFormat,
205
+ name,
206
+ }: {
207
+ type: string
208
+ formDefault: string
209
+ queryType?: string
210
+ queryValueFormat?: string
211
+ name: string
212
+ }): string | [string, string] | undefined {
213
+ const formatMap: Record<string, string> = {
214
+ yearPicker: 'YYYY',
215
+ yearRangePicker: 'YYYY',
216
+ monthPicker: 'YYYY-MM',
217
+ monthRangePicker: 'YYYY-MM',
218
+ datePicker: 'YYYY-MM-DD HH:mm:ss',
219
+ rangePicker: 'YYYY-MM-DD HH:mm:ss',
220
+ }
221
+
222
+ const format = defaultFormat || formatMap[type]
223
+
224
+ let start: string, end: string
225
+
226
+ switch (defaultValue) {
227
+ case 'curYear':
228
+ start = dayjs().startOf('year').format(format)
229
+ end = dayjs().endOf('year').format(format)
230
+ break
231
+ case 'curMonth':
232
+ start = dayjs().startOf('month').format(format)
233
+ end = dayjs().endOf('month').format(format)
234
+ break
235
+ case 'curDay':
236
+ start = dayjs().startOf('day').format(format)
237
+ end = dayjs().endOf('day').format(format)
238
+ break
239
+ case 'curTime':
240
+ start = dayjs().format(format)
241
+ end = dayjs().format(format)
242
+ break
243
+ default:
244
+ return undefined
245
+ }
246
+
247
+ if (['monthPicker', 'yearPicker', 'datePicker'].includes(type)) {
248
+ if (queryType === 'BETWEEN') {
249
+ return [start, end]
250
+ }
251
+ if (name.includes('开始') || name.includes('起始')) {
252
+ return start
253
+ }
254
+ else {
255
+ return end
256
+ }
257
+ }
258
+ else if (['rangePicker', 'yearRangePicker', 'monthRangePicker'].includes(type)) {
259
+ return [start, end]
260
+ }
261
+
262
+ return [start, end]
263
+ }
264
+
199
265
  // 改用 ref,并设置初始值
200
266
  const localValue = ref(getDefaultValue())
201
267
 
@@ -209,7 +275,12 @@ watch(() => props.modelValue, (newVal) => {
209
275
  if (attr.type === 'rangePicker') {
210
276
  console.log('newVal', newVal)
211
277
  pickerValue.value = newVal !== undefined ? `${newVal[0]} ~ ${newVal[1]}` : getDefaultValue()
212
- console.log('11111111111', getDefaultValue())
278
+ }
279
+ else if (['datePicker', 'rangePicker', 'yearPicker', 'monthPicker', 'yearRangePicker', 'monthRangePicker'].includes(attr.type)) {
280
+ console.log('>>>> attr: ', JSON.stringify(attr))
281
+ const ss = getDateRange(attr)
282
+ console.log('>>>> ss: ', ss)
283
+ localValue.value = getDateRange(attr)
213
284
  }
214
285
  else {
215
286
  console.log('newVal', newVal)
@@ -12,13 +12,14 @@ const formGroupAddConstruction = ref(null)
12
12
  <template>
13
13
  <NormalDataLayout id="XFormGroupView" title="纯表单">
14
14
  <template #layout_content>
15
- <div class="form"> <XForm
16
- ref="formGroupAddConstruction"
17
- mode="新增"
18
- :config-name="configName"
19
- :service-name="serviceName"
20
- /></div>
21
-
15
+ <div class="form">
16
+ <XForm
17
+ ref="formGroupAddConstruction"
18
+ mode="新增"
19
+ :config-name="configName"
20
+ :service-name="serviceName"
21
+ />
22
+ </div>
22
23
  </template>
23
24
  </NormalDataLayout>
24
25
  </template>