├── .eslintignore ├── .eslintrc ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug_report_cn.md │ └── feature_request_cn.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .npmrc ├── .stylelintrc ├── CHANGELOG.md ├── LICENSE ├── README.md ├── babel.config.js ├── demo ├── app.acss ├── app.js ├── app.json ├── mini.project.json └── pages │ ├── alphabet │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── am-checkbox │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── am-icon │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── am-radio │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── am-switch │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── amount-input │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── avatar │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── badge │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── button │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── calendar │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── card │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── collapse │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── container │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── coupon │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── filter │ ├── alternative │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── index.acss │ ├── index.axml │ ├── index.js │ ├── index.json │ ├── single │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── single_1 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ └── single_2 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── flex │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── footer │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── form │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── grid │ ├── 2 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── 3 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── 4 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── 5 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── guide │ ├── guide.acss │ ├── guide.axml │ ├── guide.js │ └── guide.json │ ├── input-item │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── list │ ├── app.acss │ ├── app.axml │ ├── app.js │ ├── app.json │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── loading │ ├── loading.acss │ ├── loading.axml │ ├── loading.js │ └── loading.json │ ├── long-password │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── mask │ ├── mask.acss │ ├── mask.axml │ ├── mask.js │ └── mask.json │ ├── message │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── modal │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── multi-liner │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── new-list │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── notice │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── page-result │ ├── busy │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── empty │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── error │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── index.acss │ ├── index.axml │ ├── index.js │ ├── index.json │ ├── local-busy │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── local-empty │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── local-error │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── local-logoff │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── local-network │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── local-payment │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── local-redpacket │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── log-off │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── network │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── payment │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ └── redpacket │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── pagination │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── picker-item │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── popover │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── popup │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── search-bar │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── stepper │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── steps │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── swipe-action │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── tabs │ ├── elevator │ │ ├── elevator.acss │ │ ├── elevator.axml │ │ ├── elevator.js │ │ └── elevator.json │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── tag │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── terms │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── tips │ ├── 1 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── 2 │ │ ├── index.acss │ │ ├── index.axml │ │ ├── index.js │ │ └── index.json │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── title │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ ├── verify-code │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json │ └── vtabs │ ├── index.acss │ ├── index.axml │ ├── index.js │ └── index.json ├── package.json ├── scripts ├── compiler.js └── pub.js ├── src ├── _lang │ ├── en-US.ts │ └── zh-CN.ts ├── _mixin │ └── idnex.ts ├── _util │ ├── fmtClass.ts │ ├── fmtEvent.ts │ ├── fmtUnit.ts │ └── getI18n.ts ├── am-checkbox │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── am-icon │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── am-radio │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── am-switch │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── amount-input │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── avatar │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── badge │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── button │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── calendar │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── card │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── collapse │ ├── collapse-item │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ ├── index.axml │ ├── index.json │ ├── index.md │ └── index.ts ├── container │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── coupon │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── filter │ ├── filter-item │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.ts │ └── mixins │ │ └── lifecycle.ts ├── flex │ ├── flex-item │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.sjs │ └── index.ts ├── footer │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── grid │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── guide │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── input-item │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── list │ ├── alphabet │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ └── index.ts │ ├── auto-size-img │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.ts │ ├── list-item │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ └── index.ts │ └── list-secondary │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ ├── index.md │ │ └── index.ts ├── loading │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── long-password │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── mask │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── message │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── modal │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── multi-liner │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── notice │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── page-result │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── pagination │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.sjs │ └── index.ts ├── picker-item │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── popover │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.ts │ └── popover-item │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts ├── popup │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── search-bar │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── stepper │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── steps │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── style │ ├── mixins │ │ └── hairline.less │ └── themes │ │ └── default.less ├── swipe-action │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── tabs │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.ts │ ├── tab-content │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ └── util.sjs ├── tag │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── terms │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── tips │ ├── index.md │ ├── tips-dialog │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts │ └── tips-plain │ │ ├── index.axml │ │ ├── index.json │ │ ├── index.less │ │ └── index.ts ├── title │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts ├── verify-code │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ └── index.ts └── vtabs │ ├── index.axml │ ├── index.json │ ├── index.less │ ├── index.md │ ├── index.ts │ └── vtab-content │ ├── index.axml │ ├── index.json │ └── index.ts ├── tsconfig.json └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | types/**/*.ts 2 | es/**/*.js 3 | demo/es/**/*.js -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-ali", 3 | "globals": { 4 | "my": true, 5 | "App": true, 6 | "Component": true, 7 | "Page": true 8 | }, 9 | "parser": "@typescript-eslint/parser", 10 | "plugins": [ 11 | "typescript" 12 | ], 13 | "rules": { 14 | "typescript/class-name-casing": "error", 15 | "typescript/type-annotation-spacing": "error" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report_cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 缺陷问题反馈 3 | about: 请尽可能清晰描述问题 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 17 | ## 问题描述 18 | 19 | 20 | 21 | ## 复现步骤 22 | 23 | 1. 24 | 2. 25 | 26 | ### demo 示例 27 | 36 | 🔗 demo 的示例地址: 37 | 38 | 39 | ### 截图 40 | 41 | 42 | 43 | ## 预期行为 44 | 1. 45 | 2. 46 | 47 | 48 | ## 环境信息 49 | 50 | * [x] mini-ali-ui (px 版本扩展组件) 51 | * [ ] mini-ali-ui-rpx (rpx 版本扩展组件) 52 | 53 | 54 | * **组件库版本:** 55 | * **设备机型:** 56 | * **设备版本:** 57 | * **APP:** 支付宝小程序 58 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request_cn.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 功能优化需求 3 | about: 期望组件增强的功能需求 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## 背景 11 | > 请描述你所遇到的问题现状 12 | 13 | 14 | ## 期望 15 | > 请描述你所希望添加的功能 16 | 17 | 18 | ## 思路 19 | > 对于你所描述的问题,是否已有解决方案或者思路,如有可提供作为参考,或者提交你的 PR 、截图 20 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | First of all, thank you for your contribution! :-) 2 | 3 | Please makes sure that these checkboxes are checked before submitting your PR, thank you! 4 | 5 | * [ ] Rebase before creating a PR to keep commit history clear. 6 | * [ ] Add some descriptions and refer relative issues for you PR. 7 | 8 | Extra checklist: 9 | 10 | **if** *isNewFeature* **:** 11 | 12 | * [ ] Update API docs for the component. 13 | * [ ] Update/Add demo to demonstrate new feature. 14 | * [ ] Update TypeScript definition for the component. 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.log 3 | .idea 4 | .entry 5 | .ipr 6 | .iws 7 | *~ 8 | ~* 9 | *.diff 10 | *.patch 11 | *.bak 12 | .DS_Store 13 | package-lock.json 14 | Thumbs.db 15 | .project 16 | .*proj 17 | .svn 18 | *.swp 19 | *.swo 20 | *.pyc 21 | *.pyo 22 | node_modules 23 | .cache 24 | .vscode 25 | *.xcworkspace 26 | .tea 27 | .entry 28 | /build/ 29 | /lib/ 30 | demo/es/ 31 | dist/ 32 | es/ 33 | .kaitian 34 | .mini-ide -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-standard", 3 | "rules": { 4 | at-rule-empty-line-before: null, 5 | at-rule-name-space-after: null, 6 | at-rule-no-unknown: null, 7 | comment-empty-line-before: null, 8 | declaration-bang-space-before: null, 9 | declaration-empty-line-before: null, 10 | function-comma-newline-after: null, 11 | function-name-case: null, 12 | function-parentheses-newline-inside: null, 13 | function-max-empty-lines: null, 14 | function-whitespace-after: null, 15 | indentation: null, 16 | number-leading-zero: null, 17 | number-no-trailing-zeros: null, 18 | rule-empty-line-before: null, 19 | selector-combinator-space-after: null, 20 | selector-list-comma-newline-after: null, 21 | selector-pseudo-element-colon-notation: null, 22 | unit-no-unknown: null, 23 | value-list-max-empty-lines: null, 24 | unit-case: null, 25 | color-hex-case: null, 26 | "selector-type-no-unknown": [ 27 | true, 28 | { 29 | "ignoreTypes": [ 30 | "page" 31 | ] 32 | } 33 | ], 34 | } 35 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT LICENSE 2 | 3 | Copyright (c) 2018-present Alipay.com, https://www.alipay.com/ 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | "Software"), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | [ 4 | '@babel/preset-env', 5 | { 6 | loose: true, 7 | modules: false, 8 | }, 9 | ], 10 | '@babel/preset-typescript', 11 | ], 12 | plugins: [ 13 | '@babel/plugin-syntax-dynamic-import', 14 | '@babel/plugin-transform-runtime', 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /demo/app.acss: -------------------------------------------------------------------------------- 1 | page { 2 | background-color: #f5f5f5; 3 | } -------------------------------------------------------------------------------- /demo/app.js: -------------------------------------------------------------------------------- 1 | App({ 2 | globalData: { 3 | // miniAliUiLang: 'en-US', 4 | }, 5 | onLaunch() { }, 6 | onShow() { }, 7 | onHide() { }, 8 | }); 9 | -------------------------------------------------------------------------------- /demo/mini.project.json: -------------------------------------------------------------------------------- 1 | { 2 | "component2": true, 3 | "axmlStrictCheck": true, 4 | "enableAppxNg": false 5 | } -------------------------------------------------------------------------------- /demo/pages/alphabet/index.acss: -------------------------------------------------------------------------------- 1 | .dyt-list { 2 | margin-top: 0; 3 | } 4 | .dyt-list .am-list-item-thumb { 5 | border-radius: 5px; 6 | } 7 | .dyt-list .am-list-brief { 8 | color: #909090; 9 | font-size: 14px; 10 | } 11 | 12 | .am-list-sticky { 13 | position: sticky; 14 | top: 0; 15 | z-index: 2; 16 | } 17 | -------------------------------------------------------------------------------- /demo/pages/alphabet/index.axml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/pages/alphabet/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | alphabet: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'], 4 | }, 5 | onAlphabetClick(ev) { 6 | my.alert({ 7 | content: JSON.stringify(ev.data), 8 | }); 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /demo/pages/alphabet/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Alphabet", 3 | "usingComponents":{ 4 | "alphabet": "../../es/list/alphabet/index", 5 | "am-icon": "../../es/am-icon/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo/pages/am-checkbox/index.acss: -------------------------------------------------------------------------------- 1 | /* required by usingComponents */ -------------------------------------------------------------------------------- /demo/pages/am-checkbox/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | items: [ 4 | { value: 'a', title: '复选框-默认未选中', id: 'checkbox1' }, 5 | { checked: true, value: 'b', title: '复选框-默认选中', id: 'checkbox2' }, 6 | { checked: true, disabled: true, value: 'c', title: '复选框-默认选中disabled', id: 'checkbox3' }, 7 | ], 8 | items1: [ 9 | { ctrlChecked: false, disabled: false, value: 'd', title: '复选框-默认未选中', id: 'checkbox4' }, 10 | { ctrlChecked: true, disabled: true, value: 'e', title: '复选框-默认未选中disabled', id: 'checkbox5' }, 11 | { ctrlChecked: true, value: 'f', title: '复选框-默认选中', id: 'checkbox6' }, 12 | ], 13 | }, 14 | onChange(e) { 15 | const { id } = e.currentTarget.dataset; 16 | const { value } = e.detail; 17 | const { items1 } = this.data; 18 | const { length } = items1; 19 | for (let index = 0; index < length; index += 1) { 20 | if (items1[index].id === id) { 21 | this.setData({ 22 | [`items1[${index}].ctrlChecked`]: value, 23 | }); 24 | break; 25 | } 26 | } 27 | }, 28 | // 全选 29 | checkedON() { 30 | this.checkedAll(true); 31 | }, 32 | // 全不选 33 | checkedOFF() { 34 | this.checkedAll(false); 35 | }, 36 | checkedAll(status) { 37 | const items1 = this.data.items1.map((element) => ({ 38 | ...element, 39 | ctrlChecked: status, 40 | })); 41 | this.setData({ 42 | items1, 43 | }); 44 | }, 45 | }); 46 | -------------------------------------------------------------------------------- /demo/pages/am-checkbox/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Am-checkbox", 3 | "usingComponents": { 4 | "am-checkbox": "../../es/am-checkbox/index", 5 | "list": "../../es/list/index", 6 | "list-item": "../../es/list/list-item/index", 7 | "button": "../../es/button/index" 8 | } 9 | } -------------------------------------------------------------------------------- /demo/pages/am-icon/index.acss: -------------------------------------------------------------------------------- 1 | .icon-list { 2 | padding-bottom: 10px; 3 | background: #fff; 4 | } 5 | 6 | .icon-item { 7 | display: inline-flex; 8 | width: 33.33333%; 9 | height: 80px; 10 | align-items: center; 11 | flex-direction: column; 12 | justify-content: center; 13 | } 14 | 15 | .icon-desc { 16 | margin-top: 10px; 17 | } 18 | 19 | .searchInput { 20 | width: 100%; 21 | color: #f32600; 22 | background-color: #f5f5f5; 23 | border-bottom: 2rpx solid #eee; 24 | } 25 | -------------------------------------------------------------------------------- /demo/pages/am-icon/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{item}} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | {{item}} 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /demo/pages/am-icon/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Am-icon", 3 | "usingComponents": { 4 | "am-icon": "../../es/am-icon/index" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/pages/am-radio/index.acss: -------------------------------------------------------------------------------- 1 | .radio { 2 | display: flex; align-items: center; 3 | } 4 | .page-section-demo { 5 | padding: 24rpx; 6 | } -------------------------------------------------------------------------------- /demo/pages/am-radio/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 单选框 3 | 4 | 5 |
6 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 20 | 21 | 22 |
23 |
24 |
25 |
-------------------------------------------------------------------------------- /demo/pages/am-radio/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | items: [ 4 | { checked: true, disabled: false, value: 'a', desc: '单选框-默认选中', id: 'checkbox1' }, 5 | { checked: false, disabled: false, value: 'b', desc: '单选框-默认未选中', id: 'checkbox2' }, 6 | ], 7 | items1: [ 8 | { checked: true, disabled: true, value: 'c', desc: '单选框-默认选中disabled', id: 'checkbox3' }, 9 | ], 10 | }, 11 | onSubmit(e) { 12 | my.alert({ 13 | content: e.detail.value.lib, 14 | }); 15 | }, 16 | onReset() { 17 | }, 18 | radioChange() { 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /demo/pages/am-radio/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Am-radio", 3 | "usingComponents": { 4 | "am-radio": "../../es/am-radio/index", 5 | "list": "../../es/list/index", 6 | "list-item": "../../es/list/list-item/index" 7 | } 8 | } -------------------------------------------------------------------------------- /demo/pages/am-switch/index.acss: -------------------------------------------------------------------------------- 1 | page { 2 | padding: 24rpx; 3 | } 4 | .page-description, 5 | .switch-item { 6 | margin-bottom: 24rpx; 7 | } -------------------------------------------------------------------------------- /demo/pages/am-switch/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 开关 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /demo/pages/am-switch/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | switch1Change(e) { 3 | console.log('switch1 发生 change 事件,携带值为', e.detail.value); 4 | }, 5 | }); 6 | -------------------------------------------------------------------------------- /demo/pages/am-switch/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Am-switch", 3 | "usingComponents": { 4 | "am-switch": "../../es/am-switch/index" 5 | } 6 | } -------------------------------------------------------------------------------- /demo/pages/amount-input/index.acss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alibaba-mp/mini-ali-ui/19d221e991d53fc89bdede86a36cfd5da9ef9791/demo/pages/amount-input/index.acss -------------------------------------------------------------------------------- /demo/pages/amount-input/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 16 | -------------------------------------------------------------------------------- /demo/pages/amount-input/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | value: 200, 4 | }, 5 | onInputClear() { 6 | this.setData({ 7 | value: '', 8 | }); 9 | }, 10 | onInputConfirm(e) { 11 | console.log(e); 12 | my.alert({ 13 | content: 'confirmed', 14 | }); 15 | }, 16 | onInput(e) { 17 | console.log(e); 18 | const { value } = e.detail; 19 | this.setData({ 20 | value, 21 | }); 22 | }, 23 | onButtonClick() { 24 | my.alert({ 25 | content: 'button clicked', 26 | }); 27 | }, 28 | onInputFocus(e) { 29 | console.log(e); 30 | }, 31 | onInputBlur(e) { 32 | console.log(e); 33 | }, 34 | }); 35 | -------------------------------------------------------------------------------- /demo/pages/amount-input/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Amount-input", 3 | "usingComponents":{ 4 | "amount-input": "../../es/amount-input/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/pages/avatar/index.acss: -------------------------------------------------------------------------------- 1 | .demo-avatar { 2 | padding: 30rpx; 3 | background-color: #fff; 4 | } 5 | .demo-avatar-size { 6 | display: flex; 7 | } 8 | .demo-avatar-size-container { 9 | margin-right: 30rpx; 10 | display: flex; 11 | flex-direction: column; 12 | align-items: center; 13 | justify-content: flex-end; 14 | } 15 | .demo-avatar-size-container text { 16 | padding-top: 16rpx; 17 | font-size: 26rpx; 18 | } 19 | .demo-avatar-size-intro { 20 | margin-bottom: 20rpx; 21 | font-weight: bold; 22 | } 23 | -------------------------------------------------------------------------------- /demo/pages/avatar/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 四种尺寸 4 | 5 | 6 | 7 | lg 8 | 9 | 10 | 11 | 默认值:md 12 | 13 | 14 | 15 | sm 16 | 17 | 18 | 19 | xs 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /demo/pages/avatar/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: {}, 3 | handleError(e) { 4 | console.log(e); 5 | }, 6 | }); 7 | -------------------------------------------------------------------------------- /demo/pages/avatar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Avatar", 3 | "usingComponents":{ 4 | "avatar": "../../es/avatar/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/pages/badge/index.acss: -------------------------------------------------------------------------------- 1 | .list-like { 2 | display: flex; 3 | background: #fff; 4 | padding: 12px; 5 | justify-content: space-between; 6 | border-bottom: 1px solid #eee; 7 | } -------------------------------------------------------------------------------- /demo/pages/badge/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 10 | 12 | 13 | {{item.intro}} 14 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 32 | 深色底时,stroke 可设为 true 33 | 38 | 39 | -------------------------------------------------------------------------------- /demo/pages/badge/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | items: [ 4 | { 5 | dot: true, 6 | text: '', 7 | isWrap: true, 8 | intro: 'Dot Badge', 9 | }, 10 | { 11 | dot: false, 12 | text: 1, 13 | isWrap: true, 14 | intro: 'Text Badge', 15 | }, 16 | { 17 | dot: false, 18 | text: 99, 19 | isWrap: false, 20 | intro: '数字', 21 | }, 22 | { 23 | dot: false, 24 | text: 100, 25 | overflowCount: 99, 26 | isWrap: false, 27 | intro: '数字超过overflowCount', 28 | }, 29 | { 30 | dot: false, 31 | text: 'new', 32 | isWrap: false, 33 | intro: '文字', 34 | }, 35 | { 36 | dot: false, 37 | text: '22222222222222', 38 | isWrap: false, 39 | intro: '箭头中', 40 | withArrow: true, 41 | direction: 'middle', 42 | }, 43 | { 44 | dot: false, 45 | text: 'left arrow', 46 | isWrap: false, 47 | intro: '箭头左', 48 | withArrow: true, 49 | direction: 'left', 50 | }, 51 | { 52 | dot: false, 53 | text: 'right arrow', 54 | isWrap: false, 55 | intro: '箭头右', 56 | withArrow: true, 57 | direction: 'right', 58 | }, 59 | ], 60 | }, 61 | }); 62 | -------------------------------------------------------------------------------- /demo/pages/badge/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Badge", 3 | "usingComponents": { 4 | "list-item": "../../es/list/list-item/index", 5 | "badge": "../../es/badge/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/button/index.acss: -------------------------------------------------------------------------------- 1 | .container { 2 | padding: 20rpx; 3 | } 4 | 5 | .container button { 6 | margin-bottom: 24rpx; 7 | } 8 | 9 | .title { 10 | padding-top: 24rpx; 11 | font-weight: bold; 12 | } 13 | .inputItem { 14 | margin: 16rpx 0 24rpx; 15 | padding: 8rpx 16rpx; 16 | font-size: 30rpx; 17 | border: 1px solid #eee; 18 | } 19 | .radio-group { 20 | display: flex; 21 | flex-wrap: wrap; 22 | margin-bottom: 24rpx; 23 | } 24 | .radio { 25 | display: flex; 26 | align-items: center; 27 | margin-right: 16rpx; 28 | } 29 | .changeItem { 30 | display: flex; 31 | align-items: center; 32 | margin-bottom: 24rpx; 33 | } -------------------------------------------------------------------------------- /demo/pages/button/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Button", 3 | "usingComponents": { 4 | "button": "../../es/button/index", 5 | "container": "../../es/container/index", 6 | "radio": "../../es/am-radio/index", 7 | "checkbox": "../../es/am-checkbox/index" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/pages/calendar/index.acss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alibaba-mp/mini-ali-ui/19d221e991d53fc89bdede86a36cfd5da9ef9791/demo/pages/calendar/index.acss -------------------------------------------------------------------------------- /demo/pages/calendar/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | -------------------------------------------------------------------------------- /demo/pages/calendar/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | tagData: [ 4 | { date: '2020-02-14', tag: '颜色 1', tagColor: 1 }, 5 | { date: '2020-02-28', tag: '公积金', tagColor: 2 }, 6 | { date: '2020-02-24', tag: '颜色 3', tagColor: 3 }, 7 | { date: '2020-02-18', tag: '颜色 4', tagColor: 4 }, 8 | { date: '2020-02-4', tag: '还房贷', tagColor: 5 }, 9 | { date: '2020-02-10', tag: '公积金', disable: true }, 10 | ], 11 | }, 12 | onLoad() { 13 | const getDate = new Date(); 14 | const getYear = getDate.getFullYear(); 15 | const getMonth = getDate.getMonth(); 16 | let m = getMonth + 1; 17 | if (m.toString().length === 1) { 18 | m = '0' + m; 19 | } 20 | this.setData({ 21 | tagData: [ 22 | { date: getYear + '-' + m + '-14', tag: '颜色 1', tagColor: 1 }, 23 | { date: getYear + '-' + m + '-28', tag: '公积金', tagColor: 2 }, 24 | { date: getYear + '-' + m + '-24', tag: '颜色 3', tagColor: 3 }, 25 | { date: getYear + '-' + m + '-18', tag: '颜色 4', tagColor: 4 }, 26 | { date: getYear + '-' + m + '-4', tag: '还房贷', tagColor: 5 }, 27 | { date: getYear + '-' + m + '-10', tag: '公积金', disable: true }, 28 | ], 29 | }); 30 | }, 31 | handleSelect() {}, 32 | onMonthChange() {}, 33 | onYearChange() {}, 34 | onChange() {}, 35 | onSelectHasDisableDate() { 36 | my.alert({ 37 | content: 'SelectHasDisableDate', 38 | }); 39 | }, 40 | }); 41 | -------------------------------------------------------------------------------- /demo/pages/calendar/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Calendar", 3 | "usingComponents":{ 4 | "calendar":"../../es/calendar/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/pages/card/index.acss: -------------------------------------------------------------------------------- 1 | .container { 2 | padding-bottom: 50px; 3 | } -------------------------------------------------------------------------------- /demo/pages/card/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | 24 | 25 | 26 | 27 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /demo/pages/card/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | thumb: 'https://gw.alipayobjects.com/mdn/rms_ce4c6f/afts/img/A*b-kqQ4RZgsYAAAAAAAAAAABkARQnAQ', 4 | expand3rd: false, 5 | }, 6 | onCardClick(ev) { 7 | my.alert({ 8 | content: ev.info, 9 | }); 10 | }, 11 | onActionClick() { 12 | my.alert({ 13 | content: 'action clicked', 14 | }); 15 | }, 16 | onExtraActionClick() { 17 | my.alert({ 18 | content: 'extra action clicked', 19 | }); 20 | }, 21 | toggle() { 22 | this.setData({ 23 | expand3rd: !this.data.expand3rd, 24 | }); 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /demo/pages/card/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Card", 3 | "usingComponents":{ 4 | "card":"../../es/card/index" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /demo/pages/collapse/index.acss: -------------------------------------------------------------------------------- 1 | .item-content { 2 | padding: 12px; 3 | font-size: 17px; 4 | color: #333; 5 | line-height: 24px; 6 | } 7 | 8 | .content1 { 9 | height: 300rpx; 10 | } 11 | 12 | .content2 { 13 | height: 50px; 14 | } 15 | 16 | .content3 { 17 | height: 100px; 18 | } 19 | 20 | .demo-title { 21 | padding: 14px 16px; 22 | color: #999; 23 | } 24 | 25 | .demo-collapse { 26 | border-bottom: 1px solid #eee; 27 | } 28 | -------------------------------------------------------------------------------- /demo/pages/collapse/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | randomLine: 0, 4 | }, 5 | onShow() { 6 | this.setData({ 7 | randomLine: parseInt(Math.random() * 20 + 1, 0), 8 | }); 9 | }, 10 | onChange(e) { 11 | console.log('collapse change', e); 12 | }, 13 | }); 14 | -------------------------------------------------------------------------------- /demo/pages/collapse/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Collapse", 3 | "usingComponents": { 4 | "collapse": "../../es/collapse/index", 5 | "collapse-item": "../../es/collapse/collapse-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/container/index.acss: -------------------------------------------------------------------------------- 1 | .container { 2 | background: #F5F5F5; 3 | padding: 24rpx; 4 | height: 100%; 5 | } 6 | 7 | .container-item { 8 | margin-bottom: 24rpx; 9 | } 10 | 11 | .footer { 12 | color: #333; 13 | margin-top: 24rpx; 14 | } 15 | 16 | .item { 17 | background: #eeeeee; 18 | text-align: center; 19 | height: 200rpx; 20 | padding-top: 20rpx; 21 | } 22 | 23 | .grid-item { 24 | background: #eeeeee; 25 | text-align: center; 26 | } 27 | -------------------------------------------------------------------------------- /demo/pages/container/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: {}, 3 | onLoad() {}, 4 | titleClick() { 5 | my.alert({ 6 | title: 'onActionTap 回调', 7 | content: '标题后面操作区域点击', 8 | }); 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /demo/pages/container/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Container", 3 | "usingComponents": { 4 | "container": "../../es/container/index", 5 | "title": "../../es/title/index" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /demo/pages/coupon/index.acss: -------------------------------------------------------------------------------- 1 | .container { 2 | padding-bottom: 50px; 3 | } 4 | .coupon_rule text { 5 | display: block; 6 | margin-bottom: 8rpx; 7 | } 8 | 9 | /* 左侧权益内容的样式 slot="category" */ 10 | .categoryDemo { 11 | display: flex; 12 | flex-wrap: wrap; 13 | justify-content: center; 14 | align-content: center; 15 | align-items: baseline; 16 | align-self: flex-start; 17 | } 18 | .categoryDemo .price { 19 | font-size: 60rpx; 20 | color: #FF6010; 21 | } 22 | .categoryDemo .unit { 23 | padding-left: 4rpx; 24 | font-weight: bold; 25 | font-size: 26rpx; 26 | color: #FF6010; 27 | } 28 | .categoryDemo .type { 29 | flex: 1 1 100%; 30 | text-align: center; 31 | font-size: 22rpx; 32 | color: #999; 33 | } -------------------------------------------------------------------------------- /demo/pages/coupon/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | thumb: 'https://gw.alipayobjects.com/mdn/rms_ce4c6f/afts/img/A*b-kqQ4RZgsYAAAAAAAAAAABkARQnAQ', 4 | }, 5 | onCouponClick(e) { 6 | if (e.currentTarget.dataset.used) { 7 | return false; 8 | } else { 9 | my.alert({ 10 | content: '可用票券,票券点击事件', 11 | }); 12 | } 13 | }, 14 | onButtonTap() { 15 | my.alert({ 16 | content: '胶囊按钮点击事件', 17 | }); 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /demo/pages/coupon/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Coupon", 3 | "usingComponents":{ 4 | "coupon":"../../es/coupon/index", 5 | "button": "../../es/button/index", 6 | "am-checkbox": "../../es/am-checkbox/index", 7 | "stepper": "../../es/stepper/index" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/pages/filter/alternative/index.acss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alibaba-mp/mini-ali-ui/19d221e991d53fc89bdede86a36cfd5da9ef9791/demo/pages/filter/alternative/index.acss -------------------------------------------------------------------------------- /demo/pages/filter/alternative/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/pages/filter/alternative/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | show: true, 4 | items: [ 5 | { id: 1, value: '衣服', selected: true }, 6 | { id: 1, value: '橱柜' }, 7 | { id: 1, value: '衣架' }, 8 | { id: 3, value: '数码产品' }, 9 | { id: 4, value: '防盗门' }, 10 | { id: 5, value: '椅子' }, 11 | { id: 7, value: '显示器' }, 12 | { id: 6, value: '某最新款电子产品' }, 13 | { id: 8, value: '某某某某某牌电视游戏底座' }, 14 | ], 15 | }, 16 | handleCallBack(data) { 17 | my.alert({ 18 | content: data, 19 | }); 20 | }, 21 | toggleFilter() { 22 | this.setData({ 23 | show: !this.data.show, 24 | }); 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /demo/pages/filter/alternative/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Filter", 3 | "usingComponents": { 4 | "filter": "../../../es/filter/index", 5 | "filter-item": "../../../es/filter/filter-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/filter/index.acss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Alibaba-mp/mini-ali-ui/19d221e991d53fc89bdede86a36cfd5da9ef9791/demo/pages/filter/index.acss -------------------------------------------------------------------------------- /demo/pages/filter/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 单行2列 5 | 6 | 7 | 单行3列 8 | 9 | 10 | 双行2列 11 | 12 | 13 | 多选 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /demo/pages/filter/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | openPage(e) { 3 | my.navigateTo({ 4 | url: e.target.dataset.url, 5 | }); 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /demo/pages/filter/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Filter", 3 | "usingComponents": { 4 | "list": "../../es/list/index", 5 | "list-item": "../../es/list/list-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/filter/single/index.acss: -------------------------------------------------------------------------------- 1 | /* required by usingComponents */ -------------------------------------------------------------------------------- /demo/pages/filter/single/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/pages/filter/single/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | show: true, 4 | items: [ 5 | { id: 1, value: '衣服', selected: true }, 6 | { id: 1, value: '橱柜' }, 7 | ], 8 | }, 9 | handleCallBack(data) { 10 | my.alert({ 11 | content: data, 12 | }); 13 | }, 14 | toggleFilter() { 15 | this.setData({ 16 | show: !this.data.show, 17 | }); 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /demo/pages/filter/single/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Filter", 3 | "usingComponents": { 4 | "filter": "../../../es/filter/index", 5 | "filter-item": "../../../es/filter/filter-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/filter/single_1/index.acss: -------------------------------------------------------------------------------- 1 | /* required by usingComponents */ -------------------------------------------------------------------------------- /demo/pages/filter/single_1/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/pages/filter/single_1/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | show: true, 4 | items: [ 5 | { id: 1, value: '衣服啊', selected: true }, 6 | { id: 1, value: '橱柜' }, 7 | { id: 1, value: '衣服' }, 8 | { id: 1, value: '橱柜' }, 9 | { id: 1, value: '衣服' }, 10 | { id: 1, value: '橱柜' }, 11 | { id: 1, value: '衣服' }, 12 | { id: 1, value: '橱柜' }, 13 | { id: 1, value: '橱柜' }, 14 | ], 15 | }, 16 | handleCallBack(data) { 17 | my.alert({ 18 | content: data, 19 | }); 20 | }, 21 | toggleFilter() { 22 | this.setData({ 23 | show: !this.data.show, 24 | }); 25 | }, 26 | }); 27 | -------------------------------------------------------------------------------- /demo/pages/filter/single_1/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Filter", 3 | "usingComponents": { 4 | "filter": "../../../es/filter/index", 5 | "filter-item": "../../../es/filter/filter-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/filter/single_2/index.acss: -------------------------------------------------------------------------------- 1 | /* required by usingComponents */ -------------------------------------------------------------------------------- /demo/pages/filter/single_2/index.axml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /demo/pages/filter/single_2/index.js: -------------------------------------------------------------------------------- 1 | Page({ 2 | data: { 3 | show: true, 4 | items: [ 5 | { id: 1, value: '衣服', subtitle: '子标题', selected: true }, 6 | { id: 1, value: '橱柜', subtitle: '子标题' }, 7 | ], 8 | }, 9 | handleCallBack(data) { 10 | my.alert({ 11 | content: data, 12 | }); 13 | }, 14 | toggleFilter() { 15 | this.setData({ 16 | show: !this.data.show, 17 | }); 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /demo/pages/filter/single_2/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Filter", 3 | "usingComponents": { 4 | "filter": "../../../es/filter/index", 5 | "filter-item": "../../../es/filter/filter-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/flex/index.acss: -------------------------------------------------------------------------------- 1 | .flex-container { 2 | padding: 10px; 3 | } 4 | 5 | .sub-title { 6 | color: #888; 7 | font-size: 14px; 8 | padding: 30px 0 18px 0; 9 | } 10 | 11 | .placeholder { 12 | background-color: #ebebef; 13 | color: #bbb; 14 | text-align: center; 15 | height: 30px; 16 | line-height: 30px; 17 | width: 100%; 18 | } 19 | 20 | .placeholder.inline { 21 | width: 80px; 22 | margin: 9px 9px 9px 0; 23 | } 24 | 25 | .placeholder.small { 26 | height: 20px; 27 | line-height: 20px 28 | } -------------------------------------------------------------------------------- /demo/pages/flex/index.js: -------------------------------------------------------------------------------- 1 | Page({}); 2 | -------------------------------------------------------------------------------- /demo/pages/flex/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultTitle": "Flex", 3 | "usingComponents": { 4 | "flex": "../../es/flex/index", 5 | "flex-item": "../../es/flex/flex-item/index" 6 | } 7 | } -------------------------------------------------------------------------------- /demo/pages/footer/index.acss: -------------------------------------------------------------------------------- 1 | page { 2 | padding-top: 20px; 3 | background-color: #fff; 4 | } 5 | .am-footer { 6 | margin-bottom: 40px; 7 | } -------------------------------------------------------------------------------- /demo/pages/footer/index.axml: -------------------------------------------------------------------------------- 1 |