ll-plus 2.7.7 → 2.7.9

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.
Files changed (38) hide show
  1. package/es/components/input/index.d.ts +6 -1
  2. package/es/components/input/src/input.d.ts +1 -0
  3. package/es/components/input/src/input.vue.d.ts +6 -1
  4. package/es/packages/components/input/src/input.mjs +7 -0
  5. package/es/packages/components/input/src/input.mjs.map +1 -1
  6. package/es/packages/components/input/src/input.vue2.mjs +4 -3
  7. package/es/packages/components/input/src/input.vue2.mjs.map +1 -1
  8. package/es/packages/components/operate-tree/src/operate-tree.vue2.mjs.map +1 -1
  9. package/es/packages/components/tree-search/src/components/directory-title.vue2.mjs +6 -2
  10. package/es/packages/components/tree-search/src/components/directory-title.vue2.mjs.map +1 -1
  11. package/es/packages/components/tree-search/src/tree-search.vue2.mjs +8 -2
  12. package/es/packages/components/tree-search/src/tree-search.vue2.mjs.map +1 -1
  13. package/index.full.js +23 -5
  14. package/index.full.min.js +3 -3
  15. package/index.full.min.js.map +1 -1
  16. package/index.full.min.mjs +11 -11
  17. package/index.full.min.mjs.map +1 -1
  18. package/index.full.mjs +23 -5
  19. package/lib/components/input/index.d.ts +6 -1
  20. package/lib/components/input/src/input.d.ts +1 -0
  21. package/lib/components/input/src/input.vue.d.ts +6 -1
  22. package/lib/packages/components/input/src/input.js +7 -0
  23. package/lib/packages/components/input/src/input.js.map +1 -1
  24. package/lib/packages/components/input/src/input.vue2.js +4 -3
  25. package/lib/packages/components/input/src/input.vue2.js.map +1 -1
  26. package/lib/packages/components/operate-tree/src/operate-tree.vue2.js.map +1 -1
  27. package/lib/packages/components/tree-search/src/components/directory-title.vue2.js +5 -1
  28. package/lib/packages/components/tree-search/src/components/directory-title.vue2.js.map +1 -1
  29. package/lib/packages/components/tree-search/src/tree-search.vue2.js +7 -1
  30. package/lib/packages/components/tree-search/src/tree-search.vue2.js.map +1 -1
  31. package/package.json +1 -1
  32. package/theme-chalk/css/easy-cron.css +1 -1
  33. package/theme-chalk/css/index.css +1 -1
  34. package/theme-chalk/fonts/iconfont.js +1 -1
  35. package/theme-chalk/fonts/iconfont.json +14 -0
  36. package/types/packages/components/input/index.d.ts +6 -1
  37. package/types/packages/components/input/src/input.d.ts +1 -0
  38. package/types/packages/components/input/src/input.vue.d.ts +6 -1
@@ -25,6 +25,7 @@ export declare const LlInput: import("ll-plus/es/utils").SFCWithInstall<import("
25
25
  __epPropKey: true;
26
26
  };
27
27
  readonly allowClear: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
