erp-plus 1.0.136 → 1.0.138

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;
@@ -12,7 +12,7 @@ import { PropType, DefineComponent, ComponentOptionsMixin, PublicProps, Componen
12
12
  * - 头部内边距:默认档上下 16 / 左右 20,稍小档四边 12
13
13
  * - 头部下分隔线 1px,颜色 #E5E5EB(与卡片边框统一)
14
14
  * - 右侧按钮之间 8px(设计稿实测 8.5)
15
- * - 返回箭头用 assets 的 20_20_arrow-left.svg,20×20,颜色 #1A1A1A,与标题 8px
15
+ * - 返回箭头用 assets 的 20_20_arrow-left.svg,20×20,颜色 #1A1A1A,与标题 4px(2026-10-24 由 8px 改小)
16
16
  */
17
17
  type CardType = 'default' | 'form' | 'detail';
18
18
  declare function __VLS_template(): any;
@@ -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;
@@ -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.136",
3
+ "version": "1.0.138",
4
4
  "author": "zhangxl",
5
5
  "main": "dist/erp-plus.umd.js",
6
6
  "module": "dist/erp-plus.es.js",