@zl-ui-kit/components 0.18.4 → 0.18.5
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 +25 -17
- package/dist/components/ZlAction/List.vue.mjs +47 -44
- package/dist/components/ZlAction/index.vue.d.ts +7 -1
- package/dist/components/ZlAction/index.vue.mjs +12 -8
- package/dist/components/ZlAction/types.d.ts +5 -2
- package/dist/components/ZlDictTag/index.vue.d.ts +6 -0
- package/dist/components/ZlDictTag/index.vue.mjs +31 -26
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -3818,7 +3818,7 @@ const { i18n } = useLocale({ messages })
|
|
|
3818
3818
|
|
|
3819
3819
|
| 组件 | 入口 | props | 事件 | 插槽 | 暴露 |
|
|
3820
3820
|
| ------------------------------------------- | ------------------- | ----- | ---- | ---- | ---- |
|
|
3821
|
-
| [`ZlAction`](#zlaction) | 主入口 |
|
|
3821
|
+
| [`ZlAction`](#zlaction) | 主入口 | 1 | 0 | 0 | 0 |
|
|
3822
3822
|
| [`ZlActionList`](#zlactionlist) | 主入口 | 6 | 1 | 1 | 0 |
|
|
3823
3823
|
| [`ZlAddSub`](#zladdsub) | 主入口 | 2 | 1 | 1 | 0 |
|
|
3824
3824
|
| [`ZlAppLayout`](#zlapplayout) | 主入口 | 1 | 0 | 8 | 0 |
|
|
@@ -3834,7 +3834,7 @@ const { i18n } = useLocale({ messages })
|
|
|
3834
3834
|
| [`ZlCopy`](#zlcopy) | 主入口 | 2 | 0 | 2 | 0 |
|
|
3835
3835
|
| [`ZlDescription`](#zldescription) | 主入口 | 5 | 0 | 1 | 0 |
|
|
3836
3836
|
| [`ZlDialog`](#zldialog) | 主入口 | 7 | 1 | 2 | 0 |
|
|
3837
|
-
| [`ZlDictTag`](#zldicttag) | 主入口 |
|
|
3837
|
+
| [`ZlDictTag`](#zldicttag) | 主入口 | 10 | 0 | 0 | 0 |
|
|
3838
3838
|
| [`ZlDrawer`](#zldrawer) | 主入口 | 7 | 1 | 2 | 0 |
|
|
3839
3839
|
| [`ZlDynamicComponent`](#zldynamiccomponent) | 主入口 | 3 | 2 | 0 | 0 |
|
|
3840
3840
|
| [`ZlPdfViewer`](#zlpdfviewer) | 主入口 | 2 | 0 | 0 | 0 |
|
|
@@ -3884,6 +3884,8 @@ const { i18n } = useLocale({ messages })
|
|
|
3884
3884
|
|
|
3885
3885
|
<sub>入口 `@zl-ui-kit/components` · 源码 `packages/components/src/components/ZlAction/index.vue`</sub>
|
|
3886
3886
|
|
|
3887
|
+
**接口概览**:1 props
|
|
3888
|
+
|
|
3887
3889
|
**用法示例**
|
|
3888
3890
|
|
|
3889
3891
|
```vue
|
|
@@ -3898,9 +3900,13 @@ import { ZlAction } from '@zl-ui-kit/components'
|
|
|
3898
3900
|
|
|
3899
3901
|
> 示例中的 `actions` 是数组 / 对象 / 函数等非字面量入参,由调用方提供数据;其余属性写法可直接照搬。
|
|
3900
3902
|
|
|
3901
|
-
|
|
3903
|
+
**props**
|
|
3902
3904
|
|
|
3903
|
-
|
|
3905
|
+
| 属性 | 类型 | 默认值 | 必填 | 示例 | 说明 |
|
|
3906
|
+
| ----------- | -------- | ------ | ---- | ----------------- | ----------------------------------------------------------------- |
|
|
3907
|
+
| `listCount` | `number` | `2` | 否 | `:list-count="1"` | 直接展示的操作数,超出收入"更多"下拉,默认 2;透传给 ZlActionList |
|
|
3908
|
+
|
|
3909
|
+
> 把 `$attrs` 透传给 `ZlActionList`,未列出的属性会继续下传
|
|
3904
3910
|
|
|
3905
3911
|
#### `ZlActionList`
|
|
3906
3912
|
|
|
@@ -4583,7 +4589,7 @@ import { ZlDialog } from '@zl-ui-kit/components'
|
|
|
4583
4589
|
|
|
4584
4590
|
<sub>入口 `@zl-ui-kit/components` · 源码 `packages/components/src/components/ZlDictTag/index.vue`</sub>
|
|
4585
4591
|
|
|
4586
|
-
**接口概览**:
|
|
4592
|
+
**接口概览**:10 props
|
|
4587
4593
|
|
|
4588
4594
|
**用法示例**
|
|
4589
4595
|
|
|
@@ -4611,6 +4617,8 @@ import { ZlDictTag } from '@zl-ui-kit/components'
|
|
|
4611
4617
|
| `simple` | `boolean` | — | 否 | `simple` | 忽略字典项自带的颜色,改用标签默认配色 |
|
|
4612
4618
|
| `iconVisible` | `boolean` | `undefined` | 否 | `icon-visible` | 是否展示字典项图标(默认 true) |
|
|
4613
4619
|
| `hideIcon` | `boolean` | `undefined` | 否 | `hide-icon` | 已废弃,请用 `iconVisible` 控制图标显隐 |
|
|
4620
|
+
| `fill` | `boolean` | `false` | 否 | `fill` | 是否使用填充背景(配合字典项 `color`/`type` 显示浅色底色,如 `--zl-<色>-1`),透传给内部 ZlTag |
|
|
4621
|
+
| `rounded` | `boolean` | `false` | 否 | `rounded` | 是否使用全圆角样式,透传给内部 ZlTag |
|
|
4614
4622
|
|
|
4615
4623
|
> 把 `$attrs` 透传给 `zl-corner-tag`,未列出的属性会继续下传
|
|
4616
4624
|
|
|
@@ -6657,18 +6665,18 @@ import { ZlFileViewer } from '@zl-ui-kit/components/file-preview'
|
|
|
6657
6665
|
|
|
6658
6666
|
操作项模型(ZlActionList / ZlTable actions 列共用)
|
|
6659
6667
|
|
|
6660
|
-
| 字段 | 类型 | 必填 | 说明
|
|
6661
|
-
| ------------ | ------------------------------------------ | ---- |
|
|
6662
|
-
| `label` | `string` | 是 | 操作文案
|
|
6663
|
-
| `icon` | `string` | 否 | 图标(`zl:` 前缀走 ZlIcon,其余按 iconify/EP 规则)
|
|
6664
|
-
| `iconProps` | `Record<string, any>` | 否 | 传给图标组件的 props
|
|
6665
|
-
| `iconClass` | `string` | 否 | 图标自定义类名
|
|
6666
|
-
| `tooltip` | `boolean`
|
|
6667
|
-
| `disabled` | `boolean` | 否 | 禁用(点击无响应)
|
|
6668
|
-
| `divided` | `boolean` | 否 | 与下一项之间显示分割线
|
|
6669
|
-
| `permission` | `string \| string[]` | 否 | 权限键(三段式,经 usePermission 校验)
|
|
6670
|
-
| `visible` | `boolean \| ((...args: any[]) => boolean)` | 否 | 显隐控制:布尔值直接判定;函数接收 `visibleArgs`(末尾追加 action 自身)后判定。 与权限取交集:两者都通过才展示。
|
|
6671
|
-
| `handler` | `(...args: any[]) => void` | 否 | 点击处理(接收 actionArgs)
|
|
6668
|
+
| 字段 | 类型 | 必填 | 说明 |
|
|
6669
|
+
| ------------ | ------------------------------------------ | ---- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
6670
|
+
| `label` | `string` | 是 | 操作文案 |
|
|
6671
|
+
| `icon` | `string` | 否 | 图标(`zl:` 前缀走 ZlIcon,其余按 iconify/EP 规则) |
|
|
6672
|
+
| `iconProps` | `Record<string, any>` | 否 | 传给图标组件的 props |
|
|
6673
|
+
| `iconClass` | `string` | 否 | 图标自定义类名 |
|
|
6674
|
+
| `tooltip` | `boolean \| string` | 否 | 提示词:`true` 用 `label` 作为提示;传字符串则直接作为提示词(无需同时配置 `label`)。 仅对纯图标操作项生效(配置了 `icon`)。 |
|
|
6675
|
+
| `disabled` | `boolean` | 否 | 禁用(点击无响应) |
|
|
6676
|
+
| `divided` | `boolean` | 否 | 与下一项之间显示分割线 |
|
|
6677
|
+
| `permission` | `string \| string[]` | 否 | 权限键(三段式,经 usePermission 校验) |
|
|
6678
|
+
| `visible` | `boolean \| ((...args: any[]) => boolean)` | 否 | 显隐控制:布尔值直接判定;函数接收 `visibleArgs`(末尾追加 action 自身)后判定。 与权限取交集:两者都通过才展示。 |
|
|
6679
|
+
| `handler` | `(...args: any[]) => void` | 否 | 点击处理(接收 actionArgs) |
|
|
6672
6680
|
|
|
6673
6681
|
#### `IComponent`
|
|
6674
6682
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useZlT as
|
|
3
|
-
import { isPlainObject as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { usePermission as
|
|
7
|
-
const
|
|
1
|
+
import { defineComponent as j, computed as g, resolveComponent as s, openBlock as n, createElementBlock as c, Fragment as m, renderList as w, createBlock as r, withCtx as i, createVNode as h, mergeProps as f, withModifiers as _, createCommentVNode as u, createElementVNode as E, toDisplayString as v, renderSlot as O, normalizeProps as S, createTextVNode as z, unref as T, normalizeClass as D } from "vue";
|
|
2
|
+
import { useZlT as F } from "@zl-ui-kit/composables";
|
|
3
|
+
import { isPlainObject as I } from "@zl-ui-kit/utils";
|
|
4
|
+
import A from "../ZlIcon/index.vue.mjs";
|
|
5
|
+
import P from "../ZlIconHover/index.vue.mjs";
|
|
6
|
+
import { usePermission as q } from "../ZlPermission/usePermission.mjs";
|
|
7
|
+
const G = { class: "zl-action-list" }, H = {
|
|
8
8
|
key: 2,
|
|
9
9
|
class: "zl-action-list__separator"
|
|
10
|
-
},
|
|
10
|
+
}, X = /* @__PURE__ */ j({
|
|
11
11
|
name: "ZlActionList",
|
|
12
12
|
__name: "List",
|
|
13
13
|
props: {
|
|
@@ -19,19 +19,19 @@ const q = { class: "zl-action-list" }, G = {
|
|
|
19
19
|
separator: { type: Boolean }
|
|
20
20
|
},
|
|
21
21
|
emits: ["action"],
|
|
22
|
-
setup(b, { emit:
|
|
23
|
-
const { t:
|
|
22
|
+
setup(b, { emit: M }) {
|
|
23
|
+
const { t: B } = F(), t = b, N = M, k = g(() => {
|
|
24
24
|
if (t.iconMore === !0)
|
|
25
|
-
return { icon: "zl:
|
|
26
|
-
if (
|
|
27
|
-
return { icon: "zl:
|
|
25
|
+
return { icon: "zl:password-color" };
|
|
26
|
+
if (I(t.iconMore))
|
|
27
|
+
return { icon: "zl:password-color", ...t.iconMore };
|
|
28
28
|
});
|
|
29
|
-
function
|
|
30
|
-
return o.permission ?
|
|
29
|
+
function V(o) {
|
|
30
|
+
return o.permission ? q(o.permission).value : !0;
|
|
31
31
|
}
|
|
32
|
-
const
|
|
32
|
+
const a = g(() => {
|
|
33
33
|
const o = t.actions.filter((l) => {
|
|
34
|
-
const d =
|
|
34
|
+
const d = V(l);
|
|
35
35
|
return typeof l.visible == "function" ? l.visible(...t.visibleArgs, l) && d : (l.visible === void 0 || !!l.visible) && d;
|
|
36
36
|
});
|
|
37
37
|
return o.length <= t.listCount ? { list: o, more: [] } : {
|
|
@@ -39,69 +39,72 @@ const q = { class: "zl-action-list" }, G = {
|
|
|
39
39
|
more: o.slice(t.listCount - 1)
|
|
40
40
|
};
|
|
41
41
|
});
|
|
42
|
-
function
|
|
43
|
-
o.disabled || (
|
|
42
|
+
function p(o) {
|
|
43
|
+
o.disabled || (N("action", o, ...t.actionArgs), typeof o.handler == "function" && o.handler(...t.actionArgs, o));
|
|
44
|
+
}
|
|
45
|
+
function y(o) {
|
|
46
|
+
return typeof o.tooltip == "string" ? o.tooltip : o.label;
|
|
44
47
|
}
|
|
45
48
|
return (o, l) => {
|
|
46
|
-
const d = s("el-tooltip"),
|
|
47
|
-
return n(), c("div",
|
|
48
|
-
(n(!0), c(
|
|
49
|
+
const d = s("el-tooltip"), C = s("el-link"), $ = s("el-dropdown-item"), x = s("el-dropdown-menu"), L = s("el-dropdown");
|
|
50
|
+
return n(), c("div", G, [
|
|
51
|
+
(n(!0), c(m, null, w(a.value.list, (e) => (n(), c(m, {
|
|
49
52
|
key: e.label
|
|
50
53
|
}, [
|
|
51
|
-
e.tooltip && e.icon ? (n(), r(d, {
|
|
54
|
+
e.tooltip && e.icon && y(e) ? (n(), r(d, {
|
|
52
55
|
key: 0,
|
|
53
|
-
content: e
|
|
56
|
+
content: y(e),
|
|
54
57
|
placement: "top"
|
|
55
58
|
}, {
|
|
56
59
|
default: i(() => [
|
|
57
|
-
h(
|
|
60
|
+
h(P, f({
|
|
58
61
|
icon: e.icon
|
|
59
62
|
}, { ref_for: !0 }, e.iconProps, {
|
|
60
|
-
onClick: _((
|
|
63
|
+
onClick: _((Z) => p(e), ["stop"])
|
|
61
64
|
}), null, 16, ["icon", "onClick"])
|
|
62
65
|
]),
|
|
63
66
|
_: 2
|
|
64
|
-
}, 1032, ["content"])) : (n(), r(
|
|
67
|
+
}, 1032, ["content"])) : (n(), r(C, {
|
|
65
68
|
key: 1,
|
|
66
69
|
class: "zl-action-list__action",
|
|
67
70
|
type: "primary",
|
|
68
71
|
underline: !1,
|
|
69
72
|
disabled: e.disabled,
|
|
70
|
-
onClick: _((
|
|
73
|
+
onClick: _((Z) => p(e), ["stop"])
|
|
71
74
|
}, {
|
|
72
75
|
default: i(() => [
|
|
73
|
-
e.icon ? (n(), r(
|
|
76
|
+
e.icon ? (n(), r(A, f({
|
|
74
77
|
key: 0,
|
|
75
78
|
icon: e.icon
|
|
76
|
-
}, { ref_for: !0 }, e.iconProps), null, 16, ["icon"])) :
|
|
77
|
-
|
|
79
|
+
}, { ref_for: !0 }, e.iconProps), null, 16, ["icon"])) : u("", !0),
|
|
80
|
+
E("span", null, v(e.label), 1)
|
|
78
81
|
]),
|
|
79
82
|
_: 2
|
|
80
83
|
}, 1032, ["disabled", "onClick"])),
|
|
81
|
-
b.separator ? (n(), c("div",
|
|
84
|
+
b.separator ? (n(), c("div", H)) : u("", !0)
|
|
82
85
|
], 64))), 128)),
|
|
83
|
-
|
|
86
|
+
a.value.more.length ? (n(), r(L, {
|
|
84
87
|
key: 0,
|
|
85
88
|
trigger: "hover",
|
|
86
89
|
placement: "bottom-end",
|
|
87
90
|
class: "zl-action-list__more",
|
|
88
|
-
onCommand:
|
|
91
|
+
onCommand: p
|
|
89
92
|
}, {
|
|
90
93
|
dropdown: i(() => [
|
|
91
|
-
h(
|
|
94
|
+
h(x, null, {
|
|
92
95
|
default: i(() => [
|
|
93
|
-
(n(!0), c(
|
|
96
|
+
(n(!0), c(m, null, w(a.value.more, (e) => (n(), r($, {
|
|
94
97
|
key: e.label,
|
|
95
98
|
command: e,
|
|
96
99
|
disabled: e.disabled,
|
|
97
100
|
divided: e.divided
|
|
98
101
|
}, {
|
|
99
102
|
default: i(() => [
|
|
100
|
-
e.icon ? (n(), r(
|
|
103
|
+
e.icon ? (n(), r(A, {
|
|
101
104
|
key: 0,
|
|
102
105
|
icon: e.icon,
|
|
103
|
-
class:
|
|
104
|
-
}, null, 8, ["icon", "class"])) :
|
|
106
|
+
class: D(e.iconClass)
|
|
107
|
+
}, null, 8, ["icon", "class"])) : u("", !0),
|
|
105
108
|
z(" " + v(e.label), 1)
|
|
106
109
|
]),
|
|
107
110
|
_: 2
|
|
@@ -111,8 +114,8 @@ const q = { class: "zl-action-list" }, G = {
|
|
|
111
114
|
})
|
|
112
115
|
]),
|
|
113
116
|
default: i(() => [
|
|
114
|
-
|
|
115
|
-
k.value ? (n(), r(
|
|
117
|
+
O(o.$slots, "more", {}, () => [
|
|
118
|
+
k.value ? (n(), r(P, S(f({ key: 0 }, k.value)), null, 16)) : (n(), r(C, {
|
|
116
119
|
key: 1,
|
|
117
120
|
class: "zl-action-list__more-icon",
|
|
118
121
|
type: "primary",
|
|
@@ -121,19 +124,19 @@ const q = { class: "zl-action-list" }, G = {
|
|
|
121
124
|
}, ["stop"]))
|
|
122
125
|
}, {
|
|
123
126
|
default: i(() => [
|
|
124
|
-
z(v(
|
|
127
|
+
z(v(T(B)("zl.action.more", "更多")), 1)
|
|
125
128
|
]),
|
|
126
129
|
_: 1
|
|
127
130
|
}))
|
|
128
131
|
])
|
|
129
132
|
]),
|
|
130
133
|
_: 3
|
|
131
|
-
})) :
|
|
134
|
+
})) : u("", !0)
|
|
132
135
|
]);
|
|
133
136
|
};
|
|
134
137
|
}
|
|
135
138
|
});
|
|
136
139
|
export {
|
|
137
|
-
|
|
140
|
+
X as default
|
|
138
141
|
};
|
|
139
142
|
//# sourceMappingURL=List.vue.mjs.map
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 直接展示的操作数,超出收入"更多"下拉,默认 2;透传给 ZlActionList */
|
|
3
|
+
listCount?: number;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
6
|
+
listCount: number;
|
|
7
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
2
8
|
export default _default;
|
|
3
9
|
//# sourceMappingURL=index.vue.d.ts.map
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { defineComponent as r, resolveComponent as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as r, resolveComponent as c, openBlock as s, createBlock as i, normalizeProps as p, guardReactiveProps as a, withCtx as l, createVNode as m } from "vue";
|
|
2
|
+
import _ from "./List.vue.mjs";
|
|
3
3
|
import './List.css';/* empty css */
|
|
4
4
|
const h = /* @__PURE__ */ r({
|
|
5
5
|
name: "ZlAction",
|
|
6
6
|
__name: "index",
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
props: {
|
|
8
|
+
listCount: { default: 2 }
|
|
9
|
+
},
|
|
10
|
+
setup(o) {
|
|
11
|
+
const e = o;
|
|
12
|
+
return (t, u) => {
|
|
13
|
+
const n = c("zl-icon-hover");
|
|
14
|
+
return s(), i(_, p(a({ ...t.$attrs, listCount: e.listCount })), {
|
|
15
|
+
more: l(() => [
|
|
16
|
+
m(n, { icon: "zl:password-color" })
|
|
13
17
|
]),
|
|
14
18
|
_: 1
|
|
15
19
|
}, 16);
|
|
@@ -10,8 +10,11 @@ export interface ActionItem {
|
|
|
10
10
|
iconProps?: Record<string, any>;
|
|
11
11
|
/** 图标自定义类名 */
|
|
12
12
|
iconClass?: string;
|
|
13
|
-
/**
|
|
14
|
-
|
|
13
|
+
/**
|
|
14
|
+
* 提示词:`true` 用 `label` 作为提示;传字符串则直接作为提示词(无需同时配置 `label`)。
|
|
15
|
+
* 仅对纯图标操作项生效(配置了 `icon`)。
|
|
16
|
+
*/
|
|
17
|
+
tooltip?: boolean | string;
|
|
15
18
|
/** 禁用(点击无响应) */
|
|
16
19
|
disabled?: boolean;
|
|
17
20
|
/** 与下一项之间显示分割线 */
|
|
@@ -35,8 +35,14 @@ type __VLS_Props = {
|
|
|
35
35
|
* @deprecated 用 `iconVisible`:全库显隐统一用 visible 语义,且不要用反向命名
|
|
36
36
|
*/
|
|
37
37
|
hideIcon?: boolean;
|
|
38
|
+
/** 是否使用填充背景(配合字典项 `color`/`type` 显示浅色底色,如 `--zl-<色>-1`),透传给内部 ZlTag */
|
|
39
|
+
fill?: boolean;
|
|
40
|
+
/** 是否使用全圆角样式,透传给内部 ZlTag */
|
|
41
|
+
rounded?: boolean;
|
|
38
42
|
};
|
|
39
43
|
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
44
|
+
fill: boolean;
|
|
45
|
+
rounded: boolean;
|
|
40
46
|
variant: "badge" | "ribbon";
|
|
41
47
|
corner: boolean | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
42
48
|
iconVisible: boolean;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as g, watch as
|
|
2
|
-
import { useDict as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as g, watch as B, computed as n, openBlock as c, createBlock as d, mergeProps as u, withCtx as s, createTextVNode as f, toDisplayString as v } from "vue";
|
|
2
|
+
import { useDict as h, useDictStore as b } from "@zl-ui-kit/composables";
|
|
3
|
+
import S from "../ZlTag/ZlCornerTag.vue.mjs";
|
|
4
4
|
import '../ZlTag/index.css';import '../ZlTag/ZlCornerTag.css';/* empty css */
|
|
5
|
-
import
|
|
5
|
+
import k from "../ZlTag/index.vue.mjs";
|
|
6
6
|
/* empty css */
|
|
7
|
-
const
|
|
7
|
+
const K = /* @__PURE__ */ g({
|
|
8
8
|
name: "ZlDictTag",
|
|
9
9
|
__name: "index",
|
|
10
10
|
props: {
|
|
@@ -15,56 +15,61 @@ const I = /* @__PURE__ */ g({
|
|
|
15
15
|
value: {},
|
|
16
16
|
simple: { type: Boolean },
|
|
17
17
|
iconVisible: { type: Boolean, default: void 0 },
|
|
18
|
-
hideIcon: { type: Boolean, default: void 0 }
|
|
18
|
+
hideIcon: { type: Boolean, default: void 0 },
|
|
19
|
+
fill: { type: Boolean, default: !1 },
|
|
20
|
+
rounded: { type: Boolean, default: !1 }
|
|
19
21
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const t =
|
|
22
|
-
|
|
22
|
+
setup(a) {
|
|
23
|
+
const t = a, p = h(t.dictKey, { data: t.dict });
|
|
24
|
+
B(
|
|
23
25
|
() => t.dict,
|
|
24
26
|
(e) => {
|
|
25
27
|
if (e?.length) {
|
|
26
|
-
const { dictStore: o } =
|
|
28
|
+
const { dictStore: o } = b();
|
|
27
29
|
o.value = { ...o.value, [t.dictKey]: e };
|
|
28
30
|
}
|
|
29
31
|
},
|
|
30
32
|
{ deep: !1 }
|
|
31
33
|
);
|
|
32
|
-
const
|
|
34
|
+
const i = n(() => p.value.find((e) => e.value === t.value)), m = { info: "gray" };
|
|
33
35
|
function y(e) {
|
|
34
36
|
const o = e.color ?? e.type;
|
|
35
37
|
if (o)
|
|
36
38
|
return m[o] ?? o;
|
|
37
39
|
}
|
|
38
|
-
const
|
|
39
|
-
const e =
|
|
40
|
+
const l = n(() => {
|
|
41
|
+
const e = i.value;
|
|
40
42
|
return e ? {
|
|
41
43
|
color: t.simple ? void 0 : y(e),
|
|
42
44
|
icon: t.iconVisible ?? !t.hideIcon ? e.icon : void 0
|
|
43
45
|
} : {};
|
|
44
|
-
}),
|
|
45
|
-
return (e, o) =>
|
|
46
|
+
}), r = n(() => t.corner === !0 ? "top-right" : t.corner);
|
|
47
|
+
return (e, o) => r.value ? (c(), d(S, u({
|
|
46
48
|
key: 0,
|
|
47
49
|
class: "zl-dict-corner-tag"
|
|
48
|
-
}, { ...
|
|
49
|
-
position:
|
|
50
|
-
variant:
|
|
50
|
+
}, { ...l.value, ...e.$attrs }, {
|
|
51
|
+
position: r.value,
|
|
52
|
+
variant: a.variant
|
|
51
53
|
}), {
|
|
52
|
-
default:
|
|
53
|
-
v(
|
|
54
|
+
default: s(() => [
|
|
55
|
+
f(v(i.value?.label || a.value), 1)
|
|
54
56
|
]),
|
|
55
57
|
_: 1
|
|
56
|
-
}, 16, ["position", "variant"])) : (
|
|
58
|
+
}, 16, ["position", "variant"])) : (c(), d(k, u({
|
|
57
59
|
key: 1,
|
|
58
60
|
class: "zl-dict-tag"
|
|
59
|
-
}, { ...
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
}, { ...l.value, ...e.$attrs }, {
|
|
62
|
+
fill: a.fill,
|
|
63
|
+
rounded: a.rounded
|
|
64
|
+
}), {
|
|
65
|
+
default: s(() => [
|
|
66
|
+
f(v(i.value?.label || a.value), 1)
|
|
62
67
|
]),
|
|
63
68
|
_: 1
|
|
64
|
-
}, 16));
|
|
69
|
+
}, 16, ["fill", "rounded"]));
|
|
65
70
|
}
|
|
66
71
|
});
|
|
67
72
|
export {
|
|
68
|
-
|
|
73
|
+
K as default
|
|
69
74
|
};
|
|
70
75
|
//# sourceMappingURL=index.vue.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zl-ui-kit/components",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "ZL UI 业务组件库(Element Plus 体系,Zl 前缀)——首批:Icon/AutoTooltip/Tag/CornerTag/Text/Title/Copy/Empty/Pagination/DictTag",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"file-type": "^20.4.1",
|
|
40
40
|
"dt-sql-parser": "^4.3.1",
|
|
41
41
|
"sql-formatter": "^15.4.2",
|
|
42
|
-
"@zl-ui-kit/composables": "0.18.
|
|
43
|
-
"@zl-ui-kit/icons": "0.18.
|
|
44
|
-
"@zl-ui-kit/utils": "0.18.
|
|
42
|
+
"@zl-ui-kit/composables": "0.18.5",
|
|
43
|
+
"@zl-ui-kit/icons": "0.18.5",
|
|
44
|
+
"@zl-ui-kit/utils": "0.18.5"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@vueuse/core": "^12.3.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"@vue-office/pdf": "^2.0.10",
|
|
99
99
|
"@vue-office/pptx": "1.0.1",
|
|
100
100
|
"echarts": "^5.6.0",
|
|
101
|
-
"@jichuang/eslint-config": "1.0.0",
|
|
102
101
|
"@jichuang/tsconfig": "1.0.0",
|
|
103
102
|
"@jichuang/vite-config": "1.0.0",
|
|
104
|
-
"@zl-ui-kit/theme": "0.18.
|
|
103
|
+
"@zl-ui-kit/theme": "0.18.5",
|
|
104
|
+
"@jichuang/eslint-config": "1.0.0"
|
|
105
105
|
},
|
|
106
106
|
"repository": {
|
|
107
107
|
"type": "git",
|