@94ai/nf-search-form 3.2.4 → 3.2.21

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/tools.ts CHANGED
@@ -2,10 +2,8 @@
2
2
  * 创建唯一的字符串
3
3
  * @return {string} ojgdvbvaua40
4
4
  */
5
- export function createUniqueString() {
6
- const timestamp = +new Date() + ''
7
- const randomNum = parseInt(String((1 + Math.random()) * 65536)) + ''
8
- return (+(randomNum + timestamp)).toString(32)
5
+ export function createUniqueString(randomLength = 36) {
6
+ return Number(Math.random().toString().substr(3, randomLength) + Date.now()).toString(36)
9
7
  }
10
8
 
11
9
  export function debounce(func, wait, immediate) {
@@ -62,6 +60,22 @@ export const on = (function() {
62
60
  }
63
61
  })()
64
62
 
63
+ export function deepClone(source) {
64
+ if (!source && typeof source !== 'object') {
65
+ throw new Error('error arguments shallowClone')
66
+ }
67
+ const targetObj: Record<string, any> | Record<string, any>[] = source.constructor === Array ? [] : {}
68
+ Object.keys(source).forEach((keys) => {
69
+ if (source[keys] && typeof source[keys] === 'object') {
70
+ targetObj[keys] = source[keys].constructor === Array ? [] : {}
71
+ targetObj[keys] = deepClone(source[keys])
72
+ } else {
73
+ targetObj[keys] = source[keys]
74
+ }
75
+ })
76
+ return targetObj
77
+ }
78
+
65
79
  /**
66
80
  * 移除事件监听
67
81
  */
package/package/types.ts CHANGED
@@ -1,4 +1,8 @@
1
1
  export type NfSearchFormItemOption = {
2
+ key?: string
3
+ _index?: number
4
+ __index?: number
5
+ initHidden?: boolean
2
6
  /**
3
7
  * nf-form-item配置
4
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@94ai/nf-search-form",
3
- "version": "3.2.4",
3
+ "version": "3.2.21",
4
4
  "description": "> TODO: description",
5
5
  "keywords": [],
6
6
  "author": "zoujiahe <zoujiahe@94ai.com>",
@@ -14,19 +14,23 @@
14
14
  "url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
15
15
  },
16
16
  "dependencies": {
17
- "@94ai/nf-action": "^3.2.4",
18
- "@94ai/nf-double-half-year": "^3.2.4",
19
- "@94ai/nf-double-quarter": "^3.2.4",
20
- "@94ai/nf-double-week": "^3.2.4",
21
- "@94ai/nf-double-year": "^3.2.4",
22
- "@94ai/nf-form": "^3.2.4",
23
- "@94ai/nf-form-item": "^3.2.4",
24
- "@94ai/nf-half-year-picker": "^3.2.4",
25
- "@94ai/nf-quarter-picker": "^3.2.4",
26
- "@94ai/nf-select-transfer": "^3.2.4",
27
- "@94ai/nf-theme-chalk": "^3.2.4",
28
- "@94ai/nf-virtual-select": "^3.2.4",
29
- "vue-demi": "^0.14.5"
17
+ "@94ai/nf-action": "^3.2.21",
18
+ "@94ai/nf-double-half-year": "^3.2.21",
19
+ "@94ai/nf-double-quarter": "^3.2.21",
20
+ "@94ai/nf-double-week": "^3.2.21",
21
+ "@94ai/nf-double-year": "^3.2.21",
22
+ "@94ai/nf-drawer": "^3.2.21",
23
+ "@94ai/nf-form": "^3.2.21",
24
+ "@94ai/nf-form-item": "^3.2.21",
25
+ "@94ai/nf-half-year-picker": "^3.2.21",
26
+ "@94ai/nf-message": "^3.2.21",
27
+ "@94ai/nf-quarter-picker": "^3.2.21",
28
+ "@94ai/nf-select-transfer": "^3.2.21",
29
+ "@94ai/nf-theme-chalk": "^3.2.21",
30
+ "@94ai/nf-virtual-select": "^3.2.21",
31
+ "vue-cookies": "^1.8.3",
32
+ "vue-demi": "^0.14.5",
33
+ "vuedraggable": "^2.24.3"
30
34
  },
31
35
  "peerDependenciesMeta": {
32
36
  "@vue/composition-api": {
@@ -41,5 +45,5 @@
41
45
  "types": "lib/index.d.ts",
42
46
  "main": "lib/nf-search-form.cjs.js",
43
47
  "module": "lib/nf-search-form.esm-bundler.js",
44
- "gitHead": "9518f3ee1354378e844b825d6d850d18ec14f71a"
48
+ "gitHead": "8da3362ffe37c1c3114c8bca6c0fe24ac21c0c78"
45
49
  }