dld-vue-ui 1.1.0 → 1.2.1
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 +72 -0
- package/dist/components/CommonViews.vue.d.ts +18 -0
- package/dist/components/FrameUi.vue.d.ts +24 -0
- package/dist/components/Navigation.vue.d.ts +7 -0
- package/dist/dld-vue-ui.js +1203 -1009
- package/dist/dld-vue-ui.umd.cjs +1 -1
- package/dist/main.d.ts +0 -0
- package/dist/packages/Dialog/index.d.ts +51 -0
- package/dist/packages/Dialog/index.vue.d.ts +57 -0
- package/dist/packages/Layout/index.vue.d.ts +16 -39
- package/dist/packages/SplitPanes/index.d.ts +2 -2
- package/dist/packages/SplitPanes/index.vue.d.ts +27 -34
- package/dist/packages/SplitPanes/pane.vue.d.ts +23 -21
- package/dist/packages/TableForm/index.d.ts +1 -1
- package/dist/packages/TableForm/index.vue.d.ts +146 -496
- package/dist/packages/UpLoadFile/index.vue.d.ts +22 -70
- package/dist/packages/UpLoadFiles/index.vue.d.ts +19 -55
- package/dist/packages/index.d.ts +9 -6
- package/dist/router/index.d.ts +2 -0
- package/dist/router/router.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/utils/LinkCode.d.ts +14 -0
- package/dist/views/SplitPanes/index.vue.d.ts +2 -0
- package/dist/views/UploadFile/index.vue.d.ts +2 -0
- package/dist/views/index.vue.d.ts +2 -0
- package/package.json +21 -13
- package/dist/vite-env.d.ts +0 -13
package/README.md
CHANGED
|
@@ -332,3 +332,75 @@ export interface IOptions {
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
```
|
|
335
|
+
|
|
336
|
+
## 带表单弹出框
|
|
337
|
+
|
|
338
|
+
### 属性
|
|
339
|
+
|属性名|说明|类型|默认值|
|
|
340
|
+
|-----|----|-----|----|
|
|
341
|
+
|`v-model:form`|表单值|`FormType`|`{}`|
|
|
342
|
+
|`title`|弹框标题|`string`|`弹出框`|
|
|
343
|
+
|`width`|弹框大小|`string`|`500px`|
|
|
344
|
+
|`fullscreen`|全屏模式|`boolean`|`false`|
|
|
345
|
+
|`draggable`|可拖动|`boolean`|`true`|
|
|
346
|
+
|`footer`|底部按钮|`boolean`|`true`|
|
|
347
|
+
|`buttonSize`|底部按钮大小|`'large' \| 'default' \| 'small'`|`'default'`|
|
|
348
|
+
|`loading`|按钮的提交状态|`boolean`|`false`|
|
|
349
|
+
|`rules`|表单验证|`any`|`{}`|
|
|
350
|
+
|`formSize`|表单大小|`'large' \| 'default' \| 'small'`|`'default'`|
|
|
351
|
+
|`lableWidth`|标签长度|`string`|`120px`|
|
|
352
|
+
|
|
353
|
+
#### FormType定义
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
|
|
357
|
+
export interface FormType {
|
|
358
|
+
[key: string]: FormItemType;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
#### 表单FormItemType配置
|
|
364
|
+
|
|
365
|
+
|属性名|说明|类型|默认值|
|
|
366
|
+
|-----|----|-----|----|
|
|
367
|
+
|`label`|标签名|`string`||
|
|
368
|
+
|`type`|表单项类型text=文本框、select=单选/多选框、number=数字框、date=日期框、time=时间框、datetime=日期时间框、daterange=日期范围选择框、timerange=时间范围选择框,datetimerange=日期时间范围选择框、switch=开关按钮|`'text'\| 'select'\| 'number'\| 'date'\| 'datetime'\| 'time'\| 'daterange'\| 'timerange'\| 'datetimerange'\| 'switch'`|`text`|
|
|
369
|
+
|`width`|标签宽度|`string`|`90%`|
|
|
370
|
+
|`disabled`|是否禁用|`boolean`|`false`|
|
|
371
|
+
|`readonly`|只读 select和switch无效|`boolean`|`false`|
|
|
372
|
+
|`placeholder`|输入框提示 日期范围使用&&分割|`string`|`请输入${label} \| 请选择${label} `|
|
|
373
|
+
|`max`|最大数值 type=number生效|`number`|Infinity|
|
|
374
|
+
|`min`|最小数值 type=number生效|`number`|-Infinity|
|
|
375
|
+
|`step`|步序 type=number生效|`number`|1|
|
|
376
|
+
|`multiple`|是否支持多选 type=select生效|`boolean`|`false`|
|
|
377
|
+
|`omit`|多选时省略 type=select生效|`boolean`|`false`|
|
|
378
|
+
|`options`|搜索框的下拉列表,type='select'有效, 参考表格配置|`IOptions[]`|`[]`|
|
|
379
|
+
|`closeText`|开关关闭文字 type=switch生效|`string`|`null`|
|
|
380
|
+
|`openText`|开关打开文字 type=switch生效|`string`|`null`|
|
|
381
|
+
|
|
382
|
+
### 方法
|
|
383
|
+
|
|
384
|
+
|方法名|说明|参数|
|
|
385
|
+
|-----|----|-----|
|
|
386
|
+
|`close`|弹窗关闭回调|`(e: 'close'): void`|
|
|
387
|
+
|`submit`|提交按钮回调|`(e: 'submit'): void`|
|
|
388
|
+
|
|
389
|
+
### 自定义为空校验
|
|
390
|
+
|
|
391
|
+
```ts
|
|
392
|
+
/**
|
|
393
|
+
*
|
|
394
|
+
* @param rule 自定义为空检验
|
|
395
|
+
* @param value
|
|
396
|
+
* @param callback
|
|
397
|
+
* @returns
|
|
398
|
+
*/
|
|
399
|
+
export function FormValidate(rule: any, value: FormItemType, callback: any) {
|
|
400
|
+
if (value.default == null || value.default.toString() == "") {
|
|
401
|
+
return callback(new Error(value.label + "不能为空"));
|
|
402
|
+
}
|
|
403
|
+
return callback();
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
main?(_: {}): any;
|
|
5
|
+
aside?(_: {}): any;
|
|
6
|
+
};
|
|
7
|
+
refs: {};
|
|
8
|
+
rootEl: HTMLDivElement;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
12
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Guid } from 'guid-typescript';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
id: Guid;
|
|
4
|
+
title: string;
|
|
5
|
+
code: string;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
explain?(_: {}): any;
|
|
11
|
+
ui?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: HTMLDivElement;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Guid } from 'guid-typescript';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
id: Guid;
|
|
4
|
+
title: string;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLAnchorElement>;
|
|
7
|
+
export default _default;
|