├── .npmrc ├── pnpm-workspace.yaml ├── packages ├── web-docs │ ├── docs │ │ ├── components │ │ │ ├── upload │ │ │ │ └── component │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── upload-draggable.md │ │ │ │ │ ├── upload-limit.md │ │ │ │ │ ├── upload-directory.md │ │ │ │ │ ├── upload-avatar.md │ │ │ │ │ └── upload-basic-use.md │ │ │ ├── date-picker │ │ │ │ └── component │ │ │ │ │ ├── picker-range.md │ │ │ │ │ ├── picker-year.md │ │ │ │ │ ├── picker-basic-use.md │ │ │ │ │ ├── picker-month.md │ │ │ │ │ ├── picker-disabled.md │ │ │ │ │ ├── picker-extra.md │ │ │ │ │ ├── picker-week.md │ │ │ │ │ └── picker-vmodel.md │ │ │ ├── cascader │ │ │ │ └── component │ │ │ │ │ ├── _index.ts │ │ │ │ │ └── cascader-loading.md │ │ │ ├── calendar │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── calendar-basic-use.md │ │ │ ├── overflow-list │ │ │ │ └── index.md │ │ │ ├── config-provider │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── provider-api.md │ │ │ ├── back-top │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── back-api.md │ │ │ ├── split │ │ │ │ └── index.md │ │ │ ├── empty │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ ├── empty-basic-use.md │ │ │ │ │ ├── empty-image.md │ │ │ │ │ └── empty-api.md │ │ │ ├── rate │ │ │ │ ├── component │ │ │ │ │ ├── rate-basic-use.md │ │ │ │ │ ├── rate-grading.md │ │ │ │ │ ├── rate-len.md │ │ │ │ │ ├── rate-half.md │ │ │ │ │ ├── rate-readonly.md │ │ │ │ │ ├── rate-clear.md │ │ │ │ │ └── rate-custom.md │ │ │ │ └── index.md │ │ │ ├── spin │ │ │ │ ├── component │ │ │ │ │ ├── spin-basic-use.md │ │ │ │ │ ├── spin-dot.md │ │ │ │ │ ├── spin-desc.md │ │ │ │ │ ├── spin-icon.md │ │ │ │ │ └── spin-size.md │ │ │ │ └── index.md │ │ │ ├── switch │ │ │ │ └── component │ │ │ │ │ ├── switch-basic-use.md │ │ │ │ │ ├── switch-color.md │ │ │ │ │ ├── switch-size.md │ │ │ │ │ └── switch-type.md │ │ │ ├── mention │ │ │ │ └── index.md │ │ │ ├── scrollbar │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── scrollbar-basic-use.md │ │ │ ├── tag │ │ │ │ ├── component │ │ │ │ │ ├── tag-loading.md │ │ │ │ │ ├── tag-size.md │ │ │ │ │ └── tag-close.md │ │ │ │ └── index.md │ │ │ ├── auto-complete │ │ │ │ └── index.md │ │ │ ├── pagination │ │ │ │ └── component │ │ │ │ │ ├── pagination-basic-use.md │ │ │ │ │ ├── pagination-more-page.md │ │ │ │ │ ├── pagination-jumper.md │ │ │ │ │ ├── pagination-total.md │ │ │ │ │ ├── pagination-page-size.md │ │ │ │ │ ├── pagination-complete.md │ │ │ │ │ └── pagination-simple.md │ │ │ ├── time-picker │ │ │ │ └── component │ │ │ │ │ ├── picker-basic-use.md │ │ │ │ │ ├── picker-extra.md │ │ │ │ │ ├── picker-vmodel.md │ │ │ │ │ ├── picker-step.md │ │ │ │ │ ├── picker-disabled.md │ │ │ │ │ ├── picker-confirm.md │ │ │ │ │ └── picker-format.md │ │ │ ├── checkbox │ │ │ │ └── component │ │ │ │ │ └── checkbox-basic-use.md │ │ │ ├── alert │ │ │ │ ├── component │ │ │ │ │ ├── alert-basic-use.md │ │ │ │ │ └── alert-banner.md │ │ │ │ └── index.md │ │ │ ├── divider │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── divider-vertical.md │ │ │ ├── skeleton │ │ │ │ └── index.md │ │ │ ├── input-tag │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ ├── input-basic-use.md │ │ │ │ │ └── input-max-count.md │ │ │ ├── comment │ │ │ │ └── index.md │ │ │ ├── slider │ │ │ │ └── component │ │ │ │ │ ├── slider-basic-use.md │ │ │ │ │ ├── slider-disabled.md │ │ │ │ │ └── slider-range.md │ │ │ ├── affix │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ ├── affix-basic-use.md │ │ │ │ │ ├── affix-cb.md │ │ │ │ │ ├── affix-bottom.md │ │ │ │ │ └── affix-top.md │ │ │ ├── resize-box │ │ │ │ └── index.md │ │ │ ├── textarea │ │ │ │ ├── component │ │ │ │ │ └── textarea-basic-use.md │ │ │ │ └── index.md │ │ │ ├── page-header │ │ │ │ └── index.md │ │ │ ├── popover │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── popover-basic-use.md │ │ │ ├── watermark │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ ├── watermark-basic-use.md │ │ │ │ │ ├── watermark-image.md │ │ │ │ │ └── watermark-content.md │ │ │ ├── link │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ ├── link-basic-use.md │ │ │ │ │ └── link-hover.md │ │ │ ├── popconfirm │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ ├── popconfirm-basic-use.md │ │ │ │ │ └── popconfirm-btn.md │ │ │ ├── tooltip │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── tooltip-mini.md │ │ │ ├── statistic │ │ │ │ └── index.md │ │ │ ├── anchor │ │ │ │ └── index.md │ │ │ ├── verification-code │ │ │ │ └── index.md │ │ │ ├── layout │ │ │ │ └── index.md │ │ │ ├── message │ │ │ │ ├── component │ │ │ │ │ ├── message-basic-use.md │ │ │ │ │ └── message-close.md │ │ │ │ └── index.md │ │ │ ├── menu │ │ │ │ └── index.md │ │ │ ├── input-number │ │ │ │ ├── index.md │ │ │ │ └── component │ │ │ │ │ └── input-button-mode.md │ │ │ ├── space │ │ │ │ └── index.md │ │ │ ├── avatar │ │ │ │ └── index.md │ │ │ ├── typography │ │ │ │ └── index.md │ │ │ ├── steps │ │ │ │ └── component │ │ │ │ │ ├── steps-dot.md │ │ │ │ │ └── steps-nav.md │ │ │ ├── descriptions │ │ │ │ └── index.md │ │ │ ├── image │ │ │ │ └── component │ │ │ │ │ └── image-basic-use.md │ │ │ ├── tabs │ │ │ │ └── index.md │ │ │ ├── transfer │ │ │ │ └── index.md │ │ │ ├── badge │ │ │ │ └── index.md │ │ │ ├── trigger │ │ │ │ └── index.md │ │ │ ├── carousel │ │ │ │ └── index.md │ │ │ ├── breadcrumb │ │ │ │ └── component │ │ │ │ │ └── breadcrumb-basic-use.md │ │ │ ├── list │ │ │ │ └── index.md │ │ │ ├── drawer │ │ │ │ └── index.md │ │ │ ├── color-picker │ │ │ │ └── component │ │ │ │ │ └── picker-disabled.md │ │ │ ├── button │ │ │ │ └── index.md │ │ │ ├── notification │ │ │ │ └── index.md │ │ │ └── radio │ │ │ │ └── component │ │ │ │ └── radio-group-dir.md │ │ ├── .vitepress │ │ │ ├── style │ │ │ │ └── index.less │ │ │ ├── components │ │ │ │ └── index.ts │ │ │ └── hooks │ │ │ │ └── useCodeExpand.ts │ │ ├── auto-imports.d.ts │ │ ├── postcss.config.mjs │ │ ├── guide │ │ │ └── dark.md │ │ └── components.d.ts │ └── package.json └── web-vue │ ├── src │ ├── components │ │ ├── Grid │ │ │ ├── style │ │ │ │ ├── grid.less │ │ │ │ └── row.less │ │ │ └── index.ts │ │ ├── Watermark │ │ │ ├── style │ │ │ │ └── watermark.less │ │ │ └── index.ts │ │ ├── BackTop │ │ │ ├── style │ │ │ │ └── back-top.less │ │ │ ├── type.ts │ │ │ └── index.ts │ │ ├── ColorPicker │ │ │ ├── style │ │ │ │ └── color-picker-select.less │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Dropdown │ │ │ ├── style │ │ │ │ ├── dgroup.less │ │ │ │ └── dropdown.less │ │ │ └── Dgroup.vue │ │ ├── Select │ │ │ ├── style │ │ │ │ └── option-group.less │ │ │ ├── Optgroup.vue │ │ │ └── index.ts │ │ ├── Menu │ │ │ └── style │ │ │ │ ├── sub-menu.less │ │ │ │ └── menu-item-group.less │ │ ├── _shared │ │ │ ├── components │ │ │ │ ├── VirtualList │ │ │ │ │ └── style │ │ │ │ │ │ └── virtual-list.less │ │ │ │ ├── ExpandTransition │ │ │ │ │ └── style │ │ │ │ │ │ └── expand-transition.less │ │ │ │ ├── index.ts │ │ │ │ ├── Icon │ │ │ │ │ └── style │ │ │ │ │ │ └── icon.less │ │ │ │ └── PreventFocus │ │ │ │ │ └── index.vue │ │ │ ├── icons │ │ │ │ ├── IconMinus.vue │ │ │ │ ├── IconPlus.vue │ │ │ │ ├── IconSeparator.vue │ │ │ │ ├── IconArrowRight.vue │ │ │ │ ├── IconArrowDown.vue │ │ │ │ ├── IconCheck.vue │ │ │ │ ├── IconLoading.vue │ │ │ │ ├── IconMenuUnfold.vue │ │ │ │ ├── IconUpload.vue │ │ │ │ ├── IconMenuFold.vue │ │ │ │ ├── IconClose.vue │ │ │ │ ├── IconFile.vue │ │ │ │ ├── IconDoubleRight.vue │ │ │ │ ├── IconTime.vue │ │ │ │ ├── IconDate.vue │ │ │ │ ├── IconFullScreen.vue │ │ │ │ ├── IconDelete.vue │ │ │ │ ├── IconCopy.vue │ │ │ │ ├── IconLink.vue │ │ │ │ ├── IconRotateLeft.vue │ │ │ │ ├── IconRotateRight.vue │ │ │ │ ├── IconToTop.vue │ │ │ │ ├── IconSearch.vue │ │ │ │ ├── IconZoomOut.vue │ │ │ │ ├── IconZoomIn.vue │ │ │ │ ├── IconMore.vue │ │ │ │ ├── IconRight.vue │ │ │ │ ├── IconExclamation.vue │ │ │ │ ├── IconInfoLine.vue │ │ │ │ ├── IconEdit.vue │ │ │ │ ├── IconEmpty.vue │ │ │ │ ├── IconEyeClose.vue │ │ │ │ ├── IconOriginSize.vue │ │ │ │ ├── IconEyeOpen.vue │ │ │ │ ├── IconDragDot.vue │ │ │ │ ├── IconWarning.vue │ │ │ │ ├── IconSuccess.vue │ │ │ │ ├── IconInfo.vue │ │ │ │ ├── IconError.vue │ │ │ │ ├── IconStar.vue │ │ │ │ └── IconFaceSmile.vue │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ ├── dependencies.ts │ │ │ │ └── hooks.ts │ │ ├── Empty │ │ │ ├── type.ts │ │ │ ├── index.ts │ │ │ └── style │ │ │ │ └── empty.less │ │ ├── Avatar │ │ │ ├── style │ │ │ │ └── avatar-group.less │ │ │ └── index.ts │ │ ├── Input │ │ │ └── InputGroup.vue │ │ ├── Typography │ │ │ ├── style │ │ │ │ ├── typography.less │ │ │ │ ├── typography-paragraph.less │ │ │ │ └── typography-title.less │ │ │ ├── Typography.vue │ │ │ └── TypographyText.vue │ │ ├── Breadcrumb │ │ │ ├── style │ │ │ │ └── breadcrumb.less │ │ │ ├── BreadcrumbMore.vue │ │ │ └── index.ts │ │ ├── AutoComplete │ │ │ ├── style │ │ │ │ └── auto-complete.less │ │ │ └── index.ts │ │ ├── Checkbox │ │ │ ├── style │ │ │ │ └── checkbox-group.less │ │ │ └── index.ts │ │ ├── List │ │ │ ├── style │ │ │ │ ├── list-item.less │ │ │ │ └── list-item-meta.less │ │ │ └── index.ts │ │ ├── Tag │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Link │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Rate │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Spin │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Affix │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Alert │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Badge │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Space │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Split │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Result │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Slider │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Switch │ │ │ └── index.ts │ │ ├── Upload │ │ │ ├── index.ts │ │ │ └── UploadButton.vue │ │ ├── Collapse │ │ │ ├── style │ │ │ │ └── collapse.less │ │ │ └── index.ts │ │ ├── Comment │ │ │ ├── index.ts │ │ │ ├── type.ts │ │ │ └── hooks │ │ │ │ └── useContext.ts │ │ ├── ConfigProvider │ │ │ ├── type.ts │ │ │ ├── index.ts │ │ │ └── index.vue │ │ ├── Divider │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Mention │ │ │ └── index.ts │ │ ├── Popover │ │ │ ├── index.ts │ │ │ └── style │ │ │ │ └── popover.less │ │ ├── Tooltip │ │ │ ├── index.ts │ │ │ └── style │ │ │ │ └── tooltip.less │ │ ├── Trigger │ │ │ └── index.ts │ │ ├── InputTag │ │ │ └── index.ts │ │ ├── Textarea │ │ │ └── index.ts │ │ ├── Calendar │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Progress │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Transfer │ │ │ └── index.ts │ │ ├── ResizeBox │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Scrollbar │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Layout │ │ │ ├── LayoutContent.vue │ │ │ ├── LayoutFooter.vue │ │ │ └── LayoutHeader.vue │ │ ├── PageHeader │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Popconfirm │ │ │ └── index.ts │ │ ├── Descriptions │ │ │ ├── DescriptionsItem.vue │ │ │ └── index.ts │ │ ├── Pagination │ │ │ └── index.ts │ │ ├── TimePicker │ │ │ └── index.ts │ │ ├── InputNumber │ │ │ └── index.ts │ │ ├── OverflowList │ │ │ ├── index.ts │ │ │ ├── type.ts │ │ │ └── style │ │ │ │ └── overflow-list.less │ │ ├── Image │ │ │ └── ImagePreviewArrow.vue │ │ ├── VerificationCode │ │ │ ├── index.ts │ │ │ └── type.ts │ │ ├── Radio │ │ │ ├── style │ │ │ │ └── radio-group.less │ │ │ └── index.ts │ │ ├── Tabs │ │ │ ├── index.ts │ │ │ ├── style │ │ │ │ └── tab-button.less │ │ │ └── TabButton.vue │ │ ├── Steps │ │ │ └── index.ts │ │ ├── Cascader │ │ │ └── index.ts │ │ ├── Card │ │ │ ├── CardGrid.vue │ │ │ ├── hooks │ │ │ │ └── useContext.ts │ │ │ └── index.ts │ │ ├── Skeleton │ │ │ ├── type.ts │ │ │ ├── Skeleton.vue │ │ │ └── SkeletonShape.vue │ │ ├── Anchor │ │ │ ├── index.ts │ │ │ ├── type.ts │ │ │ └── style │ │ │ │ └── anchor.less │ │ ├── Button │ │ │ ├── index.ts │ │ │ └── ButtonGroup.vue │ │ ├── Timeline │ │ │ ├── TimelineItemPending.vue │ │ │ └── index.ts │ │ ├── Statistic │ │ │ ├── index.ts │ │ │ └── style │ │ │ │ └── statistic.less │ │ ├── Carousel │ │ │ └── index.ts │ │ └── Message │ │ │ └── MessageList.vue │ ├── dev │ │ ├── vite-env.d.ts │ │ ├── main.ts │ │ ├── index.html │ │ └── README.md │ └── resolver │ │ └── autoImportPlugin.d.ts │ ├── tsconfig.node.json │ ├── .husky │ └── pre-commit │ └── .prettierrc.cjs └── .gitignore /.npmrc: -------------------------------------------------------------------------------- 1 | shamefully-hoist=true -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'packages/*' 3 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/upload/component/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-range.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/cascader/component/_index.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue'; 2 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Grid/style/grid.less: -------------------------------------------------------------------------------- 1 | .yc-grid { 2 | display: grid; 3 | } 4 | -------------------------------------------------------------------------------- /packages/web-docs/docs/.vitepress/style/index.less: -------------------------------------------------------------------------------- 1 | @import './custom.less'; 2 | @import './global.less'; 3 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Watermark/style/watermark.less: -------------------------------------------------------------------------------- 1 | .yc-watermark { 2 | position: relative; 3 | overflow: hidden; 4 | } 5 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/BackTop/style/back-top.less: -------------------------------------------------------------------------------- 1 | .yc-back-top { 2 | position: absolute; 3 | right: 24px; 4 | bottom: 24px; 5 | z-index: 10; 6 | } 7 | -------------------------------------------------------------------------------- /packages/web-docs/docs/.vitepress/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FieldTable } from './field-table/index.vue'; 2 | export { default as HeroImage } from './hero-image/index.vue'; 3 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ColorPicker/style/color-picker-select.less: -------------------------------------------------------------------------------- 1 | .yc-color-picker-format-popup-content { 2 | .yc-select-option { 3 | font-size: 12px; 4 | line-height: 24px; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Dropdown/style/dgroup.less: -------------------------------------------------------------------------------- 1 | .yc-dropdown-group-title { 2 | margin-top: 8px; 3 | padding: 0 12px; 4 | color: var(--color-text-3); 5 | font-size: 12px; 6 | line-height: 20px; 7 | } 8 | -------------------------------------------------------------------------------- /packages/web-vue/src/dev/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | declare module '*.vue' { 3 | const component: defineComponent<{}, {}, any>; 4 | export default component; 5 | } 6 | 7 | declare module 'b-tween'; 8 | -------------------------------------------------------------------------------- /packages/web-docs/docs/auto-imports.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | /* prettier-ignore */ 3 | // @ts-nocheck 4 | // noinspection JSUnusedGlobalSymbols 5 | // Generated by unplugin-auto-import 6 | export {} 7 | declare global { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Select/style/option-group.less: -------------------------------------------------------------------------------- 1 | .yc-option-group-label { 2 | width: 100%; 3 | margin-top: 8px; 4 | padding: 0 12px; 5 | color: var(--color-text-3); 6 | font-size: 12px; 7 | line-height: 20px; 8 | } 9 | -------------------------------------------------------------------------------- /packages/web-docs/docs/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | import { postcssIsolateStyles } from 'vitepress'; 2 | 3 | export default { 4 | plugins: [ 5 | postcssIsolateStyles({ 6 | includeFiles: [/vp-doc\.css/], // defaults to /base\.css/ 7 | }), 8 | ], 9 | }; 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Menu/style/sub-menu.less: -------------------------------------------------------------------------------- 1 | .yc-menu-inline { 2 | display: flex; 3 | flex-direction: column; 4 | gap: 4px; 5 | .yc-menu-inline-content { 6 | display: flex; 7 | flex-direction: column; 8 | gap: 4px; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/components/VirtualList/style/virtual-list.less: -------------------------------------------------------------------------------- 1 | .yc-virtual-list { 2 | position: relative; 3 | .yc-virtual-list-item { 4 | overflow: hidden; 5 | position: absolute; 6 | left: 0; 7 | top: 0; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconMinus.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Empty/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface EmptyProps { 4 | description?: string; 5 | imgSrc?: string; 6 | } 7 | 8 | export interface EmptySlots { 9 | image?: () => VNode[]; 10 | default?: () => VNode; 11 | } 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/components/ExpandTransition/style/expand-transition.less: -------------------------------------------------------------------------------- 1 | .expand-enter-active, 2 | .expand-leave-active { 3 | transition: 4 | max-height 0.2s cubic-bezier(0.34, 0.69, 0.1, 1), 5 | opacity 0.2s cubic-bezier(0.3, 1.3, 0.3, 1); 6 | } 7 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconPlus.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconSeparator.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconArrowRight.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconArrowDown.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconCheck.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Avatar/style/avatar-group.less: -------------------------------------------------------------------------------- 1 | .yc-avatar-group { 2 | height: fit-content; 3 | width: fit-content; 4 | display: inline-flex; 5 | align-items: center; 6 | 7 | .yc-avatar { 8 | flex-shrink: 0; 9 | border: 2px solid var(--color-bg-2); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/web-vue/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts", "src/plugins/*.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /packages/web-vue/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 运行代码检查 4 | lint_output=$(npm run lint 2>&1) 5 | 6 | # 检查代码检查的输出是否包含错误信息 7 | if echo "$lint_output" | grep -iq "error"; then 8 | echo "Code linting failed. Please fix the errors and try again." 9 | echo "$lint_output" 10 | exit 1 11 | fi 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/calendar/index.md: -------------------------------------------------------------------------------- 1 | # 日历 Calendar 2 | 3 | 日历组件。 4 | 5 | --- 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconLoading.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './color'; 2 | export * from './dependencies'; 3 | export * from './dom'; 4 | export * from './global-config'; 5 | export * from './hooks'; 6 | export * from './is'; 7 | export * from './locale'; 8 | export * from './time'; 9 | export * from './vue-utils'; 10 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Input/InputGroup.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Typography/style/typography.less: -------------------------------------------------------------------------------- 1 | .yc-typography { 2 | color: var(--color-text-1); 3 | line-height: 1.5715; 4 | white-space: normal; 5 | overflow-wrap: anywhere; 6 | 7 | ul { 8 | list-style: circle; 9 | } 10 | 11 | ul li { 12 | margin-left: 20px; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/web-docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "yc-design-docs", 3 | "version": "2.5.3", 4 | "type": "module", 5 | "description": "documentation for yc-design-vue.", 6 | "scripts": { 7 | "dev": "vitepress dev docs --host", 8 | "build": "vitepress build docs", 9 | "preview": "vitepress preview docs" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Breadcrumb/style/breadcrumb.less: -------------------------------------------------------------------------------- 1 | .yc-breadcrumb { 2 | display: inline-flex; 3 | align-items: center; 4 | color: var(--color-text-2); 5 | font-size: 14px; 6 | .yc-breadcrumb-item { 7 | &:last-child { 8 | color: var(--color-text-1); 9 | font-weight: 500; 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Typography/Typography.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconMenuUnfold.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconUpload.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Typography/style/typography-paragraph.less: -------------------------------------------------------------------------------- 1 | .yc-typography { 2 | blockquote { 3 | margin: 0 0 1em; 4 | padding-left: 8px; 5 | background-color: var(--color-bg-2); 6 | border-left: 2px solid var(--color-neutral-6); 7 | } 8 | } 9 | .yc-typography-spacing-close { 10 | line-height: 1.3; 11 | } 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconMenuFold.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/overflow-list/index.md: -------------------------------------------------------------------------------- 1 | # 折叠列表 OverflowList 2 | 3 | --- 4 | 5 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/AutoComplete/style/auto-complete.less: -------------------------------------------------------------------------------- 1 | .yc-select { 2 | &.yc-auto-complete { 3 | .yc-input-outer { 4 | .yc-input-wrapper { 5 | .yc-input { 6 | &::placeholder { 7 | color: var(--color-text-3) !important; 8 | } 9 | } 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Checkbox/style/checkbox-group.less: -------------------------------------------------------------------------------- 1 | .yc-checkbox-group-direction-horizontal { 2 | display: inline-flex; 3 | align-items: center; 4 | gap: 16px; 5 | } 6 | .yc-checkbox-group-direction-vertical { 7 | display: flex; 8 | flex-direction: column; 9 | .yc-checkbox { 10 | line-height: 32px; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconClose.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/config-provider/index.md: -------------------------------------------------------------------------------- 1 | # 全局配置 ConfigProvider 2 | 3 | 在应用的最外层进行配置,一次设置,全局生效。一般用于设置国际化语言等功能。 4 | 5 | --- 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/guide/dark.md: -------------------------------------------------------------------------------- 1 | # 暗黑模式 2 | 3 | 组件库内置暗色的主题,你可以轻易的切换到暗色。 4 | 5 | ## 切换到暗黑模式 6 | 7 | 组件库通过 BODY 标签上的 yc-design-theme 属性来标明当前的主题,所以你只要修改这个属性,即可完成主题的切换。 8 | 9 | ```typescript 10 | // 设置为暗黑主题 11 | document.body.setAttribute('yc-design-theme', 'dark'); 12 | // 恢复亮色主题 13 | document.body.removeAttribute('yc-design-theme'); 14 | ``` 15 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/List/style/list-item.less: -------------------------------------------------------------------------------- 1 | .yc-list-item { 2 | overflow: hidden; 3 | width: 100%; 4 | display: flex; 5 | justify-content: space-between; 6 | .yc-list-item-main { 7 | flex: 1; 8 | } 9 | .yc-list-item-action { 10 | display: flex; 11 | align-items: center; 12 | gap: 20px; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconFile.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/back-top/index.md: -------------------------------------------------------------------------------- 1 | # 返回顶部 BackTop 2 | 3 | 可一键返回顶部的按钮。 4 | 5 | --- 6 | 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tag/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Tag from './index.vue'; 3 | 4 | export type TagInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Tag = Object.assign(_Tag, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Tag.name, _Tag); 10 | }, 11 | }); 12 | 13 | export default Tag; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconDoubleRight.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconTime.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/split/index.md: -------------------------------------------------------------------------------- 1 | # 面板分割 Split 2 | 3 | 将面板分割成两部分。 4 | 5 | --- 6 | 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Menu/style/menu-item-group.less: -------------------------------------------------------------------------------- 1 | .yc-menu-group { 2 | display: flex; 3 | flex-direction: column; 4 | gap: 4px; 5 | .yc-menu-group-title { 6 | max-width: 100%; 7 | padding: 0 12px; 8 | line-height: 40px; 9 | font-size: 14px; 10 | color: var(--color-text-3); 11 | font-weight: 400; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/BackTop/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { TargetContainer } from '@shared/type'; 3 | 4 | export interface BackTopProps { 5 | visibleHeight?: number; 6 | targetContainer?: TargetContainer; 7 | easeing?: string; 8 | duration?: number; 9 | } 10 | 11 | export interface BackTopSlots { 12 | default?: () => VNode[]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Link/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Link from './index.vue'; 3 | 4 | export type LinkInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Link = Object.assign(_Link, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Link.name, _Link); 10 | }, 11 | }); 12 | 13 | export default Link; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Rate/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Rate from './index.vue'; 3 | 4 | export type RateInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Rate = Object.assign(_Rate, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Rate.name, _Rate); 10 | }, 11 | }); 12 | 13 | export default Rate; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Spin/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Spin from './index.vue'; 3 | 4 | export type SpinInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Spin = Object.assign(_Spin, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Spin.name, _Spin); 10 | }, 11 | }); 12 | 13 | export default Spin; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconDate.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconFullScreen.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Affix/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Affix from './index.vue'; 3 | 4 | export type AffixInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Affix = Object.assign(_Affix, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Affix.name, _Affix); 10 | }, 11 | }); 12 | 13 | export default Affix; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Alert/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Alert from './index.vue'; 3 | 4 | export type AlertInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Alert = Object.assign(_Alert, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Alert.name, _Alert); 10 | }, 11 | }); 12 | 13 | export default Alert; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Badge/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Badge from './index.vue'; 3 | 4 | export type BadgeInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Badge = Object.assign(_Badge, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Badge.name, _Badge); 10 | }, 11 | }); 12 | 13 | export default Badge; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Empty/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Empty from './index.vue'; 3 | 4 | export type EmptyInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Empty = Object.assign(_Empty, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Empty.name, _Empty); 10 | }, 11 | }); 12 | 13 | export default Empty; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Space/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Space from './index.vue'; 3 | 4 | export type SpaceInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Space = Object.assign(_Space, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Space.name, _Space); 10 | }, 11 | }); 12 | 13 | export default Space; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Split/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Split from './index.vue'; 3 | 4 | export type SplitInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Split = Object.assign(_Split, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Split.name, _Split); 10 | }, 11 | }); 12 | 13 | export default Split; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconButton } from './IconButton/index.vue'; 2 | export { default as PreventFocus } from './PreventFocus/index.vue'; 3 | export { default as ExpandTransition } from './ExpandTransition/index.vue'; 4 | export { default as Icon } from './Icon/index.vue'; 5 | export { default as VirtualList } from './VirtualList/index.vue'; 6 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/empty/index.md: -------------------------------------------------------------------------------- 1 | # 空状态 Empty 2 | 3 | 指当前场景没有对应的数据内容,呈现出的一种状态。 4 | 5 | --- 6 | 7 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Result/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Result from './index.vue'; 3 | 4 | export type ResultInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Result = Object.assign(_Result, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Result.name, _Result); 10 | }, 11 | }); 12 | 13 | export default Result; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Slider/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Slider from './Slider.vue'; 3 | 4 | export type SliderInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Slider = Object.assign(_Slider, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Slider.name, _Slider); 10 | }, 11 | }); 12 | 13 | export default Slider; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Switch/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Switch from './index.vue'; 3 | 4 | export type SwitchInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Switch = Object.assign(_Switch, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Switch.name, _Switch); 10 | }, 11 | }); 12 | 13 | export default Switch; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Upload/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Upload from './Upload.vue'; 3 | 4 | export type UploadInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Upload = Object.assign(_Upload, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Upload.name, _Upload); 10 | }, 11 | }); 12 | 13 | export default Upload; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/BackTop/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _BackTop from './index.vue'; 3 | 4 | export type BackTopInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const BackTop = Object.assign(_BackTop, { 8 | install: (app: App) => { 9 | app.component('Yc' + _BackTop.name, _BackTop); 10 | }, 11 | }); 12 | 13 | export default BackTop; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Collapse/style/collapse.less: -------------------------------------------------------------------------------- 1 | .yc-collapse { 2 | width: 100%; 3 | overflow: hidden; 4 | line-height: 1.5715; 5 | border-radius: var(--border-radius-medium); 6 | .yc-collapse-item { 7 | &:last-child { 8 | border-bottom: none; 9 | } 10 | } 11 | } 12 | .yc-collapse-bordered { 13 | border: 1px solid var(--color-neutral-3); 14 | } 15 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Comment/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Comment from './index.vue'; 3 | 4 | export type CommentInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Comment = Object.assign(_Comment, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Comment.name, _Comment); 10 | }, 11 | }); 12 | 13 | export default Comment; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ConfigProvider/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Size, PopupContainer, RecordType } from '@shared/type'; 3 | 4 | export interface ConfigProviderProps { 5 | locale?: RecordType; 6 | zIndex?: number; 7 | size?: Size; 8 | popupContainer?: PopupContainer; 9 | } 10 | 11 | export interface ConfigconfigSlots { 12 | default?: () => VNode[]; 13 | } 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Divider/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Divider from './index.vue'; 3 | 4 | export type DividerInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Divider = Object.assign(_Divider, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Divider.name, _Divider); 10 | }, 11 | }); 12 | 13 | export default Divider; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Mention/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Mention from './index.vue'; 3 | 4 | export type MentionInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Mention = Object.assign(_Mention, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Mention.name, _Mention); 10 | }, 11 | }); 12 | 13 | export default Mention; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Popover/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Popover from './index.vue'; 3 | 4 | export type PopoverInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Popover = Object.assign(_Popover, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Popover.name, _Popover); 10 | }, 11 | }); 12 | 13 | export default Popover; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tooltip/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Tooltip from './index.vue'; 3 | 4 | export type TooltipInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Tooltip = Object.assign(_Tooltip, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Tooltip.name, _Tooltip); 10 | }, 11 | }); 12 | 13 | export default Tooltip; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Trigger/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Trigger from './index.vue'; 3 | 4 | export type TriggerInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Trigger = Object.assign(_Trigger, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Trigger.name, _Trigger); 10 | }, 11 | }); 12 | 13 | export default Trigger; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconDelete.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 评分组件基本用法。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/spin/component/spin-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 用于展示加载中的状态。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/InputTag/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _InputTag from './index.vue'; 3 | 4 | export type InputTagInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const InputTag = Object.assign(_InputTag, { 8 | install: (app: App) => { 9 | app.component('Yc' + _InputTag.name, _InputTag); 10 | }, 11 | }); 12 | 13 | export default InputTag; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Textarea/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Textarea from './index.vue'; 3 | 4 | export type TextareaInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Textarea = Object.assign(_Textarea, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Textarea.name, _Textarea); 10 | }, 11 | }); 12 | 13 | export default Textarea; 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/switch/component/switch-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 开关的基本用法。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Calendar/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Calendar from './Calendar.vue'; 3 | 4 | export type CalendarInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Calendar = Object.assign(_Calendar, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Calendar.name, _Calendar); 10 | }, 11 | }); 12 | 13 | export default Calendar; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Progress/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Progress from './Progress.vue'; 3 | 4 | export type ProgressInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Progress = Object.assign(_Progress, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Progress.name, _Progress); 10 | }, 11 | }); 12 | 13 | export default Progress; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Spin/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface SpinProps { 4 | size?: number; 5 | loading?: boolean; 6 | dot?: boolean; 7 | tip?: string; 8 | hideIcon?: boolean; 9 | // 是否阻止焦点 10 | isSizeInherit?: boolean; 11 | } 12 | 13 | export interface SpinSlots { 14 | default?: () => VNode[]; 15 | icon?: () => VNode[]; 16 | tip?: () => VNode[]; 17 | } 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Transfer/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Transfer from './Transfer.vue'; 3 | 4 | export type TransferInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Transfer = Object.assign(_Transfer, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Transfer.name, _Transfer); 10 | }, 11 | }); 12 | 13 | export default Transfer; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconCopy.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/mention/index.md: -------------------------------------------------------------------------------- 1 | # 提及 Mention 2 | 3 | 用于在输入中提及某人或某事,常用于发布、聊天或评论功能。 4 | 5 | --- 6 | 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ResizeBox/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _ResizeBox from './index.vue'; 3 | 4 | export type ResizeBoxInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const ResizeBox = Object.assign(_ResizeBox, { 8 | install: (app: App) => { 9 | app.component('Yc' + _ResizeBox.name, _ResizeBox); 10 | }, 11 | }); 12 | 13 | export default ResizeBox; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Watermark/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Watermark from './index.vue'; 3 | 4 | export type WatermarkInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Watermark = Object.assign(_Watermark, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Watermark.name, _Watermark); 10 | }, 11 | }); 12 | 13 | export default Watermark; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/dev/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import App from './index.vue'; 3 | import Arco from '@arco-design/web-vue'; 4 | import ArcoIcon from '@arco-design/web-vue/es/icon'; 5 | import '@arco-design/web-vue/dist/arco.css'; 6 | import YcDesign from '@/components'; 7 | 8 | const app = createApp(App); 9 | app.use(ArcoIcon); 10 | app.use(Arco); 11 | app.use(YcDesign); 12 | app.mount('#app'); 13 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/scrollbar/index.md: -------------------------------------------------------------------------------- 1 | # 滚动条 Scrollbar 2 | 3 | 用于替换浏览器默认滚动条样式。 4 | 5 | --- 6 | 7 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/spin/component/spin-dot.md: -------------------------------------------------------------------------------- 1 | ### 点类型指示符 2 | 3 | 通过 `dot` 属性,可以展示点类型的指示符。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Scrollbar/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Scrollbar from './Scrollbar.vue'; 3 | 4 | export type ScrollbarInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Scrollbar = Object.assign(_Scrollbar, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Scrollbar.name, _Scrollbar); 10 | }, 11 | }); 12 | 13 | export default Scrollbar; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconLink.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconRotateLeft.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconRotateRight.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconToTop.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-grading.md: -------------------------------------------------------------------------------- 1 | ### 笑脸分级 2 | 3 | 通过 `grading` 使用笑脸分级。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Layout/LayoutContent.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Layout/LayoutFooter.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Layout/LayoutHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/PageHeader/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _PageHeader from './index.vue'; 3 | 4 | export type PageHeaderInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const PageHeader = Object.assign(_PageHeader, { 8 | install: (app: App) => { 9 | app.component('Yc' + _PageHeader.name, _PageHeader); 10 | }, 11 | }); 12 | 13 | export default PageHeader; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Popconfirm/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Popconfirm from './index.vue'; 3 | 4 | export type PopconfirmInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Popconfirm = Object.assign(_Popconfirm, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Popconfirm.name, _Popconfirm); 10 | }, 11 | }); 12 | 13 | export default Popconfirm; 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/empty/component/empty-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 对不同章节的文本段落进行分割,默认为水平分割线,可在中间加入文字。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Descriptions/DescriptionsItem.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Pagination/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Pagination from './Pagination.vue'; 3 | 4 | export type PaginationInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const Pagination = Object.assign(_Pagination, { 8 | install: (app: App) => { 9 | app.component('Yc' + _Pagination.name, _Pagination); 10 | }, 11 | }); 12 | 13 | export default Pagination; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/TimePicker/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _TimePicker from './TimePicker.vue'; 3 | 4 | export type TimePickerInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const TimePicker = Object.assign(_TimePicker, { 8 | install: (app: App) => { 9 | app.component('Yc' + _TimePicker.name, _TimePicker); 10 | }, 11 | }); 12 | 13 | export default TimePicker; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/dev/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | yc-ui 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-len.md: -------------------------------------------------------------------------------- 1 | ### 任意长度的评分 2 | 3 | 通过指定 `count` 来指定任意长度的评分组件。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tag/component/tag-loading.md: -------------------------------------------------------------------------------- 1 | ### 加载中状态 2 | 3 | 标签的加载中状态。 4 | 5 |
6 | Loading 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/AutoComplete/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _AutoComplete from './index.vue'; 3 | 4 | export type AutoCompleteInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const AutoComplete = Object.assign(_AutoComplete, { 8 | install: (app: App) => { 9 | app.component('Yc' + _AutoComplete.name, _AutoComplete); 10 | }, 11 | }); 12 | 13 | export default AutoComplete; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ColorPicker/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _ColorPicker from './ColorPicker.vue'; 3 | 4 | export type ColorPickerInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const ColorPicker = Object.assign(_ColorPicker, { 8 | install: (app: App) => { 9 | app.component('Yc' + _ColorPicker.name, _ColorPicker); 10 | }, 11 | }); 12 | 13 | export default ColorPicker; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/InputNumber/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _InputNumber from './InputNumber.vue'; 3 | 4 | export type InputNumberInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const InputNumber = Object.assign(_InputNumber, { 8 | install: (app: App) => { 9 | app.component('Yc' + _InputNumber.name, _InputNumber); 10 | }, 11 | }); 12 | 13 | export default InputNumber; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/OverflowList/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _OverflowList from './index.vue'; 3 | 4 | export type OverflowListInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const OverflowList = Object.assign(_OverflowList, { 8 | install: (app: App) => { 9 | app.component('Yc' + _OverflowList.name, _OverflowList); 10 | }, 11 | }); 12 | 13 | export default OverflowList; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/components/Icon/style/icon.less: -------------------------------------------------------------------------------- 1 | @keyframes spin { 2 | 0% { 3 | transform: rotate(0deg); 4 | } 5 | 100% { 6 | transform: rotate(360deg); 7 | } 8 | } 9 | .yc-icon { 10 | display: inline-block; 11 | overflow: hidden; 12 | width: 1em; 13 | height: 1em; 14 | color: inherit; 15 | } 16 | .yc-icon-spin { 17 | animation: spin 1s infinite cubic-bezier(0, 0, 1, 1); 18 | } 19 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconSearch.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | // @ts-nocheck 3 | // Generated by unplugin-vue-components 4 | // Read more: https://github.com/vuejs/core/pull/3399 5 | export {} 6 | 7 | /* prettier-ignore */ 8 | declare module 'vue' { 9 | export interface GlobalComponents { 10 | ATable: typeof import('@arco-design/web-vue')['Table'] 11 | ATableColumn: typeof import('@arco-design/web-vue')['TableColumn'] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/upload/component/upload-draggable.md: -------------------------------------------------------------------------------- 1 | ### 拖拽上传 2 | 3 | 通过设置 `draggable` 开启对拖拽的支持。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/OverflowList/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface OverflowListProps { 4 | min?: number; 5 | margin?: number; 6 | from?: From; 7 | } 8 | 9 | export interface OverflowListEmits { 10 | (e: 'change', value: number): void; 11 | } 12 | 13 | export interface OverflowListSlots { 14 | default?: () => VNode[]; 15 | overflow?: () => VNode[]; 16 | } 17 | 18 | type From = 'start' | 'end'; 19 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconZoomOut.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconZoomIn.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/auto-complete/index.md: -------------------------------------------------------------------------------- 1 | # 自动补全 AutoComplete 2 | 3 | 输入框的自动补全功能。 4 | 5 | --- 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconMore.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ConfigProvider/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _ConfigProvider from './index.vue'; 3 | 4 | export type ConfigProviderInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const ConfigProvider = Object.assign(_ConfigProvider, { 8 | install: (app: App) => { 9 | app.component('Yc' + _ConfigProvider.name, _ConfigProvider); 10 | }, 11 | }); 12 | 13 | export default ConfigProvider; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Image/ImagePreviewArrow.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-year.md: -------------------------------------------------------------------------------- 1 | ### 年份选择器 2 | 3 | 年份输入器的基础使用。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 分页的基本用法,`total` 属性为必填项。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-more-page.md: -------------------------------------------------------------------------------- 1 | ### 更多页码 2 | 3 | 当页码较大时,会使用更多页码的分页样式。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconRight.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 日期输入器的基础使用。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-month.md: -------------------------------------------------------------------------------- 1 | ### 月份选择器 2 | 3 | 月份输入器的基础使用。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/spin/component/spin-desc.md: -------------------------------------------------------------------------------- 1 | ### 点类型指示符 2 | 3 | 通过 `tip` 属性添加描述文案。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 时间输入器的基础用法。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconExclamation.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconInfoLine.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/checkbox/component/checkbox-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 复选框的基本用法。 4 | 5 |
6 | Option 1 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/.prettierrc.cjs: -------------------------------------------------------------------------------- 1 | // prettier的默认配置文件 2 | module.exports = { 3 | // 一行最多 80 字符 4 | printWidth: 80, 5 | // 使用 2 个空格缩进 6 | tabWidth: 2, 7 | // 不使用缩进符,而使用空格 8 | useTabs: false, 9 | // 尾随分号 10 | semi: true, 11 | // 使用单引号 12 | singleQuote: true, 13 | // 多行逗号分割的语法中,最后一行不加逗号 14 | trailingComma: 'es5', 15 | // 单个参数的箭头函数不加括号 x => x 16 | arrowParens: 'always', 17 | // 对象大括号内两边是否加空格 { a:0 } 18 | bracketSpacing: true, 19 | }; 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | lib 13 | es 14 | cache 15 | dist-ssr 16 | *.local 17 | 18 | # VitePress (Documentation) 19 | .vitepress/cache 20 | .vitepress/dist 21 | 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/alert/component/alert-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 展现需要关注的信息,适用于简短的警告提示。 4 | 5 |
6 | This is an info alert. 7 |
8 | 9 |
10 | 11 | 14 | 15 | 16 | ```vue 17 | 20 | ``` 21 | 22 |
23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/VerificationCode/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _VerificationCode from './index.vue'; 3 | 4 | export type VerificationCodeInstance = InstanceType; 5 | export * from './type'; 6 | 7 | const VerificationCode = Object.assign(_VerificationCode, { 8 | install: (app: App) => { 9 | app.component('Yc' + _VerificationCode.name, _VerificationCode); 10 | }, 11 | }); 12 | 13 | export default VerificationCode; 14 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/components/PreventFocus/index.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 22 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconEdit.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Badge/type.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties, VNode } from 'vue'; 2 | import { Status } from '@shared/type'; 3 | 4 | export interface BadgeProps { 5 | text?: string; 6 | dot?: boolean; 7 | dotStyle?: CSSProperties; 8 | maxCount?: number; 9 | offset?: number[]; 10 | color?: string; 11 | status?: Status<'processing'>; 12 | count?: number; 13 | } 14 | 15 | export interface BadgeSlots { 16 | default?: () => VNode[]; 17 | content?: () => VNode[]; 18 | } 19 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconEmpty.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconEyeClose.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/divider/index.md: -------------------------------------------------------------------------------- 1 | # 分割线 Divider 2 | 3 | 划分内容区域,对模块做分隔。 4 | 5 | --- 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconOriginSize.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/skeleton/index.md: -------------------------------------------------------------------------------- 1 | # 骨架屏 Skeleton 2 | 3 | 将加载中的数据用灰色占位。 4 | 5 | --- 6 | 7 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Divider/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Direction } from '@shared/type'; 3 | 4 | export interface DividerProps { 5 | direction?: Direction; 6 | orientation?: Orientation; 7 | type?: Type; 8 | size?: number; 9 | margin?: number | string; 10 | } 11 | 12 | export interface DividerSlots { 13 | default?: () => VNode[]; 14 | } 15 | 16 | type Orientation = 'left' | 'center' | 'right'; 17 | 18 | type Type = 'solid' | 'dashed' | 'dotted' | 'double'; 19 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-half.md: -------------------------------------------------------------------------------- 1 | ### 半选 2 | 3 | 指定 `allow-half` 来开启半选。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/upload/component/upload-limit.md: -------------------------------------------------------------------------------- 1 | ### 限制上传数量 2 | 3 | 通过 `limit` 限制上传的最大数量。超出后上传按钮会隐藏. 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Breadcrumb/BreadcrumbMore.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-readonly.md: -------------------------------------------------------------------------------- 1 | ### 只读模式 2 | 3 | 通过设置 `readonly` 属性让评分组件为只读状态。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-clear.md: -------------------------------------------------------------------------------- 1 | ### 支持清除 2 | 3 | 通过设置 `allow-clear` 来允许清除评分。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Space/type.ts: -------------------------------------------------------------------------------- 1 | import { Direction, Size } from '@shared/type'; 2 | import { VNode } from 'vue'; 3 | export interface SpaceProps { 4 | align?: Align; 5 | direction?: Direction; 6 | wrap?: boolean; 7 | fill?: boolean; 8 | size?: SpaceSize | [SpaceSize, SpaceSize]; 9 | } 10 | 11 | export interface SpaceSlots { 12 | default?: () => VNode[]; 13 | split?: () => VNode[]; 14 | } 15 | 16 | type Align = 'start' | 'end' | 'center' | 'baseline'; 17 | 18 | type SpaceSize = Size | number; 19 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/PageHeader/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface PageHeaderProp { 4 | title?: string; 5 | subtitle?: string; 6 | showBack?: boolean; 7 | } 8 | 9 | export interface PageHeaderEmits { 10 | (e: 'back', ev: Event): void; 11 | } 12 | 13 | export interface PageHeaderSlots { 14 | default?: () => VNode[]; 15 | breadcrumb?: () => VNode[]; 16 | 'back-icon': VNode[]; 17 | title?: () => VNode[]; 18 | subtitle?: () => VNode[]; 19 | extra?: () => VNode[]; 20 | } 21 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Radio/style/radio-group.less: -------------------------------------------------------------------------------- 1 | .yc-radio-group-direction-horizontal { 2 | display: inline-flex; 3 | align-items: center; 4 | gap: 20px; 5 | } 6 | .yc-radio-group-direction-vertical { 7 | display: flex; 8 | flex-direction: column; 9 | .yc-radio { 10 | line-height: 32px; 11 | } 12 | } 13 | .yc-radio-button-group { 14 | display: inline-flex; 15 | padding: 1.5px; 16 | background-color: var(--color-fill-2); 17 | border-radius: var(--border-radius-small); 18 | } 19 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-jumper.md: -------------------------------------------------------------------------------- 1 | ### 页码跳转 2 | 3 | 通过设置 `show-jumper`,显示页码跳转输入框。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-total.md: -------------------------------------------------------------------------------- 1 | ### 展示总数 2 | 3 | 通过设置 `show-total` 属性显示数据总数。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Grid/style/row.less: -------------------------------------------------------------------------------- 1 | .yc-row { 2 | display: flex; 3 | } 4 | .yc-row-wrap { 5 | flex-wrap: wrap; 6 | } 7 | 8 | // justify 9 | @justify: { 10 | start: flex-start; 11 | center: center; 12 | end: flex-end; 13 | space-around: space-around; 14 | space-between: space-between; 15 | }; 16 | each(@justify, { 17 | .yc-row-justify-@{key} { 18 | justify-content: @value; 19 | } 20 | .yc-row-align-@{key} { 21 | align-items: @value; 22 | } 23 | }); 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tooltip/style/tooltip.less: -------------------------------------------------------------------------------- 1 | .yc-tooltip { 2 | .yc-tooltip-popup-content { 3 | max-width: 350px; 4 | padding: 8px 12px; 5 | border-radius: var(--border-radius-small); 6 | color: var(--color-white); 7 | background-color: var(--color-tooltip-bg); 8 | font-size: 14px; 9 | line-height: 1.5715; 10 | text-align: left; 11 | word-wrap: break-word; 12 | &.yc-tooltip-mini { 13 | padding: 4px 12px; 14 | font-size: 14px; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/input-tag/index.md: -------------------------------------------------------------------------------- 1 | # 标签输入框 InputTag 2 | 3 | 用来输入标签。 4 | 5 | --- 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Result/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface ResultProps { 4 | status?: Status; 5 | title?: string; 6 | subtitle?: string; 7 | } 8 | 9 | export interface ResultSlots { 10 | icon?: () => VNode[]; 11 | title?: () => VNode[]; 12 | subtitle?: () => VNode[]; 13 | default?: () => VNode[]; 14 | extra?: () => VNode[]; 15 | } 16 | 17 | type Status = 18 | | 'success' 19 | | 'warning' 20 | | 'error' 21 | | 'info' 22 | | '403' 23 | | '404' 24 | | '500' 25 | | null; 26 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-page-size.md: -------------------------------------------------------------------------------- 1 | ### 每页条数 2 | 3 | 通过设置 `show-page-size`, 展示每页条数选择器。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Affix/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { TargetContainer } from '@shared/type'; 3 | 4 | export interface AffixProps { 5 | offsetTop?: number; 6 | offsetBottom?: number; 7 | target?: TargetContainer; 8 | targetContainer?: TargetContainer; 9 | } 10 | 11 | export interface AffixEmits { 12 | (e: 'change', fixed: boolean): void; 13 | } 14 | 15 | export interface AffixSlots { 16 | default?: () => VNode[]; 17 | } 18 | 19 | export interface AffixExpose { 20 | updatePosition(): void; 21 | } 22 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Progress/type.ts: -------------------------------------------------------------------------------- 1 | import { Size, Status } from '@shared/type'; 2 | 3 | export interface ProgressProps { 4 | type?: ProgressType; 5 | size?: Size; 6 | percent?: number; 7 | steps?: number; 8 | animation?: boolean; 9 | strokeWidth?: number; 10 | width?: number; 11 | color?: ProgressColor; 12 | trackColor?: string; 13 | showText?: boolean; 14 | status?: Status; 15 | } 16 | 17 | export type ProgressType = 'line' | 'circle'; 18 | 19 | export type ProgressColor = string | Record; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Select/Optgroup.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/comment/index.md: -------------------------------------------------------------------------------- 1 | # 评论 Comment 2 | 3 | 展示评论信息 4 | 5 | --- 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/slider/component/slider-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 滑动输入条的基本用法。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/affix/index.md: -------------------------------------------------------------------------------- 1 | # 固钉 Affix 2 | 3 | 将页面元素钉在可视范围。当内容区域比较长,需要滚动页面时,固钉可以将内容固定在屏幕上。常用于侧边菜单和按钮组合。 4 | 5 | --- 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/resize-box/index.md: -------------------------------------------------------------------------------- 1 | # 伸缩框 ResizeBox 2 | 3 | 伸缩框组件。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/textarea/component/textarea-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 可以用于多行输入。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tabs/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Tabs from './Tabs.vue'; 3 | import _TabPane from './TabPane.vue'; 4 | 5 | export type TabsInstance = InstanceType; 6 | export type TabPaneInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Tabs = Object.assign(_Tabs, { 10 | install: (app: App) => { 11 | app.component('Yc' + _Tabs.name, _Tabs); 12 | app.component('Yc' + _TabPane.name, _TabPane); 13 | }, 14 | }); 15 | 16 | export { _TabPane as TabPane }; 17 | 18 | export default Tabs; 19 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tabs/style/tab-button.less: -------------------------------------------------------------------------------- 1 | .yc-icon-button { 2 | color: inherit; 3 | &.yc-tabs-nav-button-left { 4 | margin: 0 6px 0 10px; 5 | } 6 | &.yc-tabs-nav-button-right { 7 | margin: 0 10px 0 6px; 8 | } 9 | &.yc-tabs-nav-button-up { 10 | margin-bottom: 10px; 11 | } 12 | &.yc-tabs-nav-button-down { 13 | margin-top: 10px; 14 | } 15 | &.yc-tabs-tab-close-button { 16 | user-select: none; 17 | color: inherit; 18 | } 19 | &.yc-tabs-nav-add-button { 20 | padding: 0 8px; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconEyeOpen.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/page-header/index.md: -------------------------------------------------------------------------------- 1 | # 页头 PageHeader 2 | 3 | 页头位于页容器顶部,起到了内容概览和引导页级操作的作用。包括面包屑、标题等内容。 4 | 5 | --- 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/slider/component/slider-disabled.md: -------------------------------------------------------------------------------- 1 | ### 禁用状态 2 | 3 | 禁用滑动输入条。 4 | 5 |
6 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 26 | ``` 27 | 28 |
29 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/popover/index.md: -------------------------------------------------------------------------------- 1 | # 气泡卡片 Popover 2 | 3 | 鼠标悬停、聚焦或点击在某个组件时,弹出的气泡式的卡片浮层。可以对卡片上的元素进行操作。 4 | 5 | --- 6 | 7 | 14 | 15 | 16 | 17 | 18 | `popover` 组件的 `trigger-props` 继承 `trigger` 组件的全部属性 19 | 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Steps/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Step from './Step.vue'; 3 | import _Steps from './Steps.vue'; 4 | 5 | export type StepInstance = InstanceType; 6 | export type StepsInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Steps = Object.assign(_Steps, { 10 | step: _Step, 11 | install: (app: App) => { 12 | app.component('Yc' + _Step.name, _Step); 13 | app.component('Yc' + _Steps.name, _Steps); 14 | }, 15 | }); 16 | 17 | export { _Step as Step }; 18 | 19 | export default Steps; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconDragDot.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/switch/component/switch-color.md: -------------------------------------------------------------------------------- 1 | ### 自定义开关的颜色 2 | 3 | 通过 `checked-color` 和 `unchecked-color` 可以自定义开关的颜色。 4 | 5 |
6 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Cascader/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Cascader from './Cascader.vue'; 3 | import _CascaderPanel from './CascaderDataPanel.vue'; 4 | 5 | export type CascaderInstance = InstanceType; 6 | export * from './type'; 7 | 8 | const Cascader = Object.assign(_Cascader, { 9 | install: (app: App) => { 10 | app.component('Yc' + _Cascader.name, _Cascader); 11 | app.component('Yc' + _CascaderPanel.name, _CascaderPanel); 12 | }, 13 | }); 14 | 15 | export { _CascaderPanel as CascaderPanel }; 16 | 17 | export default Cascader; 18 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/spin/component/spin-icon.md: -------------------------------------------------------------------------------- 1 | ### 自定义图标 2 | 3 | 通过 `#icon` 插槽可以自定义图标。 4 | 5 |
6 | 7 | 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/alert/component/alert-banner.md: -------------------------------------------------------------------------------- 1 | ### 顶部公告 2 | 3 | 通过设置 `banner`,可将警告提示作为顶部公告使用(去除边框和圆角)。 4 | 5 |
6 | This is an info alert. 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/affix/component/affix-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 基本用法,不设置固定位置时,当页面滚动元素不可见时,元素固定在页面最顶部。 4 | 5 |
6 | 7 | Affix Top 8 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-complete.md: -------------------------------------------------------------------------------- 1 | ### 全部展示 2 | 3 | 展示全部配置项。 4 | 5 |
6 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/switch/component/switch-size.md: -------------------------------------------------------------------------------- 1 | ### 开关尺寸 2 | 3 | 开关分为 `small`、`medium` 两种尺寸。 4 | 5 |
6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 26 | ``` 27 | 28 |
29 | -------------------------------------------------------------------------------- /packages/web-vue/src/resolver/autoImportPlugin.d.ts: -------------------------------------------------------------------------------- 1 | export interface ComponentInfo { 2 | name: string; 3 | from: string; 4 | as: string; 5 | sideEffects?: string | string[]; 6 | } 7 | 8 | export interface ComponentResolver { 9 | type: 'component'; 10 | resolve: (name: string) => ComponentInfo | undefined | null; 11 | } 12 | 13 | export interface YcDesignVueResolverOptions { 14 | exclude?: string | RegExp | (string | RegExp)[]; 15 | sideEffect?: boolean; 16 | } 17 | 18 | export declare const YcDesignVueResolver: ( 19 | options?: YcDesignVueResolverOptions 20 | ) => ComponentResolver; 21 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/watermark/index.md: -------------------------------------------------------------------------------- 1 | # 水印 Watermark 2 | 3 | 用于给页面的指定区域加上水印。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Link/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Status } from '@shared/type'; 3 | // icon 4 | export interface LinkProps { 5 | href?: string; 6 | icon?: boolean; 7 | status?: Status; 8 | hoverable?: boolean; 9 | disabled?: boolean; 10 | loading?: boolean; 11 | } 12 | 13 | export interface LinkEmits { 14 | (e: 'click', event: MouseEvent): void; 15 | (e: 'dblclick', event: MouseEvent): void; 16 | (e: 'contextmenu', event: MouseEvent): void; 17 | } 18 | 19 | export interface LinkSlots { 20 | default?: () => VNode[]; 21 | icon?: () => VNode[]; 22 | } 23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/link/index.md: -------------------------------------------------------------------------------- 1 | # 链接 Link 2 | 3 | Link 链接组件用于页面间导航或外部链接跳转,支持不同状态和样式。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/popconfirm/index.md: -------------------------------------------------------------------------------- 1 | # 气泡确认框 Popconfirm 2 | 3 | 点击元素,弹出气泡式的确认框。 4 | 5 | --- 6 | 7 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/watermark/component/watermark-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本使用 2 | 3 | 水印的基本用法。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconWarning.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/textarea/index.md: -------------------------------------------------------------------------------- 1 | # 文本域 Textarea 2 | 3 | 多行纯文本编辑控件,适用于评论或反馈表单中的一段意见。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Card/CardGrid.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-extra.md: -------------------------------------------------------------------------------- 1 | ### 附加内容 2 | 3 | 选择框底部显示自定义的内容。 4 | 5 |
6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Comment/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface CommentProps { 4 | author?: string; 5 | avatar?: string; 6 | content?: string; 7 | datetime?: string; 8 | align?: CommentAlign; 9 | } 10 | 11 | export interface CommentSlots { 12 | avatar?: () => VNode[]; 13 | author?: () => VNode[]; 14 | datetime?: () => VNode[]; 15 | content?: () => VNode[]; 16 | actions?: () => VNode[]; 17 | default?: () => VNode[][]; 18 | } 19 | 20 | export type CommentAlign = 21 | | 'left' 22 | | 'right' 23 | | { datetime?: 'left' | 'right'; actions?: 'left' | 'right' }; 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Skeleton/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Shape, Size } from '@shared/type'; 3 | 4 | export interface SkeletonProps { 5 | animation?: boolean; 6 | loading?: boolean; 7 | } 8 | 9 | export interface SkeletonSlots { 10 | default?: () => VNode[]; 11 | content?: () => VNode[]; 12 | } 13 | 14 | export interface SkeletonLineProps { 15 | rows?: number; 16 | widths?: number[]; 17 | lineHeight?: number; 18 | lineSpacing?: number; 19 | } 20 | 21 | export interface SkeletonShapeProps { 22 | shape?: Exclude; 23 | size?: Exclude; 24 | } 25 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/pagination/component/pagination-simple.md: -------------------------------------------------------------------------------- 1 | ### 简洁模式 2 | 3 | 通过设置 `simple` 属性开启简洁模式。 4 | 5 |
6 | 9 |
10 | 11 | 15 | 16 |
17 | 18 | 21 | 22 | 23 | ```vue 24 | 29 | ``` 30 | 31 |
32 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tooltip/index.md: -------------------------------------------------------------------------------- 1 | # 文字气泡 文字提示 2 | 3 | 鼠标悬停、聚焦或点击在某个组件时,弹出的文字提示。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | `tooltip` 组件的 `trigger-props` 继承 `trigger` 组件的全部属性 21 | 22 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-disabled.md: -------------------------------------------------------------------------------- 1 | ### 禁用 2 | 3 | 禁用状态。 4 | 5 |
6 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 26 | ``` 27 | 28 |
29 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Empty/style/empty.less: -------------------------------------------------------------------------------- 1 | .yc-empty { 2 | padding: 10px 0; 3 | color: var(--color-neutral-5); 4 | line-height: 1; 5 | display: flex; 6 | flex-direction: column; 7 | justify-content: center; 8 | align-items: center; 9 | gap: 4px; 10 | .yc-empty-image { 11 | width: 48px; 12 | height: 48px; 13 | font-size: 48px; 14 | color: inherit; 15 | 16 | img { 17 | height: 100%; 18 | width: 100%; 19 | object-fit: contain; 20 | } 21 | } 22 | .yc-empty-description { 23 | line-height: 21px; 24 | font-size: 14px; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/OverflowList/style/overflow-list.less: -------------------------------------------------------------------------------- 1 | .yc-overflow-list { 2 | position: relative; 3 | display: flex; 4 | align-items: center; 5 | .yc-tag { 6 | flex-shrink: 0; 7 | overflow: hidden; 8 | left: 0; 9 | right: 0; 10 | .yc-tag-label { 11 | text-wrap: nowrap; 12 | } 13 | } 14 | .yc-overflow-tag { 15 | position: absolute; 16 | } 17 | } 18 | // from 19 | .yc-overflow-list-from-start { 20 | .yc-overflow-tag { 21 | left: 0; 22 | } 23 | } 24 | .yc-overflow-list-from-end { 25 | .yc-overflow-tag { 26 | right: 0; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconSuccess.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/statistic/index.md: -------------------------------------------------------------------------------- 1 | # 数值显示 Statistic 2 | 3 | 突出展示某个或某组数字、带描述的统计类数据。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Alert/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Type } from '@shared/type'; 3 | 4 | export interface AlertProps { 5 | type?: Type<'normal'>; 6 | showIcon?: boolean; 7 | closable?: boolean; 8 | title?: string; 9 | banner?: boolean; 10 | center?: boolean; 11 | } 12 | 13 | export interface AlertEmits { 14 | (e: 'close', ev: MouseEvent): void; 15 | (e: 'after-close'): void; 16 | } 17 | 18 | export interface AlertSlots { 19 | default?: () => VNode[]; 20 | icon?: () => VNode[]; 21 | title?: () => VNode[]; 22 | action?: () => VNode[]; 23 | 'close-element'?: () => VNode[]; 24 | } 25 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Card/hooks/useContext.ts: -------------------------------------------------------------------------------- 1 | import { useSlots, Slots, provide as _provide, inject as _inject } from 'vue'; 2 | 3 | const CARD_CONTEXT_KEY = 'card-context'; 4 | type CardContext = { 5 | slots: Slots; 6 | }; 7 | 8 | export default function useCardContext() { 9 | const provide = () => { 10 | const slots = useSlots(); 11 | _provide(CARD_CONTEXT_KEY, { 12 | slots, 13 | }); 14 | }; 15 | const inject = () => { 16 | return _inject(CARD_CONTEXT_KEY, { 17 | slots: {}, 18 | }); 19 | }; 20 | return { 21 | provide, 22 | inject, 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Radio/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Radio from './Radio.vue'; 3 | import _RadioGroup from './RadioGroup.vue'; 4 | 5 | export type RadioInstance = InstanceType; 6 | export type RadioGroupInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Radio = Object.assign(_Radio, { 10 | group: _RadioGroup, 11 | install: (app: App) => { 12 | app.component('Yc' + _Radio.name, _Radio); 13 | app.component('Yc' + _RadioGroup.name, _RadioGroup); 14 | }, 15 | }); 16 | 17 | export { _RadioGroup as RadioGroup }; 18 | 19 | export default Radio; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/dev/README.md: -------------------------------------------------------------------------------- 1 | ## 待实现的组件 2 | Form Tree TreeSelect Table 3 | Icon(没有意义不在实现) 4 | DatePicker(RangePicker、QuarterPicker) 5 | ## 组件未实现的属性 6 | 1. Typography:ellipsis 7 | 2. Tabs:lazyLoad 8 | 3. cascader:virtualListProps、checkStrictly 9 | 4. DatePicker:pickerValue、defaultPickerValue 10 | 5. TimePicker:pickerValue、defaultPickerValue 11 | 6. Upload:跟自动上传的全部相关属性 12 | ## 移除的无用属性 13 | 1. InputNumber:modelEvent 14 | 2. Select、List、Scrollbar、TimePicker:scrollbar 15 | 3. Drawer、Modal、Trigger:renderToBody 16 | 4. List:gridProps 17 | 5. TimePicker:use12Hours 18 | 6. Tabs:scrollPosition 19 | 7. Men:mode('pop' | 'popButton') -------------------------------------------------------------------------------- /packages/web-vue/src/components/Anchor/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Anchor from './Anchor.vue'; 3 | import _AnchorLink from './AnchorLink.vue'; 4 | 5 | export type AnchorInstance = InstanceType; 6 | export type AnchorLinkInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Anchor = Object.assign(_Anchor, { 10 | link: _AnchorLink, 11 | install: (app: App) => { 12 | app.component('Yc' + _Anchor.name, _Anchor); 13 | app.component('Yc' + _AnchorLink.name, _AnchorLink); 14 | }, 15 | }); 16 | 17 | export { _AnchorLink as AnchorLink }; 18 | 19 | export default Anchor; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/List/style/list-item-meta.less: -------------------------------------------------------------------------------- 1 | .yc-list-item-meta { 2 | overflow: hidden; 3 | width: 100%; 4 | padding: 4px 0; 5 | display: flex; 6 | align-items: center; 7 | gap: 16px; 8 | .yc-list-item-avatar { 9 | flex-shrink: 0; 10 | } 11 | .yc-list-item-meta-content { 12 | flex: 1; 13 | display: flex; 14 | flex-direction: column; 15 | gap: 2px; 16 | .yc-list-item-meta-title { 17 | color: var(--color-text-1); 18 | font-weight: 500; 19 | } 20 | .yc-list-item-meta-description { 21 | color: var(--color-text-2); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/anchor/index.md: -------------------------------------------------------------------------------- 1 | # 锚点 Anchor 2 | 3 | 通过锚点可快速找到信息内容在当前页面的位置。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/spin/component/spin-size.md: -------------------------------------------------------------------------------- 1 | ### 不同尺寸 2 | 3 | 设置 `size` 可以得到不同尺寸的加载图标。 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/verification-code/index.md: -------------------------------------------------------------------------------- 1 | # 验证码输入 VerificationCode 2 | 3 | 验证码输入组件 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Avatar/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Avatar from './Avatar.vue'; 3 | import _AvatarGroup from './AvatarGroup.vue'; 4 | 5 | export type AvatarInstance = InstanceType; 6 | export type AvatarGroupInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Avatar = Object.assign(_Avatar, { 10 | group: _AvatarGroup, 11 | install: (app: App) => { 12 | app.component('Yc' + _Avatar.name, _Avatar); 13 | app.component('Yc' + _AvatarGroup.name, _AvatarGroup); 14 | }, 15 | }); 16 | 17 | export { _AvatarGroup as AvatarGroup }; 18 | 19 | export default Avatar; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Button/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Button from './Button.vue'; 3 | import _ButtonGroup from './ButtonGroup.vue'; 4 | 5 | export type ButonInstance = InstanceType; 6 | export type ButonGroupInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Button = Object.assign(_Button, { 10 | group: _ButtonGroup, 11 | install: (app: App) => { 12 | app.component('Yc' + _Button.name, _Button); 13 | app.component('Yc' + _ButtonGroup.name, _ButtonGroup); 14 | }, 15 | }); 16 | 17 | export { _ButtonGroup as ButtonGroup }; 18 | 19 | export default Button; 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/popconfirm/component/popconfirm-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 气泡确认框的基本用法。 4 | 5 |
6 | 7 | Click To Delete 8 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/cascader/component/cascader-loading.md: -------------------------------------------------------------------------------- 1 | ### 加载中 2 | 3 | 选择框和下拉菜单显示加载中状态。 4 | 5 |
6 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/layout/index.md: -------------------------------------------------------------------------------- 1 | # 布局 Layout 2 | 3 | 页面的基础布局框架,常与组件嵌套使用,构建页面整体布局。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/upload/component/upload-directory.md: -------------------------------------------------------------------------------- 1 | ### 文件夹上传 2 | 3 | 可以通过 `directory` 开启文件夹上传 4 | 5 |
6 | 9 | 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Timeline/TimelineItemPending.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 25 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconInfo.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-extra.md: -------------------------------------------------------------------------------- 1 | ### 额外的页脚 2 | 3 | 在浮层中加入额外的页脚,以满足某些定制信息的需求。 4 | 5 |
6 | 7 | 8 | 9 |
10 | 11 |
12 | 13 | 16 | 17 | 18 | ```vue 19 | 24 | ``` 25 | 26 |
27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Rate/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface RateProps { 4 | count?: number; 5 | modelValue?: number; 6 | defaultValue?: number; 7 | allowHalf?: boolean; 8 | allowClear?: boolean; 9 | grading?: boolean; 10 | readonly?: boolean; 11 | disabled?: boolean; 12 | color?: string | Record; 13 | } 14 | 15 | export interface RateEmits { 16 | (e: 'update:modelValue', value: number): void; 17 | (e: 'change', value: number): void; 18 | (e: 'hover-change', value: number): void; 19 | } 20 | 21 | export interface RateSlots { 22 | character?: (scope: { index: number }) => VNode[]; 23 | } 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/affix/component/affix-cb.md: -------------------------------------------------------------------------------- 1 | ### 固定状态改变回调 2 | 3 | 当固定状态发生改变时,会触发事件。 4 | 5 |
6 | 10 | 80px to affix bottom 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 27 | ``` 28 | 29 |
30 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/message/component/message-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 全局提示的基本用法。 4 | 5 |
6 | Info Message 9 |
10 | 11 | 12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 26 | 27 | ``` 28 | 29 |
30 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Statistic/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Statistic from './Statistic.vue'; 3 | import _Countdown from './Countdown.vue'; 4 | 5 | export type StatisticInstance = InstanceType; 6 | export type CountdownInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Statistic = Object.assign(_Statistic, { 10 | countdown: _Countdown, 11 | install: (app: App) => { 12 | app.component('Yc' + _Statistic.name, _Statistic); 13 | app.component('Yc' + _Countdown.name, _Countdown); 14 | }, 15 | }); 16 | 17 | export { _Countdown as Countdown }; 18 | 19 | export default Statistic; 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/input-tag/component/input-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 标签输入框的基本用法。 4 | 5 |
6 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/menu/index.md: -------------------------------------------------------------------------------- 1 | # 菜单 Menu 2 | 3 | 收纳、排列并展示一系列选项的列表。 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Anchor/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { TargetContainer } from '@shared/type'; 3 | 4 | export interface AnchorProps { 5 | boundary?: Boundary; 6 | lineLess?: boolean; 7 | scrollContainer?: TargetContainer; 8 | changeHash?: boolean; 9 | smooth?: boolean; 10 | } 11 | 12 | export interface AnchorSlots { 13 | default?: () => VNode[]; 14 | } 15 | 16 | export interface AnchorLinkProps { 17 | title?: string; 18 | href?: string; 19 | } 20 | 21 | export interface AnchorLinkSlots { 22 | default?: () => VNode[]; 23 | sublist?: () => VNode[]; 24 | } 25 | 26 | type Boundary = 'start' | 'end' | 'center' | 'nearest' | number; 27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Carousel/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Carousel from './Carousel.vue'; 3 | import _CarouselItem from './CarouselItem.vue'; 4 | 5 | export type CarouselInstance = InstanceType; 6 | export type CarouselItemInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Carousel = Object.assign(_Carousel, { 10 | item: _CarouselItem, 11 | install: (app: App) => { 12 | app.component('Yc' + _Carousel.name, _Carousel); 13 | app.component('Yc' + _CarouselItem.name, _CarouselItem); 14 | }, 15 | }); 16 | 17 | export { _CarouselItem as CarouselItem }; 18 | 19 | export default Carousel; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Collapse/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Collapse from './Collapse.vue'; 3 | import _CollapseItem from './CollapseItem.vue'; 4 | 5 | export type CollapseInstance = InstanceType; 6 | export type CollapseItemInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Collapse = Object.assign(_Collapse, { 10 | item: _CollapseItem, 11 | install: (app: App) => { 12 | app.component('Yc' + _Collapse.name, _Collapse); 13 | app.component('Yc' + _CollapseItem.name, _CollapseItem); 14 | }, 15 | }); 16 | 17 | export { _CollapseItem as CollapseItem }; 18 | 19 | export default Collapse; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Statistic/style/statistic.less: -------------------------------------------------------------------------------- 1 | .yc-statistic { 2 | color: var(--color-text-2); 3 | line-height: 1.5715; 4 | display: inline-flex; 5 | flex-direction: column; 6 | gap: 8px; 7 | .yc-statistic-title, 8 | .yc-statistic-extra { 9 | color: var(--color-text-2); 10 | font-size: 14px; 11 | } 12 | .yc-statistic-content { 13 | .yc-statistic-value { 14 | color: var(--color-text-1); 15 | font-weight: 500; 16 | font-size: 26px; 17 | white-space: nowrap; 18 | .yc-statistic-prefix, 19 | .yc-statistic-suffix { 20 | font-size: 14px; 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Timeline/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Timeline from './Timeline.vue'; 3 | import _TimelineItem from './TimelineItem.vue'; 4 | 5 | export type TimelineInstance = InstanceType; 6 | export type TimelineItemInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Timeline = Object.assign(_Timeline, { 10 | item: _TimelineItem, 11 | install: (app: App) => { 12 | app.component('Yc' + _Timeline.name, _Timeline); 13 | app.component('Yc' + _TimelineItem.name, _TimelineItem); 14 | }, 15 | }); 16 | 17 | export { _TimelineItem as TimelineItem }; 18 | 19 | export default Timeline; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Typography/style/typography-title.less: -------------------------------------------------------------------------------- 1 | .yc-typography { 2 | margin-top: 1em; 3 | margin-bottom: 0.5em; 4 | font-weight: 500; 5 | } 6 | // style 7 | h1.yc-typography { 8 | font-size: 36px; 9 | line-height: 1.23; 10 | } 11 | h2.yc-typography { 12 | font-size: 32px; 13 | line-height: 1.25; 14 | } 15 | h3.yc-typography { 16 | font-size: 28px; 17 | line-height: 1.29; 18 | } 19 | h4.yc-typography { 20 | font-size: 24px; 21 | line-height: 1.33; 22 | } 23 | h5.yc-typography { 24 | font-size: 20px; 25 | line-height: 1.4; 26 | } 27 | h6.yc-typography { 28 | font-size: 16px; 29 | line-height: 1.5; 30 | } 31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/affix/component/affix-bottom.md: -------------------------------------------------------------------------------- 1 | ### 底部固定 2 | 3 | 当页面滚动或浏览器窗口改变时,元素向下滚动到距底部一定距离时固定。 4 | 5 |
6 | 10 | 120px to affix bottom 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 27 | ``` 28 | 29 |
30 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/link/component/link-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 链接的基本用法。 4 | 5 |
6 | 7 | Link 8 | Link 9 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Checkbox/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Checkbox from './Checkbox.vue'; 3 | import _CheckboxGroup from './CheckboxGroup.vue'; 4 | 5 | export type CheckboxInstance = InstanceType; 6 | export type CheckboxGroupInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Checkbox = Object.assign(_Checkbox, { 10 | group: _CheckboxGroup, 11 | install: (app: App) => { 12 | app.component('Yc' + _Checkbox.name, _Checkbox); 13 | app.component('Yc' + _CheckboxGroup.name, _CheckboxGroup); 14 | }, 15 | }); 16 | 17 | export { _CheckboxGroup as CheckboxGroup }; 18 | 19 | export default Checkbox; 20 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/spin/index.md: -------------------------------------------------------------------------------- 1 | # 加载中 Spin 2 | 3 | 用于页面和区块的加载中状态 - 页面局部处于等待异步数据或正在渲染过程时,合适的加载动效会有效缓解用户的焦虑。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/switch/component/switch-type.md: -------------------------------------------------------------------------------- 1 | ### 开关类型 2 | 3 | 开关分为 `circle` - 圆形(默认)、`round` - 圆角、`line` - 线性三种类型。 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Dropdown/style/dropdown.less: -------------------------------------------------------------------------------- 1 | .yc-dropdown-popup { 2 | .yc-dropdown { 3 | padding: 4px 0; 4 | background-color: var(--color-bg-popup); 5 | border: 1px solid var(--color-fill-3); 6 | border-radius: var(--border-radius-medium); 7 | box-shadow: 0 4px 10px #0000001a; 8 | .yc-dropdown-list { 9 | display: flex; 10 | flex-direction: column; 11 | } 12 | .yc-dropdown-footer { 13 | border-top: 1px solid var(--color-fill-3); 14 | } 15 | } 16 | .yc-trigger-arrow { 17 | z-index: 0; 18 | background-color: var(--color-bg-popup); 19 | border: 1px solid var(--color-neutral-3); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Skeleton/Skeleton.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/affix/component/affix-top.md: -------------------------------------------------------------------------------- 1 | ### 顶部固定 2 | 3 | 当页面滚动或浏览器窗口改变时,元素向上滚动到距顶部一定距离时固定。 4 | 5 |
6 | 9 | 80px to affix top 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/input-number/index.md: -------------------------------------------------------------------------------- 1 | # InputNumber 数字输入框 2 | 3 | 仅允许输入数字格式的输入框。 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/space/index.md: -------------------------------------------------------------------------------- 1 | # 间距 Space 2 | 3 | 设置组件之间的间距 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tooltip/component/tooltip-mini.md: -------------------------------------------------------------------------------- 1 | ### 迷你尺寸 2 | 3 | 适用于小场景或数字气泡样式。 4 | 5 |
6 | 10 | Mouse over to display tooltip 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Slider/type.ts: -------------------------------------------------------------------------------- 1 | import { Direction, Format } from '@shared/type'; 2 | 3 | export interface SliderProps { 4 | modelValue?: SliderValue; 5 | defaultValue?: SliderValue; 6 | step?: number; 7 | min?: number; 8 | marks?: Record; 9 | max?: number; 10 | direction?: Direction; 11 | disabled?: boolean; 12 | showTicks?: boolean; 13 | showInput?: boolean; 14 | range?: boolean; 15 | showTooltip?: boolean; 16 | formatTooltip?: Format; 17 | } 18 | 19 | export interface SliderEmits { 20 | (e: 'update:modelValue', value: number): void; 21 | (e: 'change', value: number): void; 22 | } 23 | 24 | export type SliderValue = number | number[]; 25 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/avatar/index.md: -------------------------------------------------------------------------------- 1 | # 头像 Avatar 2 | 3 | 用作头像显示,可以为图片、图标或字符形式展示。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/typography/index.md: -------------------------------------------------------------------------------- 1 | # 排版 Typography 2 | 3 | 用于展示标题、段落、文本内容。 4 | 5 | --- 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/empty/component/empty-image.md: -------------------------------------------------------------------------------- 1 | ### 自定义图片和文案 2 | 3 | 对不同章节的文本段落进行分割,默认为水平分割线,可在中间加入文字。 4 | 5 |
6 | 7 | 10 | No data, please reload! 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Breadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Breadcrumb from './Breadcrumb.vue'; 3 | import _BreadcrumbItem from './BreadcrumbItem.vue'; 4 | 5 | export type BreadcrumbInstance = InstanceType; 6 | export type BreadcrumbItemInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Breadcrumb = Object.assign(_Breadcrumb, { 10 | item: _BreadcrumbItem, 11 | install: (app: App) => { 12 | app.component('Yc' + _Breadcrumb.name, _Breadcrumb); 13 | app.component('Yc' + _BreadcrumbItem.name, _BreadcrumbItem); 14 | }, 15 | }); 16 | 17 | export { _BreadcrumbItem as BreadcrumbItem }; 18 | 19 | export default Breadcrumb; 20 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Typography/TypographyText.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 22 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/steps/component/steps-dot.md: -------------------------------------------------------------------------------- 1 | ### 点状步骤条 2 | 3 | 通过设置 `type="dot"` , 可以使用点状的步骤条。此模式没有 `small` 尺寸。 4 | 5 |
6 | 7 | Succeeded 8 | Processing 9 | Pending 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/steps/component/steps-nav.md: -------------------------------------------------------------------------------- 1 | ### 导航步骤条 2 | 3 | 通过设置 `type="navigation"` 展示导航类型的步骤条。 4 | 5 |
6 | 7 | Succeeded 8 | Processing 9 | Pending 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/descriptions/index.md: -------------------------------------------------------------------------------- 1 | # 描述列表 Descriptions 2 | 3 | 一般用于详情页的信息展示。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Split/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Direction } from '@shared/type'; 3 | 4 | export interface SplitProps { 5 | component?: string; 6 | direction?: Direction; 7 | size?: number | string; 8 | defaultSize?: number | string; 9 | min?: number; 10 | max?: number; 11 | disabled?: boolean; 12 | } 13 | 14 | export interface SplitEmits { 15 | (e: 'update:size', value: number): void; 16 | (e: 'moving-start'): void; 17 | (e: 'moving'): void; 18 | (e: 'moving-end'): void; 19 | } 20 | 21 | export interface SplitSlots { 22 | 'resize-trigger-icon'?: () => VNode[]; 23 | 'resize-trigger'?: () => VNode[]; 24 | first?: () => VNode[]; 25 | second?: () => VNode[]; 26 | } 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/watermark/component/watermark-image.md: -------------------------------------------------------------------------------- 1 | ### 图片水印 2 | 3 | 通过 `image` 设置图片水印。建议使用 2 倍或 3 倍图(支持Base64)。 4 | 5 |
6 | 10 |
11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Skeleton/SkeletonShape.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/image/component/image-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 需要查看图片的时候,简单的设置 `src` 属性,就能获得一个有预览图片功能的组件。 4 | 5 |
6 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 25 | ``` 26 | 27 |
28 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/message/index.md: -------------------------------------------------------------------------------- 1 | # 全局提示 Message 2 | 3 | 由用户的操作触发的轻量级全局反馈。 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tag/component/tag-size.md: -------------------------------------------------------------------------------- 1 | ### 标签的尺寸 2 | 3 | 标签的大小分为:`small`、`medium`、`large` 三种,可以在不同场景下选择合适按钮尺寸。推荐及默认尺寸为 `medium`。 4 | 5 |
6 | 7 | Large 8 | Medium 9 | Small 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/empty/component/empty-api.md: -------------------------------------------------------------------------------- 1 | ## API 2 | 3 | ### empty Props 4 | 5 | 6 | 7 | ### empty Slots 8 | 9 | 10 | 11 | 38 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-vmodel.md: -------------------------------------------------------------------------------- 1 | ### 双向绑定 2 | 3 | 支持 `v-model` 进行数据的双向绑定。 4 | 5 |
6 | 9 |
10 | 11 | 15 | 16 |
17 | 18 | 21 | 22 | 23 | ```vue 24 | 29 | 33 | ``` 34 | 35 |
36 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Descriptions/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Descriptions from './Descriptions.vue'; 3 | import _DescriptionsItem from './DescriptionsItem.vue'; 4 | 5 | export type DescriptionsInstance = InstanceType; 6 | export type DescriptionsItemInstance = InstanceType; 7 | export * from './type'; 8 | 9 | const Descriptions = Object.assign(_Descriptions, { 10 | item: _DescriptionsItem, 11 | install: (app: App) => { 12 | app.component('Yc' + _Descriptions.name, _Descriptions); 13 | app.component('Yc' + _DescriptionsItem.name, _DescriptionsItem); 14 | }, 15 | }); 16 | export { _DescriptionsItem as DescriptionsItem }; 17 | 18 | export default Descriptions; 19 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconError.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconStar.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-week.md: -------------------------------------------------------------------------------- 1 | ### 周选择器 2 | 3 | 周选择器提供了一种选择星期的简单方法。也可以指定一周的起始日。 4 | 5 |
6 | 7 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 26 | ``` 27 | 28 |
29 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/popconfirm/component/popconfirm-btn.md: -------------------------------------------------------------------------------- 1 | ### 自定义按钮 2 | 3 | 自定义按钮的文字或图标。 4 | 5 |
6 | 10 | Discard 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Calendar/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | 3 | export interface CalendarProps { 4 | modelValue?: Date; 5 | defaultValue?: Date; 6 | mode?: CalendarMode; 7 | defaultMode?: CalendarMode; 8 | modes?: CalendarMode[]; 9 | } 10 | 11 | export interface CalendarEmits { 12 | (e: 'update:modelValue', value: Date): void; 13 | (e: 'update:mode', mode: CalendarMode): void; 14 | (e: 'change', value: Date): void; 15 | (e: 'panel-change', value: Date): void; 16 | } 17 | 18 | export interface CalendarSlots { 19 | header?: (scope: { year: number; month: number }) => VNode[]; 20 | default?: (scope: { year: number; month: number; day: number }) => VNode[]; 21 | } 22 | 23 | export type CalendarMode = 'month' | 'year'; 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Scrollbar/type.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties, VNode } from 'vue'; 2 | import { ClassName } from '@shared/type'; 3 | 4 | export interface ScrollbarProps { 5 | type?: TackType; 6 | outerClass?: ClassName; 7 | outerStyle?: CSSProperties; 8 | thumbStyle?: CSSProperties; 9 | } 10 | 11 | export interface ScrollbarEmits { 12 | (e: 'scroll', left: number, top: number, ev: Event): void; 13 | } 14 | 15 | export interface ScrollbarSlots { 16 | default?: () => VNode[]; 17 | } 18 | 19 | export interface ScrollbarExpose { 20 | scrollTo(options: ScrollOptions): void; 21 | scrollLeft(left: number): void; 22 | scrollTop(top: number): void; 23 | getScrollRef(): HTMLDivElement; 24 | } 25 | 26 | type TackType = 'track' | 'embed'; 27 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Message/MessageList.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 24 | 25 | 28 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/input-number/component/input-button-mode.md: -------------------------------------------------------------------------------- 1 | ### 按钮模式 2 | 3 | 指定 `mode` 为 `button` 来使用带按钮的数字输入框。 4 | 5 |
6 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-step.md: -------------------------------------------------------------------------------- 1 | ### 定制步长 2 | 3 | 通过设置 `step`,可以定制需要显示的时、分、秒的步长。 4 | 5 |
6 | 14 |
15 | 16 |
17 | 18 | 21 | 22 | 23 | ```vue 24 | 34 | ``` 35 | 36 |
37 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/calendar/component/calendar-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 展示和选择日历 4 | 5 |
6 | 7 | select: {{value}} 8 |
9 | 10 | 14 | 15 |
16 | 17 | 20 | 21 | 22 | ```vue 23 | 27 | 28 | 32 | ``` 33 | 34 |
35 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tabs/index.md: -------------------------------------------------------------------------------- 1 | # 标签页 Tabs 2 | 3 | 将内容组织同一视图中,一次可查看一个视图内容,查看其他内容可切换选项卡查看。 4 | 5 | --- 6 | 7 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/transfer/index.md: -------------------------------------------------------------------------------- 1 | # 数据穿梭框 Transfer 2 | 3 | 两栏布局的多选组件,将元素从一栏即时移到另一栏。 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Anchor/style/anchor.less: -------------------------------------------------------------------------------- 1 | .yc-anchor { 2 | position: relative; 3 | width: 150px; 4 | overflow: auto; 5 | .yc-anchor-line-slider { 6 | position: absolute; 7 | top: 0; 8 | left: 0; 9 | z-index: 1; 10 | width: 2px; 11 | height: 12px; 12 | background-color: rgb(var(--primary-6)); 13 | transition: top 0.2s cubic-bezier(0.34, 0.69, 0.1, 1); 14 | } 15 | .yc-anchor-line-track { 16 | position: absolute; 17 | left: 0; 18 | top: 0; 19 | bottom: 0; 20 | width: 2px; 21 | background-color: var(--color-fill-3); 22 | } 23 | 24 | .yc-anchor-list { 25 | margin-left: 4px; 26 | display: flex; 27 | flex-direction: column; 28 | gap: 2px; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Dropdown/Dgroup.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 27 | 28 | 31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/component/rate-custom.md: -------------------------------------------------------------------------------- 1 | ### 自定义评分字符 2 | 3 | 可以将星星替换为其他字符,比如表情、字母,数字,字体图标甚至中文。 4 | 5 |
6 | 7 | 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tabs/TabButton.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 29 | 30 | 33 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/utils/dependencies.ts: -------------------------------------------------------------------------------- 1 | export { 2 | unrefElement, 3 | createReusableTemplate, 4 | useEventListener, 5 | useResizeObserver, 6 | useDraggable, 7 | useElementBounding, 8 | useElementSize, 9 | useMediaQuery, 10 | useMutationObserver, 11 | useClipboard, 12 | onClickOutside, 13 | useTimeoutFn, 14 | onKeyStroke, 15 | useScroll, 16 | useDropZone, 17 | useFileDialog, 18 | } from '@vueuse/core'; 19 | 20 | export { nanoid } from 'nanoid'; 21 | 22 | export { default as BTween } from 'b-tween'; 23 | 24 | export { default as dayjs, isDayjs } from 'dayjs'; 25 | 26 | export type { UnitType, Dayjs } from 'dayjs'; 27 | 28 | export { default as tinycolor } from 'tinycolor2'; 29 | 30 | export type { ColorInput } from 'tinycolor2'; 31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/badge/index.md: -------------------------------------------------------------------------------- 1 | # 徽标 Badge 2 | 3 | 一般出现在图标或文字的右上角。提供及时、重要的信息提示。 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/input-tag/component/input-max-count.md: -------------------------------------------------------------------------------- 1 | ### 最多展示标签数量 2 | 3 | 设置最多展示标签数量。 4 | 5 |
6 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-disabled.md: -------------------------------------------------------------------------------- 1 | ### 禁用 2 | 3 | 禁用状态。 4 | 5 |
6 | 9 | 13 |
14 | 15 |
16 | 17 | 20 | 21 | 22 | ```vue 23 | 32 | ``` 33 | 34 |
35 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Popover/style/popover.less: -------------------------------------------------------------------------------- 1 | .yc-popover { 2 | .yc-popover-popup-content { 3 | padding: 12px 16px; 4 | background-color: var(--color-bg-popup); 5 | border: 1px solid var(--color-neutral-3); 6 | border-radius: var(--border-radius-medium); 7 | box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); 8 | color: var(--color-text-2); 9 | font-size: 14px; 10 | line-height: 1.5715; 11 | 12 | .yc-popover-title { 13 | margin-bottom: 4px; 14 | color: var(--color-text-1); 15 | font-weight: 500; 16 | font-size: 16px; 17 | } 18 | } 19 | .yc-popover-popup-arrow { 20 | z-index: 1; 21 | background-color: var(--color-bg-popup); 22 | border: 1px solid var(--color-neutral-3); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/trigger/index.md: -------------------------------------------------------------------------------- 1 | # 触发器 Trigger 2 | 3 | 用于对元素添加 hover, click, focus 等事件,并且弹出下拉框。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/upload/component/upload-avatar.md: -------------------------------------------------------------------------------- 1 | ### 用户头像上传 2 | 3 | 点击上传用户头像,可使用 `beforeUpload` 限制用户上传的图片格式和大小。 4 | 5 |
6 | 9 | 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 31 | ``` 32 | 33 |
34 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/carousel/index.md: -------------------------------------------------------------------------------- 1 | # 图片轮播 Carousel 2 | 3 | 用于展示多张图片、视频或内嵌框架等内容的循环播放,支持系统自动播放或用户手动切换。 4 | 5 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/icons/IconFaceSmile.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/_shared/utils/hooks.ts: -------------------------------------------------------------------------------- 1 | import { computed, ref, Ref } from 'vue'; 2 | import { isUndefined } from './is'; 3 | 4 | type OnSet = (...args: any) => any; 5 | type OnGet = (...args: any) => any; 6 | 7 | export const useControlValue = ( 8 | modelValue: Ref, 9 | defaultValue: T, 10 | onSet: OnSet = (data: T) => data, 11 | onGet: OnGet = (data: T) => data 12 | ) => { 13 | const controlValue = ref(defaultValue); 14 | return computed({ 15 | get() { 16 | const value = isUndefined(modelValue.value) 17 | ? controlValue.value 18 | : modelValue.value; 19 | return onGet(value); 20 | }, 21 | set(value: T) { 22 | controlValue.value = value; 23 | onSet(value, controlValue); 24 | }, 25 | }); 26 | }; 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/breadcrumb/component/breadcrumb-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 面包屑的基本用法。 4 | 5 |
6 | 7 | Home 8 | Channel 9 | News 10 | 11 |
12 | 13 |
14 | 15 | 18 | 19 | 20 | ```vue 21 | 28 | ``` 29 | 30 |
31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/list/index.md: -------------------------------------------------------------------------------- 1 | # 列表 List 2 | 3 | 最基础的列表展示,可承载文字、列表、图片、段落,常用于后台数据展示页面。 4 | 5 | --- 6 | 7 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/rate/index.md: -------------------------------------------------------------------------------- 1 | # 评分 Rate 2 | 3 | 用于评分或打星的组件。 4 | 5 | --- 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/slider/component/slider-range.md: -------------------------------------------------------------------------------- 1 | ### 范围选择 2 | 3 | 通过设置 `range` 可开启范围选择,此时 `modelValue` 为数组。 4 | 5 |
6 | 10 |
11 | 12 | 16 | 17 |
18 | 19 | 22 | 23 | 24 | ```vue 25 | 31 | 32 | 36 | ``` 37 | 38 |
39 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Card/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Card from './Card.vue'; 3 | import _CardMeta from './CardMeta.vue'; 4 | import _CardGrid from './CardGrid.vue'; 5 | 6 | export type CardInstance = InstanceType; 7 | export type CardMetaInstance = InstanceType; 8 | export type CardGridInstance = InstanceType; 9 | export * from './type'; 10 | 11 | const Card = Object.assign(_Card, { 12 | meta: _CardMeta, 13 | grid: _CardGrid, 14 | install: (app: App) => { 15 | app.component('Yc' + _Card.name, _Card); 16 | app.component('Yc' + _CardMeta.name, _CardMeta); 17 | app.component('Yc' + _CardGrid.name, _CardGrid); 18 | }, 19 | }); 20 | 21 | export { _CardMeta as CardMeta, _CardGrid as CardGrid }; 22 | 23 | export default Card; 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ResizeBox/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Position } from '@shared/type'; 3 | 4 | export interface ResizeBoxProps { 5 | width?: number; 6 | height?: number; 7 | component?: string; 8 | directions?: Position[]; 9 | } 10 | 11 | export interface ResizeBoxEmits { 12 | (e: 'update:width', value: number): void; 13 | (e: 'update:height', value: number): void; 14 | (e: 'moving-start', ev: MouseEvent): void; 15 | (e: 'moving', size: { width: number; height: number }, ev: MouseEvent): void; 16 | (e: 'moving-end', ev: MouseEvent): void; 17 | } 18 | 19 | export interface ResizeBoxSlots { 20 | default?: () => VNode[]; 21 | 'resize-trigger'?: (scope: { direction: Position }) => VNode[]; 22 | 'resize-trigger-icon'?: (scope: { direction: Position }) => VNode[]; 23 | } 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Select/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Select from './Select.vue'; 3 | import _Option from './Option.vue'; 4 | import _Optgroup from './Optgroup.vue'; 5 | 6 | export type SelectInstance = InstanceType; 7 | export type OptionInstance = InstanceType; 8 | export type OptgroupInstance = InstanceType; 9 | export * from './type'; 10 | 11 | const Select = Object.assign(_Select, { 12 | option: _Option, 13 | group: _Optgroup, 14 | install: (app: App) => { 15 | app.component('Yc' + _Select.name, _Select); 16 | app.component('Yc' + _Option.name, _Option); 17 | app.component('Yc' + _Optgroup.name, _Optgroup); 18 | }, 19 | }); 20 | 21 | export { _Option as Option, _Optgroup as Optgroup }; 22 | 23 | export default Select; 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/drawer/index.md: -------------------------------------------------------------------------------- 1 | # Drawer 抽屉 2 | 3 | 触发命令后,从屏幕一侧滑出的抽屉式的面板。 4 | 5 | --- 6 | 7 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Grid/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _Col from './GridCol.vue'; 3 | import _Row from './GridRow.vue'; 4 | import _Grid from './Grid.vue'; 5 | import _GridItem from './GridItem.vue'; 6 | 7 | export type RowInstance = InstanceType; 8 | export type ColInstance = InstanceType; 9 | export * from './type'; 10 | 11 | const Grid = Object.assign(_Grid, { 12 | col: _Col, 13 | row: _Row, 14 | item: _GridItem, 15 | install: (app: App) => { 16 | app.component('Yc' + _Grid.name, _Grid); 17 | app.component('Yc' + _GridItem.name, _GridItem); 18 | app.component('Yc' + _Row.name, _Row); 19 | app.component('Yc' + _Col.name, _Col); 20 | }, 21 | }); 22 | 23 | export { _Col as GridCol, _Row as GridRow, _GridItem as GridItem }; 24 | 25 | export default Grid; 26 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/color-picker/component/picker-disabled.md: -------------------------------------------------------------------------------- 1 | ### 禁用 2 | 3 | 设置 `disabled` 禁用选择器。 4 | 5 |
6 | 7 | 10 | 14 | 15 |
16 | 17 |
18 | 19 | 22 | 23 | 24 | ```vue 25 | 36 | ``` 37 | 38 |
39 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ColorPicker/type.ts: -------------------------------------------------------------------------------- 1 | import { Size } from '@shared/type'; 2 | import { TriggerProps } from '@/components/Trigger'; 3 | 4 | export interface ColorPickerProps { 5 | modelValue?: string; 6 | defaultValue?: string; 7 | format?: ColorFormat; 8 | size?: Size; 9 | showText?: boolean; 10 | showHistory?: boolean; 11 | showPreset?: boolean; 12 | disabled?: boolean; 13 | disabledAlpha?: boolean; 14 | hideTrigger?: boolean; 15 | triggerProps?: TriggerProps; 16 | historyColors?: string[]; 17 | presetColors?: string[]; 18 | } 19 | 20 | export interface ColorPickerEmits { 21 | (e: 'update:modelValue', value: string): void; 22 | (e: 'change', value: boolean): void; 23 | (e: 'popup-visible-change', value: boolean, color: string): void; 24 | } 25 | 26 | export type ColorFormat = 'hex' | 'rgb'; 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/back-top/component/back-api.md: -------------------------------------------------------------------------------- 1 | ## API 2 | 3 | ### back-top Props 4 | 5 | 6 | 7 | 38 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Upload/UploadButton.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 25 | 26 | 29 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/link/component/link-hover.md: -------------------------------------------------------------------------------- 1 | ### 悬浮状态底色 2 | 3 | 可以通过 hoverable 属性设置是否在悬浮状态时隐藏底色。 4 | 5 |
6 | 7 | Link 8 | Link 9 | 10 |
11 | 12 |
13 | 14 | 17 | 18 | 19 | ```vue 20 | 35 | ``` 36 | 37 |
38 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-confirm.md: -------------------------------------------------------------------------------- 1 | ### 跳过确认 2 | 3 | 跳过确认步骤,直接点击选择时间。 4 | 5 |
6 | 9 | 13 |
14 | 15 |
16 | 17 | 20 | 21 | 22 | ```vue 23 | 32 | ``` 33 | 34 |
35 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/watermark/component/watermark-content.md: -------------------------------------------------------------------------------- 1 | ### 多行文本 2 | 3 | 通过 `content` 设置字符串数组可指定多行文字水印内容。 4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 | 14 | 15 |
16 | 17 | 20 | 21 | 22 | ```vue 23 | 28 | 29 | 32 | ``` 33 | 34 |
35 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/VerificationCode/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Size } from '@shared/type'; 3 | 4 | export interface VerificationCodeProps { 5 | modelValue?: string; 6 | defaultValue?: string; 7 | length?: number; 8 | size?: Size; 9 | disabled?: boolean; 10 | masked?: boolean; 11 | readonly?: boolean; 12 | error?: boolean; 13 | separator?: Separator; 14 | formatter?: Formatter; 15 | } 16 | 17 | export interface VerificationCodeEmits { 18 | (e: 'update:modelValue', value: string): void; 19 | (e: 'input', value: string, ev: Event, i: number): void; 20 | (e: 'change', value: string): void; 21 | (e: 'finish', value: string): void; 22 | } 23 | 24 | type Separator = (index: number, character: string) => VNode; 25 | 26 | type Formatter = (inputValue: string, index: number, value: string) => string; 27 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/button/index.md: -------------------------------------------------------------------------------- 1 | # 按钮 Button 2 | 3 | 按钮用于开始一个即时操作。 4 | 5 | --- 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/popover/component/popover-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 鼠标移入或点击,弹出气泡,可对浮层上元素进行操作,承载复杂内容和操作。 4 | 5 |
6 | 7 | Hover 8 | 12 | 13 |
14 | 15 |
16 | 17 | 20 | 21 | 22 | ```vue 23 | 32 | ``` 33 | 34 |
35 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/scrollbar/component/scrollbar-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 滚动条组件基本用法。scrollbar 的默认插槽需要唯一的子元素。 4 | 5 |
6 | 7 |
9 | Content 10 |
11 |
12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/upload/component/upload-basic-use.md: -------------------------------------------------------------------------------- 1 | ### 基本用法 2 | 3 | 上传组件的基本用法。 4 | 5 |
6 | 9 | 10 | 14 | 15 |
16 | 17 |
18 | 19 | 22 | 23 | 24 | ```vue 25 | 36 | ``` 37 | 38 |
39 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Button/ButtonGroup.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 30 | 31 | 34 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/ConfigProvider/index.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 31 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/date-picker/component/picker-vmodel.md: -------------------------------------------------------------------------------- 1 | ### 双向绑定 2 | 3 | 通过 `v-model` 实现值的双向绑定 4 | 5 |
6 | 7 | 10 | 11 |
12 | 13 | 17 | 18 |
19 | 20 | 23 | 24 | 25 | ```vue 26 | 33 | 34 | 38 | ``` 39 | 40 |
41 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/divider/component/divider-vertical.md: -------------------------------------------------------------------------------- 1 | ### 竖直分割线 2 | 3 | 指定 `direction` 为 `vertical` 即可使用竖直分割线。竖直分割线不能带文字。 4 | 5 |
6 |
7 | Item 1 8 | 9 | Item 2 10 | 11 | Item 3 12 |
13 |
14 | 15 |
16 | 17 | 20 | 21 | 22 | ```vue 23 | 32 | ``` 33 | 34 |
35 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/notification/index.md: -------------------------------------------------------------------------------- 1 | # 通知提醒框 Notification 2 | 3 | 全局展示通知提醒,将信息及时有效的传达给用户。 4 | 5 | --- 6 | 7 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/time-picker/component/picker-format.md: -------------------------------------------------------------------------------- 1 | ### 定制格式 2 | 3 | 通过设置 `format`,可以定制需要显示的时、分、秒。 4 | 5 |
6 | 10 |
11 | 12 | 16 | 17 |
18 | 19 | 22 | 23 | 24 | ```vue 25 | 31 | 32 | 36 | ``` 37 | 38 |
39 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/List/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | import _List from './List.vue'; 3 | import _ListItem from './ListItem.vue'; 4 | import _ListItemMeta from './ListItemMeta.vue'; 5 | 6 | export type ListInstance = InstanceType; 7 | export type ListItemInstance = InstanceType; 8 | export type ListItemMetaInstance = InstanceType; 9 | export * from './type'; 10 | 11 | const List = Object.assign(_List, { 12 | item: _ListItem, 13 | ['item-meta']: _ListItemMeta, 14 | install: (app: App) => { 15 | app.component('Yc' + _List.name, _List); 16 | app.component('Yc' + _ListItem.name, _ListItem); 17 | app.component('Yc' + _ListItemMeta.name, _ListItemMeta); 18 | }, 19 | }); 20 | 21 | export { _ListItem as ListItem, _ListItemMeta as ListItemMeta }; 22 | 23 | export default List; 24 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Tag/type.ts: -------------------------------------------------------------------------------- 1 | import { VNode } from 'vue'; 2 | import { Size } from '@shared/type'; 3 | 4 | export interface TagProps { 5 | color?: string; 6 | size?: Exclude; 7 | bordered?: boolean; 8 | visible?: boolean; 9 | defaultVisible?: boolean; 10 | loading?: boolean; 11 | closable?: boolean; 12 | checkable?: boolean; 13 | checked?: boolean; 14 | defaultChecked?: boolean; 15 | nowrap?: boolean; 16 | } 17 | 18 | export interface TagEmits { 19 | (e: 'update:visible', value: boolean): void; 20 | (e: 'update:checked', value: boolean): void; 21 | (e: 'close', ev: MouseEvent, value?: string): void; 22 | (e: 'check', value: boolean, ev: MouseEvent): void; 23 | } 24 | 25 | export interface TagSlots { 26 | default?: () => VNode[]; 27 | icon?: () => VNode[]; 28 | 'close-icon'?: () => VNode[]; 29 | } 30 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tag/index.md: -------------------------------------------------------------------------------- 1 | # 标签 Tag 2 | 3 | 用于信息的选择、筛选、分类。用户通过标签进行信息反馈和交互操作。 4 | 5 | --- 6 | 7 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /packages/web-vue/src/components/Comment/hooks/useContext.ts: -------------------------------------------------------------------------------- 1 | import { 2 | provide as _provide, 3 | inject, 4 | onBeforeUnmount, 5 | computed, 6 | Reactive, 7 | reactive, 8 | } from 'vue'; 9 | import { nanoid } from '@shared/utils'; 10 | 11 | const COMMENT_CONTEXT_KEY = 'comment-context'; 12 | type CommentContext = { 13 | depths: Reactive>; 14 | }; 15 | 16 | export default function useCommentContext() { 17 | const { depths } = inject(COMMENT_CONTEXT_KEY, { 18 | depths: reactive(new Map()), 19 | }); 20 | const hasChildren = computed(() => depths.size > 1); 21 | const id = nanoid(); 22 | depths.set(id, id); 23 | onBeforeUnmount(() => { 24 | depths.delete(id); 25 | }); 26 | _provide(COMMENT_CONTEXT_KEY, { 27 | depths, 28 | }); 29 | return { 30 | hasChildren, 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /packages/web-docs/docs/.vitepress/hooks/useCodeExpand.ts: -------------------------------------------------------------------------------- 1 | import { watch, nextTick } from 'vue'; 2 | import { useRoute } from 'vitepress'; 3 | 4 | export default () => { 5 | // route信息 6 | const route = useRoute(); 7 | watch( 8 | () => route.path, 9 | async () => { 10 | await nextTick(); 11 | document?.querySelectorAll('details')?.forEach((details) => { 12 | const summary = details.querySelector('summary'); 13 | if (!summary) { 14 | return; 15 | } 16 | summary.onclick = () => { 17 | if (details.hasAttribute('open')) { 18 | details.removeAttribute('open'); 19 | } else { 20 | details.setAttribute('open', 'true'); 21 | } 22 | }; 23 | }); 24 | }, 25 | { 26 | immediate: true, 27 | } 28 | ); 29 | }; 30 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/alert/index.md: -------------------------------------------------------------------------------- 1 | # 警告提示 Alert 2 | 3 | 向用户显示警告的信息时,通过警告提示,展现需要关注的信息。 4 | 5 | --- 6 | 7 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/config-provider/component/provider-api.md: -------------------------------------------------------------------------------- 1 | ## API 2 | 3 | ### config-provider Props 4 | 5 | 6 | 7 | 38 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/tag/component/tag-close.md: -------------------------------------------------------------------------------- 1 | ### 可关闭标签 2 | 3 | 通过 `closable` 属性控制标签是否可关闭。可关闭标签可通过 `close` 事件执行一些关闭后操作,也可通过 `visible` 属性控制标签的显示或隐藏。 4 | 5 |
6 | 7 | Tag 8 | 9 | 12 | Tag 13 | 14 | 15 |
16 | 17 |
18 | 19 | 22 | 23 | 24 | ```vue 25 | 36 | ``` 37 | 38 |
39 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/message/component/message-close.md: -------------------------------------------------------------------------------- 1 | ### 可关闭 2 | 3 | 设置 `closable` 来显示关闭按钮。 4 | 5 |
6 | Closeable Message 14 |
15 | 16 | 17 | 18 |
19 | 20 | 23 | 24 | 25 | ```vue 26 | 37 | 38 | 39 | ``` 40 | 41 |
42 | -------------------------------------------------------------------------------- /packages/web-docs/docs/components/radio/component/radio-group-dir.md: -------------------------------------------------------------------------------- 1 | ### 单选框组方向 2 | 3 | 通过设置 `direction="vertical"` 可以展示竖直的单选框组。 4 | 5 |
6 | 7 | A 8 | B 9 | C 10 | D 11 | 12 |
13 | 14 |
15 | 16 | 19 | 20 | 21 | ```vue 22 | 30 | ``` 31 | 32 |
33 | --------------------------------------------------------------------------------