@zl-ui-kit/components 0.9.0 → 0.10.0
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/README.md +309 -162
- package/dist/components/ZlAddSub/index.css +1 -1
- package/dist/components/ZlAddSub/index.vue.mjs +2 -2
- package/dist/components/ZlAppMenu/AppMenu.vue.d.ts +1 -1
- package/dist/components/ZlCardPage/index.vue.d.ts +94 -36
- package/dist/components/ZlCardPage/index.vue.mjs +2 -0
- package/dist/components/ZlChart/index.vue.d.ts +1 -0
- package/dist/components/ZlChart/index.vue.mjs +1 -0
- package/dist/components/ZlCheckAll/index.css +1 -1
- package/dist/components/ZlCheckAll/index.vue.mjs +1 -1
- package/dist/components/ZlDynamicComponent/index.vue.d.ts +8 -3
- package/dist/components/ZlDynamicComponent/index.vue.mjs +24 -19
- package/dist/components/ZlEditor/ZlSqlEditor.vue.d.ts +28 -2
- package/dist/components/ZlEditor/ZlSqlEditor.vue.mjs +27 -18
- package/dist/components/ZlEditor/index.vue.d.ts +22 -1
- package/dist/components/ZlEditor/index.vue.mjs +47 -24
- package/dist/components/ZlForm/index.vue.d.ts +26 -2
- package/dist/components/ZlForm/index.vue.mjs +96 -90
- package/dist/components/ZlGrid/index.vue.d.ts +1 -1
- package/dist/components/ZlIcon/index.css +1 -1
- package/dist/components/ZlIcon/index.vue.d.ts +6 -2
- package/dist/components/ZlIcon/index.vue.mjs +2 -2
- package/dist/components/ZlIcon/index2.vue.mjs +30 -23
- package/dist/components/ZlPagination/index.css +1 -1
- package/dist/components/ZlPagination/index.vue.mjs +1 -1
- package/dist/components/ZlSearch/index.vue.d.ts +82 -23
- package/dist/components/ZlSearch/index.vue.mjs +8 -1
- package/dist/components/ZlSearchTable/index.vue.d.ts +180 -40
- package/dist/components/ZlSearchTable/index.vue.mjs +4 -0
- package/dist/components/ZlSorter/ZlSorterList.css +1 -1
- package/dist/components/ZlSorter/ZlSorterList.vue.d.ts +1 -1
- package/dist/components/ZlSorter/ZlSorterList.vue.mjs +2 -2
- package/dist/components/ZlSorter/index.css +1 -1
- package/dist/components/ZlSorter/index.vue.mjs +2 -2
- package/dist/components/ZlSwitch/index.vue.d.ts +6 -2
- package/dist/components/ZlSwitch/index.vue.mjs +26 -24
- package/dist/components/ZlTable/index.vue.d.ts +36 -1
- package/dist/components/ZlTable/index.vue.mjs +98 -75
- package/dist/components/ZlTabs/index.vue.d.ts +20 -3
- package/dist/components/ZlTabs/index.vue.mjs +30 -20
- package/dist/components/ZlTag/index.vue.d.ts +2 -2
- package/package.json +6 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as monaco from 'monaco-editor';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
/** 语法高亮所用语言 id,默认 javascript */
|
|
3
4
|
language?: string;
|
|
@@ -7,7 +8,27 @@ type __VLS_Props = {
|
|
|
7
8
|
type __VLS_PublicProps = {
|
|
8
9
|
modelValue?: string;
|
|
9
10
|
} & __VLS_Props;
|
|
10
|
-
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
11
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {
|
|
12
|
+
monacoEditor: monaco.editor.IStandaloneCodeEditor | undefined;
|
|
13
|
+
/** 读取当前文本(`v-model` 已自动同步,一般无需主动调用) */
|
|
14
|
+
getValue: () => string;
|
|
15
|
+
/** 设置整本文本,会同步触发 `v-model` 更新 */
|
|
16
|
+
setValue: (value: string) => void | undefined;
|
|
17
|
+
/** 当前文本模型(monaco `ITextModel`),打 marker / 取行内容时需要 */
|
|
18
|
+
getModel: () => monaco.editor.ITextModel | null | undefined;
|
|
19
|
+
/** 当前选区(未选中时为空) */
|
|
20
|
+
getSelection: () => monaco.Selection | null | undefined;
|
|
21
|
+
/** 滚动到指定行使其进入可视区 */
|
|
22
|
+
revealLine: (lineNumber: number) => void | undefined;
|
|
23
|
+
/** 让编辑器获得焦点 */
|
|
24
|
+
focus: () => void | undefined;
|
|
25
|
+
/** 重算布局(容器尺寸变化已由组件内部 `useResizeObserver` 自动处理,无需手动调) */
|
|
26
|
+
layout: () => void | undefined;
|
|
27
|
+
/** 运行时更新 monaco 创建选项 */
|
|
28
|
+
updateOptions: (options: Record<string, any>) => void | undefined;
|
|
29
|
+
/** 销毁编辑器实例(组件卸载时自动调用,重复调用 monaco 会抛错) */
|
|
30
|
+
dispose: () => void | undefined;
|
|
31
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
32
|
"update:modelValue": (value: string) => any;
|
|
12
33
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
34
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useResizeObserver as
|
|
3
|
-
import * as
|
|
4
|
-
import { setupMonacoEnvironment as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as d, useModel as v, shallowRef as r, watch as m, onScopeDispose as c, openBlock as p, createElementBlock as f, mergeModels as g } from "vue";
|
|
2
|
+
import { useResizeObserver as V, whenever as h } from "@vueuse/core";
|
|
3
|
+
import * as E from "monaco-editor";
|
|
4
|
+
import { setupMonacoEnvironment as M } from "./setupMonacoEnvironment.mjs";
|
|
5
|
+
const R = /* @__PURE__ */ d({
|
|
6
6
|
name: "ZlEditor",
|
|
7
7
|
__name: "index",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ g({
|
|
9
9
|
language: { default: "javascript" },
|
|
10
10
|
options: { default: () => ({}) }
|
|
11
11
|
}, {
|
|
@@ -13,52 +13,75 @@ const w = /* @__PURE__ */ i({
|
|
|
13
13
|
modelModifiers: {}
|
|
14
14
|
}),
|
|
15
15
|
emits: ["update:modelValue"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
const o =
|
|
20
|
-
return
|
|
16
|
+
setup(u, { expose: s }) {
|
|
17
|
+
const n = u;
|
|
18
|
+
M();
|
|
19
|
+
const o = v(u, "modelValue"), t = r(), e = r();
|
|
20
|
+
return V(t, () => {
|
|
21
21
|
requestAnimationFrame(() => {
|
|
22
22
|
e.value?.layout();
|
|
23
23
|
});
|
|
24
24
|
}), h(
|
|
25
|
-
|
|
25
|
+
t,
|
|
26
26
|
(a) => {
|
|
27
|
-
e.value =
|
|
27
|
+
e.value = E.editor.create(a, {
|
|
28
28
|
value: o.value,
|
|
29
|
-
language:
|
|
29
|
+
language: n.language,
|
|
30
30
|
minimap: { enabled: !1 },
|
|
31
31
|
theme: "zl-editor-theme",
|
|
32
|
-
...
|
|
32
|
+
...n.options
|
|
33
33
|
}), e.value.onDidChangeModelContent(() => {
|
|
34
34
|
o.value = e.value?.getValue() ?? "";
|
|
35
35
|
});
|
|
36
36
|
},
|
|
37
37
|
{ once: !0 }
|
|
38
|
-
),
|
|
38
|
+
), m(o, () => {
|
|
39
39
|
e.value?.getValue() !== o.value && e.value?.setValue(o.value ?? "");
|
|
40
40
|
}), c(() => {
|
|
41
41
|
e.value?.dispose();
|
|
42
42
|
}), s(
|
|
43
43
|
new Proxy(
|
|
44
|
-
{},
|
|
45
44
|
{
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
/** 底层 monaco 编辑器实例(`IStandaloneCodeEditor`),需要未列出的原生 API 时仍这里取 */
|
|
46
|
+
get monacoEditor() {
|
|
47
|
+
return e.value;
|
|
48
48
|
},
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
/** 读取当前文本(`v-model` 已自动同步,一般无需主动调用) */
|
|
50
|
+
getValue: () => e.value?.getValue() ?? "",
|
|
51
|
+
/** 设置整本文本,会同步触发 `v-model` 更新 */
|
|
52
|
+
setValue: (a) => e.value?.setValue(a),
|
|
53
|
+
/** 当前文本模型(monaco `ITextModel`),打 marker / 取行内容时需要 */
|
|
54
|
+
getModel: () => e.value?.getModel(),
|
|
55
|
+
/** 当前选区(未选中时为空) */
|
|
56
|
+
getSelection: () => e.value?.getSelection(),
|
|
57
|
+
/** 滚动到指定行使其进入可视区 */
|
|
58
|
+
revealLine: (a) => e.value?.revealLine(a),
|
|
59
|
+
/** 让编辑器获得焦点 */
|
|
60
|
+
focus: () => e.value?.focus(),
|
|
61
|
+
/** 重算布局(容器尺寸变化已由组件内部 `useResizeObserver` 自动处理,无需手动调) */
|
|
62
|
+
layout: () => e.value?.layout(),
|
|
63
|
+
/** 运行时更新 monaco 创建选项 */
|
|
64
|
+
updateOptions: (a) => e.value?.updateOptions(a),
|
|
65
|
+
/** 销毁编辑器实例(组件卸载时自动调用,重复调用 monaco 会抛错) */
|
|
66
|
+
dispose: () => e.value?.dispose()
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
get(a, l, i) {
|
|
70
|
+
return Reflect.get(a, l, i) ?? e.value?.[l];
|
|
71
|
+
},
|
|
72
|
+
has(a, l) {
|
|
73
|
+
return Reflect.has(a, l) || l in (e.value ?? {});
|
|
51
74
|
}
|
|
52
75
|
}
|
|
53
76
|
)
|
|
54
|
-
), (a,
|
|
77
|
+
), (a, l) => (p(), f("div", {
|
|
55
78
|
ref_key: "editorEl",
|
|
56
|
-
ref:
|
|
79
|
+
ref: t,
|
|
57
80
|
class: "zl-editor"
|
|
58
81
|
}, null, 512));
|
|
59
82
|
}
|
|
60
83
|
});
|
|
61
84
|
export {
|
|
62
|
-
|
|
85
|
+
R as default
|
|
63
86
|
};
|
|
64
87
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -5,8 +5,18 @@ type __VLS_Props = {
|
|
|
5
5
|
/** 表单值对象,不传时由组件内部自建 */
|
|
6
6
|
model?: Record<string, any>;
|
|
7
7
|
};
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
/** el-form 的校验回调:第一个参数为是否通过,失败时第二个参数为错误字段集合 */
|
|
9
|
+
type ValidateCallback = (isValid: boolean, invalidFields?: Record<string, any>) => void;
|
|
10
|
+
/** 字段名,可传单个或数组;不传即全表单 */
|
|
11
|
+
type FieldNames = string | string[];
|
|
12
|
+
/**
|
|
13
|
+
* 校验整个表单,语义与 `el-form.validate()` 完全一致:
|
|
14
|
+
* 不传 callback 时返回 Promise(通过 `resolve(true)`,失败 `reject(错误字段集合)`);
|
|
15
|
+
* 传 callback 时改为回调式(`callback(true)` / `callback(false, fields)`),不会抛错。
|
|
16
|
+
*/
|
|
17
|
+
declare function validate(callback?: ValidateCallback): Promise<boolean>;
|
|
18
|
+
/** 校验指定字段,语义同 `validate()` */
|
|
19
|
+
declare function validateField(props?: FieldNames, callback?: ValidateCallback): Promise<boolean>;
|
|
10
20
|
declare function __VLS_template(): {
|
|
11
21
|
attrs: Partial<{}>;
|
|
12
22
|
slots: Partial<Record<string, (_: {
|
|
@@ -44,8 +54,22 @@ declare function __VLS_template(): {
|
|
|
44
54
|
};
|
|
45
55
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
46
56
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
57
|
+
/** 校验整个表单;同 `el-form.validate()`(无回调时失败会 reject 错误字段集合) */
|
|
47
58
|
validate: typeof validate;
|
|
59
|
+
/** 校验指定字段(字段名或数组),语义同 `validate()` */
|
|
48
60
|
validateField: typeof validateField;
|
|
61
|
+
/** 重置字段并清除校验结果;不传参重置全部 */
|
|
62
|
+
resetFields: (props?: FieldNames) => any;
|
|
63
|
+
/** 清除校验提示;不传参清除全部 */
|
|
64
|
+
clearValidate: (props?: FieldNames) => any;
|
|
65
|
+
/** 滚动到指定字段 */
|
|
66
|
+
scrollToField: (prop: string) => any;
|
|
67
|
+
/** 取单个表单项上下文(含 `resetField`/`clearValidate`/`validateMessage` 等) */
|
|
68
|
+
getField: (prop: string) => any;
|
|
69
|
+
fields: any;
|
|
70
|
+
/** 写入字段初始值(`resetFields` 会回到这些值) */
|
|
71
|
+
setInitialValues: (values: Record<string, any>, clearValidate?: boolean) => any;
|
|
72
|
+
elForm: any;
|
|
49
73
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
50
74
|
items: FormItem[];
|
|
51
75
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1,129 +1,135 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const G = { class: "zl-form-item-label" },
|
|
1
|
+
import { defineComponent as D, toRefs as L, ref as b, computed as V, resolveComponent as m, openBlock as n, createBlock as u, mergeProps as c, withCtx as d, createElementBlock as M, Fragment as S, renderList as U, renderSlot as p, createElementVNode as F, toDisplayString as q, createCommentVNode as E, createVNode as W } from "vue";
|
|
2
|
+
import j from "./ZlFormChild.vue.mjs";
|
|
3
|
+
import x from "../ZlIcon/index.vue.mjs";
|
|
4
|
+
const G = { class: "zl-form-item-label" }, g = "onUpdate:modelValue", Q = /* @__PURE__ */ D({
|
|
5
5
|
name: "ZlForm",
|
|
6
6
|
__name: "index",
|
|
7
7
|
props: {
|
|
8
8
|
items: { default: () => [] },
|
|
9
9
|
model: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
return v.value.forEach((
|
|
15
|
-
if (!
|
|
11
|
+
setup(h, { expose: y }) {
|
|
12
|
+
const i = h, { items: v } = L(i), I = b(i.model ?? {}), r = V(() => i.model ?? I.value), P = V(() => {
|
|
13
|
+
const e = [];
|
|
14
|
+
return v.value.forEach((l) => {
|
|
15
|
+
if (!l.model)
|
|
16
16
|
throw new Error("[ZlForm]: form item's model is required!");
|
|
17
|
-
|
|
18
|
-
}), v.value.forEach((
|
|
19
|
-
if (
|
|
17
|
+
l.defaultValue !== void 0 && r.value[l.model] === void 0 && (r.value[l.model] = l.defaultValue);
|
|
18
|
+
}), v.value.forEach((l) => {
|
|
19
|
+
if (!k(l)) return;
|
|
20
20
|
const {
|
|
21
|
-
visible:
|
|
21
|
+
visible: s,
|
|
22
22
|
props: a,
|
|
23
|
-
tooltip:
|
|
24
|
-
formItemProps:
|
|
25
|
-
component:
|
|
26
|
-
label:
|
|
27
|
-
model:
|
|
23
|
+
tooltip: f,
|
|
24
|
+
formItemProps: o = {},
|
|
25
|
+
component: z,
|
|
26
|
+
label: C,
|
|
27
|
+
model: T,
|
|
28
28
|
defaultValue: H,
|
|
29
29
|
slot: B,
|
|
30
|
-
slots:
|
|
31
|
-
...
|
|
32
|
-
} =
|
|
30
|
+
slots: R,
|
|
31
|
+
...Z
|
|
32
|
+
} = l, _ = { ...o };
|
|
33
33
|
delete _.tooltip;
|
|
34
|
-
const
|
|
35
|
-
|
|
34
|
+
const A = { ...Z, ...a ?? {} };
|
|
35
|
+
e.push({
|
|
36
36
|
formItemProps: _,
|
|
37
|
-
tooltip:
|
|
38
|
-
component:
|
|
39
|
-
label:
|
|
40
|
-
model:
|
|
37
|
+
tooltip: f,
|
|
38
|
+
component: z,
|
|
39
|
+
label: C,
|
|
40
|
+
model: T,
|
|
41
41
|
slot: B,
|
|
42
|
-
slots:
|
|
43
|
-
props:
|
|
42
|
+
slots: R,
|
|
43
|
+
props: w(A, l.model)
|
|
44
44
|
});
|
|
45
|
-
}),
|
|
46
|
-
}),
|
|
47
|
-
function
|
|
48
|
-
const
|
|
49
|
-
return
|
|
45
|
+
}), e;
|
|
46
|
+
}), t = b(null);
|
|
47
|
+
function k(e) {
|
|
48
|
+
const l = e.visible;
|
|
49
|
+
return l === void 0 ? !0 : l === !1 || typeof l == "function" && !l(r.value, e) ? !1 : !!l;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
},
|
|
51
|
+
function w(e = {}, l) {
|
|
52
|
+
const s = e[g];
|
|
53
|
+
return e[g] = (a) => {
|
|
54
|
+
r.value[l] = a, s?.(a);
|
|
55
|
+
}, e;
|
|
56
56
|
}
|
|
57
|
-
async function
|
|
58
|
-
|
|
59
|
-
if (o !== !0) throw o;
|
|
57
|
+
async function $(e) {
|
|
58
|
+
return await t.value?.validate(e) ?? !0;
|
|
60
59
|
}
|
|
61
|
-
async function N(
|
|
62
|
-
|
|
63
|
-
await n.value?.validateField(o);
|
|
64
|
-
} catch (e) {
|
|
65
|
-
throw e;
|
|
66
|
-
}
|
|
60
|
+
async function N(e, l) {
|
|
61
|
+
return await t.value?.validateField(e, l) ?? !0;
|
|
67
62
|
}
|
|
68
|
-
return
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
63
|
+
return y({
|
|
64
|
+
/** 校验整个表单;同 `el-form.validate()`(无回调时失败会 reject 错误字段集合) */
|
|
65
|
+
validate: $,
|
|
66
|
+
/** 校验指定字段(字段名或数组),语义同 `validate()` */
|
|
67
|
+
validateField: N,
|
|
68
|
+
/** 重置字段并清除校验结果;不传参重置全部 */
|
|
69
|
+
resetFields: (e) => t.value?.resetFields(e),
|
|
70
|
+
/** 清除校验提示;不传参清除全部 */
|
|
71
|
+
clearValidate: (e) => t.value?.clearValidate(e),
|
|
72
|
+
/** 滚动到指定字段 */
|
|
73
|
+
scrollToField: (e) => t.value?.scrollToField(e),
|
|
74
|
+
/** 取单个表单项上下文(含 `resetField`/`clearValidate`/`validateMessage` 等) */
|
|
75
|
+
getField: (e) => t.value?.getField(e),
|
|
76
|
+
/** 全部表单项上下文(含 `prop`/`value`/`validateState` 等) */
|
|
77
|
+
get fields() {
|
|
78
|
+
return t.value?.fields ?? [];
|
|
79
|
+
},
|
|
80
|
+
/** 写入字段初始值(`resetFields` 会回到这些值) */
|
|
81
|
+
setInitialValues: (e, l) => t.value?.setInitialValues(e, l),
|
|
82
|
+
/** 内部 ElForm 实例,未列出的能力兜底用 */
|
|
83
|
+
get elForm() {
|
|
84
|
+
return t.value;
|
|
85
|
+
}
|
|
86
|
+
}), (e, l) => {
|
|
87
|
+
const s = m("el-tooltip"), a = m("el-form-item"), f = m("el-form");
|
|
88
|
+
return n(), u(f, c({
|
|
83
89
|
ref_key: "formRef",
|
|
84
|
-
ref:
|
|
90
|
+
ref: t,
|
|
85
91
|
class: "zl-form",
|
|
86
|
-
model:
|
|
87
|
-
}, { labelWidth: "auto", ...
|
|
88
|
-
default:
|
|
89
|
-
(
|
|
90
|
-
key:
|
|
91
|
-
label:
|
|
92
|
-
prop:
|
|
93
|
-
}, { ref_for: !0 },
|
|
94
|
-
label:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
], void 0, 0) :
|
|
99
|
-
|
|
92
|
+
model: r.value
|
|
93
|
+
}, { labelWidth: "auto", ...e.$attrs }), {
|
|
94
|
+
default: d(() => [
|
|
95
|
+
(n(!0), M(S, null, U(P.value, (o) => (n(), u(a, c({
|
|
96
|
+
key: o.model,
|
|
97
|
+
label: o.label,
|
|
98
|
+
prop: o.model
|
|
99
|
+
}, { ref_for: !0 }, o.formItemProps), {
|
|
100
|
+
label: d(() => [
|
|
101
|
+
F("span", G, [
|
|
102
|
+
e.$slots.label ? p(e.$slots, "label", c({ ref_for: !0 }, { label: o.label, item: o }), () => [
|
|
103
|
+
F("span", null, q(o.label), 1)
|
|
104
|
+
], void 0, 0) : E("", !0),
|
|
105
|
+
o.tooltip ? (n(), u(s, {
|
|
100
106
|
key: 1,
|
|
101
|
-
content:
|
|
107
|
+
content: o.tooltip,
|
|
102
108
|
placement: "top"
|
|
103
109
|
}, {
|
|
104
|
-
default:
|
|
105
|
-
x
|
|
110
|
+
default: d(() => [
|
|
111
|
+
W(x, {
|
|
106
112
|
class: "zl-form-item-label__tooltip",
|
|
107
113
|
icon: "zl:help-color"
|
|
108
114
|
})
|
|
109
115
|
]),
|
|
110
116
|
_: 1
|
|
111
|
-
}, 8, ["content"])) :
|
|
117
|
+
}, 8, ["content"])) : E("", !0)
|
|
112
118
|
])
|
|
113
119
|
]),
|
|
114
|
-
default:
|
|
115
|
-
|
|
116
|
-
model:
|
|
117
|
-
field:
|
|
118
|
-
}, void 0, void 0, 0) : (
|
|
120
|
+
default: d(() => [
|
|
121
|
+
o.slot ? p(e.$slots, o.model, {
|
|
122
|
+
model: r.value,
|
|
123
|
+
field: o
|
|
124
|
+
}, void 0, void 0, 0) : (n(), u(j, {
|
|
119
125
|
key: 1,
|
|
120
|
-
item:
|
|
121
|
-
"model-value":
|
|
126
|
+
item: o,
|
|
127
|
+
"model-value": r.value[o.model]
|
|
122
128
|
}, null, 8, ["item", "model-value"]))
|
|
123
129
|
]),
|
|
124
130
|
_: 2
|
|
125
131
|
}, 1040, ["label", "prop"]))), 128)),
|
|
126
|
-
p(
|
|
132
|
+
p(e.$slots, "default")
|
|
127
133
|
]),
|
|
128
134
|
_: 3
|
|
129
135
|
}, 16, ["model"]);
|
|
@@ -32,8 +32,8 @@ declare function __VLS_template(): {
|
|
|
32
32
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
33
33
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
34
34
|
data: Record<string, any>;
|
|
35
|
-
labelWidth: string | number;
|
|
36
35
|
grid: IGridItem[];
|
|
36
|
+
labelWidth: string | number;
|
|
37
37
|
cols: number;
|
|
38
38
|
labelPosition: "left" | "top" | "right";
|
|
39
39
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zl-icon[data-v-
|
|
1
|
+
.zl-icon[data-v-2dd0b437]{display:inline-flex;align-items:center;justify-content:center;font-size:14px;line-height:1}.zl-icon--external[data-v-2dd0b437]{width:1em;height:1em;background-color:currentColor;mask-size:100% 100%}.zl-icon--local[data-v-2dd0b437]{width:1em;height:1em;fill:currentColor}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
/** 图标:zl:xxx(本地图标集)/ http(s) 地址 / 本地 svg sprite 名称 */
|
|
3
3
|
icon: string;
|
|
4
|
+
/** 尺寸,作用在 `font-size` 上(数字按 px 处理),图标本体按 `1em` 缩放;默认 `14px` */
|
|
5
|
+
size?: string | number;
|
|
6
|
+
/** 颜色,默认继承当前文字色(`currentColor`) */
|
|
7
|
+
color?: string;
|
|
4
8
|
};
|
|
5
9
|
declare function __VLS_template(): {
|
|
6
10
|
attrs: Partial<{}>;
|
|
@@ -8,10 +12,10 @@ declare function __VLS_template(): {
|
|
|
8
12
|
default?(_: {}): any;
|
|
9
13
|
};
|
|
10
14
|
refs: {};
|
|
11
|
-
rootEl:
|
|
15
|
+
rootEl: any;
|
|
12
16
|
};
|
|
13
17
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
19
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
16
20
|
export default _default;
|
|
17
21
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import o from "./index2.vue.mjs";
|
|
2
2
|
import './index.css';/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const
|
|
4
|
+
const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2dd0b437"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
_ as default
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.vue.mjs.map
|
|
@@ -1,34 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Icon as
|
|
3
|
-
const
|
|
4
|
-
key: 2,
|
|
5
|
-
class: "zl-icon--local"
|
|
6
|
-
}, I = ["xlink:href"], E = /* @__PURE__ */ a({
|
|
1
|
+
import { defineComponent as v, useAttrs as z, computed as t, openBlock as o, createElementBlock as s, normalizeStyle as k, unref as r, normalizeClass as h, renderSlot as x, createBlock as I, mergeProps as i, createElementVNode as S, createCommentVNode as $ } from "vue";
|
|
2
|
+
import { Icon as A } from "@iconify/vue/offline";
|
|
3
|
+
const B = ["xlink:href"], g = /* @__PURE__ */ v({
|
|
7
4
|
name: "ZlIcon",
|
|
5
|
+
inheritAttrs: !1,
|
|
8
6
|
__name: "index",
|
|
9
7
|
props: {
|
|
10
|
-
icon: {}
|
|
8
|
+
icon: {},
|
|
9
|
+
size: {},
|
|
10
|
+
color: {}
|
|
11
11
|
},
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
setup(n) {
|
|
13
|
+
const e = n, l = z(), u = t(() => ({
|
|
14
|
+
fontSize: typeof e.size == "number" ? `${e.size}px` : e.size,
|
|
15
|
+
color: e.color
|
|
16
|
+
})), c = t(() => {
|
|
17
|
+
const { class: a, style: y, ...p } = l;
|
|
18
|
+
return p;
|
|
19
|
+
}), m = t(() => e.icon.startsWith("http")), d = t(() => e.icon.includes(":")), f = t(() => `#icon-${e.icon}`);
|
|
20
|
+
return (a, y) => (o(), s("div", {
|
|
21
|
+
class: h(["zl-icon", r(l).class]),
|
|
22
|
+
style: k([u.value, r(l).style])
|
|
23
|
+
}, [
|
|
24
|
+
x(a.$slots, "default", {}, () => [
|
|
25
|
+
d.value ? (o(), I(r(A), i({ key: 0 }, c.value, {
|
|
26
|
+
id: n.icon,
|
|
27
|
+
icon: n.icon
|
|
28
|
+
}), null, 16, ["id", "icon"])) : m.value ? (o(), s("div", i({ key: 1 }, c.value, {
|
|
29
|
+
style: { mask: `url(${n.icon}) no-repeat 50% 50%` },
|
|
23
30
|
class: "zl-icon--external"
|
|
24
|
-
}, null,
|
|
25
|
-
|
|
26
|
-
])) :
|
|
31
|
+
}), null, 16)) : n.icon ? (o(), s("svg", i({ key: 2 }, c.value, { class: "zl-icon--local" }), [
|
|
32
|
+
S("use", { "xlink:href": f.value }, null, 8, B)
|
|
33
|
+
], 16)) : $("", !0)
|
|
27
34
|
], !0)
|
|
28
|
-
]));
|
|
35
|
+
], 6));
|
|
29
36
|
}
|
|
30
37
|
});
|
|
31
38
|
export {
|
|
32
|
-
|
|
39
|
+
g as default
|
|
33
40
|
};
|
|
34
41
|
//# sourceMappingURL=index2.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@charset "UTF-8";.zl-pagination[data-v-
|
|
1
|
+
@charset "UTF-8";.zl-pagination[data-v-78457fcd]{padding:6px 16px;background-color:var(--zl-fill-1, #f9fbfd);justify-content:var(--zl-pagination-justify, flex-end)}.zl-pagination--left[data-v-78457fcd]{--zl-pagination-justify: flex-start}.zl-pagination--center[data-v-78457fcd]{--zl-pagination-justify: center}.zl-pagination--right[data-v-78457fcd]{--zl-pagination-justify: flex-end}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index2.vue.mjs";
|
|
2
2
|
import './index.css';/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-78457fcd"]]);
|
|
5
5
|
export {
|
|
6
6
|
i as default
|
|
7
7
|
};
|