fuchengshen
2022-07-09 3a25c05b5ab837714f30469cdcb1e2a77d8d7f6c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { Dropdown } from "ant-design-vue"
import { App, defineComponent, h } from "vue"
import "./dropdown.less"
 
/**
 * 下拉菜单
 *
 * @copyright 火星科技 mars3d.cn
 * @author 木遥 2022-01-01
 */
 
const MarsDropdown = defineComponent({
  name: "mars-dropdown-menu",
  inheritAttrs: false,
  setup(props, context) {
    return () => h(Dropdown, { ...context.attrs, ...props, overlayClassName: "mars-dropdown-menu" }, context.slots)
  }
})
 
export function install(app: App): App {
  app.component(MarsDropdown.name, MarsDropdown)
  return app
}
export default MarsDropdown