joy-admin-components 0.2.123 → 0.2.125

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.
@@ -1,46 +1,32 @@
1
- import { DefineComponent } from 'vue';
2
- import { SelectProps } from 'element-plus';
3
- /**
4
- * 字典选择器组件 - 基于 Element Plus Select 封装
5
- * 支持 API 请求数据、全选、多语言等功能
6
- */
7
- export interface CmpDictionaryProps extends Partial<SelectProps> {
8
- /** 获取下拉数据的 API 函数 */
9
- api?: () => Promise<{ data: any[] }>;
10
- /** 是否显示全选复选框(仅多选模式),默认 true */
11
- showCheckAll?: boolean;
12
- /** 选项点击回调函数 */
13
- optionClick?: (item: any) => void;
14
- /** 多选模式下的最大选择数量 */
15
- maxLimit?: number;
16
- /** 多选模式下的最小选择数量 */
17
- minLimit?: number;
18
- /** 静态数据源(如果提供则不使用 api) */
19
- data?: any[];
20
- /** 字段映射配置 */
21
- labelValue?: {
22
- label?: string;
23
- labelEn?: string;
24
- value?: string;
25
- };
26
- /** 是否使用本地 i18n 翻译 label,默认 false */
27
- changeLocal?: boolean;
28
- /** v-model 绑定值 */
29
- modelValue?: any;
30
- }
31
-
32
- export interface CmpDictionaryEmits {
33
- /** API 请求成功后触发 */
34
- (e: 'success', data: any[]): void;
35
- /** 选择值变化时触发 */
36
- (e: 'change', value: any): void;
37
- /** v-model 更新事件 */
38
- (e: 'update:modelValue', value: any): void;
39
- }
40
-
41
- declare const CmpDictionary: DefineComponent<CmpDictionaryProps>;
42
- export default CmpDictionary;
43
- Partial<{}>;
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
3
+ export default _default;
4
+ type __VLS_WithTemplateSlots<T, S> = T & (new () => {
5
+ $slots: S;
6
+ });
7
+ declare const __VLS_component: DefineComponent<{}, {
8
+ $emit: (event: "change" | "success" | "changeAll", ...args: any[]) => void;
9
+ showCheckAll: boolean;
10
+ optionClick: Function;
11
+ labelValue: Record<string, any>;
12
+ changeLocal: boolean;
13
+ data?: unknown[] | undefined;
14
+ api?: Function | undefined;
15
+ maxLimit?: number | undefined;
16
+ minLimit?: number | undefined;
17
+ $props: {
18
+ readonly showCheckAll?: boolean | undefined;
19
+ readonly optionClick?: Function | undefined;
20
+ readonly labelValue?: Record<string, any> | undefined;
21
+ readonly changeLocal?: boolean | undefined;
22
+ readonly data?: unknown[] | undefined;
23
+ readonly api?: Function | undefined;
24
+ readonly maxLimit?: number | undefined;
25
+ readonly minLimit?: number | undefined;
26
+ };
27
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
28
+ type __VLS_TemplateResult = {
29
+ attrs: Partial<{}>;
44
30
  slots: {
45
31
  header?(_: {}): any;
46
32
  header?(_: {}): any;
@@ -21,3 +21,4 @@ export interface CmpIconProps {
21
21
 
22
22
  declare const CmpIcon: DefineComponent<CmpIconProps>;
23
23
  export default CmpIcon;
24
+ default _default;
@@ -1,24 +1,28 @@
1
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
3
- export default _default;
4
- type __VLS_WithTemplateSlots<T, S> = T & (new () => {
5
- $slots: S;
6
- });
7
- declare const __VLS_component: DefineComponent<{}, {
8
- fontColor?: string | undefined;
9
- $props: {
10
- readonly fontColor?: string | undefined;
11
- };
12
- }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
13
- type __VLS_TemplateResult = {
14
- attrs: Partial<{}>;
15
- slots: {
16
- default?(_: {}): any;
17
- };
18
- refs: {};
19
- rootEl: any;
20
- };
21
- : string;
1
+ import { DefineComponent } from 'vue';
2
+ /**
3
+ * CmpTag 组件 - 自定义颜色标签
4
+ * 基于 Element Plus Tag 封装,支持通过 fontColor 属性自定义标签颜色
5
+ *
6
+ * @example
7
+ * ```vue
8
+ * <!-- 自定义颜色 -->
9
+ * <CmpTag fontColor="#ff6600">进行中</CmpTag>
10
+ * <CmpTag fontColor="#52c41a">已完成</CmpTag>
11
+ *
12
+ * <!-- 不传 fontColor 时使用 Element Plus 默认样式 -->
13
+ * <CmpTag>默认标签</CmpTag>
14
+ *
15
+ * <!-- 支持 Element Plus Tag 的所有属性 -->
16
+ * <CmpTag fontColor="#f56c6c" closable @close="handleClose">可关闭</CmpTag>
17
+ * ```
18
+ */
19
+ export interface CmpTagProps {
20
+ /**
21
+ * 自定义标签颜色
22
+ * 传入后会自动计算背景色(5% 透明度混合)和边框色
23
+ * 不传则使用 Element Plus Tag 默认样式
24
+ */
25
+ fontColor?: string;
22
26
  }
23
27
 
24
28
  declare const CmpTag: DefineComponent<CmpTagProps>;
@@ -16,3 +16,12 @@ export interface ConfrimButtonEmits {
16
16
 
17
17
  declare const ConfrimButton: DefineComponent<ConfrimButtonProps>;
18
18
  export default ConfrimButton;
19
+
20
+ type __VLS_TemplateResult = {
21
+ attrs: Partial<{}>;
22
+ slots: {
23
+ default?(_: {}): any;
24
+ };
25
+ refs: {};
26
+ rootEl: HTMLSpanElement;
27
+ };