erp-plus 1.0.135 → 1.0.137

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.
@@ -0,0 +1,34 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ /** 语义类型 */
4
+ type?: 'success' | 'warning' | 'error';
5
+ /** 提示文案(也可以用默认插槽) */
6
+ text?: string;
7
+ /** 是否显示右侧关闭按钮 */
8
+ closable?: boolean;
9
+ };
10
+ declare function __VLS_template(): {
11
+ attrs: Partial<{}>;
12
+ slots: {
13
+ default?(_: {}): any;
14
+ };
15
+ refs: {};
16
+ rootEl: any;
17
+ };
18
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
+ declare const __VLS_component: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
20
+ close: () => any;
21
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
22
+ onClose?: (() => any) | undefined;
23
+ }>, {
24
+ type: "success" | "warning" | "error";
25
+ text: string;
26
+ closable: boolean;
27
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
+ export default _default;
30
+ type __VLS_WithTemplateSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,4 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as Alert } from './Alert.vue';
3
+ declare const _default: typeof Alert & Plugin;
4
+ export default _default;
@@ -1,4 +1,20 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
1
+ import { PropType, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ /**
3
+ * 卡片
4
+ *
5
+ * 三种类型(2026-10-23 新增后两种,尺寸按稍小档设计稿 2 倍图反推):
6
+ * - default:老样式,只有标题,右侧不预置任何东西
7
+ * - form :新增/编辑页用,标题在左,右侧操作按钮放在 #btns 插槽(取消/提交…)
8
+ * - detail :详情页用,标题前多一个返回箭头,点箭头 emit('back')
9
+ *
10
+ * 两种新类型的头部几何与老卡片完全一致(头部高度不因按钮变高):
11
+ * - 标题 14(默认档 16)/ 500(稍小档 600),与老卡片同一套档位规则
12
+ * - 头部内边距:默认档上下 16 / 左右 20,稍小档四边 12
13
+ * - 头部下分隔线 1px,颜色 #E5E5EB(与卡片边框统一)
14
+ * - 右侧按钮之间 8px(设计稿实测 8.5)
15
+ * - 返回箭头用 assets 的 20_20_arrow-left.svg,20×20,颜色 #1A1A1A,与标题 4px(2026-10-24 由 8px 改小)
16
+ */
17
+ type CardType = 'default' | 'form' | 'detail';
2
18
  declare function __VLS_template(): any;
3
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
4
20
  declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
@@ -6,6 +22,16 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
6
22
  type: StringConstructor;
7
23
  default: string;
8
24
  };
25
+ /** 卡片类型:default 普通 / form 新增编辑 / detail 详情(带返回箭头) */
26
+ type: {
27
+ type: PropType<CardType>;
28
+ default: string;
29
+ };
30
+ /** 详情类型是否显示返回箭头,默认显示 */
31
+ showBack: {
32
+ type: BooleanConstructor;
33
+ default: boolean;
34
+ };
9
35
  headerClass: {
10
36
  type: StringConstructor;
11
37
  };
@@ -15,11 +41,23 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
15
41
  footerClass: {
16
42
  type: StringConstructor;
17
43
  };
18
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
44
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
45
+ back: () => any;
46
+ }, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
19
47
  title: {
20
48
  type: StringConstructor;
21
49
  default: string;
22
50
  };
51
+ /** 卡片类型:default 普通 / form 新增编辑 / detail 详情(带返回箭头) */
52
+ type: {
53
+ type: PropType<CardType>;
54
+ default: string;
55
+ };
56
+ /** 详情类型是否显示返回箭头,默认显示 */
57
+ showBack: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
23
61
  headerClass: {
24
62
  type: StringConstructor;
25
63
  };
@@ -29,8 +67,12 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
29
67
  footerClass: {
30
68
  type: StringConstructor;
31
69
  };
