ll-plus 2.7.21 → 2.7.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.
- package/es/components/dropdown-button-simple/index.d.ts +3 -1
- package/es/components/dropdown-button-simple/src/dropdown-button-simple.d.ts +1 -13
- package/es/components/dropdown-button-simple/src/dropdown-button-simple.vue.d.ts +3 -1
- package/es/components/input-number/index.d.ts +1 -1
- package/es/components/input-number/src/input-number.vue.d.ts +1 -1
- package/es/components/number-range/index.d.ts +1 -1
- package/es/components/number-range/src/number-range.vue.d.ts +1 -1
- package/es/packages/components/dropdown-button-simple/src/dropdown-button-simple.mjs.map +1 -1
- package/es/packages/components/dropdown-button-simple/src/dropdown-button-simple.vue2.mjs +12 -8
- package/es/packages/components/dropdown-button-simple/src/dropdown-button-simple.vue2.mjs.map +1 -1
- package/es/packages/components/input-number/src/input-number.vue2.mjs +2 -2
- package/es/packages/components/input-number/src/input-number.vue2.mjs.map +1 -1
- package/es/packages/components/operate-tree/src/operate-tree.vue2.mjs +3 -1
- package/es/packages/components/operate-tree/src/operate-tree.vue2.mjs.map +1 -1
- package/es/utils/props/runtime.d.ts +2 -2
- package/index.full.js +17 -11
- package/index.full.min.js +2 -2
- package/index.full.min.js.map +1 -1
- package/index.full.min.mjs +2 -2
- package/index.full.min.mjs.map +1 -1
- package/index.full.mjs +17 -11
- package/lib/components/dropdown-button-simple/index.d.ts +3 -1
- package/lib/components/dropdown-button-simple/src/dropdown-button-simple.d.ts +1 -13
- package/lib/components/dropdown-button-simple/src/dropdown-button-simple.vue.d.ts +3 -1
- package/lib/components/input-number/index.d.ts +1 -1
- package/lib/components/input-number/src/input-number.vue.d.ts +1 -1
- package/lib/components/number-range/index.d.ts +1 -1
- package/lib/components/number-range/src/number-range.vue.d.ts +1 -1
- package/lib/packages/components/dropdown-button-simple/src/dropdown-button-simple.js.map +1 -1
- package/lib/packages/components/dropdown-button-simple/src/dropdown-button-simple.vue2.js +12 -8
- package/lib/packages/components/dropdown-button-simple/src/dropdown-button-simple.vue2.js.map +1 -1
- package/lib/packages/components/input-number/src/input-number.vue2.js +2 -2
- package/lib/packages/components/input-number/src/input-number.vue2.js.map +1 -1
- package/lib/packages/components/operate-tree/src/operate-tree.vue2.js +3 -1
- package/lib/packages/components/operate-tree/src/operate-tree.vue2.js.map +1 -1
- package/lib/utils/props/runtime.d.ts +2 -2
- package/package.json +1 -1
- package/theme-chalk/css/advanced-filtering.css +1 -1
- package/theme-chalk/css/index.css +2 -2
- package/theme-chalk/css/key-value.css +1 -1
- package/theme-chalk/css/table.css +1 -1
- package/theme-chalk/fonts/iconfont.js +1 -1
- package/theme-chalk/fonts/iconfont.json +25 -18
- package/types/packages/components/dropdown-button-simple/index.d.ts +3 -1
- package/types/packages/components/dropdown-button-simple/src/dropdown-button-simple.d.ts +1 -13
- package/types/packages/components/dropdown-button-simple/src/dropdown-button-simple.vue.d.ts +3 -1
- package/types/packages/components/input-number/index.d.ts +1 -1
- package/types/packages/components/input-number/src/input-number.vue.d.ts +1 -1
- package/types/packages/components/number-range/index.d.ts +1 -1
- package/types/packages/components/number-range/src/number-range.vue.d.ts +1 -1
- package/types/packages/utils/props/runtime.d.ts +2 -2
package/index.full.mjs
CHANGED
|
@@ -52987,7 +52987,7 @@ var _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
52987
52987
|
const bem = createNamespace("dropdown-button-simple");
|
|
52988
52988
|
const props = __props;
|
|
52989
52989
|
const emits = __emit;
|
|
52990
|
-
const
|
|
52990
|
+
const dropdownOpen = ref(false);
|
|
52991
52991
|
const computedButtonProps = computed(() => ({
|
|
52992
52992
|
...defaultButtonProps,
|
|
52993
52993
|
...props.buttonProps
|
|
@@ -52995,21 +52995,25 @@ var _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
52995
52995
|
const handleMenuItemClick = (item) => {
|
|
52996
52996
|
emits("clickItem", item);
|
|
52997
52997
|
};
|
|
52998
|
+
const handleDropdownOpenChange = (open) => {
|
|
52999
|
+
dropdownOpen.value = open;
|
|
53000
|
+
};
|
|
53001
|
+
const handleDropdownClick = () => {
|
|
53002
|
+
dropdownOpen.value = false;
|
|
53003
|
+
};
|
|
52998
53004
|
return (_ctx, _cache) => {
|
|
52999
53005
|
const _component_ll_icon = resolveComponent("ll-icon");
|
|
53000
53006
|
const _component_ll_button = resolveComponent("ll-button");
|
|
53001
53007
|
const _component_a_menu_item = resolveComponent("a-menu-item");
|
|
53002
53008
|
const _component_a_menu = resolveComponent("a-menu");
|
|
53003
53009
|
const _component_a_dropdown = resolveComponent("a-dropdown");
|
|
53004
|
-
return openBlock(), createBlock(_component_a_dropdown, mergeProps({
|
|
53005
|
-
open: open.value,
|
|
53006
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
|
|
53007
|
-
}, _ctx.dropDownProps, {
|
|
53010
|
+
return openBlock(), createBlock(_component_a_dropdown, mergeProps({ open: dropdownOpen.value }, _ctx.dropDownProps, {
|
|
53008
53011
|
disabled: _ctx.disabled,
|
|
53009
|
-
class: unref(bem).b()
|
|
53012
|
+
class: unref(bem).b(),
|
|
53013
|
+
onOpenChange: handleDropdownOpenChange
|
|
53010
53014
|
}), {
|
|
53011
53015
|
overlay: withCtx(() => [
|
|
53012
|
-
createVNode(_component_a_menu,
|
|
53016
|
+
createVNode(_component_a_menu, { onClick: handleDropdownClick }, {
|
|
53013
53017
|
default: withCtx(() => [
|
|
53014
53018
|
(openBlock(true), createElementBlock(
|
|
53015
53019
|
Fragment,
|
|
@@ -53090,7 +53094,7 @@ var _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
53090
53094
|
_ctx.showExpandType ? (openBlock(), createBlock(_component_ll_icon, {
|
|
53091
53095
|
key: 0,
|
|
53092
53096
|
class: normalizeClass(unref(bem).m("icon-right")),
|
|
53093
|
-
"icon-name": !
|
|
53097
|
+
"icon-name": !dropdownOpen.value ? "icon-line-arrow-down" : "icon-line-arrow-folding"
|
|
53094
53098
|
}, null, 8, ["class", "icon-name"])) : createCommentVNode("v-if", true)
|
|
53095
53099
|
],
|
|
53096
53100
|
2
|
|
@@ -70206,7 +70210,7 @@ var _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
70206
70210
|
const attrs = useAttrs();
|
|
70207
70211
|
const innerValue = ref("");
|
|
70208
70212
|
const inputRef = ref();
|
|
70209
|
-
const
|
|
70213
|
+
const integerConfig = computed(() => {
|
|
70210
70214
|
let obj = {};
|
|
70211
70215
|
if (props.integer) {
|
|
70212
70216
|
obj = integerDict[props.integer];
|
|
@@ -70216,7 +70220,7 @@ var _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
70216
70220
|
const getBindValue = computed(() => {
|
|
70217
70221
|
const bindValue = {
|
|
70218
70222
|
...attrs,
|
|
70219
|
-
...
|
|
70223
|
+
...integerConfig.value
|
|
70220
70224
|
};
|
|
70221
70225
|
if (props.thousands) {
|
|
70222
70226
|
bindValue.formatter = (value) => thousandsFormat(value);
|
|
@@ -74460,6 +74464,7 @@ var _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
74460
74464
|
const props = __props;
|
|
74461
74465
|
const emits = __emit;
|
|
74462
74466
|
const attrs = useAttrs();
|
|
74467
|
+
console.log({ attrs });
|
|
74463
74468
|
const newExpandedKeys = ref([]);
|
|
74464
74469
|
const hoverTreeNodeItem = ref();
|
|
74465
74470
|
const bem = createNamespace("operate-tree");
|
|
@@ -74481,7 +74486,8 @@ var _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
74481
74486
|
}
|
|
74482
74487
|
},
|
|
74483
74488
|
{
|
|
74484
|
-
deep: true
|
|
74489
|
+
deep: true,
|
|
74490
|
+
immediate: true
|
|
74485
74491
|
}
|
|
74486
74492
|
);
|
|
74487
74493
|
return (_ctx, _cache) => {
|
|
@@ -1344,7 +1344,7 @@ export declare const LlDropdownButtonSimple: import("ll-plus/es/utils").SFCWithI
|
|
|
1344
1344
|
readonly onClickItem?: ((item: import("./src/dropdown-button-simple").DropdownItemProps) => any) | undefined;
|
|
1345
1345
|
} & {}>;
|
|
1346
1346
|
emits: (event: "clickItem", item: import("./src/dropdown-button-simple").DropdownItemProps) => void;
|
|
1347
|
-
|
|
1347
|
+
dropdownOpen: import("vue").Ref<boolean>;
|
|
1348
1348
|
computedButtonProps: import("vue").ComputedRef<{
|
|
1349
1349
|
label: string;
|
|
1350
1350
|
position?: string | undefined;
|
|
@@ -1368,6 +1368,8 @@ export declare const LlDropdownButtonSimple: import("ll-plus/es/utils").SFCWithI
|
|
|
1368
1368
|
block?: boolean | undefined;
|
|
1369
1369
|
}>;
|
|
1370
1370
|
handleMenuItemClick: (item: import("./src/dropdown-button-simple").DropdownItemProps) => void;
|
|
1371
|
+
handleDropdownOpenChange: (open: boolean) => void;
|
|
1372
|
+
handleDropdownClick: () => void;
|
|
1371
1373
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1372
1374
|
readonly clickItem: (item: import("./src/dropdown-button-simple").DropdownItemProps) => boolean;
|
|
1373
1375
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -5,7 +5,7 @@ export interface DropdownItemProps {
|
|
|
5
5
|
iconProps?: IconProps;
|
|
6
6
|
label?: string;
|
|
7
7
|
disabled?: boolean;
|
|
8
|
-
key?: string;
|
|
8
|
+
key?: string | number;
|
|
9
9
|
}
|
|
10
10
|
export declare const defaultButtonProps: {
|
|
11
11
|
label: string;
|
|
@@ -54,9 +54,6 @@ export declare const dropdownButtonSimpleProps: {
|
|
|
54
54
|
default: any;
|
|
55
55
|
};
|
|
56
56
|
danger: {
|
|
57
|
-
/**
|
|
58
|
-
* 总体的启禁用
|
|
59
|
-
*/
|
|
60
57
|
type: BooleanConstructor;
|
|
61
58
|
default: any;
|
|
62
59
|
};
|
|
@@ -112,9 +109,6 @@ export declare const dropdownButtonSimpleProps: {
|
|
|
112
109
|
default: any;
|
|
113
110
|
};
|
|
114
111
|
danger: {
|
|
115
|
-
/**
|
|
116
|
-
* 总体的启禁用
|
|
117
|
-
*/
|
|
118
112
|
type: BooleanConstructor;
|
|
119
113
|
default: any;
|
|
120
114
|
};
|
|
@@ -170,9 +164,6 @@ export declare const dropdownButtonSimpleProps: {
|
|
|
170
164
|
default: any;
|
|
171
165
|
};
|
|
172
166
|
danger: {
|
|
173
|
-
/**
|
|
174
|
-
* 总体的启禁用
|
|
175
|
-
*/
|
|
176
167
|
type: BooleanConstructor;
|
|
177
168
|
default: any;
|
|
178
169
|
};
|
|
@@ -228,9 +219,6 @@ export declare const dropdownButtonSimpleProps: {
|
|
|
228
219
|
default: any;
|
|
229
220
|
};
|
|
230
221
|
danger: {
|
|
231
|
-
/**
|
|
232
|
-
* 总体的启禁用
|
|
233
|
-
*/
|
|
234
222
|
type: BooleanConstructor;
|
|
235
223
|
default: any;
|
|
236
224
|
};
|
|
@@ -1344,7 +1344,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1344
1344
|
readonly onClickItem?: ((item: DropdownItemProps) => any) | undefined;
|
|
1345
1345
|
} & {}>;
|
|
1346
1346
|
emits: (event: "clickItem", item: DropdownItemProps) => void;
|
|
1347
|
-
|
|
1347
|
+
dropdownOpen: import("vue").Ref<boolean>;
|
|
1348
1348
|
computedButtonProps: import("vue").ComputedRef<{
|
|
1349
1349
|
label: string;
|
|
1350
1350
|
position?: string | undefined;
|
|
@@ -1368,6 +1368,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1368
1368
|
block?: boolean | undefined;
|
|
1369
1369
|
}>;
|
|
1370
1370
|
handleMenuItemClick: (item: DropdownItemProps) => void;
|
|
1371
|
+
handleDropdownOpenChange: (open: boolean) => void;
|
|
1372
|
+
handleDropdownClick: () => void;
|
|
1371
1373
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1372
1374
|
readonly clickItem: (item: DropdownItemProps) => boolean;
|
|
1373
1375
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -31,7 +31,7 @@ export declare const LlInputNumber: import("ll-plus/es/utils").SFCWithInstall<im
|
|
|
31
31
|
};
|
|
32
32
|
innerValue: import("vue").Ref<string>;
|
|
33
33
|
inputRef: import("vue").Ref<any>;
|
|
34
|
-
|
|
34
|
+
integerConfig: import("vue").ComputedRef<import("./src/config").Integer>;
|
|
35
35
|
getBindValue: import("vue").ComputedRef<Partial<import("vue").ExtractPropTypes<{
|
|
36
36
|
size: {
|
|
37
37
|
type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
|
|
@@ -32,7 +32,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
32
32
|
};
|
|
33
33
|
innerValue: import("vue").Ref<string>;
|
|
34
34
|
inputRef: import("vue").Ref<any>;
|
|
35
|
-
|
|
35
|
+
integerConfig: import("vue").ComputedRef<Integer>;
|
|
36
36
|
getBindValue: import("vue").ComputedRef<Partial<import("vue").ExtractPropTypes<{
|
|
37
37
|
size: {
|
|
38
38
|
type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
|
|
@@ -72,7 +72,7 @@ export declare const LlNumberRange: import("ll-plus/es/utils").SFCWithInstall<im
|
|
|
72
72
|
};
|
|
73
73
|
innerValue: import("vue").Ref<string>;
|
|
74
74
|
inputRef: import("vue").Ref<any>;
|
|
75
|
-
|
|
75
|
+
integerConfig: import("vue").ComputedRef<import("../input-number/src/config").Integer>;
|
|
76
76
|
getBindValue: import("vue").ComputedRef<Partial<import("vue").ExtractPropTypes<{
|
|
77
77
|
size: {
|
|
78
78
|
type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
|
|
@@ -71,7 +71,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
71
71
|
};
|
|
72
72
|
innerValue: import("vue").Ref<string>;
|
|
73
73
|
inputRef: import("vue").Ref<any>;
|
|
74
|
-
|
|
74
|
+
integerConfig: import("vue").ComputedRef<import("../../input-number/src/config").Integer>;
|
|
75
75
|
getBindValue: import("vue").ComputedRef<Partial<import("vue").ExtractPropTypes<{
|
|
76
76
|
size: {
|
|
77
77
|
type: import("vue").PropType<import("ant-design-vue/es/button").ButtonSize>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-button-simple.js","sources":["../../../../../../packages/components/dropdown-button-simple/src/dropdown-button-simple.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type DropdownButtonSimple from './dropdown-button-simple.vue'\nimport type { IconProps, ButtonProps } from '@ll-plus/components'\nimport {\n type ButtonProps as AButtonProps,\n type DropdownProps\n} from 'ant-design-vue'\n\nexport interface DropdownItemProps {\n iconProps?: IconProps\n label?: string\n disabled?: boolean\n key?: string\n}\n\nexport const defaultButtonProps = {\n label: '新增',\n type: 'primary'\n}\n\nexport const dropdownButtonSimpleProps = buildProps({\n /**\n * 按钮相关配置\n */\n buttonProps: {\n type: definePropType<ButtonProps & AButtonProps>(Object),\n default: () => ({})\n },\n /**\n * 按钮Icon配置\n */\n iconProps: {\n type: definePropType<IconProps>(Object),\n default: () => ({\n iconName: 'icon-add',\n color: '#fff'\n })\n },\n /**\n * 下拉菜单相关配置\n */\n dropDownProps: {\n type: definePropType<DropdownProps>(Object),\n default: () => ({\n trigger: 'click'\n })\n },\n /**\n * 下拉菜单项\n */\n dropdownItems: {\n type: definePropType<DropdownItemProps[]>(Array),\n default: () => []\n },\n /**\n * 是否显示展开状态\n */\n showExpandType: {\n type: Boolean,\n default: true\n },\n /**\n * 总体的启禁用\n */\n disabled: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const dropdownButtonSimpleEmits = {\n clickItem: (item: DropdownItemProps) => !!item\n} as const\n\n// props\nexport type DropdownButtonSimpleProps = ExtractPropTypes<\n typeof dropdownButtonSimpleProps\n>\n\n// emits\nexport type DropdownButtonSimpleEmits = typeof dropdownButtonSimpleEmits\n\n// instance\nexport type DropdownButtonSimpleInstance = InstanceType<\n typeof DropdownButtonSimple\n>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;AAiBO,MAAM,kBAAqB,GAAA;AAAA,EAChC,KAAO,EAAA,cAAA;AAAA,EACP,IAAM,EAAA,SAAA;AACR,EAAA;AAEO,MAAM,4BAA4BA,kBAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAIlD,WAAa,EAAA;AAAA,IACX,IAAA,EAAMC,uBAA2C,MAAM,CAAA;AAAA,IACvD,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA;AAAA;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAA,EAAMA,uBAA0B,MAAM,CAAA;AAAA,IACtC,SAAS,OAAO;AAAA,MACd,QAAU,EAAA,UAAA;AAAA,MACV,KAAO,EAAA,MAAA;AAAA,KACT,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAA,EAAMA,uBAA8B,MAAM,CAAA;AAAA,IAC1C,SAAS,OAAO;AAAA,MACd,OAAS,EAAA,OAAA;AAAA,KACX,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAA,EAAMA,uBAAoC,KAAK,CAAA;AAAA,IAC/C,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA,EAIA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAEH,MAAM,yBAA4B,GAAA;AAAA,EACvC,SAAW,EAAA,CAAC,IAA4B,KAAA,CAAC,CAAC,IAAA;AAC5C;;;;;;"}
|
|
1
|
+
{"version":3,"file":"dropdown-button-simple.js","sources":["../../../../../../packages/components/dropdown-button-simple/src/dropdown-button-simple.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type DropdownButtonSimple from './dropdown-button-simple.vue'\nimport type { IconProps, ButtonProps } from '@ll-plus/components'\nimport {\n type ButtonProps as AButtonProps,\n type DropdownProps\n} from 'ant-design-vue'\n\nexport interface DropdownItemProps {\n iconProps?: IconProps\n label?: string\n disabled?: boolean\n key?: string | number\n}\n\nexport const defaultButtonProps = {\n label: '新增',\n type: 'primary'\n}\n\nexport const dropdownButtonSimpleProps = buildProps({\n /**\n * 按钮相关配置\n */\n buttonProps: {\n type: definePropType<ButtonProps & AButtonProps>(Object),\n default: () => ({})\n },\n /**\n * 按钮Icon配置\n */\n iconProps: {\n type: definePropType<IconProps>(Object),\n default: () => ({\n iconName: 'icon-add',\n color: '#fff'\n })\n },\n /**\n * 下拉菜单相关配置\n */\n dropDownProps: {\n type: definePropType<DropdownProps>(Object),\n default: () => ({\n trigger: 'click'\n })\n },\n /**\n * 下拉菜单项\n */\n dropdownItems: {\n type: definePropType<DropdownItemProps[]>(Array),\n default: () => []\n },\n /**\n * 是否显示展开状态\n */\n showExpandType: {\n type: Boolean,\n default: true\n },\n /**\n * 总体的启禁用\n */\n disabled: {\n type: Boolean,\n default: false\n }\n} as const)\n\nexport const dropdownButtonSimpleEmits = {\n clickItem: (item: DropdownItemProps) => !!item\n} as const\n\n// props\nexport type DropdownButtonSimpleProps = ExtractPropTypes<\n typeof dropdownButtonSimpleProps\n>\n\n// emits\nexport type DropdownButtonSimpleEmits = typeof dropdownButtonSimpleEmits\n\n// instance\nexport type DropdownButtonSimpleInstance = InstanceType<\n typeof DropdownButtonSimple\n>\n"],"names":["buildProps","definePropType"],"mappings":";;;;;;AAiBO,MAAM,kBAAqB,GAAA;AAAA,EAChC,KAAO,EAAA,cAAA;AAAA,EACP,IAAM,EAAA,SAAA;AACR,EAAA;AAEO,MAAM,4BAA4BA,kBAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAIlD,WAAa,EAAA;AAAA,IACX,IAAA,EAAMC,uBAA2C,MAAM,CAAA;AAAA,IACvD,OAAA,EAAS,OAAO,EAAC,CAAA;AAAA,GACnB;AAAA;AAAA;AAAA;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAA,EAAMA,uBAA0B,MAAM,CAAA;AAAA,IACtC,SAAS,OAAO;AAAA,MACd,QAAU,EAAA,UAAA;AAAA,MACV,KAAO,EAAA,MAAA;AAAA,KACT,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAA,EAAMA,uBAA8B,MAAM,CAAA;AAAA,IAC1C,SAAS,OAAO;AAAA,MACd,OAAS,EAAA,OAAA;AAAA,KACX,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA,EAIA,aAAe,EAAA;AAAA,IACb,IAAA,EAAMA,uBAAoC,KAAK,CAAA;AAAA,IAC/C,OAAA,EAAS,MAAM,EAAC;AAAA,GAClB;AAAA;AAAA;AAAA;AAAA,EAIA,cAAgB,EAAA;AAAA,IACd,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AACF,CAAU,EAAA;AAEH,MAAM,yBAA4B,GAAA;AAAA,EACvC,SAAW,EAAA,CAAC,IAA4B,KAAA,CAAC,CAAC,IAAA;AAC5C;;;;;;"}
|
|
@@ -17,7 +17,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
17
17
|
const bem = createNamespace.createNamespace("dropdown-button-simple");
|
|
18
18
|
const props = __props;
|
|
19
19
|
const emits = __emit;
|
|
20
|
-
const
|
|
20
|
+
const dropdownOpen = vue.ref(false);
|
|
21
21
|
const computedButtonProps = vue.computed(() => ({
|
|
22
22
|
...dropdownButtonSimple.defaultButtonProps,
|
|
23
23
|
...props.buttonProps
|
|
@@ -25,21 +25,25 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
25
25
|
const handleMenuItemClick = (item) => {
|
|
26
26
|
emits("clickItem", item);
|
|
27
27
|
};
|
|
28
|
+
const handleDropdownOpenChange = (open) => {
|
|
29
|
+
dropdownOpen.value = open;
|
|
30
|
+
};
|
|
31
|
+
const handleDropdownClick = () => {
|
|
32
|
+
dropdownOpen.value = false;
|
|
33
|
+
};
|
|
28
34
|
return (_ctx, _cache) => {
|
|
29
35
|
const _component_ll_icon = vue.resolveComponent("ll-icon");
|
|
30
36
|
const _component_ll_button = vue.resolveComponent("ll-button");
|
|
31
37
|
const _component_a_menu_item = vue.resolveComponent("a-menu-item");
|
|
32
38
|
const _component_a_menu = vue.resolveComponent("a-menu");
|
|
33
39
|
const _component_a_dropdown = vue.resolveComponent("a-dropdown");
|
|
34
|
-
return vue.openBlock(), vue.createBlock(_component_a_dropdown, vue.mergeProps({
|
|
35
|
-
open: open.value,
|
|
36
|
-
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => open.value = $event)
|
|
37
|
-
}, _ctx.dropDownProps, {
|
|
40
|
+
return vue.openBlock(), vue.createBlock(_component_a_dropdown, vue.mergeProps({ open: dropdownOpen.value }, _ctx.dropDownProps, {
|
|
38
41
|
disabled: _ctx.disabled,
|
|
39
|
-
class: vue.unref(bem).b()
|
|
42
|
+
class: vue.unref(bem).b(),
|
|
43
|
+
onOpenChange: handleDropdownOpenChange
|
|
40
44
|
}), {
|
|
41
45
|
overlay: vue.withCtx(() => [
|
|
42
|
-
vue.createVNode(_component_a_menu,
|
|
46
|
+
vue.createVNode(_component_a_menu, { onClick: handleDropdownClick }, {
|
|
43
47
|
default: vue.withCtx(() => [
|
|
44
48
|
(vue.openBlock(true), vue.createElementBlock(
|
|
45
49
|
vue.Fragment,
|
|
@@ -120,7 +124,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
120
124
|
_ctx.showExpandType ? (vue.openBlock(), vue.createBlock(_component_ll_icon, {
|
|
121
125
|
key: 0,
|
|
122
126
|
class: vue.normalizeClass(vue.unref(bem).m("icon-right")),
|
|
123
|
-
"icon-name": !
|
|
127
|
+
"icon-name": !dropdownOpen.value ? "icon-line-arrow-down" : "icon-line-arrow-folding"
|
|
124
128
|
}, null, 8, ["class", "icon-name"])) : vue.createCommentVNode("v-if", true)
|
|
125
129
|
],
|
|
126
130
|
2
|
package/lib/packages/components/dropdown-button-simple/src/dropdown-button-simple.vue2.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-button-simple.vue2.js","sources":["../../../../../../packages/components/dropdown-button-simple/src/dropdown-button-simple.vue"],"sourcesContent":["<template>\n <a-dropdown\n
|
|
1
|
+
{"version":3,"file":"dropdown-button-simple.vue2.js","sources":["../../../../../../packages/components/dropdown-button-simple/src/dropdown-button-simple.vue"],"sourcesContent":["<template>\n <a-dropdown\n :open=\"dropdownOpen\"\n v-bind=\"dropDownProps\"\n :disabled=\"disabled\"\n :class=\"bem.b()\"\n @open-change=\"handleDropdownOpenChange\"\n >\n <ll-button v-bind=\"computedButtonProps\" :disabled=\"disabled\">\n <div :class=\"bem.m('icon-box')\">\n <slot name=\"icon\">\n <ll-icon v-bind=\"iconProps\" />\n </slot>\n <span>{{ buttonProps?.label ?? '新增' }}</span>\n <ll-icon\n v-if=\"showExpandType\"\n :class=\"bem.m('icon-right')\"\n :icon-name=\"\n !dropdownOpen ? 'icon-line-arrow-down' : 'icon-line-arrow-folding'\n \"\n />\n </div>\n </ll-button>\n <template #overlay>\n <a-menu @click=\"handleDropdownClick\">\n <a-menu-item\n v-for=\"(item, index) in dropdownItems\"\n :key=\"item?.key ?? index\"\n @click.stop=\"handleMenuItemClick(item)\"\n >\n <slot name=\"menuItem\" v-bind=\"item\">\n <div :class=\"bem.m('icon-box')\">\n <ll-icon v-if=\"item.iconProps\" v-bind=\"item.iconProps\" />\n <span>{{ item ? item.label : '-' }}</span>\n </div>\n </slot>\n </a-menu-item>\n </a-menu>\n </template>\n </a-dropdown>\n</template>\n\n<script setup lang=\"ts\">\n// Import\nimport { ref, computed } from 'vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport {\n dropdownButtonSimpleProps,\n defaultButtonProps,\n dropdownButtonSimpleEmits,\n type DropdownItemProps\n} from './dropdown-button-simple'\n// Default\ndefineOptions({ name: 'LlDropdownButtonSimple' })\nconst bem = createNamespace('dropdown-button-simple')\nconst props = defineProps(dropdownButtonSimpleProps)\nconst emits = defineEmits(dropdownButtonSimpleEmits)\n\n// Data\nconst dropdownOpen = ref<boolean>(false)\n\nconst computedButtonProps = computed(() => ({\n ...defaultButtonProps,\n ...props.buttonProps\n}))\n// Methods\nconst handleMenuItemClick = (item: DropdownItemProps): void => {\n emits('clickItem', item)\n}\nconst handleDropdownOpenChange = (open: boolean) => {\n dropdownOpen.value = open\n}\nconst handleDropdownClick = () => {\n dropdownOpen.value = false\n}\n</script>\n"],"names":["createNamespace","ref","computed","defaultButtonProps"],"mappings":";;;;;;;;;;;;;;;;AAsDA,IAAM,MAAA,GAAA,GAAMA,gCAAgB,wBAAwB,CAAA,CAAA;AACpD,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAGd,IAAM,MAAA,YAAA,GAAeC,QAAa,KAAK,CAAA,CAAA;AAEvC,IAAM,MAAA,mBAAA,GAAsBC,aAAS,OAAO;AAAA,MAC1C,GAAGC,uCAAA;AAAA,MACH,GAAG,KAAM,CAAA,WAAA;AAAA,KACT,CAAA,CAAA,CAAA;AAEF,IAAM,MAAA,mBAAA,GAAsB,CAAC,IAAkC,KAAA;AAC7D,MAAA,KAAA,CAAM,aAAa,IAAI,CAAA,CAAA;AAAA,KACzB,CAAA;AACA,IAAM,MAAA,wBAAA,GAA2B,CAAC,IAAkB,KAAA;AAClD,MAAA,YAAA,CAAa,KAAQ,GAAA,IAAA,CAAA;AAAA,KACvB,CAAA;AACA,IAAA,MAAM,sBAAsB,MAAM;AAChC,MAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,CAAA;AAAA,KACvB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -28,7 +28,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
28
28
|
const attrs = vue.useAttrs();
|
|
29
29
|
const innerValue = vue.ref("");
|
|
30
30
|
const inputRef = vue.ref();
|
|
31
|
-
const
|
|
31
|
+
const integerConfig = vue.computed(() => {
|
|
32
32
|
let obj = {};
|
|
33
33
|
if (props.integer) {
|
|
34
34
|
obj = inputNumber$1.integerDict[props.integer];
|
|
@@ -38,7 +38,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
38
38
|
const getBindValue = vue.computed(() => {
|
|
39
39
|
const bindValue = {
|
|
40
40
|
...attrs,
|
|
41
|
-
...
|
|
41
|
+
...integerConfig.value
|
|
42
42
|
};
|
|
43
43
|
if (props.thousands) {
|
|
44
44
|
bindValue.formatter = (value) => number.thousandsFormat(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-number.vue2.js","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <div v-if=\"!detailed\" :class=\"bem.e('container')\">\n <InputNumber\n ref=\"inputRef\"\n v-model:value=\"innerValue\"\n v-bind=\"getBindValue\"\n @change=\"onChange\"\n >\n <template v-for=\"item in Object.keys($slots)\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"getBindValue.unit\" #addonAfter>\n <div :class=\"bem.e('unit')\">\n {{ getBindValue.unit }}\n </div>\n </template>\n </InputNumber>\n </div>\n\n <p\n v-if=\"detailed\"\n :class=\"bem.e('detailed')\"\n :title=\"thousands ? thousandsFormat(innerValue) : innerValue\"\n >\n <span v-if=\"$attrs.addonBefore\">{{ $attrs.addonBefore }}</span>\n {{ thousands ? thousandsFormat(innerValue) : innerValue }}\n <span v-if=\"$attrs.addonAfter\">{{ $attrs.addonAfter }}</span>\n </p>\n <p\n v-if=\"isAmountChinese && getChineseName\"\n :class=\"bem.e('amount-chinese-name')\"\n >\n {{ getChineseName }}\n </p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch, useAttrs } from 'vue'\nimport { InputNumber } from 'ant-design-vue'\nimport { isNil } from 'lodash-es'\nimport {\n getAmountChinese,\n thousandsFormat,\n createNamespace\n} from '@ll-plus/utils'\nimport { inputNumberProps, inputNumberEmits } from './input-number'\nimport { integerDict, type Integer } from './config'\nimport type { InputNumberProps } from 'ant-design-vue'\ndefineOptions({ name: 'LlInputNumber' })\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\nconst bem = createNamespace('input-number')\nconst attrs = useAttrs()\nconst innerValue = ref('')\nconst inputRef = ref()\nconst
|
|
1
|
+
{"version":3,"file":"input-number.vue2.js","sources":["../../../../../../packages/components/input-number/src/input-number.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <div v-if=\"!detailed\" :class=\"bem.e('container')\">\n <InputNumber\n ref=\"inputRef\"\n v-model:value=\"innerValue\"\n v-bind=\"getBindValue\"\n @change=\"onChange\"\n >\n <template v-for=\"item in Object.keys($slots)\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"getBindValue.unit\" #addonAfter>\n <div :class=\"bem.e('unit')\">\n {{ getBindValue.unit }}\n </div>\n </template>\n </InputNumber>\n </div>\n\n <p\n v-if=\"detailed\"\n :class=\"bem.e('detailed')\"\n :title=\"thousands ? thousandsFormat(innerValue) : innerValue\"\n >\n <span v-if=\"$attrs.addonBefore\">{{ $attrs.addonBefore }}</span>\n {{ thousands ? thousandsFormat(innerValue) : innerValue }}\n <span v-if=\"$attrs.addonAfter\">{{ $attrs.addonAfter }}</span>\n </p>\n <p\n v-if=\"isAmountChinese && getChineseName\"\n :class=\"bem.e('amount-chinese-name')\"\n >\n {{ getChineseName }}\n </p>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { computed, ref, watch, useAttrs } from 'vue'\nimport { InputNumber } from 'ant-design-vue'\nimport { isNil } from 'lodash-es'\nimport {\n getAmountChinese,\n thousandsFormat,\n createNamespace\n} from '@ll-plus/utils'\nimport { inputNumberProps, inputNumberEmits } from './input-number'\nimport { integerDict, type Integer } from './config'\nimport type { InputNumberProps } from 'ant-design-vue'\ndefineOptions({ name: 'LlInputNumber' })\nconst props = defineProps(inputNumberProps)\nconst emit = defineEmits(inputNumberEmits)\nconst bem = createNamespace('input-number')\nconst attrs = useAttrs()\nconst innerValue = ref('')\nconst inputRef = ref()\nconst integerConfig = computed(() => {\n let obj = {} as Integer\n if (props.integer) {\n obj = integerDict[props.integer]\n }\n return obj\n})\n\nconst getBindValue = computed(() => {\n const bindValue = {\n ...attrs,\n ...integerConfig.value\n } as InputNumberProps & { unit: string }\n if (props.thousands) {\n bindValue.formatter = (value: string | number) => thousandsFormat(value)\n bindValue.parser = (value: string) => value.replace(/\\$\\s?|(,*)/g, '')\n }\n return bindValue\n})\n\nconst getChineseName = computed(() => {\n let str = ''\n str =\n !props.isAmountChinese || isNil(innerValue.value)\n ? ''\n : getAmountChinese(Number(innerValue.value))\n return str\n})\n\nwatch(\n () => props.value,\n val => {\n setValue(val)\n },\n { immediate: true }\n)\n\nfunction setValue(value) {\n innerValue.value = isNil(value) || isNaN(value) ? null : value\n // (!value && value !== 0) || isNaN(value) ? null : Number(value)\n}\nfunction onChange(value) {\n emit('update:value', value)\n emit('change', value)\n}\n\nconst focus = () => {\n inputRef.value.focus()\n}\n\ndefineExpose({ focus })\n</script>\n"],"names":["createNamespace","useAttrs","ref","computed","integerDict","thousandsFormat","isNil","getAmountChinese","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAmDA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AACb,IAAM,MAAA,GAAA,GAAMA,gCAAgB,cAAc,CAAA,CAAA;AAC1C,IAAA,MAAM,QAAQC,YAAS,EAAA,CAAA;AACvB,IAAM,MAAA,UAAA,GAAaC,QAAI,EAAE,CAAA,CAAA;AACzB,IAAA,MAAM,WAAWA,OAAI,EAAA,CAAA;AACrB,IAAM,MAAA,aAAA,GAAgBC,aAAS,MAAM;AACnC,MAAA,IAAI,MAAM,EAAC,CAAA;AACX,MAAA,IAAI,MAAM,OAAS,EAAA;AACjB,QAAM,GAAA,GAAAC,yBAAA,CAAY,MAAM,OAAO,CAAA,CAAA;AAAA,OACjC;AACA,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,YAAA,GAAeD,aAAS,MAAM;AAClC,MAAA,MAAM,SAAY,GAAA;AAAA,QAChB,GAAG,KAAA;AAAA,QACH,GAAG,aAAc,CAAA,KAAA;AAAA,OACnB,CAAA;AACA,MAAA,IAAI,MAAM,SAAW,EAAA;AACnB,QAAA,SAAA,CAAU,SAAY,GAAA,CAAC,KAA2B,KAAAE,sBAAA,CAAgB,KAAK,CAAA,CAAA;AACvE,QAAA,SAAA,CAAU,SAAS,CAAC,KAAA,KAAkB,KAAM,CAAA,OAAA,CAAQ,eAAe,EAAE,CAAA,CAAA;AAAA,OACvE;AACA,MAAO,OAAA,SAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAM,MAAA,cAAA,GAAiBF,aAAS,MAAM;AACpC,MAAA,IAAI,GAAM,GAAA,EAAA,CAAA;AACV,MAAA,GAAA,GACE,CAAC,KAAA,CAAM,eAAmB,IAAAG,cAAA,CAAM,UAAW,CAAA,KAAK,CAC5C,GAAA,EAAA,GACAC,uBAAiB,CAAA,MAAA,CAAO,UAAW,CAAA,KAAK,CAAC,CAAA,CAAA;AAC/C,MAAO,OAAA,GAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAED,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAO,GAAA,KAAA;AACL,QAAA,QAAA,CAAS,GAAG,CAAA,CAAA;AAAA,OACd;AAAA,MACA,EAAE,WAAW,IAAK,EAAA;AAAA,KACpB,CAAA;AAEA,IAAA,SAAS,SAAS,KAAO,EAAA;AACvB,MAAA,UAAA,CAAW,QAAQF,cAAM,CAAA,KAAK,KAAK,KAAM,CAAA,KAAK,IAAI,IAAO,GAAA,KAAA,CAAA;AAAA,KAE3D;AACA,IAAA,SAAS,SAAS,KAAO,EAAA;AACvB,MAAA,IAAA,CAAK,gBAAgB,KAAK,CAAA,CAAA;AAC1B,MAAA,IAAA,CAAK,UAAU,KAAK,CAAA,CAAA;AAAA,KACtB;AAEA,IAAA,MAAM,QAAQ,MAAM;AAClB,MAAA,QAAA,CAAS,MAAM,KAAM,EAAA,CAAA;AAAA,KACvB,CAAA;AAEA,IAAa,QAAA,CAAA,EAAE,OAAO,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -18,6 +18,7 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
18
18
|
const props = __props;
|
|
19
19
|
const emits = __emit;
|
|
20
20
|
const attrs = vue.useAttrs();
|
|
21
|
+
console.log({ attrs });
|
|
21
22
|
const newExpandedKeys = vue.ref([]);
|
|
22
23
|
const hoverTreeNodeItem = vue.ref();
|
|
23
24
|
const bem = createNamespace.createNamespace("operate-tree");
|
|
@@ -39,7 +40,8 @@ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
|
39
40
|
}
|
|
40
41
|
},
|
|
41
42
|
{
|
|
42
|
-
deep: true
|
|
43
|
+
deep: true,
|
|
44
|
+
immediate: true
|
|
43
45
|
}
|
|
44
46
|
);
|
|
45
47
|
return (_ctx, _cache) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operate-tree.vue2.js","sources":["../../../../../../packages/components/operate-tree/src/operate-tree.vue"],"sourcesContent":["<template>\n <a-spin :spinning=\"loading\">\n <div :class=\"bem.b()\">\n <!-- 目录tree -->\n <a-directory-tree\n v-if=\"treeData?.length\"\n v-bind=\"attrs\"\n :block-node=\"true\"\n multiple\n :tree-data=\"treeData\"\n :expanded-keys=\"newExpandedKeys\"\n :field-names=\"fieldNames\"\n @expand=\"expand\"\n @select=\"select\"\n @mouseenter=\"handleMouseenter\"\n >\n <!-- switcher-icon-slots -->\n <template #switcherIcon=\"slots\">\n <slot name=\"switcherIcon\" v-bind=\"slots\">\n <caret-right-outlined v-if=\"!slots.expanded\" />\n <caret-down-outlined v-else />\n </slot>\n </template>\n <template #title=\"slots\">\n <div :class=\"bem.e('title')\">\n <div>\n <!-- icon-slots -->\n <div v-if=\"$slots.icon\" :class=\"bem.e('icon')\">\n <slot name=\"icon\" v-bind=\"slots\" />\n </div>\n <!-- title-slots -->\n <slot name=\"treeTitle\" v-bind=\"slots\">\n <span>\n {{ slots[fieldNames!['title']!] }}\n </span>\n </slot>\n </div>\n <!-- operate-slots -->\n <div\n :class=\"`${bem.e('operate')} ${\n props.operateDropdownOpen &&\n hoverTreeNodeItem[fieldNames!['key']!] ===\n slots[fieldNames!['key']!]\n ? bem.is('open')\n : bem.is('close')\n }`\"\n >\n <slot name=\"treeOperate\" :data=\"slots\"></slot>\n </div>\n </div>\n </template>\n </a-directory-tree>\n <template v-else>\n <!-- empty-slots -->\n <slot name=\"empty\">\n <ll-empty>\n <template #content>暂无数据</template>\n </ll-empty>\n </slot>\n </template>\n </div>\n </a-spin>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, useAttrs, watch } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\nimport { operateTreeProps, operateTreeEmits } from './operate-tree'\n\nimport { CaretRightOutlined, CaretDownOutlined } from '@ant-design/icons-vue'\n\n// 1.defineOptions\ndefineOptions({ name: 'LlOperateTree' })\n\n// 2.props/emits\nconst props = defineProps(operateTreeProps)\nconst emits = defineEmits(operateTreeEmits)\n\n// 3.hooks\nconst attrs = useAttrs()\n\n// 4.ref\nconst newExpandedKeys = ref<string[]>([])\nconst hoverTreeNodeItem = ref() // 鼠标移的node的数据\nconst bem = createNamespace('operate-tree')\n\nconst handleMouseenter = ({ node }) => {\n hoverTreeNodeItem.value = node\n}\n// 5.methods\n// tree的展开事件\nconst expand = (expandedKeys: string[], data: any) => {\n newExpandedKeys.value = expandedKeys\n emits('expand', expandedKeys, data)\n}\n// tree点击树节点触发\nconst select = (selectedKeys: string[], e: Event) => {\n emits('select', selectedKeys, e)\n}\n\n// 6.watch\n// 如果有数据并且输入框有内容则展开\nwatch(\n () => props.expandedKeys,\n keys => {\n if (keys) {\n newExpandedKeys.value = keys as string[]\n }\n },\n {\n deep: true\n }\n)\n</script>\n"],"names":["useAttrs","ref","createNamespace","watch"],"mappings":";;;;;;;;;;;;;;;;;AA2EA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAGd,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;
|
|
1
|
+
{"version":3,"file":"operate-tree.vue2.js","sources":["../../../../../../packages/components/operate-tree/src/operate-tree.vue"],"sourcesContent":["<template>\n <a-spin :spinning=\"loading\">\n <div :class=\"bem.b()\">\n <!-- 目录tree -->\n <a-directory-tree\n v-if=\"treeData?.length\"\n v-bind=\"attrs\"\n :block-node=\"true\"\n multiple\n :tree-data=\"treeData\"\n :expanded-keys=\"newExpandedKeys\"\n :field-names=\"fieldNames\"\n @expand=\"expand\"\n @select=\"select\"\n @mouseenter=\"handleMouseenter\"\n >\n <!-- switcher-icon-slots -->\n <template #switcherIcon=\"slots\">\n <slot name=\"switcherIcon\" v-bind=\"slots\">\n <caret-right-outlined v-if=\"!slots.expanded\" />\n <caret-down-outlined v-else />\n </slot>\n </template>\n <template #title=\"slots\">\n <div :class=\"bem.e('title')\">\n <div>\n <!-- icon-slots -->\n <div v-if=\"$slots.icon\" :class=\"bem.e('icon')\">\n <slot name=\"icon\" v-bind=\"slots\" />\n </div>\n <!-- title-slots -->\n <slot name=\"treeTitle\" v-bind=\"slots\">\n <span>\n {{ slots[fieldNames!['title']!] }}\n </span>\n </slot>\n </div>\n <!-- operate-slots -->\n <div\n :class=\"`${bem.e('operate')} ${\n props.operateDropdownOpen &&\n hoverTreeNodeItem[fieldNames!['key']!] ===\n slots[fieldNames!['key']!]\n ? bem.is('open')\n : bem.is('close')\n }`\"\n >\n <slot name=\"treeOperate\" :data=\"slots\"></slot>\n </div>\n </div>\n </template>\n </a-directory-tree>\n <template v-else>\n <!-- empty-slots -->\n <slot name=\"empty\">\n <ll-empty>\n <template #content>暂无数据</template>\n </ll-empty>\n </slot>\n </template>\n </div>\n </a-spin>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, useAttrs, watch } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\nimport { operateTreeProps, operateTreeEmits } from './operate-tree'\n\nimport { CaretRightOutlined, CaretDownOutlined } from '@ant-design/icons-vue'\n\n// 1.defineOptions\ndefineOptions({ name: 'LlOperateTree' })\n\n// 2.props/emits\nconst props = defineProps(operateTreeProps)\nconst emits = defineEmits(operateTreeEmits)\n\n// 3.hooks\nconst attrs = useAttrs()\n\nconsole.log({ attrs })\n\n// 4.ref\nconst newExpandedKeys = ref<string[]>([])\nconst hoverTreeNodeItem = ref() // 鼠标移的node的数据\nconst bem = createNamespace('operate-tree')\n\nconst handleMouseenter = ({ node }) => {\n hoverTreeNodeItem.value = node\n}\n// 5.methods\n// tree的展开事件\nconst expand = (expandedKeys: string[], data: any) => {\n newExpandedKeys.value = expandedKeys\n emits('expand', expandedKeys, data)\n}\n// tree点击树节点触发\nconst select = (selectedKeys: string[], e: Event) => {\n emits('select', selectedKeys, e)\n}\n\n// 6.watch\n// 如果有数据并且输入框有内容则展开\nwatch(\n () => props.expandedKeys,\n keys => {\n if (keys) {\n newExpandedKeys.value = keys as string[]\n }\n },\n {\n deep: true,\n immediate: true\n }\n)\n</script>\n"],"names":["useAttrs","ref","createNamespace","watch"],"mappings":";;;;;;;;;;;;;;;;;AA2EA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAGd,IAAA,MAAM,QAAQA,YAAS,EAAA,CAAA;AAEvB,IAAQ,OAAA,CAAA,GAAA,CAAI,EAAE,KAAA,EAAO,CAAA,CAAA;AAGrB,IAAM,MAAA,eAAA,GAAkBC,OAAc,CAAA,EAAE,CAAA,CAAA;AACxC,IAAA,MAAM,oBAAoBA,OAAI,EAAA,CAAA;AAC9B,IAAM,MAAA,GAAA,GAAMC,gCAAgB,cAAc,CAAA,CAAA;AAE1C,IAAA,MAAM,gBAAmB,GAAA,CAAC,EAAE,IAAA,EAAW,KAAA;AACrC,MAAA,iBAAA,CAAkB,KAAQ,GAAA,IAAA,CAAA;AAAA,KAC5B,CAAA;AAGA,IAAM,MAAA,MAAA,GAAS,CAAC,YAAA,EAAwB,IAAc,KAAA;AACpD,MAAA,eAAA,CAAgB,KAAQ,GAAA,YAAA,CAAA;AACxB,MAAM,KAAA,CAAA,QAAA,EAAU,cAAc,IAAI,CAAA,CAAA;AAAA,KACpC,CAAA;AAEA,IAAM,MAAA,MAAA,GAAS,CAAC,YAAA,EAAwB,CAAa,KAAA;AACnD,MAAM,KAAA,CAAA,QAAA,EAAU,cAAc,CAAC,CAAA,CAAA;AAAA,KACjC,CAAA;AAIA,IAAAC,SAAA;AAAA,MACE,MAAM,KAAM,CAAA,YAAA;AAAA,MACZ,CAAQ,IAAA,KAAA;AACN,QAAA,IAAI,IAAM,EAAA;AACR,UAAA,eAAA,CAAgB,KAAQ,GAAA,IAAA,CAAA;AAAA,SAC1B;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,QACN,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -27,6 +27,6 @@ export declare const buildProp: <Type = never, Value = never, Validator = never,
|
|
|
27
27
|
export type TestProps = Record<string, {
|
|
28
28
|
[epPropKey]: true;
|
|
29
29
|
} | NativePropType | EpPropInput<any, any, any, any, any>>;
|
|
30
|
-
export declare const buildProps: <Props extends Record<string,
|
|
30
|
+
export declare const buildProps: <Props extends Record<string, {
|
|
31
31
|
__epPropKey: true;
|
|
32
|
-
}
|
|
32
|
+
} | NativePropType | EpPropInput<any, any, any, any, any>>>(props: Props) => { [K in keyof Props]: IfEpProp<Props[K], Props[K], IfNativePropType<Props[K], Props[K], EpPropConvert<Props[K]>>>; };
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
--color-primary-hover
|
|
3
3
|
);--menu-button-icon-hover-bg:rgba(0, 0, 0, 0.06);--collect-icon-color:#faad14;--header-icon-color:rgba(0, 0, 0, 0.65);--setting-bg-color:#f4f5f7;--setting-modal-bg-color:#fff;--default-icon:rgba(0, 0, 0, 0.45);--default-icon-hover:var(--color-primary-hover);--default-icon-hover-bg:rgba(0, 0, 0, 0.06);--default-icon-active:var(--color-primary-active);--default-icon-disable:rgba(0, 0, 0, 0.25);--primary-icon:var(--color-primary);--primary-icon-hover:var(--color-primary-hover);--primary-icon-active:var(--color-primary-active);--primary-icon-disabled:rgba(0, 0, 0, 0.25);--scroll-color:rgba(0, 0, 0, 0.25);--detail-descriptions-label-bg-color:#fafafa;--card-ribbon-bg-color:#e1f0ff;--card-ribbon-corner-bg-color:#5597dd;--help-des-bg-color:#fff4de;--image-border-color:rgba(0, 0, 0, 0.04);--blue-tag-bg-color:rgba(17, 135, 255, 0.1);--orange-tag-bg-color:rgba(250, 173, 20, 0.1);--green-tag-bg-color:rgba(82, 196, 26, 0.1);--success-status-bg-color:rgba(82, 196, 26, 0.08);--failure-status-bg-color:rgba(255, 77, 79, 0.08);--font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Helvetica Neue","Helvetica, Arial","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";--loading-bg-color:rgba(255, 255, 255, 0.7)}.technology-blue{--color-primary-bg:#f0f9ff;--color-primary-bg-hover:#b5e4ff;--color-primary-border:#8cd1ff;--color-primary-border-hover:#63bcff;--color-primary-hover:#3ba3ff;--color-primary:#1187ff;--color-primary-active:#0467d9;--color-primary-text-hover:#3ba3ff;--color-primary-text:#1187ff;--color-primary-text-active:#0467d9;--color-info:#1187ff}.cyan-blue{--color-primary-bg:#f0f9ff;--color-primary-bg-hover:#ebfaf8;--color-primary-border:#dfedec;--color-primary-border-hover:#afe0de;--color-primary-hover:#83d4d2;--color-primary:#5bc5c7;--color-primary-active:#429ca1;--color-primary-text-hover:#83d4d2;--color-primary-text:#5bc5c7;--color-primary-text-active:#429ca1;--color-info:#5bc5c7;--main-bg-color:#f4f7fd}.dark{--color-primary-bg:#111d2c;--color-primary-bg-hover:#102945;--color-primary-border:#13375b;--color-primary-border-hover:#13487e;--color-primary-hover:#3795e8;--color-primary:#1176dc;--color-primary-active:#125fad;--color-primary-text-hover:#3795e8;--color-primary-text:#1176dc;--color-primary-text-active:#125fad;--dark-color-primary:#1187ff;--color-success:#49aa19;--color-warning:#d89614;--color-error:#dc4446;--color-info:#1176dc;--color-text-base:#fff;--color-text:rgba(255, 255, 255);--color-text-secondary:rgba(255, 255, 255, 0.75);--color-text-tertiary:rgba(255, 255, 255, 0.45);--color-text-quaternary:rgba(255, 255, 255, 0.25);--color-border:#424242;--color-border-secondary:#303030;--color-split:rgba(255, 255, 255, 0.12);--color-fill:rgba(255, 255, 255, 0.18);--color-fill-secondary:rgba(255, 255, 255, 0.12);--color-fill-tertiary:rgba(255, 255, 255, 0.08);--color-fill-quaternary:rgba(255, 255, 255, 0.04);--color-bg-base:#000;--color-bg-container:#141414;--color-bg-elevated:#1f1f1f;--color-bg-layout:#000;--color-bg-spotlight:#424242;--color-bg-mask:rgba(0, 0, 0, 0.45);--control-item-bg-hover:rgba(255, 255, 255, 0.15);--control-outline:rgba(238, 38, 56, 0.11);--main-bg-color:transparent;--submenu-bg-color:#141414;--menu-search-bg-color:#000;--menu-border-color:#303030;--menu-button-icon-hover:var(
|
|
4
4
|
--color-primary-hover
|
|
5
|
-
);--menu-button-icon-hover-bg:rgba(255, 255, 255, 0.15);--collect-icon-color:var(--color-warning);--header-icon-color:rgba(255, 255, 255, 0.75);--setting-bg-color:#1f1f1f;--setting-modal-bg-color:#1f1f1f;--default-icon:rgba(255, 255, 255, 0.75);--default-icon-disable:rgba(255, 255, 255, 0.25);--scroll-color:rgba(255, 255, 255, 0.25);--detail-descriptions-label-bg-color:rgba(255, 255, 255, 0.04);--image-border-color:rgba(255, 255, 255, 0.04);--loading-bg-color:rgba(0, 0, 0, 0.7)}.gray{filter:grayscale(100%)}.ant-menu-submenu.ant-menu-submenu-popup .ant-menu-submenu.ant-menu-submenu-vertical.ll-menu-sub .ant-menu-submenu-title{display:flex;align-items:center;justify-content:space-between;width:100%}.ant-menu-submenu.ant-menu-submenu-popup .ant-menu-submenu.ant-menu-submenu-vertical.ll-menu-sub .ant-menu-submenu-title .ll-icon{margin-left:20px}.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{margin-bottom:4px}.ant-dropdown .ant-dropdown-menu :last-child{margin-bottom:0!important}.ant-select:hover .ant-select-selector{border-color:var(--color-primary-hover)!important}.ant-select-dropdown .ant-cascader-menu-item-active,.ant-select-dropdown .ant-select-item-option-selected{color:var(--color-primary)!important}.ant-select-dropdown .ant-cascader-menu .ant-cascader-menu-item{margin-bottom:4px}.ant-select-dropdown .ant-cascader-menu :last-child{margin-bottom:0!important}.rc-virtual-list-holder-inner .ant-select-item{margin-bottom:4px}.rc-virtual-list-holder-inner :last-child{margin-bottom:0!important}.ant-picker-dropdown .ant-picker-cell-selected .ant-picker-cell-inner{background-color:var(--color-primary)!important}.ll-advanced-filtering .ant-popover-content .ant-popover-inner{padding:0!important}.ll-advanced-filtering-tags{display:flex;flex-direction:column;padding:20px;min-height:100px;max-height:600px}.ll-advanced-filtering-tags--title{display:flex;justify-content:space-between;line-height:24px;height:24px;margin-bottom:13px}.ll-advanced-filtering-tags--box{display:flex;flex-wrap:wrap;margin-top:-14px}.ll-advanced-filtering-tags--tag{display:flex;padding:0 10px;height:28px;line-height:28px;background:var(--color-fill-secondary);color:var(--color-text);font-size:12px;margin-right:10px;margin-top:14px;border-radius:14px;align-items:center}.ll-advanced-filtering-tags--label{margin-right:5px;line-height:20px}.ll-advanced-filtering-tags--value{color:var(--color-primary);line-height:20px}.ll-advanced-filtering-tags--close{cursor:pointer;margin-left:5px;display:flex;align-items:center;height:20px}.ll-advanced-filtering-tags--icon{font-size:10px}.ll-advanced-filtering-tags--empty{height:50px;line-height:50px;text-align:center;font-size:14px;color:var(--color-text-quaternary)}.ll-advanced-filtering-params .ant-card-head{padding:0 30px}.ll-advanced-filtering-params .ant-card-head .ant-card-head-title{font-weight:500;color:var(--color-text)}.ll-advanced-filtering-params .ant-card-body{padding:30px;padding-right:20px}.ll-advanced-filtering-params--content{max-height:510px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding-right:10px}.ll-advanced-filtering-params--box{display:flex;flex-wrap:wrap;margin-top:-10px}.ll-advanced-filtering-params--item{padding:7px 20px;box-sizing:border-box;border:1px solid var(--color-border);cursor:pointer;border-radius:6px;margin-right:10px;margin-top:10px;line-height:20px}.ll-advanced-filtering-params--item.is-selected{color:var(--color-primary-active);border:1px solid var(--color-primary-active)}.ll-advanced-filtering-params--empty{width:100%;height:60px;display:flex;justify-content:center;align-items:center;font-size:14px;color:var(--color-text-quaternary)}
|
|
5
|
+
);--menu-button-icon-hover-bg:rgba(255, 255, 255, 0.15);--collect-icon-color:var(--color-warning);--header-icon-color:rgba(255, 255, 255, 0.75);--setting-bg-color:#1f1f1f;--setting-modal-bg-color:#1f1f1f;--default-icon:rgba(255, 255, 255, 0.75);--default-icon-disable:rgba(255, 255, 255, 0.25);--scroll-color:rgba(255, 255, 255, 0.25);--detail-descriptions-label-bg-color:rgba(255, 255, 255, 0.04);--image-border-color:rgba(255, 255, 255, 0.04);--loading-bg-color:rgba(0, 0, 0, 0.7)}.gray{filter:grayscale(100%)}.ant-menu-submenu.ant-menu-submenu-popup .ant-menu-submenu.ant-menu-submenu-vertical.ll-menu-sub .ant-menu-submenu-title{display:flex;align-items:center;justify-content:space-between;width:100%}.ant-menu-submenu.ant-menu-submenu-popup .ant-menu-submenu.ant-menu-submenu-vertical.ll-menu-sub .ant-menu-submenu-title .ll-icon{margin-left:20px}.ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{margin-bottom:4px}.ant-dropdown .ant-dropdown-menu :last-child{margin-bottom:0!important}.ant-select:hover .ant-select-selector{border-color:var(--color-primary-hover)!important}.ant-select-dropdown .ant-cascader-menu-item-active,.ant-select-dropdown .ant-select-item-option-selected{color:var(--color-primary)!important}.ant-select-dropdown .ant-cascader-menu .ant-cascader-menu-item{margin-bottom:4px}.ant-select-dropdown .ant-cascader-menu :last-child{margin-bottom:0!important}.rc-virtual-list-holder-inner .ant-select-item{margin-bottom:4px}.rc-virtual-list-holder-inner :last-child{margin-bottom:0!important}.ant-picker-dropdown .ant-picker-cell-selected .ant-picker-cell-inner{background-color:var(--color-primary)!important}.ll-advanced-filtering .ant-popover-content .ant-popover-inner{padding:0!important}.ll-advanced-filtering-tags{display:flex;flex-direction:column;padding:20px;min-height:100px;max-height:600px}.ll-advanced-filtering-tags--title{display:flex;justify-content:space-between;line-height:24px;height:24px;margin-bottom:13px}.ll-advanced-filtering-tags--box{display:flex;flex-wrap:wrap;margin-top:-14px}.ll-advanced-filtering-tags--tag{display:flex;padding:0 10px;height:28px;line-height:28px;background:var(--color-fill-secondary);color:var(--color-text);font-size:12px;margin-right:10px;margin-top:14px;border-radius:14px;align-items:center}.ll-advanced-filtering-tags--label{margin-right:5px;line-height:20px}.ll-advanced-filtering-tags--value{color:var(--color-primary);line-height:20px}.ll-advanced-filtering-tags--close{cursor:pointer;margin-left:5px;display:flex;align-items:center;height:20px}.ll-advanced-filtering-tags--icon{font-size:10px}.ll-advanced-filtering-tags--empty{height:50px;line-height:50px;text-align:center;font-size:14px;color:var(--color-text-quaternary)}.ll-advanced-filtering-params .ant-card-head{padding:0 30px}.ll-advanced-filtering-params .ant-card-head .ant-card-head-title{font-weight:500;color:var(--color-text)}.ll-advanced-filtering-params .ant-card-head .ant-card-extra{display:flex;align-items:center}.ll-advanced-filtering-params .ant-card-body{padding:30px;padding-right:20px}.ll-advanced-filtering-params--content{max-height:510px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;padding-right:10px}.ll-advanced-filtering-params--box{display:flex;flex-wrap:wrap;margin-top:-10px}.ll-advanced-filtering-params--item{padding:7px 20px;box-sizing:border-box;border:1px solid var(--color-border);cursor:pointer;border-radius:6px;margin-right:10px;margin-top:10px;line-height:20px}.ll-advanced-filtering-params--item.is-selected{color:var(--color-primary-active);border:1px solid var(--color-primary-active)}.ll-advanced-filtering-params--empty{width:100%;height:60px;display:flex;justify-content:center;align-items:center;font-size:14px;color:var(--color-text-quaternary)}
|