@me-framework/me-ui-antdv-next 0.0.34 → 0.0.35
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.
- package/dist/index.d.ts +7 -1
- package/dist/input-json/index.css +1 -0
- package/dist/input-json/index.d.ts +4 -0
- package/dist/input-json/index.js +208 -0
- package/dist/input-json/index.vue.d.ts +50 -0
- package/dist/input-json/types.d.ts +69 -0
- package/dist/input-number/index.css +1 -0
- package/dist/input-number/index.d.ts +4 -0
- package/dist/input-number/index.js +170 -0
- package/dist/input-number/index.vue.d.ts +44 -0
- package/dist/input-number/types.d.ts +66 -0
- package/dist/input-property/index.css +1 -1
- package/dist/input-property/index.js +280 -273
- package/dist/input-property/index.vue.d.ts +2 -2
- package/dist/input-radio/index.css +1 -1
- package/dist/input-radio/index.js +70 -33
- package/dist/input-radio/index.vue.d.ts +39 -10
- package/dist/input-radio/types.d.ts +26 -4
- package/dist/me-ui-antdv-next.js +957 -457
- package/dist/me-ui-antdv-next.umd.cjs +10 -10
- package/dist/nav/index.vue.d.ts +2 -2
- package/dist/resolver/index.js +4 -1
- package/dist/style.css +1 -1
- package/dist/text/index.css +1 -0
- package/dist/text/index.d.ts +4 -0
- package/dist/text/index.js +98 -0
- package/dist/text/index.vue.d.ts +25 -0
- package/dist/text/types.d.ts +63 -0
- package/dist/tree-menu/index.vue.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.me-text{font-size:var(--me-font-size-base);color:var(--me-text-regular);margin:0;padding:0;transition:color .2s;display:inline}.me-text--primary{color:var(--me-color-primary)}.me-text--secondary{color:var(--me-text-regular)}.me-text--success{color:var(--me-color-success)}.me-text--warning{color:var(--me-color-warning)}.me-text--danger{color:var(--me-color-danger)}.me-text--info{color:var(--me-color-info)}.me-text--disabled{color:var(--me-text-disabled);cursor:not-allowed}.me-text--small{font-size:var(--me-font-size-small)}.me-text--middle{font-size:var(--me-font-size-base)}.me-text--large{font-size:var(--me-font-size-large)}.me-text--strong{font-weight:600}.me-text--italic{font-style:italic}.me-text--underline{text-decoration:underline}.me-text--delete{text-decoration:line-through}.me-text--align-left{text-align:left}.me-text--align-center{text-align:center}.me-text--align-right{text-align:right}.me-text--block{display:block}.me-text--nowrap{white-space:nowrap}.me-text--ellipsis{text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;max-width:100%;display:inline-block;overflow:hidden}.me-text--clamp{-webkit-line-clamp:var(--me-text-clamp-lines,2);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.me-text--link{cursor:pointer;color:var(--me-color-primary);text-decoration:none}.me-text--link:hover{color:var(--me-color-primary-light-3)}.me-text__copy{vertical-align:middle;cursor:pointer;color:var(--me-text-secondary);align-items:center;margin-left:4px;display:inline-flex}.me-text__copy:hover{color:var(--me-color-primary)}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, defineComponent as o, mergeProps as s, openBlock as c, ref as l, renderSlot as u, resolveDynamicComponent as d, toDisplayString as f, unref as p, withCtx as m, withModifiers as h } from "vue";
|
|
2
|
+
import { Check as g, Copy as _ } from "@lucide/vue";
|
|
3
|
+
//#endregion
|
|
4
|
+
//#region src/components/text/index.vue
|
|
5
|
+
var v = /* @__PURE__ */ o({
|
|
6
|
+
name: "MeText",
|
|
7
|
+
__name: "index",
|
|
8
|
+
props: {
|
|
9
|
+
text: {},
|
|
10
|
+
type: { default: "secondary" },
|
|
11
|
+
size: { default: "middle" },
|
|
12
|
+
tag: { default: "span" },
|
|
13
|
+
align: {},
|
|
14
|
+
strong: { type: Boolean },
|
|
15
|
+
delete: { type: Boolean },
|
|
16
|
+
underline: { type: Boolean },
|
|
17
|
+
italic: { type: Boolean },
|
|
18
|
+
disabled: { type: Boolean },
|
|
19
|
+
ellipsis: { type: Boolean },
|
|
20
|
+
clamp: { type: Boolean },
|
|
21
|
+
clampLines: { default: 2 },
|
|
22
|
+
nowrap: { type: Boolean },
|
|
23
|
+
block: { type: Boolean },
|
|
24
|
+
copyable: { type: Boolean },
|
|
25
|
+
copyText: {},
|
|
26
|
+
link: { type: Boolean },
|
|
27
|
+
href: {},
|
|
28
|
+
target: {}
|
|
29
|
+
},
|
|
30
|
+
emits: ["copy", "click"],
|
|
31
|
+
setup(o, { emit: v }) {
|
|
32
|
+
let y = o, b = v, x = l(!1), S = null, C = t(() => [
|
|
33
|
+
`me-text--${y.type}`,
|
|
34
|
+
`me-text--${y.size}`,
|
|
35
|
+
{
|
|
36
|
+
"me-text--strong": y.strong,
|
|
37
|
+
"me-text--delete": y.delete,
|
|
38
|
+
"me-text--underline": y.underline,
|
|
39
|
+
"me-text--italic": y.italic,
|
|
40
|
+
"me-text--disabled": y.disabled,
|
|
41
|
+
"me-text--ellipsis": y.ellipsis,
|
|
42
|
+
"me-text--clamp": y.clamp,
|
|
43
|
+
"me-text--nowrap": y.nowrap,
|
|
44
|
+
"me-text--block": y.block,
|
|
45
|
+
"me-text--link": y.link,
|
|
46
|
+
[`me-text--align-${y.align}`]: !!y.align
|
|
47
|
+
}
|
|
48
|
+
]), w = (e) => {
|
|
49
|
+
y.disabled || b("click", e);
|
|
50
|
+
}, T = t(() => y.copyText || y.text || ""), E = async () => {
|
|
51
|
+
let e = T.value;
|
|
52
|
+
if (e) {
|
|
53
|
+
try {
|
|
54
|
+
await navigator.clipboard.writeText(e);
|
|
55
|
+
} catch {
|
|
56
|
+
try {
|
|
57
|
+
let t = document.createElement("textarea");
|
|
58
|
+
t.value = e, t.style.position = "fixed", t.style.opacity = "0", document.body.appendChild(t), t.select(), document.execCommand("copy"), document.body.removeChild(t);
|
|
59
|
+
} catch {}
|
|
60
|
+
}
|
|
61
|
+
x.value = !0, b("copy", e), S && clearTimeout(S), S = setTimeout(() => {
|
|
62
|
+
x.value = !1, S = null;
|
|
63
|
+
}, 2e3);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return (t, o) => (c(), n(d(y.tag), s({
|
|
67
|
+
class: ["me-text", C.value],
|
|
68
|
+
href: y.link ? y.href : void 0,
|
|
69
|
+
target: y.link ? y.target : void 0,
|
|
70
|
+
onClick: w
|
|
71
|
+
}, t.$attrs), {
|
|
72
|
+
default: m(() => [t.$slots.default ? u(t.$slots, "default", {}, void 0, void 0, 0) : (c(), i(e, { key: 1 }, [a(f(y.text), 1)], 64)), y.copyable ? (c(), i("span", {
|
|
73
|
+
key: 2,
|
|
74
|
+
class: "me-text__copy",
|
|
75
|
+
onClick: h(E, ["stop"])
|
|
76
|
+
}, [x.value ? (c(), n(p(g), {
|
|
77
|
+
key: 0,
|
|
78
|
+
size: 14
|
|
79
|
+
})) : (c(), n(p(_), {
|
|
80
|
+
key: 1,
|
|
81
|
+
size: 14
|
|
82
|
+
}))])) : r("", !0)]),
|
|
83
|
+
_: 3
|
|
84
|
+
}, 16, [
|
|
85
|
+
"class",
|
|
86
|
+
"href",
|
|
87
|
+
"target"
|
|
88
|
+
]));
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/text/index.ts
|
|
93
|
+
v.install = (e) => {
|
|
94
|
+
e.component("MeText", v);
|
|
95
|
+
};
|
|
96
|
+
var y = v;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { v as MeText, y as default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MeTextProps } from './types';
|
|
2
|
+
declare var __VLS_10: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
default?: (props: typeof __VLS_10) => any;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_base: import('vue').DefineComponent<MeTextProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
+
click: (evt: MouseEvent) => any;
|
|
8
|
+
copy: (text: string) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<MeTextProps> & Readonly<{
|
|
10
|
+
onClick?: ((evt: MouseEvent) => any) | undefined;
|
|
11
|
+
onCopy?: ((text: string) => any) | undefined;
|
|
12
|
+
}>, {
|
|
13
|
+
size: import('./types').MeTextSize;
|
|
14
|
+
type: import('./types').MeTextType;
|
|
15
|
+
tag: import('./types').MeTextTag;
|
|
16
|
+
clampLines: number;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MeText 排版文字组件类型定义
|
|
3
|
+
*/
|
|
4
|
+
/** 文字配色类型 */
|
|
5
|
+
export type MeTextType = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'info';
|
|
6
|
+
/** 文字尺寸 */
|
|
7
|
+
export type MeTextSize = 'small' | 'middle' | 'large';
|
|
8
|
+
/** 渲染标签 */
|
|
9
|
+
export type MeTextTag = 'span' | 'div' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
10
|
+
/** 对齐方式 */
|
|
11
|
+
export type MeTextAlign = 'left' | 'center' | 'right';
|
|
12
|
+
/** 组件 Props */
|
|
13
|
+
export interface MeTextProps {
|
|
14
|
+
/** 文本内容(设置后渲染该文本;default 插槽存在时优先插槽) */
|
|
15
|
+
text?: string;
|
|
16
|
+
/** 配色类型,默认 'secondary' */
|
|
17
|
+
type?: MeTextType;
|
|
18
|
+
/** 尺寸,默认 'middle' */
|
|
19
|
+
size?: MeTextSize;
|
|
20
|
+
/** 渲染标签,默认 'span' */
|
|
21
|
+
tag?: MeTextTag;
|
|
22
|
+
/** 对齐方式 */
|
|
23
|
+
align?: MeTextAlign;
|
|
24
|
+
/** 加粗 */
|
|
25
|
+
strong?: boolean;
|
|
26
|
+
/** 删除线 */
|
|
27
|
+
delete?: boolean;
|
|
28
|
+
/** 下划线 */
|
|
29
|
+
underline?: boolean;
|
|
30
|
+
/** 斜体 */
|
|
31
|
+
italic?: boolean;
|
|
32
|
+
/** 禁用(淡化文字) */
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
/** 单行省略 */
|
|
35
|
+
ellipsis?: boolean;
|
|
36
|
+
/** 多行省略 */
|
|
37
|
+
clamp?: boolean;
|
|
38
|
+
/** 多行省略行数,默认 2(仅 clamp 时生效) */
|
|
39
|
+
clampLines?: number;
|
|
40
|
+
/** 不换行 */
|
|
41
|
+
nowrap?: boolean;
|
|
42
|
+
/** 块级显示 */
|
|
43
|
+
block?: boolean;
|
|
44
|
+
/** 可复制 */
|
|
45
|
+
copyable?: boolean;
|
|
46
|
+
/** 复制内容(缺省用 text) */
|
|
47
|
+
copyText?: string;
|
|
48
|
+
/** 渲染为链接 */
|
|
49
|
+
link?: boolean;
|
|
50
|
+
/** 链接地址(仅 link 时生效) */
|
|
51
|
+
href?: string;
|
|
52
|
+
/** 链接打开方式(仅 link 时生效) */
|
|
53
|
+
target?: string;
|
|
54
|
+
}
|
|
55
|
+
/** 组件 Emits */
|
|
56
|
+
export interface MeTextEmits {
|
|
57
|
+
/** 复制成功时触发(参数为实际复制的内容) */
|
|
58
|
+
(e: 'copy', text: string): void;
|
|
59
|
+
/** 点击时触发(link 模式亦触发) */
|
|
60
|
+
(e: 'click', evt: MouseEvent): void;
|
|
61
|
+
}
|
|
62
|
+
/** 组件实例类型 */
|
|
63
|
+
export type MeTextInstance = InstanceType<typeof import('./index.vue').default>;
|
|
@@ -153,13 +153,13 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
153
153
|
default: () => string[];
|
|
154
154
|
};
|
|
155
155
|
}>, MeTreeMenuInstance, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
156
|
+
update: (form: MeTreeMenuData) => any;
|
|
156
157
|
create: () => any;
|
|
157
158
|
"node-click": (data: MeTreeMenuData) => any;
|
|
158
159
|
"context-menu-add": (data: MeTreeMenuData) => any;
|
|
159
160
|
"context-menu-edit": (data: MeTreeMenuData) => any;
|
|
160
161
|
"context-menu-remove": (data: MeTreeMenuData) => any;
|
|
161
162
|
"context-menu-copy": (data: MeTreeMenuData) => any;
|
|
162
|
-
update: (form: MeTreeMenuData) => any;
|
|
163
163
|
"update:actions": (actions: MeTreeMenuAction[]) => any;
|
|
164
164
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
165
165
|
/** 树节点数据列表 */
|
|
@@ -296,13 +296,13 @@ declare const __VLS_base: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
296
296
|
default: () => string[];
|
|
297
297
|
};
|
|
298
298
|
}>> & Readonly<{
|
|
299
|
+
onUpdate?: ((form: MeTreeMenuData) => any) | undefined;
|
|
299
300
|
onCreate?: (() => any) | undefined;
|
|
300
301
|
"onNode-click"?: ((data: MeTreeMenuData) => any) | undefined;
|
|
301
302
|
"onContext-menu-add"?: ((data: MeTreeMenuData) => any) | undefined;
|
|
302
303
|
"onContext-menu-edit"?: ((data: MeTreeMenuData) => any) | undefined;
|
|
303
304
|
"onContext-menu-remove"?: ((data: MeTreeMenuData) => any) | undefined;
|
|
304
305
|
"onContext-menu-copy"?: ((data: MeTreeMenuData) => any) | undefined;
|
|
305
|
-
onUpdate?: ((form: MeTreeMenuData) => any) | undefined;
|
|
306
306
|
"onUpdate:actions"?: ((actions: MeTreeMenuAction[]) => any) | undefined;
|
|
307
307
|
}>, {
|
|
308
308
|
form: MeTreeMenuData;
|