cnhis-design-vue 3.1.40-beta.11 → 3.1.40-beta.12
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/README.md +87 -87
- package/es/components/form-config/index.d.ts +1 -1
- package/es/components/form-config/src/FormConfig.vue.d.ts +1 -1
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/keyboard/index.d.ts +4 -21
- package/es/components/keyboard/src/Keyboard.vue.d.ts +4 -21
- package/es/components/keyboard/src/components/InputNumber.vue.d.ts +2 -19
- package/es/components/keyboard/src/components/InputNumber.vue.js +7 -15
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +4 -21
- package/es/components/keyboard/src/components/NumberPanel.vue.js +23 -23
- package/es/components/scale-view/src/ScaleView.vue.d.ts +0 -3
- package/es/components/scale-view/src/ScaleView.vue.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/components/table-filter/src/base-search-com/BaseSearch.vue.d.ts +3 -0
- package/es/components/table-filter/src/quick-search/QuickSearch.vue.d.ts +4 -3
- package/es/components/table-filter/style/index.css +1 -1
- package/es/env.d.ts +24 -24
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +0 -6823
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
# 安装
|
|
2
|
-
|
|
3
|
-
```shell
|
|
4
|
-
npm i cnhis-design-vue@[版本号]
|
|
5
|
-
# or
|
|
6
|
-
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
## 1.全局引入
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
// main.ts
|
|
13
|
-
import { createApp } from 'vue';
|
|
14
|
-
import App from './App.vue';
|
|
15
|
-
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
-
import cui from 'cnhis-design-vue';
|
|
17
|
-
|
|
18
|
-
const app = createApp(App);
|
|
19
|
-
app.use(cui).mount('#app');
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. 按需引入
|
|
23
|
-
|
|
24
|
-
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
-
|
|
26
|
-
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
-
|
|
28
|
-
```shell
|
|
29
|
-
# 安装自动导入样式的插件
|
|
30
|
-
npm i -d vite-plugin-style-import
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
```typescript
|
|
34
|
-
// vite.config.ts
|
|
35
|
-
import { defineConfig } from 'vite';
|
|
36
|
-
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
-
|
|
38
|
-
export default defineConfig({
|
|
39
|
-
plugins: [
|
|
40
|
-
// ...otherPlugins
|
|
41
|
-
createStyleImportPlugin({
|
|
42
|
-
libs: [
|
|
43
|
-
{
|
|
44
|
-
libraryName: 'cnhis-design-vue',
|
|
45
|
-
esModule: true,
|
|
46
|
-
ensureStyleFile: true,
|
|
47
|
-
resolveStyle: name => {
|
|
48
|
-
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
-
|
|
59
|
-
```typescript
|
|
60
|
-
// main.ts
|
|
61
|
-
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## 3.FAQ
|
|
65
|
-
|
|
66
|
-
### 3.1 项目打包后样式丢失
|
|
67
|
-
|
|
68
|
-
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
-
|
|
70
|
-
```typescript
|
|
71
|
-
// vite.config.ts
|
|
72
|
-
import { defineConfig } from 'vite';
|
|
73
|
-
|
|
74
|
-
export default defineConfig({
|
|
75
|
-
build: {
|
|
76
|
-
rollupOptions: {
|
|
77
|
-
// ..otherOptions
|
|
78
|
-
output: {
|
|
79
|
-
dir: './dist',
|
|
80
|
-
manualChunks: {
|
|
81
|
-
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
```
|
|
1
|
+
# 安装
|
|
2
|
+
|
|
3
|
+
```shell
|
|
4
|
+
npm i cnhis-design-vue@[版本号]
|
|
5
|
+
# or
|
|
6
|
+
yarn add cnhis-design-vue@[版本号] #推荐
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## 1.全局引入
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
// main.ts
|
|
13
|
+
import { createApp } from 'vue';
|
|
14
|
+
import App from './App.vue';
|
|
15
|
+
import 'cnhis-design-vue/es/packages/index.css';
|
|
16
|
+
import cui from 'cnhis-design-vue';
|
|
17
|
+
|
|
18
|
+
const app = createApp(App);
|
|
19
|
+
app.use(cui).mount('#app');
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## 2. 按需引入
|
|
23
|
+
|
|
24
|
+
组件现在支持了自动按需引入, 但是样式文件需要额外的处理
|
|
25
|
+
|
|
26
|
+
### 2.1 样式处理方式1 (按需引入样式)
|
|
27
|
+
|
|
28
|
+
```shell
|
|
29
|
+
# 安装自动导入样式的插件
|
|
30
|
+
npm i -d vite-plugin-style-import
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// vite.config.ts
|
|
35
|
+
import { defineConfig } from 'vite';
|
|
36
|
+
import { createStyleImportPlugin } from 'vite-plugin-style-import';
|
|
37
|
+
|
|
38
|
+
export default defineConfig({
|
|
39
|
+
plugins: [
|
|
40
|
+
// ...otherPlugins
|
|
41
|
+
createStyleImportPlugin({
|
|
42
|
+
libs: [
|
|
43
|
+
{
|
|
44
|
+
libraryName: 'cnhis-design-vue',
|
|
45
|
+
esModule: true,
|
|
46
|
+
ensureStyleFile: true,
|
|
47
|
+
resolveStyle: name => {
|
|
48
|
+
return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
});
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### 2.2 样式处理方式2 (全局引入样式)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
// main.ts
|
|
61
|
+
import 'cnhis-design-vue/es/components/index.css';
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 3.FAQ
|
|
65
|
+
|
|
66
|
+
### 3.1 项目打包后样式丢失
|
|
67
|
+
|
|
68
|
+
处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
// vite.config.ts
|
|
72
|
+
import { defineConfig } from 'vite';
|
|
73
|
+
|
|
74
|
+
export default defineConfig({
|
|
75
|
+
build: {
|
|
76
|
+
rollupOptions: {
|
|
77
|
+
// ..otherOptions
|
|
78
|
+
output: {
|
|
79
|
+
dir: './dist',
|
|
80
|
+
manualChunks: {
|
|
81
|
+
'cnhis-vendor': ['cnhis-design-vue']
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
```
|
|
@@ -1011,7 +1011,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1011
1011
|
fieldList: import("vue").Ref<{
|
|
1012
1012
|
[x: string]: any;
|
|
1013
1013
|
val_key: string;
|
|
1014
|
-
html_type: string;
|
|
1014
|
+
html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
|
|
1015
1015
|
annotation?: boolean | undefined;
|
|
1016
1016
|
val_key_unit?: string | undefined;
|
|
1017
1017
|
is_edit?: import("..").FormCommonState | undefined;
|
|
@@ -1012,7 +1012,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1012
1012
|
fieldList: import("vue").Ref<{
|
|
1013
1013
|
[x: string]: any;
|
|
1014
1014
|
val_key: string;
|
|
1015
|
-
html_type: string;
|
|
1015
|
+
html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
|
|
1016
1016
|
annotation?: boolean | undefined;
|
|
1017
1017
|
val_key_unit?: string | undefined;
|
|
1018
1018
|
is_edit?: import("../..").FormCommonState | undefined;
|
|
@@ -19,7 +19,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
19
19
|
fieldList: import("vue").Ref<{
|
|
20
20
|
[x: string]: any;
|
|
21
21
|
val_key: string;
|
|
22
|
-
html_type: string;
|
|
22
|
+
html_type: "LINEBAR" | "DATE" | "SELECT" | ({} & string) | "COMBINATION" | "INPUT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
|
|
23
23
|
annotation?: boolean | undefined;
|
|
24
24
|
val_key_unit?: string | undefined;
|
|
25
25
|
is_edit?: import("../../../../../es/components/form-render").FormCommonState | undefined;
|
|
@@ -4,6 +4,7 @@ import { CSSProperties, VNode } from 'vue';
|
|
|
4
4
|
import { DependKeyType, FormCommonState, FormRequestType } from '../../../../../es/components/form-render';
|
|
5
5
|
export * from '@formily/core';
|
|
6
6
|
declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
|
|
7
|
+
declare type HtmlType = 'INPUT' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
|
|
7
8
|
export declare type ValidateItem = Partial<{
|
|
8
9
|
/**
|
|
9
10
|
* 业务类型
|
|
@@ -92,7 +93,7 @@ export declare type FieldItem = {
|
|
|
92
93
|
/**
|
|
93
94
|
* 控件类型
|
|
94
95
|
*/
|
|
95
|
-
html_type:
|
|
96
|
+
html_type: HtmlType;
|
|
96
97
|
} & Partial<{
|
|
97
98
|
/**
|
|
98
99
|
* 是否开启批注(需要先在表单维度开启)
|
|
@@ -181,11 +181,11 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
181
181
|
inputValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
182
182
|
numeratorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
183
183
|
denominatorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
184
|
-
inputSelect: import("vue").Ref<boolean>;
|
|
185
184
|
keyboardRef: import("vue").Ref<HTMLElement | null>;
|
|
185
|
+
inputRef: any;
|
|
186
186
|
style: import("vue").ComputedRef<string> | undefined;
|
|
187
187
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
188
|
-
keydown: (key: string | number) => void
|
|
188
|
+
keydown: (key: string | number) => Promise<void>;
|
|
189
189
|
validator: () => boolean;
|
|
190
190
|
doDelete: () => void;
|
|
191
191
|
updateFraction: (value: number) => void;
|
|
@@ -208,10 +208,6 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
208
208
|
type: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
209
209
|
default: string;
|
|
210
210
|
};
|
|
211
|
-
select: {
|
|
212
|
-
type: BooleanConstructor;
|
|
213
|
-
default: boolean;
|
|
214
|
-
};
|
|
215
211
|
}, {
|
|
216
212
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
217
213
|
modelValue: {
|
|
@@ -226,29 +222,22 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
226
222
|
type: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
227
223
|
default: string;
|
|
228
224
|
};
|
|
229
|
-
select: {
|
|
230
|
-
type: BooleanConstructor;
|
|
231
|
-
default: boolean;
|
|
232
|
-
};
|
|
233
225
|
}>> & {
|
|
234
226
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
235
227
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
236
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
237
228
|
}>>;
|
|
238
|
-
emit: (event: "update:modelValue" | "update:status"
|
|
229
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
239
230
|
inputRef: any;
|
|
240
231
|
toSelectInputContent: import("vue").Ref<number>;
|
|
241
232
|
update: (value: string | [string, string]) => void;
|
|
242
233
|
validator: (value: string) => boolean;
|
|
243
234
|
calculate: (type: string) => void;
|
|
244
|
-
unSelect: () => void;
|
|
245
|
-
onSelect: () => void;
|
|
246
235
|
NInput: any;
|
|
247
236
|
NIcon: any;
|
|
248
237
|
NSpace: any;
|
|
249
238
|
CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
250
239
|
CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
251
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status"
|
|
240
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
252
241
|
modelValue: {
|
|
253
242
|
type: StringConstructor;
|
|
254
243
|
default: string;
|
|
@@ -261,19 +250,13 @@ declare const Keyboard: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
261
250
|
type: import("vue").PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
262
251
|
default: string;
|
|
263
252
|
};
|
|
264
|
-
select: {
|
|
265
|
-
type: BooleanConstructor;
|
|
266
|
-
default: boolean;
|
|
267
|
-
};
|
|
268
253
|
}>> & {
|
|
269
254
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
270
255
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
271
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
272
256
|
}, {
|
|
273
257
|
modelValue: string;
|
|
274
258
|
status: import("naive-ui/es/form/src/interface").FormValidationStatus;
|
|
275
259
|
integer: boolean;
|
|
276
|
-
select: boolean;
|
|
277
260
|
}>;
|
|
278
261
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
279
262
|
defaultValue: {
|
|
@@ -182,11 +182,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
182
182
|
inputValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
183
183
|
numeratorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
184
184
|
denominatorValueStatus: import("vue").Ref<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
185
|
-
inputSelect: import("vue").Ref<boolean>;
|
|
186
185
|
keyboardRef: import("vue").Ref<HTMLElement | null>;
|
|
186
|
+
inputRef: any;
|
|
187
187
|
style: import("vue").ComputedRef<string> | undefined;
|
|
188
188
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
189
|
-
keydown: (key: string | number) => void
|
|
189
|
+
keydown: (key: string | number) => Promise<void>;
|
|
190
190
|
validator: () => boolean;
|
|
191
191
|
doDelete: () => void;
|
|
192
192
|
updateFraction: (value: number) => void;
|
|
@@ -209,10 +209,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
209
209
|
type: PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
210
210
|
default: string;
|
|
211
211
|
};
|
|
212
|
-
select: {
|
|
213
|
-
type: BooleanConstructor;
|
|
214
|
-
default: boolean;
|
|
215
|
-
};
|
|
216
212
|
}, {
|
|
217
213
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
218
214
|
modelValue: {
|
|
@@ -227,29 +223,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
227
223
|
type: PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
228
224
|
default: string;
|
|
229
225
|
};
|
|
230
|
-
select: {
|
|
231
|
-
type: BooleanConstructor;
|
|
232
|
-
default: boolean;
|
|
233
|
-
};
|
|
234
226
|
}>> & {
|
|
235
227
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
236
228
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
237
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
238
229
|
}>>;
|
|
239
|
-
emit: (event: "update:modelValue" | "update:status"
|
|
230
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
240
231
|
inputRef: any;
|
|
241
232
|
toSelectInputContent: import("vue").Ref<number>;
|
|
242
233
|
update: (value: string | [string, string]) => void;
|
|
243
234
|
validator: (value: string) => boolean;
|
|
244
235
|
calculate: (type: string) => void;
|
|
245
|
-
unSelect: () => void;
|
|
246
|
-
onSelect: () => void;
|
|
247
236
|
NInput: any;
|
|
248
237
|
NIcon: any;
|
|
249
238
|
NSpace: any;
|
|
250
239
|
CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
251
240
|
CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
252
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status"
|
|
241
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
253
242
|
modelValue: {
|
|
254
243
|
type: StringConstructor;
|
|
255
244
|
default: string;
|
|
@@ -262,19 +251,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
262
251
|
type: PropType<import("naive-ui/es/form/src/interface").FormValidationStatus>;
|
|
263
252
|
default: string;
|
|
264
253
|
};
|
|
265
|
-
select: {
|
|
266
|
-
type: BooleanConstructor;
|
|
267
|
-
default: boolean;
|
|
268
|
-
};
|
|
269
254
|
}>> & {
|
|
270
255
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
271
256
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
272
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
273
257
|
}, {
|
|
274
258
|
modelValue: string;
|
|
275
259
|
status: import("naive-ui/es/form/src/interface").FormValidationStatus;
|
|
276
260
|
integer: boolean;
|
|
277
|
-
select: boolean;
|
|
278
261
|
}>;
|
|
279
262
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
280
263
|
defaultValue: {
|
|
@@ -13,10 +13,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
13
13
|
type: PropType<FormValidationStatus>;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
-
select: {
|
|
17
|
-
type: BooleanConstructor;
|
|
18
|
-
default: boolean;
|
|
19
|
-
};
|
|
20
16
|
}, {
|
|
21
17
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
22
18
|
modelValue: {
|
|
@@ -31,29 +27,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
31
27
|
type: PropType<FormValidationStatus>;
|
|
32
28
|
default: string;
|
|
33
29
|
};
|
|
34
|
-
select: {
|
|
35
|
-
type: BooleanConstructor;
|
|
36
|
-
default: boolean;
|
|
37
|
-
};
|
|
38
30
|
}>> & {
|
|
39
31
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
40
32
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
41
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
42
33
|
}>>;
|
|
43
|
-
emit: (event: "update:modelValue" | "update:status"
|
|
34
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
44
35
|
inputRef: any;
|
|
45
36
|
toSelectInputContent: Ref<number>;
|
|
46
37
|
update: (value: string | [string, string]) => void;
|
|
47
38
|
validator: (value: string) => boolean;
|
|
48
39
|
calculate: (type: string) => void;
|
|
49
|
-
unSelect: () => void;
|
|
50
|
-
onSelect: () => void;
|
|
51
40
|
NInput: any;
|
|
52
41
|
NIcon: any;
|
|
53
42
|
NSpace: any;
|
|
54
43
|
CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
55
44
|
CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
56
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status"
|
|
45
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
57
46
|
modelValue: {
|
|
58
47
|
type: StringConstructor;
|
|
59
48
|
default: string;
|
|
@@ -66,18 +55,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
66
55
|
type: PropType<FormValidationStatus>;
|
|
67
56
|
default: string;
|
|
68
57
|
};
|
|
69
|
-
select: {
|
|
70
|
-
type: BooleanConstructor;
|
|
71
|
-
default: boolean;
|
|
72
|
-
};
|
|
73
58
|
}>> & {
|
|
74
59
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
75
60
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
76
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
77
61
|
}, {
|
|
78
62
|
modelValue: string;
|
|
79
63
|
status: FormValidationStatus;
|
|
80
64
|
integer: boolean;
|
|
81
|
-
select: boolean;
|
|
82
65
|
}>;
|
|
83
66
|
export default _default;
|
|
@@ -9,11 +9,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
9
9
|
props: {
|
|
10
10
|
modelValue: { type: String, default: "" },
|
|
11
11
|
integer: { type: Boolean, default: false },
|
|
12
|
-
status: { type: String, default: "success" }
|
|
13
|
-
select: { type: Boolean, default: false }
|
|
12
|
+
status: { type: String, default: "success" }
|
|
14
13
|
},
|
|
15
|
-
emits: ["update:modelValue", "update:status"
|
|
16
|
-
setup(__props, { emit }) {
|
|
14
|
+
emits: ["update:modelValue", "update:status"],
|
|
15
|
+
setup(__props, { expose, emit }) {
|
|
17
16
|
const props = __props;
|
|
18
17
|
const inputRef = ref(null);
|
|
19
18
|
const toSelectInputContent = inject("toSelectInputContent");
|
|
@@ -36,14 +35,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
36
35
|
emit("update:modelValue", newValue.toString());
|
|
37
36
|
emit("update:status", "success");
|
|
38
37
|
}
|
|
39
|
-
function unSelect() {
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
emit("update:select", false);
|
|
42
|
-
}, 1e3);
|
|
43
|
-
}
|
|
44
|
-
function onSelect() {
|
|
45
|
-
emit("update:select", true);
|
|
46
|
-
}
|
|
47
38
|
watch(
|
|
48
39
|
() => toSelectInputContent.value,
|
|
49
40
|
(value) => {
|
|
@@ -51,6 +42,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
42
|
!props.integer && ((_b = (_a = inputRef.value) == null ? void 0 : _a.select) == null ? void 0 : _b.call(_a));
|
|
52
43
|
}
|
|
53
44
|
);
|
|
45
|
+
expose({
|
|
46
|
+
$childrenRefs: inputRef
|
|
47
|
+
});
|
|
54
48
|
return (_ctx, _cache) => {
|
|
55
49
|
return openBlock(), createBlock(unref(NInput), {
|
|
56
50
|
ref_key: "inputRef",
|
|
@@ -60,9 +54,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
60
54
|
"allow-input": validator,
|
|
61
55
|
placeholder: "",
|
|
62
56
|
status: __props.status,
|
|
63
|
-
clearable: !__props.integer
|
|
64
|
-
onBlur: unSelect,
|
|
65
|
-
onSelect
|
|
57
|
+
clearable: !__props.integer
|
|
66
58
|
}, {
|
|
67
59
|
suffix: withCtx(() => [
|
|
68
60
|
createVNode(unref(NSpace), {
|
|
@@ -79,11 +79,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
79
79
|
inputValueStatus: Ref<FormValidationStatus>;
|
|
80
80
|
numeratorValueStatus: Ref<FormValidationStatus>;
|
|
81
81
|
denominatorValueStatus: Ref<FormValidationStatus>;
|
|
82
|
-
inputSelect: Ref<boolean>;
|
|
83
82
|
keyboardRef: Ref<HTMLElement | null>;
|
|
83
|
+
inputRef: any;
|
|
84
84
|
style: import("vue").ComputedRef<string> | undefined;
|
|
85
85
|
init: () => import("vue").ComputedRef<string> | undefined;
|
|
86
|
-
keydown: (key: string | number) => void
|
|
86
|
+
keydown: (key: string | number) => Promise<void>;
|
|
87
87
|
validator: () => boolean;
|
|
88
88
|
doDelete: () => void;
|
|
89
89
|
updateFraction: (value: number) => void;
|
|
@@ -106,10 +106,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
106
106
|
type: PropType<FormValidationStatus>;
|
|
107
107
|
default: string;
|
|
108
108
|
};
|
|
109
|
-
select: {
|
|
110
|
-
type: BooleanConstructor;
|
|
111
|
-
default: boolean;
|
|
112
|
-
};
|
|
113
109
|
}, {
|
|
114
110
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
|
115
111
|
modelValue: {
|
|
@@ -124,29 +120,22 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
124
120
|
type: PropType<FormValidationStatus>;
|
|
125
121
|
default: string;
|
|
126
122
|
};
|
|
127
|
-
select: {
|
|
128
|
-
type: BooleanConstructor;
|
|
129
|
-
default: boolean;
|
|
130
|
-
};
|
|
131
123
|
}>> & {
|
|
132
124
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
133
125
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
134
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
135
126
|
}>>;
|
|
136
|
-
emit: (event: "update:modelValue" | "update:status"
|
|
127
|
+
emit: (event: "update:modelValue" | "update:status", ...args: any[]) => void;
|
|
137
128
|
inputRef: any;
|
|
138
129
|
toSelectInputContent: Ref<number>;
|
|
139
130
|
update: (value: string | [string, string]) => void;
|
|
140
131
|
validator: (value: string) => boolean;
|
|
141
132
|
calculate: (type: string) => void;
|
|
142
|
-
unSelect: () => void;
|
|
143
|
-
onSelect: () => void;
|
|
144
133
|
NInput: any;
|
|
145
134
|
NIcon: any;
|
|
146
135
|
NSpace: any;
|
|
147
136
|
CaretDown: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
148
137
|
CaretUp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
149
|
-
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status"
|
|
138
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "update:status")[], "update:modelValue" | "update:status", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
150
139
|
modelValue: {
|
|
151
140
|
type: StringConstructor;
|
|
152
141
|
default: string;
|
|
@@ -159,19 +148,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
159
148
|
type: PropType<FormValidationStatus>;
|
|
160
149
|
default: string;
|
|
161
150
|
};
|
|
162
|
-
select: {
|
|
163
|
-
type: BooleanConstructor;
|
|
164
|
-
default: boolean;
|
|
165
|
-
};
|
|
166
151
|
}>> & {
|
|
167
152
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
168
153
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
169
|
-
"onUpdate:select"?: ((...args: any[]) => any) | undefined;
|
|
170
154
|
}, {
|
|
171
155
|
modelValue: string;
|
|
172
156
|
status: FormValidationStatus;
|
|
173
157
|
integer: boolean;
|
|
174
|
-
select: boolean;
|
|
175
158
|
}>;
|
|
176
159
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "change"[], "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
177
160
|
defaultValue: {
|