ll-plus 2.1.6 → 2.1.7
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/tree-search/index.d.ts +4 -0
- package/es/components/tree-search/src/config/tree-search.d.ts +1 -0
- package/es/components/tree-search/src/tree-search.vue.d.ts +4 -0
- package/es/packages/components/tree-search/src/config/tree-search.mjs +7 -0
- package/es/packages/components/tree-search/src/config/tree-search.mjs.map +1 -1
- package/es/packages/components/tree-search/src/tree-search.vue2.mjs +2 -1
- package/es/packages/components/tree-search/src/tree-search.vue2.mjs.map +1 -1
- package/index.full.js +9 -1
- 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 +9 -1
- package/lib/components/tree-search/index.d.ts +4 -0
- package/lib/components/tree-search/src/config/tree-search.d.ts +1 -0
- package/lib/components/tree-search/src/tree-search.vue.d.ts +4 -0
- package/lib/packages/components/tree-search/src/config/tree-search.js +7 -0
- package/lib/packages/components/tree-search/src/config/tree-search.js.map +1 -1
- package/lib/packages/components/tree-search/src/tree-search.vue2.js +2 -1
- package/lib/packages/components/tree-search/src/tree-search.vue2.js.map +1 -1
- package/package.json +1 -1
- package/types/packages/components/tree-search/index.d.ts +4 -0
- package/types/packages/components/tree-search/src/config/tree-search.d.ts +1 -0
- package/types/packages/components/tree-search/src/tree-search.vue.d.ts +4 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import TreeSearch from './src/tree-search.vue';
|
|
2
2
|
export declare const LlTreeSearch: import("ll-plus/es/utils").SFCWithInstall<import("vue").DefineComponent<{
|
|
3
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
3
4
|
readonly loading: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
4
5
|
readonly throttleTime: import("ll-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
5
6
|
readonly treeData: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
@@ -54,6 +55,7 @@ export declare const LlTreeSearch: import("ll-plus/es/utils").SFCWithInstall<imp
|
|
|
54
55
|
props: import("@vue/shared").LooseRequired<{
|
|
55
56
|
readonly open: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
56
57
|
readonly loading: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
58
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
57
59
|
readonly fieldNames: import("ll-plus/es/ll-plus").IOperateTreeFieldNames;
|
|
58
60
|
readonly treeData: any[];
|
|
59
61
|
readonly throttleTime: number;
|
|
@@ -304,6 +306,7 @@ export declare const LlTreeSearch: import("ll-plus/es/utils").SFCWithInstall<imp
|
|
|
304
306
|
expand: (expandedKeys: string[], data: any) => string[];
|
|
305
307
|
select: (selectedKeys: string[], e: Event) => string[];
|
|
306
308
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
309
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
307
310
|
readonly loading: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
308
311
|
readonly throttleTime: import("ll-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
309
312
|
readonly treeData: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
@@ -364,6 +367,7 @@ export declare const LlTreeSearch: import("ll-plus/es/utils").SFCWithInstall<imp
|
|
|
364
367
|
}, {
|
|
365
368
|
readonly open: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
366
369
|
readonly loading: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
370
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
367
371
|
readonly fieldNames: import("ll-plus/es/ll-plus").IOperateTreeFieldNames;
|
|
368
372
|
readonly treeData: any[];
|
|
369
373
|
readonly throttleTime: number;
|
|
@@ -3,6 +3,7 @@ import type TreeSearch from '../tree-search.vue';
|
|
|
3
3
|
import { IOperateTreeFieldNames } from 'll-plus/es/components';
|
|
4
4
|
export declare const treeSearchOperateWayType: readonly ["modal", "drawer", "none"];
|
|
5
5
|
export declare const treeSearchProps: {
|
|
6
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
6
7
|
readonly loading: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
7
8
|
readonly throttleTime: import("ll-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
8
9
|
readonly treeData: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
2
3
|
readonly loading: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
3
4
|
readonly throttleTime: import("ll-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
4
5
|
readonly treeData: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
@@ -53,6 +54,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
53
54
|
props: import("@vue/shared").LooseRequired<{
|
|
54
55
|
readonly open: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
55
56
|
readonly loading: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
57
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
56
58
|
readonly fieldNames: import("ll-plus/es/components").IOperateTreeFieldNames;
|
|
57
59
|
readonly treeData: any[];
|
|
58
60
|
readonly throttleTime: number;
|
|
@@ -303,6 +305,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
303
305
|
expand: (expandedKeys: string[], data: any) => string[];
|
|
304
306
|
select: (selectedKeys: string[], e: Event) => string[];
|
|
305
307
|
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
308
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
306
309
|
readonly loading: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
307
310
|
readonly throttleTime: import("ll-plus/es/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 300, boolean>;
|
|
308
311
|
readonly treeData: import("ll-plus/es/utils").EpPropFinalized<(new (...args: any[]) => any[]) | (() => any[]) | ((new (...args: any[]) => any[]) | (() => any[]))[], unknown, unknown, () => never[], boolean>;
|
|
@@ -363,6 +366,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
363
366
|
}, {
|
|
364
367
|
readonly open: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
365
368
|
readonly loading: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
369
|
+
readonly operateDropdownOpen: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
366
370
|
readonly fieldNames: import("ll-plus/es/components").IOperateTreeFieldNames;
|
|
367
371
|
readonly treeData: any[];
|
|
368
372
|
readonly throttleTime: number;
|
|
@@ -5,6 +5,13 @@ import { buildProps, definePropType } from '../../../../utils/props/runtime.mjs'
|
|
|
5
5
|
"use strict";
|
|
6
6
|
const treeSearchOperateWayType = ["modal", "drawer", "none"];
|
|
7
7
|
const treeSearchProps = buildProps({
|
|
8
|
+
/**
|
|
9
|
+
* @description tree-operate操作栏的下拉菜单是否打开(用于如果展开的话,tree-operate不用隐藏)
|
|
10
|
+
*/
|
|
11
|
+
operateDropdownOpen: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false
|
|
14
|
+
},
|
|
8
15
|
/**
|
|
9
16
|
* @description loading
|
|
10
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-search.mjs","sources":["../../../../../../../packages/components/tree-search/src/config/tree-search.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\nimport { THROTTLE_TIME } from '@ll-plus/constant'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type TreeSearch from '../tree-search.vue'\nimport {\n ModalProps,\n DrawerProps,\n IOperateTreeFieldNames\n} from '@ll-plus/components'\n\nexport const treeSearchOperateWayType = ['modal', 'drawer', 'none'] as const\n\nexport const treeSearchProps = buildProps({\n /**\n * @description loading\n */\n loading: {\n type: Boolean,\n default: false\n },\n /**\n * @description 节流延时\n */\n throttleTime: {\n type: Number,\n default: THROTTLE_TIME\n },\n /**\n * @description tree的数据\n */\n treeData: {\n type: definePropType<any[]>(Array),\n default: () => []\n },\n /**\n * @description 替换 treeNode 中 title,key,children 字段为 treeData 中对应的字段\n */\n fieldNames: {\n type: definePropType<IOperateTreeFieldNames>(Object),\n default: () => ({ children: 'children', title: 'title', key: 'key' })\n },\n /**\n * @description 弹窗是否可见\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * @description 新增和编辑显示哪种弹窗(模态框/抽屉/自定义)\n */\n operateWay: {\n type: String,\n values: treeSearchOperateWayType,\n default: 'modal'\n },\n /**\n * @description LlModal的组件配置\n */\n modalConfigProps: {\n type: definePropType<ModalProps>(Object)\n },\n /**\n * @description LlDrawer的组件配置\n */\n drawerConfigProps: {\n type: definePropType<DrawerProps>(Object)\n },\n /**\n * @description tree展开的key\n */\n expandedKeys: {\n type: definePropType<string[]>(Array)\n },\n /**\n * @description 头部搜索change\n */\n onSearchInputChange: {\n type: Function,\n default: (v: string) => !!v\n }\n} as const)\n\n// 正确\nexport const treeSearchEmits = {\n clickAdd: () => true, // 点击头部新增按钮\n cancel: () => true, // 弹窗取消按钮事件\n ok: () => true, // 弹窗确定按钮事件\n close: () => true, // 弹窗的close\n expand: (expandedKeys: string[], data: any) => expandedKeys || data, // tree的expand\n select: (selectedKeys: string[], e: Event) => selectedKeys || e // tree的select\n}\n\nexport const treeSearchEmits1 = [\n 'cancel',\n 'cancel',\n 'ok',\n 'close',\n 'expand',\n 'select'\n]\n\n// props\nexport type TreeSearchOperateWayType = typeof treeSearchOperateWayType\nexport type TreeSearchProps = ExtractPropTypes<typeof treeSearchProps>\n\n// emits\nexport type TreeSearchEmits = typeof treeSearchEmits\n\n// instance\nexport type TreeSearchInstance = InstanceType<typeof TreeSearch>\n"],"names":[],"mappings":";;;;;AAWO,MAAM,wBAA2B,GAAA,CAAC,OAAS,EAAA,QAAA,EAAU,MAAM,EAAA;AAE3D,MAAM,kBAAkB,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAIxC,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAA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O,MAAM,IAAA;AAAA;AAAA,EACb,MAAQ,EAAA,CAAC,YAAwB,EAAA,IAAA,KAAc,YAAgB,IAAA,IAAA;AAAA;AAAA,EAC/D,MAAQ,EAAA,CAAC,YAAwB,EAAA,CAAA,KAAa,YAAgB,IAAA,CAAA;AAAA;AAChE,EAAA;AAEO,MAAM,gBAAmB,GAAA;AAAA,EAC9B,QAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"tree-search.mjs","sources":["../../../../../../../packages/components/tree-search/src/config/tree-search.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\nimport { THROTTLE_TIME } from '@ll-plus/constant'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type TreeSearch from '../tree-search.vue'\nimport {\n ModalProps,\n DrawerProps,\n IOperateTreeFieldNames\n} from '@ll-plus/components'\n\nexport const treeSearchOperateWayType = ['modal', 'drawer', 'none'] as const\n\nexport const treeSearchProps = buildProps({\n /**\n * @description tree-operate操作栏的下拉菜单是否打开(用于如果展开的话,tree-operate不用隐藏)\n */\n operateDropdownOpen: {\n type: Boolean,\n default: false\n },\n /**\n * @description loading\n */\n loading: {\n type: Boolean,\n default: false\n },\n /**\n * @description 节流延时\n */\n throttleTime: {\n type: Number,\n default: THROTTLE_TIME\n },\n /**\n * @description tree的数据\n */\n treeData: {\n type: definePropType<any[]>(Array),\n default: () => []\n },\n /**\n * @description 替换 treeNode 中 title,key,children 字段为 treeData 中对应的字段\n */\n fieldNames: {\n type: definePropType<IOperateTreeFieldNames>(Object),\n default: () => ({ children: 'children', title: 'title', key: 'key' })\n },\n /**\n * @description 弹窗是否可见\n */\n open: {\n type: Boolean,\n default: false\n },\n /**\n * @description 新增和编辑显示哪种弹窗(模态框/抽屉/自定义)\n */\n operateWay: {\n type: String,\n values: treeSearchOperateWayType,\n default: 'modal'\n },\n /**\n * @description LlModal的组件配置\n */\n modalConfigProps: {\n type: definePropType<ModalProps>(Object)\n },\n /**\n * @description LlDrawer的组件配置\n */\n drawerConfigProps: {\n type: definePropType<DrawerProps>(Object)\n },\n /**\n * @description tree展开的key\n */\n expandedKeys: {\n type: definePropType<string[]>(Array)\n },\n /**\n * @description 头部搜索change\n */\n onSearchInputChange: {\n type: Function,\n default: (v: string) => !!v\n }\n} as const)\n\n// 正确\nexport const treeSearchEmits = {\n clickAdd: () => true, // 点击头部新增按钮\n cancel: () => true, // 弹窗取消按钮事件\n ok: () => true, // 弹窗确定按钮事件\n close: () => true, // 弹窗的close\n expand: (expandedKeys: string[], data: any) => expandedKeys || data, // tree的expand\n select: (selectedKeys: string[], e: Event) => selectedKeys || e // tree的select\n}\n\nexport const treeSearchEmits1 = [\n 'cancel',\n 'cancel',\n 'ok',\n 'close',\n 'expand',\n 'select'\n]\n\n// props\nexport type TreeSearchOperateWayType = typeof treeSearchOperateWayType\nexport type TreeSearchProps = ExtractPropTypes<typeof treeSearchProps>\n\n// emits\nexport type TreeSearchEmits = typeof treeSearchEmits\n\n// instance\nexport type TreeSearchInstance = InstanceType<typeof TreeSearch>\n"],"names":[],"mappings":";;;;;AAWO,MAAM,wBAA2B,GAAA,CAAC,OAAS,EAAA,QAAA,EAAU,MAAM,EAAA;AAE3D,MAAM,kBAAkB,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAIxC,mBAAqB,EAAA;AAAA,IACnB,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,OAAS,EAAA;AAAA,IACP,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,KAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,aAAA;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAU,EAAA;AAAA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IAAA,IAAA;AAAA;AAAA,EAC/D,MAAQ,EAAA,CAAC,YAAwB,EAAA,CAAA,KAAa,YAAgB,IAAA,CAAA;AAAA;AAChE,EAAA;AAEO,MAAM,gBAAmB,GAAA;AAAA,EAC9B,QAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAA;AACF;;;;"}
|
|
@@ -93,6 +93,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
93
|
}, null, 8, ["is-collapse-menu"]),
|
|
94
94
|
createCommentVNode(" operate-tree "),
|
|
95
95
|
createVNode(unref(LlOperateTree), mergeProps(unref(attrs), {
|
|
96
|
+
"operate-dropdown-open": _ctx.operateDropdownOpen,
|
|
96
97
|
loading: _ctx.loading,
|
|
97
98
|
"field-names": _ctx.fieldNames,
|
|
98
99
|
"tree-data": _ctx.treeData,
|
|
@@ -117,7 +118,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
117
118
|
]),
|
|
118
119
|
_: 3
|
|
119
120
|
/* FORWARDED */
|
|
120
|
-
}, 16, ["loading", "field-names", "tree-data", "expanded-keys"]),
|
|
121
|
+
}, 16, ["operate-dropdown-open", "loading", "field-names", "tree-data", "expanded-keys"]),
|
|
121
122
|
createCommentVNode(" \u64CD\u4F5C\u51FA\u73B0\u7684\u65B9\u5F0F "),
|
|
122
123
|
createCommentVNode(" \u6A21\u6001\u6846 "),
|
|
123
124
|
_ctx.operateWay === "modal" ? (openBlock(), createBlock(_component_ll_modal, mergeProps({ key: 0 }, _ctx.modalConfigProps, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-search.vue2.mjs","sources":["../../../../../../packages/components/tree-search/src/tree-search.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <!-- 头部搜索 -->\n <header-search\n :throttle-time=\"throttleTime\"\n :search-value=\"searchValue\"\n :on-search-input-change=\"handleSearchInputChange\"\n @click=\"handleClickAddBtn\"\n />\n <!-- 目录标题 -->\n <directory-title\n :is-collapse-menu=\"isCollapseMenu\"\n @collapse-menu=\"handleCollapseMenu\"\n />\n <!-- operate-tree -->\n <ll-operate-tree\n v-bind=\"attrs\"\n :loading=\"loading\"\n :field-names=\"fieldNames\"\n :tree-data=\"treeData\"\n :expanded-keys=\"newExpandedKeys\"\n @expand=\"handleTreeExpand\"\n @select=\"handleTreeSelect\"\n >\n <!-- switcher-icon-slots -->\n <template #switcherIcon=\"slots\">\n <slot name=\"switcherIcon\" v-bind=\"slots\" />\n </template>\n <!-- icon-slots -->\n <template #icon=\"slots\">\n <slot name=\"icon\" v-bind=\"slots\" />\n </template>\n <!-- title-slots -->\n <template #treeTitle=\"slots\">\n <slot name=\"treeTitle\" v-bind=\"slots\" />\n </template>\n <!-- operate-slot -->\n <template #treeOperate=\"slots\">\n <slot name=\"treeOperate\" v-bind=\"slots.data\" />\n </template>\n <!-- empty-slot -->\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </ll-operate-tree>\n <!-- 操作出现的方式 -->\n <!-- 模态框 -->\n <template v-if=\"operateWay === 'modal'\">\n <ll-modal\n v-bind=\"modalConfigProps\"\n :open=\"open\"\n @ok=\"handleClickOkBtn\"\n @cancel=\"handleClickCancelBtn\"\n >\n <slot name=\"operateBoxContent\" />\n </ll-modal>\n </template>\n <!-- 抽屉 -->\n <template v-else-if=\"operateWay === 'drawer'\">\n <ll-drawer\n v-bind=\"drawerConfigProps\"\n :open=\"open\"\n @confirm=\"handleClickOkBtn\"\n @cancel=\"handleClickCancelBtn\"\n @close=\"handleClickCloseBtn\"\n >\n <slot name=\"operateBoxContent\" />\n <template #footer-left>\n <slot name=\"drawerFooterLeft\" />\n </template>\n </ll-drawer>\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, useAttrs, watch } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\nimport { treeSearchProps, treeSearchEmits } from './config'\n\nimport HeaderSearch from './components/header-search.vue'\nimport DirectoryTitle from './components/directory-title.vue'\nimport { LlOperateTree } from '@ll-plus/components'\n\n// 1.defineOptions\ndefineOptions({ name: 'LlTreeSearch' })\n\n// 2.props/emits\nconst props = defineProps(treeSearchProps)\nconst emits = defineEmits(treeSearchEmits)\n\n// 3.ref\n// 是否收起/展开\nconst isCollapseMenu = ref(false)\nconst newExpandedKeys = ref<string[]>([])\n// 输入框内容\nconst searchValue = ref('')\nconst bem = createNamespace('tree-search')\n\n// 4.hooks\nconst attrs = useAttrs()\n\n// 5.methods\n// 获取所有树的keys\nconst getTreeDataKeys = (children: any[]) => {\n const keys: any[] = []\n const getKeys = (children: any[]) => {\n if (children) {\n children.forEach(item => {\n keys.push(item[props.fieldNames!['key']!])\n if (item[props.fieldNames!['children']!]) {\n getKeys(item[props.fieldNames!['children']!])\n }\n })\n }\n }\n getKeys(children)\n return keys\n}\nconst handleCollapseMenu = () => {\n isCollapseMenu.value = !isCollapseMenu.value\n if (isCollapseMenu.value) {\n newExpandedKeys.value = getTreeDataKeys(props.treeData!)\n } else {\n newExpandedKeys.value = []\n }\n}\n// 输入框内容change\nconst handleSearchInputChange = (v: string) => {\n searchValue.value = v\n props.onSearchInputChange && props.onSearchInputChange(searchValue.value)\n}\n// 点击头部add\nconst handleClickAddBtn = () => emits('clickAdd')\n// 树展开\nconst handleTreeExpand = (expandedKeys: string[], data: any) => {\n emits('expand', expandedKeys, data)\n}\n// 树节点选择\nconst handleTreeSelect = (keys: string[], e: any) => {\n emits('select', keys, e)\n}\n// 点击弹窗的ok按钮\nconst handleClickOkBtn = () => emits('ok')\n// 点击弹窗的cacel按钮\nconst handleClickCancelBtn = () => emits('cancel')\n// 点击抽屉的x\nconst handleClickCloseBtn = () => emits('close')\n\n// 6.watch\n// 如果有数据并且输入框有内容则展开\nwatch(\n () => props.expandedKeys,\n keys => {\n if (keys) {\n newExpandedKeys.value = keys\n }\n },\n {\n deep: true\n }\n)\n</script>\n"],"names":["children"],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tree-search.vue2.mjs","sources":["../../../../../../packages/components/tree-search/src/tree-search.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\">\n <!-- 头部搜索 -->\n <header-search\n :throttle-time=\"throttleTime\"\n :search-value=\"searchValue\"\n :on-search-input-change=\"handleSearchInputChange\"\n @click=\"handleClickAddBtn\"\n />\n <!-- 目录标题 -->\n <directory-title\n :is-collapse-menu=\"isCollapseMenu\"\n @collapse-menu=\"handleCollapseMenu\"\n />\n <!-- operate-tree -->\n <ll-operate-tree\n v-bind=\"attrs\"\n :operate-dropdown-open=\"operateDropdownOpen\"\n :loading=\"loading\"\n :field-names=\"fieldNames\"\n :tree-data=\"treeData\"\n :expanded-keys=\"newExpandedKeys\"\n @expand=\"handleTreeExpand\"\n @select=\"handleTreeSelect\"\n >\n <!-- switcher-icon-slots -->\n <template #switcherIcon=\"slots\">\n <slot name=\"switcherIcon\" v-bind=\"slots\" />\n </template>\n <!-- icon-slots -->\n <template #icon=\"slots\">\n <slot name=\"icon\" v-bind=\"slots\" />\n </template>\n <!-- title-slots -->\n <template #treeTitle=\"slots\">\n <slot name=\"treeTitle\" v-bind=\"slots\" />\n </template>\n <!-- operate-slot -->\n <template #treeOperate=\"slots\">\n <slot name=\"treeOperate\" v-bind=\"slots.data\" />\n </template>\n <!-- empty-slot -->\n <template #empty>\n <slot name=\"empty\" />\n </template>\n </ll-operate-tree>\n <!-- 操作出现的方式 -->\n <!-- 模态框 -->\n <template v-if=\"operateWay === 'modal'\">\n <ll-modal\n v-bind=\"modalConfigProps\"\n :open=\"open\"\n @ok=\"handleClickOkBtn\"\n @cancel=\"handleClickCancelBtn\"\n >\n <slot name=\"operateBoxContent\" />\n </ll-modal>\n </template>\n <!-- 抽屉 -->\n <template v-else-if=\"operateWay === 'drawer'\">\n <ll-drawer\n v-bind=\"drawerConfigProps\"\n :open=\"open\"\n @confirm=\"handleClickOkBtn\"\n @cancel=\"handleClickCancelBtn\"\n @close=\"handleClickCloseBtn\"\n >\n <slot name=\"operateBoxContent\" />\n <template #footer-left>\n <slot name=\"drawerFooterLeft\" />\n </template>\n </ll-drawer>\n </template>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { ref, useAttrs, watch } from 'vue'\n\nimport { createNamespace } from '@ll-plus/utils'\nimport { treeSearchProps, treeSearchEmits } from './config'\n\nimport HeaderSearch from './components/header-search.vue'\nimport DirectoryTitle from './components/directory-title.vue'\nimport { LlOperateTree } from '@ll-plus/components'\n\n// 1.defineOptions\ndefineOptions({ name: 'LlTreeSearch' })\n\n// 2.props/emits\nconst props = defineProps(treeSearchProps)\nconst emits = defineEmits(treeSearchEmits)\n\n// 3.ref\n// 是否收起/展开\nconst isCollapseMenu = ref(false)\nconst newExpandedKeys = ref<string[]>([])\n// 输入框内容\nconst searchValue = ref('')\nconst bem = createNamespace('tree-search')\n\n// 4.hooks\nconst attrs = useAttrs()\n\n// 5.methods\n// 获取所有树的keys\nconst getTreeDataKeys = (children: any[]) => {\n const keys: any[] = []\n const getKeys = (children: any[]) => {\n if (children) {\n children.forEach(item => {\n keys.push(item[props.fieldNames!['key']!])\n if (item[props.fieldNames!['children']!]) {\n getKeys(item[props.fieldNames!['children']!])\n }\n })\n }\n }\n getKeys(children)\n return keys\n}\nconst handleCollapseMenu = () => {\n isCollapseMenu.value = !isCollapseMenu.value\n if (isCollapseMenu.value) {\n newExpandedKeys.value = getTreeDataKeys(props.treeData!)\n } else {\n newExpandedKeys.value = []\n }\n}\n// 输入框内容change\nconst handleSearchInputChange = (v: string) => {\n searchValue.value = v\n props.onSearchInputChange && props.onSearchInputChange(searchValue.value)\n}\n// 点击头部add\nconst handleClickAddBtn = () => emits('clickAdd')\n// 树展开\nconst handleTreeExpand = (expandedKeys: string[], data: any) => {\n emits('expand', expandedKeys, data)\n}\n// 树节点选择\nconst handleTreeSelect = (keys: string[], e: any) => {\n emits('select', keys, e)\n}\n// 点击弹窗的ok按钮\nconst handleClickOkBtn = () => emits('ok')\n// 点击弹窗的cacel按钮\nconst handleClickCancelBtn = () => emits('cancel')\n// 点击抽屉的x\nconst handleClickCloseBtn = () => emits('close')\n\n// 6.watch\n// 如果有数据并且输入框有内容则展开\nwatch(\n () => props.expandedKeys,\n keys => {\n if (keys) {\n newExpandedKeys.value = keys\n }\n },\n {\n deep: true\n }\n)\n</script>\n"],"names":["children"],"mappings":";;;;;;;;;;;;;;;;;AAyFA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAId,IAAM,MAAA,cAAA,GAAiB,IAAI,KAAK,CAAA,CAAA;AAChC,IAAM,MAAA,eAAA,GAAkB,GAAc,CAAA,EAAE,CAAA,CAAA;AAExC,IAAM,MAAA,WAAA,GAAc,IAAI,EAAE,CAAA,CAAA;AAC1B,IAAM,MAAA,GAAA,GAAM,gBAAgB,aAAa,CAAA,CAAA;AAGzC,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAIvB,IAAM,MAAA,eAAA,GAAkB,CAAC,QAAoB,KAAA;AAC3C,MAAA,MAAM,OAAc,EAAC,CAAA;AACrB,MAAM,MAAA,OAAA,GAAU,CAACA,SAAoB,KAAA;AACnC,QAAA,IAAIA,SAAU,EAAA;AACZ,UAAAA,SAAAA,CAAS,QAAQ,CAAQ,IAAA,KAAA;AACvB,YAAA,IAAA,CAAK,KAAK,IAAK,CAAA,KAAA,CAAM,UAAY,CAAA,KAAK,CAAE,CAAC,CAAA,CAAA;AACzC,YAAA,IAAI,IAAK,CAAA,KAAA,CAAM,UAAY,CAAA,UAAU,CAAE,CAAG,EAAA;AACxC,cAAA,OAAA,CAAQ,IAAK,CAAA,KAAA,CAAM,UAAY,CAAA,UAAU,CAAE,CAAC,CAAA,CAAA;AAAA,aAC9C;AAAA,WACD,CAAA,CAAA;AAAA,SACH;AAAA,OACF,CAAA;AACA,MAAA,OAAA,CAAQ,QAAQ,CAAA,CAAA;AAChB,MAA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M,EAAA;AACR,UAAA,eAAA,CAAgB,KAAQ,GAAA,IAAA,CAAA;AAAA,SAC1B;AAAA,OACF;AAAA,MACA;AAAA,QACE,IAAM,EAAA,IAAA;AAAA,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.full.js
CHANGED
|
@@ -16061,6 +16061,13 @@
|
|
|
16061
16061
|
|
|
16062
16062
|
const treeSearchOperateWayType = ["modal", "drawer", "none"];
|
|
16063
16063
|
const treeSearchProps = buildProps({
|
|
16064
|
+
/**
|
|
16065
|
+
* @description tree-operate操作栏的下拉菜单是否打开(用于如果展开的话,tree-operate不用隐藏)
|
|
16066
|
+
*/
|
|
16067
|
+
operateDropdownOpen: {
|
|
16068
|
+
type: Boolean,
|
|
16069
|
+
default: false
|
|
16070
|
+
},
|
|
16064
16071
|
/**
|
|
16065
16072
|
* @description loading
|
|
16066
16073
|
*/
|
|
@@ -21877,6 +21884,7 @@
|
|
|
21877
21884
|
}, null, 8, ["is-collapse-menu"]),
|
|
21878
21885
|
require$$0.createCommentVNode(" operate-tree "),
|
|
21879
21886
|
require$$0.createVNode(require$$0.unref(LlOperateTree), require$$0.mergeProps(require$$0.unref(attrs), {
|
|
21887
|
+
"operate-dropdown-open": _ctx.operateDropdownOpen,
|
|
21880
21888
|
loading: _ctx.loading,
|
|
21881
21889
|
"field-names": _ctx.fieldNames,
|
|
21882
21890
|
"tree-data": _ctx.treeData,
|
|
@@ -21901,7 +21909,7 @@
|
|
|
21901
21909
|
]),
|
|
21902
21910
|
_: 3
|
|
21903
21911
|
/* FORWARDED */
|
|
21904
|
-
}, 16, ["loading", "field-names", "tree-data", "expanded-keys"]),
|
|
21912
|
+
}, 16, ["operate-dropdown-open", "loading", "field-names", "tree-data", "expanded-keys"]),
|
|
21905
21913
|
require$$0.createCommentVNode(" \u64CD\u4F5C\u51FA\u73B0\u7684\u65B9\u5F0F "),
|
|
21906
21914
|
require$$0.createCommentVNode(" \u6A21\u6001\u6846 "),
|
|
21907
21915
|
_ctx.operateWay === "modal" ? (require$$0.openBlock(), require$$0.createBlock(_component_ll_modal, require$$0.mergeProps({ key: 0 }, _ctx.modalConfigProps, {
|