@94ai/nf-form-item 3.2.48 → 3.2.51
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/lib/index.d.ts +4 -0
- package/lib/nf-form-item.cjs.js +98 -1410
- package/lib/nf-form-item.esm-bundler.js +98 -1410
- package/lib/nf-form-item.vue.d.ts +2 -0
- package/package/nf-form-item.vue +7 -1
- package/package.json +3 -3
- package/lib/utils.d.ts +0 -1
- package/package/utils.ts +0 -36
package/package/nf-form-item.vue
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
<div v-if="isLastItem" class="nf-flex">
|
|
26
26
|
<slot />
|
|
27
27
|
<div v-if="showBtn" class="nf-ml10">
|
|
28
|
-
<el-tooltip :content="isExpand ?
|
|
28
|
+
<el-tooltip :content="isExpand ? shrinkBtnTooltipDesc : expandBtnTooltipDesc" placement="top">
|
|
29
29
|
<el-button
|
|
30
30
|
class="nf-pointer"
|
|
31
31
|
@click="switchMode"
|
|
@@ -121,6 +121,12 @@ export default defineComponent({
|
|
|
121
121
|
})
|
|
122
122
|
},
|
|
123
123
|
computed: {
|
|
124
|
+
expandBtnTooltipDesc() {
|
|
125
|
+
return this.form?.expandBtnTooltipDesc
|
|
126
|
+
},
|
|
127
|
+
shrinkBtnTooltipDesc() {
|
|
128
|
+
return this.form?.shrinkBtnTooltipDesc
|
|
129
|
+
},
|
|
124
130
|
downIcon() {
|
|
125
131
|
return this.form?.downIcon
|
|
126
132
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@94ai/nf-form-item",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.51",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "zoujiahe <zoujiahe@94ai.com>",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "http://94ai.gitlab.com/zoujiahe/common-ui.git"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@94ai/nf-theme-chalk": "^3.2.
|
|
17
|
+
"@94ai/nf-theme-chalk": "^3.2.51",
|
|
18
18
|
"vue-demi": "^0.14.5"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"types": "lib/index.d.ts",
|
|
31
31
|
"main": "lib/nf-form-item.cjs.js",
|
|
32
32
|
"module": "lib/nf-form-item.esm-bundler.js",
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "1c4b9d8c3b8c416274a210124bf9f5f75ce01c73"
|
|
34
34
|
}
|
package/lib/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function debounce(func: any, wait: any, immediate: any): (...args: any[]) => any;
|
package/package/utils.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export function debounce(func, wait, immediate) {
|
|
2
|
-
let timeout, args, context, timestamp, result
|
|
3
|
-
|
|
4
|
-
const later = function() {
|
|
5
|
-
// 据上一次触发时间间隔
|
|
6
|
-
const last = +new Date() - timestamp
|
|
7
|
-
|
|
8
|
-
// 上次被包装函数被调用时间间隔last小于设定时间间隔wait
|
|
9
|
-
if (last < wait && last > 0) {
|
|
10
|
-
timeout = setTimeout(later, wait - last)
|
|
11
|
-
} else {
|
|
12
|
-
timeout = null
|
|
13
|
-
// 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
|
|
14
|
-
if (!immediate) {
|
|
15
|
-
result = func.apply(context, args)
|
|
16
|
-
if (!timeout) context = args = null
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return function(...args) {
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
context = this
|
|
24
|
-
timestamp = +new Date()
|
|
25
|
-
const callNow = immediate && !timeout
|
|
26
|
-
// 如果延时不存在,重新设定延时
|
|
27
|
-
if (!timeout) timeout = setTimeout(later, wait)
|
|
28
|
-
if (callNow) {
|
|
29
|
-
result = func.apply(context, args)
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
context = args = null
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return result
|
|
35
|
-
}
|
|
36
|
-
}
|