Commit bd56b391eaa41fa8a7c69817b61b84c7ab973e7c

Authored by Aresn
Committed by GitHub
2 parents 5d1b49d3 c7f705d0

Merge pull request #5489 from troy351/2.0

feature: add stopPropagation for Dropdown
Showing 1 changed file with 5 additions and 0 deletions   Show diff stats
src/components/dropdown/dropdown.vue
... ... @@ -57,6 +57,10 @@
57 57 transferClassName: {
58 58 type: String
59 59 },
  60 + stopPropagation: {
  61 + type: Boolean,
  62 + default: false
  63 + },
60 64 },
61 65 computed: {
62 66 transition () {
... ... @@ -164,6 +168,7 @@
164 168 },
165 169 mounted () {
166 170 this.$on('on-click', (key) => {
  171 + if (this.stopPropagation) return;
167 172 const $parent = this.hasParent();
168 173 if ($parent) $parent.$emit('on-click', key);
169 174 });
... ...