-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): add dropdown component
- Loading branch information
Showing
12 changed files
with
123 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { App } from 'vue' | ||
import Dropdown from './src/dropdown.vue' | ||
|
||
Dropdown.install = (Vue: App): void => { | ||
Vue.component(Dropdown.name, Dropdown) | ||
} | ||
|
||
export default Dropdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<el-dropdown class="emqx-dropdown"> | ||
<slot></slot> | ||
<template v-if="$slots.dropdown" #dropdown> | ||
<slot name="dropdown"></slot> | ||
</template> | ||
</el-dropdown> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { ElDropdown } from 'element-plus' | ||
export default defineComponent({ | ||
name: 'EmqxDropdown', | ||
components: { | ||
ElDropdown, | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { App } from 'vue' | ||
import DropdownItem from './src/dropdownItem.vue' | ||
|
||
DropdownItem.install = (Vue: App): void => { | ||
Vue.component(DropdownItem.name, DropdownItem) | ||
} | ||
|
||
export default DropdownItem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<el-dropdown-item class="emqx-dropdown-item"> | ||
<slot></slot> | ||
</el-dropdown-item> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { ElDropdownItem } from 'element-plus' | ||
export default defineComponent({ | ||
name: 'EmqxDropdownItem', | ||
components: { | ||
ElDropdownItem, | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { App } from 'vue' | ||
import DropdownMenu from './src/dropdownMenu.vue' | ||
|
||
DropdownMenu.install = (Vue: App): void => { | ||
Vue.component(DropdownMenu.name, DropdownMenu) | ||
} | ||
|
||
export default DropdownMenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<template> | ||
<el-dropdown-menu class="emqx-dropdown-menu"> | ||
<slot></slot> | ||
</el-dropdown-menu> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue' | ||
import { ElDropdownMenu } from 'element-plus' | ||
export default defineComponent({ | ||
name: 'EmqxDropdownMenu', | ||
components: { | ||
ElDropdownMenu, | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.el-dropdown__popper.el-popper[role="tooltip"] { | ||
border-radius: 8px; | ||
.el-popper__arrow { | ||
display: none; | ||
} | ||
.el-dropdown-menu { | ||
border-radius: 8px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
@import "menu-item.scss"; | ||
@import "select.scss"; | ||
@import "tags.scss"; | ||
@import "dropdown.scss"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters