twcpt 0.0.21 → 0.0.23

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,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
+ };
@@ -1,5 +1,5 @@
1
1
  import { DefineComponent, ExtractPropTypes, Ref, ComponentInternalInstance, StyleValue, VNodeProps, AllowedComponentProps, ComponentCustomProps, Attrs, Slot, ComponentPublicInstance, ComponentOptionsBase, ShallowRef, ComputedRef, ComponentOptionsMixin, CSSProperties, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, PublicProps, CreateComponentPublicInstanceWithMixins } from 'vue';
2
- import { ComponentSize, InputModelModifiers, InputType, InputAutoSize, InputProps } from 'element-plus';
2
+ import { ComponentSize, InputModelModifiers, InputType, InputAutoSize, InputProps, IconProps } from 'element-plus';
3
3
  import { IconPropType, SFCWithInstall } from 'element-plus/es/utils/index.mjs';
4
4
  import { OnCleanup } from '@vue/reactivity';
5
5
  declare const _default: DefineComponent<ExtractPropTypes<{
@@ -7,6 +7,14 @@ declare const _default: DefineComponent<ExtractPropTypes<{
7
7
  type: BooleanConstructor;
8
8
  default: boolean;
9
9
  };
10
+ wordLimitVisible: {
11
+ type: BooleanConstructor;
12
+ default: boolean;
13
+ };
14
+ clearable: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
10
18
  }>, {
11
19
  elInputRef: Ref<({
12
20
  $: ComponentInternalInstance;
@@ -373,12 +381,29 @@ declare const _default: DefineComponent<ExtractPropTypes<{
373
381
  append?: (props: {}) => any;
374
382
  };
375
383
  }) | null>;
384
+ isTextarea: ComputedRef<boolean>;
385
+ maxlength: ComputedRef<number | undefined>;
386
+ currentLength: ComputedRef<number>;
387
+ attrsWithoutWordLimit: ComputedRef<{
388
+ [x: string]: any;
389
+ }>;
390
+ handleTextareaClear: () => void;
376
391
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
377
392
  bgGrey: {
378
393
  type: BooleanConstructor;
379
394
  default: boolean;
380
395
  };
396
+ wordLimitVisible: {
397
+ type: BooleanConstructor;
398
+ default: boolean;
399
+ };
400
+ clearable: {
401
+ type: BooleanConstructor;
402
+ default: boolean;
403
+ };
381
404
  }>> & Readonly<{}>, {
405
+ clearable: boolean;
406
+ wordLimitVisible: boolean;
382
407
  bgGrey: boolean;
383
408
  }, {}, {
384
409
  ElInput: SFCWithInstall<{
@@ -545,5 +570,29 @@ declare const _default: DefineComponent<ExtractPropTypes<{
545
570
  append?: (props: {}) => any;
546
571
  };
547
572
  })>;
573
+ ElIcon: SFCWithInstall<{
574
+ new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< IconProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
575
+ size: number | string;
576
+ }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
577
+ P: {};
578
+ B: {};
579
+ D: {};
580
+ C: {};
581
+ M: {};
582
+ Defaults: {};
583
+ }, Readonly< IconProps> & Readonly<{}>, {}, {}, {}, {}, {
584
+ size: number | string;
585
+ }>;
586
+ __isFragment?: never;
587
+ __isTeleport?: never;
588
+ __isSuspense?: never;
589
+ } & ComponentOptionsBase<Readonly< IconProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
590
+ size: number | string;
591
+ }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
592
+ $slots: {
593
+ default?: (props: {}) => any;
594
+ };
595
+ })>;
596
+ CircleClose: DefineComponent<{}, void, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
548
597
  }, {}, string, ComponentProvideOptions, true, {}, any>;
549
598
  export default _default;
@@ -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;
package/dist/global.d.ts CHANGED
@@ -3,6 +3,7 @@ import { JTWBtnTemplateProps, JTWBtnSlots, JTWBtnEmits } from './components/j-tw
3
3
  import { JTWCheckboxTemplateProps, JTWCheckboxSlots, JTWCheckboxEmits } from './components/j-tw-checkbox/types';
4
4
  import { JTWCheckboxGroupTemplateProps, JTWCheckboxGroupSlots, JTWCheckboxGroupEmits } from './components/j-tw-checkbox-group/types';
5
5
  import { JTWConfirmDialogTemplateProps, JTWConfirmDialogEmits } from './components/j-tw-confirm-dialog/types';
6
+ import { JTWCopyTextProps, JTWCopyTextEmits } from './components/j-tw-copy-text/types';
6
7
  import { JTWDatePickerTemplateProps, JTWDatePickerSlots, JTWDatePickerEmits } from './components/j-tw-date-picker/types';
7
8
  import { JTWDateTimePickerTemplateProps, JTWDateTimePickerSlots, JTWDateTimePickerEmits } from './components/j-tw-datetime-picker/types';
8
9
  import { JTWDialogProps } from './components/j-tw-dialog/types';
@@ -13,6 +14,7 @@ import { JTWFormItemProps, JTWFormItemSlots } from './components/j-tw-form-item/
13
14
  import { JTWInputTemplateProps, JTWInputSlots, JTWInputEmits } from './components/j-tw-input/types';
14
15
  import { JTWMultiSelectBtnTemplateProps, JTWMultiSelectBtnSlots, JTWMultiSelectBtnEmits } from './components/j-tw-multi-select-btn/types';
15
16
  import { JTWPaginationTemplateProps, JTWPaginationEmits } from './components/j-tw-pagination/types';
17
+ import { JTWPermissionTemplateProps, JTWPermissionSlots } from './components/j-tw-permission/types';
16
18
  import { JTWRadioTemplateProps, JTWRadioSlots, JTWRadioEmits } from './components/j-tw-radio/types';
17
19
  import { JTWRadioGroupTemplateProps, JTWRadioGroupSlots, JTWRadioGroupEmits } from './components/j-tw-radio-group/types';
18
20
  import { JTWSearchBoxProps, JTWSearchBoxSlots, JTWSearchBoxEmits } from './components/j-tw-search-box/types';
@@ -71,6 +73,15 @@ declare module 'vue' {
71
73
  $emit: JTWConfirmDialogEmits;
72
74
  };
73
75
 
76
+ /**
77
+ * JTWCopyText - JTWCopyText 组件
78
+ */
79
+ JTWCopyText: new () => {
80
+ $props: JTWCopyTextProps;
81
+ $slots: {};
82
+ $emit: JTWCopyTextEmits;
83
+ };
84
+
74
85
  /**
75
86
  * JTWDatePicker - JTWDatePicker 日期范围选择器组件
76
87
  */
@@ -161,6 +172,15 @@ declare module 'vue' {
161
172
  $emit: JTWPaginationEmits;
162
173
  };
163
174
 
175
+ /**
176
+ * JTWPermission - JTWPermission 权限控制组件
177
+ */
178
+ JTWPermission: new () => {
179
+ $props: JTWPermissionTemplateProps;
180
+ $slots: JTWPermissionSlots;
181
+ $emit: {};
182
+ };
183
+
164
184
  /**
165
185
  * JTWRadio - JTWRadio 组件
166
186
  */