├── .browserslistrc ├── .editorconfig ├── .env.preview ├── .eslintignore ├── .eslintrc ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug-report.zh-CN.yml │ ├── config.yml │ └── feature-report.zh-CN.yml ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml ├── issue-shoot.md └── workflows │ ├── auto-release.yml │ ├── issue-assignees.temp.yml │ ├── issue-help-wanted.temp.yml │ ├── issue-label.yml │ ├── issue-mark-duplicate.temp.yml │ ├── issue-reply.temp.yml │ ├── issue-synchronize.temp.yml │ ├── pkg-pr-new.yml │ ├── pr-comment-ci.yml │ ├── pr-compressed-size.yml │ ├── pr-spelling.template.yml │ ├── preview-publish.yml │ ├── pull-request.yml │ ├── tag-push.yml │ └── typos-config.toml ├── .gitignore ├── .gitmodules ├── .husky ├── .gitignore ├── commit-msg ├── pre-commit └── prepare-commit-msg ├── .postcssrc.js ├── .prettierignore ├── .prettierrc ├── CHANGELOG.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── babel.config.js ├── commitlint.config.js ├── global.d.ts ├── globals.d.ts ├── helper ├── attributes.json ├── tags.json └── web-types.json ├── modules.d.ts ├── package.json ├── scripts ├── generate-css-vars.js ├── rollup.config.js ├── test │ ├── cypress.json │ ├── cypress │ │ ├── fixtures │ │ │ └── example.json │ │ ├── plugins │ │ │ └── index.js │ │ ├── support │ │ │ ├── commands.js │ │ │ └── index.js │ │ └── videos │ │ │ └── button │ │ │ └── button.spec.js.mp4 │ ├── generate-coverage.js │ ├── generate-demo-test.js │ ├── setup.js │ └── snap-setup.js └── utils │ ├── index.js │ └── rollup-empty-input.js ├── site ├── .env.intranet ├── docs.config.js ├── docs │ ├── getting-started.en-US.md │ └── getting-started.md ├── index.html ├── mobile.html ├── mobile │ ├── app.vue │ ├── components │ │ ├── demo-block.vue │ │ ├── header.vue │ │ └── home.vue │ ├── main.ts │ └── router.ts ├── styles │ ├── mixins │ │ ├── index.less │ │ └── text.less │ ├── mobile │ │ ├── components.less │ │ ├── demo.less │ │ └── index.less │ └── vars.less ├── vite.config.js └── web │ ├── app.vue │ ├── main.ts │ ├── plugin-tdoc │ ├── demo.js │ ├── index.js │ ├── md-to-vue.js │ └── transforms.js │ ├── router.ts │ ├── stackblitz │ ├── content.ts │ └── index.vue │ ├── test-coverage.js │ └── utils.ts ├── src ├── _util │ ├── getScrollParent.ts │ ├── supportsPassive.ts │ └── useTouch.ts ├── action-sheet │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── action-sheet-grid.tsx │ ├── action-sheet-list.tsx │ ├── action-sheet.en-US.md │ ├── action-sheet.md │ ├── action-sheet.tsx │ ├── demos │ │ ├── align.vue │ │ ├── grid-multiple.vue │ │ ├── grid.vue │ │ ├── list.vue │ │ ├── mobile.vue │ │ └── status.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── avatar │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── avatar-group-props.ts │ ├── avatar-group.tsx │ ├── avatar.en-US.md │ ├── avatar.md │ ├── avatar.tsx │ ├── demos │ │ ├── action.vue │ │ ├── badge-avatar.vue │ │ ├── character-avatar.vue │ │ ├── exhibition.vue │ │ ├── icon-avatar.vue │ │ ├── image-avatar.vue │ │ ├── mobile.vue │ │ └── size.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── back-top │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── back-top.en-US.md │ ├── back-top.md │ ├── back-top.tsx │ ├── demos │ │ ├── base.vue │ │ └── mobile.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── badge │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── badge.en-US.md │ ├── badge.md │ ├── badge.tsx │ ├── demos │ │ ├── base.vue │ │ ├── mobile.vue │ │ ├── size.vue │ │ └── theme.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── button │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── button.en-US.md │ ├── button.md │ ├── button.tsx │ ├── demos │ │ ├── base.vue │ │ ├── block.vue │ │ ├── ghost.vue │ │ ├── group.vue │ │ ├── icon.vue │ │ ├── mobile.vue │ │ ├── shape.vue │ │ ├── size.vue │ │ ├── status.vue │ │ ├── style │ │ │ └── index.less │ │ └── theme.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── calendar │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── calendar.en-US.md │ ├── calendar.md │ ├── calendar.tsx │ ├── demos │ │ ├── base.vue │ │ ├── custom-button.vue │ │ ├── custom-range.vue │ │ ├── custom-text.vue │ │ ├── mobile.vue │ │ ├── multiple.vue │ │ ├── range.vue │ │ ├── switch-mode.vue │ │ └── without-popup.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── template-props.ts │ ├── template.tsx │ ├── type.ts │ └── utils.ts ├── cascader │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── cascader.en-US.md │ ├── cascader.md │ ├── cascader.tsx │ ├── demos │ │ ├── base.vue │ │ ├── check-strictly.vue │ │ ├── keys.vue │ │ ├── lazy.vue │ │ ├── mobile.vue │ │ ├── theme-tab.vue │ │ ├── with-title.vue │ │ └── with-value.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── cell │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── cell-group-props.ts │ ├── cell-group.tsx │ ├── cell.en-US.md │ ├── cell.md │ ├── cell.tsx │ ├── demos │ │ ├── group.vue │ │ ├── mobile.vue │ │ ├── multiple.vue │ │ └── single.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── checkbox │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── __tests__ │ │ └── vitest-checkbox.test.jsx │ ├── checkbox-group-props.ts │ ├── checkbox-group.en-US.md │ ├── checkbox-group.md │ ├── checkbox-group.tsx │ ├── checkbox.en-US.md │ ├── checkbox.md │ ├── checkbox.tsx │ ├── demos │ │ ├── all.vue │ │ ├── base.vue │ │ ├── card.vue │ │ ├── horizontal.vue │ │ ├── mobile.vue │ │ ├── right.vue │ │ ├── special.vue │ │ ├── status.vue │ │ └── type.vue │ ├── hooks │ │ ├── getOptions.ts │ │ ├── index.ts │ │ └── setCheckAllStatus.ts │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── collapse │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── collapse-panel-props.ts │ ├── collapse-panel.tsx │ ├── collapse.en-US.md │ ├── collapse.interface.ts │ ├── collapse.md │ ├── collapse.tsx │ ├── demos │ │ ├── accordion.vue │ │ ├── action.vue │ │ ├── base.vue │ │ ├── card.vue │ │ ├── mobile.vue │ │ └── placement.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── type.ts │ └── util.ts ├── common.ts ├── components.ts ├── config-provider │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ └── demo.test.jsx │ ├── config-provider.en-US.md │ ├── config-provider.md │ ├── config-provider.tsx │ ├── context.ts │ ├── demos │ │ ├── mobile.vue │ │ ├── other-en.vue │ │ ├── table-en.vue │ │ └── upload-en.vue │ ├── index.ts │ ├── props.ts │ ├── type.ts │ └── useConfig.ts ├── config.ts ├── count-down │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── count-down.en-US.md │ ├── count-down.md │ ├── count-down.tsx │ ├── demos │ │ ├── base.vue │ │ ├── mobile.vue │ │ └── size.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── date-time-picker │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── date-time-picker.en-US.md │ ├── date-time-picker.md │ ├── date-time-picker.tsx │ ├── demos │ │ ├── base.vue │ │ ├── custom-range.vue │ │ ├── full.vue │ │ ├── mobile.vue │ │ ├── steps.vue │ │ ├── time.vue │ │ └── year-month.vue │ ├── index.ts │ ├── props.ts │ ├── shared.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── dialog │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── confirm.vue │ │ ├── feedback.vue │ │ ├── image-dialog.vue │ │ ├── input.vue │ │ ├── mobile.vue │ │ ├── multi-state.vue │ │ └── plugin.vue │ ├── dialog.en-US.md │ ├── dialog.md │ ├── dialog.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── divider │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── mobile.vue │ │ └── theme.vue │ ├── divider.en-US.md │ ├── divider.md │ ├── divider.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ ├── index.js │ │ └── index.less │ └── type.ts ├── drawer │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── footer.vue │ │ ├── icon.vue │ │ ├── mobile.vue │ │ ├── plugin.vue │ │ └── title.vue │ ├── drawer.en-US.md │ ├── drawer.md │ ├── drawer.tsx │ ├── index.ts │ ├── plugin.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── dropdown-menu │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── context.ts │ ├── demos │ │ ├── customized.vue │ │ ├── direction.vue │ │ ├── disabled.vue │ │ ├── mobile.vue │ │ ├── multiple.vue │ │ └── single.vue │ ├── dom-utils.ts │ ├── dropdown-item-props.ts │ ├── dropdown-item.tsx │ ├── dropdown-menu.en-US.md │ ├── dropdown-menu.md │ ├── dropdown-menu.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── empty │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ └── demo.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── buttonEmpty.vue │ │ ├── imageEmpty.vue │ │ └── mobile.vue │ ├── empty.en-US.md │ ├── empty.md │ ├── empty.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── fab │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── advance.vue │ │ ├── base.vue │ │ └── mobile.vue │ ├── fab.en-US.md │ ├── fab.md │ ├── fab.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── footer │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── link.vue │ │ ├── logo.vue │ │ └── mobile.vue │ ├── footer.en-US.md │ ├── footer.md │ ├── footer.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── form │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── const.ts │ ├── demos │ │ ├── horizontal.vue │ │ ├── mobile.vue │ │ └── vertical.vue │ ├── form-item-props.ts │ ├── form-item.tsx │ ├── form-model.ts │ ├── form.en-US.md │ ├── form.md │ ├── form.tsx │ ├── hooks.ts │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── grid │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── badge.vue │ │ ├── base.vue │ │ ├── bordered.vue │ │ ├── card.vue │ │ ├── desc.vue │ │ ├── icon.vue │ │ ├── mobile.vue │ │ └── scroll.vue │ ├── grid-item-props.ts │ ├── grid-item.tsx │ ├── grid.en-US.md │ ├── grid.md │ ├── grid.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── guide │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ └── demo.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── custom-popover.vue │ │ ├── dialog-body.vue │ │ ├── dialog.vue │ │ ├── mobile.vue │ │ ├── my-popover.vue │ │ ├── no-mask.vue │ │ └── popover-dialog.vue │ ├── guide.en-US.md │ ├── guide.md │ ├── guide.tsx │ ├── index.ts │ ├── interface.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── type.ts │ └── utils │ │ ├── dom.ts │ │ └── index.ts ├── hooks │ ├── icon.tsx │ ├── index.tsx │ ├── render-tnode.ts │ ├── tnode.ts │ ├── useClass.ts │ ├── useDefaultValue.ts │ ├── useLengthLimit.tsx │ ├── useLockScroll.ts │ ├── useTeleport.ts │ └── useVModel.tsx ├── icon │ ├── demos │ │ ├── base.vue │ │ ├── enhanced.vue │ │ ├── iconfont-enhanced.vue │ │ ├── iconfont.vue │ │ ├── mobile.vue │ │ └── single.vue │ ├── icon-svg-props.ts │ ├── icon.en-US.md │ ├── icon.md │ ├── iconfont-props.ts │ ├── index.ts │ └── type.ts ├── image-viewer │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ ├── index.test.jsx │ │ └── touch.ts │ ├── demos │ │ ├── align.vue │ │ ├── base.vue │ │ ├── mobile.vue │ │ └── operation.vue │ ├── image-viewer.en-US.md │ ├── image-viewer.md │ ├── image-viewer.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── image │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ ├── index.test.jsx │ │ └── utils.ts │ ├── demos │ │ ├── base.vue │ │ ├── mobile.vue │ │ ├── position.vue │ │ ├── shape.vue │ │ └── status.vue │ ├── image.en-US.md │ ├── image.md │ ├── image.tsx │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── index-lib.ts ├── index.ts ├── indexes │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── custom.vue │ │ └── mobile.vue │ ├── index.ts │ ├── indexes-anchor-props.ts │ ├── indexes-anchor.tsx │ ├── indexes.en-US.md │ ├── indexes.md │ ├── indexes.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── input │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── align.vue │ │ ├── banner.vue │ │ ├── base.vue │ │ ├── bordered.vue │ │ ├── custom.vue │ │ ├── label.vue │ │ ├── layout.vue │ │ ├── maxLength.vue │ │ ├── mobile.vue │ │ ├── prefix.vue │ │ ├── special.vue │ │ ├── status.vue │ │ └── suffix.vue │ ├── index.ts │ ├── input.en-US.md │ ├── input.md │ ├── input.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── layout │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── col-props.ts │ ├── col.tsx │ ├── constants.ts │ ├── demos │ │ ├── base.vue │ │ ├── mobile.vue │ │ └── offset.vue │ ├── index.ts │ ├── layout.en-US.md │ ├── layout.md │ ├── row-props.ts │ ├── row.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── link │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── linkSize.vue │ │ ├── mobile.vue │ │ ├── prefix.vue │ │ ├── status.vue │ │ ├── suffix.vue │ │ ├── theme.vue │ │ └── underline.vue │ ├── index.ts │ ├── link.en-US.md │ ├── link.md │ ├── link.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── list │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── err-tip.vue │ │ ├── mobile.vue │ │ └── pull-refresh.vue │ ├── index.ts │ ├── list.en-US.md │ ├── list.md │ ├── list.tsx │ ├── props.ts │ ├── pull-refresh.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── loading │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── attach.vue │ │ ├── base.vue │ │ ├── delay.vue │ │ ├── fullscreen.vue │ │ ├── horz.vue │ │ ├── mobile.vue │ │ ├── pure-text.vue │ │ ├── service.vue │ │ ├── size.vue │ │ ├── speed.vue │ │ └── vert.vue │ ├── icon │ │ ├── gradient.tsx │ │ └── spinner.tsx │ ├── index.ts │ ├── loading.en-US.md │ ├── loading.md │ ├── loading.tsx │ ├── plugin.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── locale │ ├── ar_KW.ts │ ├── en_US.ts │ ├── it_IT.ts │ ├── ja_JP.ts │ ├── ko_KR.ts │ ├── ru_RU.ts │ ├── zh_CN.ts │ └── zh_TW.ts ├── message │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── closeAll.vue │ │ ├── mobile.vue │ │ └── theme.vue │ ├── index.ts │ ├── message.en-US.md │ ├── message.md │ ├── message.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── navbar │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── custom-color.vue │ │ ├── img.vue │ │ ├── left-title.vue │ │ ├── mobile.vue │ │ ├── search.vue │ │ └── size.vue │ ├── index.ts │ ├── navbar.en-US.md │ ├── navbar.md │ ├── navbar.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── notice-bar │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── custom.vue │ │ ├── customization.vue │ │ ├── event.vue │ │ ├── iconDemo.vue │ │ ├── mobile.vue │ │ ├── scrolling.vue │ │ ├── suffixIcon.vue │ │ └── theme.vue │ ├── index.ts │ ├── notice-bar.en-US.md │ ├── notice-bar.md │ ├── notice-bar.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── overlay │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ └── mobile.vue │ ├── index.ts │ ├── overlay.en-US.md │ ├── overlay.md │ ├── overlay.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── picker │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── cascade.vue │ ├── demos │ │ ├── area.vue │ │ ├── base.vue │ │ ├── cascade.vue │ │ ├── customHeight.vue │ │ ├── mobile.vue │ │ └── title.vue │ ├── index.ts │ ├── picker-item.tsx │ ├── picker.class.ts │ ├── picker.en-US.md │ ├── picker.md │ ├── picker.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── type.ts │ └── utils.ts ├── plugins.ts ├── popover │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ └── demo.test.jsx │ ├── demos │ │ ├── mobile.vue │ │ ├── placement.vue │ │ ├── theme.vue │ │ └── type.vue │ ├── index.ts │ ├── popover.en-US.md │ ├── popover.md │ ├── popover.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── popup │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── custom-close.vue │ │ ├── mobile.vue │ │ └── with-title.vue │ ├── index.ts │ ├── popup.en-US.md │ ├── popup.md │ ├── popup.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── progress │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── circle.vue │ │ ├── custom.vue │ │ ├── line.vue │ │ ├── mobile.vue │ │ ├── plump.vue │ │ └── transition.vue │ ├── index.ts │ ├── progress.en-US.md │ ├── progress.md │ ├── progress.tsx │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── type.ts │ └── utils.ts ├── pull-down-refresh │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ ├── index.test.jsx │ │ └── utils.ts │ ├── demos │ │ ├── base.vue │ │ ├── loading-texts.vue │ │ ├── mobile.vue │ │ └── timeout.vue │ ├── index.ts │ ├── props.ts │ ├── pull-down-refresh.en-US.md │ ├── pull-down-refresh.md │ ├── pull-down-refresh.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── type.ts │ └── useTouch.ts ├── radio │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── card.vue │ │ ├── custom.vue │ │ ├── horizontal.vue │ │ ├── icon.vue │ │ ├── mobile.vue │ │ ├── placement.vue │ │ └── status.vue │ ├── index.ts │ ├── props.ts │ ├── radio-group-props.ts │ ├── radio-group.tsx │ ├── radio.en-US.md │ ├── radio.md │ ├── radio.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── rate │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── action.vue │ │ ├── base.vue │ │ ├── color.vue │ │ ├── count.vue │ │ ├── custom.vue │ │ ├── mobile.vue │ │ ├── placement.vue │ │ ├── show-text.vue │ │ ├── size.vue │ │ └── special.vue │ ├── index.ts │ ├── props.ts │ ├── rate.en-US.md │ ├── rate.md │ ├── rate.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── result │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── custom.vue │ │ ├── mobile.vue │ │ └── theme.vue │ ├── index.ts │ ├── props.ts │ ├── result.en-US.md │ ├── result.md │ ├── result.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── search │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── action.vue │ │ ├── base.vue │ │ ├── max-length.vue │ │ ├── mobile.vue │ │ ├── other.vue │ │ └── shape.vue │ ├── index.ts │ ├── props.ts │ ├── search.en-US.md │ ├── search.md │ ├── search.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── shared │ ├── component.ts │ ├── constants.ts │ ├── dom.ts │ ├── functions.ts │ ├── hover.ts │ ├── index.ts │ ├── render-tnode.ts │ ├── render.ts │ ├── useChildSlots │ │ └── index.ts │ ├── useClickAway │ │ └── index.ts │ ├── useCountDown │ │ ├── index.ts │ │ ├── type.ts │ │ └── utils.ts │ ├── useExpose │ │ └── index.ts │ ├── useGesture │ │ └── index.ts │ ├── useInterval │ │ └── index.ts │ ├── useScrollParent │ │ └── index.ts │ ├── useTest │ │ └── index.ts │ ├── useToggle │ │ └── index.ts │ ├── useTouch │ │ └── index.ts │ └── util.ts ├── side-bar │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ └── demo.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── custom.vue │ │ ├── mobile.vue │ │ ├── switch.vue │ │ └── with-icon.vue │ ├── index.ts │ ├── props.ts │ ├── side-bar-item-props.ts │ ├── side-bar-item.tsx │ ├── side-bar.en-US.md │ ├── side-bar.md │ ├── side-bar.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── skeleton │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── animation.vue │ │ ├── cell-group.vue │ │ ├── grid.vue │ │ ├── image-group.vue │ │ ├── mobile.vue │ │ └── theme.vue │ ├── index.ts │ ├── props.ts │ ├── skeleton.en-US.md │ ├── skeleton.md │ ├── skeleton.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── slider │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── capsule.vue │ │ ├── disabled.vue │ │ ├── label.vue │ │ ├── mobile.vue │ │ ├── range.vue │ │ └── step.vue │ ├── index.ts │ ├── props.ts │ ├── slider.en-US.md │ ├── slider.md │ ├── slider.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── tool.ts │ └── type.ts ├── stepper │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── min-max.vue │ │ ├── mobile.vue │ │ ├── size.vue │ │ ├── status.vue │ │ └── theme.vue │ ├── index.ts │ ├── props.ts │ ├── stepper.en-US.md │ ├── stepper.md │ ├── stepper.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── steps │ ├── __test__ │ │ ├── __snapshots__ │ │ │ ├── demo.test.jsx.snap │ │ │ └── index.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── horizontal.vue │ │ ├── mobile.vue │ │ ├── special.vue │ │ ├── status.vue │ │ └── vertical.vue │ ├── index.ts │ ├── props.ts │ ├── step-item-props.ts │ ├── step-item.tsx │ ├── steps.en-US.md │ ├── steps.md │ ├── steps.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── sticky │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── container.vue │ │ ├── mobile.vue │ │ └── offset.vue │ ├── index.ts │ ├── props.ts │ ├── sticky.en-US.md │ ├── sticky.md │ ├── sticky.tsx │ ├── style │ │ ├── css.js │ │ └── index.js │ └── type.ts ├── style │ ├── css.js │ └── index.js ├── swipe-cell │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── double.vue │ │ ├── event.vue │ │ ├── icon.vue │ │ ├── left.vue │ │ ├── mobile.vue │ │ └── right.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── swipe-cell.en-US.md │ ├── swipe-cell.md │ ├── swipe-cell.tsx │ ├── type.ts │ ├── useSureConfirm.ts │ └── useSwipe.ts ├── swiper │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── card.vue │ │ ├── control.vue │ │ ├── current.vue │ │ ├── custom.vue │ │ ├── fraction.vue │ │ ├── mobile.vue │ │ ├── outside.vue │ │ └── vertical.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── swiper-item.tsx │ ├── swiper.en-US.md │ ├── swiper.md │ ├── swiper.tsx │ └── type.ts ├── switch │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── color.vue │ │ ├── label.vue │ │ ├── mobile.vue │ │ ├── size.vue │ │ └── status.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── switch.en-US.md │ ├── switch.md │ ├── switch.tsx │ └── type.ts ├── tab-bar │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── badge-props.vue │ │ ├── base.vue │ │ ├── custom.vue │ │ ├── mobile.vue │ │ ├── pure-icon.vue │ │ ├── round.vue │ │ ├── text-spread.vue │ │ └── text.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── tab-bar-item-props.ts │ ├── tab-bar-item.tsx │ ├── tab-bar.en-US.md │ ├── tab-bar.md │ ├── tab-bar.tsx │ ├── type.ts │ └── useTabBar.ts ├── table │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── base-table-props.ts │ ├── base-table.tsx │ ├── demos │ │ ├── base.vue │ │ ├── bordered.vue │ │ ├── mobile.vue │ │ ├── scroll.vue │ │ └── stripe.vue │ ├── hooks │ │ ├── useClassName.ts │ │ └── useStyle.ts │ ├── index.ts │ ├── interface.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── table.en-US.md │ ├── table.md │ └── type.ts ├── tabs │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── badge.vue │ │ ├── content.vue │ │ ├── evenly.vue │ │ ├── icon.vue │ │ ├── isometric.vue │ │ ├── mobile.vue │ │ ├── size.vue │ │ ├── status.vue │ │ └── theme.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── tab-nav-item.tsx │ ├── tab-panel-props.ts │ ├── tab-panel.tsx │ ├── tabs.en-US.md │ ├── tabs.md │ ├── tabs.tsx │ └── type.ts ├── tag │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── check-tag-props.ts │ ├── check-tag.tsx │ ├── demos │ │ ├── checkable.vue │ │ ├── closable.vue │ │ ├── mobile.vue │ │ ├── size.vue │ │ ├── theme.vue │ │ └── type.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── tag.en-US.md │ ├── tag.md │ ├── tag.tsx │ └── type.ts ├── textarea │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── autosize.vue │ │ ├── base.vue │ │ ├── card.vue │ │ ├── custom.vue │ │ ├── disabled.vue │ │ ├── label.vue │ │ ├── maxcharacter.vue │ │ ├── maxlength.vue │ │ └── mobile.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── textarea.en-US.md │ ├── textarea.md │ ├── textarea.tsx │ └── type.ts ├── toast │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ ├── demo.test.jsx │ │ └── index.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── close.vue │ │ ├── cover.vue │ │ ├── mobile.vue │ │ └── theme.vue │ ├── index.ts │ ├── plugin.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── toast.en-US.md │ ├── toast.md │ ├── toast.tsx │ └── type.ts ├── tree-select │ ├── __test__ │ │ ├── __snapshots__ │ │ │ └── demo.test.jsx.snap │ │ └── demo.test.jsx │ ├── demos │ │ ├── base.vue │ │ ├── mobile.vue │ │ ├── multiple.vue │ │ └── normal.vue │ ├── index.ts │ ├── props.ts │ ├── style │ │ ├── css.js │ │ └── index.js │ ├── tree-select.en-US.md │ ├── tree-select.md │ ├── tree-select.tsx │ └── type.ts └── upload │ ├── __test__ │ ├── __snapshots__ │ │ └── demo.test.jsx.snap │ ├── demo.test.jsx │ └── index.test.jsx │ ├── demos │ ├── base.vue │ ├── custom.vue │ ├── mobile.vue │ ├── multiple.vue │ └── status.vue │ ├── hooks │ └── useUpload.ts │ ├── index.ts │ ├── interface.ts │ ├── props.ts │ ├── style │ ├── css.js │ └── index.js │ ├── type.ts │ ├── upload.en-US.md │ ├── upload.md │ └── upload.tsx ├── test ├── snap │ ├── __snapshots__ │ │ ├── csr.test.js.snap │ │ └── ssr.test.js.snap │ ├── csr.test.js │ └── ssr.test.js └── ssr │ └── __snapshots__ │ └── ssr.test.js.snap ├── tsconfig.build.json ├── tsconfig.json └── vitest.config.mjs /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 5 versions 3 | ios >= 7 4 | android > 4.4 5 | not ie < 10 6 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.md] 11 | trim_trailing_whitespace = false 12 | 13 | [*.{ts,js,vue,css}] 14 | indent_size = 2 15 | -------------------------------------------------------------------------------- /.env.preview: -------------------------------------------------------------------------------- 1 | # .env.preview 2 | 3 | NODE_ENV=preview -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/*site* 2 | **/*_common* 3 | **/*types* 4 | !.*.js 5 | # build files 6 | es 7 | esm 8 | lib 9 | cjs 10 | dist 11 | typings 12 | 13 | *.md 14 | node_modules 15 | yarn-error.log 16 | vitest.config.js 17 | 18 | test 19 | 20 | helper/** 21 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @anlyyao @liweijie0812 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: 使用 issue-helper 新建 4 | url: https://Tencent.github.io/tdesign/issue-helper/?lang=zh-CN&repo=Tencent/tdesign-mobile-vue 5 | about: 使用 https://Tencent.github.io/tdesign/issue-helper/ 创建 issue,其中包含 bug 和 feature,表单提交更加严格。 6 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Basic dependabot.yml file with 2 | # minimum configuration for two package managers 3 | 4 | version: 2 5 | updates: 6 | # Enable version updates for npm 7 | - package-ecosystem: 'npm' 8 | # Look for `package.json` and `lock` files in the `root` directory 9 | directory: '/' 10 | # Check the npm registry for updates every day (weekdays) 11 | schedule: 12 | interval: 'monthly' 13 | 14 | # Enable version updates for Docker 15 | - package-ecosystem: 'docker' 16 | # Look for a `Dockerfile` in the `root` directory 17 | directory: '/' 18 | # Check for updates once a week 19 | schedule: 20 | interval: 'monthly' 21 | -------------------------------------------------------------------------------- /.github/issue-shoot.md: -------------------------------------------------------------------------------- 1 | ## IssueShoot 2 | - 预估时长: {{ .duration }} 3 | - 期望完成时间: {{ .deadline }} 4 | - 开发难度: {{ .level }} 5 | - 参与人数: 1 6 | - 需求对接人: anlyyao 7 | - 验收标准: 实现期望改造效果,提 PR 并通过验收无误 8 | - 备注: 最终激励以实际提交 `pull request` 并合并为准 9 | -------------------------------------------------------------------------------- /.github/workflows/issue-assignees.temp.yml: -------------------------------------------------------------------------------- 1 | # force copy from tencent/tdesign 2 | name: Issue Add Assigness 3 | 4 | on: 5 | issues: 6 | types: [opened, edited] 7 | 8 | jobs: 9 | mark-duplicate: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: wow-actions/auto-comment@v1 13 | with: 14 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 15 | issuesOpened: | 16 | 👋 @{{ author }},感谢给 TDesign 提出了 issue。 17 | 请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。 18 | -------------------------------------------------------------------------------- /.github/workflows/issue-help-wanted.temp.yml: -------------------------------------------------------------------------------- 1 | # force copy from tencent/tdesign 2 | name: Issue Help wanted 3 | on: 4 | issues: 5 | types: 6 | - labeled 7 | jobs: 8 | add-comment: 9 | if: github.event.label.name == 'help wanted' 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | steps: 14 | - name: Add comment 15 | uses: peter-evans/create-or-update-comment@v1 16 | with: 17 | issue-number: ${{ github.event.issue.number }} 18 | body: | 19 | 任何人都可以处理此问题。 20 | **请务必在您的 `pull request` 中引用此问题。** :sparkles: 21 | 感谢你的贡献! :sparkles: 22 | reactions: heart 23 | -------------------------------------------------------------------------------- /.github/workflows/issue-mark-duplicate.temp.yml: -------------------------------------------------------------------------------- 1 | # force copy from tencent/tdesign 2 | # 当在 issue 的 comment 回复类似 `Duplicate of #111` 这样的话,issue 将被自动打上 重复提交标签 并且 cloese 3 | name: Issue Mark Duplicate 4 | 5 | on: 6 | issue_comment: 7 | types: [created, edited] 8 | 9 | jobs: 10 | mark-duplicate: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: mark-duplicate 14 | uses: actions-cool/issues-helper@v2 15 | with: 16 | actions: 'mark-duplicate' 17 | token: ${{ secrets.GITHUB_TOKEN }} 18 | duplicate-labels: 'duplicate' 19 | close-issue: true 20 | -------------------------------------------------------------------------------- /.github/workflows/issue-reply.temp.yml: -------------------------------------------------------------------------------- 1 | # force copy from tencent/tdesign 2 | # 当被打上 Need Reproduce 标签时候,自动提示需要重现实例 3 | 4 | name: ISSUE_REPLY 5 | 6 | on: 7 | issues: 8 | types: [labeled] 9 | 10 | jobs: 11 | issue-reply: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Need Reproduce 15 | if: github.event.label.name == 'Need Reproduce' 16 | uses: actions-cool/issues-helper@v2 17 | with: 18 | actions: 'create-comment' 19 | issue-number: ${{ github.event.issue.number }} 20 | body: | 21 | 你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。 22 | -------------------------------------------------------------------------------- /.github/workflows/issue-synchronize.temp.yml: -------------------------------------------------------------------------------- 1 | # force copy from tencent/tdesign 2 | name: Issue Synchronize 3 | 4 | on: 5 | issues: 6 | types: [opened, reopened] 7 | 8 | jobs: 9 | synchronize: 10 | runs-on: ubuntu-latest 11 | steps: 12 | # https://docs.github.com/cn/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues 13 | - uses: 94dreamer/create-report@main 14 | with: 15 | wxhook: ${{ secrets.WX_HOOK_URL }} 16 | token: ${{ secrets.GITHUB_TOKEN }} 17 | type: 'issue' 18 | -------------------------------------------------------------------------------- /.github/workflows/pkg-pr-new.yml: -------------------------------------------------------------------------------- 1 | name: Publish_Any_Commit 2 | on: 3 | push: 4 | branches: [develop] 5 | pull_request: 6 | branches: [develop] 7 | 8 | jobs: 9 | build: 10 | if: ${{ github.repository == 'Tencent/tdesign-mobile-vue' && !startsWith(github.head_ref, 'release/') }} 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4 15 | with: 16 | submodules: recursive 17 | 18 | - uses: actions/setup-node@v4 19 | with: 20 | node-version: 18 21 | 22 | - run: npm install 23 | 24 | - run: npm run build 25 | 26 | - run: npx pkg-pr-new publish --compact 27 | -------------------------------------------------------------------------------- /.github/workflows/pr-compressed-size.yml: -------------------------------------------------------------------------------- 1 | name: Compressed Size 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize] 6 | 7 | jobs: 8 | compressed-size: 9 | runs-on: ubuntu-latest 10 | if: startsWith(github.head_ref, 'release/') 11 | steps: 12 | - uses: actions/checkout@v3 13 | with: 14 | submodules: recursive 15 | - uses: 94dreamer/compressed-size-action@master 16 | with: 17 | repo-token: '${{ secrets.GITHUB_TOKEN }}' 18 | pattern: './dist/**/*.{js,css}' 19 | -------------------------------------------------------------------------------- /.github/workflows/pr-spelling.template.yml: -------------------------------------------------------------------------------- 1 | name: pr-spell-check 2 | on: [pull_request] 3 | 4 | jobs: 5 | run: 6 | name: Spell Check with Typos 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v4 10 | - name: Check spelling 11 | uses: crate-ci/typos@master 12 | with: 13 | config: .github/workflows/typos-config.toml 14 | -------------------------------------------------------------------------------- /.github/workflows/preview-publish.yml: -------------------------------------------------------------------------------- 1 | # 文件名建议统一为 preview-publish 2 | # 应用 preview.yml 的 demo 3 | name: PREVIEW_PUBLISH 4 | 5 | on: 6 | workflow_run: 7 | workflows: ['MAIN_PULL_REQUEST'] 8 | types: 9 | - completed 10 | 11 | jobs: 12 | call-preview: 13 | uses: Tencent/tdesign/.github/workflows/preview.yml@main 14 | secrets: 15 | TDESIGN_SURGE_TOKEN: ${{ secrets.TDESIGN_SURGE_TOKEN }} 16 | -------------------------------------------------------------------------------- /.github/workflows/pull-request.yml: -------------------------------------------------------------------------------- 1 | # 文件名建议统一为 pull-request.yml 2 | # 应用 test-build.yml 的 demo 3 | 4 | name: MAIN_PULL_REQUEST 5 | 6 | on: 7 | pull_request: 8 | branches: [develop, main] 9 | types: [opened, synchronize, reopened] 10 | 11 | jobs: 12 | call-test-build: 13 | uses: Tencent/tdesign/.github/workflows/test-build.yml@main 14 | -------------------------------------------------------------------------------- /.github/workflows/tag-push.yml: -------------------------------------------------------------------------------- 1 | # 文件名建议统一为 tag-push.yml 2 | # 应用 publish.yml 的 demo 3 | 4 | name: TAG_PUSH 5 | 6 | on: create 7 | 8 | jobs: 9 | call-publish: 10 | uses: Tencent/tdesign/.github/workflows/publish.yml@main 11 | secrets: 12 | TDESIGN_SURGE_TOKEN: ${{ secrets.TDESIGN_SURGE_TOKEN }} 13 | TDESIGN_NPM_TOKEN: ${{ secrets.TDESIGN_NPM_TOKEN }} 14 | PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }} 15 | -------------------------------------------------------------------------------- /.github/workflows/typos-config.toml: -------------------------------------------------------------------------------- 1 | default.check-filename = true 2 | 3 | [default.extend-words] 4 | actived = "actived" 5 | colum = "colum" 6 | 7 | [files] 8 | extend-exclude = ["CHANGELOG.md", "*.snap"] 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | _site 3 | .DS_Store 4 | package 5 | tmpfile* 6 | coverage 7 | test-report.html 8 | *.zip 9 | 10 | # build files 11 | es/ 12 | esm/ 13 | lib/ 14 | cjs/ 15 | dist/ 16 | typings/ 17 | site/public/ 18 | results/ 19 | 20 | # lock 21 | yarn.lock 22 | package-lock.json 23 | pnpm-lock.yaml 24 | 25 | # editor 26 | .idea/ 27 | .vscode/ 28 | .history/ 29 | 30 | Dockerfile 31 | robotMsg.json 32 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "src/_common"] 2 | path = src/_common 3 | url = https://github.com/Tencent/tdesign-common.git 4 | -------------------------------------------------------------------------------- /.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npx lint-staged && log_emails=$(git config user.email) && if [[ ${log_emails} =~ '@tencent.com' ]];then echo 本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交 && exit 2;else echo 邮箱 $log_emails 校验通过;fi 5 | -------------------------------------------------------------------------------- /.husky/prepare-commit-msg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [[ "$(uname -a)" = *"MINGW64"* ]] && exit 0 3 | [ -n "$CI" ] && exit 0 4 | . "$(dirname "$0")/_/husky.sh" 5 | 6 | exec < /dev/tty && npx git-cz --hook || true 7 | -------------------------------------------------------------------------------- /.postcssrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | /** 4 | * 根据 .browserslistrc 中配置的环境自动添加样式前缀 5 | * https://github.com/postcss/autoprefixer 6 | */ 7 | require('autoprefixer')(), 8 | /** 9 | * https://github.com/postcss/postcss-url 10 | */ 11 | // require('postcss-url')({ 12 | // url: (asset) => { 13 | // const absPath = asset.absolutePath; 14 | // const relPath = require('path').relative('dist', absPath); 15 | // return relPath + asset.search + asset.hash; 16 | // }, 17 | // }), 18 | ], 19 | }; 20 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | helper/** 2 | global.d.ts -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "quoteProps": "as-needed", 8 | "jsxSingleQuote": false, 9 | "trailingComma": "all", 10 | "bracketSpacing": true, 11 | "arrowParens": "always", 12 | "rangeStart": 0, 13 | "requirePragma": false, 14 | "insertPragma": false, 15 | "proseWrap": "preserve", 16 | "htmlWhitespaceSensitivity": "css", 17 | "vueIndentScriptAndStyle": false, 18 | "endOfLine": "lf" 19 | } 20 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | [ 4 | '@babel/preset-env', 5 | { 6 | targets: { 7 | browsers: [ 8 | 'last 3 Chrome versions', 9 | 'last 3 Firefox versions', 10 | 'Safari >= 10', 11 | 'Explorer >= 11', 12 | 'Edge >= 12', 13 | ], 14 | }, 15 | }, 16 | ], 17 | ], 18 | plugins: ['@babel/plugin-transform-runtime', '@babel/plugin-proposal-class-properties', '@vue/babel-plugin-jsx'], 19 | }; 20 | -------------------------------------------------------------------------------- /commitlint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { extends: ['@commitlint/config-conventional'] }; 2 | -------------------------------------------------------------------------------- /globals.d.ts: -------------------------------------------------------------------------------- 1 | // 组件版本变量 2 | declare const __VERSION__: string; 3 | 4 | declare module '*.svg'; 5 | -------------------------------------------------------------------------------- /modules.d.ts: -------------------------------------------------------------------------------- 1 | declare module '*.md' { 2 | const content: string; 3 | export default content; 4 | } 5 | 6 | declare module '*.json' { 7 | const content: string; 8 | export default content; 9 | } 10 | 11 | declare module '*.vue' { 12 | import type { DefineComponent, Plugin } from 'vue'; 13 | 14 | const component: DefineComponent<{}, {}, any> & Plugin; 15 | export default component; 16 | } 17 | -------------------------------------------------------------------------------- /scripts/test/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:18000", 3 | "integrationFolder": "test/e2e", 4 | "testFiles": "**/*.spec.js", 5 | "fileServerFolder": "scripts/test/cypress", 6 | "fixturesFolder": "scripts/test/cypress/fixtures", 7 | "pluginsFile": "scripts/test/cypress/plugins/index.js", 8 | "screenshotsFolder": "scripts/test/cypress/screenshots", 9 | "videosFolder": "scripts/test/cypress/videos", 10 | "supportFile": "scripts/test/cypress/support/index.js", 11 | "video": true, 12 | "viewportHeight": 640, 13 | "viewportWidth": 360, 14 | "reporter": "junit", 15 | "reporterOptions": { 16 | "mochaFile": "results/cypress-output-[hash].xml", 17 | "toConsole": true 18 | } 19 | } -------------------------------------------------------------------------------- /scripts/test/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } -------------------------------------------------------------------------------- /scripts/test/cypress/support/index.js: -------------------------------------------------------------------------------- 1 | // *********************************************************** 2 | // This example support/index.js is processed and 3 | // loaded automatically before your test files. 4 | // 5 | // This is a great place to put global configuration and 6 | // behavior that modifies Cypress. 7 | // 8 | // You can change the location of this file or turn off 9 | // automatically serving support files with the 10 | // 'supportFile' configuration option. 11 | // 12 | // You can read more here: 13 | // https://on.cypress.io/configuration 14 | // *********************************************************** 15 | 16 | // Import commands.js using ES2015 syntax: 17 | import './commands' 18 | 19 | // Alternatively you can use CommonJS syntax: 20 | // require('./commands') 21 | -------------------------------------------------------------------------------- /scripts/test/cypress/videos/button/button.spec.js.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Tencent/tdesign-mobile-vue/84e9896b9e208bac0e5094ea8fbff0b6ea78fd42/scripts/test/cypress/videos/button/button.spec.js.mp4 -------------------------------------------------------------------------------- /scripts/test/setup.js: -------------------------------------------------------------------------------- 1 | import { config } from '@vue/test-utils'; 2 | 3 | const transitionStub = () => ({ 4 | render() { 5 | return this.$options._renderChildren; 6 | }, 7 | }); 8 | 9 | config.global.stubs = { 10 | teleport: false, 11 | transition: transitionStub, 12 | }; 13 | -------------------------------------------------------------------------------- /scripts/test/snap-setup.js: -------------------------------------------------------------------------------- 1 | import { config } from '@vue/test-utils'; 2 | import { createApp } from 'vue'; 3 | import { renderToString } from 'vue/server-renderer'; 4 | import TDesign from '@/index'; 5 | import DemoBlock from '../../site/mobile/components/demo-block.vue'; 6 | 7 | config.global.plugins = [TDesign]; 8 | config.global.components = { 9 | 'tdesign-demo-block': DemoBlock, 10 | }; 11 | 12 | config.global.stubs = { 13 | teleport: false, 14 | }; 15 | 16 | config.global.createSSRApp = (comp) => { 17 | const app = createApp(comp); 18 | app.config.globalProperties.$route = {}; 19 | app.use(TDesign).component('tdesign-demo-block', DemoBlock); 20 | const html = renderToString(app); 21 | return html; 22 | }; 23 | -------------------------------------------------------------------------------- /scripts/utils/rollup-empty-input.js: -------------------------------------------------------------------------------- 1 | // used to be input file of rollup-plugin-delete 2 | -------------------------------------------------------------------------------- /site/.env.intranet: -------------------------------------------------------------------------------- 1 | NODE_ENV=production -------------------------------------------------------------------------------- /site/mobile/app.vue: -------------------------------------------------------------------------------- 1 | 9 | 26 | -------------------------------------------------------------------------------- /site/mobile/components/header.vue: -------------------------------------------------------------------------------- 1 | 7 | 19 | -------------------------------------------------------------------------------- /site/mobile/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue'; 2 | import app from './app.vue'; 3 | import header from './components/header.vue'; 4 | import DemoBlock from './components/demo-block.vue'; 5 | import router from './router'; 6 | 7 | // import tdesign style 8 | import 'tdesign-mobile-vue/style/index.js'; 9 | 10 | // @ts-ignore 11 | import TDesign from '@/index'; 12 | import '@common/style/mobile/_reset.less'; 13 | import '../styles/mobile/index.less'; 14 | 15 | createApp(app) 16 | .use(TDesign) 17 | .use(router) 18 | .component('tdesign-header', header) 19 | .component('tdesign-demo-block', DemoBlock) 20 | .mount('#app'); 21 | -------------------------------------------------------------------------------- /site/styles/mixins/index.less: -------------------------------------------------------------------------------- 1 | @import './text.less'; 2 | 3 | .clearfix() { 4 | zoom: 1; 5 | &:before, 6 | &:after { 7 | content: " "; 8 | display: table; 9 | } 10 | &:after { 11 | clear: both; 12 | visibility: hidden; 13 | font-size: 0; 14 | height: 0; 15 | } 16 | } -------------------------------------------------------------------------------- /src/_util/getScrollParent.ts: -------------------------------------------------------------------------------- 1 | type ScrollElement = HTMLElement | Window; 2 | 3 | const overflowScrollReg = /scroll|auto|overlay/i; 4 | 5 | export default function getScrollParent( 6 | el: Element | null | undefined, 7 | root: ScrollElement | null | undefined = window, 8 | ): Window | Element | null | undefined { 9 | let node = el; 10 | 11 | while (node && node !== root && node.nodeType === 1) { 12 | const { overflowY } = window.getComputedStyle(node); 13 | if (overflowScrollReg.test(overflowY)) { 14 | return node; 15 | } 16 | node = node.parentNode as Element; 17 | } 18 | 19 | return root; 20 | } 21 | -------------------------------------------------------------------------------- /src/_util/supportsPassive.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue'; 2 | import { isBrowser } from '../shared'; 3 | 4 | export const supportsPassive = ref(false); 5 | 6 | if (!isBrowser) { 7 | try { 8 | const opts = {}; 9 | Object.defineProperty(opts, 'passive', { 10 | get() { 11 | supportsPassive.value = true; 12 | return true; // 添加返回值 13 | }, 14 | }); 15 | window.addEventListener('test-passive', null as any, opts); 16 | } catch (e) { 17 | // 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/action-sheet/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/action-sheet/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/action-sheet/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/avatar/demos/character-avatar.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 25 | -------------------------------------------------------------------------------- /src/avatar/demos/icon-avatar.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | 25 | -------------------------------------------------------------------------------- /src/avatar/demos/image-avatar.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 28 | -------------------------------------------------------------------------------- /src/avatar/index.ts: -------------------------------------------------------------------------------- 1 | import _Avatar from './avatar'; 2 | import _AvatarGroup from './avatar-group'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | import { TdAvatarProps, TdAvatarGroupProps } from './type'; 7 | 8 | export * from './type'; 9 | export type AvatarProps = TdAvatarProps; 10 | export type AvatarGroupProps = TdAvatarGroupProps; 11 | 12 | export const Avatar: WithInstallType = withInstall(_Avatar); 13 | export const AvatarGroup: WithInstallType = withInstall(_AvatarGroup); 14 | export default Avatar; 15 | -------------------------------------------------------------------------------- /src/avatar/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/avatar/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/avatar/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/back-top/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/back-top/demos/base.vue'; 7 | import mobileVue from '@/back-top/demos/mobile.vue'; 8 | 9 | const mapper = { 10 | baseVue, 11 | mobileVue, 12 | }; 13 | 14 | describe('BackTop', () => { 15 | Object.keys(mapper).forEach((demoName) => { 16 | it(`BackTop ${demoName} demo works fine`, () => { 17 | const wrapper = mount(mapper[demoName]); 18 | expect(wrapper.element).toMatchSnapshot(); 19 | }); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/back-top/index.ts: -------------------------------------------------------------------------------- 1 | import _BackTop from './back-top'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdBackTopProps } from './type'; 6 | 7 | export * from './type'; 8 | export type BackTopProps = TdBackTopProps; 9 | 10 | export const BackTop: WithInstallType = withInstall(_BackTop); 11 | export default BackTop; 12 | -------------------------------------------------------------------------------- /src/back-top/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/back-top/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/back-top/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/badge/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/badge/demos/base.vue'; 7 | import mobileVue from '@/badge/demos/mobile.vue'; 8 | import sizeVue from '@/badge/demos/size.vue'; 9 | import themeVue from '@/badge/demos/theme.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | mobileVue, 14 | sizeVue, 15 | themeVue, 16 | }; 17 | 18 | describe('Badge', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Badge ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/badge/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | -------------------------------------------------------------------------------- /src/badge/demos/size.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /src/badge/index.ts: -------------------------------------------------------------------------------- 1 | import _Badge from './badge'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdBadgeProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type BadgeProps = TdBadgeProps; 9 | 10 | export const Badge: WithInstallType = withInstall(_Badge); 11 | export default Badge; 12 | -------------------------------------------------------------------------------- /src/badge/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/badge/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/badge/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/button/demos/base.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 28 | -------------------------------------------------------------------------------- /src/button/demos/block.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/button/demos/ghost.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 20 | -------------------------------------------------------------------------------- /src/button/demos/group.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 16 | -------------------------------------------------------------------------------- /src/button/demos/size.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 17 | -------------------------------------------------------------------------------- /src/button/demos/style/index.less: -------------------------------------------------------------------------------- 1 | .button-demo { 2 | padding: 0 16px; 3 | 4 | .t-button { 5 | margin-bottom: 16px; 6 | } 7 | } 8 | 9 | .margin-button { 10 | .t-button { 11 | margin-bottom: 16px; 12 | } 13 | } 14 | 15 | .margin-right { 16 | .t-button:not(:last-child) { 17 | margin-right: 16px; 18 | } 19 | } 20 | 21 | .no-border-radius { 22 | .t-button { 23 | border-radius: 0; 24 | } 25 | } 26 | 27 | .no-border { 28 | .t-button { 29 | border: 0; 30 | } 31 | } 32 | 33 | .flex { 34 | display: flex; 35 | } 36 | 37 | .align-center { 38 | flex-direction: row; 39 | align-items: center; 40 | } 41 | 42 | .align-bottom { 43 | display: flex; 44 | flex-direction: row; 45 | align-items: flex-end; 46 | } 47 | -------------------------------------------------------------------------------- /src/button/index.ts: -------------------------------------------------------------------------------- 1 | import _Button from './button'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdButtonProps } from './type'; 6 | 7 | export * from './type'; 8 | export type ButtonProps = TdButtonProps; 9 | 10 | export const Button = withInstall(_Button); 11 | export default Button; 12 | -------------------------------------------------------------------------------- /src/button/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/button/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/button/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/calendar/demos/custom-button.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 16 | -------------------------------------------------------------------------------- /src/calendar/demos/custom-range.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | -------------------------------------------------------------------------------- /src/calendar/demos/multiple.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 28 | -------------------------------------------------------------------------------- /src/calendar/demos/range.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /src/calendar/demos/without-popup.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/calendar/index.ts: -------------------------------------------------------------------------------- 1 | import _Calendar from './calendar'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdCalendarProps } from './type'; 6 | 7 | export * from './type'; 8 | export type CalendarProps = TdCalendarProps; 9 | 10 | export const Calendar: WithInstallType = withInstall(_Calendar); 11 | export default Calendar; 12 | -------------------------------------------------------------------------------- /src/calendar/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/calendar/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/calendar/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/calendar/template-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | import { TdCalendarProps } from './type'; 7 | import { PropType } from 'vue'; 8 | 9 | export default { 10 | /** 确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。 */ 11 | confirmBtn: { 12 | type: [String, Object, Function] as PropType, 13 | default: '', 14 | }, 15 | /** 标题,不传默认为“请选择日期” */ 16 | title: { 17 | type: [String, Function, Object] as PropType, 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /src/calendar/utils.ts: -------------------------------------------------------------------------------- 1 | export function getMonthByOffset(date: Date, offset: number) { 2 | const _date = new Date(date); 3 | _date.setMonth(_date.getMonth() + offset); 4 | _date.setDate(1); 5 | return _date; 6 | } 7 | 8 | export function getYearByOffset(date: Date, offset: number) { 9 | const _date = new Date(date); 10 | _date.setFullYear(_date.getFullYear() + offset); 11 | _date.setDate(1); 12 | return _date; 13 | } 14 | 15 | export const getPrevMonth = (date: Date) => getMonthByOffset(date, -1); 16 | export const getNextMonth = (date: Date) => getMonthByOffset(date, 1); 17 | export const getPrevYear = (date: Date) => getYearByOffset(date, -1); 18 | export const getNextYear = (date: Date) => getYearByOffset(date, 1); 19 | -------------------------------------------------------------------------------- /src/cascader/index.ts: -------------------------------------------------------------------------------- 1 | import _Cascader from './cascader'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdCascaderProps } from './type'; 6 | 7 | export * from './type'; 8 | export type CascaderProps = TdCascaderProps; 9 | 10 | export const Cascader: WithInstallType = withInstall(_Cascader); 11 | export default Cascader; 12 | -------------------------------------------------------------------------------- /src/cascader/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/cascader/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/cascader/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/cell/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import groupVue from '@/cell/demos/group.vue'; 7 | import mobileVue from '@/cell/demos/mobile.vue'; 8 | import multipleVue from '@/cell/demos/multiple.vue'; 9 | import singleVue from '@/cell/demos/single.vue'; 10 | 11 | const mapper = { 12 | groupVue, 13 | mobileVue, 14 | multipleVue, 15 | singleVue, 16 | }; 17 | 18 | describe('Cell', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Cell ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/cell/cell-group-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdCellGroupProps } from '../cell/type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 是否显示组边框 */ 12 | bordered: Boolean, 13 | /** 单元格组风格 */ 14 | theme: { 15 | type: String as PropType, 16 | default: 'default' as TdCellGroupProps['theme'], 17 | validator(val: TdCellGroupProps['theme']): boolean { 18 | if (!val) return true; 19 | return ['default', 'card'].includes(val); 20 | }, 21 | }, 22 | /** 单元格组标题 */ 23 | title: { 24 | type: String, 25 | default: '', 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /src/cell/demos/group.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /src/cell/index.ts: -------------------------------------------------------------------------------- 1 | import _Cell from './cell'; 2 | import _CellGroup from './cell-group'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdCellProps, TdCellGroupProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type CellProps = TdCellProps; 10 | export type CellGroupProps = TdCellGroupProps; 11 | 12 | export const Cell: WithInstallType = withInstall(_Cell); 13 | export const CellGroup: WithInstallType = withInstall(_CellGroup); 14 | export default Cell; 15 | -------------------------------------------------------------------------------- /src/cell/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/cell/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/cell/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/checkbox/__tests__/vitest-checkbox.test.jsx: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-unused-vars */ 2 | /** 3 | * 该文件由脚本自动生成,如需修改请联系 PMC 4 | * This file generated by scripts of tdesign-api. `npm run api:docs Checkbox Vue(Mobile) vitest,finalProject` 5 | * If you need to modify this file, contact PMC first please. 6 | */ 7 | -------------------------------------------------------------------------------- /src/checkbox/demos/all.vue: -------------------------------------------------------------------------------- 1 | 6 | 21 | -------------------------------------------------------------------------------- /src/checkbox/demos/card.vue: -------------------------------------------------------------------------------- 1 | 8 | 15 | -------------------------------------------------------------------------------- /src/checkbox/demos/right.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/checkbox/demos/status.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/checkbox/demos/type.vue: -------------------------------------------------------------------------------- 1 | 8 | 12 | -------------------------------------------------------------------------------- /src/checkbox/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './getOptions'; 2 | export * from './setCheckAllStatus'; 3 | -------------------------------------------------------------------------------- /src/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | import _Checkbox from './checkbox'; 2 | import _CheckboxGroup from './checkbox-group'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | 7 | import { TdCheckboxProps, TdCheckboxGroupProps } from './type'; 8 | 9 | export * from './type'; 10 | export type CheckboxProps = TdCheckboxProps; 11 | export type CheckboxGroupProps = TdCheckboxGroupProps; 12 | 13 | export const Checkbox: WithInstallType = withInstall(_Checkbox); 14 | export const CheckboxGroup: WithInstallType = withInstall(_CheckboxGroup); 15 | export default Checkbox; 16 | -------------------------------------------------------------------------------- /src/checkbox/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/checkbox/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/checkbox/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/collapse/demos/accordion.vue: -------------------------------------------------------------------------------- 1 | 17 | 25 | -------------------------------------------------------------------------------- /src/collapse/demos/action.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | -------------------------------------------------------------------------------- /src/collapse/demos/base.vue: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /src/collapse/demos/card.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | -------------------------------------------------------------------------------- /src/collapse/demos/placement.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /src/collapse/index.ts: -------------------------------------------------------------------------------- 1 | import _Collapse from './collapse'; 2 | import _CollapsePanel from './collapse-panel'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | 7 | import { TdCollapseProps, TdCollapsePanelProps } from './type'; 8 | 9 | export * from './type'; 10 | export type CollapseProps = TdCollapseProps; 11 | export type CollapsePanelProps = TdCollapsePanelProps; 12 | 13 | export const Collapse: WithInstallType = withInstall(_Collapse); 14 | export const CollapsePanel: WithInstallType = withInstall(_CollapsePanel); 15 | export default Collapse; 16 | -------------------------------------------------------------------------------- /src/collapse/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/collapse/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/collapse/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/collapse/util.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @description: 判断集合是否包含指定内容 3 | * @return 是否包含 | 位置索引 4 | */ 5 | export function findIndex(v: unknown, set: unknown): number { 6 | // 正则方式,辨别0='0' 7 | const reg = new RegExp(`^${!v && v !== 0 ? '' : v}$`); 8 | 9 | // 转数组统一处理 10 | const arr = toArray(set); 11 | return arr.findIndex((s) => reg.test(s)); 12 | } 13 | 14 | /** 15 | * @description: 判断是否假植 undefined|null|''等 16 | */ 17 | export function isFalsy(v: unknown): boolean { 18 | return !v && v !== 0; 19 | } 20 | 21 | /** 22 | * @description: 转化为数组 23 | */ 24 | export function toArray(v: unknown): any[] { 25 | if (isFalsy(v)) return []; 26 | if (typeof v === 'object') return Array.from(v as Iterable | ArrayLike); 27 | return [v]; 28 | } 29 | -------------------------------------------------------------------------------- /src/config-provider/config-provider.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent } from 'vue'; 2 | import config from '../config'; 3 | import props from './props'; 4 | import { provideConfig } from './useConfig'; 5 | import { useTNodeJSX } from '../hooks/tnode'; 6 | 7 | const { prefix } = config; 8 | const name = `${prefix}-config-provider`; 9 | 10 | export default defineComponent({ 11 | name, 12 | props, 13 | setup(props) { 14 | provideConfig(props); 15 | 16 | const renderTNodeJSX = useTNodeJSX(); 17 | 18 | return () => <>{renderTNodeJSX('default')}; 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /src/config-provider/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 21 | -------------------------------------------------------------------------------- /src/config-provider/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall } from '../shared'; 2 | import _ConfigProvider from './config-provider'; 3 | import { TdConfigProviderProps } from './type'; 4 | 5 | export * from './type'; 6 | export type ConfigProviderProps = TdConfigProviderProps; 7 | 8 | export const ConfigProvider = withInstall(_ConfigProvider); 9 | export default ConfigProvider; 10 | -------------------------------------------------------------------------------- /src/config-provider/props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdConfigProviderProps } from './type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 全局配置 */ 12 | globalConfig: { 13 | type: Object as PropType, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /src/config.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | prefix: 't', 3 | }; 4 | -------------------------------------------------------------------------------- /src/count-down/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/count-down/demos/base.vue'; 7 | import mobileVue from '@/count-down/demos/mobile.vue'; 8 | import sizeVue from '@/count-down/demos/size.vue'; 9 | 10 | const mapper = { 11 | baseVue, 12 | mobileVue, 13 | sizeVue, 14 | }; 15 | 16 | describe('CountDown', () => { 17 | Object.keys(mapper).forEach((demoName) => { 18 | it(`CountDown ${demoName} demo works fine`, () => { 19 | const wrapper = mount(mapper[demoName]); 20 | expect(wrapper.element).toMatchSnapshot(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/count-down/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /src/count-down/index.ts: -------------------------------------------------------------------------------- 1 | import _CountDown from './count-down'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdCountDownProps } from './type'; 6 | 7 | export * from './type'; 8 | export type CountDownProps = TdCountDownProps; 9 | 10 | export const CountDown: WithInstallType = withInstall(_CountDown); 11 | export default CountDown; 12 | -------------------------------------------------------------------------------- /src/count-down/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/count-down/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/count-down/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/date-time-picker/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 23 | -------------------------------------------------------------------------------- /src/date-time-picker/index.ts: -------------------------------------------------------------------------------- 1 | import _DateTimePicker from './date-time-picker'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | 6 | import { TdDateTimePickerProps } from './type'; 7 | 8 | export * from './type'; 9 | export type DateTimePickerProps = TdDateTimePickerProps; 10 | 11 | export const DateTimePicker: WithInstallType = withInstall(_DateTimePicker); 12 | export default DateTimePicker; 13 | -------------------------------------------------------------------------------- /src/date-time-picker/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/date-time-picker/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/date-time-picker/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/dialog/demos/plugin.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 18 | -------------------------------------------------------------------------------- /src/dialog/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/dialog/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/dialog/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/divider/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/divider/demos/base.vue'; 7 | import mobileVue from '@/divider/demos/mobile.vue'; 8 | import themeVue from '@/divider/demos/theme.vue'; 9 | 10 | const mapper = { 11 | baseVue, 12 | mobileVue, 13 | themeVue, 14 | }; 15 | 16 | describe('Divider', () => { 17 | Object.keys(mapper).forEach((demoName) => { 18 | it(`Divider ${demoName} demo works fine`, () => { 19 | const wrapper = mount(mapper[demoName]); 20 | expect(wrapper.element).toMatchSnapshot(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/divider/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 13 | 17 | 20 | -------------------------------------------------------------------------------- /src/divider/demos/theme.vue: -------------------------------------------------------------------------------- 1 | 10 | 18 | -------------------------------------------------------------------------------- /src/divider/index.ts: -------------------------------------------------------------------------------- 1 | import _Divider from './divider'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | 6 | import { TdDividerProps } from './type'; 7 | 8 | export * from './type'; 9 | export type DividerProps = TdDividerProps; 10 | 11 | export const Divider: WithInstallType = withInstall(_Divider); 12 | export default Divider; 13 | -------------------------------------------------------------------------------- /src/divider/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/divider/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/divider/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/divider/style/index.less: -------------------------------------------------------------------------------- 1 | .tdesign-mobile-demo { 2 | background-color: #fff; 3 | } 4 | -------------------------------------------------------------------------------- /src/divider/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TNode } from '../common'; 8 | 9 | export interface TdDividerProps { 10 | /** 11 | * 文本位置(仅在水平分割线有效) 12 | * @default center 13 | */ 14 | align?: 'left' | 'right' | 'center'; 15 | /** 16 | * 子元素 17 | */ 18 | content?: string | TNode; 19 | /** 20 | * 是否虚线(仅在水平分割线有效) 21 | * @default false 22 | */ 23 | dashed?: boolean; 24 | /** 25 | * 子元素,同 content 26 | */ 27 | default?: string | TNode; 28 | /** 29 | * 分隔线类型有两种:水平和垂直 30 | * @default horizontal 31 | */ 32 | layout?: 'horizontal' | 'vertical'; 33 | } 34 | -------------------------------------------------------------------------------- /src/drawer/demos/plugin.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 19 | -------------------------------------------------------------------------------- /src/drawer/index.ts: -------------------------------------------------------------------------------- 1 | import _Drawer from './drawer'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | 6 | import { TdDrawerProps } from './type'; 7 | 8 | export type DrawerProps = TdDrawerProps; 9 | 10 | export * from './type'; 11 | export * from './plugin'; 12 | export { default as DrawerPlugin } from './plugin'; 13 | 14 | export const Drawer: WithInstallType = withInstall(_Drawer); 15 | export default Drawer; 16 | -------------------------------------------------------------------------------- /src/drawer/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/drawer/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/drawer/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/dropdown-menu/demos/disabled.vue: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/dropdown-menu/index.ts: -------------------------------------------------------------------------------- 1 | import _DropdownMenu from './dropdown-menu'; 2 | import _DropdownItem from './dropdown-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | 7 | import { TdDropdownMenuProps, TdDropdownItemProps } from './type'; 8 | 9 | export * from './type'; 10 | export type DropdownMenuProps = TdDropdownMenuProps; 11 | export type DropdownItemProps = TdDropdownItemProps; 12 | 13 | export const DropdownMenu: WithInstallType = withInstall(_DropdownMenu); 14 | export const DropdownItem: WithInstallType = withInstall(_DropdownItem); 15 | export default DropdownMenu; 16 | -------------------------------------------------------------------------------- /src/dropdown-menu/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/dropdown-menu/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/dropdown-menu/v2/_index.less'; 2 | import '../../_common/style/mobile/components/dropdown-item/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/empty/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/empty/demos/base.vue'; 7 | import buttonEmptyVue from '@/empty/demos/buttonEmpty.vue'; 8 | import imageEmptyVue from '@/empty/demos/imageEmpty.vue'; 9 | import mobileVue from '@/empty/demos/mobile.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | buttonEmptyVue, 14 | imageEmptyVue, 15 | mobileVue, 16 | }; 17 | 18 | describe('Empty', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Empty ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/empty/demos/base.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/empty/demos/buttonEmpty.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 15 | -------------------------------------------------------------------------------- /src/empty/demos/imageEmpty.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/empty/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/empty/index.ts: -------------------------------------------------------------------------------- 1 | import _Empty from './empty'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdEmptyProps } from './type'; 6 | 7 | export * from './type'; 8 | export type EmptyProps = TdEmptyProps; 9 | 10 | export const Empty: WithInstallType = withInstall(_Empty); 11 | export default Empty; 12 | -------------------------------------------------------------------------------- /src/empty/props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdEmptyProps } from './type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 操作按钮 */ 12 | action: { 13 | type: Function as PropType, 14 | }, 15 | /** 描述文字 */ 16 | description: { 17 | type: [String, Function] as PropType, 18 | }, 19 | /** 图标 */ 20 | icon: { 21 | type: [String, Function] as PropType, 22 | }, 23 | /** 图片地址 */ 24 | image: { 25 | type: [String, Function] as PropType, 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /src/empty/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/empty/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/empty/_index.less'; 2 | -------------------------------------------------------------------------------- /src/empty/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TNode } from '../common'; 8 | 9 | export interface TdEmptyProps { 10 | /** 11 | * 操作按钮 12 | */ 13 | action?: TNode; 14 | /** 15 | * 描述文字 16 | */ 17 | description?: string | TNode; 18 | /** 19 | * 图标 20 | */ 21 | icon?: string | TNode; 22 | /** 23 | * 图片地址 24 | */ 25 | image?: string | TNode; 26 | } 27 | -------------------------------------------------------------------------------- /src/fab/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import advanceVue from '@/fab/demos/advance.vue'; 7 | import baseVue from '@/fab/demos/base.vue'; 8 | import mobileVue from '@/fab/demos/mobile.vue'; 9 | 10 | const mapper = { 11 | advanceVue, 12 | baseVue, 13 | mobileVue, 14 | }; 15 | 16 | describe('Fab', () => { 17 | Object.keys(mapper).forEach((demoName) => { 18 | it(`Fab ${demoName} demo works fine`, () => { 19 | const wrapper = mount(mapper[demoName]); 20 | expect(wrapper.element).toMatchSnapshot(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/fab/demos/advance.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 15 | -------------------------------------------------------------------------------- /src/fab/demos/base.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 15 | -------------------------------------------------------------------------------- /src/fab/index.ts: -------------------------------------------------------------------------------- 1 | import _Fab from './fab'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | 6 | export const Fab: WithInstallType = withInstall(_Fab); 7 | export default Fab; 8 | -------------------------------------------------------------------------------- /src/fab/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/fab/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/fab/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/footer/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/footer/demos/base.vue'; 7 | import linkVue from '@/footer/demos/link.vue'; 8 | import logoVue from '@/footer/demos/logo.vue'; 9 | import mobileVue from '@/footer/demos/mobile.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | linkVue, 14 | logoVue, 15 | mobileVue, 16 | }; 17 | 18 | describe('Footer', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Footer ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/footer/demos/base.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/footer/demos/logo.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /src/footer/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/footer/index.ts: -------------------------------------------------------------------------------- 1 | import _Footer from './footer'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdFooterProps } from './type'; 6 | 7 | export * from './type'; 8 | export type FooterProps = TdFooterProps; 9 | 10 | export const Footer: WithInstallType = withInstall(_Footer); 11 | export default Footer; 12 | -------------------------------------------------------------------------------- /src/footer/props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdFooterProps } from './type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 链接列表。name 表示链接名称, url 表示跳转链接,target 表示跳转方式,如:当前页面打开、新页面打开等,同 HTML 属性 target 含义相同 */ 12 | links: { 13 | type: Array as PropType, 14 | default: (): TdFooterProps['links'] => [], 15 | }, 16 | /** 图标配置。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接跳转地址,`logo.target` 表示跳转方式 */ 17 | logo: { 18 | type: Object as PropType, 19 | }, 20 | /** 版权信息 */ 21 | text: { 22 | type: String, 23 | default: '', 24 | }, 25 | }; 26 | -------------------------------------------------------------------------------- /src/footer/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/footer/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/footer/_index.less'; 2 | -------------------------------------------------------------------------------- /src/footer/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | export interface TdFooterProps { 8 | /** 9 | * 链接列表。name 表示链接名称, url 表示跳转链接,target 表示跳转方式,如:当前页面打开、新页面打开等,同 HTML 属性 target 含义相同 10 | * @default [] 11 | */ 12 | links?: Array; 13 | /** 14 | * 图标配置。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接跳转地址,`logo.target` 表示跳转方式 15 | */ 16 | logo?: FooterLogo; 17 | /** 18 | * 版权信息 19 | * @default '' 20 | */ 21 | text?: string; 22 | } 23 | 24 | export interface LinkObj { 25 | name: string; 26 | url?: string; 27 | target?: string; 28 | } 29 | 30 | export interface FooterLogo { 31 | icon: string; 32 | title?: string; 33 | url?: string; 34 | target?: string; 35 | } 36 | -------------------------------------------------------------------------------- /src/form/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import MockDate from 'mockdate'; 7 | 8 | import horizontalVue from '@/form/demos/horizontal.vue'; 9 | import mobileVue from '@/form/demos/mobile.vue'; 10 | import verticalVue from '@/form/demos/vertical.vue'; 11 | 12 | MockDate.set('2020-12-28'); 13 | 14 | const mapper = { 15 | horizontalVue, 16 | mobileVue, 17 | verticalVue, 18 | }; 19 | 20 | describe('Form', () => { 21 | Object.keys(mapper).forEach((demoName) => { 22 | it(`Form ${demoName} demo works fine`, () => { 23 | const wrapper = mount(mapper[demoName]); 24 | expect(wrapper.element).toMatchSnapshot(); 25 | }); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/form/index.ts: -------------------------------------------------------------------------------- 1 | import _Form from './form'; 2 | import _FormItem from './form-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdFormProps, TdFormItemProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type FormProps = TdFormProps; 10 | export type FormItemProps = TdFormItemProps; 11 | 12 | export const Form: WithInstallType = withInstall(_Form); 13 | export const FormItem: WithInstallType = withInstall(_FormItem); 14 | export default Form; 15 | -------------------------------------------------------------------------------- /src/form/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/form/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/form/_index.less'; 2 | -------------------------------------------------------------------------------- /src/grid/demos/badge.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 13 | -------------------------------------------------------------------------------- /src/grid/demos/desc.vue: -------------------------------------------------------------------------------- 1 | 12 | 15 | 20 | -------------------------------------------------------------------------------- /src/grid/demos/scroll.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 15 | -------------------------------------------------------------------------------- /src/grid/index.ts: -------------------------------------------------------------------------------- 1 | import _Grid from './grid'; 2 | import _GridItem from './grid-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import { TdGridItemProps, TdGridProps } from './type'; 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type GridProps = TdGridProps; 10 | export type GridItemProps = TdGridItemProps; 11 | 12 | export const Grid: WithInstallType = withInstall(_Grid); 13 | export const GridItem: WithInstallType = withInstall(_GridItem); 14 | export default Grid; 15 | -------------------------------------------------------------------------------- /src/grid/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/grid/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/grid/v2/_index.less'; 2 | import '../../_common/style/mobile/components/grid-item/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/guide/demos/dialog-body.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 28 | -------------------------------------------------------------------------------- /src/guide/index.ts: -------------------------------------------------------------------------------- 1 | import _Guide from './guide'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdGuideProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type GuideProps = TdGuideProps; 9 | 10 | export const Guide: WithInstallType = withInstall(_Guide); 11 | export default Guide; 12 | -------------------------------------------------------------------------------- /src/guide/interface.ts: -------------------------------------------------------------------------------- 1 | import { GuideStep } from './type'; 2 | 3 | export type GuideCrossProps = Pick< 4 | GuideStep, 5 | 'mode' | 'skipButtonProps' | 'nextButtonProps' | 'backButtonProps' | 'showOverlay' | 'highlightPadding' 6 | >; 7 | 8 | export interface ContentProps { 9 | handleNext: (e: MouseEvent) => void; 10 | handleSkip: (e: MouseEvent) => void; 11 | handleBack: (e: MouseEvent) => void; 12 | handleFinish: (e: MouseEvent) => void; 13 | current: number; 14 | total: number; 15 | } 16 | -------------------------------------------------------------------------------- /src/guide/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/guide/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/guide/_index.less'; 2 | -------------------------------------------------------------------------------- /src/guide/utils/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | getElmCssPropValue, 3 | isFixed, 4 | getRelativePosition, 5 | getTargetElm, 6 | scrollToParentVisibleArea, 7 | scrollToElm, 8 | } from './dom'; 9 | 10 | export { getElmCssPropValue, isFixed, getRelativePosition, getTargetElm, scrollToParentVisibleArea, scrollToElm }; 11 | -------------------------------------------------------------------------------- /src/hooks/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './icon'; 2 | export * from './tnode'; 3 | export * from './useClass'; 4 | export * from './useDefaultValue'; 5 | export * from './useLengthLimit'; 6 | export * from './useLockScroll'; 7 | export * from './useTeleport'; 8 | -------------------------------------------------------------------------------- /src/hooks/useClass.ts: -------------------------------------------------------------------------------- 1 | import { computed } from 'vue'; 2 | import { useConfig } from '../config-provider/useConfig'; 3 | 4 | export function usePrefixClass(componentName?: string) { 5 | const { classPrefix } = useConfig('classPrefix'); 6 | 7 | return computed(() => { 8 | return componentName ? `${classPrefix.value}-${componentName}` : classPrefix.value; 9 | }); 10 | } 11 | 12 | export { useConfig }; 13 | -------------------------------------------------------------------------------- /src/icon/index.ts: -------------------------------------------------------------------------------- 1 | import { Icon as _Icon } from 'tdesign-icons-vue-next'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | export const Icon: WithInstallType = withInstall(_Icon, 'TIcon'); 5 | export default Icon; 6 | -------------------------------------------------------------------------------- /src/image-viewer/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import alignVue from '@/image-viewer/demos/align.vue'; 7 | import baseVue from '@/image-viewer/demos/base.vue'; 8 | import mobileVue from '@/image-viewer/demos/mobile.vue'; 9 | import operationVue from '@/image-viewer/demos/operation.vue'; 10 | 11 | const mapper = { 12 | alignVue, 13 | baseVue, 14 | mobileVue, 15 | operationVue, 16 | }; 17 | 18 | describe('ImageViewer', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`ImageViewer ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/image-viewer/demos/align.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 27 | -------------------------------------------------------------------------------- /src/image-viewer/demos/base.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | -------------------------------------------------------------------------------- /src/image-viewer/demos/operation.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | -------------------------------------------------------------------------------- /src/image-viewer/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall, WithInstallType } from '../shared'; 2 | import _ImageViewer from './image-viewer'; 3 | 4 | import './style'; 5 | import { TdImageViewerProps } from './type'; 6 | 7 | export * from './type'; 8 | export type ImageViewerProps = TdImageViewerProps; 9 | 10 | export const ImageViewer: WithInstallType = withInstall(_ImageViewer); 11 | export default ImageViewer; 12 | -------------------------------------------------------------------------------- /src/image-viewer/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/image-viewer/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/image-viewer/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/image/__test__/__snapshots__/index.test.jsx.snap: -------------------------------------------------------------------------------- 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html 2 | 3 | exports[`Image > props > : lazy 1`] = ` 4 |
7 | 8 | 9 | 10 | 16 | 17 |
18 | `; 19 | -------------------------------------------------------------------------------- /src/image/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 22 | 23 | 28 | -------------------------------------------------------------------------------- /src/image/index.ts: -------------------------------------------------------------------------------- 1 | import _Image from './image'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdImageProps } from './type'; 6 | 7 | export * from './type'; 8 | export type ImageProps = TdImageProps; 9 | 10 | export const Image: WithInstallType = withInstall(_Image); 11 | export default Image; 12 | -------------------------------------------------------------------------------- /src/image/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/image/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/image/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/index-lib.ts: -------------------------------------------------------------------------------- 1 | import './style'; 2 | import tdesign from './index'; 3 | 4 | const ENV = process.env.NODE_ENV; 5 | if ( 6 | ENV !== 'test' && 7 | ENV !== 'production' && 8 | typeof console !== 'undefined' && 9 | console.warn && // eslint-disable-line no-console 10 | typeof window !== 'undefined' 11 | ) { 12 | // eslint-disable-next-line no-console 13 | console.warn('You are using a whole package of TDesign!'); 14 | } 15 | 16 | export * from './index'; 17 | export default tdesign; 18 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { App } from 'vue'; 2 | 3 | import * as components from './components'; 4 | 5 | const install = function (app: App, option?: Record): void { 6 | Object.keys(components).forEach((key) => { 7 | app.use(components[key as keyof typeof components], option); 8 | }); 9 | }; 10 | 11 | // eslint-disable-next-line no-undef 12 | const version = typeof __VERSION__ === 'undefined' ? '' : __VERSION__; 13 | 14 | export { install, version }; 15 | export * from './plugins'; 16 | export * from './components'; 17 | export * from './common'; 18 | export default { install, version }; 19 | -------------------------------------------------------------------------------- /src/indexes/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/indexes/demos/base.vue'; 7 | import customVue from '@/indexes/demos/custom.vue'; 8 | import mobileVue from '@/indexes/demos/mobile.vue'; 9 | 10 | const mapper = { 11 | baseVue, 12 | customVue, 13 | mobileVue, 14 | }; 15 | 16 | describe('Indexes', () => { 17 | Object.keys(mapper).forEach((demoName) => { 18 | it(`Indexes ${demoName} demo works fine`, () => { 19 | const wrapper = mount(mapper[demoName]); 20 | expect(wrapper.element).toMatchSnapshot(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/indexes/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall, WithInstallType } from '../shared'; 2 | import _Indexes from './indexes'; 3 | import _IndexesAnchor from './indexes-anchor'; 4 | 5 | import './style'; 6 | 7 | import { TdIndexesProps, TdIndexesAnchorProps } from './type'; 8 | 9 | export * from './type'; 10 | export type IndexesProps = TdIndexesProps; 11 | export type IndexesAnchorProps = TdIndexesAnchorProps; 12 | 13 | export const Indexes: WithInstallType = withInstall(_Indexes); 14 | export const IndexesAnchor: WithInstallType = withInstall(_IndexesAnchor); 15 | export default Indexes; 16 | -------------------------------------------------------------------------------- /src/indexes/indexes-anchor-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdIndexesAnchorProps } from '../indexes/type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 索引字符 */ 12 | index: { 13 | type: [String, Number] as PropType, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /src/indexes/props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdIndexesProps } from './type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 索引字符列表。不传默认 `A-Z` */ 12 | indexList: { 13 | type: Array as PropType, 14 | }, 15 | /** 索引是否吸顶,默认为true */ 16 | sticky: { 17 | type: Boolean, 18 | default: true, 19 | }, 20 | /** 锚点吸顶时与顶部的距离 */ 21 | stickyOffset: { 22 | type: Number, 23 | default: 0, 24 | }, 25 | /** 索引发生变更时触发事件 */ 26 | onChange: Function as PropType, 27 | /** 点击侧边栏时触发事件 */ 28 | onSelect: Function as PropType, 29 | }; 30 | -------------------------------------------------------------------------------- /src/indexes/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/indexes/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/indexes/v2/_index.less'; 2 | import '../../_common/style/mobile/components/indexes-anchor/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/indexes/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | export interface TdIndexesProps { 8 | /** 9 | * 索引字符列表。不传默认 `A-Z` 10 | */ 11 | indexList?: Array; 12 | /** 13 | * 索引是否吸顶,默认为true 14 | * @default true 15 | */ 16 | sticky?: Boolean; 17 | /** 18 | * 锚点吸顶时与顶部的距离 19 | * @default 0 20 | */ 21 | stickyOffset?: number; 22 | /** 23 | * 索引发生变更时触发事件 24 | */ 25 | onChange?: (index: string | number) => void; 26 | /** 27 | * 点击侧边栏时触发事件 28 | */ 29 | onSelect?: (index: string | number) => void; 30 | } 31 | 32 | export interface TdIndexesAnchorProps { 33 | /** 34 | * 索引字符 35 | */ 36 | index?: string | number; 37 | } 38 | -------------------------------------------------------------------------------- /src/input/demos/align.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/input/demos/banner.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 11 | -------------------------------------------------------------------------------- /src/input/demos/base.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /src/input/demos/custom.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 18 | -------------------------------------------------------------------------------- /src/input/demos/label.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/input/demos/layout.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /src/input/demos/maxLength.vue: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /src/input/demos/prefix.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /src/input/demos/status.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 12 | -------------------------------------------------------------------------------- /src/input/demos/suffix.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 22 | -------------------------------------------------------------------------------- /src/input/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall, WithInstallType } from '../shared'; 2 | import _Input from './input'; 3 | 4 | import './style'; 5 | import { TdInputProps } from './type'; 6 | 7 | export * from './type'; 8 | export type InputProps = TdInputProps; 9 | 10 | export const Input: WithInstallType = withInstall(_Input); 11 | export default Input; 12 | -------------------------------------------------------------------------------- /src/input/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/input/style/index.js: -------------------------------------------------------------------------------- 1 | // 新 2 | import '../../_common/style/mobile/components/input/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/layout/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/layout/demos/base.vue'; 7 | import mobileVue from '@/layout/demos/mobile.vue'; 8 | import offsetVue from '@/layout/demos/offset.vue'; 9 | 10 | const mapper = { 11 | baseVue, 12 | mobileVue, 13 | offsetVue, 14 | }; 15 | 16 | describe('Layout', () => { 17 | Object.keys(mapper).forEach((demoName) => { 18 | it(`Layout ${demoName} demo works fine`, () => { 19 | const wrapper = mount(mapper[demoName]); 20 | expect(wrapper.element).toMatchSnapshot(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/layout/col-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdColProps } from '../layout/type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 列的偏移量(默认单位px) */ 12 | offset: { 13 | type: [String, Number] as PropType, 14 | }, 15 | /** 列的宽度(默认单位px) */ 16 | span: { 17 | type: [String, Number] as PropType, 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /src/layout/constants.ts: -------------------------------------------------------------------------------- 1 | import { InjectionKey } from 'vue'; 2 | import { TdRowProps } from './type'; 3 | 4 | export const rowInjectionKey: InjectionKey<{ 5 | gutter: TdRowProps['gutter']; 6 | }> = Symbol('RowProvide'); 7 | -------------------------------------------------------------------------------- /src/layout/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 14 | 18 | 19 | 26 | -------------------------------------------------------------------------------- /src/layout/demos/offset.vue: -------------------------------------------------------------------------------- 1 | 14 | 32 | -------------------------------------------------------------------------------- /src/layout/index.ts: -------------------------------------------------------------------------------- 1 | import _Row from './row'; 2 | import _Col from './col'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdRowProps, TdColProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | 10 | export type RowProps = TdRowProps; 11 | export type ColProps = TdColProps; 12 | 13 | export const Row: WithInstallType = withInstall(_Row); 14 | export const Col: WithInstallType = withInstall(_Col); 15 | 16 | export default { 17 | Row, 18 | Col, 19 | }; 20 | -------------------------------------------------------------------------------- /src/layout/layout.en-US.md: -------------------------------------------------------------------------------- 1 | :: BASE_DOC :: 2 | 3 | ## API 4 | 5 | 6 | ### Row Props 7 | 8 | name | type | default | description | required 9 | -- | -- | -- | -- | -- 10 | gutter | String / Number | - | \- | N 11 | 12 | 13 | ### Col Props 14 | 15 | name | type | default | description | required 16 | -- | -- | -- | -- | -- 17 | offset | String / Number | - | \- | N 18 | span | String / Number | - | \- | N 19 | -------------------------------------------------------------------------------- /src/layout/layout.md: -------------------------------------------------------------------------------- 1 | :: BASE_DOC :: 2 | 3 | ## API 4 | 5 | 6 | ### Row Props 7 | 8 | 名称 | 类型 | 默认值 | 描述 | 必传 9 | -- | -- | -- | -- | -- 10 | gutter | String / Number | - | 列之间的间距(默认单位px) | N 11 | 12 | 13 | ### Col Props 14 | 15 | 名称 | 类型 | 默认值 | 描述 | 必传 16 | -- | -- | -- | -- | -- 17 | offset | String / Number | - | 列的偏移量(默认单位px) | N 18 | span | String / Number | - | 列的宽度(默认单位px) | N 19 | -------------------------------------------------------------------------------- /src/layout/row-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdRowProps } from '../layout/type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 列之间的间距(默认单位px) */ 12 | gutter: { 13 | type: [String, Number] as PropType, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /src/layout/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/layout/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/layout/_index.less'; 2 | -------------------------------------------------------------------------------- /src/layout/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | export interface TdRowProps { 8 | /** 9 | * 列之间的间距(默认单位px) 10 | */ 11 | gutter?: string | number; 12 | } 13 | 14 | export interface TdColProps { 15 | /** 16 | * 列的偏移量(默认单位px) 17 | */ 18 | offset?: string | number; 19 | /** 20 | * 列的宽度(默认单位px) 21 | */ 22 | span?: string | number; 23 | } 24 | -------------------------------------------------------------------------------- /src/link/demos/base.vue: -------------------------------------------------------------------------------- 1 | 7 | 15 | -------------------------------------------------------------------------------- /src/link/demos/prefix.vue: -------------------------------------------------------------------------------- 1 | 17 | 20 | 21 | 31 | -------------------------------------------------------------------------------- /src/link/demos/suffix.vue: -------------------------------------------------------------------------------- 1 | 17 | 20 | 30 | -------------------------------------------------------------------------------- /src/link/demos/underline.vue: -------------------------------------------------------------------------------- 1 | 7 | 12 | 22 | -------------------------------------------------------------------------------- /src/link/index.ts: -------------------------------------------------------------------------------- 1 | import _Link from './link'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdLinkProps } from './type'; 6 | 7 | export * from './type'; 8 | export type LinkProps = TdLinkProps; 9 | 10 | export const Link: WithInstallType = withInstall(_Link); 11 | export default Link; 12 | -------------------------------------------------------------------------------- /src/link/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/link/style/index.js: -------------------------------------------------------------------------------- 1 | // 新 2 | import '../../_common/style/mobile/components/link/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/list/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/list/demos/base.vue'; 7 | import errTipVue from '@/list/demos/err-tip.vue'; 8 | import mobileVue from '@/list/demos/mobile.vue'; 9 | import pullRefreshVue from '@/list/demos/pull-refresh.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | errTipVue, 14 | mobileVue, 15 | pullRefreshVue, 16 | }; 17 | 18 | describe('List', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`List ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/list/index.ts: -------------------------------------------------------------------------------- 1 | import _List from './list'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import { TdListProps } from './type'; 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type ListProps = TdListProps; 9 | 10 | export const List: WithInstallType = withInstall(_List); 11 | export default List; 12 | -------------------------------------------------------------------------------- /src/list/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/list/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/list/_index.less'; 2 | -------------------------------------------------------------------------------- /src/list/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TNode } from '../common'; 8 | 9 | export interface TdListProps { 10 | /** 11 | * 自定义加载中。值为空不显示加载中,值为 'loading' 显示加载中状态,值为 'load-more' 显示加载更多状态。值类型为函数,则表示自定义加载状态呈现内容 12 | */ 13 | asyncLoading?: string | TNode; 14 | /** 15 | * 底部 16 | */ 17 | footer?: string | TNode; 18 | /** 19 | * 头部 20 | */ 21 | header?: string | TNode; 22 | /** 23 | * 点击加载更多时触发 24 | */ 25 | onLoadMore?: () => void; 26 | /** 27 | * 列表滚动时触发,bottomDistance 表示底部距离;scrollTop 表示顶部滚动距离 28 | */ 29 | onScroll?: (bottomDistance: number, scrollTop: number) => void; 30 | } 31 | -------------------------------------------------------------------------------- /src/loading/demos/base.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/loading/demos/delay.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 17 | 18 | 30 | -------------------------------------------------------------------------------- /src/loading/demos/fullscreen.vue: -------------------------------------------------------------------------------- 1 | 10 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /src/loading/demos/horz.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /src/loading/demos/pure-text.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/loading/demos/speed.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 28 | -------------------------------------------------------------------------------- /src/loading/demos/vert.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 19 | -------------------------------------------------------------------------------- /src/loading/icon/spinner.tsx: -------------------------------------------------------------------------------- 1 | import { CSSProperties, PropType, defineComponent } from 'vue'; 2 | import config from '../../config'; 3 | 4 | import { usePrefixClass } from '../../hooks/useClass'; 5 | 6 | const { prefix } = config; 7 | 8 | export default defineComponent({ 9 | name: `${prefix}-spinner`, 10 | props: { 11 | style: Object as PropType, 12 | }, 13 | setup(props) { 14 | const spinnerClass = usePrefixClass('loading__spinner'); 15 | 16 | return () => ( 17 | 18 | {[...new Array(12)].map((_, index) => ( 19 | 20 | ))} 21 | 22 | ); 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /src/loading/index.ts: -------------------------------------------------------------------------------- 1 | import _Loading from './loading'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import { TdLoadingProps } from './type'; 5 | import './style'; 6 | 7 | export * from './type'; 8 | export * from './plugin'; 9 | export { default as LoadingPlugin } from './plugin'; 10 | 11 | export type LoadingProps = TdLoadingProps; 12 | 13 | export const Loading: WithInstallType = withInstall(_Loading); 14 | export default Loading; 15 | -------------------------------------------------------------------------------- /src/loading/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/loading/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/loading/_index.less'; 2 | -------------------------------------------------------------------------------- /src/locale/ar_KW.ts: -------------------------------------------------------------------------------- 1 | import arKW from '../_common/js/global-config/mobile/locale/ar_KW'; 2 | 3 | export default arKW; 4 | -------------------------------------------------------------------------------- /src/locale/en_US.ts: -------------------------------------------------------------------------------- 1 | import enUs from '../_common/js/global-config/mobile/locale/en_US'; 2 | 3 | export default enUs; 4 | -------------------------------------------------------------------------------- /src/locale/it_IT.ts: -------------------------------------------------------------------------------- 1 | import itIT from '../_common/js/global-config/mobile/locale/it_IT'; 2 | 3 | export default itIT; 4 | -------------------------------------------------------------------------------- /src/locale/ja_JP.ts: -------------------------------------------------------------------------------- 1 | import jaJP from '../_common/js/global-config/mobile/locale/ja_JP'; 2 | 3 | export default jaJP; 4 | -------------------------------------------------------------------------------- /src/locale/ko_KR.ts: -------------------------------------------------------------------------------- 1 | import koKR from '../_common/js/global-config/mobile/locale/ko_KR'; 2 | 3 | export default koKR; 4 | -------------------------------------------------------------------------------- /src/locale/ru_RU.ts: -------------------------------------------------------------------------------- 1 | import ruRU from '../_common/js/global-config/mobile/locale/ru_RU'; 2 | 3 | export default ruRU; 4 | -------------------------------------------------------------------------------- /src/locale/zh_CN.ts: -------------------------------------------------------------------------------- 1 | import zhCn from '../_common/js/global-config/mobile/locale/zh_CN'; 2 | 3 | export default zhCn; 4 | -------------------------------------------------------------------------------- /src/locale/zh_TW.ts: -------------------------------------------------------------------------------- 1 | import zh_TW from '../_common/js/global-config/mobile/locale/zh_TW'; 2 | 3 | export default zh_TW; 4 | -------------------------------------------------------------------------------- /src/message/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/message/demos/base.vue'; 7 | import closeAllVue from '@/message/demos/closeAll.vue'; 8 | import mobileVue from '@/message/demos/mobile.vue'; 9 | import themeVue from '@/message/demos/theme.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | closeAllVue, 14 | mobileVue, 15 | themeVue, 16 | }; 17 | 18 | describe('Message', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Message ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/message/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/message/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/message/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/navbar/demos/custom-color.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /src/navbar/demos/img.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | 17 | 27 | -------------------------------------------------------------------------------- /src/navbar/demos/search.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | 17 | 22 | -------------------------------------------------------------------------------- /src/navbar/index.ts: -------------------------------------------------------------------------------- 1 | import _Navbar from './navbar'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | 6 | import { TdNavbarProps } from './type'; 7 | 8 | export * from './type'; 9 | export type NavbarProps = TdNavbarProps; 10 | 11 | export const Navbar: WithInstallType = withInstall(_Navbar); 12 | export default Navbar; 13 | -------------------------------------------------------------------------------- /src/navbar/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/navbar/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/navbar/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/notice-bar/demos/base.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/notice-bar/demos/custom.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 15 | 16 | 27 | -------------------------------------------------------------------------------- /src/notice-bar/demos/customization.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /src/notice-bar/demos/iconDemo.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/notice-bar/demos/scrolling.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /src/notice-bar/demos/suffixIcon.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /src/notice-bar/demos/theme.vue: -------------------------------------------------------------------------------- 1 | 17 | -------------------------------------------------------------------------------- /src/notice-bar/index.ts: -------------------------------------------------------------------------------- 1 | import _NoticeBar from './notice-bar'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdNoticeBarProps } from './type'; 6 | 7 | export * from './type'; 8 | export type NoticeBarProps = TdNoticeBarProps; 9 | 10 | export const NoticeBar: WithInstallType = withInstall(_NoticeBar); 11 | export default NoticeBar; 12 | -------------------------------------------------------------------------------- /src/notice-bar/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/notice-bar/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/notice-bar/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/overlay/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/overlay/demos/base.vue'; 7 | import mobileVue from '@/overlay/demos/mobile.vue'; 8 | 9 | const mapper = { 10 | baseVue, 11 | mobileVue, 12 | }; 13 | 14 | describe('Overlay', () => { 15 | Object.keys(mapper).forEach((demoName) => { 16 | it(`Overlay ${demoName} demo works fine`, () => { 17 | const wrapper = mount(mapper[demoName]); 18 | expect(wrapper.element).toMatchSnapshot(); 19 | }); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/overlay/demos/base.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /src/overlay/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | 17 | 32 | -------------------------------------------------------------------------------- /src/overlay/index.ts: -------------------------------------------------------------------------------- 1 | import _Overlay from './overlay'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import { TdOverlayProps } from './type'; 5 | import './style'; 6 | 7 | export type OverlayProps = TdOverlayProps; 8 | 9 | export const Overlay: WithInstallType = withInstall(_Overlay); 10 | export default Overlay; 11 | -------------------------------------------------------------------------------- /src/overlay/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/overlay/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/overlay/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/picker/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 23 | -------------------------------------------------------------------------------- /src/picker/index.ts: -------------------------------------------------------------------------------- 1 | import _Picker from './picker'; 2 | import _Cascade from './cascade.vue'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | 7 | import { TdPickerProps } from './type'; 8 | 9 | export * from './type'; 10 | export type PickerProps = TdPickerProps; 11 | export const Picker: WithInstallType = withInstall(_Picker); 12 | export const Cascade: WithInstallType = withInstall(_Cascade); 13 | export default Picker; 14 | -------------------------------------------------------------------------------- /src/picker/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/picker/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/picker/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/plugins.ts: -------------------------------------------------------------------------------- 1 | export { DialogPlugin } from './dialog'; 2 | export { MessagePlugin } from './message'; 3 | export { ToastPlugin } from './toast'; 4 | export { DrawerPlugin } from './drawer'; 5 | export { LoadingPlugin } from './loading'; 6 | 7 | // 兼容原使用方式(2.x 移除) 8 | export { default as Dialog } from './dialog'; 9 | export { default as ActionSheet } from './action-sheet'; 10 | export { default as Message } from './message'; 11 | export { default as Toast } from './toast/plugin'; 12 | -------------------------------------------------------------------------------- /src/popover/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import mobileVue from '@/popover/demos/mobile.vue'; 7 | import placementVue from '@/popover/demos/placement.vue'; 8 | import themeVue from '@/popover/demos/theme.vue'; 9 | import typeVue from '@/popover/demos/type.vue'; 10 | 11 | const mapper = { 12 | mobileVue, 13 | placementVue, 14 | themeVue, 15 | typeVue, 16 | }; 17 | 18 | describe('Popover', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Popover ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/popover/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 21 | 22 | 27 | -------------------------------------------------------------------------------- /src/popover/index.ts: -------------------------------------------------------------------------------- 1 | import _Popover from './popover'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdPopoverProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type PopoverProps = TdPopoverProps; 9 | 10 | export const Popover: WithInstallType = withInstall(_Popover); 11 | export default Popover; 12 | -------------------------------------------------------------------------------- /src/popover/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/popover/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/popover/_index.less'; 2 | -------------------------------------------------------------------------------- /src/popup/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/popup/demos/base.vue'; 7 | import customCloseVue from '@/popup/demos/custom-close.vue'; 8 | import mobileVue from '@/popup/demos/mobile.vue'; 9 | import withTitleVue from '@/popup/demos/with-title.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | customCloseVue, 14 | mobileVue, 15 | withTitleVue, 16 | }; 17 | 18 | describe('Popup', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Popup ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/popup/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /src/popup/index.ts: -------------------------------------------------------------------------------- 1 | import _Popup from './popup'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdPopupProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type PopupProps = TdPopupProps; 9 | 10 | export const Popup: WithInstallType = withInstall(_Popup); 11 | export default Popup; 12 | -------------------------------------------------------------------------------- /src/popup/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/popup/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/popup/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/progress/demos/circle.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 25 | -------------------------------------------------------------------------------- /src/progress/demos/line.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 25 | -------------------------------------------------------------------------------- /src/progress/demos/plump.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 25 | -------------------------------------------------------------------------------- /src/progress/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall, WithInstallType } from '../shared'; 2 | import _Progress from './progress'; 3 | 4 | import './style'; 5 | 6 | import { TdProgressProps } from './type'; 7 | 8 | export * from './type'; 9 | export type ProgressProps = TdProgressProps; 10 | 11 | export const Progress: WithInstallType = withInstall(_Progress); 12 | export default Progress; 13 | -------------------------------------------------------------------------------- /src/progress/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/progress/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/progress/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/pull-down-refresh/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /src/pull-down-refresh/index.ts: -------------------------------------------------------------------------------- 1 | import _PullDownRefresh from './pull-down-refresh'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdPullDownRefreshProps } from './type'; 6 | 7 | export * from './type'; 8 | export type PullDownRefreshProps = TdPullDownRefreshProps; 9 | 10 | export const PullDownRefresh: WithInstallType = withInstall(_PullDownRefresh); 11 | export default PullDownRefresh; 12 | -------------------------------------------------------------------------------- /src/pull-down-refresh/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/pull-down-refresh/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/pull-down-refresh/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/radio/demos/card.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 20 | 21 | 28 | -------------------------------------------------------------------------------- /src/radio/demos/icon.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 11 | -------------------------------------------------------------------------------- /src/radio/demos/placement.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 13 | -------------------------------------------------------------------------------- /src/radio/demos/status.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 25 | 33 | -------------------------------------------------------------------------------- /src/radio/index.ts: -------------------------------------------------------------------------------- 1 | import _Radio from './radio'; 2 | import _RadioGroup from './radio-group'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | 7 | import { TdRadioProps, TdRadioGroupProps } from './type'; 8 | 9 | export * from './type'; 10 | export type RadioProps = TdRadioProps; 11 | export type RadioGroupProps = TdRadioGroupProps; 12 | 13 | export const RadioGroup = withInstall(_RadioGroup); 14 | 15 | export const Radio: WithInstallType = withInstall(_Radio); 16 | export default Radio; 17 | -------------------------------------------------------------------------------- /src/radio/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/radio/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/radio/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/rate/demos/count.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 13 | 14 | 30 | -------------------------------------------------------------------------------- /src/rate/index.ts: -------------------------------------------------------------------------------- 1 | import _Rate from './rate'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdRateProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type RateProps = TdRateProps; 9 | 10 | export const Rate: WithInstallType = withInstall(_Rate); 11 | export default Rate; 12 | -------------------------------------------------------------------------------- /src/rate/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/rate/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/rate/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/result/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import customVue from '@/result/demos/custom.vue'; 7 | import mobileVue from '@/result/demos/mobile.vue'; 8 | import themeVue from '@/result/demos/theme.vue'; 9 | 10 | const mapper = { 11 | customVue, 12 | mobileVue, 13 | themeVue, 14 | }; 15 | 16 | describe('Result', () => { 17 | Object.keys(mapper).forEach((demoName) => { 18 | it(`Result ${demoName} demo works fine`, () => { 19 | const wrapper = mount(mapper[demoName]); 20 | expect(wrapper.element).toMatchSnapshot(); 21 | }); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /src/result/demos/custom.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /src/result/index.ts: -------------------------------------------------------------------------------- 1 | import _Result from './result'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdResultProps } from './type'; 6 | 7 | export * from './type'; 8 | export type ResultProps = TdResultProps; 9 | 10 | export const Result: WithInstallType = withInstall(_Result); 11 | export default Result; 12 | -------------------------------------------------------------------------------- /src/result/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/result/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/result/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/result/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TNode } from '../common'; 8 | 9 | export interface TdResultProps { 10 | /** 11 | * 描述文字 12 | */ 13 | description?: string | TNode; 14 | /** 15 | * 图标名称 16 | */ 17 | icon?: TNode; 18 | /** 19 | * 图片地址 20 | */ 21 | image?: string | TNode; 22 | /** 23 | * 内置主题 24 | * @default default 25 | */ 26 | theme?: 'default' | 'success' | 'warning' | 'error'; 27 | /** 28 | * 标题 29 | * @default '' 30 | */ 31 | title?: string | TNode; 32 | } 33 | -------------------------------------------------------------------------------- /src/search/demos/max-length.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 16 | 22 | -------------------------------------------------------------------------------- /src/search/demos/other.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/search/demos/shape.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | 25 | -------------------------------------------------------------------------------- /src/search/index.ts: -------------------------------------------------------------------------------- 1 | import _Search from './search'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdSearchProps } from './type'; 6 | 7 | export * from './type'; 8 | export type SearchProps = TdSearchProps; 9 | 10 | export const Search: WithInstallType = withInstall(_Search); 11 | export default Search; 12 | -------------------------------------------------------------------------------- /src/search/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/search/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/search/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/shared/component.ts: -------------------------------------------------------------------------------- 1 | import { App, Component, Plugin, getCurrentInstance } from 'vue'; 2 | 3 | export type WithInstallType = T & Plugin; 4 | export const withInstall = (comp: T, alias?: string): T & Plugin => { 5 | const c = comp as T & Component & Plugin; 6 | 7 | c.install = (app: App, name?: string) => { 8 | const defaultName = c.name; 9 | app.component(alias || name || defaultName, comp); 10 | }; 11 | 12 | return c as T & Plugin; 13 | }; 14 | 15 | export default withInstall; 16 | 17 | export function extendAPI>(apis: T) { 18 | const instance = getCurrentInstance(); 19 | if (instance && instance.proxy) { 20 | Object.assign(instance.proxy, apis); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/shared/functions.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-empty-function */ 2 | /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ 3 | export const NOOP = () => {}; 4 | -------------------------------------------------------------------------------- /src/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './functions'; 2 | export * from './util'; 3 | export * from './component'; 4 | export * from './constants'; 5 | export * from './render'; 6 | export * from './dom'; 7 | export { default as TNode } from './render-tnode'; 8 | 9 | /* Vue3 use */ 10 | export * from './useToggle'; 11 | export * from './useCountDown'; 12 | export * from './useChildSlots'; 13 | export * from './useTouch'; 14 | export * from './useScrollParent'; 15 | export * from './useExpose'; 16 | export * from './useTest'; 17 | export * from './useClickAway'; 18 | export * from './useGesture'; 19 | 20 | /* directives */ 21 | export { default as Hover } from './hover'; 22 | -------------------------------------------------------------------------------- /src/shared/render-tnode.ts: -------------------------------------------------------------------------------- 1 | const TNodeComponent = (props: { content: any }) => props.content; 2 | TNodeComponent.props = ['content']; 3 | export default TNodeComponent; 4 | -------------------------------------------------------------------------------- /src/shared/useExpose/index.ts: -------------------------------------------------------------------------------- 1 | import { getCurrentInstance } from 'vue'; 2 | 3 | // expose public api 4 | export function useExpose>(apis: T) { 5 | const instance = getCurrentInstance(); 6 | if (instance) { 7 | Object.assign(instance.proxy as object, apis); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/shared/useTest/index.ts: -------------------------------------------------------------------------------- 1 | import { sleep } from '../util'; 2 | 3 | /** 4 | * 测试相关的工具方法 5 | */ 6 | export function useTestUtils() { 7 | const makeScroll = async (dom: Element, name: 'scrollTop' | 'scrollLeft', offset: number) => { 8 | const eventTarget = dom === document.documentElement ? window : dom; 9 | dom[name] = offset; 10 | const evt = new CustomEvent('scroll', { 11 | detail: { 12 | target: { 13 | [name]: offset, 14 | }, 15 | }, 16 | }); 17 | eventTarget.dispatchEvent(evt); 18 | // must use setTimeout instead of nextTick to wait dom change 19 | await sleep(0); 20 | }; 21 | 22 | return { makeScroll, sleep }; 23 | } 24 | -------------------------------------------------------------------------------- /src/side-bar/index.ts: -------------------------------------------------------------------------------- 1 | import _SideBar from './side-bar'; 2 | import _SideBarItem from './side-bar-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdSideBarProps, TdSideBarItemProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | 10 | export type SideBarProps = TdSideBarProps; 11 | export type SideBarItemProps = TdSideBarItemProps; 12 | 13 | export const SideBar: WithInstallType = withInstall(_SideBar); 14 | export const SideBarItem: WithInstallType = withInstall(_SideBarItem); 15 | export default SideBar; 16 | -------------------------------------------------------------------------------- /src/side-bar/props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdSideBarProps } from './type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 选项值 */ 12 | value: { 13 | type: [String, Number] as PropType, 14 | default: undefined, 15 | }, 16 | modelValue: { 17 | type: [String, Number] as PropType, 18 | default: undefined, 19 | }, 20 | /** 选项值,非受控属性 */ 21 | defaultValue: { 22 | type: [String, Number] as PropType, 23 | }, 24 | /** 选项值发生变化时触发 */ 25 | onChange: Function as PropType, 26 | /** 点击选项时触发 */ 27 | onClick: Function as PropType, 28 | }; 29 | -------------------------------------------------------------------------------- /src/side-bar/side-bar-item-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdSideBarItemProps } from '../side-bar/type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 透传至 Badge 组件 */ 12 | badgeProps: { 13 | type: Object as PropType, 14 | }, 15 | /** 是否禁用 */ 16 | disabled: Boolean, 17 | /** 图标 */ 18 | icon: { 19 | type: Function as PropType, 20 | }, 21 | /** 展示的标签 */ 22 | label: { 23 | type: String, 24 | default: '', 25 | }, 26 | /** 当前选项的值 */ 27 | value: { 28 | type: [String, Number] as PropType, 29 | }, 30 | }; 31 | -------------------------------------------------------------------------------- /src/side-bar/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/side-bar/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/side-bar/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/skeleton/demos/image-group.vue: -------------------------------------------------------------------------------- 1 | 7 | 13 | 20 | -------------------------------------------------------------------------------- /src/skeleton/index.ts: -------------------------------------------------------------------------------- 1 | import _Skeleton from './skeleton'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import { TdSkeletonProps } from './type'; 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type SkeletonProps = TdSkeletonProps; 9 | 10 | export const Skeleton: WithInstallType = withInstall(_Skeleton); 11 | export default Skeleton; 12 | -------------------------------------------------------------------------------- /src/skeleton/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/skeleton/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/skeleton/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/slider/demos/base.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/slider/demos/disabled.vue: -------------------------------------------------------------------------------- 1 | 14 | 24 | 31 | -------------------------------------------------------------------------------- /src/slider/demos/label.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 22 | 23 | 30 | -------------------------------------------------------------------------------- /src/slider/demos/range.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | 17 | 23 | -------------------------------------------------------------------------------- /src/slider/index.ts: -------------------------------------------------------------------------------- 1 | import _Slider from './slider'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdSliderProps } from './type'; 6 | 7 | export * from './type'; 8 | export type SliderProps = TdSliderProps; 9 | 10 | export const Slider: WithInstallType = withInstall(_Slider); 11 | export default Slider; 12 | -------------------------------------------------------------------------------- /src/slider/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/slider/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/slider/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/stepper/demos/base.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | 21 | -------------------------------------------------------------------------------- /src/stepper/demos/size.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | 19 | 28 | -------------------------------------------------------------------------------- /src/stepper/demos/status.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 13 | -------------------------------------------------------------------------------- /src/stepper/demos/theme.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /src/stepper/index.ts: -------------------------------------------------------------------------------- 1 | import _Stepper from './stepper'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdStepperProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type StepperProps = TdStepperProps; 9 | 10 | export const Stepper: WithInstallType = withInstall(_Stepper); 11 | export default Stepper; 12 | -------------------------------------------------------------------------------- /src/stepper/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/stepper/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/stepper/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/steps/index.ts: -------------------------------------------------------------------------------- 1 | import _Steps from './steps'; 2 | import _StepItem from './step-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdStepsProps, TdStepItemProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type StepItemProps = TdStepItemProps; 10 | export type StepsProps = TdStepsProps; 11 | 12 | export const StepItem: WithInstallType = withInstall(_StepItem); 13 | export const Steps: WithInstallType = withInstall(_Steps); 14 | export default Steps; 15 | -------------------------------------------------------------------------------- /src/steps/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/steps/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/steps/v2/_index.less'; 2 | import '../../_common/style/mobile/components/step-item/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/sticky/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/sticky/demos/base.vue'; 7 | import containerVue from '@/sticky/demos/container.vue'; 8 | import mobileVue from '@/sticky/demos/mobile.vue'; 9 | import offsetVue from '@/sticky/demos/offset.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | containerVue, 14 | mobileVue, 15 | offsetVue, 16 | }; 17 | 18 | describe('Sticky', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`Sticky ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/sticky/demos/base.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /src/sticky/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 23 | 28 | -------------------------------------------------------------------------------- /src/sticky/demos/offset.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | -------------------------------------------------------------------------------- /src/sticky/index.ts: -------------------------------------------------------------------------------- 1 | import _Sticky from './sticky'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdStickyProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type StickyProps = TdStickyProps; 9 | 10 | export const Sticky: WithInstallType = withInstall(_Sticky); 11 | export default Sticky; 12 | -------------------------------------------------------------------------------- /src/sticky/props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdStickyProps } from './type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 指定容器对应的NodesRef节点为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置 */ 12 | container: { 13 | type: Object as PropType, 14 | }, 15 | /** 是否禁用组件 */ 16 | disabled: Boolean, 17 | /** 吸顶时与顶部的距离,单位`px` */ 18 | offsetTop: { 19 | type: [String, Number] as PropType, 20 | default: 0, 21 | }, 22 | /** 吸顶时的 z-index */ 23 | zIndex: { 24 | type: Number, 25 | default: 99, 26 | }, 27 | /** 滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶 */ 28 | onScroll: Function as PropType, 29 | }; 30 | -------------------------------------------------------------------------------- /src/sticky/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/sticky/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/sticky/_index.less'; 2 | -------------------------------------------------------------------------------- /src/sticky/type.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | export interface TdStickyProps { 8 | /** 9 | * 指定容器对应的NodesRef节点为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置 10 | */ 11 | container?: Element; 12 | /** 13 | * 是否禁用组件 14 | * @default false 15 | */ 16 | disabled?: boolean; 17 | /** 18 | * 吸顶时与顶部的距离,单位`px` 19 | * @default 0 20 | */ 21 | offsetTop?: string | number; 22 | /** 23 | * 吸顶时的 z-index 24 | * @default 99 25 | */ 26 | zIndex?: number; 27 | /** 28 | * 滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶 29 | */ 30 | onScroll?: (context: { scrollTop: number; isFixed: boolean }) => void; 31 | } 32 | -------------------------------------------------------------------------------- /src/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/style/index.js: -------------------------------------------------------------------------------- 1 | import '../_common/style/mobile/_global.less'; 2 | 3 | // theme(用于换肤) 4 | import '../_common/style/mobile/theme/_index.less'; 5 | -------------------------------------------------------------------------------- /src/swipe-cell/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 20 | -------------------------------------------------------------------------------- /src/swipe-cell/demos/right.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 19 | -------------------------------------------------------------------------------- /src/swipe-cell/index.ts: -------------------------------------------------------------------------------- 1 | import _SwipeCell from './swipe-cell'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdSwipeCellProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type SwipeCellProps = TdSwipeCellProps; 9 | 10 | export const SwipeCell: WithInstallType = withInstall(_SwipeCell); 11 | export default SwipeCell; 12 | -------------------------------------------------------------------------------- /src/swipe-cell/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/swipe-cell/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/swipe-cell/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/swiper/demos/custom.vue: -------------------------------------------------------------------------------- 1 | 10 | 24 | -------------------------------------------------------------------------------- /src/swiper/index.ts: -------------------------------------------------------------------------------- 1 | import _Swiper from './swiper'; 2 | import _SwiperItem from './swiper-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdSwiperProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type SwiperProps = TdSwiperProps; 10 | 11 | export const Swiper: WithInstallType = withInstall(_Swiper); 12 | export const SwiperItem: WithInstallType = withInstall(_SwiperItem); 13 | export default Swiper; 14 | -------------------------------------------------------------------------------- /src/swiper/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/swiper/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/swiper/v2/_index.less'; 2 | import '../../_common/style/mobile/components/swiper-nav/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/switch/demos/base.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /src/switch/demos/color.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /src/switch/demos/label.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 21 | -------------------------------------------------------------------------------- /src/switch/demos/size.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /src/switch/index.ts: -------------------------------------------------------------------------------- 1 | import _Switch from './switch'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdSwitchProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type SwitchProps = TdSwitchProps; 9 | 10 | export const Switch: WithInstallType = withInstall(_Switch); 11 | export default Switch; 12 | -------------------------------------------------------------------------------- /src/switch/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/switch/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/switch/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/tab-bar/demos/base.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 24 | -------------------------------------------------------------------------------- /src/tab-bar/demos/pure-icon.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | -------------------------------------------------------------------------------- /src/tab-bar/demos/round.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | -------------------------------------------------------------------------------- /src/tab-bar/index.ts: -------------------------------------------------------------------------------- 1 | import _TabBar from './tab-bar'; 2 | import _TabBarItem from './tab-bar-item'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdTabBarProps, TdTabBarItemProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type TabBarProps = TdTabBarProps; 10 | export type TabBarItemProps = TdTabBarItemProps; 11 | 12 | export const TabBar: WithInstallType = withInstall(_TabBar); 13 | export const TabBarItem: WithInstallType = withInstall(_TabBarItem); 14 | export default TabBar; 15 | -------------------------------------------------------------------------------- /src/tab-bar/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/tab-bar/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/tab-bar/v2/_index.less'; 2 | import '../../_common/style/mobile/components/tab-bar-item/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/tab-bar/tab-bar-item-props.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | 3 | /** 4 | * 该文件为脚本自动生成文件,请勿随意修改。如需修改请联系 PMC 5 | * */ 6 | 7 | import { TdTabBarItemProps } from '../tab-bar/type'; 8 | import { PropType } from 'vue'; 9 | 10 | export default { 11 | /** 图标右上角提示信息 */ 12 | badgeProps: { 13 | type: Object as PropType, 14 | }, 15 | /** 图标名称 */ 16 | icon: { 17 | type: Function as PropType, 18 | }, 19 | /** 二级菜单 */ 20 | subTabBar: { 21 | type: Array as PropType, 22 | }, 23 | /** 标识符 */ 24 | value: { 25 | type: [String, Number] as PropType, 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /src/tab-bar/useTabBar.ts: -------------------------------------------------------------------------------- 1 | import { getCurrentInstance, Ref } from 'vue'; 2 | 3 | export const initName = (defaultIndex: Ref): number | string | unknown => { 4 | const index = defaultIndex; 5 | const instance = getCurrentInstance(); 6 | if (typeof instance?.props?.value !== 'undefined') { 7 | return instance?.props?.value; 8 | } 9 | index.value += 1; 10 | return index.value; 11 | }; 12 | -------------------------------------------------------------------------------- /src/table/index.ts: -------------------------------------------------------------------------------- 1 | import BaseTable from './base-table'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | 4 | import './style'; 5 | import { TdBaseTableProps } from './type'; 6 | 7 | export type TableProps = TdBaseTableProps; 8 | 9 | export * from './type'; 10 | export * from './interface'; 11 | 12 | export const Table: WithInstallType = withInstall(BaseTable, 'TTable'); 13 | export default Table; 14 | -------------------------------------------------------------------------------- /src/table/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/table/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/table/_index.less'; 2 | -------------------------------------------------------------------------------- /src/tabs/demos/badge.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /src/tabs/demos/status.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 18 | -------------------------------------------------------------------------------- /src/tabs/index.ts: -------------------------------------------------------------------------------- 1 | import _Tabs from './tabs'; 2 | import _TabPanel from './tab-panel'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | 5 | import './style'; 6 | import { TdTabPanelProps, TdTabsProps } from './type'; 7 | 8 | export * from './type'; 9 | export type TabsProps = TdTabsProps; 10 | export type TabPanelProps = TdTabPanelProps; 11 | 12 | export const Tabs: WithInstallType = withInstall(_Tabs); 13 | export const TabPanel: WithInstallType = withInstall(_TabPanel); 14 | export default Tabs; 15 | -------------------------------------------------------------------------------- /src/tabs/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/tabs/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/tabs/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/tabs/tab-nav-item.tsx: -------------------------------------------------------------------------------- 1 | import { defineComponent } from 'vue'; 2 | import config from '../config'; 3 | import TabPanelProps from './tab-panel-props'; 4 | import { useContent, useTNodeJSX } from '../hooks/tnode'; 5 | 6 | const { prefix } = config; 7 | 8 | export default defineComponent({ 9 | name: `${prefix}-tab-nav`, 10 | props: { 11 | label: TabPanelProps.label, 12 | icon: TabPanelProps.icon, 13 | }, 14 | setup(props) { 15 | const renderTNodeJSX = useTNodeJSX(); 16 | const renderTNodeContent = useContent(); 17 | 18 | return () => ( 19 |
20 | {renderTNodeJSX('icon')} 21 | {renderTNodeContent('default', 'label')} 22 |
23 | ); 24 | }, 25 | }); 26 | -------------------------------------------------------------------------------- /src/tag/demos/closable.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 25 | -------------------------------------------------------------------------------- /src/tag/index.ts: -------------------------------------------------------------------------------- 1 | import _Tag from './tag'; 2 | import _CheckTag from './check-tag'; 3 | import { withInstall, WithInstallType } from '../shared'; 4 | import { TdCheckTagProps, TdTagProps } from './type'; 5 | 6 | import './style'; 7 | 8 | export * from './type'; 9 | export type CheckTagProps = TdCheckTagProps; 10 | export type TagProps = TdTagProps; 11 | 12 | export const Tag: WithInstallType = withInstall(_Tag); 13 | export const CheckTag: WithInstallType = withInstall(_CheckTag); 14 | export default Tag; 15 | -------------------------------------------------------------------------------- /src/tag/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/tag/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/tag/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/textarea/demos/autosize.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/textarea/demos/base.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /src/textarea/demos/custom.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 25 | -------------------------------------------------------------------------------- /src/textarea/demos/disabled.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /src/textarea/demos/label.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/textarea/demos/maxcharacter.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/textarea/demos/maxlength.vue: -------------------------------------------------------------------------------- 1 | 4 | 9 | -------------------------------------------------------------------------------- /src/textarea/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall, WithInstallType } from '../shared'; 2 | import _Textarea from './textarea'; 3 | 4 | import './style'; 5 | 6 | import { TdTextareaProps } from './type'; 7 | 8 | export * from './type'; 9 | export type TextareaProps = TdTextareaProps; 10 | 11 | export const Textarea: WithInstallType = withInstall(_Textarea); 12 | export default Textarea; 13 | -------------------------------------------------------------------------------- /src/textarea/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/textarea/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/textarea/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /src/toast/demos/close.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 27 | -------------------------------------------------------------------------------- /src/toast/demos/cover.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 26 | -------------------------------------------------------------------------------- /src/toast/index.ts: -------------------------------------------------------------------------------- 1 | // import { withInstall, WithInstallType } from '../shared'; 2 | import _Toast from './toast'; 3 | 4 | import './style'; 5 | 6 | import { TdToastProps } from './type'; 7 | 8 | export * from './type'; 9 | export type ToastProps = TdToastProps; 10 | 11 | export { default as ToastPlugin } from './plugin'; 12 | 13 | // Toast 与 Plugin函数名称冲突,暂不导出 14 | // export const Toast: WithInstallType = withInstall(_Toast); 15 | // export default Toast; 16 | -------------------------------------------------------------------------------- /src/toast/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/toast/style/index.js: -------------------------------------------------------------------------------- 1 | // import '../../_common/style/mobile/components/toast/_index.less'; 2 | import '../../_common/style/mobile/components/toast/v2/_index.less'; 3 | -------------------------------------------------------------------------------- /src/tree-select/__test__/demo.test.jsx: -------------------------------------------------------------------------------- 1 | /** 2 | * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖 3 | */ 4 | 5 | import { mount } from '@vue/test-utils'; 6 | import baseVue from '@/tree-select/demos/base.vue'; 7 | import mobileVue from '@/tree-select/demos/mobile.vue'; 8 | import multipleVue from '@/tree-select/demos/multiple.vue'; 9 | import normalVue from '@/tree-select/demos/normal.vue'; 10 | 11 | const mapper = { 12 | baseVue, 13 | mobileVue, 14 | multipleVue, 15 | normalVue, 16 | }; 17 | 18 | describe('TreeSelect', () => { 19 | Object.keys(mapper).forEach((demoName) => { 20 | it(`TreeSelect ${demoName} demo works fine`, () => { 21 | const wrapper = mount(mapper[demoName]); 22 | expect(wrapper.element).toMatchSnapshot(); 23 | }); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/tree-select/demos/mobile.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | -------------------------------------------------------------------------------- /src/tree-select/index.ts: -------------------------------------------------------------------------------- 1 | import _TreeSelect from './tree-select'; 2 | import { withInstall, WithInstallType } from '../shared'; 3 | import { TdTreeSelectProps } from './type'; 4 | 5 | import './style'; 6 | 7 | export * from './type'; 8 | export type TreeSelectProps = TdTreeSelectProps; 9 | 10 | export const TreeSelect: WithInstallType = withInstall(_TreeSelect); 11 | export default TreeSelect; 12 | -------------------------------------------------------------------------------- /src/tree-select/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/tree-select/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/tree-select/_index.less'; 2 | -------------------------------------------------------------------------------- /src/upload/index.ts: -------------------------------------------------------------------------------- 1 | import { withInstall, WithInstallType } from '../shared'; 2 | import _Upload from './upload'; 3 | 4 | import './style'; 5 | 6 | import { TdUploadProps } from './type'; 7 | 8 | export * from './type'; 9 | export type UploadProps = TdUploadProps; 10 | 11 | export const Upload: WithInstallType = withInstall(_Upload); 12 | export default Upload; 13 | -------------------------------------------------------------------------------- /src/upload/interface.ts: -------------------------------------------------------------------------------- 1 | import { TdUploadProps } from './type'; 2 | import { 3 | XhrOptions, 4 | InnerProgressContext, 5 | HTMLInputEvent, 6 | FlowRemoveContext, 7 | UploadRemoveOptions, 8 | SuccessContext, 9 | } from '../_common/js/upload/types'; 10 | 11 | export type UploadProps = TdUploadProps; 12 | export * from './type'; 13 | 14 | export type { 15 | XhrOptions, 16 | HTMLInputEvent, 17 | InnerProgressContext, 18 | SuccessContext, 19 | UploadRemoveOptions, 20 | FlowRemoveContext, 21 | }; 22 | -------------------------------------------------------------------------------- /src/upload/style/css.js: -------------------------------------------------------------------------------- 1 | import './index.css'; 2 | -------------------------------------------------------------------------------- /src/upload/style/index.js: -------------------------------------------------------------------------------- 1 | import '../../_common/style/mobile/components/upload/v2/_index.less'; 2 | -------------------------------------------------------------------------------- /tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig", 3 | "exclude": ["node_modules", "src/**/demos", "src/_common", "dist", "es", "esm", "lib", "cjs", "site", "global.d.ts"] 4 | } 5 | --------------------------------------------------------------------------------