28
+ readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
28
29
  }, {
29
30
  bem: {
30
31
  b: (blockSuffix?: string) => string;
@@ -37,6 +38,7 @@ export declare const LlInput: import("ll-plus/es/utils").SFCWithInstall<import("
37
38
  is: (name?: string) => string;
38
39
  };
39
40
  props: import("@vue/shared").LooseRequired<{
41
+ readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
40
42
  readonly allowClear: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
41
43
  readonly value?: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number | undefined) | ((new (...args: any[]) => string | number) | (() => string | number | undefined))[], unknown, unknown>;
42
44
  readonly suffixIcon?: string | undefined;
@@ -48,7 +50,7 @@ export declare const LlInput: import("ll-plus/es/utils").SFCWithInstall<import("
48
50
  innerValue: import("vue").Ref<string | number | undefined>;
49
51
  inputRef: import("vue").Ref<any>;
50
52
  isMouseOver: import("vue").Ref<boolean>;
51
- hasValue: import("vue").ComputedRef<boolean>;
53
+ hasValue: import("vue").ComputedRef<string | number | undefined>;
52
54
  handleMouseOver: () => void;
53
55
  handleMouseOut: () => void;
54
56
  componentType: ({
@@ -1314,6 +1316,7 @@ export declare const LlInput: import("ll-plus/es/utils").SFCWithInstall<import("
1314
1316
  }, {}>;
1315
1317
  computedAttrs: import("vue").ComputedRef<{
1316
1318
  props: import("@vue/shared").LooseRequired<{
1319
+ readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1317
1320
  readonly allowClear: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1318
1321
  readonly value?: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number | undefined) | ((new (...args: any[]) => string | number) | (() => string | number | undefined))[], unknown, unknown>;
1319
1322
  readonly suffixIcon?: string | undefined;
@@ -1349,9 +1352,11 @@ export declare const LlInput: import("ll-plus/es/utils").SFCWithInstall<import("
1349
1352
  __epPropKey: true;
1350
1353
  };
1351
1354
  readonly allowClear: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
1355
+ readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
1352
1356
  }>> & {
1353
1357
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1354
1358
  }, {
1359
+ readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1355
1360
  readonly allowClear: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1356
1361
  }, {}>>;
1357
1362
  export default LlInput;
@@ -27,6 +27,7 @@ export declare const inputProps: {
27
27
  __epPropKey: true;
28
28
  };
29
29
  readonly allowClear: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
30
+ readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
30
31
  };
31
32
  export type InputProps = ExtractPropTypes<typeof inputProps>;
32
33
  export type InputValue = AntInputProps['value'];
@@ -24,6 +24,7 @@ declare const _default: import("vue").DefineComponent<{
24
24
  __epPropKey: true;
25
25
  };
26
26
  readonly allowClear: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
27
+ readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
27
28
  }, {
28
29
  bem: {
29
30
  b: (blockSuffix?: string) => string;
@@ -36,6 +37,7 @@ declare const _default: import("vue").DefineComponent<{
36
37
  is: (name?: string) => string;
37
38
  };
38
39
  props: import("@vue/shared").LooseRequired<{
40
+ readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
39
41
  readonly allowClear: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
40
42
  readonly value?: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number | undefined) | ((new (...args: any[]) => string | number) | (() => string | number | undefined))[], unknown, unknown>;
41
43
  readonly suffixIcon?: string | undefined;
@@ -47,7 +49,7 @@ declare const _default: import("vue").DefineComponent<{
47
49
  innerValue: import("vue").Ref<string | number | undefined>;
48
50
  inputRef: import("vue").Ref<any>;
49
51
  isMouseOver: import("vue").Ref<boolean>;
50
- hasValue: import("vue").ComputedRef<boolean>;
52
+ hasValue: import("vue").ComputedRef<string | number | undefined>;
51
53
  handleMouseOver: () => void;
52
54
  handleMouseOut: () => void;
53
55
  componentType: ({
@@ -1313,6 +1315,7 @@ declare const _default: import("vue").DefineComponent<{
1313
1315
  }, {}>;
1314
1316
  computedAttrs: import("vue").ComputedRef<{
1315
1317
  props: import("@vue/shared").LooseRequired<{
1318
+ readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1316
1319
  readonly allowClear: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1317
1320
  readonly value?: import("ll-plus/es/utils").EpPropMergeType<(new (...args: any[]) => string | number) | (() => string | number | undefined) | ((new (...args: any[]) => string | number) | (() => string | number | undefined))[], unknown, unknown>;
1318
1321
  readonly suffixIcon?: string | undefined;
@@ -1348,9 +1351,11 @@ declare const _default: import("vue").DefineComponent<{
1348
1351
  __epPropKey: true;
1349
1352
  };
1350
1353
  readonly allowClear: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
1354
+ readonly disabled: import("ll-plus/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
1351
1355
  }>> & {
1352
1356
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
1353
1357
  }, {
1358
+ readonly disabled: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1354
1359
  readonly allowClear: import("ll-plus/es/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
1355
1360
  }, {}>;
1356
1361
  export default _default;
@@ -33,6 +33,13 @@ const inputProps = buildProps({
33
33
  allowClear: {
34
34
  type: Boolean,
35
35
  default: true
36
+ },
37
+ /**
38
+ * @description 是否禁用状态,默认为 false
39
+ */
40
+ disabled: {
41
+ type: Boolean,
42
+ default: false
36
43
  }
37
44
  });
38
45
 
@@ -1 +1 @@
1
- {"version":3,"file":"input.mjs","sources":["../../../../../../packages/components/input/src/input.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { InputProps as AntInputProps } from 'ant-design-vue'\nimport type Input from './input.vue'\n\nexport const inputProps = buildProps({\n /**\n * @description input的value\n */\n value: {\n type: definePropType<AntInputProps['value']>(String)\n },\n /**\n * @description 带有前缀图标的 input\n */\n prefixIcon: {\n type: String\n },\n /**\n * @description 带有后缀图标的 input\n */\n suffixIcon: {\n type: String\n },\n /**\n * @description 是否显示密码框\n */\n showPassword: {\n type: Boolean\n },\n /**\n * @description 是否点击清除图标删除内容\n */\n allowClear: {\n type: Boolean,\n default: true\n }\n} as const)\n\n// props\nexport type InputProps = ExtractPropTypes<typeof inputProps> // ExtractPropTypes和defineCpmponent类似\nexport type InputValue = AntInputProps['value']\n\n// instance\nexport type InputInstance = InstanceType<typeof Input>\n"],"names":[],"mappings":";;;;AAMO,MAAM,aAAa,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAA,EAAM,eAAuC,MAAM,CAAA;AAAA,GACrD;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,OAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AACF,CAAU;;;;"}
1
+ {"version":3,"file":"input.mjs","sources":["../../../../../../packages/components/input/src/input.ts"],"sourcesContent":["import { buildProps, definePropType } from '@ll-plus/utils'\n\nimport type { ExtractPropTypes } from 'vue'\nimport type { InputProps as AntInputProps } from 'ant-design-vue'\nimport type Input from './input.vue'\n\nexport const inputProps = buildProps({\n /**\n * @description input的value\n */\n value: {\n type: definePropType<AntInputProps['value']>(String)\n },\n /**\n * @description 带有前缀图标的 input\n */\n prefixIcon: {\n type: String\n },\n /**\n * @description 带有后缀图标的 input\n */\n suffixIcon: {\n type: String\n },\n /**\n * @description 是否显示密码框\n */\n showPassword: {\n type: Boolean\n },\n /**\n * @description 是否点击清除图标删除内容\n */\n allowClear: {\n type: Boolean,\n default: true\n },\n /**\n * @description 是否禁用状态,默认为 false\n */\n disabled: {\n type: Boolean,\n default: false\n }\n} as const)\n\n// props\nexport type InputProps = ExtractPropTypes<typeof inputProps> // ExtractPropTypes和defineCpmponent类似\nexport type InputValue = AntInputProps['value']\n\n// instance\nexport type InputInstance = InstanceType<typeof Input>\n"],"names":[],"mappings":";;;;AAMO,MAAM,aAAa,UAAW,CAAA;AAAA;AAAA;AAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAA,EAAM,eAAuC,MAAM,CAAA;AAAA,GACrD;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,YAAc,EAAA;AAAA,IACZ,IAAM,EAAA,OAAA;AAAA,GACR;AAAA;AAAA;AAAA;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,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;;;;"}
@@ -18,7 +18,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
18
18
  const innerValue = ref("");
19
19
  const inputRef = ref();
20
20
  const isMouseOver = ref(false);
21
- const hasValue = computed(() => innerValue.value !== "");
21
+ const hasValue = computed(() => innerValue.value);
22
22
  const handleMouseOver = () => {
23
23
  isMouseOver.value = true;
24
24
  };
@@ -69,8 +69,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
69
69
  value: innerValue.value,
70
70
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event),
71
71
  "allow-clear": props.allowClear,
72
+ disabled: props.disabled,
72
73
  class: {
73
- "show-clear-icon": props.allowClear && hasValue.value && isMouseOver.value
74
+ "show-clear-icon": props.allowClear && hasValue.value && isMouseOver.value && !props.disabled
74
75
  }
75
76
  }), createSlots({
76
77
  _: 2
@@ -104,7 +105,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
104
105
  ]),
105
106
  key: "1"
106
107
  } : void 0
107
- ]), 1040, ["value", "allow-clear", "class"]))
108
+ ]), 1040, ["value", "allow-clear", "disabled", "class"]))
108
109
  ],
