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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 xuliangzhan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
|
-
# vxe-pc-ui
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[
|
|
1
|
+
# vxe-pc-ui
|
|
2
|
+
|
|
3
|
+
简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md)
|
|
4
|
+
|
|
5
|
+
[](https://gitee.com/xuliangzhan_admin/vxe-pc-ui/stargazers)
|
|
6
|
+
[](https://www.npmjs.com/package/vxe-pc-ui)
|
|
7
|
+
[](https://travis-ci.com/x-extends/vxe-pc-ui)
|
|
8
|
+
[](https://npm-stat.com/charts.html?package=vxe-pc-ui)
|
|
9
|
+
[](https://github.com/x-extends/vxe-pc-ui/issues)
|
|
10
|
+
[](https://github.com/x-extends/vxe-pc-ui/issues?q=is%3Aissue+is%3Aclosed)
|
|
11
|
+
[](https://github.com/x-extends/vxe-pc-ui/pulls)
|
|
12
|
+
[](https://github.com/x-extends/vxe-pc-ui/pulls?q=is%3Apr+is%3Aclosed)
|
|
13
|
+
[](LICENSE)
|
|
14
|
+
|
|
15
|
+
一个基于 [vue](https://www.npmjs.com/package/vue) 的 PC 端组件库
|
|
16
|
+
|
|
17
|
+
## 浏览器支持
|
|
18
|
+
|
|
19
|
+
 |  |  |  | 
|
|
20
|
+
--- | --- | --- | --- | --- |
|
|
21
|
+
80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
|
|
22
|
+
|
|
23
|
+
## 导入全部
|
|
24
|
+
|
|
25
|
+
```shell
|
|
26
|
+
npm install vxe-pc-ui
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```javascript
|
|
30
|
+
// ...
|
|
31
|
+
import { createApp } from 'vue'
|
|
32
|
+
import VxeUI from 'vxe-pc-ui'
|
|
33
|
+
// ...
|
|
34
|
+
|
|
35
|
+
VxeUI.config({
|
|
36
|
+
size: null
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// ...
|
|
40
|
+
const app = createApp(App)
|
|
41
|
+
app.use(VxeUI)
|
|
42
|
+
app.mount('#app')
|
|
43
|
+
// ...
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
[MIT](LICENSE) © 2019-present, Xu Liangzhan
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { defineComponent, ref, h, reactive, provide, nextTick, onBeforeUnmount, onMounted, watch, createCommentVNode, computed } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import { getOffsetPos } from '../../ui/src/dom';
|
|
4
|
+
import VxeAnchorLinkComponent from '../../anchor-link/src/anchor-link';
|
|
5
|
+
export default defineComponent({
|
|
6
|
+
name: 'VxeAnchor',
|
|
7
|
+
props: {
|
|
8
|
+
modelValue: String,
|
|
9
|
+
options: Array,
|
|
10
|
+
container: [String, Object, Function],
|
|
11
|
+
showMarker: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: true
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
emits: [
|
|
17
|
+
'update:modelValue',
|
|
18
|
+
'change',
|
|
19
|
+
'click'
|
|
20
|
+
],
|
|
21
|
+
setup(props, context) {
|
|
22
|
+
const { slots, emit } = context;
|
|
23
|
+
const xID = XEUtils.uniqueId();
|
|
24
|
+
const refElem = ref();
|
|
25
|
+
const refMarkerElem = ref();
|
|
26
|
+
const reactData = reactive({
|
|
27
|
+
activeHref: null,
|
|
28
|
+
staticLinks: []
|
|
29
|
+
});
|
|
30
|
+
const refMaps = {
|
|
31
|
+
refElem
|
|
32
|
+
};
|
|
33
|
+
const computeAllHrefList = computed(() => {
|
|
34
|
+
const list = [];
|
|
35
|
+
XEUtils.eachTree(reactData.staticLinks, item => {
|
|
36
|
+
list.push(item.href);
|
|
37
|
+
}, { children: 'children' });
|
|
38
|
+
return list;
|
|
39
|
+
});
|
|
40
|
+
const computeMaps = {};
|
|
41
|
+
let containerElem = null;
|
|
42
|
+
const $xeAnchor = {
|
|
43
|
+
xID,
|
|
44
|
+
props,
|
|
45
|
+
context,
|
|
46
|
+
reactData,
|
|
47
|
+
getRefMaps: () => refMaps,
|
|
48
|
+
getComputeMaps: () => computeMaps
|
|
49
|
+
};
|
|
50
|
+
const anchorMethods = {
|
|
51
|
+
dispatchEvent(type, params, evnt) {
|
|
52
|
+
emit(type, Object.assign({ $xeAnchor, $event: evnt }, params));
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const getContainerElem = () => {
|
|
56
|
+
const { container } = props;
|
|
57
|
+
if (container) {
|
|
58
|
+
if (XEUtils.isElement(container)) {
|
|
59
|
+
return container;
|
|
60
|
+
}
|
|
61
|
+
if (XEUtils.isString(container)) {
|
|
62
|
+
return document.querySelector(container);
|
|
63
|
+
}
|
|
64
|
+
if (XEUtils.isFunction(container)) {
|
|
65
|
+
return container({ $xeAnchor });
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
};
|
|
70
|
+
const emitEvent = (value) => {
|
|
71
|
+
reactData.activeHref = value;
|
|
72
|
+
emit('update:modelValue', value);
|
|
73
|
+
};
|
|
74
|
+
const handleContainerScrollEvent = () => {
|
|
75
|
+
const allHrefList = computeAllHrefList.value;
|
|
76
|
+
if (containerElem) {
|
|
77
|
+
const wrapperElList = containerElem.querySelectorAll(allHrefList.map(href => `${href}`).join(','));
|
|
78
|
+
for (let i = 0; i < wrapperElList.length; i++) {
|
|
79
|
+
const wrapperEl = wrapperElList[i];
|
|
80
|
+
const wrapperRect = wrapperEl.getBoundingClientRect();
|
|
81
|
+
if (wrapperRect.top > 0) {
|
|
82
|
+
const href = wrapperEl.id;
|
|
83
|
+
reactData.activeHref = `#${href}`;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
const removeContainerElemScroll = () => {
|
|
90
|
+
if (containerElem) {
|
|
91
|
+
containerElem.removeEventListener('scroll', handleContainerScrollEvent);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const updateContainerElem = () => {
|
|
95
|
+
containerElem = getContainerElem();
|
|
96
|
+
if (containerElem) {
|
|
97
|
+
containerElem.addEventListener('scroll', handleContainerScrollEvent, {
|
|
98
|
+
passive: false
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const updateMarkerPos = () => {
|
|
103
|
+
nextTick(() => {
|
|
104
|
+
const { activeHref } = reactData;
|
|
105
|
+
const elem = refElem.value;
|
|
106
|
+
const markerEl = refMarkerElem.value;
|
|
107
|
+
if (elem && markerEl) {
|
|
108
|
+
if (activeHref) {
|
|
109
|
+
const linkEl = elem.querySelector(`[href="${activeHref}"]`);
|
|
110
|
+
if (linkEl) {
|
|
111
|
+
const { top } = getOffsetPos(linkEl, elem);
|
|
112
|
+
markerEl.style.top = `${top}px`;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
const anchorPrivateMethods = {
|
|
119
|
+
handleClickLink(evnt, href) {
|
|
120
|
+
evnt.preventDefault();
|
|
121
|
+
const targetEl = document.getElementById(`${href}`.replace('#', ''));
|
|
122
|
+
if (targetEl) {
|
|
123
|
+
targetEl.scrollIntoView({
|
|
124
|
+
behavior: 'smooth'
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
emitEvent(href);
|
|
128
|
+
anchorMethods.dispatchEvent('click', { href }, evnt);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
Object.assign($xeAnchor, anchorMethods, anchorPrivateMethods);
|
|
132
|
+
watch(() => props.modelValue, (val) => {
|
|
133
|
+
reactData.activeHref = val;
|
|
134
|
+
});
|
|
135
|
+
watch(() => reactData.activeHref, () => {
|
|
136
|
+
updateMarkerPos();
|
|
137
|
+
});
|
|
138
|
+
watch(() => props.container, () => {
|
|
139
|
+
removeContainerElemScroll();
|
|
140
|
+
updateContainerElem();
|
|
141
|
+
});
|
|
142
|
+
onMounted(() => {
|
|
143
|
+
nextTick(() => {
|
|
144
|
+
updateContainerElem();
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
onBeforeUnmount(() => {
|
|
148
|
+
removeContainerElemScroll();
|
|
149
|
+
});
|
|
150
|
+
const renderSubItems = (options) => {
|
|
151
|
+
const itemVNs = [];
|
|
152
|
+
if (options) {
|
|
153
|
+
options.forEach(item => {
|
|
154
|
+
const subItems = item.children;
|
|
155
|
+
if (subItems && subItems.length) {
|
|
156
|
+
itemVNs.push(h(VxeAnchorLinkComponent, {
|
|
157
|
+
content: item.content,
|
|
158
|
+
title: item.title,
|
|
159
|
+
href: item.href
|
|
160
|
+
}, {
|
|
161
|
+
sub: () => renderSubItems(subItems)
|
|
162
|
+
}));
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
itemVNs.push(h(VxeAnchorLinkComponent, {
|
|
166
|
+
content: item.content,
|
|
167
|
+
title: item.title,
|
|
168
|
+
href: item.href
|
|
169
|
+
}));
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
return itemVNs;
|
|
174
|
+
};
|
|
175
|
+
const renderVN = () => {
|
|
176
|
+
const { options, showMarker } = props;
|
|
177
|
+
const defaultSlot = slots.default;
|
|
178
|
+
return h('div', {
|
|
179
|
+
ref: refElem,
|
|
180
|
+
class: ['vxe-anchor', {
|
|
181
|
+
'is--marker': showMarker
|
|
182
|
+
}]
|
|
183
|
+
}, [
|
|
184
|
+
h('div', {
|
|
185
|
+
class: 'vxe-anchor--list'
|
|
186
|
+
}, defaultSlot ? defaultSlot({}) : renderSubItems(options)),
|
|
187
|
+
showMarker
|
|
188
|
+
? h('div', {
|
|
189
|
+
ref: refMarkerElem,
|
|
190
|
+
class: 'vxe-anchor--marker'
|
|
191
|
+
})
|
|
192
|
+
: createCommentVNode()
|
|
193
|
+
]);
|
|
194
|
+
};
|
|
195
|
+
$xeAnchor.renderVN = renderVN;
|
|
196
|
+
provide('$xeAnchor', $xeAnchor);
|
|
197
|
+
return $xeAnchor;
|
|
198
|
+
},
|
|
199
|
+
render() {
|
|
200
|
+
return this.renderVN();
|
|
201
|
+
}
|
|
202
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.vxe-anchor {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.vxe-anchor--marker {
|
|
6
|
+
position: absolute;
|
|
7
|
+
left: 0;
|
|
8
|
+
top: 0;
|
|
9
|
+
width: 0.2em;
|
|
10
|
+
height: 1.5em;
|
|
11
|
+
padding: 0.25em 0;
|
|
12
|
+
transition: all 0.35s ease-in-out;
|
|
13
|
+
}
|
|
14
|
+
.vxe-anchor--marker::before {
|
|
15
|
+
display: block;
|
|
16
|
+
content: "";
|
|
17
|
+
height: 100%;
|
|
18
|
+
width: 100%;
|
|
19
|
+
border-radius: 1em;
|
|
20
|
+
background-color: var(--vxe-ui-anchor-link-active-color);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.vxe-anchor-link {
|
|
24
|
+
position: relative;
|
|
25
|
+
padding-left: 0.6em;
|
|
26
|
+
}
|
|
27
|
+
.vxe-anchor-link.is--active > .vxe-anchor-link--item {
|
|
28
|
+
color: var(--vxe-ui-anchor-link-active-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.vxe-anchor-link--item {
|
|
32
|
+
display: block;
|
|
33
|
+
height: 1.5em;
|
|
34
|
+
line-height: 1.5em;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
color: var(--vxe-ui-anchor-link-color);
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vxe-anchor{position:relative}.vxe-anchor--marker{position:absolute;left:0;top:0;width:.2em;height:1.5em;padding:.25em 0;transition:all .35s ease-in-out}.vxe-anchor--marker::before{display:block;content:"";height:100%;width:100%;border-radius:1em;background-color:var(--vxe-ui-anchor-link-active-color)}.vxe-anchor-link{position:relative;padding-left:.6em}.vxe-anchor-link.is--active>.vxe-anchor-link--item{color:var(--vxe-ui-anchor-link-active-color)}.vxe-anchor-link--item{display:block;height:1.5em;line-height:1.5em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;color:var(--vxe-ui-anchor-link-color)}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import VxeAnchorLinkComponent from './src/anchor-link';
|
|
2
|
+
const VxeAnchorLink = Object.assign({}, VxeAnchorLinkComponent, {
|
|
3
|
+
install(app) {
|
|
4
|
+
app.component(VxeAnchorLinkComponent.name, VxeAnchorLinkComponent);
|
|
5
|
+
}
|
|
6
|
+
});
|
|
7
|
+
export const AnchorLink = VxeAnchorLink;
|
|
8
|
+
export default VxeAnchorLink;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { defineComponent, ref, h, computed, reactive, inject, createCommentVNode, onMounted, onUnmounted, provide, watch } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
import { assemAnchorLink, destroyAnchorLink } from './util';
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'VxeAnchorLink',
|
|
6
|
+
props: {
|
|
7
|
+
content: [String, Number],
|
|
8
|
+
title: [String, Number],
|
|
9
|
+
href: String
|
|
10
|
+
},
|
|
11
|
+
emits: [],
|
|
12
|
+
setup(props, context) {
|
|
13
|
+
const { slots } = context;
|
|
14
|
+
const xID = XEUtils.uniqueId();
|
|
15
|
+
const refElem = ref();
|
|
16
|
+
const reactData = reactive({});
|
|
17
|
+
const linkConfig = reactive({
|
|
18
|
+
id: xID,
|
|
19
|
+
href: props.href,
|
|
20
|
+
children: []
|
|
21
|
+
});
|
|
22
|
+
const $xeAnchor = inject('$xeAnchor', null);
|
|
23
|
+
const $xeParentAnchorLink = inject('$xeAnchorLink', null);
|
|
24
|
+
const refMaps = {
|
|
25
|
+
refElem
|
|
26
|
+
};
|
|
27
|
+
const computeIsActive = computed(() => {
|
|
28
|
+
const { href } = props;
|
|
29
|
+
if ($xeAnchor) {
|
|
30
|
+
return $xeAnchor.reactData.activeHref === href;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
});
|
|
34
|
+
const computeMaps = {};
|
|
35
|
+
const $xeAnchorLink = {
|
|
36
|
+
xID,
|
|
37
|
+
props,
|
|
38
|
+
context,
|
|
39
|
+
reactData,
|
|
40
|
+
linkConfig,
|
|
41
|
+
getRefMaps: () => refMaps,
|
|
42
|
+
getComputeMaps: () => computeMaps
|
|
43
|
+
};
|
|
44
|
+
const clickEvent = (event) => {
|
|
45
|
+
const { href } = props;
|
|
46
|
+
if ($xeAnchor) {
|
|
47
|
+
$xeAnchor.handleClickLink(event, href);
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
watch(() => props.href, (val) => {
|
|
51
|
+
linkConfig.href = val;
|
|
52
|
+
});
|
|
53
|
+
onMounted(() => {
|
|
54
|
+
if ($xeAnchor && refElem.value) {
|
|
55
|
+
assemAnchorLink($xeAnchor, refElem.value, linkConfig, $xeParentAnchorLink);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
onUnmounted(() => {
|
|
59
|
+
if ($xeAnchor) {
|
|
60
|
+
destroyAnchorLink($xeAnchor, linkConfig);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const renderVN = () => {
|
|
64
|
+
const { href, content, title } = props;
|
|
65
|
+
const defaultSlot = slots.default;
|
|
66
|
+
const subSlot = slots.sub;
|
|
67
|
+
const isActive = computeIsActive.value;
|
|
68
|
+
return h('div', {
|
|
69
|
+
ref: refElem,
|
|
70
|
+
class: ['vxe-anchor-link', {
|
|
71
|
+
'is--active': isActive
|
|
72
|
+
}]
|
|
73
|
+
}, [
|
|
74
|
+
h('a', {
|
|
75
|
+
class: 'vxe-anchor-link--item',
|
|
76
|
+
href,
|
|
77
|
+
title,
|
|
78
|
+
onClick: clickEvent
|
|
79
|
+
}, defaultSlot ? defaultSlot({}) : (XEUtils.toValueString(content))),
|
|
80
|
+
subSlot
|
|
81
|
+
? h('div', {
|
|
82
|
+
class: 'vxe-anchor-link--sub-items'
|
|
83
|
+
}, subSlot({}))
|
|
84
|
+
: createCommentVNode()
|
|
85
|
+
]);
|
|
86
|
+
};
|
|
87
|
+
$xeAnchorLink.renderVN = renderVN;
|
|
88
|
+
provide('$xeAnchorLink', $xeAnchorLink);
|
|
89
|
+
return $xeAnchorLink;
|
|
90
|
+
},
|
|
91
|
+
render() {
|
|
92
|
+
return this.renderVN();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import XEUtils from 'xe-utils';
|
|
2
|
+
export function assemAnchorLink($xeAnchor, elem, linkConfig, $xeParentAnchorLink) {
|
|
3
|
+
const staticLinks = $xeAnchor.reactData.staticLinks;
|
|
4
|
+
const parentElem = elem.parentNode;
|
|
5
|
+
const parentLinkConfig = $xeParentAnchorLink ? $xeParentAnchorLink.linkConfig : null;
|
|
6
|
+
const parentLinks = parentLinkConfig ? parentLinkConfig.children : staticLinks;
|
|
7
|
+
if (parentElem && parentLinks) {
|
|
8
|
+
parentLinks.splice(XEUtils.arrayIndexOf(parentElem.children, elem), 0, linkConfig);
|
|
9
|
+
$xeAnchor.reactData.staticLinks = staticLinks.slice(0);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export function destroyAnchorLink($xeAnchor, linkConfig) {
|
|
13
|
+
const staticLinks = $xeAnchor.reactData.staticLinks;
|
|
14
|
+
const matchObj = XEUtils.findTree(staticLinks, item => item.id === linkConfig.id, { children: 'children' });
|
|
15
|
+
if (matchObj) {
|
|
16
|
+
matchObj.items.splice(matchObj.index, 1);
|
|
17
|
+
}
|
|
18
|
+
$xeAnchor.reactData.staticLinks = staticLinks.slice(0);
|
|
19
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import VxeBreadcrumbComponent from './src/breadcrumb';
|
|
2
|
+
const VxeBreadcrumb = Object.assign({}, VxeBreadcrumbComponent, {
|
|
3
|
+
install(app) {
|
|
4
|
+
app.component(VxeBreadcrumbComponent.name, VxeBreadcrumbComponent);
|
|
5
|
+
}
|
|
6
|
+
});
|
|
7
|
+
export const Breadcrumb = VxeBreadcrumb;
|
|
8
|
+
export default VxeBreadcrumb;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { defineComponent, ref, h, reactive, provide } from 'vue';
|
|
2
|
+
import VxeUI from '../../ui';
|
|
3
|
+
import XEUtils from 'xe-utils';
|
|
4
|
+
export default defineComponent({
|
|
5
|
+
name: 'VxeBreadcrumb',
|
|
6
|
+
props: {
|
|
7
|
+
separator: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: () => VxeUI.getConfig('breadcrumb.separator')
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
emits: [],
|
|
13
|
+
setup(props, context) {
|
|
14
|
+
const { slots } = context;
|
|
15
|
+
const xID = XEUtils.uniqueId();
|
|
16
|
+
const refElem = ref();
|
|
17
|
+
const reactData = reactive({});
|
|
18
|
+
const refMaps = {
|
|
19
|
+
refElem
|
|
20
|
+
};
|
|
21
|
+
const computeMaps = {};
|
|
22
|
+
const $xeBreadcrumb = {
|
|
23
|
+
xID,
|
|
24
|
+
props,
|
|
25
|
+
context,
|
|
26
|
+
reactData,
|
|
27
|
+
getRefMaps: () => refMaps,
|
|
28
|
+
getComputeMaps: () => computeMaps
|
|
29
|
+
};
|
|
30
|
+
const renderVN = () => {
|
|
31
|
+
const defaultSlot = slots.default;
|
|
32
|
+
return h('div', {
|
|
33
|
+
ref: refElem,
|
|
34
|
+
class: 'vxe-breadcrumb'
|
|
35
|
+
}, defaultSlot ? defaultSlot({}) : []);
|
|
36
|
+
};
|
|
37
|
+
$xeBreadcrumb.renderVN = renderVN;
|
|
38
|
+
provide('$xeBreadcrumb', $xeBreadcrumb);
|
|
39
|
+
return $xeBreadcrumb;
|
|
40
|
+
},
|
|
41
|
+
render() {
|
|
42
|
+
return this.renderVN();
|
|
43
|
+
}
|
|
44
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
.vxe-breadcrumb {
|
|
2
|
+
color: var(--vxe-ui-breadcrumb-item-color);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.vxe-breadcrumb-item {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
color: var(--vxe-ui-breadcrumb-color);
|
|
8
|
+
}
|
|
9
|
+
.vxe-breadcrumb-item:last-child .vxe-breadcrumb-item--content {
|
|
10
|
+
color: var(--vxe-ui-breadcrumb-current-item-color);
|
|
11
|
+
}
|
|
12
|
+
.vxe-breadcrumb-item:last-child .vxe-breadcrumb-item--separator {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.vxe-breadcrumb-item--separator {
|
|
17
|
+
margin: 0 0.6em;
|
|
18
|
+
color: var(--vxe-ui-font-placeholder-color);
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.vxe-breadcrumb{color:var(--vxe-ui-breadcrumb-item-color)}.vxe-breadcrumb-item{display:inline-block;color:var(--vxe-ui-breadcrumb-color)}.vxe-breadcrumb-item:last-child .vxe-breadcrumb-item--content{color:var(--vxe-ui-breadcrumb-current-item-color)}.vxe-breadcrumb-item:last-child .vxe-breadcrumb-item--separator{display:none}.vxe-breadcrumb-item--separator{margin:0 .6em;color:var(--vxe-ui-font-placeholder-color)}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import VxeBreadcrumbItemComponent from './src/breadcrumb-item';
|
|
2
|
+
const VxeBreadcrumbItem = Object.assign({}, VxeBreadcrumbItemComponent, {
|
|
3
|
+
install(app) {
|
|
4
|
+
app.component(VxeBreadcrumbItemComponent.name, VxeBreadcrumbItemComponent);
|
|
5
|
+
}
|
|
6
|
+
});
|
|
7
|
+
export const BreadcrumbItem = VxeBreadcrumbItem;
|
|
8
|
+
export default VxeBreadcrumbItem;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent, ref, h, reactive, computed, inject, createCommentVNode } from 'vue';
|
|
2
|
+
import XEUtils from 'xe-utils';
|
|
3
|
+
export default defineComponent({
|
|
4
|
+
name: 'VxeBreadcrumbItem',
|
|
5
|
+
props: {},
|
|
6
|
+
emits: [],
|
|
7
|
+
setup(props, context) {
|
|
8
|
+
const { slots } = context;
|
|
9
|
+
const xID = XEUtils.uniqueId();
|
|
10
|
+
const refElem = ref();
|
|
11
|
+
const $xeBreadcrumb = inject('$xeBreadcrumb', null);
|
|
12
|
+
const reactData = reactive({});
|
|
13
|
+
const refMaps = {
|
|
14
|
+
refElem
|
|
15
|
+
};
|
|
16
|
+
const computeSeparator = computed(() => {
|
|
17
|
+
if ($xeBreadcrumb) {
|
|
18
|
+
return $xeBreadcrumb.props.separator;
|
|
19
|
+
}
|
|
20
|
+
return '';
|
|
21
|
+
});
|
|
22
|
+
const computeMaps = {};
|
|
23
|
+
const $xeBreadcrumbItem = {
|
|
24
|
+
xID,
|
|
25
|
+
props,
|
|
26
|
+
context,
|
|
27
|
+
reactData,
|
|
28
|
+
getRefMaps: () => refMaps,
|
|
29
|
+
getComputeMaps: () => computeMaps
|
|
30
|
+
};
|
|
31
|
+
const renderVN = () => {
|
|
32
|
+
const separator = computeSeparator.value;
|
|
33
|
+
const defaultSlot = slots.default;
|
|
34
|
+
return h('span', {
|
|
35
|
+
ref: refElem,
|
|
36
|
+
class: 'vxe-breadcrumb-item'
|
|
37
|
+
}, [
|
|
38
|
+
h('span', {
|
|
39
|
+
class: 'vxe-breadcrumb-item--content'
|
|
40
|
+
}, defaultSlot ? defaultSlot({}) : []),
|
|
41
|
+
separator
|
|
42
|
+
? h('span', {
|
|
43
|
+
class: 'vxe-breadcrumb-item--separator'
|
|
44
|
+
}, `${separator}`)
|
|
45
|
+
: createCommentVNode()
|
|
46
|
+
]);
|
|
47
|
+
};
|
|
48
|
+
$xeBreadcrumbItem.renderVN = renderVN;
|
|
49
|
+
return $xeBreadcrumbItem;
|
|
50
|
+
},
|
|
51
|
+
render() {
|
|
52
|
+
return this.renderVN();
|
|
53
|
+
}
|
|
54
|
+
});
|
|
File without changes
|
|
File without changes
|