From 7773c132215deba7aaeaca33f862af9a0f13ded3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Fri, 26 May 2023 14:58:40 +0300 Subject: [PATCH] Refactor #3965 - For TreeSelect --- components/lib/treeselect/BaseTreeSelect.vue | 187 +++++++++++++++++ components/lib/treeselect/TreeSelect.d.ts | 12 +- components/lib/treeselect/TreeSelect.vue | 200 ++----------------- 3 files changed, 218 insertions(+), 181 deletions(-) create mode 100644 components/lib/treeselect/BaseTreeSelect.vue diff --git a/components/lib/treeselect/BaseTreeSelect.vue b/components/lib/treeselect/BaseTreeSelect.vue new file mode 100644 index 000000000..fe42ddd1c --- /dev/null +++ b/components/lib/treeselect/BaseTreeSelect.vue @@ -0,0 +1,187 @@ + diff --git a/components/lib/treeselect/TreeSelect.d.ts b/components/lib/treeselect/TreeSelect.d.ts index b55d0ce25..7736e7a60 100644 --- a/components/lib/treeselect/TreeSelect.d.ts +++ b/components/lib/treeselect/TreeSelect.d.ts @@ -196,6 +196,11 @@ export interface TreeSelectProps { * @type {TreeSelectPassThroughOptions} */ pt?: TreeSelectPassThroughOptions; + /** + * When enabled, it removes component related styles in the core. + * @defaultValue false + */ + unstyled?: boolean; } /** @@ -256,7 +261,12 @@ export interface TreeSelectSlots { /** * Custom indicator template. */ - triggericon(): VNode[]; + triggericon(scope: { + /** + * Style class of the icon. + */ + class: string; + }): VNode[]; /** * Custom item toggler icon template. * @param {Object} scope - item toggler icon slot's params. diff --git a/components/lib/treeselect/TreeSelect.vue b/components/lib/treeselect/TreeSelect.vue index 4e1659505..02c101f4b 100644 --- a/components/lib/treeselect/TreeSelect.vue +++ b/components/lib/treeselect/TreeSelect.vue @@ -1,6 +1,6 @@ - -