109
110
  34
110
111
  /* CLASS, NEED_HYDRATION */
@@ -1 +1 @@
1
- {"version":3,"file":"input.vue2.mjs","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\" @mouseover=\"handleMouseOver\" @mouseout=\"handleMouseOut\">\n <component\n :is=\"componentType\"\n ref=\"inputRef\"\n v-bind=\"computedAttrs\"\n v-model:value=\"innerValue\"\n :allow-clear=\"props.allowClear\"\n :class=\"{\n 'show-clear-icon': props.allowClear && hasValue && isMouseOver\n }\"\n >\n <template v-for=\"item in Object.keys($slots)\" :key=\"item\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"prefixIcon\" #prefix>\n <ll-icon :icon-name=\"prefixIcon\" class=\"prefix-icon\" />\n </template>\n <template v-if=\"suffixIcon\" #suffix>\n <ll-icon :icon-name=\"suffixIcon\" class=\"suffix-icon\" />\n </template>\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, useAttrs, watch } from 'vue'\nimport { Input } from 'ant-design-vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport { InputValue, inputProps } from './input'\nimport { omit } from 'lodash'\n\ndefineOptions({ name: 'LlInput' })\n\nconst bem = createNamespace('input')\n\nconst props = defineProps(inputProps)\n\nconst emit = defineEmits(['update:value'])\n\nconst innerValue = ref<InputValue>('')\n\nconst inputRef = ref()\n\nconst isMouseOver = ref(false)\n\n// 判断当前输入框是否有值\nconst hasValue = computed(() => innerValue.value !== '')\n\n// 鼠标移入事件\nconst handleMouseOver = () => {\n isMouseOver.value = true\n}\n\n// 鼠标移出事件\nconst handleMouseOut = () => {\n isMouseOver.value = false\n}\n\n// 监听props.value的变化\nwatch(\n () => props.value,\n newValue => {\n innerValue.value = newValue\n },\n {\n immediate: true\n }\n)\n\n// 监听innerValue的变化,触发update:value事件\nwatch(\n innerValue,\n newValue => {\n emit('update:value', newValue)\n },\n {\n immediate: true\n }\n)\n\n// 根据showPassword属性决定组件类型\nconst componentType = props.showPassword ? Input.Password : Input\n\n// 计算属性,合并attrs和props\nconst computedAttrs = computed(() => {\n const attrs = { ...omit(useAttrs(), ['class', 'style']), props }\n return attrs\n})\n\n// 聚焦输入框\nconst focus = () => {\n inputRef.value.focus()\n}\n\n// 公开focus方法\ndefineExpose({ focus })\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAkCA,IAAM,MAAA,GAAA,GAAM,gBAAgB,OAAO,CAAA,CAAA;AAEnC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,UAAA,GAAa,IAAgB,EAAE,CAAA,CAAA;AAErC,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,WAAA,GAAc,IAAI,KAAK,CAAA,CAAA;AAG7B,IAAA,MAAM,QAAW,GAAA,QAAA,CAAS,MAAM,UAAA,CAAW,UAAU,EAAE,CAAA,CAAA;AAGvD,IAAA,MAAM,kBAAkB,MAAM;AAC5B,MAAA,WAAA,CAAY,KAAQ,GAAA,IAAA,CAAA;AAAA,KACtB,CAAA;AAGA,IAAA,MAAM,iBAAiB,MAAM;AAC3B,MAAA,WAAA,CAAY,KAAQ,GAAA,KAAA,CAAA;AAAA,KACtB,CAAA;AAGA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAY,QAAA,KAAA;AACV,QAAA,UAAA,CAAW,KAAQ,GAAA,QAAA,CAAA;AAAA,OACrB;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAGA,IAAA,KAAA;AAAA,MACE,UAAA;AAAA,MACA,CAAY,QAAA,KAAA;AACV,QAAA,IAAA,CAAK,gBAAgB,QAAQ,CAAA,CAAA;AAAA,OAC/B;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAGA,IAAA,MAAM,aAAgB,GAAA,KAAA,CAAM,YAAe,GAAA,KAAA,CAAM,QAAW,GAAA,KAAA,CAAA;AAG5D,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAM,MAAA,KAAA,GAAQ,EAAE,GAAG,IAAK,CAAA,QAAA,EAAY,EAAA,CAAC,OAAS,EAAA,OAAO,CAAC,CAAA,EAAG,KAAM,EAAA,CAAA;AAC/D,MAAO,OAAA,KAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAGD,IAAA,MAAM,QAAQ,MAAM;AAClB,MAAA,QAAA,CAAS,MAAM,KAAM,EAAA,CAAA;AAAA,KACvB,CAAA;AAGA,IAAa,QAAA,CAAA,EAAE,OAAO,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"input.vue2.mjs","sources":["../../../../../../packages/components/input/src/input.vue"],"sourcesContent":["<template>\n <div :class=\"bem.b()\" @mouseover=\"handleMouseOver\" @mouseout=\"handleMouseOut\">\n <component\n :is=\"componentType\"\n ref=\"inputRef\"\n v-bind=\"computedAttrs\"\n v-model:value=\"innerValue\"\n :allow-clear=\"props.allowClear\"\n :disabled=\"props.disabled\"\n :class=\"{\n 'show-clear-icon':\n props.allowClear && hasValue && isMouseOver && !props.disabled\n }\"\n >\n <template v-for=\"item in Object.keys($slots)\" :key=\"item\" #[item]=\"data\">\n <slot :name=\"item\" v-bind=\"data || {}\"></slot>\n </template>\n <template v-if=\"prefixIcon\" #prefix>\n <ll-icon :icon-name=\"prefixIcon\" class=\"prefix-icon\" />\n </template>\n <template v-if=\"suffixIcon\" #suffix>\n <ll-icon :icon-name=\"suffixIcon\" class=\"suffix-icon\" />\n </template>\n </component>\n </div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, computed, useAttrs, watch } from 'vue'\nimport { Input } from 'ant-design-vue'\nimport { createNamespace } from '@ll-plus/utils'\nimport { InputValue, inputProps } from './input'\nimport { omit } from 'lodash'\n\ndefineOptions({ name: 'LlInput' })\n\nconst bem = createNamespace('input')\n\nconst props = defineProps(inputProps)\n\nconst emit = defineEmits(['update:value'])\n\nconst innerValue = ref<InputValue>('')\n\nconst inputRef = ref()\n\nconst isMouseOver = ref(false)\n\n// 判断当前输入框是否有值\nconst hasValue = computed(() => innerValue.value)\n\n// 鼠标移入事件\nconst handleMouseOver = () => {\n isMouseOver.value = true\n}\n\n// 鼠标移出事件\nconst handleMouseOut = () => {\n isMouseOver.value = false\n}\n\n// 监听props.value的变化\nwatch(\n () => props.value,\n newValue => {\n innerValue.value = newValue\n },\n {\n immediate: true\n }\n)\n\n// 监听innerValue的变化,触发update:value事件\nwatch(\n innerValue,\n newValue => {\n emit('update:value', newValue)\n },\n {\n immediate: true\n }\n)\n\n// 根据showPassword属性决定组件类型\nconst componentType = props.showPassword ? Input.Password : Input\n\n// 计算属性,合并attrs和props\nconst computedAttrs = computed(() => {\n const attrs = { ...omit(useAttrs(), ['class', 'style']), props }\n return attrs\n})\n\n// 聚焦输入框\nconst focus = () => {\n inputRef.value.focus()\n}\n\n// 公开focus方法\ndefineExpose({ focus })\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAoCA,IAAM,MAAA,GAAA,GAAM,gBAAgB,OAAO,CAAA,CAAA;AAEnC,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AAEd,IAAA,MAAM,IAAO,GAAA,MAAA,CAAA;AAEb,IAAM,MAAA,UAAA,GAAa,IAAgB,EAAE,CAAA,CAAA;AAErC,IAAA,MAAM,WAAW,GAAI,EAAA,CAAA;AAErB,IAAM,MAAA,WAAA,GAAc,IAAI,KAAK,CAAA,CAAA;AAG7B,IAAA,MAAM,QAAW,GAAA,QAAA,CAAS,MAAM,UAAA,CAAW,KAAK,CAAA,CAAA;AAGhD,IAAA,MAAM,kBAAkB,MAAM;AAC5B,MAAA,WAAA,CAAY,KAAQ,GAAA,IAAA,CAAA;AAAA,KACtB,CAAA;AAGA,IAAA,MAAM,iBAAiB,MAAM;AAC3B,MAAA,WAAA,CAAY,KAAQ,GAAA,KAAA,CAAA;AAAA,KACtB,CAAA;AAGA,IAAA,KAAA;AAAA,MACE,MAAM,KAAM,CAAA,KAAA;AAAA,MACZ,CAAY,QAAA,KAAA;AACV,QAAA,UAAA,CAAW,KAAQ,GAAA,QAAA,CAAA;AAAA,OACrB;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAGA,IAAA,KAAA;AAAA,MACE,UAAA;AAAA,MACA,CAAY,QAAA,KAAA;AACV,QAAA,IAAA,CAAK,gBAAgB,QAAQ,CAAA,CAAA;AAAA,OAC/B;AAAA,MACA;AAAA,QACE,SAAW,EAAA,IAAA;AAAA,OACb;AAAA,KACF,CAAA;AAGA,IAAA,MAAM,aAAgB,GAAA,KAAA,CAAM,YAAe,GAAA,KAAA,CAAM,QAAW,GAAA,KAAA,CAAA;AAG5D,IAAM,MAAA,aAAA,GAAgB,SAAS,MAAM;AACnC,MAAM,MAAA,KAAA,GAAQ,EAAE,GAAG,IAAK,CAAA,QAAA,EAAY,EAAA,CAAC,OAAS,EAAA,OAAO,CAAC,CAAA,EAAG,KAAM,EAAA,CAAA;AAC/D,MAAO,OAAA,KAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAGD,IAAA,MAAM,QAAQ,MAAM;AAClB,MAAA,QAAA,CAAS,MAAM,KAAM,EAAA,CAAA;AAAA,KACvB,CAAA;AAGA,IAAa,QAAA,CAAA,EAAE,OAAO,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"operate-tree.vue2.mjs","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 && hoverTreeNodeItem[fieldNames!['key']!] === slots[fieldNames!['key']!] ? bem.is('open') : 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":[],"mappings":";;;;;;;;;;;;;AAuEA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAGd,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAGvB,IAAM,MAAA,eAAA,GAAkB,GAAc,CAAA,EAAE,CAAA,CAAA;AACxC,IAAA,MAAM,oBAAoB,GAAI,EAAA,CAAA;AAC9B,IAAM,MAAA,GAAA,GAAM,gBAAgB,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,IAAA,KAAA;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,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"operate-tree.vue2.mjs","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":[],"mappings":";;;;;;;;;;;;;AA2EA,IAAA,MAAM,KAAQ,GAAA,OAAA,CAAA;AACd,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAGd,IAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAGvB,IAAM,MAAA,eAAA,GAAkB,GAAc,CAAA,EAAE,CAAA,CAAA;AACxC,IAAA,MAAM,oBAAoB,GAAI,EAAA,CAAA;AAC9B,IAAM,MAAA,GAAA,GAAM,gBAAgB,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,IAAA,KAAA;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,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createVNode, createCommentVNode, withCtx, toDisplayString, createBlock } from 'vue';
1
+ import { defineComponent, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createElementVNode, createVNode, renderSlot, createTextVNode, createCommentVNode, withCtx, toDisplayString, createBlock } from 'vue';
2
2
  import '../../../../utils/index.mjs';
3
3
  import '../config/index.mjs';
4
4
  import { treeSelectDirectoryTitleProps, treeSelectDirectoryTitleEmits } from '../config/directory-title.mjs';
@@ -38,7 +38,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
38
38
  {
39
39
  class: normalizeClass(unref(bem).e("directory-text"))
40
40
  },
41
- "\u76EE\u5F55",
41
+ [
42
+ renderSlot(_ctx.$slots, "title", {}, () => [
43
+ createTextVNode("\u76EE\u5F55")
44
+ ])
45
+ ],
42
46
  2
43
47
  /* CLASS */
44
48
  )
