├── src ├── utils │ ├── index.ts │ └── events.ts ├── styles │ ├── functions.scss │ ├── _vars.scss │ ├── common.scss │ └── mixin.scss ├── assets │ └── logo.png ├── components │ ├── cc-icon │ │ ├── uni.ttf │ │ ├── cc-icon.vue │ │ └── icons.ts │ ├── cc-gap │ │ └── cc-gap.vue │ ├── cc-link │ │ └── cc-link.vue │ ├── cc-layout │ │ ├── cc-row.vue │ │ └── cc-col.vue │ ├── cc-sticky │ │ └── cc-sticky.vue │ ├── cc-form │ │ ├── cc-form.vue │ │ └── types.ts │ ├── cc-coupon-cell │ │ └── cc-coupon-cell.vue │ ├── cc-load-more │ │ └── cc-load-more.vue │ ├── cc-avatar │ │ └── cc-avatar.vue │ ├── cc-circle-progress │ │ └── cc-circle-progress.vue │ ├── cc-divider │ │ └── cc-divider.vue │ ├── cc-mask │ │ └── cc-mask.vue │ ├── cc-countup │ │ └── cc-countup.vue │ ├── cc-badge │ │ └── cc-badge.vue │ ├── cc-skeleton │ │ └── cc-skeleton.vue │ ├── cc-contact-card │ │ └── cc-contact-card.vue │ ├── cc-open-more │ │ └── cc-open-more.vue │ ├── cc-rate │ │ └── cc-rate.vue │ ├── cc-notify │ │ └── cc-notify.vue │ ├── cc-pull-refresh │ │ └── cc-pull-refresh.vue │ ├── cc-swipe-cell │ │ └── cc-swipe-cell.vue │ ├── cc-tabs │ │ └── cc-tabs.vue │ ├── cc-switch │ │ └── cc-switch.vue │ ├── cc-verify-button │ │ └── cc-verify-button.vue │ ├── cc-submit-bar │ │ └── cc-submit-bar.vue │ ├── cc-grid │ │ └── cc-grid.vue │ ├── cc-area │ │ └── cc-area.vue │ ├── cc-sidebar │ │ └── cc-sidebar.vue │ ├── cc-cell │ │ └── cc-cell.vue │ ├── cc-loading │ │ └── cc-loading.vue │ ├── cc-contact-list │ │ └── cc-contact-list.vue │ └── cc-nav-bar │ │ └── cc-nav-bar.vue ├── App.vue ├── main.ts ├── shims-vue.d.ts ├── views │ ├── area │ │ └── index.vue │ ├── pullRefresh │ │ └── index.vue │ ├── link │ │ └── index.vue │ ├── calendar │ │ └── index.vue │ ├── swipeCell │ │ └── index.vue │ ├── tabs │ │ └── index.vue │ ├── demo │ │ ├── my.vue │ │ ├── cart.vue │ │ └── category.vue │ ├── sticky │ │ └── index.vue │ ├── gap │ │ └── index.vue │ ├── imagePreview │ │ └── index.vue │ ├── addressList │ │ └── index.vue │ ├── addressEdit │ │ └── index.vue │ ├── upload │ │ └── index.vue │ ├── loadMore │ │ └── index.vue │ ├── contactCard │ │ └── index.vue │ ├── swiper │ │ └── index.vue │ ├── contactList │ │ └── index.vue │ ├── circleProgress │ │ └── index.vue │ ├── submitBar │ │ └── index.vue │ ├── mask │ │ └── index.vue │ ├── rate │ │ └── index.vue │ ├── countdown │ │ └── index.vue │ ├── form │ │ └── index.vue │ ├── goodsCard │ │ └── index.vue │ ├── divider │ │ └── index.vue │ ├── loading │ │ └── index.vue │ ├── progress │ │ └── index.vue │ ├── skeleton │ │ └── index.vue │ ├── coupon │ │ └── index.vue │ ├── switch │ │ └── index.vue │ ├── numberKeyboard │ │ └── index.vue │ ├── verifyButton │ │ └── index.vue │ ├── noticeBar │ │ └── index.vue │ ├── avatar │ │ └── index.vue │ ├── passwordInput │ │ └── index.vue │ ├── cell │ │ └── index.vue │ ├── sidebar │ │ └── index.vue │ ├── navBar │ │ └── index.vue │ ├── notify │ │ └── index.vue │ ├── goodsAction │ │ └── index.vue │ ├── stepper │ │ └── index.vue │ ├── grid │ │ └── index.vue │ ├── slider │ │ └── index.vue │ ├── collapse │ │ └── index.vue │ ├── checker │ │ └── index.vue │ ├── search │ │ └── index.vue │ ├── treeSelect │ │ └── index.vue │ ├── openMore │ │ └── index.vue │ ├── layout │ │ └── index.vue │ ├── steps │ │ └── index.vue │ ├── tag │ │ └── index.vue │ ├── dropdown │ │ └── index.vue │ ├── countup │ │ └── index.vue │ ├── tabbar │ │ └── index.vue │ └── popup │ │ └── index.vue └── hooks │ └── index.ts ├── .browserslistrc ├── public ├── favicon.ico └── index.html ├── babel.config.js ├── .gitignore ├── .npmignore ├── vue.config.js ├── tsconfig.json ├── package.json └── README.md /src/utils/index.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /src/utils/events.ts: -------------------------------------------------------------------------------- 1 | import mitt from 'mitt' 2 | 3 | export default mitt() -------------------------------------------------------------------------------- /src/styles/functions.scss: -------------------------------------------------------------------------------- 1 | @function topx($value) { 2 | @return $value + 'px' 3 | } -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LadyChatterleyLover/cc-ui-vue3/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LadyChatterleyLover/cc-ui-vue3/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /src/components/cc-icon/uni.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LadyChatterleyLover/cc-ui-vue3/HEAD/src/components/cc-icon/uni.ttf -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | import ccUI from './components' 5 | 6 | createApp(App).use(ccUI).use(router).mount('#app') 7 | -------------------------------------------------------------------------------- /src/shims-vue.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | declare module '*.vue' { 3 | import type { DefineComponent } from 'vue' 4 | const component: DefineComponent<{}, {}, any> 5 | export default component 6 | } 7 | -------------------------------------------------------------------------------- /src/views/area/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | 11 | -------------------------------------------------------------------------------- /src/views/pullRefresh/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /src/views/link/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /vue.config.js: -------------------------------------------------------------------------------- 1 | const isPro = process.env.NODE_ENV !== 'production' 2 | 3 | module.exports = { 4 | publicPath: isPro ? './' : '', 5 | css: { 6 | loaderOptions: { 7 | scss: { 8 | prependData: ` 9 | @import "@/styles/_vars.scss"; 10 | @import "@/styles/functions.scss"; 11 | @import "@/styles/mixin.scss";` 12 | }, 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/styles/_vars.scss: -------------------------------------------------------------------------------- 1 | // 主要颜色 2 | $primary: #0081ff; 3 | // 成功颜色 4 | $success: #39b54a; 5 | // 错误颜色 6 | $error: #e54d42; 7 | // 警告颜色 8 | $warning: #f37b1d; 9 | // 信息颜色 10 | $info: #909399; 11 | // 边框颜色 12 | $border: #ebedf0; 13 | // 文字颜色 14 | $text-color: #323233; 15 | // 文字浅色 16 | $text-light-color: #969799; 17 | // 白色 18 | $white: #fff; 19 | // 黑色 20 | $blank: #000; 21 | // 红色 22 | $red: #ee0a24; 23 | -------------------------------------------------------------------------------- /src/views/calendar/index.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 | -------------------------------------------------------------------------------- /src/views/swipeCell/index.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | 17 | -------------------------------------------------------------------------------- /src/styles/common.scss: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | padding: 0; 4 | box-sizing: border-box; 5 | } 6 | 7 | html, 8 | body, 9 | #app { 10 | height: 100%; 11 | } 12 | 13 | input { 14 | position: relative; 15 | display: block; 16 | height: 100%; 17 | background: none; 18 | color: inherit; 19 | opacity: 1; 20 | font: inherit; 21 | line-height: inherit; 22 | letter-spacing: inherit; 23 | text-align: inherit; 24 | text-indent: inherit; 25 | text-transform: inherit; 26 | text-shadow: inherit; 27 | } -------------------------------------------------------------------------------- /src/views/tabs/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 35 | 36 | -------------------------------------------------------------------------------- /src/styles/mixin.scss: -------------------------------------------------------------------------------- 1 | @mixin f-col { 2 | display: flex; 3 | flex-direction: column; 4 | } 5 | 6 | @mixin j-center { 7 | display: flex; 8 | justify-content: center; 9 | align-items: center; 10 | } 11 | 12 | @mixin a-center { 13 | display: flex; 14 | justify-content: center; 15 | align-items: center; 16 | flex-direction: column; 17 | } 18 | 19 | @mixin j-between { 20 | display: flex; 21 | justify-content: space-between; 22 | } 23 | 24 | @mixin j-around { 25 | display: flex; 26 | justify-content: space-around; 27 | } 28 | 29 | @mixin f-wrap { 30 | display: flex; 31 | justify-content: center; 32 | align-items: center; 33 | flex-wrap: wrap; 34 | } -------------------------------------------------------------------------------- /src/views/demo/my.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 34 | 35 | -------------------------------------------------------------------------------- /src/views/demo/cart.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 34 | 35 | -------------------------------------------------------------------------------- /src/views/demo/category.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 34 | 35 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/views/sticky/index.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 19 | 20 | -------------------------------------------------------------------------------- /src/views/gap/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 22 | 23 | -------------------------------------------------------------------------------- /src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | import { ref, onMounted, onUnmounted, Ref } from 'vue' 2 | 3 | export const useClickOutside = (elementRef: Ref) => { 4 | 5 | // 设置一个导出值 6 | const isClickOutside = ref(false) 7 | 8 | // 给界面绑定上事件 9 | const handler = (e: MouseEvent) => { 10 | if (elementRef.value) { 11 | // e.target 有可能是为 null 所以需要断言 12 | if (elementRef.value.contains(e.target as HTMLElement)) { 13 | // 判断目标节点是不是当前的节点 14 | isClickOutside.value = false 15 | } else { 16 | isClickOutside.value = true 17 | } 18 | } 19 | } 20 | onMounted(() => { 21 | document.addEventListener('click', handler) 22 | }) 23 | onUnmounted(() => { 24 | document.removeEventListener('click', handler) 25 | }) 26 | return { 27 | isClickOutside 28 | } 29 | } -------------------------------------------------------------------------------- /src/views/imagePreview/index.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 35 | 36 | -------------------------------------------------------------------------------- /src/components/cc-gap/cc-gap.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 39 | 40 | -------------------------------------------------------------------------------- /src/views/addressList/index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 38 | 39 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowJs": true, 4 | "target": "esnext", 5 | "module": "esnext", 6 | "strict": true, 7 | "jsx": "preserve", 8 | "importHelpers": true, 9 | "moduleResolution": "node", 10 | "experimentalDecorators": true, 11 | "skipLibCheck": true, 12 | "esModuleInterop": true, 13 | "allowSyntheticDefaultImports": true, 14 | "sourceMap": true, 15 | "baseUrl": ".", 16 | "types": [ 17 | "webpack-env" 18 | ], 19 | "paths": { 20 | "@/*": [ 21 | "src/*" 22 | ] 23 | }, 24 | "lib": [ 25 | "esnext", 26 | "dom", 27 | "dom.iterable", 28 | "scripthost" 29 | ] 30 | }, 31 | "include": [ 32 | "src/**/*.ts", 33 | "src/**/*.tsx", 34 | "src/**/*.vue", 35 | "tests/**/*.ts", 36 | "tests/**/*.tsx" 37 | ], 38 | "exclude": [ 39 | "node_modules" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /src/views/addressEdit/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 32 | 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cc-ui", 3 | "version": "0.1.0", 4 | "private": false, 5 | "main": "dist/cc-ui.umd.min.js", 6 | "author": { 7 | "name": "cc-ui" 8 | }, 9 | "scripts": { 10 | "dev": "vue-cli-service serve", 11 | "build": "vue-cli-service build", 12 | "lib": "vue-cli-service build --target lib" 13 | }, 14 | "dependencies": { 15 | "@types/countup.js": "^2.0.4", 16 | "@types/lodash": "^4.14.171", 17 | "async-validator": "^3.5.2", 18 | "core-js": "^3.6.5", 19 | "countup.js": "^2.0.7", 20 | "dayjs": "^1.10.6", 21 | "lodash": "^4.17.21", 22 | "mitt": "^3.0.0", 23 | "vue": "^3.0.0", 24 | "vue-class-component": "^8.0.0-0", 25 | "vue-router": "^4.0.0-0" 26 | }, 27 | "devDependencies": { 28 | "@vue/cli-plugin-babel": "~4.5.0", 29 | "@vue/cli-plugin-router": "~4.5.0", 30 | "@vue/cli-plugin-typescript": "~4.5.0", 31 | "@vue/cli-service": "~4.5.0", 32 | "@vue/compiler-sfc": "^3.0.0", 33 | "sass": "^1.26.5", 34 | "sass-loader": "^8.0.2", 35 | "typescript": "~4.1.5" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/components/cc-link/cc-link.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 51 | 52 | -------------------------------------------------------------------------------- /src/components/cc-icon/cc-icon.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 38 | 39 | 51 | -------------------------------------------------------------------------------- /src/views/upload/index.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 40 | 41 | -------------------------------------------------------------------------------- /src/views/loadMore/index.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 37 | 38 | -------------------------------------------------------------------------------- /src/components/cc-layout/cc-row.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 48 | 49 | -------------------------------------------------------------------------------- /src/views/contactCard/index.vue: -------------------------------------------------------------------------------- 1 | 31 | 32 | 37 | 38 | -------------------------------------------------------------------------------- /src/views/swiper/index.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 41 | 42 | -------------------------------------------------------------------------------- /src/views/contactList/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 50 | 51 | -------------------------------------------------------------------------------- /src/views/circleProgress/index.vue: -------------------------------------------------------------------------------- 1 | 35 | 36 | 39 | 40 | -------------------------------------------------------------------------------- /src/views/submitBar/index.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 34 | 35 | -------------------------------------------------------------------------------- /src/components/cc-layout/cc-col.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 58 | 59 | -------------------------------------------------------------------------------- /src/components/cc-sticky/cc-sticky.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 48 | 49 | -------------------------------------------------------------------------------- /src/views/mask/index.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 40 | 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 介绍 2 | cc-ui是uni-app生态组件库, 宗旨是一切为了简单。 3 | 4 | 因为作者儿子名字叫岑岑, 所以为组件库名字取名为cc, 算是送给儿子的礼物。 5 | 6 | 本组件库使用vue3 + typescript开发, 全部组件有完整类型提示 。 7 | 在维护此组件库的同时, 作者也会陆续维护uni-app版本和推出react版本, 敬请期待。 8 | 9 | 欢迎大家star和pr。 10 | 11 | ### 在线文档 12 | [cc-ui在线文档](https://ladychatterleylover.github.io/cc-ui-web/) 13 | 14 | ### uni-app版 15 | [github](https://github.com/LadyChatterleyLover/cc-ui) 16 | 17 | ### 在线预览 18 | 1. 你可以通过手机浏览器访问: [cc-ui](https://static-df19c143-c147-44fa-84a0-61752f5834cc.bspapp.com/cc-ui/#/), 如是用电脑浏览器访问, 请将浏览器设置为手机模式。 19 | 20 | 21 | 22 | ### 版权信息 23 | cc-ui全部开源, 意味着您无需支付任何费用,也无需授权,即可将cc-ui应用到您的产品中。 24 | 注意:这并不意味着您可以将cc-ui应用到非法的领域,比如涉及赌博,暴力等方面。如因此产生纠纷等法律问题, cc-ui不承担任何责任。 25 | 26 | ### 捐赠cc-ui的开发 27 | 因为目前作者是一个人开发, 没有团队, 所有的开发和维护都是由一个人完成, 经常爆肝到凌晨。在此, 我希望看到这段话的你, 能够加入到组件库的开发和维护工作当中来, 毕竟开源不易, 何况作者这种中年程序员, 又要带娃, 又要敲代码, 更是困难。 28 | 29 | #### cc-ui交流群: 868811435 30 | 请备注: cc-ui 31 | 32 | 因为组件库和文档完全开源, 如果cc-ui能帮助到你的工作和学习, 请不要吝啬你的大方, 捐赠无门槛, 哪怕是一瓶可乐也好, 当然这完全看个人意愿。 33 | 34 |
35 | 微信收款 36 | 微信收款 37 |
38 | 39 |
40 | 41 | ### 友情链接 42 | [WOOCMS-快速开发内容管理系统](https://wooadmin.cn/) 43 |
44 | -------------------------------------------------------------------------------- /src/views/rate/index.vue: -------------------------------------------------------------------------------- 1 | 44 | 45 | 53 | 54 | -------------------------------------------------------------------------------- /src/components/cc-form/cc-form.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 67 | 68 | -------------------------------------------------------------------------------- /src/views/countdown/index.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 39 | 40 | -------------------------------------------------------------------------------- /src/views/form/index.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 64 | 65 | -------------------------------------------------------------------------------- /src/views/goodsCard/index.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 58 | 59 | -------------------------------------------------------------------------------- /src/components/cc-coupon-cell/cc-coupon-cell.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 72 | 73 | -------------------------------------------------------------------------------- /src/views/divider/index.vue: -------------------------------------------------------------------------------- 1 | 65 | 66 | 68 | 69 | -------------------------------------------------------------------------------- /src/components/cc-load-more/cc-load-more.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 69 | 70 | -------------------------------------------------------------------------------- /src/components/cc-avatar/cc-avatar.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 65 | 66 | -------------------------------------------------------------------------------- /src/views/loading/index.vue: -------------------------------------------------------------------------------- 1 | 61 | 62 | 65 | 66 | -------------------------------------------------------------------------------- /src/views/progress/index.vue: -------------------------------------------------------------------------------- 1 | 51 | 52 | 55 | 56 | -------------------------------------------------------------------------------- /src/views/skeleton/index.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 68 | 69 | -------------------------------------------------------------------------------- /src/views/coupon/index.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 72 | 73 | -------------------------------------------------------------------------------- /src/views/switch/index.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 61 | 62 | -------------------------------------------------------------------------------- /src/components/cc-circle-progress/cc-circle-progress.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 60 | 61 | -------------------------------------------------------------------------------- /src/views/numberKeyboard/index.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 57 | 58 | -------------------------------------------------------------------------------- /src/components/cc-divider/cc-divider.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 58 | 59 | -------------------------------------------------------------------------------- /src/components/cc-mask/cc-mask.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 66 | 67 | -------------------------------------------------------------------------------- /src/components/cc-countup/cc-countup.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 100 | 101 | -------------------------------------------------------------------------------- /src/components/cc-badge/cc-badge.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 65 | 66 | -------------------------------------------------------------------------------- /src/views/verifyButton/index.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 70 | 71 | -------------------------------------------------------------------------------- /src/views/noticeBar/index.vue: -------------------------------------------------------------------------------- 1 | 60 | 61 | 72 | 73 | -------------------------------------------------------------------------------- /src/views/avatar/index.vue: -------------------------------------------------------------------------------- 1 | 67 | 68 | 75 | 76 | -------------------------------------------------------------------------------- /src/views/passwordInput/index.vue: -------------------------------------------------------------------------------- 1 | 50 | 51 | 72 | 73 | -------------------------------------------------------------------------------- /src/views/cell/index.vue: -------------------------------------------------------------------------------- 1 | 72 | 73 | 75 | 76 | -------------------------------------------------------------------------------- /src/views/sidebar/index.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 116 | 117 | -------------------------------------------------------------------------------- /src/views/navBar/index.vue: -------------------------------------------------------------------------------- 1 | 52 | 53 | 65 | 66 | -------------------------------------------------------------------------------- /src/components/cc-skeleton/cc-skeleton.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 75 | 76 | -------------------------------------------------------------------------------- /src/views/notify/index.vue: -------------------------------------------------------------------------------- 1 | 65 | 66 | 86 | 87 | -------------------------------------------------------------------------------- /src/components/cc-contact-card/cc-contact-card.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 59 | 60 | -------------------------------------------------------------------------------- /src/views/goodsAction/index.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 124 | 125 | -------------------------------------------------------------------------------- /src/components/cc-open-more/cc-open-more.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 75 | 76 | -------------------------------------------------------------------------------- /src/components/cc-rate/cc-rate.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 112 | 113 | -------------------------------------------------------------------------------- /src/views/stepper/index.vue: -------------------------------------------------------------------------------- 1 | 76 | 77 | 91 | 92 | -------------------------------------------------------------------------------- /src/components/cc-notify/cc-notify.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 75 | 76 | -------------------------------------------------------------------------------- /src/components/cc-pull-refresh/cc-pull-refresh.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 94 | 95 | -------------------------------------------------------------------------------- /src/views/grid/index.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 136 | 137 | 151 | -------------------------------------------------------------------------------- /src/components/cc-form/types.ts: -------------------------------------------------------------------------------- 1 | import { CSSProperties } from "vue" 2 | import { FieldErrorList } from 'async-validator' 3 | 4 | export interface Callback { 5 | (isValid?: boolean, invalidFields?: FieldErrorList): void, 6 | } 7 | 8 | export type RuleType = 9 | | 'string' 10 | | 'number' 11 | | 'boolean' 12 | | 'method' 13 | | 'regexp' 14 | | 'integer' 15 | | 'float' 16 | | 'array' 17 | | 'object' 18 | | 'enum' 19 | | 'date' 20 | | 'url' 21 | | 'hex' 22 | | 'email' 23 | | 'any' 24 | 25 | export interface ValidateOption { 26 | // whether to suppress internal warning 27 | suppressWarning?: boolean 28 | 29 | // when the first validation rule generates an error stop processed 30 | first?: boolean 31 | 32 | // when the first validation rule of the specified field generates an error stop the field processed, 'true' means all fields. 33 | firstFields?: boolean | string[] 34 | } 35 | export interface ValidateSource { 36 | [field: string]: any 37 | } 38 | 39 | export interface RuleItem { 40 | type?: RuleType // default type is 'string' 41 | required?: boolean 42 | pattern?: RegExp | string 43 | min?: number // Range of type 'string' and 'array' 44 | max?: number // Range of type 'string' and 'array' 45 | len?: number // Length of type 'string' and 'array' 46 | enum?: Array // possible values of type 'enum' 47 | whitespace?: boolean 48 | fields?: Rules // ignore when without required 49 | options?: ValidateOption, 50 | trigger?: 'change' | 'blur' 51 | defaultField?: RuleItem // 'object' or 'array' containing validation rules 52 | transform?: (value: any) => any 53 | message?: string | (() => string) 54 | asyncValidator?: ( 55 | rule: Rules, 56 | value: any, 57 | callback: (error: string | string[] | void) => void, 58 | source: ValidateSource, 59 | options: ValidateOption, 60 | ) => void | Promise 61 | validator?: ( 62 | rule: Rules, 63 | value: any, 64 | callback: (error: string | string[] | void) => void, 65 | source: ValidateSource, 66 | options: ValidateOption, 67 | ) => void 68 | } 69 | 70 | export interface Rules { 71 | [field: string]: RuleItem | RuleItem[] 72 | } 73 | 74 | export interface ValidateFieldCallback { 75 | (message?: string, invalidFields?: FieldErrorList): void, 76 | } 77 | 78 | export interface FormInstance { 79 | registerLabelWidth(width: number, oldWidth: number): void, 80 | deregisterLabelWidth(width: number): void, 81 | autoLabelWidth: string | undefined, 82 | emit: (evt: string, ...args: any[]) => void, 83 | labelSuffix: string, 84 | inline?: boolean, 85 | model?: Record, 86 | size?: string, 87 | showMessage?: boolean, 88 | labelPosition?: string, 89 | labelWidth?: string, 90 | rules?: Record, 91 | statusIcon?: boolean, 92 | hideRequiredAsterisk?: boolean, 93 | disabled?: boolean, 94 | validate: (callback?: Callback) => Promise, 95 | resetFields: () => void, 96 | clearValidate: (props?: string | string[]) => void, 97 | validateField: (props: string | string[], cb: ValidateFieldCallback) => void, 98 | } -------------------------------------------------------------------------------- /src/views/slider/index.vue: -------------------------------------------------------------------------------- 1 | 71 | 72 | 89 | 90 | -------------------------------------------------------------------------------- /src/views/collapse/index.vue: -------------------------------------------------------------------------------- 1 | 45 | 46 | 112 | 113 | -------------------------------------------------------------------------------- /src/components/cc-swipe-cell/cc-swipe-cell.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 82 | 83 | -------------------------------------------------------------------------------- /src/components/cc-tabs/cc-tabs.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 110 | 111 | -------------------------------------------------------------------------------- /src/views/checker/index.vue: -------------------------------------------------------------------------------- 1 | 46 | 47 | 140 | 141 | -------------------------------------------------------------------------------- /src/components/cc-switch/cc-switch.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 96 | 97 | -------------------------------------------------------------------------------- /src/views/search/index.vue: -------------------------------------------------------------------------------- 1 | 94 | 95 | 119 | 120 | -------------------------------------------------------------------------------- /src/views/treeSelect/index.vue: -------------------------------------------------------------------------------- 1 | 37 | 38 | 152 | 153 | -------------------------------------------------------------------------------- /src/views/openMore/index.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 60 | 61 | -------------------------------------------------------------------------------- /src/views/layout/index.vue: -------------------------------------------------------------------------------- 1 | 96 | 97 | 100 | 101 | -------------------------------------------------------------------------------- /src/components/cc-verify-button/cc-verify-button.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 139 | 140 | -------------------------------------------------------------------------------- /src/components/cc-submit-bar/cc-submit-bar.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 92 | 93 | -------------------------------------------------------------------------------- /src/components/cc-grid/cc-grid.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 79 | 80 | 118 | -------------------------------------------------------------------------------- /src/views/steps/index.vue: -------------------------------------------------------------------------------- 1 | 55 | 56 | 137 | 138 | -------------------------------------------------------------------------------- /src/components/cc-area/cc-area.vue: -------------------------------------------------------------------------------- 1 | 42 | 43 | 82 | 83 | -------------------------------------------------------------------------------- /src/views/tag/index.vue: -------------------------------------------------------------------------------- 1 | 118 | 119 | 124 | 125 | -------------------------------------------------------------------------------- /src/views/dropdown/index.vue: -------------------------------------------------------------------------------- 1 | 48 | 49 | 123 | 124 | -------------------------------------------------------------------------------- /src/components/cc-sidebar/cc-sidebar.vue: -------------------------------------------------------------------------------- 1 | 33 | 34 | 102 | 103 | -------------------------------------------------------------------------------- /src/views/countup/index.vue: -------------------------------------------------------------------------------- 1 | 89 | 90 | 110 | 111 | -------------------------------------------------------------------------------- /src/components/cc-icon/icons.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | "pulldown": "\ue588", 3 | "refreshempty": "\ue461", 4 | "back": "\ue471", 5 | "forward": "\ue470", 6 | "more": "\ue507", 7 | "more-filled": "\ue537", 8 | "scan": "\ue612", 9 | "qq": "\ue264", 10 | "weibo": "\ue260", 11 | "weixin": "\ue261", 12 | "pengyouquan": "\ue262", 13 | "loop": "\ue565", 14 | "refresh": "\ue407", 15 | "refresh-filled": "\ue437", 16 | "arrowthindown": "\ue585", 17 | "arrowthinleft": "\ue586", 18 | "arrowthinright": "\ue587", 19 | "arrowthinup": "\ue584", 20 | "undo-filled": "\ue7d6", 21 | "undo": "\ue406", 22 | "redo": "\ue405", 23 | "redo-filled": "\ue7d9", 24 | "bars": "\ue563", 25 | "chatboxes": "\ue203", 26 | "camera": "\ue301", 27 | "chatboxes-filled": "\ue233", 28 | "camera-filled": "\ue7ef", 29 | "cart-filled": "\ue7f4", 30 | "cart": "\ue7f5", 31 | "checkbox-filled": "\ue442", 32 | "checkbox": "\ue7fa", 33 | "arrowleft": "\ue582", 34 | "arrowdown": "\ue581", 35 | "arrowright": "\ue583", 36 | "smallcircle-filled": "\ue801", 37 | "arrowup": "\ue580", 38 | "circle": "\ue411", 39 | "eye-filled": "\ue568", 40 | "eye-slash-filled": "\ue822", 41 | "eye-slash": "\ue823", 42 | "eye": "\ue824", 43 | "flag-filled": "\ue825", 44 | "flag": "\ue508", 45 | "gear-filled": "\ue532", 46 | "reload": "\ue462", 47 | "gear": "\ue502", 48 | "hand-thumbsdown-filled": "\ue83b", 49 | "hand-thumbsdown": "\ue83c", 50 | "hand-thumbsup-filled": "\ue83d", 51 | "heart-filled": "\ue83e", 52 | "hand-thumbsup": "\ue83f", 53 | "heart": "\ue840", 54 | "home": "\ue500", 55 | "info": "\ue504", 56 | "home-filled": "\ue530", 57 | "info-filled": "\ue534", 58 | "circle-filled": "\ue441", 59 | "chat-filled": "\ue847", 60 | "chat": "\ue263", 61 | "mail-open-filled": "\ue84d", 62 | "email-filled": "\ue231", 63 | "mail-open": "\ue84e", 64 | "email": "\ue201", 65 | "checkmarkempty": "\ue472", 66 | "list": "\ue562", 67 | "locked-filled": "\ue856", 68 | "locked": "\ue506", 69 | "map-filled": "\ue85c", 70 | "map-pin": "\ue85e", 71 | "map-pin-ellipse": "\ue864", 72 | "map": "\ue364", 73 | "minus-filled": "\ue440", 74 | "mic-filled": "\ue332", 75 | "minus": "\ue410", 76 | "micoff": "\ue360", 77 | "mic": "\ue302", 78 | "clear": "\ue434", 79 | "smallcircle": "\ue868", 80 | "close": "\ue404", 81 | "closeempty": "\ue460", 82 | "paperclip": "\ue567", 83 | "paperplane": "\ue503", 84 | "paperplane-filled": "\ue86e", 85 | "person-filled": "\ue131", 86 | "contact-filled": "\ue130", 87 | "person": "\ue101", 88 | "contact": "\ue100", 89 | "images-filled": "\ue87a", 90 | "phone": "\ue200", 91 | "images": "\ue87b", 92 | "image": "\ue363", 93 | "image-filled": "\ue877", 94 | "location-filled": "\ue333", 95 | "location": "\ue303", 96 | "plus-filled": "\ue439", 97 | "plus": "\ue409", 98 | "plusempty": "\ue468", 99 | "help-filled": "\ue535", 100 | "help": "\ue505", 101 | "navigate-filled": "\ue884", 102 | "navigate": "\ue501", 103 | "mic-slash-filled": "\ue892", 104 | "search": "\ue466", 105 | "settings": "\ue560", 106 | "sound": "\ue590", 107 | "sound-filled": "\ue8a1", 108 | "spinner-cycle": "\ue465", 109 | "download-filled": "\ue8a4", 110 | "personadd-filled": "\ue132", 111 | "videocam-filled": "\ue8af", 112 | "personadd": "\ue102", 113 | "upload": "\ue402", 114 | "upload-filled": "\ue8b1", 115 | "starhalf": "\ue463", 116 | "star-filled": "\ue438", 117 | "star": "\ue408", 118 | "trash": "\ue401", 119 | "phone-filled": "\ue230", 120 | "compose": "\ue400", 121 | "videocam": "\ue300", 122 | "trash-filled": "\ue8dc", 123 | "download": "\ue403", 124 | "chatbubble-filled": "\ue232", 125 | "chatbubble": "\ue202", 126 | "cloud-download": "\ue8e4", 127 | "cloud-upload-filled": "\ue8e5", 128 | "cloud-upload": "\ue8e6", 129 | "cloud-download-filled": "\ue8e9", 130 | "headphones":"\ue8bf", 131 | "shop":"\ue609" 132 | } 133 | -------------------------------------------------------------------------------- /src/components/cc-cell/cc-cell.vue: -------------------------------------------------------------------------------- 1 | 38 | 39 | 91 | 92 | -------------------------------------------------------------------------------- /src/views/tabbar/index.vue: -------------------------------------------------------------------------------- 1 | 57 | 58 | 155 | 156 | -------------------------------------------------------------------------------- /src/components/cc-loading/cc-loading.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 62 | 63 | -------------------------------------------------------------------------------- /src/views/popup/index.vue: -------------------------------------------------------------------------------- 1 | 70 | 71 | 118 | 119 | -------------------------------------------------------------------------------- /src/components/cc-contact-list/cc-contact-list.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 114 | 115 | -------------------------------------------------------------------------------- /src/components/cc-nav-bar/cc-nav-bar.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 117 | 118 | --------------------------------------------------------------------------------