32
- }>> & Readonly<{}>, {
70
+ }>> & Readonly<{
71
+ onBack?: (() => any) | undefined;
72
+ }>, {
73
+ type: CardType;
33
74
  title: string;
75
+ showBack: boolean;
34
76
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
35
77
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
78
  export default _default;
@@ -132,6 +132,7 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
132
132
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
133
133
  close: (...args: any[]) => void;
134
134
  submit: (...args: any[]) => void;
135
+ "update:modelValue": (...args: any[]) => void;
135
136
  open: (...args: any[]) => void;
136
137
  opened: (...args: any[]) => void;
137
138
  closed: (...args: any[]) => void;
@@ -263,6 +264,7 @@ declare const __VLS_component: DefineComponent<globalThis.ExtractPropTypes<{
263
264
  }>> & Readonly<{
264
265
  onClose?: ((...args: any[]) => any) | undefined;
265
266
  onSubmit?: ((...args: any[]) => any) | undefined;
267
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
266
268
  onOpen?: ((...args: any[]) => any) | undefined;
267
269
  onOpened?: ((...args: any[]) => any) | undefined;
268
270
  onClosed?: ((...args: any[]) => any) | undefined;
@@ -73,6 +73,7 @@ declare const _default: DefineComponent<globalThis.ExtractPropTypes<{
73
73
  };
74
74
  align: {
75
75
  type: PropType<align>;
76
+ default: string;
76
77
  };
77
78
  disabledScientific: {
78
79
  type: BooleanConstructor;
@@ -150,6 +151,7 @@ declare const _default: DefineComponent<globalThis.ExtractPropTypes<{
150
151
  };
151
152
  align: {
152
153
  type: PropType<align>;
154
+ default: string;
153
155
  };
154
156
  disabledScientific: {
155
157
  type: BooleanConstructor;
@@ -162,6 +164,7 @@ declare const _default: DefineComponent<globalThis.ExtractPropTypes<{
162
164
  readonly: boolean;
163
165
  disabled: boolean;
164
166
  modelValue: number | null | undefined;
167
+ align: align;
165
168
  min: number;
166
169
  max: number;
167
170
  step: number;
@@ -0,0 +1,30 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ /** 已添加的标签列表(v-model) */
4
+ modelValue?: string[];
5
+ /** 输入框占位文字 */
6
+ placeholder?: string;
7
+ /** 按钮文字 */
8
+ addText?: string;
9
+ /** 单个标签的最大长度(透传给原生 input) */
10
+ maxlength?: number;
11
+ };
12
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
13
+ remove: (value: string, index: number, list: string[]) => any;
14
+ change: (list: string[]) => any;
15
+ add: (value: string, list: string[]) => any;
16
+ "update:modelValue": (value: string[]) => any;
17
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onRemove?: ((value: string, index: number, list: string[]) => any) | undefined;
19
+ onChange?: ((list: string[]) => any) | undefined;
20
+ onAdd?: ((value: string, list: string[]) => any) | undefined;
21
+ "onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
22
+ }>, {
23
+ modelValue: string[];
24
+ placeholder: string;
25
+ maxlength: number;
26
+ addText: string;
27
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {
28
+ inputRef: HTMLInputElement;
29
+ }, HTMLDivElement>;
30
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import { Plugin } from 'vue';
2
+ import { default as InputTag } from './InputTag.vue';
3
+ declare const _default: typeof InputTag & Plugin;
4
+ export default _default;
@@ -0,0 +1,24 @@
1
+ import { PropType, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: DefineComponent<globalThis.ExtractPropTypes<{
3
+ type: {
4
+ type: PropType<"success" | "warning" | "error">;
5
+ default: string;
6
+ };
7
+ text: {
8
+ type: StringConstructor;
9
+ default: string;
10
+ };
11
+ }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<globalThis.ExtractPropTypes<{
12
+ type: {
13
+ type: PropType<"success" | "warning" | "error">;
14
+ default: string;
15
+ };
16
+ text: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ }>> & Readonly<{}>, {
21
+ type: "error" | "success" | "warning";
22
+ text: string;
23
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
24
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ items: Array<{
4
+ id: number;
5
+ type: 'success' | 'warning' | 'error';
6
+ text: string;
7
+ }>;
8
+ };
9
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
10
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { Plugin } from 'vue';
2
+ declare const ToastPlugin: Plugin;
3
+ export { toast, showToast, closeToast } from './toast';
4
+ export type { ToastType } from './toast';
5
+ export default ToastPlugin;
@@ -0,0 +1,26 @@
1
+ export type ToastType = 'success' | 'warning' | 'error';
2
+ /**
3
+ * 弹出一条提示
4
+ * @param text 文案
5
+ * @param type 语义类型
6
+ * @param duration 停留毫秒数,传 0 表示不自动消失
7
+ * @returns 该条的 id(可配合 close(id) 手动关)
8
+ */
9
+ export declare function showToast(text: string, type?: ToastType, duration?: number): number;
10
+ /** 手动关掉某一条(不传 id 则清空) */
11
+ export declare function closeToast(id?: number): void;
12
+ /**
13
+ * 函数式调用:
14
+ * ```ts
15
+ * toast.success('保存成功')
16
+ * toast.warning('请先选择部门', 5000)
17
+ * $toast.error('网络异常') // 装过本库后,组件里也能直接用 $toast
18
+ * ```
19
+ */
20
+ export declare const toast: ((text: string, type?: ToastType, duration?: number) => number) & {
21
+ success: (text: string, duration?: number) => number;
22
+ warning: (text: string, duration?: number) => number;
23
+ error: (text: string, duration?: number) => number;
24
+ show: typeof showToast;
25
+ close: typeof closeToast;
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "erp-plus",
3
- "version": "1.0.135",
3
+ "version": "1.0.137",
4
4
  "author": "zhangxl",
5
5
  "main": "dist/erp-plus.umd.js",
6
6
  "module": "dist/erp-plus.es.js",