@@ -1 +1 @@
1
- {"version":3,"file":"directory-title.vue2.mjs","sources":["../../../../../../../packages/components/tree-search/src/components/directory-title.vue"],"sourcesContent":["<template>\n <div :class=\"bem.e('directory-title')\">\n <div :class=\"bem.e('directory-title-container')\">\n <ll-icon :class=\"bem.e('directory-icon')\" icon-name=\"icon-list\" />\n <span :class=\"bem.e('directory-text')\">目录</span>\n </div>\n <!-- 展开/收起 -->\n <ll-tooltip placement=\"top\" :tip=\"isCollapseMenu ? '全部收起' : '全部展开'\">\n <template #title>\n <span>{{ isCollapseMenu ? '全部收起' : '全部展开' }}</span>\n </template>\n <ll-button\n type=\"text\"\n :class=\"bem.e('directory-button')\"\n @click=\"emits('collapseMenu')\"\n >\n <template v-if=\"isCollapseMenu\">\n <ll-icon :class=\"bem.e('directory-icon')\" icon-name=\"icon-expand\" />\n </template>\n <template v-else>\n <ll-icon :class=\"bem.e('directory-icon')\" icon-name=\"icon-collapse\" />\n </template>\n </ll-button>\n </ll-tooltip>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@ll-plus/utils'\nimport {\n treeSelectDirectoryTitleProps,\n treeSelectDirectoryTitleEmits\n} from '../config'\n\ndefineOptions({ name: 'LlTreeSelectDirectoryTitle' })\n\ndefineProps(treeSelectDirectoryTitleProps)\nconst emits = defineEmits(treeSelectDirectoryTitleEmits)\n\nconst bem = createNamespace('tree-search')\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAoCA,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,GAAA,GAAM,gBAAgB,aAAa,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"directory-title.vue2.mjs","sources":["../../../../../../../packages/components/tree-search/src/components/directory-title.vue"],"sourcesContent":["<template>\n <div :class=\"bem.e('directory-title')\">\n <div :class=\"bem.e('directory-title-container')\">\n <ll-icon :class=\"bem.e('directory-icon')\" icon-name=\"icon-list\" />\n <span :class=\"bem.e('directory-text')\">\n <slot name=\"title\">目录</slot>\n </span>\n </div>\n <!-- 展开/收起 -->\n <ll-tooltip placement=\"top\" :tip=\"isCollapseMenu ? '全部收起' : '全部展开'\">\n <template #title>\n <span>{{ isCollapseMenu ? '全部收起' : '全部展开' }}</span>\n </template>\n <ll-button\n type=\"text\"\n :class=\"bem.e('directory-button')\"\n @click=\"emits('collapseMenu')\"\n >\n <template v-if=\"isCollapseMenu\">\n <ll-icon :class=\"bem.e('directory-icon')\" icon-name=\"icon-expand\" />\n </template>\n <template v-else>\n <ll-icon :class=\"bem.e('directory-icon')\" icon-name=\"icon-collapse\" />\n </template>\n </ll-button>\n </ll-tooltip>\n </div>\n</template>\n<script lang=\"ts\" setup>\nimport { createNamespace } from '@ll-plus/utils'\nimport {\n treeSelectDirectoryTitleProps,\n treeSelectDirectoryTitleEmits\n} from '../config'\n\ndefineOptions({ name: 'LlTreeSelectDirectoryTitle' })\n\ndefineProps(treeSelectDirectoryTitleProps)\nconst emits = defineEmits(treeSelectDirectoryTitleEmits)\n\nconst bem = createNamespace('tree-search')\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;AAsCA,IAAA,MAAM,KAAQ,GAAA,MAAA,CAAA;AAEd,IAAM,MAAA,GAAA,GAAM,gBAAgB,aAAa,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, useAttrs, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createVNode, mergeProps, withCtx, renderSlot, normalizeProps, guardReactiveProps, createBlock, Fragment } from 'vue';
1
+ import { defineComponent, ref, useAttrs, watch, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, createCommentVNode, createVNode, withCtx, renderSlot, mergeProps, normalizeProps, guardReactiveProps, createBlock, Fragment } from 'vue';
2
2
  import '../../../utils/index.mjs';
3
3
  import './config/index.mjs';
4
4
  import HeaderSearch from './components/header-search.vue.mjs';
@@ -89,7 +89,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
89
89
  createVNode(DirectoryTitle, {
90
90
  "is-collapse-menu": isCollapseMenu.value,
91
91
  onCollapseMenu: handleCollapseMenu
92
- }, null, 8, ["is-collapse-menu"]),
92
+ }, {
93
+ title: withCtx(() => [
94
+ renderSlot(_ctx.$slots, "directoryTitle")
95
+ ]),
96
+ _: 3
97
+ /* FORWARDED */
98
+ }, 8, ["is-collapse-menu"]),
93
99
  createCommentVNode(" operate-tree "),
