From 68b7ebbfdbdc4194c3eccd0f7de8ebc153983917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E7=81=8F?= Date: Tue, 23 Jun 2020 17:09:23 +0800 Subject: [PATCH] Tree support contextmenu --- examples/routers/tree.vue | 27 ++++++++++++++++++++++++--- src/components/tree/node.vue | 8 +++++++- src/components/tree/tree.vue | 29 ++++++++++++++++++++++++++++- src/styles/components/tree.less | 5 +++++ 4 files changed, 64 insertions(+), 5 deletions(-) diff --git a/examples/routers/tree.vue b/examples/routers/tree.vue index 1aa3f3e4..2c123d55 100644 --- a/examples/routers/tree.vue +++ b/examples/routers/tree.vue @@ -1,5 +1,10 @@ diff --git a/src/styles/components/tree.less b/src/styles/components/tree.less index 3ea68618..efecc381 100644 --- a/src/styles/components/tree.less +++ b/src/styles/components/tree.less @@ -1,6 +1,7 @@ @tree-prefix-cls: ~"@{css-prefix}tree"; .@{tree-prefix-cls} { + position: relative; ul{ list-style: none; margin: 0; @@ -75,4 +76,8 @@ margin-right: 4px; margin-left: 4px; } + + &-context-menu{ + position: absolute; + } }