Repository: brucx/wepy-zanui-demo Branch: v2.4.4 Commit: 9a7d5e5d1a16 Files: 60 Total size: 121.1 KB Directory structure: gitextract_deywg9a2/ ├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── package.json ├── src/ │ ├── app.wpy │ ├── components/ │ │ ├── zan-actionsheet.wpy │ │ ├── zan-capsule.wpy │ │ ├── zan-dialog.wpy │ │ ├── zan-field.wpy │ │ ├── zan-loadmore.wpy │ │ ├── zan-noticebar.wpy │ │ ├── zan-popup.wpy │ │ ├── zan-select.wpy │ │ ├── zan-stepper.wpy │ │ ├── zan-steps.wpy │ │ ├── zan-switch.wpy │ │ ├── zan-tab.wpy │ │ ├── zan-toast.wpy │ │ └── zan-toptips.wpy │ ├── example/ │ │ ├── actionsheet.wpy │ │ ├── badge.wpy │ │ ├── btn.wpy │ │ ├── capsule.wpy │ │ ├── card.wpy │ │ ├── cell.wpy │ │ ├── dashboard.wpy │ │ ├── dialog.wpy │ │ ├── field.wpy │ │ ├── helper.wpy │ │ ├── icon.wpy │ │ ├── label.wpy │ │ ├── layout.wpy │ │ ├── loadmore.wpy │ │ ├── noticebar.wpy │ │ ├── panel.wpy │ │ ├── popup.wpy │ │ ├── select.wpy │ │ ├── stepper.wpy │ │ ├── steps.wpy │ │ ├── switch.wpy │ │ ├── tab.wpy │ │ ├── tag.wpy │ │ ├── toast.wpy │ │ └── toptips.wpy │ └── zanui/ │ ├── badge.scss │ ├── btn.scss │ ├── card.scss │ ├── cell.scss │ ├── col.scss │ ├── color.scss │ ├── common.scss │ ├── helper.scss │ ├── icon.scss │ ├── panel.scss │ ├── row.scss │ └── tag.scss └── wepy.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 indent_style = space indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true ================================================ FILE: .eslintignore ================================================ dist/* ================================================ FILE: .eslintrc.js ================================================ module.exports = { root: true, parser: 'babel-eslint', parserOptions: { sourceType: 'module' }, env: { browser: true }, // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style extends: 'standard', // required to lint *.wpy files plugins: [ 'html' ], settings: { 'html/html-extensions': ['.html', '.wpy'] }, 'globals': { 'wx': true }, // add your custom rules here 'rules': { // allow paren-less arrow functions 'arrow-parens': 0, // allow async-await 'generator-star-spacing': 0, "semi": [ "error", "never" ], 'comma-dangle': ["error", "only-multiline"], 'padded-blocks': 0, 'one-var': 0, 'no-return-assign': 0, 'indent': ['error', 2], // allow debugger during development 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 'space-before-function-paren': 0 } } ================================================ FILE: .gitignore ================================================ dist/ node_modules/ web/style sftp-config.json log npm-debug.log .vscode coverage lerna-debug.log .DS_Store .wepycache ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2016 wepyjs Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # ZanUI in WePY [ZanUI](https://github.com/youzan/zanui-weapp) 有赞移动 Web UI 规范 ZanUI 的小程序现实版本,结合了微信的视觉规范,为用户提供更加统一的使用感受。 这里是 ZanUI 在 WePY 中的移植。 ## 体验步骤 ### 1. 安装 wepy 本项目基于wepy开发,[参考这里](https://github.com/wepyjs/wepy) ```bash yarn global add wepy-cli ``` ### 2. 下载源代码 ```bash git clone https://github.com/brucx/wepy-zanui-demo.git ``` ### 3. 安装开发依赖 ```bash cd wepy-zanui-demo yarn ``` ### 4. 编译源代码 ```bash wepy build ``` ### 5.导入至开发者工具 编译完成后会生成`dist`目录,开发者工具本地开发目录指向`dist`目录。 **切记: 取消勾选`项目-->开启ES6转ES5`,否则代码运行报错。** # ZanUI-Wepy 组件的使用说明 目前 ZanUI-Wepy 一共有23个组件,分为纯样式组件、封装样式组件、内部交互组件、外部交互组件。具体组件接口可以参考 `example` 目录下的示例。 ## 纯样式组件 纯样式组件只需引入相应的 .SCSS 样式文件,然后在项目中引用相应的样式类即可。 包含的组件有:Badge、Button、Card、Cell、Helper、Icon、Layout、Panel、Tag 以"Badge 徽章"为例: 复制 `zanui/badge.scss` 文件至项目目录 页面中如下方式使用 ```Vue ``` ## 封装样式组件 封装样式组件需要引入 .WPY 组件文件,通过 Props 传入参数即可。 包含的组件有:Capsule、Loadmore、Steps 以"Capsule 胶囊"为例: 复制 `components/zan-capsule.wpy` 文件至项目目录 页面中如下方式使用 ```Vue ``` ## 内部交互组件 内部交互组件需要引入 .WPY 组件文件,通过 Props 传入参数,组件通过事件向页面通信。 包含的组件有:Select、Stepper、Switch、Tab 以"Tab 标签"为例: 复制 `components/zan-tab.wpy` 文件至项目目录 页面中如下方式使用 ```Vue ``` ## 外部交互组件 外部交互组件需要引入 .WPY 组件文件,通过 Props 传入参数,页面可以主动调用组件方法,组件通过事件向页面通信。 包含的组件有:Actionsheet、Dialog、Field、Noticebar、Popup、Toast、Toptips 以"Actionsheet 行动按钮"为例: 复制 `components/zan-actionsheet.wpy` 文件至项目目录 页面中如下方式使用 ```Vue ``` ================================================ FILE: package.json ================================================ { "name": "wepy-wechat-demo", "version": "2.4.4", "description": "基于有赞zanui-weapp的wepy组件库", "main": "dist/app.js", "scripts": { "build": "cross-env NODE_ENV=production wepy build --no-cache", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "Bruce Xiong", "license": "ISC", "dependencies": { "wepy": "^1.6.0", "wepy-async-function": "^1.4.4", "wepy-com-toast": "^1.0.3" }, "devDependencies": { "babel-eslint": "^7.2.1", "babel-plugin-syntax-export-extensions": "^6.13.0", "babel-plugin-transform-export-extensions": "^6.22.0", "babel-preset-es2015": "^6.24.0", "babel-preset-stage-1": "^6.22.0", "cross-env": "^3.2.4", "eslint": "^3.18.0", "eslint-config-standard": "^7.1.0", "eslint-friendly-formatter": "^2.0.7", "eslint-plugin-html": "^2.0.1", "eslint-plugin-promise": "^2.0.1", "eslint-plugin-standard": "^2.0.1", "wepy-compiler-babel": "^1.5.1", "wepy-compiler-less": "^1.3.10", "wepy-compiler-sass": "0.0.3", "wepy-eslint": "^1.5.3", "wepy-plugin-imagemin": "^1.5.2", "wepy-plugin-uglifyjs": "^1.3.6" } } ================================================ FILE: src/app.wpy ================================================ ================================================ FILE: src/components/zan-actionsheet.wpy ================================================ ================================================ FILE: src/components/zan-capsule.wpy ================================================ ================================================ FILE: src/components/zan-dialog.wpy ================================================ ================================================ FILE: src/components/zan-field.wpy ================================================ ================================================ FILE: src/components/zan-loadmore.wpy ================================================ ================================================ FILE: src/components/zan-noticebar.wpy ================================================ ================================================ FILE: src/components/zan-popup.wpy ================================================ ================================================ FILE: src/components/zan-select.wpy ================================================ ================================================ FILE: src/components/zan-stepper.wpy ================================================ ================================================ FILE: src/components/zan-steps.wpy ================================================ ================================================ FILE: src/components/zan-switch.wpy ================================================ ================================================ FILE: src/components/zan-tab.wpy ================================================ ================================================ FILE: src/components/zan-toast.wpy ================================================ ================================================ FILE: src/components/zan-toptips.wpy ================================================ ================================================ FILE: src/example/actionsheet.wpy ================================================ ================================================ FILE: src/example/badge.wpy ================================================ ================================================ FILE: src/example/btn.wpy ================================================ ================================================ FILE: src/example/capsule.wpy ================================================ ================================================ FILE: src/example/card.wpy ================================================ ================================================ FILE: src/example/cell.wpy ================================================ ================================================ FILE: src/example/dashboard.wpy ================================================ ================================================ FILE: src/example/dialog.wpy ================================================ ================================================ FILE: src/example/field.wpy ================================================ ================================================ FILE: src/example/helper.wpy ================================================ ================================================ FILE: src/example/icon.wpy ================================================ ================================================ FILE: src/example/label.wpy ================================================ ================================================ FILE: src/example/layout.wpy ================================================ ================================================ FILE: src/example/loadmore.wpy ================================================ ================================================ FILE: src/example/noticebar.wpy ================================================ ================================================ FILE: src/example/panel.wpy ================================================ ================================================ FILE: src/example/popup.wpy ================================================ ================================================ FILE: src/example/select.wpy ================================================ ================================================ FILE: src/example/stepper.wpy ================================================ ================================================ FILE: src/example/steps.wpy ================================================ ================================================ FILE: src/example/switch.wpy ================================================ ================================================ FILE: src/example/tab.wpy ================================================ ================================================ FILE: src/example/tag.wpy ================================================ ================================================ FILE: src/example/toast.wpy ================================================ ================================================ FILE: src/example/toptips.wpy ================================================ ================================================ FILE: src/zanui/badge.scss ================================================ .zan-badge { position: relative; } .zan-badge__count { position: absolute; top: -16px; right: 0px; height: 1.6em; min-width: 1.6em; line-height: 1.6; padding: 0 0.4em; font-size: 20px; border-radius: 0.8em; background: #ff4444; color: #fff; text-align: center; white-space: nowrap; transform: translateX(50%) scale(0.5); transform-origin: center; z-index: 10; box-shadow: 0 0 0 2px #fff; box-sizing: border-box; } ================================================ FILE: src/zanui/btn.scss ================================================ @import "common"; .zan-btn { position: relative; color: #333; background-color: #fff; margin-bottom: 10px; padding-left: 15px; padding-right: 15px; border-radius: 2px; font-size: 16px; line-height: 45px; height: 45px; box-sizing: border-box; text-decoration: none; text-align: center; vertical-align: middle; } .zan-btn::after { @include hairline; border-width: 1px; border-radius: 4px; } .zan-btns { margin: 15px; } /* type */ .zan-btn--primary { color: #fff; background-color: #4b0; &::after { border-color: #0a0; } } .zan-btn--warn { color: #fff; background-color: #f85; &::after { border-color: #f85; } } .zan-btn--danger { color: #fff; background-color: #f44; &::after { border-color: #e33; } } /* size */ .zan-btn--small { display: inline-block; height: 30px; line-height: 30px; font-size: 12px; margin-right: 5px; margin-bottom: 0; } .zan-btn--mini { display: inline-block; line-height: 21px; height: 22px; font-size: 10px; margin-right: 5px; margin-bottom: 0; padding-left: 5px; padding-right: 5px; } .zan-btn--large { border-radius: 0; margin-bottom: 0; border: none; line-height: 50px; height: 50px; } /* plain */ .zan-btn--plain.zan-btn { background-color: transparent; } .zan-btn--plain.zan-btn--primary { color: #06BF04; } .zan-btn--plain.zan-btn--warn { color: #FF6600; } .zan-btn--plain.zan-btn--danger { color: #FF4444; } /* 重写button组件的button-hover样式 */ .button-hover { opacity: 0.9; } /* loading */ .zan-btn--loading { color: transparent; opacity: 1; } .zan-btn--loading::before { position: absolute; left: 50%; top: 50%; content: ' '; width: 16px; height: 16px; margin-left: -8px; margin-top: -8px; border: 3px solid #e5e5e5; border-color: #666 #e5e5e5 #e5e5e5 #e5e5e5; border-radius: 8px; box-sizing: border-box; animation: btn-spin 0.6s linear; animation-iteration-count: infinite; } .zan-btn--primary.zan-btn--loading::before, .zan-btn--warn.zan-btn--loading::before, .zan-btn--danger.zan-btn--loading::before { border-color: #fff rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1); } @keyframes btn-spin { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } } /* disabled */ .zan-btn.zan-btn--disabled { /* 防止样式被 button[disabled] 的规则覆盖,所以使用了important */ color: #999 ! important; background: #f8f8f8 ! important; border-color: #e5e5e5 ! important; cursor: not-allowed ! important; opacity: 1 ! important; &::after { border-color: #e5e5e5 ! important; } } /* :last-child */ .zan-btn--last-child, .zan-btn:last-child { margin-bottom: 0; margin-right: 0; } ================================================ FILE: src/zanui/card.scss ================================================ .zan-card { margin-left: 0px; width: auto; padding: 5px 15px; overflow: hidden; position: relative; font-size: 14px; } .zan-card__thumb { width: 90px; height: 90px; float: left; position: relative; margin-left: auto; margin-right: auto; overflow: hidden; background-size: cover; } .zan-card__img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; width: auto; height: auto; max-width: 100%; max-height: 100%; } .zan-card__detail { margin-left: 100px; width: auto; position: relative; } .zan-card__detail-row { overflow: hidden; line-height: 20px; min-height: 20px; margin-bottom: 3px; } .zan-card__right-col { float: right; } .zan-card__left-col { margin-right: 80px; } ================================================ FILE: src/zanui/cell.scss ================================================ @import "common"; .zan-cell { position: relative; padding: 12px 15px; display: flex; align-items: center; line-height: 1.4; font-size: 14px; } .zan-cell::after { @include hairline; border-bottom-width: 1px; left: 15px; right: 0; } .zan-cell__icon { margin-right: 5px; } .zan-cell__bd { flex: 1; } .zan-cell__text { line-height: 24px; font-size: 14px; } .zan-cell__desc { line-height: 1.2; font-size: 12px; color: #666; } .zan-cell__ft { position: relative; text-align: right; color: #666; } .zan-cell__no-pading{ padding: 0; } .zan-cell__no-pading .zan-cell__bd_padding { padding: 12px 0 12px 15px; } .zan-cell__no-pading .zan-cell__bd_padding .zan-form__input{ height: 26px; } .zan-cell__no-pading .zan-cell__ft_padding { padding: 12px 15px 12px 0; } .zan-cell--last-child::after, .zan-cell:last-child::after { display: none; } .zan-cell--access .zan-cell__ft { padding-right: 13px; } .zan-cell--access .zan-cell__ft::after { position: absolute; top: 50%; right: 2px; content: " "; display: inline-block; height: 6px; width: 6px; border-width: 2px 2px 0 0; border-color: #c8c8c8; border-style: solid; transform: translateY(-50%) matrix(0.71, 0.71, -0.71, 0.71, 0, 0); } .zan-cell--switch { padding-top: 6px; padding-bottom: 6px; } ================================================ FILE: src/zanui/col.scss ================================================ .zan-col { float: left; box-sizing: border-box; width: 0; } @for $i from 1 to 24 { .zan-col-#{$i} { width: $i * 100% / 24; } .zan-col-offset-#{$i} { margin-left: $i * 100% / 24; } } ================================================ FILE: src/zanui/color.scss ================================================ @import 'common'; .zan-c-red { color: $red !important; } .zan-c-gray { color: $gray !important; } .zan-c-gray-dark { color: $gray-dark !important; } .zan-c-gray-darker { color: $gray-darker !important; } .zan-c-black { color: $text-color !important; } .zan-c-blue { color: $blue !important; } .zan-c-green { color: $green !important; } ================================================ FILE: src/zanui/common.scss ================================================ /* color variables */ $black: #000; $white: #fff; $red: #f44; $blue: #38f; $orange: #f60; $green: #06bf04; $gray: #c9c9c9; $gray-light: #e5e5e5; $gray-darker: #666; $gray-dark: #999; /* default colors */ $text-color: #333; $border-color: #ccc; $active-color: #e8e8e8; $background-color: #f8f8f8; /* button */ $button-default-color: $text-color; $button-default-background-color: $white; $button-default-border-color: $gray-light; $button-primary-color: $white; $button-primary-background-color: #4b0; $button-primary-border-color: #0a0; $button-danger-color: $white; $button-danger-background-color: $red; $button-danger-border-color: #e33; $button-disabled-color: $gray-dark; $button-disabled-background-color: $gray-light; $button-disabled-border-color: $border-color; $button-bottom-action-default-color: $white; $button-bottom-action-default-background-color: #f85; $button-bottom-action-primary-color: $white; $button-bottom-action-primary-background-color: $red; @mixin hairline($border-retina-color: $gray-light) { content: ''; position: absolute; top: 0; left: 0; width: 200%; height: 200%; transform: scale(.5); transform-origin: 0 0; pointer-events: none; box-sizing: border-box; border: 0 solid $border-retina-color; } ================================================ FILE: src/zanui/helper.scss ================================================ @import "common"; .zan-pull-left { float: left; } .zan-pull-right { float: right; } .zan-center { text-align: center; } .zan-right { text-align: right; } .zan-text-deleted { text-decoration: line-through; } .zan-font-8 { font-size: 8px; } .zan-font-10 { font-size: 10px; } .zan-font-12 { font-size: 12px; } .zan-font-14 { font-size: 14px; } .zan-font-16 { font-size: 16px; } .zan-font-18 { font-size: 18px; } .zan-font-20 { font-size: 20px; } .zan-font-22 { font-size: 22px; } .zan-font-24 { font-size: 22px; } .zan-font-30 { font-size: 30px; } .zan-font-bold { font-weight: bold; } .zan-arrow { position: absolute; right: 15px; top: 50%; display: inline-block; height: 6px; width: 6px; border-width: 2px 2px 0 0; border-color: #c8c8c8; border-style: solid; transform: translateY(-50%) matrix(0.71, 0.71, -0.71, 0.71, 0, 0); } .zan-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-wrap: normal; } .zan-ellipsis--l2 { max-height: 40px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .zan-ellipsis--l3 { max-height: 60px; line-height: 20px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; } .zan-clearfix { zoom: 1; } .zan-clearfix::after { content: ''; display: table; clear: both; } /* 超细边框 */ .zan-hairline { &, &--top, &--left, &--right, &--bottom, &--top-bottom, &--surround { position: relative; &::after { @include hairline; } } &--top::after { border-top-width: 1px; } &--left::after { border-left-width: 1px; } &--right::after { border-right-width: 1px; } &--bottom::after { border-bottom-width: 1px; } &--top-bottom::after { border-width: 1px 0; } &--surround::after { border-width: 1px; } } ================================================ FILE: src/zanui/icon.scss ================================================ /* DO NOT EDIT! Generated by fount */ @font-face { font-family: 'zanui-weapp-icon'; src: url('https://b.yzcdn.cn/zanui-weapp/zanui-weapp-icon-4381aded05.eot'); src: url('https://b.yzcdn.cn/zanui-weapp/zanui-weapp-icon-4381aded05.eot?#iefix') format('embedded-opentype'), url('https://b.yzcdn.cn/zanui-weapp/zanui-weapp-icon-4381aded05.woff2') format('woff2'), url('https://b.yzcdn.cn/zanui-weapp/zanui-weapp-icon-4381aded05.woff') format('woff'), url('https://b.yzcdn.cn/zanui-weapp/zanui-weapp-icon-4381aded05.ttf') format('truetype') } .zan-icon { display: inline-block; } .zan-icon::before { font-family: "zanui-weapp-icon" !important; font-style: normal; font-weight: normal; speak: none; display: inline-block; text-decoration: inherit; width: 1em; text-align: center; /* For safety - reset parent styles, that can break glyph codes*/ font-variant: normal; text-transform: none; /* fix buttons height, for twitter bootstrap */ line-height: 1em; /* Animation center compensation - margins should be symmetric */ /* remove if not needed */ /* margin-left: .2em; */ /* you can be more comfortable with increased icons size */ /* font-size: 120%; */ /* Font smoothing. That was taken from TWBS */ -webkit-font-smoothing: antialiased; /* Uncomment for 3D effect */ /* text-shadow: 1px 1px 1px rgba(127, 127, 127, 0.3); */ } /* DO NOT EDIT! Generated by iconfount */ .zan-icon-qr-invalid:before { content: '\e800'; } /* '' */ .zan-icon-qr:before { content: '\e801'; } /* '' */ .zan-icon-exchange:before { content: '\e802'; } /* '' */ .zan-icon-close:before { content: '\e803'; } /* '' */ .zan-icon-location:before { content: '\e804'; } /* '' */ .zan-icon-upgrade:before { content: '\e805'; } /* '' */ .zan-icon-check:before { content: '\e806'; } /* '' */ .zan-icon-checked:before { content: '\e807'; } /* '' */ .zan-icon-like-o:before { content: '\e808'; } /* '' */ .zan-icon-like:before { content: '\e809'; } /* '' */ .zan-icon-chat:before { content: '\e80a'; } /* '' */ .zan-icon-shop:before { content: '\e80b'; } /* '' */ .zan-icon-photograph:before { content: '\e80c'; } /* '' */ .zan-icon-add:before { content: '\e80d'; } /* '' */ .zan-icon-add2:before { content: '\e80e'; } /* '' */ .zan-icon-photo:before { content: '\e80f'; } /* '' */ .zan-icon-logistics:before { content: '\e810'; } /* '' */ .zan-icon-edit:before { content: '\e811'; } /* '' */ .zan-icon-passed:before { content: '\e812'; } /* '' */ .zan-icon-cart:before { content: '\e813'; } /* '' */ .zan-icon-shopping-cart:before { content: '\e814'; } /* '' */ .zan-icon-arrow:before { content: '\e815'; } /* '' */ .zan-icon-gift:before { content: '\e816'; } /* '' */ .zan-icon-search:before { content: '\e817'; } /* '' */ .zan-icon-clear:before { content: '\e818'; } /* '' */ .zan-icon-success:before { content: '\e819'; } /* '' */ .zan-icon-fail:before { content: '\e81a'; } /* '' */ .zan-icon-contact:before { content: '\e81b'; } /* '' */ .zan-icon-wechat:before { content: '\e81c'; } /* '' */ .zan-icon-alipay:before { content: '\e81d'; } /* '' */ .zan-icon-password-view:before { content: '\e81e'; } /* '' */ .zan-icon-password-not-view:before { content: '\e81f'; } /* '' */ .zan-icon-wap-nav:before { content: '\e820'; } /* '' */ .zan-icon-wap-home:before { content: '\e821'; } /* '' */ .zan-icon-ecard-pay:before { content: '\e822'; } /* '' */ .zan-icon-balance-pay:before { content: '\e823'; } /* '' */ .zan-icon-peer-pay:before { content: '\e824'; } /* '' */ .zan-icon-credit-pay:before { content: '\e825'; } /* '' */ .zan-icon-debit-pay:before { content: '\e826'; } /* '' */ .zan-icon-other-pay:before { content: '\e827'; } /* '' */ .zan-icon-browsing-history:before { content: '\e828'; } /* '' */ .zan-icon-goods-collect:before { content: '\e829'; } /* '' */ .zan-icon-shop-collect:before { content: '\e82a'; } /* '' */ .zan-icon-receive-gift:before { content: '\e82b'; } /* '' */ .zan-icon-send-gift:before { content: '\e82c'; } /* '' */ .zan-icon-setting:before { content: '\e82d'; } /* '' */ .zan-icon-points:before { content: '\e82e'; } /* '' */ .zan-icon-coupon:before { content: '\e82f'; } /* '' */ .zan-icon-free-postage:before { content: '\e830'; } /* '' */ .zan-icon-discount:before { content: '\e831'; } /* '' */ .zan-icon-birthday-privilege:before { content: '\e832'; } /* '' */ .zan-icon-member-day-privilege:before { content: '\e833'; } /* '' */ .zan-icon-balance-details:before { content: '\e834'; } /* '' */ .zan-icon-cash-back-record:before { content: '\e835'; } /* '' */ .zan-icon-points-mall:before { content: '\e836'; } /* '' */ .zan-icon-exchange-record:before { content: '\e837'; } /* '' */ .zan-icon-pending-payment:before { content: '\e838'; } /* '' */ .zan-icon-pending-orders:before { content: '\e839'; } /* '' */ .zan-icon-pending-deliver:before { content: '\e83a'; } /* '' */ .zan-icon-pending-evaluate:before { content: '\e83b'; } /* '' */ .zan-icon-gift-card-pay:before { content: '\e83c'; } /* '' */ .zan-icon-cash-on-deliver:before { content: '\e83d'; } /* '' */ .zan-icon-underway:before { content: '\e83e'; } /* '' */ .zan-icon-point-gift:before { content: '\e83f'; } /* '' */ .zan-icon-after-sale:before { content: '\e840'; } /* '' */ .zan-icon-edit-data:before { content: '\e841'; } /* '' */ .zan-icon-question:before { content: '\e842'; } /* '' */ .zan-icon-delete:before { content: '\e843'; } /* '' */ .zan-icon-records:before { content: '\e844'; } /* '' */ .zan-icon-description:before { content: '\e845'; } /* '' */ .zan-icon-card:before { content: '\e846'; } /* '' */ .zan-icon-gift-card:before { content: '\e847'; } /* '' */ .zan-icon-clock:before { content: '\e848'; } /* '' */ .zan-icon-gold-coin:before { content: '\e849'; } /* '' */ .zan-icon-completed:before { content: '\e84a'; } /* '' */ .zan-icon-value-card:before { content: '\e84b'; } /* '' */ .zan-icon-certificate:before { content: '\e84c'; } /* '' */ .zan-icon-tosend:before { content: '\e84d'; } /* '' */ .zan-icon-sign:before { content: '\e84e'; } /* '' */ .zan-icon-home:before { content: '\e84f'; } /* '' */ .zan-icon-phone:before { content: '\e850'; } /* '' */ .zan-icon-add-o:before { content: '\e851'; } /* '' */ .zan-icon-play:before { content: '\e852'; } /* '' */ .zan-icon-pause:before { content: '\e853'; } /* '' */ .zan-icon-stop:before { content: '\e854'; } /* '' */ .zan-icon-hot:before { content: '\e855'; } /* '' */ .zan-icon-new:before { content: '\e856'; } /* '' */ .zan-icon-new-arrival:before { content: '\e857'; } /* '' */ .zan-icon-hot-sale:before { content: '\e858'; } /* '' */ ================================================ FILE: src/zanui/panel.scss ================================================ @import "common"; .zan-panel { position: relative; background: #fff; margin-top: 10px; overflow: hidden; &::after { @include hairline; border-top-width: 1px; border-bottom-width: 1px; } } .zan-panel-title { font-size: 14px; line-height: 1; color: #999; padding: 20px 15px 0 15px; } .zan-panel--without-margin-top { margin-top: 0; } .zan-panel--without-border { &::after { border: 0 none; } } ================================================ FILE: src/zanui/row.scss ================================================ .zan-row { &:after { content: ""; display: table; clear: both; } } ================================================ FILE: src/zanui/tag.scss ================================================ @import "common"; .zan-tag { display: inline-block; position: relative; box-sizing: border-box; line-height: 16px; padding: 0 5px; border-radius: 2px; font-size: 11px; background: $gray; text-align: center; color: $white; &::after { @include hairline; border-width: 1px; border-radius: 4px; } } .zan-tag--plain { color: $gray; background: $white; } /* 各种主题代码 */ .zan-tag--primary { color: $button-primary-color; background-color: $button-primary-background-color; &::after { border-color: $button-primary-background-color; } /* 空心形式 */ &.zan-tag--plain { color: $button-primary-background-color; background: $white; } } .zan-tag--danger { color: $button-danger-color; background: $button-danger-background-color; &::after { border-color: $button-danger-background-color; } /* 空心形式 */ &.zan-tag--plain { color: $button-danger-background-color; background: $button-danger-color; } } .zan-tag--warn { color: $white; background: #f85; &::after { border-color: #f85; } /* 空心形式 */ &.zan-tag--plain { color: #f85; background: $white; } } /* disabled tag */ .zan-tag--disabled { color: $button-disabled-color !important; background: $button-disabled-background-color; &::after { border-color: $button-disabled-border-color; } } ================================================ FILE: wepy.config.js ================================================ module.exports = { eslint: true, wpyExt: '.wpy', compilers: { sass: { outputStyle: 'compressed' }, babel: { sourceMap: true, presets: ['es2015', 'stage-1'], plugins: ['transform-export-extensions', 'syntax-export-extensions'] } } }