94
100
  createVNode(unref(LlOperateTree), mergeProps(unref(attrs), {
95
101
  "operate-dropdown-open": _ctx.operateDropdownOpen,
@@ -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 :is-show-add-btn=\"isShowAddBtn\"\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// 输入框内容\n// const 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 props.onSearchInputChange && props.onSearchInputChange(v)\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":";;;;;;;;;;;;;;;;;AA0FA,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;AAGxC,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,MAAO,OAAA,IAAA,CAAA;AAAA,KACT,CAAA;AACA,IAAA,MAAM,qBAAqB,MAAM;AAC/B,MAAe,cAAA,CAAA,KAAA,GAAQ,CAAC,cAAe,CAAA,KAAA,CAAA;AACvC,MAAA,IAAI,eAAe,KAAO,EAAA;AACxB,QAAgB,eAAA,CAAA,KAAA,GAAQ,eAAgB,CAAA,KAAA,CAAM,QAAS,CAAA,CAAA;AAAA,OAClD,MAAA;AACL,QAAA,eAAA,CAAgB,QAAQ,EAAC,CAAA;AAAA,OAC3B;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,uBAAA,GAA0B,CAAC,CAAc,KAAA;AAC7C,MAAM,KAAA,CAAA,mBAAA,IAAuB,KAAM,CAAA,mBAAA,CAAoB,CAAC,CAAA,CAAA;AAAA,KAC1D,CAAA;AAEA,IAAM,MAAA,iBAAA,GAAoB,MAAM,KAAA,CAAM,UAAU,CAAA,CAAA;AAEhD,IAAM,MAAA,gBAAA,GAAmB,CAAC,YAAA,EAAwB,IAAc,KAAA;AAC9D,MAAM,KAAA,CAAA,QAAA,EAAU,cAAc,IAAI,CAAA,CAAA;AAAA,KACpC,CAAA;AAEA,IAAM,MAAA,gBAAA,GAAmB,CAAC,IAAA,EAAgB,CAAW,KAAA;AACnD,MAAM,KAAA,CAAA,QAAA,EAAU,MAAM,CAAC,CAAA,CAAA;AAAA,KACzB,CAAA;AAEA,IAAM,MAAA,gBAAA,GAAmB,MAAM,KAAA,CAAM,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,oBAAA,GAAuB,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAEjD,IAAM,MAAA,mBAAA,GAAsB,MAAM,KAAA,CAAM,OAAO,CAAA,CAAA;AAI/C,IAAA,KAAA;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,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
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 :is-show-add-btn=\"isShowAddBtn\"\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 <template #title>\n <slot name=\"directoryTitle\"></slot>\n </template>\n </directory-title>\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// 输入框内容\n// const 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 props.onSearchInputChange && props.onSearchInputChange(v)\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":";;;;;;;;;;;;;;;;;AA8FA,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;AAGxC,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,MAAO,OAAA,IAAA,CAAA;AAAA,KACT,CAAA;AACA,IAAA,MAAM,qBAAqB,MAAM;AAC/B,MAAe,cAAA,CAAA,KAAA,GAAQ,CAAC,cAAe,CAAA,KAAA,CAAA;AACvC,MAAA,IAAI,eAAe,KAAO,EAAA;AACxB,QAAgB,eAAA,CAAA,KAAA,GAAQ,eAAgB,CAAA,KAAA,CAAM,QAAS,CAAA,CAAA;AAAA,OAClD,MAAA;AACL,QAAA,eAAA,CAAgB,QAAQ,EAAC,CAAA;AAAA,OAC3B;AAAA,KACF,CAAA;AAEA,IAAM,MAAA,uBAAA,GAA0B,CAAC,CAAc,KAAA;AAC7C,MAAM,KAAA,CAAA,mBAAA,IAAuB,KAAM,CAAA,mBAAA,CAAoB,CAAC,CAAA,CAAA;AAAA,KAC1D,CAAA;AAEA,IAAM,MAAA,iBAAA,GAAoB,MAAM,KAAA,CAAM,UAAU,CAAA,CAAA;AAEhD,IAAM,MAAA,gBAAA,GAAmB,CAAC,YAAA,EAAwB,IAAc,KAAA;AAC9D,MAAM,KAAA,CAAA,QAAA,EAAU,cAAc,IAAI,CAAA,CAAA;AAAA,KACpC,CAAA;AAEA,IAAM,MAAA,gBAAA,GAAmB,CAAC,IAAA,EAAgB,CAAW,KAAA;AACnD,MAAM,KAAA,CAAA,QAAA,EAAU,MAAM,CAAC,CAAA,CAAA;AAAA,KACzB,CAAA;AAEA,IAAM,MAAA,gBAAA,GAAmB,MAAM,KAAA,CAAM,IAAI,CAAA,CAAA;AAEzC,IAAM,MAAA,oBAAA,GAAuB,MAAM,KAAA,CAAM,QAAQ,CAAA,CAAA;AAEjD,IAAM,MAAA,mBAAA,GAAsB,MAAM,KAAA,CAAM,OAAO,CAAA,CAAA;AAI/C,IAAA,KAAA;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,OACR;AAAA,KACF,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/index.full.js CHANGED
@@ -63206,6 +63206,13 @@
63206
63206
  allowClear: {
63207
63207
  type: Boolean,
63208
63208
  default: true
63209
+ },
63210
+ /**
63211
+ * @description 是否禁用状态,默认为 false
63212
+ */
63213
+ disabled: {
63214
+ type: Boolean,
63215
+ default: false
63209
63216
  }
63210
63217
  });
63211
63218
 
@@ -68710,7 +68717,7 @@
68710
68717
  const innerValue = require$$0.ref("");
68711
68718
  const inputRef = require$$0.ref();
68712
68719
  const isMouseOver = require$$0.ref(false);
68713
- const hasValue = require$$0.computed(() => innerValue.value !== "");
68720
+ const hasValue = require$$0.computed(() => innerValue.value);
68714
68721
  const handleMouseOver = () => {
68715
68722
  isMouseOver.value = true;
68716
68723
  };
@@ -68761,8 +68768,9 @@
68761
68768
  value: innerValue.value,
68762
68769
  "onUpdate:value": _cache[0] || (_cache[0] = ($event) => innerValue.value = $event),
68763
68770
  "allow-clear": props.allowClear,
68771
+ disabled: props.disabled,
68764
68772
  class: {
68765
- "show-clear-icon": props.allowClear && hasValue.value && isMouseOver.value
68773
+ "show-clear-icon": props.allowClear && hasValue.value && isMouseOver.value && !props.disabled
68766
68774
  }
68767
68775
  }), require$$0.createSlots({
68768
68776
  _: 2
@@ -68796,7 +68804,7 @@
68796
68804
  ]),
