resolver-egretimp-plus 0.1.93 → 0.1.94

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,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.93",
3
+ "version": "0.1.94",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -303,26 +303,28 @@ function normalTableRowValue(row) {
303
303
  }
304
304
  </script>
305
305
  <template>
306
- <cmi-table ref="tableRef" :key="tableKey" v-bind="tableProps" @rowclick="tableEvents.onRowclick" @togglelandscape="tableEvents.onTogglelandscape">
307
- <cmi-table-column
308
- v-for="column in pmPageMetaList" :key="column.metaCode"
309
- v-bind="{
310
- ...attrs,
311
- ...getTableColumnProps(column)
312
- }"
313
- >
314
- </cmi-table-column>
315
- </cmi-table>
316
- <div v-if="pageable && normalPageTotal > 3" :style="{'display': 'flex', 'justify-content': pageAlignEnmu[pageAlign || PAGE_CENTER]}" style="margin-bottom: 12px;">
317
- <cmi-pagination
318
- :key="normalPageTotal"
319
- style="border-radius: 8px;border: 1px solid rgba(219,219,219,1);"
320
- v-bind="{...paginationProps, ...pagenationEvents}"
321
- @sizeChange="pagenationEvents.onSizeChange"
322
- @currentChange="pagenationEvents.onCurrentChange"
323
- :total="normalPageTotal"
324
- :pagesize="page.pageSize"
325
- :current="page.pageNum"
326
- />
306
+ <div>
307
+ <cmi-table ref="tableRef" :key="tableKey" v-bind="tableProps" @rowclick="tableEvents.onRowclick" @togglelandscape="tableEvents.onTogglelandscape">
308
+ <cmi-table-column
309
+ v-for="column in pmPageMetaList" :key="column.metaCode"
310
+ v-bind="{
311
+ ...attrs,
312
+ ...getTableColumnProps(column)
313
+ }"
314
+ >
315
+ </cmi-table-column>
316
+ </cmi-table>
317
+ <div v-if="pageable && normalPageTotal > 3" :style="{'display': 'flex', 'justify-content': pageAlignEnmu[pageAlign || PAGE_CENTER]}" style="margin-bottom: 12px;">
318
+ <cmi-pagination
319
+ :key="normalPageTotal"
320
+ style="border-radius: 8px;border: 1px solid rgba(219,219,219,1);"
321
+ v-bind="{...paginationProps, ...pagenationEvents}"
322
+ @sizeChange="pagenationEvents.onSizeChange"
323
+ @currentChange="pagenationEvents.onCurrentChange"
324
+ :total="normalPageTotal"
325
+ :pagesize="page.pageSize"
326
+ :current="page.pageNum"
327
+ />
328
+ </div>
327
329
  </div>
328
330
  </template>
@@ -28,6 +28,8 @@ import {
28
28
  import { ARG_FLAGS, MULTI_PAGE_META_LIST_TYPES } from '../utils/const'
29
29
 
30
30
  import { findComponent, formatDate, hasOwn, isPlainObject, parseExtendAttr } from '../utils/index';
31
+ import dayjs from 'dayjs';
32
+
31
33
  const valArrTypes = [...MULTI_PAGE_META_LIST_TYPES]
32
34
  const valBooleanTypes = []
33
35
 
@@ -538,6 +540,9 @@ const allInitEvents = {
538
540
  if (matchVal.trimEnd().trimStart() === ARG_FLAGS.CURRENT_DATE) {
539
541
  return formatDate(new Date(), 'yyyy-MM-dd')
540
542
  }
543
+ if (matchVal.trimEnd().trimStart() === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
544
+ return dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
545
+ }
541
546
  return originVal
542
547
  })
543
548
  } else {
@@ -7,6 +7,7 @@ export const MODE = {
7
7
  }
8
8
  export const ARG_FLAGS = {
9
9
  CURRENT_DATE: '_currentDate',
10
+ CURRENT_DATE_EXCLUDE: '_currentDateExclude',
10
11
  CURRENT_DATE_TIME: '_currentDateTime',
11
12
  REF_VAL: '_refVal'
12
13
  }
@@ -2,6 +2,7 @@ import { toRaw } from 'vue'
2
2
  import { formatDate, isPlainObject } from './common'
3
3
  import { ARG_FLAGS, isHidden, VALUE_TYPES } from './const'
4
4
  import { isArray, isNumber, isString } from './is'
5
+ import dayjs from 'dayjs'
5
6
 
6
7
  export default function defaultVal(config) {
7
8
  if (
@@ -27,9 +28,17 @@ export default function defaultVal(config) {
27
28
  } else if (/^{[\w\W]*}$/.test(trimValue) || /^\[[\w\W]*\]$/.test(trimValue)) {
28
29
  defaultVal = JSON.parse(trimValue)
29
30
  } else {
30
- if (trimValue === ARG_FLAGS.CURRENT_DATE || trimValue === 'currentDate' || trimValue === ARG_FLAGS.CURRENT_DATE_TIME) {
31
+ const dateFlagIncluds = [
32
+ ARG_FLAGS.CURRENT_DATE,
33
+ 'currentDate',
34
+ ARG_FLAGS.CURRENT_DATE_TIME,
35
+ ARG_FLAGS.CURRENT_DATE_EXCLUDE
36
+ ]
37
+ if (dateFlagIncluds.includes((trimValue || '').trim())) {
31
38
  if (trimValue === ARG_FLAGS.CURRENT_DATE_TIME) {
32
39
  defaultVal = formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')
40
+ } else if (trimValue === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
41
+ defaultVal = dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
33
42
  } else {
34
43
  defaultVal = formatDate(new Date(), 'yyyy-MM-dd')
35
44
  }
@@ -35,6 +35,7 @@ import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../comp
35
35
  import CmiFormItem from '../components/cmiFormItem'
36
36
  import loadModule from './loadModule.js'
37
37
  import { h } from 'vue'
38
+ import dayjs from 'dayjs'
38
39
 
39
40
  // 解析配置中的defStyle属性
40
41
  export function parseDefStyle(defStyle) {
@@ -59,6 +60,8 @@ function deepParseFnStr(obj, refVal) {
59
60
  obj[key] = refVal || ''
60
61
  } else if (obj[key] === ARG_FLAGS.CURRENT_DATE) {
61
62
  obj[key] = formatDate(new Date(), 'yyyy-MM-dd')
63
+ } else if (obj[key] === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
64
+ obj[key] = dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
62
65
  } else {
63
66
  const { checked, val } = preserveCheck(key, obj[key])
64
67
  if (checked) {