twcpt 0.0.20 → 0.0.22

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.
@@ -21,7 +21,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
21
21
  default: boolean;
22
22
  };
23
23
  icon: {
24
- type: PropType<JTWConfirmDialogIconType>;
24
+ type: PropType<JTWConfirmDialogIconType | string>;
25
25
  default: "warn";
26
26
  };
27
27
  confirmText: {
@@ -32,6 +32,18 @@ declare const _default: DefineComponent<ExtractPropTypes<{
32
32
  type: StringConstructor;
33
33
  default: string;
34
34
  };
35
+ showCancel: {
36
+ type: BooleanConstructor;
37
+ default: boolean;
38
+ };
39
+ showIcon: {
40
+ type: BooleanConstructor;
41
+ default: boolean;
42
+ };
43
+ showConfirm: {
44
+ type: BooleanConstructor;
45
+ default: boolean;
46
+ };
35
47
  }>, {
36
48
  iconSvg: ComputedRef<string>;
37
49
  handleConfirm: () => void;
@@ -54,7 +66,7 @@ declare const _default: DefineComponent<ExtractPropTypes<{
54
66
  default: boolean;
55
67
  };
56
68
  icon: {
57
- type: PropType<JTWConfirmDialogIconType>;
69
+ type: PropType<JTWConfirmDialogIconType | string>;
58
70
  default: "warn";
59
71
  };
60
72
  confirmText: {
@@ -65,15 +77,30 @@ declare const _default: DefineComponent<ExtractPropTypes<{
65
77
  type: StringConstructor;
66
78
  default: string;
67
79
  };
80
+ showCancel: {
81
+ type: BooleanConstructor;
82
+ default: boolean;
83
+ };
84
+ showIcon: {
85
+ type: BooleanConstructor;
86
+ default: boolean;
87
+ };
88
+ showConfirm: {
89
+ type: BooleanConstructor;
90
+ default: boolean;
91
+ };
68
92
  }>> & Readonly<{
69
93
  onCancel?: (() => any) | undefined;
70
94
  onConfirm?: (() => any) | undefined;
71
95
  }>, {
72
- icon: JTWConfirmDialogIconType;
96
+ icon: string;
73
97
  visible: boolean;
74
98
  html: boolean;
99
+ showConfirm: boolean;
75
100
  confirmText: string;
76
101
  cancelText: string;
102
+ showCancel: boolean;
103
+ showIcon: boolean;
77
104
  }, {}, {
78
105
  JTWBtn: DefineComponent<ExtractPropTypes<{
79
106
  size: {
@@ -22,10 +22,10 @@ export interface JTWConfirmDialogOptions {
22
22
  */
23
23
  html?: boolean;
24
24
  /**
25
- * 图标类型
25
+ * 图标,支持内置类型或自定义 Vue 组件
26
26
  * @default 'warn'
27
27
  */
28
- icon?: JTWConfirmDialogIconType;
28
+ icon?: JTWConfirmDialogIconType | string;
29
29
  /**
30
30
  * 确认按钮文字
31
31
  * @default '确定'
@@ -36,6 +36,21 @@ export interface JTWConfirmDialogOptions {
36
36
  * @default '取消'
37
37
  */
38
38
  cancelText?: string;
39
+ /**
40
+ * 是否显示取消按钮
41
+ * @default true
42
+ */
43
+ showCancel?: boolean;
44
+ /**
45
+ * 是否显示图标
46
+ * @default true
47
+ */
48
+ showIcon?: boolean;
49
+ /**
50
+ * 是否显示确认按钮
51
+ * @default true
52
+ */
53
+ showConfirm?: boolean;
39
54
  }
40
55
  /**
41
56
  * @description JTWConfirmDialog 组件 Props
@@ -56,10 +71,10 @@ export interface JTWConfirmDialogProps {
56
71
  */
57
72
  html?: boolean;
58
73
  /**
59
- * 图标类型
74
+ * 图标,支持内置类型或自定义 Vue 组件
60
75
  * @default 'warn'
61
76
  */
62
- icon?: JTWConfirmDialogIconType;
77
+ icon?: JTWConfirmDialogIconType | string;
63
78
  /**
64
79
  * 确认按钮文字
65
80
  * @default '确定'
@@ -70,6 +85,21 @@ export interface JTWConfirmDialogProps {
70
85
  * @default '取消'
71
86
  */
72
87
  cancelText?: string;
88
+ /**
89
+ * 是否显示取消按钮
90
+ * @default true
91
+ */
92
+ showCancel?: boolean;
93
+ /**
94
+ * 是否显示图标
95
+ * @default true
96
+ */
97
+ showIcon?: boolean;
98
+ /**
99
+ * 是否显示确认按钮
100
+ * @default true
101
+ */
102
+ showConfirm?: boolean;
73
103
  }
74
104
  /** JTWConfirmDialog Emits 接口 */
75
105
  export interface JTWConfirmDialogEmits {
@@ -0,0 +1,3 @@
1
+ import { default as JTWCopyText } from './index';
2
+ export default JTWCopyText;
3
+ export { JTWCopyText };
@@ -0,0 +1,16 @@
1
+ import { Component, ComponentPublicInstance } from 'vue';
2
+ export interface JTWCopyTextProps {
3
+ text: string | number | object;
4
+ size?: string;
5
+ revertDelay?: number;
6
+ }
7
+ export interface JTWCopyTextEmits {
8
+ success: () => void;
9
+ error: (err: unknown) => void;
10
+ }
11
+ export type JTWCopyTextComponent = Component<JTWCopyTextProps, JTWCopyTextEmits>;
12
+ export type JTWCopyTextInstance = ComponentPublicInstance<JTWCopyTextProps, object>;
13
+ export type JTWCopyTextTemplateProps = Partial<JTWCopyTextProps> & {
14
+ onSuccess?: () => void;
15
+ onError?: (err: unknown) => void;
16
+ };
@@ -7,6 +7,10 @@ declare const _default: DefineComponent<ExtractPropTypes<{
7
7
  type: BooleanConstructor;
8
8
  default: boolean;
9
9
  };
10
+ wordLimitVisible: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
10
14
  }>, {
11
15
  elInputRef: Ref<({
12
16
  $: ComponentInternalInstance;
@@ -373,12 +377,23 @@ declare const _default: DefineComponent<ExtractPropTypes<{
373
377
  append?: (props: {}) => any;
374
378
  };
375
379
  }) | null>;
380
+ isTextarea: ComputedRef<boolean>;
381
+ maxlength: ComputedRef<number | undefined>;
382
+ currentLength: ComputedRef<number>;
383
+ attrsWithoutWordLimit: ComputedRef<{
384
+ [x: string]: any;
385
+ }>;
376
386
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
377
387
  bgGrey: {
378
388
  type: BooleanConstructor;
379
389
  default: boolean;
380
390
  };
391
+ wordLimitVisible: {
392
+ type: BooleanConstructor;
393
+ default: boolean;
394
+ };
381
395
  }>> & Readonly<{}>, {
396
+ wordLimitVisible: boolean;
382
397
  bgGrey: boolean;
383
398
  }, {}, {
384
399
  ElInput: SFCWithInstall<{
@@ -9,7 +9,7 @@ export interface JTWInputProps {
9
9
  readonly?: boolean;
10
10
  maxlength?: number;
11
11
  minlength?: number;
12
- showWordLimit?: boolean;
12
+ wordLimitVisible?: boolean;
13
13
  prefixIcon?: string;
14
14
  suffixIcon?: string;
15
15
  rows?: number;
@@ -0,0 +1,2 @@
1
+ export { default } from './index';
2
+ export type { JTWPermissionProps, JTWPermissionSlots, JTWPermissionComponent, JTWPermissionInstance, JTWPermissionTemplateProps, } from './types';
@@ -0,0 +1,45 @@
1
+ import { DefineComponent } from 'vue';
2
+ /**
3
+ * @description JTWPermission 权限控制组件
4
+ */
5
+ export interface JTWPermissionProps {
6
+ /**
7
+ * 权限码。传入 falsy 值(null / undefined / '')时视为无需鉴权,直接渲染内容
8
+ * @default null
9
+ */
10
+ code?: string | null;
11
+ /**
12
+ * 无权限时显示的占位内容
13
+ * @default '-'
14
+ */
15
+ defaultContent?: string;
16
+ /**
17
+ * 无权限时是否彻底不渲染 DOM(不显示占位内容)
18
+ * @default false
19
+ */
20
+ hiddenOnDenied?: boolean;
21
+ /**
22
+ * 页面权限码列表(优先级高于全局注入的 PAGE_PERMISSION_KEY)
23
+ */
24
+ pagePermissions?: string[];
25
+ /**
26
+ * 操作权限码列表(优先级高于全局注入的 PAGE_ACTION_PERMISSION_KEY)
27
+ */
28
+ actionPermissions?: string[];
29
+ }
30
+ /** JTWPermission Slots 接口 */
31
+ export interface JTWPermissionSlots {
32
+ /** 有权限时渲染的内容 */
33
+ default?: () => any;
34
+ /** 无权限时渲染的内容 */
35
+ 'no-permission'?: () => any;
36
+ }
37
+ /** JTWPermission 组件类型定义 */
38
+ export type JTWPermissionComponent = DefineComponent<JTWPermissionProps>;
39
+ /** JTWPermission 实例类型 */
40
+ export type JTWPermissionInstance = InstanceType<JTWPermissionComponent>;
41
+ /** JTWPermission 模板 Props(用于全局类型声明) */
42
+ export interface JTWPermissionTemplateProps extends JTWPermissionProps {
43
+ class?: string | Record<string, boolean> | Array<string | Record<string, boolean>>;
44
+ style?: string | Record<string, string>;
45
+ }
@@ -9,6 +9,7 @@ export interface JTWSearchBoxProps {
9
9
  export interface JTWSearchBoxEmits {
10
10
  'update:modelValue': (value: string) => void;
11
11
  search: (value: string) => void;
12
+ clear: () => void;
12
13
  }
13
14
  export interface JTWSearchBoxSlots {
14
15
  before?: () => any;