68797
68805
  key: "1"
68798
68806
  } : void 0
68799
- ]), 1040, ["value", "allow-clear", "class"]))
68807
+ ]), 1040, ["value", "allow-clear", "disabled", "class"]))
68800
68808
  ],
68801
68809
  34
68802
68810
  /* CLASS, NEED_HYDRATION */
@@ -83309,7 +83317,11 @@
83309
83317
  {
83310
83318
  class: require$$0.normalizeClass(require$$0.unref(bem).e("directory-text"))
83311
83319
  },
83312
- "\u76EE\u5F55",
83320
+ [
83321
+ require$$0.renderSlot(_ctx.$slots, "title", {}, () => [
83322
+ require$$0.createTextVNode("\u76EE\u5F55")
83323
+ ])
83324
+ ],
83313
83325
  2
83314
83326
  /* CLASS */
83315
83327
  )
@@ -83445,7 +83457,13 @@
83445
83457
  require$$0.createVNode(DirectoryTitle, {
83446
83458
  "is-collapse-menu": isCollapseMenu.value,
83447
83459
  onCollapseMenu: handleCollapseMenu
83448
- }, null, 8, ["is-collapse-menu"]),
83460
+ }, {
83461
+ title: require$$0.withCtx(() => [
83462
+ require$$0.renderSlot(_ctx.$slots, "directoryTitle")
83463
+ ]),
83464
+ _: 3
83465
+ /* FORWARDED */
83466
+ }, 8, ["is-collapse-menu"]),
83449
83467
  require$$0.createCommentVNode(" operate-tree "),
83450
83468
  require$$0.createVNode(require$$0.unref(LlOperateTree), require$$0.mergeProps(require$$0.unref(attrs), {
83451
83469
  "operate-dropdown-open": _ctx.operateDropdownOpen,