vxe-pc-ui 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +48 -5
- package/es/anchor/index.js +8 -0
- package/es/anchor/src/anchor.js +202 -0
- package/es/anchor/style.css +40 -0
- package/es/anchor/style.min.css +1 -0
- package/es/anchor-link/index.js +8 -0
- package/es/anchor-link/src/anchor-link.js +94 -0
- package/es/anchor-link/src/util.js +19 -0
- package/es/anchor-link/style.css +0 -0
- package/es/anchor-link/style.min.css +0 -0
- package/es/breadcrumb/index.js +8 -0
- package/es/breadcrumb/src/breadcrumb.js +44 -0
- package/es/breadcrumb/style.css +19 -0
- package/es/breadcrumb/style.min.css +1 -0
- package/es/breadcrumb-item/index.js +8 -0
- package/es/breadcrumb-item/src/breadcrumb-item.js +54 -0
- package/es/breadcrumb-item/style.css +0 -0
- package/es/breadcrumb-item/style.min.css +0 -0
- package/es/button/index.js +8 -0
- package/es/button/src/button.js +487 -0
- package/es/button/style.css +513 -0
- package/es/button/style.min.css +1 -0
- package/es/button-group/index.js +8 -0
- package/es/button-group/src/button-group.js +66 -0
- package/es/button-group/style.css +0 -0
- package/es/button-group/style.min.css +0 -0
- package/es/col/index.js +8 -0
- package/es/col/src/col.js +80 -0
- package/es/col/style.css +95 -0
- package/es/col/style.min.css +1 -0
- package/es/components.js +57 -0
- package/es/design/index.js +8 -0
- package/es/design/src/design.js +41 -0
- package/es/design/style.css +0 -0
- package/es/design/style.min.css +0 -0
- package/es/hooks/size.js +10 -0
- package/es/icon/index.js +8 -0
- package/es/icon/src/icon.js +24 -0
- package/es/icon/style.css +766 -0
- package/es/icon/style.min.css +1 -0
- package/es/index.esm.js +3 -0
- package/es/layout-aside/index.js +8 -0
- package/es/layout-aside/src/layout-aside.js +68 -0
- package/es/layout-aside/style.css +12 -0
- package/es/layout-aside/style.min.css +1 -0
- package/es/layout-body/index.js +8 -0
- package/es/layout-body/src/layout-body.js +37 -0
- package/es/layout-body/style.css +3 -0
- package/es/layout-body/style.min.css +1 -0
- package/es/layout-container/index.js +8 -0
- package/es/layout-container/src/layout-container.js +41 -0
- package/es/layout-container/style.css +10 -0
- package/es/layout-container/style.min.css +1 -0
- package/es/layout-footer/index.js +8 -0
- package/es/layout-footer/src/layout-footer.js +41 -0
- package/es/layout-footer/style.css +10 -0
- package/es/layout-footer/style.min.css +1 -0
- package/es/layout-header/index.js +8 -0
- package/es/layout-header/src/layout-header.js +41 -0
- package/es/layout-header/style.css +10 -0
- package/es/layout-header/style.min.css +1 -0
- package/es/locale/lang/en-US.d.ts +2 -0
- package/es/locale/lang/en-US.js +463 -0
- package/es/locale/lang/es-ES.d.ts +2 -0
- package/es/locale/lang/es-ES.js +463 -0
- package/es/locale/lang/ja-JP.d.ts +2 -0
- package/es/locale/lang/ja-JP.js +463 -0
- package/es/locale/lang/pt-BR.d.ts +2 -0
- package/es/locale/lang/pt-BR.js +463 -0
- package/es/locale/lang/zh-CN.d.ts +2 -0
- package/es/locale/lang/zh-CN.js +463 -0
- package/es/locale/lang/zh-HK.d.ts +2 -0
- package/es/locale/lang/zh-HK.js +2 -0
- package/es/locale/lang/zh-MO.d.ts +2 -0
- package/es/locale/lang/zh-MO.js +2 -0
- package/es/locale/lang/zh-TC.d.ts +2 -0
- package/es/locale/lang/zh-TC.js +463 -0
- package/es/locale/lang/zh-TW.d.ts +2 -0
- package/es/locale/lang/zh-TW.js +2 -0
- package/es/row/index.js +8 -0
- package/es/row/src/row.js +69 -0
- package/es/row/style.css +10 -0
- package/es/row/style.min.css +1 -0
- package/es/style.css +1 -0
- package/es/style.min.css +1 -0
- package/es/ui/index.js +4 -0
- package/es/ui/src/core.js +41 -0
- package/es/ui/src/dom.js +90 -0
- package/es/ui/src/event.js +75 -0
- package/es/ui/src/globalStore.js +8 -0
- package/es/ui/src/iconStore.js +76 -0
- package/es/ui/src/log.js +13 -0
- package/es/ui/src/theme.js +10 -0
- package/es/ui/src/utils.js +17 -0
- package/es/ui/style.css +0 -0
- package/es/ui/style.min.css +0 -0
- package/es/vxe-anchor/index.js +3 -0
- package/es/vxe-anchor/style.css +40 -0
- package/es/vxe-anchor/style.min.css +1 -0
- package/es/vxe-anchor-link/index.js +3 -0
- package/es/vxe-anchor-link/style.css +0 -0
- package/es/vxe-anchor-link/style.min.css +0 -0
- package/es/vxe-breadcrumb/index.js +3 -0
- package/es/vxe-breadcrumb/style.css +19 -0
- package/es/vxe-breadcrumb/style.min.css +1 -0
- package/es/vxe-breadcrumb-item/index.js +3 -0
- package/es/vxe-breadcrumb-item/style.css +0 -0
- package/es/vxe-breadcrumb-item/style.min.css +0 -0
- package/es/vxe-button/index.js +3 -0
- package/es/vxe-button/style.css +513 -0
- package/es/vxe-button/style.min.css +1 -0
- package/es/vxe-button-group/index.js +3 -0
- package/es/vxe-button-group/style.css +0 -0
- package/es/vxe-button-group/style.min.css +0 -0
- package/es/vxe-col/index.js +3 -0
- package/es/vxe-col/style.css +95 -0
- package/es/vxe-col/style.min.css +1 -0
- package/es/vxe-design/index.js +3 -0
- package/es/vxe-design/style.css +0 -0
- package/es/vxe-design/style.min.css +0 -0
- package/es/vxe-icon/index.js +3 -0
- package/es/vxe-icon/style.css +766 -0
- package/es/vxe-icon/style.min.css +1 -0
- package/es/vxe-layout-aside/index.js +3 -0
- package/es/vxe-layout-aside/style.css +12 -0
- package/es/vxe-layout-aside/style.min.css +1 -0
- package/es/vxe-layout-body/index.js +3 -0
- package/es/vxe-layout-body/style.css +3 -0
- package/es/vxe-layout-body/style.min.css +1 -0
- package/es/vxe-layout-container/index.js +3 -0
- package/es/vxe-layout-container/style.css +10 -0
- package/es/vxe-layout-container/style.min.css +1 -0
- package/es/vxe-layout-footer/index.js +3 -0
- package/es/vxe-layout-footer/style.css +10 -0
- package/es/vxe-layout-footer/style.min.css +1 -0
- package/es/vxe-layout-header/index.js +3 -0
- package/es/vxe-layout-header/style.css +10 -0
- package/es/vxe-layout-header/style.min.css +1 -0
- package/es/vxe-row/index.js +3 -0
- package/es/vxe-row/style.css +10 -0
- package/es/vxe-row/style.min.css +1 -0
- package/es/vxe-ui/index.js +3 -0
- package/es/vxe-ui/style.css +0 -0
- package/es/vxe-ui/style.min.css +0 -0
- package/lib/anchor/index.js +15 -0
- package/lib/anchor/index.min.js +1 -0
- package/lib/anchor/src/anchor.js +220 -0
- package/lib/anchor/src/anchor.min.js +1 -0
- package/lib/anchor/style/index.js +1 -0
- package/lib/anchor/style/style.css +40 -0
- package/lib/anchor/style/style.min.css +1 -0
- package/lib/anchor-link/index.js +15 -0
- package/lib/anchor-link/index.min.js +1 -0
- package/lib/anchor-link/src/anchor-link.js +106 -0
- package/lib/anchor-link/src/anchor-link.min.js +1 -0
- package/lib/anchor-link/src/util.js +29 -0
- package/lib/anchor-link/src/util.min.js +1 -0
- package/lib/anchor-link/style/index.js +1 -0
- package/lib/anchor-link/style/style.css +0 -0
- package/lib/anchor-link/style/style.min.css +0 -0
- package/lib/breadcrumb/index.js +15 -0
- package/lib/breadcrumb/index.min.js +1 -0
- package/lib/breadcrumb/src/breadcrumb.js +53 -0
- package/lib/breadcrumb/src/breadcrumb.min.js +1 -0
- package/lib/breadcrumb/style/index.js +1 -0
- package/lib/breadcrumb/style/style.css +19 -0
- package/lib/breadcrumb/style/style.min.css +1 -0
- package/lib/breadcrumb-item/index.js +15 -0
- package/lib/breadcrumb-item/index.min.js +1 -0
- package/lib/breadcrumb-item/src/breadcrumb-item.js +58 -0
- package/lib/breadcrumb-item/src/breadcrumb-item.min.js +1 -0
- package/lib/breadcrumb-item/style/index.js +1 -0
- package/lib/breadcrumb-item/style/style.css +0 -0
- package/lib/breadcrumb-item/style/style.min.css +0 -0
- package/lib/button/index.js +15 -0
- package/lib/button/index.min.js +1 -0
- package/lib/button/src/button.js +540 -0
- package/lib/button/src/button.min.js +1 -0
- package/lib/button/style/index.js +1 -0
- package/lib/button/style/style.css +513 -0
- package/lib/button/style/style.min.css +1 -0
- package/lib/button-group/index.js +15 -0
- package/lib/button-group/index.min.js +1 -0
- package/lib/button-group/src/button-group.js +88 -0
- package/lib/button-group/src/button-group.min.js +1 -0
- package/lib/button-group/style/index.js +1 -0
- package/lib/button-group/style/style.css +0 -0
- package/lib/button-group/style/style.min.css +0 -0
- package/lib/col/index.js +15 -0
- package/lib/col/index.min.js +1 -0
- package/lib/col/src/col.js +96 -0
- package/lib/col/src/col.min.js +1 -0
- package/lib/col/style/index.js +1 -0
- package/lib/col/style/style.css +95 -0
- package/lib/col/style/style.min.css +1 -0
- package/lib/components.js +230 -0
- package/lib/components.min.js +1 -0
- package/lib/design/index.js +15 -0
- package/lib/design/index.min.js +1 -0
- package/lib/design/src/design.js +48 -0
- package/lib/design/src/design.min.js +1 -0
- package/lib/design/style/index.js +1 -0
- package/lib/design/style/style.css +0 -0
- package/lib/design/style/style.min.css +0 -0
- package/lib/hooks/size.js +16 -0
- package/lib/hooks/size.min.js +1 -0
- package/lib/icon/index.js +15 -0
- package/lib/icon/index.min.js +1 -0
- package/lib/icon/src/icon.js +36 -0
- package/lib/icon/src/icon.min.js +1 -0
- package/lib/icon/style/index.js +1 -0
- package/lib/icon/style/style.css +766 -0
- package/lib/icon/style/style.min.css +1 -0
- package/lib/index.common.js +22 -0
- package/lib/index.umd.js +4461 -0
- package/lib/index.umd.min.js +1 -0
- package/lib/layout-aside/index.js +15 -0
- package/lib/layout-aside/index.min.js +1 -0
- package/lib/layout-aside/src/layout-aside.js +80 -0
- package/lib/layout-aside/src/layout-aside.min.js +1 -0
- package/lib/layout-aside/style/index.js +1 -0
- package/lib/layout-aside/style/style.css +12 -0
- package/lib/layout-aside/style/style.min.css +1 -0
- package/lib/layout-body/index.js +15 -0
- package/lib/layout-body/index.min.js +1 -0
- package/lib/layout-body/src/layout-body.js +46 -0
- package/lib/layout-body/src/layout-body.min.js +1 -0
- package/lib/layout-body/style/index.js +1 -0
- package/lib/layout-body/style/style.css +3 -0
- package/lib/layout-body/style/style.min.css +1 -0
- package/lib/layout-container/index.js +15 -0
- package/lib/layout-container/index.min.js +1 -0
- package/lib/layout-container/src/layout-container.js +50 -0
- package/lib/layout-container/src/layout-container.min.js +1 -0
- package/lib/layout-container/style/index.js +1 -0
- package/lib/layout-container/style/style.css +10 -0
- package/lib/layout-container/style/style.min.css +1 -0
- package/lib/layout-footer/index.js +15 -0
- package/lib/layout-footer/index.min.js +1 -0
- package/lib/layout-footer/src/layout-footer.js +50 -0
- package/lib/layout-footer/src/layout-footer.min.js +1 -0
- package/lib/layout-footer/style/index.js +1 -0
- package/lib/layout-footer/style/style.css +10 -0
- package/lib/layout-footer/style/style.min.css +1 -0
- package/lib/layout-header/index.js +15 -0
- package/lib/layout-header/index.min.js +1 -0
- package/lib/layout-header/src/layout-header.js +50 -0
- package/lib/layout-header/src/layout-header.min.js +1 -0
- package/lib/layout-header/style/index.js +1 -0
- package/lib/layout-header/style/style.css +10 -0
- package/lib/layout-header/style/style.min.css +1 -0
- package/lib/locale/lang/en-US.d.ts +2 -0
- package/lib/locale/lang/en-US.js +469 -0
- package/lib/locale/lang/en-US.min.js +1 -0
- package/lib/locale/lang/en-US.umd.js +483 -0
- package/lib/locale/lang/es-ES.d.ts +2 -0
- package/lib/locale/lang/es-ES.js +469 -0
- package/lib/locale/lang/es-ES.min.js +1 -0
- package/lib/locale/lang/es-ES.umd.js +483 -0
- package/lib/locale/lang/ja-JP.d.ts +2 -0
- package/lib/locale/lang/ja-JP.js +469 -0
- package/lib/locale/lang/ja-JP.min.js +1 -0
- package/lib/locale/lang/ja-JP.umd.js +483 -0
- package/lib/locale/lang/pt-BR.d.ts +2 -0
- package/lib/locale/lang/pt-BR.js +469 -0
- package/lib/locale/lang/pt-BR.min.js +1 -0
- package/lib/locale/lang/pt-BR.umd.js +483 -0
- package/lib/locale/lang/zh-CN.d.ts +2 -0
- package/lib/locale/lang/zh-CN.js +469 -0
- package/lib/locale/lang/zh-CN.min.js +1 -0
- package/lib/locale/lang/zh-CN.umd.js +483 -0
- package/lib/locale/lang/zh-HK.d.ts +2 -0
- package/lib/locale/lang/zh-HK.js +9 -0
- package/lib/locale/lang/zh-HK.min.js +1 -0
- package/lib/locale/lang/zh-HK.umd.js +483 -0
- package/lib/locale/lang/zh-MO.d.ts +2 -0
- package/lib/locale/lang/zh-MO.js +9 -0
- package/lib/locale/lang/zh-MO.min.js +1 -0
- package/lib/locale/lang/zh-MO.umd.js +483 -0
- package/lib/locale/lang/zh-TC.d.ts +2 -0
- package/lib/locale/lang/zh-TC.js +469 -0
- package/lib/locale/lang/zh-TC.min.js +1 -0
- package/lib/locale/lang/zh-TC.umd.js +483 -0
- package/lib/locale/lang/zh-TW.d.ts +2 -0
- package/lib/locale/lang/zh-TW.js +9 -0
- package/lib/locale/lang/zh-TW.min.js +1 -0
- package/lib/locale/lang/zh-TW.umd.js +483 -0
- package/lib/row/index.js +15 -0
- package/lib/row/index.min.js +1 -0
- package/lib/row/src/row.js +82 -0
- package/lib/row/src/row.min.js +1 -0
- package/lib/row/style/index.js +1 -0
- package/lib/row/style/style.css +10 -0
- package/lib/row/style/style.min.css +1 -0
- package/lib/style.css +1 -0
- package/lib/style.min.css +1 -0
- package/lib/ui/index.js +25 -0
- package/lib/ui/index.min.js +1 -0
- package/lib/ui/src/core.js +53 -0
- package/lib/ui/src/core.min.js +1 -0
- package/lib/ui/src/dom.js +127 -0
- package/lib/ui/src/dom.min.js +1 -0
- package/lib/ui/src/event.js +100 -0
- package/lib/ui/src/event.min.js +1 -0
- package/lib/ui/src/globalStore.js +14 -0
- package/lib/ui/src/globalStore.min.js +1 -0
- package/lib/ui/src/iconStore.js +82 -0
- package/lib/ui/src/iconStore.min.js +1 -0
- package/lib/ui/src/log.js +22 -0
- package/lib/ui/src/log.min.js +1 -0
- package/lib/ui/src/theme.js +17 -0
- package/lib/ui/src/theme.min.js +1 -0
- package/lib/ui/src/utils.js +28 -0
- package/lib/ui/src/utils.min.js +1 -0
- package/lib/ui/style/index.js +1 -0
- package/lib/ui/style/style.css +0 -0
- package/lib/ui/style/style.min.css +0 -0
- package/lib/vxe-anchor/index.js +22 -0
- package/lib/vxe-anchor/index.min.js +1 -0
- package/lib/vxe-anchor/style/index.js +1 -0
- package/lib/vxe-anchor/style/style.css +40 -0
- package/lib/vxe-anchor/style/style.min.css +1 -0
- package/lib/vxe-anchor-link/index.js +22 -0
- package/lib/vxe-anchor-link/index.min.js +1 -0
- package/lib/vxe-anchor-link/style/index.js +1 -0
- package/lib/vxe-anchor-link/style/style.css +0 -0
- package/lib/vxe-anchor-link/style/style.min.css +0 -0
- package/lib/vxe-breadcrumb/index.js +22 -0
- package/lib/vxe-breadcrumb/index.min.js +1 -0
- package/lib/vxe-breadcrumb/style/index.js +1 -0
- package/lib/vxe-breadcrumb/style/style.css +19 -0
- package/lib/vxe-breadcrumb/style/style.min.css +1 -0
- package/lib/vxe-breadcrumb-item/index.js +22 -0
- package/lib/vxe-breadcrumb-item/index.min.js +1 -0
- package/lib/vxe-breadcrumb-item/style/index.js +1 -0
- package/lib/vxe-breadcrumb-item/style/style.css +0 -0
- package/lib/vxe-breadcrumb-item/style/style.min.css +0 -0
- package/lib/vxe-button/index.js +22 -0
- package/lib/vxe-button/index.min.js +1 -0
- package/lib/vxe-button/style/index.js +1 -0
- package/lib/vxe-button/style/style.css +513 -0
- package/lib/vxe-button/style/style.min.css +1 -0
- package/lib/vxe-button-group/index.js +22 -0
- package/lib/vxe-button-group/index.min.js +1 -0
- package/lib/vxe-button-group/style/index.js +1 -0
- package/lib/vxe-button-group/style/style.css +0 -0
- package/lib/vxe-button-group/style/style.min.css +0 -0
- package/lib/vxe-col/index.js +22 -0
- package/lib/vxe-col/index.min.js +1 -0
- package/lib/vxe-col/style/index.js +1 -0
- package/lib/vxe-col/style/style.css +95 -0
- package/lib/vxe-col/style/style.min.css +1 -0
- package/lib/vxe-design/index.js +22 -0
- package/lib/vxe-design/index.min.js +1 -0
- package/lib/vxe-design/style/index.js +1 -0
- package/lib/vxe-design/style/style.css +0 -0
- package/lib/vxe-design/style/style.min.css +0 -0
- package/lib/vxe-icon/index.js +22 -0
- package/lib/vxe-icon/index.min.js +1 -0
- package/lib/vxe-icon/style/index.js +1 -0
- package/lib/vxe-icon/style/style.css +766 -0
- package/lib/vxe-icon/style/style.min.css +1 -0
- package/lib/vxe-layout-aside/index.js +22 -0
- package/lib/vxe-layout-aside/index.min.js +1 -0
- package/lib/vxe-layout-aside/style/index.js +1 -0
- package/lib/vxe-layout-aside/style/style.css +12 -0
- package/lib/vxe-layout-aside/style/style.min.css +1 -0
- package/lib/vxe-layout-body/index.js +22 -0
- package/lib/vxe-layout-body/index.min.js +1 -0
- package/lib/vxe-layout-body/style/index.js +1 -0
- package/lib/vxe-layout-body/style/style.css +3 -0
- package/lib/vxe-layout-body/style/style.min.css +1 -0
- package/lib/vxe-layout-container/index.js +22 -0
- package/lib/vxe-layout-container/index.min.js +1 -0
- package/lib/vxe-layout-container/style/index.js +1 -0
- package/lib/vxe-layout-container/style/style.css +10 -0
- package/lib/vxe-layout-container/style/style.min.css +1 -0
- package/lib/vxe-layout-footer/index.js +22 -0
- package/lib/vxe-layout-footer/index.min.js +1 -0
- package/lib/vxe-layout-footer/style/index.js +1 -0
- package/lib/vxe-layout-footer/style/style.css +10 -0
- package/lib/vxe-layout-footer/style/style.min.css +1 -0
- package/lib/vxe-layout-header/index.js +22 -0
- package/lib/vxe-layout-header/index.min.js +1 -0
- package/lib/vxe-layout-header/style/index.js +1 -0
- package/lib/vxe-layout-header/style/style.css +10 -0
- package/lib/vxe-layout-header/style/style.min.css +1 -0
- package/lib/vxe-row/index.js +22 -0
- package/lib/vxe-row/index.min.js +1 -0
- package/lib/vxe-row/style/index.js +1 -0
- package/lib/vxe-row/style/style.css +10 -0
- package/lib/vxe-row/style/style.min.css +1 -0
- package/lib/vxe-ui/index.js +22 -0
- package/lib/vxe-ui/index.min.js +1 -0
- package/lib/vxe-ui/style/index.js +1 -0
- package/lib/vxe-ui/style/style.css +0 -0
- package/lib/vxe-ui/style/style.min.css +0 -0
- package/package.json +83 -55
- package/packages/anchor/index.ts +11 -0
- package/packages/anchor/src/anchor.ts +233 -0
- package/packages/anchor-link/index.ts +11 -0
- package/packages/anchor-link/src/anchor-link.ts +118 -0
- package/packages/anchor-link/src/util.ts +23 -0
- package/packages/breadcrumb/index.ts +11 -0
- package/packages/breadcrumb/src/breadcrumb.ts +60 -0
- package/packages/breadcrumb-item/index.ts +11 -0
- package/packages/breadcrumb-item/src/breadcrumb-item.ts +71 -0
- package/packages/button/index.ts +11 -0
- package/packages/button/src/button.ts +526 -0
- package/packages/button-group/index.ts +11 -0
- package/packages/button-group/src/button-group.ts +81 -0
- package/packages/col/index.ts +11 -0
- package/packages/col/src/col.ts +98 -0
- package/packages/components.ts +66 -0
- package/packages/design/index.ts +11 -0
- package/packages/design/src/design.ts +55 -0
- package/packages/hooks/size.ts +14 -0
- package/packages/icon/index.ts +11 -0
- package/packages/icon/src/icon.ts +27 -0
- package/packages/index.ts +4 -0
- package/packages/layout-aside/index.ts +11 -0
- package/packages/layout-aside/src/layout-aside.ts +85 -0
- package/packages/layout-body/index.ts +11 -0
- package/packages/layout-body/src/layout-body.ts +52 -0
- package/packages/layout-container/index.ts +11 -0
- package/packages/layout-container/src/layout-container.ts +56 -0
- package/packages/layout-footer/index.ts +11 -0
- package/packages/layout-footer/src/layout-footer.ts +56 -0
- package/packages/layout-header/index.ts +11 -0
- package/packages/layout-header/src/layout-header.ts +56 -0
- package/packages/locale/lang/en-US.ts +465 -0
- package/packages/locale/lang/es-ES.ts +465 -0
- package/packages/locale/lang/ja-JP.ts +465 -0
- package/packages/locale/lang/pt-BR.ts +465 -0
- package/packages/locale/lang/zh-CN.ts +465 -0
- package/packages/locale/lang/zh-HK.ts +3 -0
- package/packages/locale/lang/zh-MO.ts +3 -0
- package/packages/locale/lang/zh-TC.ts +465 -0
- package/packages/locale/lang/zh-TW.ts +3 -0
- package/packages/row/index.ts +11 -0
- package/packages/row/src/row.ts +86 -0
- package/packages/ui/index.ts +6 -0
- package/packages/ui/src/core.ts +51 -0
- package/packages/ui/src/dom.ts +103 -0
- package/packages/ui/src/event.ts +88 -0
- package/packages/ui/src/globalStore.ts +11 -0
- package/packages/ui/src/iconStore.ts +88 -0
- package/packages/ui/src/log.ts +16 -0
- package/packages/ui/src/theme.ts +13 -0
- package/packages/ui/src/utils.ts +22 -0
- package/styles/all.scss +17 -0
- package/styles/base.scss +16 -0
- package/styles/components/anchor-link.scss +0 -0
- package/styles/components/anchor.scss +42 -0
- package/styles/components/breadcrumb-item.scss +0 -0
- package/styles/components/breadcrumb.scss +20 -0
- package/styles/components/button-group.scss +0 -0
- package/styles/components/button.scss +357 -0
- package/styles/components/col.scss +32 -0
- package/styles/components/design.scss +1 -0
- package/styles/components/icon.scss +785 -0
- package/styles/components/layout-aside.scss +14 -0
- package/styles/components/layout-body.scss +5 -0
- package/styles/components/layout-container.scss +12 -0
- package/styles/components/layout-footer.scss +12 -0
- package/styles/components/layout-header.scss +12 -0
- package/styles/components/row.scss +10 -0
- package/styles/components/ui.scss +0 -0
- package/styles/helpers/mixin.scss +82 -0
- package/styles/icon/iconfont.ttf +0 -0
- package/styles/icon/iconfont.woff +0 -0
- package/styles/icon/iconfont.woff2 +0 -0
- package/styles/theme/base.scss +81 -0
- package/styles/theme/dark.scss +7 -0
- package/styles/theme/default.scss +5 -0
- package/types/all.d.ts +67 -0
- package/types/component/anchor-link.d.ts +74 -0
- package/types/component/anchor.d.ts +79 -0
- package/types/component/breadcrumb-item.d.ts +58 -0
- package/types/component/breadcrumb.d.ts +61 -0
- package/types/component/button-group.d.ts +86 -0
- package/types/component/button.d.ts +157 -0
- package/types/component/col.d.ts +58 -0
- package/types/component/design.d.ts +63 -0
- package/types/component/icon.d.ts +67 -0
- package/types/component/layout-aside.d.ts +57 -0
- package/types/component/layout-body.d.ts +58 -0
- package/types/component/layout-container.d.ts +58 -0
- package/types/component/layout-footer.d.ts +58 -0
- package/types/component/layout-header.d.ts +58 -0
- package/types/component/row.d.ts +65 -0
- package/types/index.d.ts +4 -0
- package/types/tool/common.d.ts +52 -0
- package/types/tool/index.d.ts +6 -0
- package/types/ui/global-config.d.ts +15 -0
- package/types/ui/global-icon.d.ts +15 -0
- package/types/ui/index.d.ts +42 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
import { defineComponent, h, ref, computed, Teleport, onUnmounted, reactive, nextTick, onMounted, inject } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import globalConfigStore from '../../ui/src/globalStore';
|
|
4
|
+
import iconConfigStore from '../../ui/src/iconStore';
|
|
5
|
+
import { useSize } from '../../hooks/size';
|
|
6
|
+
import { getAbsolutePos, getEventTargetNode } from '../../ui/src/dom';
|
|
7
|
+
import { getFuncText, getLastZIndex, nextZIndex } from '../../ui/src/utils';
|
|
8
|
+
import { GlobalEvent } from '../../ui/src/event';
|
|
9
|
+
import { warnLog } from '../../ui/src/log';
|
|
10
|
+
export default defineComponent({
|
|
11
|
+
name: 'VxeButton',
|
|
12
|
+
props: {
|
|
13
|
+
/**
|
|
14
|
+
* 按钮类型
|
|
15
|
+
*/
|
|
16
|
+
type: String,
|
|
17
|
+
mode: String,
|
|
18
|
+
className: [String, Function],
|
|
19
|
+
popupClassName: [String, Function],
|
|
20
|
+
/**
|
|
21
|
+
* 按钮尺寸
|
|
22
|
+
*/
|
|
23
|
+
size: { type: String, default: () => globalConfigStore.button.size || globalConfigStore.size },
|
|
24
|
+
/**
|
|
25
|
+
* 用来标识这一项
|
|
26
|
+
*/
|
|
27
|
+
name: [String, Number],
|
|
28
|
+
/**
|
|
29
|
+
* 按钮内容
|
|
30
|
+
*/
|
|
31
|
+
content: String,
|
|
32
|
+
/**
|
|
33
|
+
* 固定显示下拉面板的方向
|
|
34
|
+
*/
|
|
35
|
+
placement: String,
|
|
36
|
+
/**
|
|
37
|
+
* 按钮状态
|
|
38
|
+
*/
|
|
39
|
+
status: String,
|
|
40
|
+
/**
|
|
41
|
+
* 标题
|
|
42
|
+
*/
|
|
43
|
+
title: String,
|
|
44
|
+
/**
|
|
45
|
+
* 按钮的图标
|
|
46
|
+
*/
|
|
47
|
+
icon: String,
|
|
48
|
+
/**
|
|
49
|
+
* 圆角边框
|
|
50
|
+
*/
|
|
51
|
+
round: Boolean,
|
|
52
|
+
/**
|
|
53
|
+
* 圆角按钮
|
|
54
|
+
*/
|
|
55
|
+
circle: Boolean,
|
|
56
|
+
/**
|
|
57
|
+
* 是否禁用
|
|
58
|
+
*/
|
|
59
|
+
disabled: Boolean,
|
|
60
|
+
/**
|
|
61
|
+
* 是否加载中
|
|
62
|
+
*/
|
|
63
|
+
loading: Boolean,
|
|
64
|
+
/**
|
|
65
|
+
* 在下拉面板关闭时销毁内容
|
|
66
|
+
*/
|
|
67
|
+
destroyOnClose: Boolean,
|
|
68
|
+
/**
|
|
69
|
+
* 是否将弹框容器插入于 body 内
|
|
70
|
+
*/
|
|
71
|
+
transfer: { type: Boolean, default: () => globalConfigStore.button.transfer }
|
|
72
|
+
},
|
|
73
|
+
emits: [
|
|
74
|
+
'click',
|
|
75
|
+
'mouseenter',
|
|
76
|
+
'mouseleave',
|
|
77
|
+
'dropdown-click'
|
|
78
|
+
],
|
|
79
|
+
setup(props, context) {
|
|
80
|
+
const { slots, emit } = context;
|
|
81
|
+
const xID = XEUtils.uniqueId();
|
|
82
|
+
const computeSize = useSize(props);
|
|
83
|
+
const reactData = reactive({
|
|
84
|
+
inited: false,
|
|
85
|
+
showPanel: false,
|
|
86
|
+
animatVisible: false,
|
|
87
|
+
panelIndex: 0,
|
|
88
|
+
panelStyle: {},
|
|
89
|
+
panelPlacement: ''
|
|
90
|
+
});
|
|
91
|
+
const internalData = {
|
|
92
|
+
showTime: null
|
|
93
|
+
};
|
|
94
|
+
const refElem = ref();
|
|
95
|
+
const refButton = ref();
|
|
96
|
+
const refBtnPanel = ref();
|
|
97
|
+
const refMaps = {
|
|
98
|
+
refElem
|
|
99
|
+
};
|
|
100
|
+
const $xeButton = {
|
|
101
|
+
xID,
|
|
102
|
+
props,
|
|
103
|
+
context,
|
|
104
|
+
reactData,
|
|
105
|
+
internalData,
|
|
106
|
+
getRefMaps: () => refMaps
|
|
107
|
+
};
|
|
108
|
+
const $xeButtonGroup = inject('$xeButtonGroup', null);
|
|
109
|
+
let buttonMethods = {};
|
|
110
|
+
const computeIsFormBtn = computed(() => {
|
|
111
|
+
const { type } = props;
|
|
112
|
+
if (type) {
|
|
113
|
+
return ['submit', 'reset', 'button'].indexOf(type) > -1;
|
|
114
|
+
}
|
|
115
|
+
return false;
|
|
116
|
+
});
|
|
117
|
+
const computeBtnMode = computed(() => {
|
|
118
|
+
const { type, mode } = props;
|
|
119
|
+
if (mode === 'text' || type === 'text' || ($xeButtonGroup && $xeButtonGroup.props.mode === 'text')) {
|
|
120
|
+
return 'text';
|
|
121
|
+
}
|
|
122
|
+
return 'button';
|
|
123
|
+
});
|
|
124
|
+
const computeBtnStatus = computed(() => {
|
|
125
|
+
const { status } = props;
|
|
126
|
+
if (status) {
|
|
127
|
+
return status;
|
|
128
|
+
}
|
|
129
|
+
if ($xeButtonGroup) {
|
|
130
|
+
return $xeButtonGroup.props.status;
|
|
131
|
+
}
|
|
132
|
+
return '';
|
|
133
|
+
});
|
|
134
|
+
const computeBtnRound = computed(() => {
|
|
135
|
+
const { round } = props;
|
|
136
|
+
if (round) {
|
|
137
|
+
return round;
|
|
138
|
+
}
|
|
139
|
+
if ($xeButtonGroup) {
|
|
140
|
+
return $xeButtonGroup.props.round;
|
|
141
|
+
}
|
|
142
|
+
return false;
|
|
143
|
+
});
|
|
144
|
+
const computeBtnCircle = computed(() => {
|
|
145
|
+
const { circle } = props;
|
|
146
|
+
if (circle) {
|
|
147
|
+
return circle;
|
|
148
|
+
}
|
|
149
|
+
if ($xeButtonGroup) {
|
|
150
|
+
return $xeButtonGroup.props.circle;
|
|
151
|
+
}
|
|
152
|
+
return false;
|
|
153
|
+
});
|
|
154
|
+
const updateZindex = () => {
|
|
155
|
+
if (reactData.panelIndex < getLastZIndex()) {
|
|
156
|
+
reactData.panelIndex = nextZIndex();
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
const updatePlacement = () => {
|
|
160
|
+
return nextTick().then(() => {
|
|
161
|
+
const { transfer, placement } = props;
|
|
162
|
+
const { panelIndex } = reactData;
|
|
163
|
+
const targetElem = refButton.value;
|
|
164
|
+
const panelElem = refBtnPanel.value;
|
|
165
|
+
if (panelElem && targetElem) {
|
|
166
|
+
const targetHeight = targetElem.offsetHeight;
|
|
167
|
+
const targetWidth = targetElem.offsetWidth;
|
|
168
|
+
const panelHeight = panelElem.offsetHeight;
|
|
169
|
+
const panelWidth = panelElem.offsetWidth;
|
|
170
|
+
const marginSize = 5;
|
|
171
|
+
const panelStyle = {
|
|
172
|
+
zIndex: panelIndex
|
|
173
|
+
};
|
|
174
|
+
const { top, left, boundingTop, visibleHeight, visibleWidth } = getAbsolutePos(targetElem);
|
|
175
|
+
let panelPlacement = 'bottom';
|
|
176
|
+
if (transfer) {
|
|
177
|
+
let btnLeft = left + targetWidth - panelWidth;
|
|
178
|
+
let btnTop = top + targetHeight;
|
|
179
|
+
if (placement === 'top') {
|
|
180
|
+
panelPlacement = 'top';
|
|
181
|
+
btnTop = top - panelHeight;
|
|
182
|
+
}
|
|
183
|
+
else if (!placement) {
|
|
184
|
+
// 如果下面不够放,则向上
|
|
185
|
+
if (boundingTop + targetHeight + panelHeight + marginSize > visibleHeight) {
|
|
186
|
+
panelPlacement = 'top';
|
|
187
|
+
btnTop = top - panelHeight;
|
|
188
|
+
}
|
|
189
|
+
// 如果上面不够放,则向下(优先)
|
|
190
|
+
if (btnTop < marginSize) {
|
|
191
|
+
panelPlacement = 'bottom';
|
|
192
|
+
btnTop = top + targetHeight;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// 如果溢出右边
|
|
196
|
+
if (btnLeft + panelWidth + marginSize > visibleWidth) {
|
|
197
|
+
btnLeft -= btnLeft + panelWidth + marginSize - visibleWidth;
|
|
198
|
+
}
|
|
199
|
+
// 如果溢出左边
|
|
200
|
+
if (btnLeft < marginSize) {
|
|
201
|
+
btnLeft = marginSize;
|
|
202
|
+
}
|
|
203
|
+
Object.assign(panelStyle, {
|
|
204
|
+
left: `${btnLeft}px`,
|
|
205
|
+
right: 'auto',
|
|
206
|
+
top: `${btnTop}px`,
|
|
207
|
+
minWidth: `${targetWidth}px`
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
else {
|
|
211
|
+
if (placement === 'top') {
|
|
212
|
+
panelPlacement = 'top';
|
|
213
|
+
panelStyle.bottom = `${targetHeight}px`;
|
|
214
|
+
}
|
|
215
|
+
else if (!placement) {
|
|
216
|
+
// 如果下面不够放,则向上
|
|
217
|
+
if (boundingTop + targetHeight + panelHeight > visibleHeight) {
|
|
218
|
+
// 如果上面不够放,则向下(优先)
|
|
219
|
+
if (boundingTop - targetHeight - panelHeight > marginSize) {
|
|
220
|
+
panelPlacement = 'top';
|
|
221
|
+
panelStyle.bottom = `${targetHeight}px`;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
reactData.panelStyle = panelStyle;
|
|
227
|
+
reactData.panelPlacement = panelPlacement;
|
|
228
|
+
return nextTick();
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
};
|
|
232
|
+
const clickEvent = (evnt) => {
|
|
233
|
+
if ($xeButtonGroup) {
|
|
234
|
+
$xeButtonGroup.handleClick({ name: props.name }, evnt);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
buttonMethods.dispatchEvent('click', { $event: evnt }, evnt);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
const mousedownDropdownEvent = (evnt) => {
|
|
241
|
+
const isLeftBtn = evnt.button === 0;
|
|
242
|
+
if (isLeftBtn) {
|
|
243
|
+
evnt.stopPropagation();
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const clickDropdownEvent = (evnt) => {
|
|
247
|
+
const dropdownElem = evnt.currentTarget;
|
|
248
|
+
const panelElem = refBtnPanel.value;
|
|
249
|
+
const { flag, targetElem } = getEventTargetNode(evnt, dropdownElem, 'vxe-button');
|
|
250
|
+
if (flag) {
|
|
251
|
+
if (panelElem) {
|
|
252
|
+
panelElem.dataset.active = 'N';
|
|
253
|
+
}
|
|
254
|
+
reactData.showPanel = false;
|
|
255
|
+
setTimeout(() => {
|
|
256
|
+
if (!panelElem || panelElem.dataset.active !== 'Y') {
|
|
257
|
+
reactData.animatVisible = false;
|
|
258
|
+
}
|
|
259
|
+
}, 350);
|
|
260
|
+
buttonMethods.dispatchEvent('dropdown-click', { name: targetElem.getAttribute('name'), $event: evnt }, evnt);
|
|
261
|
+
}
|
|
262
|
+
};
|
|
263
|
+
const mouseenterDropdownEvent = () => {
|
|
264
|
+
const panelElem = refBtnPanel.value;
|
|
265
|
+
if (panelElem) {
|
|
266
|
+
panelElem.dataset.active = 'Y';
|
|
267
|
+
reactData.animatVisible = true;
|
|
268
|
+
setTimeout(() => {
|
|
269
|
+
if (panelElem.dataset.active === 'Y') {
|
|
270
|
+
reactData.showPanel = true;
|
|
271
|
+
updateZindex();
|
|
272
|
+
updatePlacement();
|
|
273
|
+
setTimeout(() => {
|
|
274
|
+
if (reactData.showPanel) {
|
|
275
|
+
updatePlacement();
|
|
276
|
+
}
|
|
277
|
+
}, 50);
|
|
278
|
+
}
|
|
279
|
+
}, 20);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const mouseenterTargetEvent = (evnt) => {
|
|
283
|
+
const panelElem = refBtnPanel.value;
|
|
284
|
+
if (panelElem) {
|
|
285
|
+
panelElem.dataset.active = 'Y';
|
|
286
|
+
if (!reactData.inited) {
|
|
287
|
+
reactData.inited = true;
|
|
288
|
+
}
|
|
289
|
+
internalData.showTime = setTimeout(() => {
|
|
290
|
+
if (panelElem.dataset.active === 'Y') {
|
|
291
|
+
mouseenterDropdownEvent();
|
|
292
|
+
}
|
|
293
|
+
else {
|
|
294
|
+
reactData.animatVisible = false;
|
|
295
|
+
}
|
|
296
|
+
}, 250);
|
|
297
|
+
}
|
|
298
|
+
mouseenterEvent(evnt);
|
|
299
|
+
};
|
|
300
|
+
const mouseleaveTargetEvent = (evnt) => {
|
|
301
|
+
closePanel();
|
|
302
|
+
mouseleaveEvent(evnt);
|
|
303
|
+
};
|
|
304
|
+
const mouseenterEvent = (evnt) => {
|
|
305
|
+
emit('mouseenter', { $event: evnt });
|
|
306
|
+
};
|
|
307
|
+
const mouseleaveEvent = (evnt) => {
|
|
308
|
+
emit('mouseleave', { $event: evnt });
|
|
309
|
+
};
|
|
310
|
+
const closePanel = () => {
|
|
311
|
+
const panelElem = refBtnPanel.value;
|
|
312
|
+
clearTimeout(internalData.showTime);
|
|
313
|
+
if (panelElem) {
|
|
314
|
+
panelElem.dataset.active = 'N';
|
|
315
|
+
setTimeout(() => {
|
|
316
|
+
if (panelElem.dataset.active !== 'Y') {
|
|
317
|
+
reactData.showPanel = false;
|
|
318
|
+
setTimeout(() => {
|
|
319
|
+
if (panelElem.dataset.active !== 'Y') {
|
|
320
|
+
reactData.animatVisible = false;
|
|
321
|
+
}
|
|
322
|
+
}, 350);
|
|
323
|
+
}
|
|
324
|
+
}, 100);
|
|
325
|
+
}
|
|
326
|
+
else {
|
|
327
|
+
reactData.animatVisible = false;
|
|
328
|
+
reactData.showPanel = false;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
const mouseleaveDropdownEvent = () => {
|
|
332
|
+
closePanel();
|
|
333
|
+
};
|
|
334
|
+
const renderContent = () => {
|
|
335
|
+
const { content, icon, loading } = props;
|
|
336
|
+
const contVNs = [];
|
|
337
|
+
if (loading) {
|
|
338
|
+
contVNs.push(h('i', {
|
|
339
|
+
class: ['vxe-button--loading-icon', iconConfigStore.BUTTON_LOADING]
|
|
340
|
+
}));
|
|
341
|
+
}
|
|
342
|
+
else if (slots.icon) {
|
|
343
|
+
contVNs.push(h('span', {
|
|
344
|
+
class: 'vxe-button--custom-icon'
|
|
345
|
+
}, slots.icon({})));
|
|
346
|
+
}
|
|
347
|
+
else if (icon) {
|
|
348
|
+
contVNs.push(h('i', {
|
|
349
|
+
class: ['vxe-button--icon', icon]
|
|
350
|
+
}));
|
|
351
|
+
}
|
|
352
|
+
if (slots.default) {
|
|
353
|
+
contVNs.push(h('span', {
|
|
354
|
+
class: 'vxe-button--content'
|
|
355
|
+
}, slots.default({})));
|
|
356
|
+
}
|
|
357
|
+
else if (content) {
|
|
358
|
+
contVNs.push(h('span', {
|
|
359
|
+
class: 'vxe-button--content'
|
|
360
|
+
}, getFuncText(content)));
|
|
361
|
+
}
|
|
362
|
+
return contVNs;
|
|
363
|
+
};
|
|
364
|
+
buttonMethods = {
|
|
365
|
+
dispatchEvent(type, params, evnt) {
|
|
366
|
+
emit(type, Object.assign({ $button: $xeButton, $event: evnt }, params));
|
|
367
|
+
},
|
|
368
|
+
focus() {
|
|
369
|
+
const btnElem = refButton.value;
|
|
370
|
+
btnElem.focus();
|
|
371
|
+
return nextTick();
|
|
372
|
+
},
|
|
373
|
+
blur() {
|
|
374
|
+
const btnElem = refButton.value;
|
|
375
|
+
btnElem.blur();
|
|
376
|
+
return nextTick();
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
Object.assign($xeButton, buttonMethods);
|
|
380
|
+
onMounted(() => {
|
|
381
|
+
if (process.env.NODE_ENV === 'development') {
|
|
382
|
+
if (props.type === 'text') {
|
|
383
|
+
warnLog('vxe.error.delProp', ['type=text', 'mode=text']);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
GlobalEvent.on($xeButton, 'mousewheel', (evnt) => {
|
|
387
|
+
const panelElem = refBtnPanel.value;
|
|
388
|
+
if (reactData.showPanel && !getEventTargetNode(evnt, panelElem).flag) {
|
|
389
|
+
closePanel();
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
onUnmounted(() => {
|
|
394
|
+
GlobalEvent.off($xeButton, 'mousewheel');
|
|
395
|
+
});
|
|
396
|
+
const renderVN = () => {
|
|
397
|
+
const { className, popupClassName, transfer, title, type, destroyOnClose, name, disabled, loading } = props;
|
|
398
|
+
const { inited, showPanel } = reactData;
|
|
399
|
+
const isFormBtn = computeIsFormBtn.value;
|
|
400
|
+
const btnMode = computeBtnMode.value;
|
|
401
|
+
const btnStatus = computeBtnStatus.value;
|
|
402
|
+
const btnRound = computeBtnRound.value;
|
|
403
|
+
const btnCircle = computeBtnCircle.value;
|
|
404
|
+
const vSize = computeSize.value;
|
|
405
|
+
if (slots.dropdowns) {
|
|
406
|
+
return h('div', {
|
|
407
|
+
ref: refElem,
|
|
408
|
+
class: ['vxe-button--dropdown', className ? (XEUtils.isFunction(className) ? className({ $button: $xeButton }) : className) : '', {
|
|
409
|
+
[`size--${vSize}`]: vSize,
|
|
410
|
+
'is--active': showPanel
|
|
411
|
+
}]
|
|
412
|
+
}, [
|
|
413
|
+
h('button', {
|
|
414
|
+
ref: refButton,
|
|
415
|
+
class: ['vxe-button', `type--${btnMode}`, {
|
|
416
|
+
[`size--${vSize}`]: vSize,
|
|
417
|
+
[`theme--${btnStatus}`]: btnStatus,
|
|
418
|
+
'is--round': btnRound,
|
|
419
|
+
'is--circle': btnCircle,
|
|
420
|
+
'is--disabled': disabled || loading,
|
|
421
|
+
'is--loading': loading
|
|
422
|
+
}],
|
|
423
|
+
title,
|
|
424
|
+
name,
|
|
425
|
+
type: isFormBtn ? type : 'button',
|
|
426
|
+
disabled: disabled || loading,
|
|
427
|
+
onMouseenter: mouseenterTargetEvent,
|
|
428
|
+
onMouseleave: mouseleaveTargetEvent,
|
|
429
|
+
onClick: clickEvent
|
|
430
|
+
}, renderContent().concat([
|
|
431
|
+
h('i', {
|
|
432
|
+
class: `vxe-button--dropdown-arrow ${iconConfigStore.BUTTON_DROPDOWN}`
|
|
433
|
+
})
|
|
434
|
+
])),
|
|
435
|
+
h(Teleport, {
|
|
436
|
+
to: 'body',
|
|
437
|
+
disabled: transfer ? !inited : true
|
|
438
|
+
}, [
|
|
439
|
+
h('div', {
|
|
440
|
+
ref: refBtnPanel,
|
|
441
|
+
class: ['vxe-button--dropdown-panel', popupClassName ? (XEUtils.isFunction(popupClassName) ? popupClassName({ $button: $xeButton }) : popupClassName) : '', {
|
|
442
|
+
[`size--${vSize}`]: vSize,
|
|
443
|
+
'animat--leave': reactData.animatVisible,
|
|
444
|
+
'animat--enter': showPanel
|
|
445
|
+
}],
|
|
446
|
+
placement: reactData.panelPlacement,
|
|
447
|
+
style: reactData.panelStyle
|
|
448
|
+
}, inited
|
|
449
|
+
? [
|
|
450
|
+
h('div', {
|
|
451
|
+
class: 'vxe-button--dropdown-wrapper',
|
|
452
|
+
onMousedown: mousedownDropdownEvent,
|
|
453
|
+
onClick: clickDropdownEvent,
|
|
454
|
+
onMouseenter: mouseenterDropdownEvent,
|
|
455
|
+
onMouseleave: mouseleaveDropdownEvent
|
|
456
|
+
}, destroyOnClose && !showPanel ? [] : slots.dropdowns({}))
|
|
457
|
+
]
|
|
458
|
+
: [])
|
|
459
|
+
])
|
|
460
|
+
]);
|
|
461
|
+
}
|
|
462
|
+
return h('button', {
|
|
463
|
+
ref: refButton,
|
|
464
|
+
class: ['vxe-button', `type--${btnMode}`, className ? (XEUtils.isFunction(className) ? className({ $button: $xeButton }) : className) : '', {
|
|
465
|
+
[`size--${vSize}`]: vSize,
|
|
466
|
+
[`theme--${btnStatus}`]: btnStatus,
|
|
467
|
+
'is--round': btnRound,
|
|
468
|
+
'is--circle': btnCircle,
|
|
469
|
+
'is--disabled': disabled || loading,
|
|
470
|
+
'is--loading': loading
|
|
471
|
+
}],
|
|
472
|
+
title,
|
|
473
|
+
name,
|
|
474
|
+
type: isFormBtn ? type : 'button',
|
|
475
|
+
disabled: disabled || loading,
|
|
476
|
+
onClick: clickEvent,
|
|
477
|
+
onMouseenter: mouseenterEvent,
|
|
478
|
+
onMouseleave: mouseleaveEvent
|
|
479
|
+
}, renderContent());
|
|
480
|
+
};
|
|
481
|
+
$xeButton.renderVN = renderVN;
|
|
482
|
+
return $xeButton;
|
|
483
|
+
},
|
|
484
|
+
render() {
|
|
485
|
+
return this.renderVN();
|
|
486
|
+
}
|
|
487
|
+
});
|