@94ai/nf-form-item 100.1.1 → 100.1.2

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 CHANGED
@@ -23,6 +23,8 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
23
23
  isExpand: boolean;
24
24
  initExpand: boolean;
25
25
  } & import("vue/types/v3-component-options").ExtractComputedReturns<import("vue-demi").ComponentComputedOptions & {
26
+ expandBtnTooltipDesc(): any;
27
+ shrinkBtnTooltipDesc(): any;
26
28
  downIcon(): any;
27
29
  upIcon(): any;
28
30
  isCollapse(): any;
@@ -53,6 +55,8 @@ declare const _default: import("vue/types/v3-component-public-instance").Compone
53
55
  isExpand: boolean;
54
56
  initExpand: boolean;
55
57
  }, {
58
+ expandBtnTooltipDesc(): any;
59
+ shrinkBtnTooltipDesc(): any;
56
60
  downIcon(): any;
57
61
  upIcon(): any;
58
62
  isCollapse(): any;
@@ -55,6 +55,14 @@ const _sfc_main = vueDemi.defineComponent({
55
55
  });
56
56
  },
57
57
  computed: {
58
+ expandBtnTooltipDesc() {
59
+ var _a;
60
+ return (_a = this.form) == null ? void 0 : _a.expandBtnTooltipDesc;
61
+ },
62
+ shrinkBtnTooltipDesc() {
63
+ var _a;
64
+ return (_a = this.form) == null ? void 0 : _a.shrinkBtnTooltipDesc;
65
+ },
58
66
  downIcon() {
59
67
  var _a;
60
68
  return (_a = this.form) == null ? void 0 : _a.downIcon;
@@ -194,7 +202,7 @@ var _sfc_render = function render() {
194
202
  staticClass: "nf-ml10"
195
203
  }, [_c("el-tooltip", {
196
204
  attrs: {
197
- "content": _vm.isExpand ? "收起" : "展开",
205
+ "content": _vm.isExpand ? _vm.shrinkBtnTooltipDesc : _vm.expandBtnTooltipDesc,
198
206
  "placement": "top"
199
207
  }
200
208
  }, [_c("el-button", {
@@ -53,6 +53,14 @@ const _sfc_main = defineComponent({
53
53
  });
54
54
  },
55
55
  computed: {
56
+ expandBtnTooltipDesc() {
57
+ var _a;
58
+ return (_a = this.form) == null ? void 0 : _a.expandBtnTooltipDesc;
59
+ },
60
+ shrinkBtnTooltipDesc() {
61
+ var _a;
62
+ return (_a = this.form) == null ? void 0 : _a.shrinkBtnTooltipDesc;
63
+ },
56
64
  downIcon() {
57
65
  var _a;
58
66
  return (_a = this.form) == null ? void 0 : _a.downIcon;
@@ -192,7 +200,7 @@ var _sfc_render = function render() {
192
200
  staticClass: "nf-ml10"
193
201
  }, [_c("el-tooltip", {
194
202
  attrs: {
195
- "content": _vm.isExpand ? "收起" : "展开",
203
+ "content": _vm.isExpand ? _vm.shrinkBtnTooltipDesc : _vm.expandBtnTooltipDesc,
196
204
  "placement": "top"
197
205
  }
198
206
  }, [_c("el-button", {
@@ -8,6 +8,8 @@ declare const _default: import("vue-demi").DefineComponent<{
8
8
  isExpand: boolean;
9
9
  initExpand: boolean;
10
10
  }, {
11
+ expandBtnTooltipDesc(): any;
12
+ shrinkBtnTooltipDesc(): any;
11
13
  downIcon(): any;
12
14
  upIcon(): any;
13
15
  isCollapse(): any;
@@ -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 ? '收起' : '展开'" placement="top">
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": "100.1.1",
3
+ "version": "100.1.2",
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": "^100.1.1",
17
+ "@94ai/nf-theme-chalk": "^100.1.2",
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": "b039d7cd2dc96d3caa84a60da9f0b5f68f9572e5"
33
+ "gitHead": "5b811c0e9d5ed95519222e3a9b744331734feeaf"
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
- }