diff --git a/.eslintrc.js b/.eslintrc.js
index 7f088000e..c9ea7f852 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -96,7 +96,7 @@ module.exports = {
},
},
{
- files: ['example/**'],
+ files: ['example/**', '**/_example/**'],
rules: {
'no-console': 0,
},
diff --git a/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml b/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml
index 523842337..d1e1dc878 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.zh-CN.yml
@@ -1,6 +1,6 @@
name: 反馈 Bug
description: 通过 github 模板进行 Bug 反馈。
-title: "[组件名称] 描述问题的标题"
+title: '[组件名称] 描述问题的标题'
body:
- type: markdown
attributes:
@@ -51,25 +51,13 @@ body:
id: frameworkVersion
attributes:
label: 框架版本
- placeholder: Vue(3.2.0)
-
- - type: input
- id: browsersVersion
- attributes:
- label: 浏览器版本
- placeholder: Chrome(8.213.231.123)
+ placeholder: miniprogram(3.2.0)
- type: input
id: systemVersion
attributes:
- label: 系统版本
- placeholder: MacOS(11.2.3)
-
- - type: input
- id: nodeVersion
- attributes:
- label: Node版本
- placeholder: 请填写
+ label: 基础库版本
+ placeholder: 2.11.3
- type: textarea
id: remarks
diff --git a/.github/actions/install-dep/action.yml b/.github/actions/install-dep/action.yml
index 1c634a483..93a44b5a0 100644
--- a/.github/actions/install-dep/action.yml
+++ b/.github/actions/install-dep/action.yml
@@ -6,7 +6,7 @@ on:
nodeVersion:
required: false
type: string
- default: '12'
+ default: '14'
runs:
using: "composite"
@@ -14,5 +14,16 @@ runs:
- uses: actions/setup-node@v2
with:
node-version: ${{ inputs.nodeVersion }}
+ - name: Get npm cache directory
+ id: npm-cache-dir
+ shell: bash
+ run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
+ - uses: actions/cache@v3
+ id: npm-cache # use this to check for `cache-hit` ==> if: steps.npm-cache.outputs.cache-hit != 'true'
+ with:
+ path: ${{ steps.npm-cache-dir.outputs.dir }}
+ key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
+ restore-keys: |
+ ${{ runner.os }}-node-
- run: npm install
shell: bash
\ No newline at end of file
diff --git a/.github/issue-shoot.md b/.github/issue-shoot.md
new file mode 100644
index 000000000..ec7496d35
--- /dev/null
+++ b/.github/issue-shoot.md
@@ -0,0 +1,7 @@
+## IssueShoot
+- 预估时长: {{ .duration }}
+- 期望完成时间: {{ .deadline }}
+- 开发难度: {{ .level }}
+- 参与人数: 1
+- 验收标准: 实现期望改造效果,提 PR 并通过验收无误
+- 备注: 最终激励以实际提交 `pull request` 并合并为准
diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml
new file mode 100644
index 000000000..57b5d26b6
--- /dev/null
+++ b/.github/workflows/auto-release.yml
@@ -0,0 +1,89 @@
+name: Auto Release
+
+on:
+ pull_request:
+ branches: [develop]
+ types: [opened, synchronize, reopened, closed]
+ paths:
+ - 'package.json'
+ issue_comment:
+ types: [edited]
+
+jobs:
+ generator:
+ runs-on: ubuntu-latest
+ if: >
+ github.event_name == 'pull_request' &&
+ github.event.pull_request.merged == false &&
+ startsWith(github.head_ref, 'release/')
+ steps:
+ - run: echo "The head of this PR starts with 'release/'"
+ - uses: actions/checkout@v3
+ - uses: 94dreamer/auto-release@develop
+ id: changelog
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Add comment
+ uses: peter-evans/create-or-update-comment@v1
+ with:
+ issue-number: ${{ github.event.pull_request.number }}
+ body: |
+ ${{ steps.changelog.outputs.changelog }}
+ comment_add_log:
+ runs-on: ubuntu-latest
+ if: >
+ github.event_name == 'issue_comment'
+ && github.event.issue.pull_request
+ && github.event.sender.login == github.event.issue.user.login
+ && startsWith(github.event.comment.body, '## 🌈 ')
+ steps:
+ - id: comment
+ shell: bash
+ run: |
+ result=$(curl ${{github.event.issue.pull_request.url}} -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}")
+ headrefreg='"ref": "(release/[[:digit:]]{1,2}\.[[:digit:]]{1,2}\.[[:digit:]]{1,2})",'
+ if [[ $result =~ $headrefreg ]]
+ then
+ echo "属于 release pr 的 comment ${BASH_REMATCH[1]}"
+ else
+ echo "不属于 release pr 的 comment" && exit 1
+ fi
+ echo "branch=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT
+ # zsh $match[1]
+ - uses: actions/checkout@v3
+ with:
+ ref: ${{ steps.comment.outputs.branch }}
+ - run: echo '${{ github.event.comment.body }}'
+ - name: Commit and push if needed
+ run: |
+ txt=$(cat CHANGELOG.md)
+ body='${{ github.event.comment.body }}'
+ echo "${txt%%##*}${body}${txt##*---}" > CHANGELOG.md
+ git add .
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ git commit -m "chore: changelog's changes"
+ git push
+ echo "💾 pushed changelog's changes"
+ merge_tag:
+ runs-on: ubuntu-latest
+ if: >
+ github.event_name == 'pull_request' &&
+ github.event.pull_request.merged == true &&
+ startsWith(github.head_ref, 'release/')
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ ref: develop
+ token: ${{ secrets.PERSONAL_TOKEN }}
+ - name: tag and push if needed
+ run: |
+ data=$(cat package.json)
+ re="\"version\": \"([^\"]*)\""
+ [[ $data =~ $re ]]
+ echo "${BASH_REMATCH[1]}"
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
+ git config --local user.name "github-actions[bot]"
+ git tag ${BASH_REMATCH[1]}
+ git push origin ${BASH_REMATCH[1]}
+ echo "pushed tag ${BASH_REMATCH[1]}"
diff --git a/.github/workflows/issue-assignees.temp.yml b/.github/workflows/issue-assignees.temp.yml
index 83d5d6b87..643436136 100644
--- a/.github/workflows/issue-assignees.temp.yml
+++ b/.github/workflows/issue-assignees.temp.yml
@@ -3,7 +3,7 @@ name: Issue Add Assigness
on:
issues:
- types: [opened, edited]
+ types: [opened]
jobs:
mark-duplicate:
@@ -36,7 +36,7 @@ jobs:
- run: |
contributors=${{ steps.assignees.outputs.contributors }}
contributorstring=${contributors//,/ @}
- echo "::set-output name=string::@$contributorstring"
+ echo "string=@$contributorstring" >> $GITHUB_OUTPUT
id: contributors
- name: 通知贡献者
diff --git a/.github/workflows/issue-help-wanted.temp.yml b/.github/workflows/issue-help-wanted.temp.yml
index 94e9bbdf5..35a51f295 100644
--- a/.github/workflows/issue-help-wanted.temp.yml
+++ b/.github/workflows/issue-help-wanted.temp.yml
@@ -1,22 +1,22 @@
-# force copy from tencent/tdesign
name: Issue Help wanted
+
on:
issues:
- types:
- - labeled
+ types: [labeled]
+
jobs:
add-comment:
- if: github.event.label.name == 'help wanted'
runs-on: ubuntu-latest
- permissions:
- issues: write
+ if: github.event.label.name == 'help wanted'
steps:
- name: Add comment
- uses: peter-evans/create-or-update-comment@v1
+ uses: actions-cool/issues-helper@v3
with:
+ actions: 'create-comment'
+ token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
任何人都可以处理此问题。
**请务必在您的 `pull request` 中引用此问题。** :sparkles:
感谢你的贡献! :sparkles:
- reactions: heart
\ No newline at end of file
+ emoji: 'heart'
diff --git a/.github/workflows/issue-label.yml b/.github/workflows/issue-label.yml
new file mode 100644
index 000000000..ec009a0c0
--- /dev/null
+++ b/.github/workflows/issue-label.yml
@@ -0,0 +1,50 @@
+name: issue on label
+on:
+ issues:
+ types: ['labeled']
+jobs:
+ add-issueshoot-template:
+ runs-on: ubuntu-latest
+ if: contains(fromJSON('["easy", "middle", "hard"]'), github.event.label.name)
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Get token
+ id: token
+ run: |
+ label=${{ github.event.label.name }}
+ if [[ $label = "easy" ]]
+ then
+ echo "level=低" >> $GITHUB_OUTPUT
+ echo "duration=1" >> $GITHUB_OUTPUT
+ deadline=$(date -d "+3 days" +'%Y-%m-%d')
+ echo "deadline=${deadline}" >> $GITHUB_OUTPUT
+ elif [[ $label = "middle" ]]
+ then
+ echo "level=中" >> $GITHUB_OUTPUT
+ echo "duration=3" >> $GITHUB_OUTPUT
+ deadline=$(date -d "+7 days" +'%Y-%m-%d')
+ echo "deadline=${deadline}" >> $GITHUB_OUTPUT
+ else
+ echo "level=高" >> $GITHUB_OUTPUT
+ echo "duration=5" >> $GITHUB_OUTPUT
+ deadline=$(date -d "+10 days" +'%Y-%m-%d')
+ echo "deadline=${deadline}" >> $GITHUB_OUTPUT
+ fi
+ - name: Create template
+ id: template
+ uses: chuhlomin/render-template@v1.4
+ with:
+ template: .github/issue-shoot.md
+ vars: |
+ level: ${{ steps.token.outputs.level }}
+ duration: ${{ steps.token.outputs.duration }}
+ deadline: ${{ steps.token.outputs.deadline }}
+ - name: Update issue
+ uses: actions-cool/issues-helper@v3
+ with:
+ actions: 'update-issue'
+ token: ${{ secrets.GITHUB_TOKEN }}
+ issue-number: ${{ github.event.issue.number }}
+ body: ${{ steps.template.outputs.result }}
+ update-mode: 'append'
\ No newline at end of file
diff --git a/.github/workflows/issue-mark-duplicate.temp.yml b/.github/workflows/issue-mark-duplicate.temp.yml
index 301772324..a0f408354 100644
--- a/.github/workflows/issue-mark-duplicate.temp.yml
+++ b/.github/workflows/issue-mark-duplicate.temp.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: mark-duplicate
- uses: actions-cool/issues-helper@v2
+ uses: actions-cool/issues-helper@v3
with:
actions: "mark-duplicate"
token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/issue-reply.temp.yml b/.github/workflows/issue-reply.temp.yml
index 271a94f53..b6f13edcb 100644
--- a/.github/workflows/issue-reply.temp.yml
+++ b/.github/workflows/issue-reply.temp.yml
@@ -13,7 +13,7 @@ jobs:
steps:
- name: Need Reproduce
if: github.event.label.name == 'Need Reproduce'
- uses: actions-cool/issues-helper@v2
+ uses: actions-cool/issues-helper@v3
with:
actions: 'create-comment'
issue-number: ${{ github.event.issue.number }}
diff --git a/.github/workflows/issue-stale-close.temp.yml b/.github/workflows/issue-stale-close.temp.yml
index 14e04f4b5..8fb20e902 100644
--- a/.github/workflows/issue-stale-close.temp.yml
+++ b/.github/workflows/issue-stale-close.temp.yml
@@ -18,9 +18,9 @@ jobs:
stale-pr-message: '这个 PR 已经过时了,因为它已经持续 45 天没有任何活动了。 删除 stale 的标签或评论,否则将在 10 天内关闭。'
close-issue-message: "此 Issue 被自动关闭,因为它自被标记为过时 stale 以来已闲置 7 天。"
close-pr-message: "此 PR 被自动关闭,因为它已经 stable 停滞了 10 天,没有任何活动。"
- days-before-stale: 30
+ days-before-stale: -1
days-before-close: 7
- days-before-pr-stale: 45
+ days-before-pr-stale: -1
days-before-pr-close: 10
repo-token: ${{ secrets.GITHUB_TOKEN }}
exempt-issue-labels: 'WIP'
diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml
new file mode 100644
index 000000000..96b37fab4
--- /dev/null
+++ b/.github/workflows/preview.yml
@@ -0,0 +1,67 @@
+name: PREVIEW
+
+on:
+ issue_comment:
+ types: [created]
+
+jobs:
+ request-preview:
+ runs-on: ubuntu-latest
+ if: github.event_name == 'issue_comment' && github.event.issue.pull_request && startsWith(github.event.comment.body, '预览')
+ steps:
+ - run: |
+ timestamp=$(date +%s)
+ echo "timestamp=${timestamp}" >> $GITHUB_OUTPUT
+ id: time
+ - name: Comment PR
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ message: |
+ 正在构建预览的二维码,请稍等...
+ comment_tag: ${{steps.time.outputs.timestamp}}
+ - uses: LeeJim/pull-request-comment-branch@main
+ id: comment-branch
+ - uses: actions/checkout@v3
+ if: success()
+ with:
+ ref: ${{ steps.comment-branch.outputs.head_ref }}
+ repository: ${{ steps.comment-branch.outputs.head_repo_name_with_owner }}
+ - uses: ./.github/actions/install-dep
+ - run: npm run build
+ shell: bash
+ - id: get-robot
+ run: |
+ comment=${{ env.comment }}
+ echo "robot=${comment: 2: 1}" >> $GITHUB_OUTPUT
+ shell: bash
+ env:
+ comment: ${{ github.event.comment.body }}
+ - name: get preview qrcode
+ id: preview
+ uses: LeeJim/setup-miniprogram@main
+ with:
+ project_type: miniProgram
+ action_type: preview
+ project_path: ./_example
+ es6: true
+ es7: true
+ minify: true
+ robot: ${{ steps.get-robot.outputs.robot }}
+ env:
+ MINI_APP_ID: ${{ secrets.TDESIGN_APP_ID }}
+ MINI_APP_PRIVATE_KEY: ${{ secrets.TDESIGN_MINI_KEY }}
+ - name: Upload qrcode to Tencent COS
+ uses: LeeJim/tencent-cos-action@main
+ id: cos
+ with:
+ secretId: ${{ secrets.TENCENT_COS_SECRET_ID }}
+ secretKey: ${{ secrets.TENCENT_COS_SECRET_KEY }}
+ bucket: mp-qrcode-1255404841
+ region: ap-guangzhou
+ content: ${{ steps.preview.outputs.preview-qrcode }}
+ - name: Comment PR
+ uses: thollander/actions-comment-pull-request@v2
+ with:
+ message: |
+
+ comment_tag: ${{steps.time.outputs.timestamp}}
diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml
index da0d09879..55d3dc282 100644
--- a/.github/workflows/pull-request.yml
+++ b/.github/workflows/pull-request.yml
@@ -1,12 +1,12 @@
name: MAIN_PULL_REQUEST
on:
- pull_request:
+ pull_request:
branches: [develop, main]
types: [opened, synchronize, reopened]
jobs:
- check:
+ check-email:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -19,10 +19,12 @@ jobs:
- name: check_local_email
run: |
log_emails=$(git log --pretty=format:"%ae %ce" -1) && if [[ ${log_emails} =~ '@tencent.com' ]];then echo "本地提交邮箱 $log_emails 校验非法,需要本地更改重新提交" && exit 2;else echo "邮箱 $log_emails 校验通过";fi
- MAIN_PULL_REQUEST:
+ lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-dep
- name: lint 检查
- run: npm run lint
\ No newline at end of file
+ run: npm run lint
+ - name: unit test
+ run: npm run test:unit
diff --git a/.github/workflows/tag-push.yml b/.github/workflows/tag-push.yml
index 281dc586e..26fd779cc 100644
--- a/.github/workflows/tag-push.yml
+++ b/.github/workflows/tag-push.yml
@@ -32,6 +32,7 @@ jobs:
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.TDESIGN_NPM_TOKEN }}
+ tag: ${{ contains(github.ref_name, 'alpha') && 'alpha' || 'latest' }}
- if: steps.publish.outputs.type != 'none'
run: |
echo "Version changed: ${{ steps.publish.outputs.old-version }} => ${{ steps.publish.outputs.version }}"
diff --git a/.gitignore b/.gitignore
index 2155be81c..a824d344e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,12 +2,17 @@ _site
miniprogram_dist
_wechatide
dist
-_example
+/_example
+example/pages/*
+!example/pages/gulp-error
+!example/pages/home
test/e2e
test/unit
+test/unit-virtualHost
.DS_Store
node_modules
package-lock.json
+yarn.lock
# Log files
npm-debug.log*
@@ -21,4 +26,5 @@ yarn-error.log*
*.njsproj
*.sln
*.sw*
-tdesign-miniprogram
\ No newline at end of file
+tdesign-miniprogram
+m2w_dist
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 000000000..d0faca056
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "src/_common"]
+ path = src/_common
+ url = https://github.com/Tencent/tdesign-common.git
diff --git a/.templates/$$var_template/$$var_filename.js b/.templates/$$var_template/$$var_filename.js
new file mode 100644
index 000000000..6420b1220
--- /dev/null
+++ b/.templates/$$var_template/$$var_filename.js
@@ -0,0 +1 @@
+Component({})
\ No newline at end of file
diff --git a/.templates/$$var_template/$$var_filename.json b/.templates/$$var_template/$$var_filename.json
new file mode 100644
index 000000000..53902317a
--- /dev/null
+++ b/.templates/$$var_template/$$var_filename.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "t-$$var_textInFile": "tdesign-miniprogram/$$var_textInFile/$$var_textInFile"
+ }
+}
\ No newline at end of file
diff --git a/.templates/$$var_template/$$var_filename.wxml b/.templates/$$var_template/$$var_filename.wxml
new file mode 100644
index 000000000..427afe3ed
--- /dev/null
+++ b/.templates/$$var_template/$$var_filename.wxml
@@ -0,0 +1 @@
+
diff --git a/example/pages/button-group/button-group.less b/.templates/$$var_template/$$var_filename.wxss
similarity index 100%
rename from example/pages/button-group/button-group.less
rename to .templates/$$var_template/$$var_filename.wxss
diff --git a/.templates/.editorconfig b/.templates/.editorconfig
new file mode 100644
index 000000000..689fb502a
--- /dev/null
+++ b/.templates/.editorconfig
@@ -0,0 +1,21 @@
+# @see https://editorconfig-specification.readthedocs.io/en/latest/
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 2
+charset = utf-8
+
+# 4 space indentation
+[*.py]
+indent_style = space
+indent_size = 4
+
+# Tab indentation (no size specified)
+[Makefile]
+indent_style = tab
diff --git a/.templates/_example/$$var_filename.js b/.templates/_example/$$var_filename.js
new file mode 100644
index 000000000..6420b1220
--- /dev/null
+++ b/.templates/_example/$$var_filename.js
@@ -0,0 +1 @@
+Component({})
\ No newline at end of file
diff --git a/qq/example/components/pull-down-list/index.json b/.templates/_example/$$var_filename.json
similarity index 100%
rename from qq/example/components/pull-down-list/index.json
rename to .templates/_example/$$var_filename.json
diff --git a/.templates/_example/$$var_filename.wxml b/.templates/_example/$$var_filename.wxml
new file mode 100644
index 000000000..b1a96ad77
--- /dev/null
+++ b/.templates/_example/$$var_filename.wxml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/example/pages/fab/fab.less b/.templates/_example/$$var_filename.wxss
similarity index 100%
rename from example/pages/fab/fab.less
rename to .templates/_example/$$var_filename.wxss
diff --git a/.vscode/component.code-snippets b/.vscode/component.code-snippets
new file mode 100644
index 000000000..16014ccb7
--- /dev/null
+++ b/.vscode/component.code-snippets
@@ -0,0 +1,14 @@
+{
+ "component-json-template": {
+ "prefix": "cjson",
+ "body": ["{", " \"usingComponents\": {", " \"t-$1\": \"tdeisgn-miniprogram/$1/$1\"", " }", "}"],
+ "scope": "json",
+ "description": "组件 JSON"
+ },
+ "component-js-template": {
+ "prefix": "ccjs",
+ "body": ["Component({});", ""],
+ "scope": "javascript, typescript",
+ "description": "组件 JS"
+ }
+}
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 000000000..ec06f201d
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,14 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "command": "npm run test:unit popup",
+ "name": "Run unit test",
+ "request": "launch",
+ "type": "node-terminal"
+ },
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/new.code-snippets b/.vscode/new.code-snippets
new file mode 100644
index 000000000..045b438b0
--- /dev/null
+++ b/.vscode/new.code-snippets
@@ -0,0 +1,37 @@
+{
+ "component-json-template": {
+ "prefix": "newts",
+ "body": [
+ "import { SuperComponent, wxComponent } from '../common/src/index';",
+ "import config from '../common/config';",
+ "import props from './props';",
+ "",
+ "const { prefix } = config;",
+ "const name = `\\${prefix}-$1`;",
+ "",
+ "@wxComponent()",
+ "export default class $2 extends SuperComponent {",
+ " externalClasses = [",
+ " `\\${prefix}-class`,",
+ " ];",
+ "",
+ " properties = props;",
+ "",
+ " observers = {",
+ " };",
+ "",
+ " data = {",
+ " classPrefix: name,",
+ " prefix,",
+ " };",
+ "",
+ " methods = {",
+ " ",
+ " }",
+ "}",
+ "",
+ ],
+ "scope": "typescript",
+ "description": "新组件 ts"
+ },
+}
\ No newline at end of file
diff --git a/.vscode/test.code-snippets b/.vscode/test.code-snippets
new file mode 100644
index 000000000..4d9a50ed3
--- /dev/null
+++ b/.vscode/test.code-snippets
@@ -0,0 +1,31 @@
+{
+ "test-template": {
+ "prefix": "ttest",
+ "body": [
+ "import simulate from 'miniprogram-simulate';",
+ "import path from 'path';",
+ "",
+ "describe('$1', () => {",
+ " const $1 = simulate.load(path.resolve(__dirname, `../$1`), 't-$1', {",
+ " less: true,",
+ " rootPath: path.resolve(__dirname, '../..')",
+ " });",
+ "",
+ " it(':$2', () => {",
+ " const id = simulate.load({",
+ " template: ``,",
+ " usingComponents: {",
+ " 't-$1': $1",
+ " }",
+ " })",
+ " const comp = simulate.render(id);",
+ " comp.attach(document.createElement('parent-wrapper'));",
+ "",
+ " expect(comp.toJSON()).toMatchSnapshot();",
+ " });",
+ "});",
+ ],
+ "scope": "javascript,typescript",
+ "description": "测试用例模板"
+ }
+}
\ No newline at end of file
diff --git a/.wechatide.ib.json b/.wechatide.ib.json
deleted file mode 100644
index 3db83e12e..000000000
--- a/.wechatide.ib.json
+++ /dev/null
@@ -1,5278 +0,0 @@
-{
- "components": [
- {
- "key": "t-avatar-group",
- "label": "头像组",
- "icon": "",
- "properties": [
- {
- "key": "cascading",
- "type": [
- "String"
- ],
- "defaultValue": "'right-up'",
- "desc": "图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上",
- "label": ""
- },
- {
- "key": "collapseAvatar",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`",
- "label": ""
- },
- {
- "key": "max",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "能够同时显示的最多头像数量",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "medium",
- "desc": "尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size",
- "label": ""
- }
- ],
- "require": {
- "t-avatar": "./avatar"
- }
- },
- {
- "key": "t-avatar",
- "label": "头像",
- "icon": "",
- "properties": [
- {
- "key": "alt",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "头像替换文本,仅当图片加载失败时有效",
- "label": ""
- },
- {
- "key": "badgeProps",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
- "label": ""
- },
- {
- "key": "hideOnLoadFailed",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "加载失败时隐藏图片",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标",
- "label": ""
- },
- {
- "key": "image",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图片地址",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "circle",
- "desc": "形状",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "尺寸,示例值:small/medium/large/24px/38px 等,默认为 large",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "error",
- "desc": "图片加载失败时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon",
- "t-badge": "../badge/badge",
- "t-image": "../image/image"
- }
- },
- {
- "key": "t-back-top",
- "label": "回到顶部",
- "icon": "",
- "properties": [
- {
- "key": "fixed",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否绝对定位固定到屏幕右下方",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "'backtop'",
- "desc": "图标",
- "label": ""
- },
- {
- "key": "text",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "文案",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "round",
- "desc": "预设的样式类型",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "toTop",
- "desc": "点击触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-badge",
- "label": "徽标数",
- "icon": "",
- "properties": [
- {
- "key": "color",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "颜色",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义",
- "label": ""
- },
- {
- "key": "count",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "0",
- "desc": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染",
- "label": ""
- },
- {
- "key": "dot",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否为红点",
- "label": ""
- },
- {
- "key": "maxCount",
- "type": [
- "Number"
- ],
- "defaultValue": "99",
- "desc": "封顶的数字值",
- "label": ""
- },
- {
- "key": "offset",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "circle",
- "desc": "形状",
- "label": ""
- },
- {
- "key": "showZero",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "当数值为 0 时,是否展示徽标",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "medium",
- "desc": "尺寸",
- "label": ""
- }
- ]
- },
- {
- "key": "t-button",
- "label": "按钮",
- "icon": "",
- "properties": [
- {
- "key": "block",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否为块级元素",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "按钮内容",
- "label": ""
- },
- {
- "key": "customDataset",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "自定义 dataset,可通过 event.currentTarget.dataset.custom 获取",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用按钮",
- "label": ""
- },
- {
- "key": "ghost",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否为幽灵按钮(镂空按钮)",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "loading",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示为加载状态",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "rectangle",
- "desc": "按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "medium",
- "desc": "组件尺寸",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "default",
- "desc": "组件风格,依次为品牌色、危险色",
- "label": ""
- },
- {
- "key": "type",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "同小程序的 formType",
- "label": ""
- },
- {
- "key": "variant",
- "type": [
- "String"
- ],
- "defaultValue": "base",
- "desc": "按钮形式,基础、线框、文字",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "click",
- "desc": "点击时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-cell-group",
- "label": "单元格组",
- "icon": "",
- "properties": [
- {
- "key": "bordered",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "是否显示组边框",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "单元格组标题",
- "label": ""
- }
- ]
- },
- {
- "key": "t-cell",
- "label": "单元格",
- "icon": "",
- "properties": [
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "middle",
- "desc": "内容的对齐方式,默认居中对齐",
- "label": ""
- },
- {
- "key": "arrow",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示右侧箭头",
- "label": ""
- },
- {
- "key": "bordered",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示下边框",
- "label": ""
- },
- {
- "key": "description",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "下方内容描述",
- "label": ""
- },
- {
- "key": "hover",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "是否开启点击反馈",
- "label": ""
- },
- {
- "key": "image",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "主图",
- "label": ""
- },
- {
- "key": "jumpType",
- "type": [
- "String"
- ],
- "defaultValue": "navigateTo",
- "desc": "链接跳转类型",
- "label": ""
- },
- {
- "key": "leftIcon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "左侧图标,出现在单元格标题的左侧",
- "label": ""
- },
- {
- "key": "note",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "和标题同行的说明文字",
- "label": ""
- },
- {
- "key": "required",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示表单必填星号",
- "label": ""
- },
- {
- "key": "rightIcon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "最右侧图标",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "标题",
- "label": ""
- },
- {
- "key": "url",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "点击后跳转链接地址。如果值为空,则表示不需要跳转",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "click",
- "desc": "右侧内容",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-check-tag",
- "label": "可选标签",
- "icon": "",
- "properties": [
- {
- "key": "checked",
- "type": [
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "标签选中的状态,默认风格(theme=default)才有选中态",
- "label": ""
- },
- {
- "key": "closable",
- "type": [
- "String",
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否可以关闭",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "组件子元素",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "标签图标",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "square",
- "desc": "标签类型,有三种:方形、圆角方形、标记型",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "medium",
- "desc": "标签尺寸",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "组件子元素",
- "label": ""
- },
- {
- "key": "click",
- "desc": "点击标签时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": ".././icon/icon"
- }
- },
- {
- "key": "t-checkbox-group",
- "label": "多选框组",
- "icon": "",
- "properties": [
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "max",
- "type": [
- "Number"
- ],
- "defaultValue": "undefined",
- "desc": "支持最多选中的数量",
- "label": ""
- },
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "统一设置内部复选框 HTML 属性",
- "label": ""
- },
- {
- "key": "options",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "选中值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中",
- "label": ""
- }
- ],
- "require": {
- "t-checkbox": "../checkbox/checkbox"
- }
- },
- {
- "key": "t-checkbox",
- "label": "多选框",
- "icon": "",
- "properties": [
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "left",
- "desc": "复选框和内容相对位置",
- "label": ""
- },
- {
- "key": "checkAll",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用",
- "label": ""
- },
- {
- "key": "checked",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否选中",
- "label": ""
- },
- {
- "key": "color",
- "type": [
- "String"
- ],
- "defaultValue": "#0052d9",
- "desc": "复选框颜色",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "复选框内容",
- "label": ""
- },
- {
- "key": "contentDisabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "是否禁用组件内容(content)触发选中",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]",
- "label": ""
- },
- {
- "key": "indeterminate",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否为半选",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "主文案",
- "label": ""
- },
- {
- "key": "maxContentRow",
- "type": [
- "Number"
- ],
- "defaultValue": "5",
- "desc": "内容最大行数限制",
- "label": ""
- },
- {
- "key": "maxLabelRow",
- "type": [
- "Number"
- ],
- "defaultValue": "3",
- "desc": "主文案最大行数限制",
- "label": ""
- },
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "HTML 元素原生属性",
- "label": ""
- },
- {
- "key": "readonly",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "只读状态",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "复选框的值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "值变化时触发",
- "label": ""
- }
- ],
- "require": {
- "t-cell": "../cell/cell",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-collapse-panel",
- "label": "折叠面板",
- "icon": "",
- "properties": [
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "折叠面板内容",
- "label": ""
- },
- {
- "key": "destroyOnCollapse",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "当前面板处理折叠状态时,是否销毁面板内容",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "禁止当前面板展开,优先级大于 Collapse 的同名属性",
- "label": ""
- },
- {
- "key": "expandIcon",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "当前折叠面板展开图标,优先级大于 Collapse 的同名属性",
- "label": ""
- },
- {
- "key": "header",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "面板头内容",
- "label": ""
- },
- {
- "key": "headerRightContent",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "面板头的右侧区域,一般用于呈现面板操作",
- "label": ""
- }
- ],
- "require": {
- "t-cell": "../cell/cell"
- }
- },
- {
- "key": "t-collapse",
- "label": "折叠",
- "icon": "",
- "properties": [
- {
- "key": "borderless",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否为无边框模式",
- "label": ""
- },
- {
- "key": "defaultExpandAll",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "默认是否展开全部",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "是否禁用全部面板展开",
- "label": ""
- },
- {
- "key": "expandIcon",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "展开图标。值为 undefined 或 false 则不显示展开图标;值为 true 显示默认图标;值类型为函数,则表示完全自定义展开图标",
- "label": ""
- },
- {
- "key": "expandIconPlacement",
- "type": [
- "String"
- ],
- "defaultValue": "right",
- "desc": "展开图标的位置,左侧或右侧",
- "label": ""
- },
- {
- "key": "expandMutex",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "每个面板互斥展开,每次只展开一个面板",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number",
- "Array"
- ],
- "defaultValue": "",
- "desc": "展开的面板集合",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "切换面板时触发,返回变化的值",
- "label": ""
- }
- ]
- },
- {
- "key": "t-count-down",
- "label": "倒计时",
- "icon": "",
- "properties": [
- {
- "key": "autoStart",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否自动开始倒计时",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "'default'",
- "desc": "最终倒计时的展示内容,值为'default'时使用默认的格式,否则使用自定义样式插槽",
- "label": ""
- },
- {
- "key": "format",
- "type": [
- "String"
- ],
- "defaultValue": "HH:mm:ss",
- "desc": "时间格式,DD-日,HH-时,mm-分,ss-秒,SSS-毫秒",
- "label": ""
- },
- {
- "key": "millisecond",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否开启毫秒级渲染",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "'small'",
- "desc": "倒计时尺寸",
- "label": ""
- },
- {
- "key": "splitWithUnit",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "使用时间单位分割",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "'default'",
- "desc": "倒计时风格",
- "label": ""
- },
- {
- "key": "time",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "倒计时时长,单位毫秒",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "时间变化时触发",
- "label": ""
- },
- {
- "key": "finish",
- "desc": "倒计时结束时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-date-time-picker",
- "label": "日期时间选择器",
- "icon": "",
- "properties": [
- {
- "key": "cancelBtn",
- "type": [
- "String"
- ],
- "defaultValue": "取消",
- "desc": "取消按钮文字",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "确定按钮文字",
- "label": ""
- },
- {
- "key": "disableDate",
- "type": [
- "Object",
- "Array"
- ],
- "defaultValue": "",
- "desc": "禁用日期,示例:['A', 'B'] 表示日期 A 和日期 B 会被禁用。{ from: 'A', to: 'B' } 表示在 A 到 B 之间的日期会被禁用。{ before: 'A', after: 'B' } 表示在 A 之前和在 B 之后的日期都会被禁用。其中 A = '2021-01-01',B = '2021-02-01'。值类型为 Function 则表示返回值为 true 的日期会被禁用",
- "label": ""
- },
- {
- "key": "format",
- "type": [
- "String"
- ],
- "defaultValue": "'YYYY-MM-DD'",
- "desc": "用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format)",
- "label": ""
- },
- {
- "key": "mode",
- "type": [
- "String",
- "Array"
- ],
- "defaultValue": "['year', 'month', 'date']",
- "desc": "选择器模式,用于表示可以选择到哪一个层级。【示例一】year 或者 ['year'] 表示纯日期选择器,只能选择到年份,只显示年份。【示例二】'hour' 或 ['hour'] 表示纯时间选择器,只能选择到小时维度。【示例三】['year', 'month', 'date', 'hour', 'minute'] 表示,日期和时间 混合选择器,可以选择到具体哪一分钟,显示全部时间:年/月/日/时/分",
- "label": ""
- },
- {
- "key": "showWeek",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否在日期旁边显示周几(如周一,周二,周日等)",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "标题",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "选中值",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "cancel",
- "desc": "取消按钮点击时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "选中值发生变化时触发",
- "label": ""
- },
- {
- "key": "columnChange",
- "desc": "每一列选中数据变化时触发",
- "label": ""
- },
- {
- "key": "confirm",
- "desc": "确认按钮点击时触发",
- "label": ""
- }
- ],
- "require": {
- "t-picker": "../picker/picker",
- "t-picker-item": "../picker/picker-item"
- }
- },
- {
- "key": "t-date-time-range-picker",
- "label": "日期时间范围选择器",
- "icon": "",
- "properties": [
- {
- "key": "cancelBtn",
- "type": [
- "String"
- ],
- "defaultValue": "取消",
- "desc": "取消按钮文字",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "确定按钮文字",
- "label": ""
- },
- {
- "key": "disableDate",
- "type": [
- "Object",
- "Array"
- ],
- "defaultValue": "",
- "desc": "禁用日期,示例:['A', 'B'] 表示日期 A 和日期 B 会被禁用。{ from: 'A', to: 'B' } 表示在 A 到 B 之间的日期会被禁用。{ before: 'A', after: 'B' } 表示在 A 之前和在 B 之后的日期都会被禁用。其中 A = '2021-01-01',B = '2021-02-01'。值类型为 Function 则表示返回值为 true 的日期会被禁用",
- "label": ""
- },
- {
- "key": "format",
- "type": [
- "String"
- ],
- "defaultValue": "'YYYY-MM-DD'",
- "desc": "用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format)",
- "label": ""
- },
- {
- "key": "mode",
- "type": [
- "String"
- ],
- "defaultValue": "date",
- "desc": "选择器模式,用于表示可以选择到哪一个层级",
- "label": ""
- },
- {
- "key": "showWeek",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否在日期旁边显示周几(如周一,周二,周日等)",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "标题",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "选中值",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "cancel",
- "desc": "取消按钮点击时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "选中值发生变化时触发",
- "label": ""
- },
- {
- "key": "columnChange",
- "desc": "每一列选中数据变化时触发",
- "label": ""
- },
- {
- "key": "confirm",
- "desc": "确认按钮点击时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-dialog",
- "label": "对话框",
- "icon": "",
- "properties": [
- {
- "key": "actions",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "操作栏",
- "label": ""
- },
- {
- "key": "buttonLayout",
- "type": [
- "String"
- ],
- "defaultValue": "horizontal",
- "desc": "多按钮排列方式",
- "label": ""
- },
- {
- "key": "cancelBtn",
- "type": [
- "String",
- "Object"
- ],
- "defaultValue": "''",
- "desc": "取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件",
- "label": ""
- },
- {
- "key": "closeOnOverlayClick",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "点击蒙层时是否触发关闭事件",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": [
- "String",
- "Object"
- ],
- "defaultValue": "''",
- "desc": "确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "内容",
- "label": ""
- },
- {
- "key": "preventScrollThrough",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "防止滚动穿透",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "标题",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "控制对话框是否显示",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "cancel",
- "desc": "如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件",
- "label": ""
- },
- {
- "key": "close",
- "desc": "关闭事件,点击 取消按钮 或 点击蒙层 时触发",
- "label": ""
- },
- {
- "key": "overlayClick",
- "desc": "如果蒙层存在,点击蒙层时触发",
- "label": ""
- }
- ],
- "require": {
- "t-popup": "../popup/popup",
- "t-button": "../button/button"
- }
- },
- {
- "key": "t-divider",
- "label": "分割线",
- "icon": "",
- "properties": [
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "center",
- "desc": "文本位置(仅在水平分割线有效)",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "子元素",
- "label": ""
- },
- {
- "key": "dashed",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否虚线(仅在水平分割线有效)",
- "label": ""
- },
- {
- "key": "layout",
- "type": [
- "String"
- ],
- "defaultValue": "horizontal",
- "desc": "分隔线类型有两种:水平和垂直",
- "label": ""
- },
- {
- "key": "lineColor",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "分隔线颜色",
- "label": ""
- }
- ]
- },
- {
- "key": "t-drawer",
- "label": "模态抽屉",
- "icon": "",
- "properties": [
- {
- "key": "attach",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "抽屉挂载的节点,默认挂在组件本身的位置。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body",
- "label": ""
- },
- {
- "key": "cancelBtn",
- "type": [
- "String",
- "Object"
- ],
- "defaultValue": "''",
- "desc": "取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件",
- "label": ""
- },
- {
- "key": "closeBtn",
- "type": [
- "String",
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。值类型为 TNode,则表示呈现自定义按钮示例",
- "label": ""
- },
- {
- "key": "closeOnEscKeydown",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "按下 ESC 时是否触发抽屉关闭事件",
- "label": ""
- },
- {
- "key": "closeOnOverlayClick",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "点击蒙层时是否触发抽屉关闭事件",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": [
- "String",
- "Object"
- ],
- "defaultValue": "''",
- "desc": "确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件",
- "label": ""
- },
- {
- "key": "destroyOnClose",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "抽屉关闭时是否销毁节点",
- "label": ""
- },
- {
- "key": "mode",
- "type": [
- "String"
- ],
- "defaultValue": "overlay",
- "desc": "展开方式,有两种:直接展示在内容上方 和 推开内容区域",
- "label": ""
- },
- {
- "key": "placement",
- "type": [
- "String"
- ],
- "defaultValue": "right",
- "desc": "抽屉方向",
- "label": ""
- },
- {
- "key": "showInAttachedElement",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "small",
- "desc": "尺寸,支持 'small', 'medium', 'large','35px', '30%', '3em' 等。纵向抽屉调整的是抽屉宽度,横向抽屉调整的是抽屉高度",
- "label": ""
- },
- {
- "key": "sizeDraggable",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "抽屉大小可拖拽调整,横向抽屉调整宽度,纵向抽屉调整高度",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "组件是否可见",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "抽屉层级,样式默认为 1500",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "cancel",
- "desc": "如果“取消”按钮存在,点击“取消”按钮时触发,同时触发关闭事件",
- "label": ""
- },
- {
- "key": "close",
- "desc": "关闭事件,取消按钮点击时、关闭按钮点击时、ESC 按下时、点击蒙层时均会触发",
- "label": ""
- },
- {
- "key": "closeBtnClick",
- "desc": "如果关闭按钮存在,点击关闭按钮时触发该事件,同时触发关闭事件",
- "label": ""
- },
- {
- "key": "confirm",
- "desc": "如果“确认”按钮存在,则点击“确认”按钮时触发",
- "label": ""
- },
- {
- "key": "escKeydown",
- "desc": "按下 ESC 键时触发",
- "label": ""
- },
- {
- "key": "overlayClick",
- "desc": "如果蒙层存在,点击蒙层时触发",
- "label": ""
- }
- ],
- "require": {
- "t-popup": "../popup/popup"
- }
- },
- {
- "key": "t-empty",
- "label": "空状态",
- "icon": "",
- "properties": [
- {
- "key": "action",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "操作按钮",
- "label": ""
- },
- {
- "key": "description",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "描述文字",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "image",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图片地址",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-footer",
- "label": "布局-底部内容",
- "icon": "",
- "properties": [
- {
- "key": "copyright",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "版权信息,type 为`text`生效",
- "label": ""
- },
- {
- "key": "logo",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "图标配置,type 为`logo`生效。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接跳转地址",
- "label": ""
- },
- {
- "key": "textLinkList",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "链接列表,type 为`text`生效。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "'text'",
- "desc": "页脚展示类型",
- "label": ""
- }
- ]
- },
- {
- "key": "t-grid-item",
- "label": "宫格子项",
- "icon": "",
- "properties": [
- {
- "key": "badgeProps",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
- "label": ""
- },
- {
- "key": "description",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点",
- "label": ""
- },
- {
- "key": "image",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图片,可以是图片地址,也可以自定义图片节点",
- "label": ""
- },
- {
- "key": "jumpType",
- "type": [
- "String"
- ],
- "defaultValue": "navigate-to",
- "desc": "链接跳转类型",
- "label": ""
- },
- {
- "key": "layout",
- "type": [
- "String"
- ],
- "defaultValue": "vertical",
- "desc": "内容布局方式",
- "label": ""
- },
- {
- "key": "text",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "文本,可以通过 Props 传入文本,也可以自定义标题节点",
- "label": ""
- },
- {
- "key": "url",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "点击后的跳转链接",
- "label": ""
- }
- ],
- "require": {
- "t-image": "../image/image"
- }
- },
- {
- "key": "t-grid",
- "label": "栅格",
- "icon": "",
- "properties": [
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "center",
- "desc": "内容对齐方式",
- "label": ""
- },
- {
- "key": "border",
- "type": [
- "Boolean",
- "Object"
- ],
- "defaultValue": "false",
- "desc": "边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式",
- "label": ""
- },
- {
- "key": "column",
- "type": [
- "Number"
- ],
- "defaultValue": "4",
- "desc": "每一行的列数量",
- "label": ""
- },
- {
- "key": "gutter",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "间隔大小",
- "label": ""
- },
- {
- "key": "hover",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否开启点击反馈",
- "label": ""
- }
- ]
- },
- {
- "key": "t-icon-svg",
- "label": "图标(IconSVG)",
- "icon": "",
- "properties": [
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "undefined",
- "desc": "图标尺寸,支持 'small', 'medium', 'large','35px', '3em' 等",
- "label": ""
- },
- {
- "key": "style",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "可用于设置图标颜色,如:style=\"color: red\"",
- "label": ""
- },
- {
- "key": "url",
- "type": [
- "String",
- "Array"
- ],
- "defaultValue": "",
- "desc": "图标地址,地址内容参考[组件内部默认加载图标](https://tdesign.gtimg.com/icon/web/index.js)",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "click",
- "desc": "点击时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-icon",
- "label": "图标",
- "icon": "",
- "properties": [
- {
- "key": "classPrefix",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "自定义icon前缀",
- "label": ""
- },
- {
- "key": "color",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标颜色",
- "label": ""
- },
- {
- "key": "customStyle",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "自定义样式",
- "label": ""
- },
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- }
- ]
- },
- {
- "key": "t-iconfont",
- "label": "图标(Iconfont)",
- "icon": "",
- "properties": [
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "undefined",
- "desc": "图标尺寸,支持 'small', 'medium', 'large','35px', '3em' 等",
- "label": ""
- },
- {
- "key": "style",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "可用于设置图标颜色,如:style=\"color: red\"",
- "label": ""
- },
- {
- "key": "tag",
- "type": [
- "String"
- ],
- "defaultValue": "i",
- "desc": "图标 DOM 元素,可选值:i/span/div/...",
- "label": ""
- },
- {
- "key": "url",
- "type": [
- "String",
- "Array"
- ],
- "defaultValue": "",
- "desc": "图标地址,地址内容参考[组件内部默认加载图标](https://tdesign.gtimg.com/icon/web/index.css)。也可以在 index.html 中引入图标地址",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "click",
- "desc": "点击时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-image",
- "label": "图片",
- "icon": "",
- "properties": [
- {
- "key": "error",
- "type": [
- "String"
- ],
- "defaultValue": "'default'",
- "desc": "加载失败时显示的内容。值为 `default` 则表示使用默认加载失败风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `error`;值为其他则表示普通文本内容,如“加载失败”",
- "label": ""
- },
- {
- "key": "lazy",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否开启图片懒加载",
- "label": ""
- },
- {
- "key": "loading",
- "type": [
- "String"
- ],
- "defaultValue": "'default'",
- "desc": "加载态内容。值为 `default` 则表示使用默认加载中风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `loading`;值为其他则表示普通文本内容,如“加载中”",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "square",
- "desc": "图片圆角类型",
- "label": ""
- },
- {
- "key": "src",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图片链接",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "error",
- "desc": "图片加载失败时触发",
- "label": ""
- },
- {
- "key": "load",
- "desc": "图片加载完成时触发",
- "label": ""
- }
- ],
- "require": {
- "t-loading": "../loading/loading",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-indexes",
- "label": "索引",
- "icon": "",
- "properties": [
- {
- "key": "height",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "列表高度,未设置默认占满设备高度",
- "label": ""
- },
- {
- "key": "list",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "索引列表的列表数据。每个元素包含三个字元素,index(string):索引值,例如1,2,3,...或A,B,C等;title(string): 索引标题,可不填将默认设为索引值;children(Array<{title: string}>): 子元素列表,title为子元素的展示文案。",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "select",
- "desc": "点击行元素时触发事件",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon",
- "t-cell": "../cell/cell",
- "t-cell-group": "../cell-group/cell-group"
- }
- },
- {
- "key": "t-input",
- "label": "输入框",
- "icon": "",
- "properties": [
- {
- "key": "adjustPosition",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "键盘弹起时,是否自动上推页面",
- "label": ""
- },
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "left",
- "desc": "文本内容位置,居左/居中/居右",
- "label": ""
- },
- {
- "key": "borderless",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "【开发中】是否开启无边框模式",
- "label": ""
- },
- {
- "key": "clearable",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否可清空",
- "label": ""
- },
- {
- "key": "confirmHold",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "点击键盘右下角按钮时是否保持键盘不收起点",
- "label": ""
- },
- {
- "key": "confirmType",
- "type": [
- "String"
- ],
- "defaultValue": "done",
- "desc": "设置键盘右下角按钮的文字,仅在 type='text'时生效",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用输入框",
- "label": ""
- },
- {
- "key": "errorMessage",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "错误提示文本,值为空不显示",
- "label": ""
- },
- {
- "key": "focus",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "自动聚焦",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "左侧文本",
- "label": ""
- },
- {
- "key": "maxcharacter",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用",
- "label": ""
- },
- {
- "key": "maxlength",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "用户最多可以输入的文本长度,一个中文等于一个计数长度。值小于等于 0 的时候,则表示不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用",
- "label": ""
- },
- {
- "key": "placeholder",
- "type": [
- "String"
- ],
- "defaultValue": "undefined",
- "desc": "占位符",
- "label": ""
- },
- {
- "key": "prefixIcon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "组件前置图标,值为字符串则表示图标名称",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "small",
- "desc": "输入框尺寸",
- "label": ""
- },
- {
- "key": "suffix",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "后置图标前的后置内容",
- "label": ""
- },
- {
- "key": "suffixIcon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "后置文本内容,值为字符串则表示图标名称",
- "label": ""
- },
- {
- "key": "type",
- "type": [
- "String"
- ],
- "defaultValue": "text",
- "desc": "输入框类型",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "输入框的值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "blur",
- "desc": "失去焦点时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "输入框值发生变化时触发",
- "label": ""
- },
- {
- "key": "clear",
- "desc": "清空按钮点击时触发",
- "label": ""
- },
- {
- "key": "enter",
- "desc": "回车键按下时触发",
- "label": ""
- },
- {
- "key": "focus",
- "desc": "获得焦点时触发",
- "label": ""
- }
- ],
- "require": {
- "t-cell": "../cell/cell",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-loading",
- "label": "加载中",
- "icon": "",
- "properties": [
- {
- "key": "delay",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒",
- "label": ""
- },
- {
- "key": "duration",
- "type": [
- "Number"
- ],
- "defaultValue": "800",
- "desc": "加载动画执行完成一次的时间,单位:毫秒",
- "label": ""
- },
- {
- "key": "indicator",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示加载指示符",
- "label": ""
- },
- {
- "key": "inheritColor",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否继承父元素颜色",
- "label": ""
- },
- {
- "key": "layout",
- "type": [
- "String"
- ],
- "defaultValue": "horizontal",
- "desc": "对齐方式",
- "label": ""
- },
- {
- "key": "loading",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否处于加载状态",
- "label": ""
- },
- {
- "key": "pause",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否暂停动画",
- "label": ""
- },
- {
- "key": "progress",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "加载进度",
- "label": ""
- },
- {
- "key": "reverse",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "加载动画是否反向",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "'40rpx'",
- "desc": "尺寸,示例:40rpx/20px",
- "label": ""
- },
- {
- "key": "text",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "加载提示文案",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "circular",
- "desc": "加载组件类型",
- "label": ""
- }
- ]
- },
- {
- "key": "t-message",
- "label": "全局提醒",
- "icon": "",
- "properties": [
- {
- "key": "action",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "操作",
- "label": ""
- },
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "left",
- "desc": "文本对齐方式",
- "label": ""
- },
- {
- "key": "closeBtn",
- "type": [
- "String",
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。也可以完全自定义按钮",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "用于自定义消息弹出内容",
- "label": ""
- },
- {
- "key": "duration",
- "type": [
- "Number"
- ],
- "defaultValue": "3000",
- "desc": "消息内置计时器,计时到达时会触发 duration-end 事件。单位:毫秒。值为 0 则表示没有计时器。",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String",
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "消息提醒前面的图标。值为 true 则根据 theme 显示对应的图标,值为 false 则不显示图标。值为 'info' 或 'bell' 则显示组件内置图标。也可以完全自定义图标节点",
- "label": ""
- },
- {
- "key": "marquee",
- "type": [
- "Boolean",
- "Object"
- ],
- "defaultValue": "false",
- "desc": "跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放",
- "label": ""
- },
- {
- "key": "offset",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "相对于 placement 的偏移量,示例:[-10, 20] 或 ['10rpx', '8rpx']",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "info",
- "desc": "消息组件风格",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示,隐藏时默认销毁组件",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "元素层级,样式默认为 5000",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "actionBtnClick",
- "desc": "当操作按钮存在时,用户点击操作按钮时触发",
- "label": ""
- },
- {
- "key": "closeBtnClick",
- "desc": "当关闭按钮存在时,用户点击关闭按钮触发",
- "label": ""
- },
- {
- "key": "durationEnd",
- "desc": "计时结束后触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon",
- "t-button": "../button/button"
- }
- },
- {
- "key": "t-navbar",
- "label": "导航条",
- "icon": "",
- "properties": [
- {
- "key": "animation",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否添加动画效果",
- "label": ""
- },
- {
- "key": "background",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "背景",
- "label": ""
- },
- {
- "key": "delta",
- "type": [
- "Number"
- ],
- "defaultValue": "1",
- "desc": "后退按钮后退层数,含义参考 [wx.navigateBack](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateBack.html),特殊的,传入 0 不会发生执行 wx.navigateBack,只会触发一个 goback 事件供自行处理。",
- "label": ""
- },
- {
- "key": "fixed",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否固定在顶部",
- "label": ""
- },
- {
- "key": "homeIcon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "首页图标地址。值为 '' 或者 undefiend 则表示不显示返回图标,值为 'circle' 表示显示默认图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址",
- "label": ""
- },
- {
- "key": "leftIcon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "左侧图标地址,值为 '' 或者 undefiend 则表示不显示返回图标,值为 'arrow-left' 表示显示返回图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "页面标题",
- "label": ""
- },
- {
- "key": "titleMaxLength",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "标题文字最大长度,超出的范围使用 `...` 表示",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "complete",
- "desc": "navigateBack 执行完成后触发(失败或成功均会触发)",
- "label": ""
- },
- {
- "key": "fail",
- "desc": "navigateBack 执行失败后触发",
- "label": ""
- },
- {
- "key": "goBack",
- "desc": "delta 值为 0 时,点击返回,触发该事件",
- "label": ""
- },
- {
- "key": "goHome",
- "desc": "点击 Home 触发",
- "label": ""
- },
- {
- "key": "success",
- "desc": "navigateBack 执行成功后触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-picker-item",
- "label": "选择器子项",
- "icon": "",
- "properties": [
- {
- "key": "options",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "数据源",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "默认选中的选项",
- "label": ""
- }
- ]
- },
- {
- "key": "t-picker",
- "label": "选择器",
- "icon": "",
- "properties": [
- {
- "key": "cancelBtn",
- "type": [
- "String"
- ],
- "defaultValue": "取消",
- "desc": "取消按钮文字",
- "label": ""
- },
- {
- "key": "confirmBtn",
- "type": [
- "String"
- ],
- "defaultValue": "确认",
- "desc": "确定按钮文字",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "标题",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "选中值",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "cancel",
- "desc": "点击取消按钮时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "选中变化时候触发",
- "label": ""
- },
- {
- "key": "confirm",
- "desc": "点击确认确认按钮时触发",
- "label": ""
- }
- ],
- "require": {
- "t-popup": "../popup/popup"
- }
- },
- {
- "key": "t-popup",
- "label": "气泡框",
- "icon": "",
- "properties": [
- {
- "key": "closeBtn",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "关闭按钮,值类型为 Boolean 时表示是否显示关闭按钮。也可以自定义关闭按钮",
- "label": ""
- },
- {
- "key": "closeOnOverlayClick",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "点击遮罩层是否关闭",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "浮层里面的内容",
- "label": ""
- },
- {
- "key": "placement",
- "type": [
- "String"
- ],
- "defaultValue": "top",
- "desc": "浮层出现位置",
- "label": ""
- },
- {
- "key": "preventScrollThrough",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "防止滚动穿透",
- "label": ""
- },
- {
- "key": "showOverlay",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示遮罩层",
- "label": ""
- },
- {
- "key": "transitionProps",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "动画效果定义",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示浮层",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "组件层级,Web 侧样式默认为 5500,移动端和小程序样式默认为 1500",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "visibleChange",
- "desc": "当浮层隐藏或显示时触发",
- "label": ""
- }
- ],
- "require": {
- "t-transition": "../transition/transition",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-progress",
- "label": "进度条",
- "icon": "",
- "properties": [
- {
- "key": "color",
- "type": [
- "String",
- "Object",
- "Array"
- ],
- "defaultValue": "''",
- "desc": "进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']` 或 `{ '0%': '#f00', '100%': '#0ff' }` 或 `{ from: '#000', to: '#000' }` 等",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String",
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "进度百分比,可自定义",
- "label": ""
- },
- {
- "key": "percentage",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "进度条百分比",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "'medium'",
- "desc": "进度条尺寸,示例:small/medium/large/240。small 值为 72; medium 值为 112;large 值为 160",
- "label": ""
- },
- {
- "key": "status",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "进度条状态",
- "label": ""
- },
- {
- "key": "strokeWidth",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "进度条线宽。宽度数值不能超过 size 的一半,否则不能输出环形进度",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "line",
- "desc": "进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间",
- "label": ""
- },
- {
- "key": "trackColor",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "进度条未完成部分颜色",
- "label": ""
- }
- ]
- },
- {
- "key": "t-pull-down-refresh",
- "label": "下拉刷新",
- "icon": "",
- "properties": [
- {
- "key": "loadingBarHeight",
- "type": [
- "Number"
- ],
- "defaultValue": "200",
- "desc": "加载中下拉高度",
- "label": ""
- },
- {
- "key": "loadingProps",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "加载loading样式",
- "label": ""
- },
- {
- "key": "loadingTexts",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成']",
- "label": ""
- },
- {
- "key": "maxBarHeight",
- "type": [
- "Number"
- ],
- "defaultValue": "272",
- "desc": "最大下拉高度",
- "label": ""
- },
- {
- "key": "refreshTimeout",
- "type": [
- "Number"
- ],
- "defaultValue": "3000",
- "desc": "刷新超时时间",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "refresh",
- "desc": "结束下拉时触发",
- "label": ""
- },
- {
- "key": "timeout",
- "desc": "刷新超时触发",
- "label": ""
- }
- ],
- "require": {
- "t-loading": "../loading/loading"
- }
- },
- {
- "key": "t-radio-group",
- "label": "单选框组",
- "icon": "",
- "properties": [
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "是否禁用全部子单选框",
- "label": ""
- },
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "HTML 元素原生属性",
- "label": ""
- },
- {
- "key": "options",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number",
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "选中的值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "选中值发生变化时触发",
- "label": ""
- }
- ],
- "require": {
- "t-radio": "../radio/radio"
- }
- },
- {
- "key": "t-radio",
- "label": "单选框",
- "icon": "",
- "properties": [
- {
- "key": "align",
- "type": [
- "String"
- ],
- "defaultValue": "left",
- "desc": "复选框和内容相对位置",
- "label": ""
- },
- {
- "key": "allowUncheck",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否允许取消选中",
- "label": ""
- },
- {
- "key": "checked",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否选中",
- "label": ""
- },
- {
- "key": "color",
- "type": [
- "String"
- ],
- "defaultValue": "#0052d9",
- "desc": "单选按钮颜色",
- "label": ""
- },
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "单选内容",
- "label": ""
- },
- {
- "key": "contentDisabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用组件内容(content)触发选中",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "是否为禁用态",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String",
- "Array"
- ],
- "defaultValue": "'fill-circle'",
- "desc": "自定义选中图标和非选中图标。示例:[选中态图标,非选中态图标]。值为 fill-circle 表示图标为填充型图标,值为 stroke-line 表示图标为描边型图标",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "主文案",
- "label": ""
- },
- {
- "key": "maxContentRow",
- "type": [
- "Number"
- ],
- "defaultValue": "5",
- "desc": "内容最大行数限制",
- "label": ""
- },
- {
- "key": "maxLabelRow",
- "type": [
- "Number"
- ],
- "defaultValue": "3",
- "desc": "主文案最大行数限制",
- "label": ""
- },
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "HTML 元素原生属性",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number",
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "单选按钮的值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "值变化时触发",
- "label": ""
- }
- ],
- "require": {
- "t-cell": "../cell/cell",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-rate",
- "label": "评分",
- "icon": "",
- "properties": [
- {
- "key": "allowHalf",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否允许半选",
- "label": ""
- },
- {
- "key": "color",
- "type": [
- "String",
- "Array"
- ],
- "defaultValue": "'#ED7B2F'",
- "desc": "评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,两个值表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色。示例:['#ED7B2F', '#999999']",
- "label": ""
- },
- {
- "key": "count",
- "type": [
- "Number"
- ],
- "defaultValue": "5",
- "desc": "评分的数量",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用评分",
- "label": ""
- },
- {
- "key": "gap",
- "type": [
- "Number"
- ],
- "defaultValue": "6",
- "desc": "评分图标的间距",
- "label": ""
- },
- {
- "key": "showText",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示对应的辅助文字",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "评分图标的大小,示例:`20`",
- "label": ""
- },
- {
- "key": "texts",
- "type": [
- "Array"
- ],
- "defaultValue": "[]",
- "desc": "评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "选择评分的值",
- "label": ""
- },
- {
- "key": "variant",
- "type": [
- "String"
- ],
- "defaultValue": "outline",
- "desc": "形状类型,有描边类型和填充类型两种",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "评分数改变时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-search",
- "label": "搜索",
- "icon": "",
- "properties": [
- {
- "key": "action",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "自定义右侧操作按钮文字",
- "label": ""
- },
- {
- "key": "center",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否居中",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用",
- "label": ""
- },
- {
- "key": "focus",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否聚焦",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "左侧文本",
- "label": ""
- },
- {
- "key": "leftIcon",
- "type": [
- "String"
- ],
- "defaultValue": "'search'",
- "desc": "左侧图标",
- "label": ""
- },
- {
- "key": "placeholder",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "占位符",
- "label": ""
- },
- {
- "key": "rightIcon",
- "type": [
- "String"
- ],
- "defaultValue": "'close'",
- "desc": "右侧图标",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "'square'",
- "desc": "搜索框形状",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "actionClick",
- "desc": "点击右侧操作按钮文字时触发",
- "label": ""
- },
- {
- "key": "blur",
- "desc": "失去焦点时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "值发生变化时触发",
- "label": ""
- },
- {
- "key": "clear",
- "desc": "点击清除时触发",
- "label": ""
- },
- {
- "key": "focus",
- "desc": "聚焦时触发",
- "label": ""
- },
- {
- "key": "submit",
- "desc": "提交时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-segmented-control",
- "label": "分段器",
- "icon": "",
- "properties": [
- {
- "key": "list",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "分段器选项",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number",
- "Array"
- ],
- "defaultValue": "",
- "desc": "选中值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "选中值变化时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-skeleton",
- "label": "骨架屏",
- "icon": "",
- "properties": [
- {
- "key": "animation",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为空则表示没有动画",
- "label": ""
- },
- {
- "key": "delay",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "【开发中】延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒",
- "label": ""
- },
- {
- "key": "loading",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容",
- "label": ""
- },
- {
- "key": "rowCol",
- "type": [
- "Array"
- ],
- "defaultValue": "[1, 1, 1, { width: '70%' }]",
- "desc": "用于设置行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度和间距",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "text",
- "desc": "骨架图风格,有基础、头像组合等两大类",
- "label": ""
- }
- ]
- },
- {
- "key": "t-slider",
- "label": "滑块",
- "icon": "",
- "properties": [
- {
- "key": "colors",
- "type": [
- "Array"
- ],
- "defaultValue": "['#0052D9', 'rgba(220, 220, 220, 1)']",
- "desc": "颜色(已选择&未选择)",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "disabledColor",
- "type": [
- "Array"
- ],
- "defaultValue": "['#bbd3fb', '#dcdcdc']",
- "desc": "禁用状态滑动条的颜色(已选、未选)",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String",
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值",
- "label": ""
- },
- {
- "key": "marks",
- "type": [
- "Object",
- "Array"
- ],
- "defaultValue": "{}",
- "desc": "刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`",
- "label": ""
- },
- {
- "key": "max",
- "type": [
- "Number"
- ],
- "defaultValue": "100",
- "desc": "滑块范围最大值",
- "label": ""
- },
- {
- "key": "min",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "滑块范围最小值",
- "label": ""
- },
- {
- "key": "range",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "双游标滑块",
- "label": ""
- },
- {
- "key": "showExtremeValue",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否边界值",
- "label": ""
- },
- {
- "key": "step",
- "type": [
- "Number"
- ],
- "defaultValue": "1",
- "desc": "步长",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "Number",
- "Array"
- ],
- "defaultValue": "",
- "desc": "滑块值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "滑块值变化时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-step-item",
- "label": "步骤",
- "icon": "",
- "properties": [
- {
- "key": "content",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "步骤描述",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标。传入 slot 代表使用插槽,其他字符串代表使用内置图标",
- "label": ""
- },
- {
- "key": "status",
- "type": [
- "String"
- ],
- "defaultValue": "default",
- "desc": "当前步骤的状态",
- "label": ""
- },
- {
- "key": "title",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "标题",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-stepper",
- "label": "步进器",
- "icon": "",
- "properties": [
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "禁用全部操作",
- "label": ""
- },
- {
- "key": "disableInput",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "禁用输入框",
- "label": ""
- },
- {
- "key": "inputWidth",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "输入框宽度",
- "label": ""
- },
- {
- "key": "max",
- "type": [
- "Number"
- ],
- "defaultValue": "100",
- "desc": "最大值",
- "label": ""
- },
- {
- "key": "min",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "最小值",
- "label": ""
- },
- {
- "key": "step",
- "type": [
- "Number"
- ],
- "defaultValue": "1",
- "desc": "步长",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "normal",
- "desc": "组件风格",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "0",
- "desc": "值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "blur",
- "desc": "输入框失去焦点时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "数值发生变更时触发",
- "label": ""
- },
- {
- "key": "overlimit",
- "desc": "数值超出限制时触发",
- "label": ""
- }
- ],
- "require": {
- "t-cell": "../cell/cell",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-steps",
- "label": "步骤条",
- "icon": "",
- "properties": [
- {
- "key": "current",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "0",
- "desc": "当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成,当前步骤之后的步骤为未开始。如果每个步骤没有设置 value,current 值为步骤长度则表示所有步骤已完成。如果每个步骤设置了自定义 value,则 current = 'FINISH' 表示所有状态完成",
- "label": ""
- },
- {
- "key": "layout",
- "type": [
- "String"
- ],
- "defaultValue": "horizontal",
- "desc": "步骤条方向,有两种:横向和纵向",
- "label": ""
- },
- {
- "key": "readonly",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "只读状态",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "default",
- "desc": "步骤条风格",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "当前步骤发生变化时触发",
- "label": ""
- }
- ],
- "require": {
- "t-step": "./step-item"
- }
- },
- {
- "key": "t-sticky",
- "label": "吸顶容器",
- "icon": "",
- "properties": [
- {
- "key": "container",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "函数返回容器对应的 NodesRef 节点,将对应节点指定为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置。",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "offsetTop",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "0",
- "desc": "吸顶时与顶部的距离,单位`px`",
- "label": ""
- },
- {
- "key": "zIndex",
- "type": [
- "Number"
- ],
- "defaultValue": "99",
- "desc": "吸顶时的 z-index",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "scroll",
- "desc": "滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶",
- "label": ""
- }
- ]
- },
- {
- "key": "t-swipe-cell",
- "label": "滑动操作",
- "icon": "",
- "properties": [
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "",
- "desc": "是否禁用滑动",
- "label": ""
- },
- {
- "key": "expanded",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "操作项是否呈现为打开态",
- "label": ""
- },
- {
- "key": "left",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "左侧滑动操作项。所有行为同 `right`",
- "label": ""
- },
- {
- "key": "right",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "右侧滑动操作项。有两种定义方式,一种是使用数组,二种是使用插槽。`right.text` 表示操作文本,`right.className` 表示操作项类名,`right.style` 表示操作项样式,`right.onClick` 表示点击操作项后执行的回调函数。示例:`[{ text: '删除', style: 'background-color: red', onClick: () => {} }]`",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "click",
- "desc": "操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)",
- "label": ""
- }
- ]
- },
- {
- "key": "t-swiper",
- "label": "轮播",
- "icon": "",
- "properties": [
- {
- "key": "animation",
- "type": [
- "String"
- ],
- "defaultValue": "slide",
- "desc": "轮播切换动画效果类型",
- "label": ""
- },
- {
- "key": "autoplay",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否自动播放",
- "label": ""
- },
- {
- "key": "current",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "当前轮播在哪一项(下标)",
- "label": ""
- },
- {
- "key": "direction",
- "type": [
- "String"
- ],
- "defaultValue": "horizontal",
- "desc": "轮播滑动方向,包括横向滑动和纵向滑动两个方向",
- "label": ""
- },
- {
- "key": "duration",
- "type": [
- "Number"
- ],
- "defaultValue": "300",
- "desc": "滑动动画时长",
- "label": ""
- },
- {
- "key": "height",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "当使用垂直方向滚动时的高度",
- "label": ""
- },
- {
- "key": "interval",
- "type": [
- "Number"
- ],
- "defaultValue": "5000",
- "desc": "轮播间隔时间",
- "label": ""
- },
- {
- "key": "loop",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否循环播放",
- "label": ""
- },
- {
- "key": "navigation",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "导航器全部配置",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "轮播切换时触发",
- "label": ""
- }
- ],
- "require": {
- "t-swiper-item": "./swiper-item",
- "t-swiper-nav": "./swiper-nav"
- }
- },
- {
- "key": "t-switch",
- "label": "开关",
- "icon": "",
- "properties": [
- {
- "key": "colors",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "自定义颜色,[打开时的颜色,关闭时的颜色]。组件默认颜色为 ['#0052d9', 'rgba(0, 0, 0, .26']。示例:[blue, gray]",
- "label": ""
- },
- {
- "key": "customValue",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "开关内容,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用组件",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "开关的标签",
- "label": ""
- },
- {
- "key": "loading",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否处于加载中状态",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "medium",
- "desc": "开关尺寸",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number",
- "Boolean"
- ],
- "defaultValue": "undefined",
- "desc": "开关值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "数据发生变化时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-tab-bar-item",
- "label": "标签栏选项",
- "icon": "",
- "properties": [
- {
- "key": "badgeProps",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "图标右上角提示信息",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "图标名称",
- "label": ""
- },
- {
- "key": "subTabBar",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "二级菜单",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "标识符",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon",
- "t-badge": "../badge/badge"
- }
- },
- {
- "key": "t-tab-bar",
- "label": "标签栏",
- "icon": "",
- "properties": [
- {
- "key": "bordered",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否显示外边框",
- "label": ""
- },
- {
- "key": "color",
- "type": [
- "Array"
- ],
- "defaultValue": "['#0052D9', 'rgba(0, 0, 0, .6)']",
- "desc": "标签颜色设置。示例:[选中标签的颜色, 未选中的标签颜色]",
- "label": ""
- },
- {
- "key": "fixed",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否固定在底部",
- "label": ""
- },
- {
- "key": "safeAreaInsetBottom",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否为 iPhoneX 留出底部安全距离",
- "label": ""
- },
- {
- "key": "split",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否需要分割线",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number",
- "Array"
- ],
- "defaultValue": "undefined",
- "desc": "当前选中标签的索引",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "选中标签切换时触发",
- "label": ""
- }
- ],
- "require": {
- "t-tab-bar-item": "./tab-bar-item"
- }
- },
- {
- "key": "t-tab-panel",
- "label": "选项卡面板",
- "icon": "",
- "properties": [
- {
- "key": "destroyOnHide",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "选项卡内容隐藏时是否销毁",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用当前选项卡",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "选项卡名称,可自定义选项卡导航内容",
- "label": ""
- },
- {
- "key": "panel",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "用于自定义选项卡面板内容",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "选项卡的值,唯一标识",
- "label": ""
- }
- ]
- },
- {
- "key": "t-tabs",
- "label": "选项卡",
- "icon": "",
- "properties": [
- {
- "key": "animation",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "动画效果设置。其中 duration 表示动画时长",
- "label": ""
- },
- {
- "key": "placement",
- "type": [
- "String"
- ],
- "defaultValue": "top",
- "desc": "选项卡位置",
- "label": ""
- },
- {
- "key": "showBottomLine",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "是否展示底部激活线条",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "激活的选项卡值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "change",
- "desc": "激活的选项卡发生变化时触发",
- "label": ""
- }
- ]
- },
- {
- "key": "t-tag",
- "label": "标签",
- "icon": "",
- "properties": [
- {
- "key": "closable",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "标签是否可关闭",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "标签中的图标,可自定义图标呈现",
- "label": ""
- },
- {
- "key": "maxWidth",
- "type": [
- "String",
- "Number"
- ],
- "defaultValue": "",
- "desc": "标签最大宽度,宽度超出后会出现省略号。示例:'50px' / 80",
- "label": ""
- },
- {
- "key": "shape",
- "type": [
- "String"
- ],
- "defaultValue": "square",
- "desc": "标签类型,有三种:方形、圆角方形、标记型",
- "label": ""
- },
- {
- "key": "size",
- "type": [
- "String"
- ],
- "defaultValue": "medium",
- "desc": "标签尺寸",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "default",
- "desc": "组件风格,用于描述组件不同的应用场景",
- "label": ""
- },
- {
- "key": "variant",
- "type": [
- "String"
- ],
- "defaultValue": "dark",
- "desc": "标签风格变体",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "click",
- "desc": "点击时触发",
- "label": ""
- },
- {
- "key": "close",
- "desc": "如果关闭按钮存在,点击关闭按钮时触发",
- "label": ""
- }
- ],
- "require": {
- "t-icon": ".././icon/icon"
- }
- },
- {
- "key": "t-textarea",
- "label": "文本输入框",
- "icon": "",
- "properties": [
- {
- "key": "adjustPosition",
- "type": [
- "Boolean"
- ],
- "defaultValue": "true",
- "desc": "键盘弹起时,是否自动上推页面",
- "label": ""
- },
- {
- "key": "autofocus",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "自动聚焦,拉起键盘",
- "label": ""
- },
- {
- "key": "autosize",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否自动增高,值为 autosize 时,style.height 不生效",
- "label": ""
- },
- {
- "key": "confirmHold",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "点击键盘右下角按钮时是否保持键盘不收起点",
- "label": ""
- },
- {
- "key": "confirmType",
- "type": [
- "String"
- ],
- "defaultValue": "done",
- "desc": "设置键盘右下角按钮的文字,仅在 type='text'时生效",
- "label": ""
- },
- {
- "key": "disabled",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否禁用文本框",
- "label": ""
- },
- {
- "key": "focus",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "自动聚焦",
- "label": ""
- },
- {
- "key": "label",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "左侧文本",
- "label": ""
- },
- {
- "key": "maxcharacter",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度",
- "label": ""
- },
- {
- "key": "maxlength",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "用户最多可以输入的字符个数",
- "label": ""
- },
- {
- "key": "placeholder",
- "type": [
- "String"
- ],
- "defaultValue": "undefined",
- "desc": "占位符",
- "label": ""
- },
- {
- "key": "value",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "文本框值",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "blur",
- "desc": "失去焦点时触发",
- "label": ""
- },
- {
- "key": "change",
- "desc": "输入内容变化时触发",
- "label": ""
- },
- {
- "key": "enter",
- "desc": "点击完成时触发",
- "label": ""
- },
- {
- "key": "focus",
- "desc": "获得焦点时触发",
- "label": ""
- },
- {
- "key": "lineChange",
- "desc": "行高发生变化时触发",
- "label": ""
- }
- ],
- "require": {
- "t-cell": "../cell/cell",
- "t-icon": "../icon/icon"
- }
- },
- {
- "key": "t-toast",
- "label": "轻提示",
- "icon": "",
- "properties": [
- {
- "key": "direction",
- "type": [
- "String"
- ],
- "defaultValue": "row",
- "desc": "图标排列方式",
- "label": ""
- },
- {
- "key": "duration",
- "type": [
- "Number"
- ],
- "defaultValue": "2000",
- "desc": "弹窗显示毫秒数",
- "label": ""
- },
- {
- "key": "icon",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "自定义图标",
- "label": ""
- },
- {
- "key": "message",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "弹窗显示文字",
- "label": ""
- },
- {
- "key": "placement",
- "type": [
- "String"
- ],
- "defaultValue": "middle",
- "desc": "弹窗展示位置",
- "label": ""
- },
- {
- "key": "preventScrollThrough",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "防止滚动穿透,即不允许点击和滚动",
- "label": ""
- },
- {
- "key": "theme",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "提示类型",
- "label": ""
- }
- ],
- "require": {
- "t-icon": "../icon/icon",
- "t-loading": "../loading/loading"
- }
- },
- {
- "key": "t-transition",
- "label": "动画",
- "icon": "",
- "properties": [
- {
- "key": "appear",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "首次出现是否展示动画",
- "label": ""
- },
- {
- "key": "customClass",
- "type": [
- "String"
- ],
- "defaultValue": "''",
- "desc": "自定义容器类名",
- "label": ""
- },
- {
- "key": "destoryOnClose",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "隐藏时是否销毁内容",
- "label": ""
- },
- {
- "key": "duration",
- "type": [
- "Number"
- ],
- "defaultValue": "",
- "desc": "指定过渡时间",
- "label": ""
- },
- {
- "key": "name",
- "type": [
- "String"
- ],
- "defaultValue": "'t-transition'",
- "desc": "过渡类名",
- "label": ""
- },
- {
- "key": "visible",
- "type": [
- "Boolean"
- ],
- "defaultValue": "false",
- "desc": "是否显示",
- "label": ""
- }
- ]
- },
- {
- "key": "t-upload",
- "label": "上传",
- "icon": "",
- "properties": [
- {
- "key": "addContent",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "添加按钮内容。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。",
- "label": ""
- },
- {
- "key": "config",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "图片上传配置,视频上传配置,文件上传配置等,包含图片尺寸、图片来源、视频来源、视频拍摄最长时间等。更多细节查看小程序官网。[图片上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html)。[视频上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html)",
- "label": ""
- },
- {
- "key": "deleteBtn",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "删除图标。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。",
- "label": ""
- },
- {
- "key": "fileListDisplay",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "【开发中】用于完全自定义文件列表内容",
- "label": ""
- },
- {
- "key": "files",
- "type": [
- "Array"
- ],
- "defaultValue": "",
- "desc": "已上传文件列表",
- "label": ""
- },
- {
- "key": "gridConfig",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "upload组件每行上传图片列数以及图片的宽度和高度",
- "label": ""
- },
- {
- "key": "gutter",
- "type": [
- "Number"
- ],
- "defaultValue": "16",
- "desc": "预览窗格的 gutter 大小,单位 rpx",
- "label": ""
- },
- {
- "key": "imageProps",
- "type": [
- "Object"
- ],
- "defaultValue": "",
- "desc": "透传 Image 组件全部属性",
- "label": ""
- },
- {
- "key": "max",
- "type": [
- "Number"
- ],
- "defaultValue": "0",
- "desc": "用于控制文件上传数量,值为 0 则不限制",
- "label": ""
- },
- {
- "key": "mediaType",
- "type": [
- "Array"
- ],
- "defaultValue": "['image', 'video']",
- "desc": "支持上传的文件类型,图片或视频",
- "label": ""
- },
- {
- "key": "requestMethod",
- "type": [
- "String"
- ],
- "defaultValue": "",
- "desc": "自定义上传方法",
- "label": ""
- },
- {
- "key": "sizeLimit",
- "type": [
- "Number",
- "Object"
- ],
- "defaultValue": "",
- "desc": "图片文件大小限制,单位 KB。可选单位有:`'B' | 'KB' | 'MB' | 'GB'`。示例一:`1000`。示例二:`{ size: 2, unit: 'MB', message: '图片大小不超过 {sizeLimit} MB' }`",
- "label": ""
- }
- ],
- "events": [
- {
- "key": "add",
- "desc": "上传成功后触发,仅包含本次选择的照片;`context.url` 表示选定视频的临时文件路径 (本地路径)。`context.duration` 表示选定视频的时间长度。`context.size`选定视频的数据量大小。更多描述参考 wx.chooseMedia 小程序官网描述",
- "label": ""
- },
- {
- "key": "complete",
- "desc": "上传成功或失败后触发",
- "label": ""
- },
- {
- "key": "fail",
- "desc": "上传失败后触发",
- "label": ""
- },
- {
- "key": "remove",
- "desc": "移除文件时触发",
- "label": ""
- },
- {
- "key": "selectChange",
- "desc": "选择文件或图片之后,上传之前,触发该事件。
`params.value` 表示之前已经上传完成的文件列表。
`params.currentSelectedFiles` 表示本次上传选中的文件列表",
- "label": ""
- },
- {
- "key": "success",
- "desc": "上传成功后触发,包含所有上传的文件;`context.url` 表示选定视频的临时文件路径 (本地路径)。`context.duration` 表示选定视频的时间长度。`context.size`选定视频的数据量大小。更多描述参考 wx.chooseMedia 小程序官网描述",
- "label": ""
- }
- ],
- "require": {
- "t-grid": "../grid/grid",
- "t-grid-item": "../grid/grid-item",
- "t-popup": "../popup/popup",
- "t-icon": "../icon/icon"
- }
- }
- ],
- "common": {
- "properties": {},
- "events": {}
- },
- "menu": [
- {
- "key": "menu-basic",
- "label": "基础",
- "submenu": [
- {
- "key": "subMenu-button",
- "label": "Button 按钮",
- "components": [
- "t-button"
- ]
- },
- {
- "key": "subMenu-divider",
- "label": "Divider 分割线",
- "components": [
- "t-divider"
- ]
- },
- {
- "key": "subMenu-icon",
- "label": "Icon 图标",
- "components": [
- "t-icon"
- ]
- }
- ]
- },
- {
- "key": "menu-nav",
- "label": "导航",
- "submenu": [
- {
- "key": "subMenu-indexes",
- "label": "Indexes 索引",
- "components": [
- "t-indexes"
- ]
- },
- {
- "key": "subMenu-navbar",
- "label": "Navbar 导航条",
- "components": [
- "t-navbar"
- ]
- },
- {
- "key": "subMenu-steps",
- "label": "Steps 步骤条",
- "components": [
- "t-steps"
- ]
- },
- {
- "key": "subMenu-tabbar",
- "label": "TabBar 标签栏",
- "components": [
- "t-tabbar"
- ]
- },
- {
- "key": "subMenu-tabs",
- "label": "Tabs 选项卡",
- "components": [
- "t-tabs"
- ]
- }
- ]
- },
- {
- "key": "menu-input",
- "label": "输入",
- "submenu": [
- {
- "key": "subMenu-checkbox",
- "label": "CheckBox 复选框",
- "components": [
- "t-checkbox"
- ]
- },
- {
- "key": "subMenu-dateTimePicker",
- "label": "DateTimePicker 时间选择器",
- "components": [
- "t-date-time-picker"
- ]
- },
- {
- "key": "subMenu-input",
- "label": "Input 输入框",
- "components": [
- "t-input"
- ]
- },
- {
- "key": "subMenu-picker",
- "label": "Picker 选择器",
- "components": [
- "t-picker"
- ]
- },
- {
- "key": "subMenu-radio",
- "label": "Radio 单选框",
- "components": [
- "t-radio"
- ]
- },
- {
- "key": "subMenu-rate",
- "label": "Rate 评分",
- "components": [
- "t-rate"
- ]
- },
- {
- "key": "subMenu-search",
- "label": "Search 搜索框",
- "components": [
- "t-search"
- ]
- },
- {
- "key": "subMenu-slider",
- "label": "Slider 滑动选择器",
- "components": [
- "t-slider"
- ]
- },
- {
- "key": "subMenu-stepper",
- "label": "Stepper 步进器",
- "components": [
- "t-stepper"
- ]
- },
- {
- "key": "subMenu-switch",
- "label": "Switch 开关",
- "components": [
- "t-switch"
- ]
- },
- {
- "key": "subMenu-textarea",
- "label": "Textarea 多行文本框",
- "components": [
- "t-textarea"
- ]
- },
- {
- "key": "subMenu-upload",
- "label": "UpLoad 上传",
- "components": [
- "t-upload"
- ]
- }
- ]
- },
- {
- "key": "menu-data",
- "label": "数据展示",
- "submenu": [
- {
- "key": "subMenu-avatar",
- "label": "Avatar 头像",
- "components": [
- "t-avatar"
- ]
- },
- {
- "key": "subMenu-badge",
- "label": "Badge 徽标",
- "components": [
- "t-badge"
- ]
- },
- {
- "key": "subMenu-cell",
- "label": "Cell 单元格",
- "components": [
- "t-cell"
- ]
- },
- {
- "key": "subMenu-countdown",
- "label": "CountDown 倒计时",
- "components": [
- "t-countdown"
- ]
- },
- {
- "key": "subMenu-empty",
- "label": "Empty 空状态",
- "components": [
- "t-empty"
- ]
- },
- {
- "key": "subMenu-footer",
- "label": "Footer 页脚",
- "components": [
- "t-footer"
- ]
- },
- {
- "key": "subMenu-grid",
- "label": "Grid 宫格",
- "components": [
- "t-grid"
- ]
- },
- {
- "key": "subMenu-image",
- "label": "Image 图片",
- "components": [
- "t-image"
- ]
- },
- {
- "key": "subMenu-skeleton",
- "label": "Skeleton 骨架屏",
- "components": [
- "t-skeleton"
- ]
- },
- {
- "key": "subMenu-sticky",
- "label": "Sticky 吸顶容器",
- "components": [
- "t-sticky"
- ]
- },
- {
- "key": "subMenu-swiper",
- "label": "Swiper 轮播图",
- "components": [
- "t-swiper"
- ]
- },
- {
- "key": "subMenu-tag",
- "label": "Tag 标签",
- "components": [
- "t-tag"
- ]
- }
- ]
- },
- {
- "key": "menu-info",
- "label": "消息提醒",
- "submenu": [
- {
- "key": "subMenu-back-top",
- "label": "BackTop 返回顶部",
- "components": [
- "t-back-top"
- ]
- },
- {
- "key": "subMenu-dialog",
- "label": "Dialog 弹出框",
- "components": [
- "t-dialog"
- ]
- },
- {
- "key": "subMenu-loading",
- "label": "Loading 加载",
- "components": [
- "t-loading"
- ]
- },
- {
- "key": "subMenu-message",
- "label": "Message 消息通知",
- "components": [
- "t-message"
- ]
- },
- {
- "key": "subMenu-popup",
- "label": "Popup 弹出层",
- "components": [
- "t-popup"
- ]
- },
- {
- "key": "subMenu-pullDownRefresh",
- "label": "PullDownRefresh 下拉刷新",
- "components": [
- "t-pull-down-refresh"
- ]
- },
- {
- "key": "subMenu-swipeCell",
- "label": "SwipeCell 滑动操作",
- "components": [
- "t-swipe-cell"
- ]
- },
- {
- "key": "subMenu-toast",
- "label": "Toast 轻提示",
- "components": [
- "t-toast"
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d20386bb9..62f5f9c8d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,351 +1,1513 @@
----
-title: 更新日志
-spline: explain
-toc: false
-docClass: timeline
----
-
-## 0.9.0 `2022-4-21`
-
-### BREAKING CHANGES
-
-- Steps: 子组件名称从 `t-step` 改成 `t-step-item` [#373](https://github.com/Tencent/tdesign-miniprogram/pull/373) [@anlyyao](https://github.com/anlyyao)
-### Bug Fixes
-
-- Checkbox: 优化渲染性能 [#358](https://github.com/Tencent/tdesign-miniprogram/pull/358) [@LeeJim](https://github.com/LeeJim)
-- Switch: 修复无法选择的问题 [#362](https://github.com/Tencent/tdesign-miniprogram/pull/362) [@LeeJim](https://github.com/LeeJim)
-
-### Features
-
-- ActionSheet: 新增动作面板组件 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@NuoHui](https://github.com/NuoHui)
-- NoticeBar: 新增公告栏组件 [#354](https://github.com/Tencent/tdesign-miniprogram/pull/354) [@anlyyao](https://github.com/anlyyao)
-
-## 0.8.0 `2022-4-15`
-
-### BREAKING CHANGES
-
-- CheckboxGroup: change 事件返回的 value 将会过滤非 checkbox 的值 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-### Bug Fixes
-
-- Steps: 修复子步骤条不支持 status 的问题 [#334](https://github.com/Tencent/tdesign-miniprogram/pull/334) [@anlyyao](https://github.com/anlyyao)
-- Picker: 修复出现空白的取消和确认按钮 [#342](https://github.com/Tencent/tdesign-miniprogram/pull/342) [@jin0209](https://github.com/jin0209)
-- Swiper: 修复点击误触发翻页问题 [#343](https://github.com/Tencent/tdesign-miniprogram/pull/343) [@esky](https://github.com/esky)
-- Radio: 修复 label 错误的渲染位置 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-- Checkbox: 修复 label 错误的渲染位置 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-- Textarea:
- - 修复缺失的 label 插槽 [#348](https://github.com/Tencent/tdesign-miniprogram/pull/348) [@anlyyao](https://github.com/anlyyao)
- - 修复传入 adjust-position 不生效的问题 [#349](https://github.com/Tencent/tdesign-miniprogram/pull/349) [@anlyyao](https://github.com/anlyyao)
-- Transition: 修复动画过程中触发 leave 会导致界面卡死的问题 [#356](https://github.com/Tencent/tdesign-miniprogram/pull/356) [@esky](https://github.com/esky)
-### Features
-
-- DropdownMenu: 新增下拉菜单组件 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-- Radio: 新增 borderless 属性 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-- Checkbox:
- - 新增 borderless 属性 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
- - 新增 theme 属性,添加 tag 类型,默认值为 default [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-- CheckboxGroup: 新增 customStyle 属性,透传 style 至根元素 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
-
-
-
-## 0.7.3 `2022-4-7`
-
-### Bug Fixes
-
-- Cell: 修复传入 String 类型的 `right-icon` 不生效的问题 [#321](https://github.com/Tencent/tdesign-miniprogram/pull/321) [@LeeJim](https://github.com/LeeJim)
-- Tabs: 属性 `label` 支持 slot [#327](https://github.com/Tencent/tdesign-miniprogram/pull/327) [@LeeJim](https://github.com/LeeJim)
-- Dialog: 完善 `close` 事件返回的参数 [#332](https://github.com/Tencent/tdesign-miniprogram/pull/332) [@LeeJim](https://github.com/LeeJim)
-- 受控优化:支持不传值时默认为非受控用法 [#329](https://github.com/Tencent/tdesign-miniprogram/pull/329) [#331](https://github.com/Tencent/tdesign-miniprogram/pull/331) [@LeeJim](https://github.com/LeeJim)
-### Features
-
-- 新增组件:
- - Collapse 折叠面板 [#322](https://github.com/Tencent/tdesign-miniprogram/pull/322) [@LeeJim](https://github.com/LeeJim)
- - Progress 进度条 [#318](https://github.com/Tencent/tdesign-miniprogram/pull/318) [@anlyyao](https://github.com/anlyyao)
-- Picker: 新增属性 `header` 以及 `header` 和 `footer` 的插槽 [#323](https://github.com/Tencent/tdesign-miniprogram/pull/323) [@jin0209](https://github.com/jin0209)
-- DateTimePicker: 新增属性 `header` 以及 `header` 和 `footer` 的插槽 [#323](https://github.com/Tencent/tdesign-miniprogram/pull/323) [@jin0209](https://github.com/jin0209)
-
-## 0.7.2 `2022-3-31`
-
-### Bug Fixes
-
-- Search: 修复 `submit` 事件返回参数错误的问题 [#291](https://github.com/Tencent/tdesign-miniprogram/pull/291) [@anlyyao](https://github.com/anlyyao)
-- Toast: 修复最大宽度和文案没对齐的问题 [#301](https://github.com/Tencent/tdesign-miniprogram/pull/301) [@zhenzhencai](https://github.com/zhenzhencai)
-- Input: 修复设置 `clearable` ,点击不清除内容的问题 [#303](https://github.com/Tencent/tdesign-miniprogram/pull/303) [@LeeJim](https://github.com/LeeJim)
-- Dialog: 修复 1px 边框在 iOS 上消失的问题 [#304](https://github.com/Tencent/tdesign-miniprogram/pull/304) [@jin0209](https://github.com/jin0209)
-- Swiper: 修复延迟设置地址时,显示不正常的问题 [#305](https://github.com/Tencent/tdesign-miniprogram/pull/305) [@esky](https://github.com/esky)
-- Button: 修复文案没有垂直居中的问题 [#311](https://github.com/Tencent/tdesign-miniprogram/pull/311) [@anlyyao](https://github.com/anlyyao)
-
-### Features
-
-- 新增组件:
- - Fab 悬浮按钮 [#310](https://github.com/Tencent/tdesign-miniprogram/pull/310) [@LeeJim](https://github.com/LeeJim)
- - Drawer 抽屉 [#308](https://github.com/Tencent/tdesign-miniprogram/pull/308) [@anlyyao](https://github.com/anlyyao)
-
-## 0.7.1 `2022-3-25`
-### Bug Fixes
-
-- Loading: 修复 `loading` 默认值为 `true` 但不显示的问题 [#272](https://github.com/Tencent/tdesign-miniprogram/pull/272) [@JJunYang](https://github.com/JJunYang)
-- Stepper: 修复图标偏移的问题 [#280](https://github.com/Tencent/tdesign-miniprogram/pull/280) [@Winfans](https://github.com/Winfans)
-- Search: 修复 `action-click` 事件不生效的问题 [#283](https://github.com/Tencent/tdesign-miniprogram/pull/283) [@LeeJim](https://github.com/LeeJim)
-- Textarea: 修复 `Form` 无法获取值的问题 [#284](https://github.com/Tencent/tdesign-miniprogram/pull/284) [@anlyyao](https://github.com/anlyyao)
-
-### Feature
-
-- 增加点击态:[#279](https://github.com/Tencent/tdesign-miniprogram/pull/279) [@Perisiguiendo](https://github.com/Perisiguiendo)
- - Grid
- - Tabbar
-- Upload: 使用 `t-image` 封装,并支持 `image-props` 用于属性透传 [#289](https://github.com/Tencent/tdesign-miniprogram/pull/289) [@xihangzhou](https://github.com/xihangzhou)
-
-## 0.7.0 `2022-3-18`
-
-### BREAKING CHANGES
-
-- Image:
- - 属性 `load-failed` 变更为 `error` [#265](https://github.com/Tencent/tdesign-miniprogram/pull/265) [@xihangzhou](https://github.com/xihangzhou)
- - 属性 `lazy-load` 变更为 `lazy` [#269](https://github.com/Tencent/tdesign-miniprogram/pull/269) [@LeeJim](https://github.com/LeeJim)
-
-### Bug Fixes
-
-- Button: 样式调整 [#262](https://github.com/Tencent/tdesign-miniprogram/pull/262) [@anlyyao](https://github.com/anlyyao)
-- Tag: 修复样式文件冗余的问题 [#267](https://github.com/Tencent/tdesign-miniprogram/pull/267) [@LeeJim](https://github.com/LeeJim)
-- Steps: 修复样式文件冗余的问题 [#268](https://github.com/Tencent/tdesign-miniprogram/pull/268) [@LeeJim](https://github.com/LeeJim)
-
-### Feature
-
-- Image: 新增 `shape` 属性 [#265](https://github.com/Tencent/tdesign-miniprogram/pull/265) [@xihangzhou](https://github.com/xihangzhou)
-
-## 0.6.2 `2022-3-14`
-
-### Bug Fixes
-
-- Button:
- - 兼容不支持 `wx://form-field-button` 的版本 [#249](https://github.com/Tencent/tdesign-miniprogram/pull/249) [@anlyyao](https://github.com/anlyyao)
- - 修正 type 属性的正确实现 [#250](https://github.com/Tencent/tdesign-miniprogram/pull/250) [@anlyyao](https://github.com/anlyyao)
-- 修复在 `form` 下无法获取值的问题:
- - Input [#256](https://github.com/Tencent/tdesign-miniprogram/pull/256) [@anlyyao](https://github.com/anlyyao)
- - Checkbox、Radio、Switch [#257](https://github.com/Tencent/tdesign-miniprogram/pull/257) [@anlyyao](https://github.com/anlyyao)
-- Upload: 修复关闭按钮层级过低的问题 [#246](https://github.com/Tencent/tdesign-miniprogram/pull/246) [@Winfans ](https://github.com/Winfans )
-- Toast: 修复层级过低的问题 [f4f6b5b](https://github.com/Tencent/tdesign-miniprogram/commit/f4f6b5be9c0f770c54c9c3ac976dce3f57ca2591) [@LeeJim](https://github.com/LeeJim)
-- Rate: 修复 iOS 下颜色失效的问题 [#244](https://github.com/Tencent/tdesign-miniprogram/pull/244) [@zhenzhencai ](https://github.com/zhenzhencai )
-### Feature
-
-- Button: 新增 `customDataset` 属性,可通过 `event.currentTarget.dataset.custom` 获取 [#259](https://github.com/Tencent/tdesign-miniprogram/pull/259) [@anlyyao](https://github.com/anlyyao)
-- Upload: 支持对图片和视频的同时上传 [#245](https://github.com/Tencent/tdesign-miniprogram/pull/245) [@xihangzhou](https://github.com/xihangzhou)
-
-## 0.6.1 `2022-3-10`
-
-### Bug Fixes
-- Dialog:
- - 修复调用时没重复默认值问题 [#235](https://github.com/Tencent/tdesign-miniprogram/pull/235) [@scshsy](https://github.com/scshsy)
- - 修复内部 `Button` 样式错误 [#236](https://github.com/Tencent/tdesign-miniprogram/pull/236) [@anlyyao](https://github.com/anlyyao)
-- Upload: 修复在 iOS 上无法选择的问题 [#239](https://github.com/Tencent/tdesign-miniprogram/pull/239) [@LeeJim](https://github.com/LeeJim)
-- Button: 属性 shape 的默认值改为 rectangle [#240](https://github.com/Tencent/tdesign-miniprogram/pull/240) [@anlyyao](https://github.com/anlyyao)
-- Rate: 修复 `value = 0` 时无法点击的问题 [#242](https://github.com/Tencent/tdesign-miniprogram/pull/242) [@zhenzhencai](https://github.com/zhenzhencai)
-- Grid: 修复样式问题 [#243](https://github.com/Tencent/tdesign-miniprogram/pull/243) [@xihangzhou](https://github.com/xihangzhou)
-
-## 0.6.0 `2022-3-8`
-
-### BREAKING CHANGES
-
-- Button: [#212](https://github.com/Tencent/tdesign-miniprogram/pull/212) [@anlyyao](https://github.com/anlyyao)
- - 重构 `shape` 的实现,新增支持 `rectangle`、`circle` 类型
- - 修复 `shape = round` 样式不对的问题
- - 支持纯图标按钮
-### Bug Fixes
-
-- Stepper: 修复 `Stepper` 组件事件向上冒泡 [#216](https://github.com/Tencent/tdesign-miniprogram/pull/216) [@zhenzhencai](https://github.com/zhenzhencai)
-- Checkbox: 修复 `prefix` 问题 [#218](https://github.com/Tencent/tdesign-miniprogram/pull/218) [@amberlwan](https://github.com/amberlwan)
-- Popup: 支持默认 `slot` [#219](https://github.com/Tencent/tdesign-miniprogram/pull/219) [@Perisiguiendo](https://github.com/Perisiguiendo)
-- Image: 记录 `Image` 组件传入的 src, 防止 src 相同时重复刷新 [#221](https://github.com/Tencent/tdesign-miniprogram/pull/221) [@xihangzhou](https://github.com/xihangzhou)
-- Tag: 增加外部样式类 [#223](https://github.com/Tencent/tdesign-miniprogram/pull/223) [@xihangzhou](https://github.com/xihangzhou)
-- Button: 修改对 `Button` 组件的使用 demo [#229](https://github.com/Tencent/tdesign-miniprogram/pull/229) [@anlyyao](https://github.com/anlyyao)
-- Toast:
- - 修改未传入的参数为默认值 [#230](https://github.com/Tencent/tdesign-miniprogram/pull/230) [@scshsy](https://github.com/scshsy)
- - 修复 `z-index` 低于 `Popup` 问题 [#233](https://github.com/Tencent/tdesign-miniprogram/pull/233) [@LeeJim](https://github.com/LeeJim)
-
-## 0.5.4 `2022-3-4`
-### Bug Fixes
-- Slider: 视觉调整 & demo无法滑动问题修复 [#200](https://github.com/Tencent/tdesign-miniprogram/pull/200) [@anlyyao](https://github.com/anlyyao)
-- Search: 修复圆角样式不生效问题 [#208](https://github.com/Tencent/tdesign-miniprogram/pull/208) [@JJunYang](https://github.com/JJunYang)
-- Tab-bar: 修复 `value` 不生效问题 [#211](https://github.com/Tencent/tdesign-miniprogram/pull/211) [@LeeJim](https://github.com/LeeJim)
-### Feature
-- Picker: 支持渐进式滚动 [#203](https://github.com/Tencent/tdesign-miniprogram/pull/203) [@wutianSweet](https://github.com/wutianSweet)
-- Tabs: 添加滚动条外部样式类 [#213](https://github.com/Tencent/tdesign-miniprogram/pull/213) [@JJunYang](https://github.com/JJunYang)
-
-## 0.5.3 `2022-2-24`
-### Bug Fixes
-- Input: 修复 `label` 不生效的问题 [#190](https://github.com/Tencent/tdesign-miniprogram/pull/190) [@zhenzhencai](https://github.com/zhenzhencai)
-- Slider: 修复 `value` 不受控的问题 [#193](https://github.com/Tencent/tdesign-miniprogram/pull/193) [@LeeJim](https://github.com/LeeJim)
-- Search: [#195](https://github.com/Tencent/tdesign-miniprogram/pull/195) [@LeeJim](https://github.com/LeeJim)
- - 移除受控用法
- - 支持双向绑定
- - 修复 `placeholder` 展示错误的问题
-## 0.5.2 `2022-2-15`
-
-### Bug Fixes
-- Stepper: 修复标签过长时的遮挡问题 [#175](https://github.com/Tencent/tdesign-miniprogram/pull/175) [@GAOGAO1994](https://github.com/GAOGAO1994)
-- Upload: 修复 `success` 事件,返回当前选择的所有文件 [#181](https://github.com/Tencent/tdesign-miniprogram/pull/181) [@LeeJim](https://github.com/LeeJim)
-- Checkbox: 修复选择异常的问题 [#181](https://github.com/Tencent/tdesign-miniprogram/pull/181) [@LeeJim](https://github.com/LeeJim)
-### Feature
-- Upload: 新增 `add` 事件,返回当前选择的文件 [#181](https://github.com/Tencent/tdesign-miniprogram/pull/181) [@LeeJim](https://github.com/LeeJim)
-
-## 0.5.1 `2022-2-15`
-
-### Bug Fixes
-
-- Stepper
- - 修复外部样式类失效的问题 [#168](https://github.com/Tencent/tdesign-miniprogram/pull/168) [@walkerliu01](https://github.com/walkerliu01)
- - 修复点击热区过于小的问题 [#169](https://github.com/Tencent/tdesign-miniprogram/pull/169) [@LeeJim](https://github.com/LeeJim)
-- Cell: 修复基础样式丢失的问题 [#171](https://github.com/Tencent/tdesign-miniprogram/pull/171) [@LeeJim](https://github.com/LeeJim)
-- CountDown: 修复基础样式丢失的问题 [#172](https://github.com/Tencent/tdesign-miniprogram/pull/172) [@LeeJim](https://github.com/LeeJim)
-- Divider: 修复基础样式丢失的问题 [#173](https://github.com/Tencent/tdesign-miniprogram/pull/173) [@LeeJim](https://github.com/LeeJim)
-- Checkbox: 修复禁用状态下的选中态 [#175](https://github.com/Tencent/tdesign-miniprogram/pull/175) [@amberlwan](https://github.com/amberlwan)
-### Feature
-
-- Steps: 升级新版视觉 [#167](https://github.com/Tencent/tdesign-miniprogram/pull/167) [@LeeJim](https://github.com/LeeJim)
-- Dialog: 新增外部样式类 [#170](https://github.com/Tencent/tdesign-miniprogram/pull/170) [@LeeJim](https://github.com/LeeJim)
-- CountDown: 新增 3 个属性:`size`、`theme`、`splitWithUnit` [#172](https://github.com/Tencent/tdesign-miniprogram/pull/172) [@LeeJim](https://github.com/LeeJim)
-
-## 0.5.0 `2022-1-28`
-
-### BREAKING CHANGES
-
-- 组件支持受控用法,对应的非受控属性增加了 `default` 前缀。支持受控的组件如下:
- - Checkbox [#158](https://github.com/Tencent/tdesign-miniprogram/pull/158) [@amberlwan](https://github.com/amberlwan)
- - Upload [#156](https://github.com/Tencent/tdesign-miniprogram/pull/156) [@LeeJim](https://github.com/LeeJim)
- - Search [#152](https://github.com/Tencent/tdesign-miniprogram/pull/152) [@LeeJim](https://github.com/LeeJim)
- - Slider [#151](https://github.com/Tencent/tdesign-miniprogram/pull/151) [@LeeJim](https://github.com/LeeJim)
- - Stepper [#150](https://github.com/Tencent/tdesign-miniprogram/pull/150) [@LeeJim](https://github.com/LeeJim)
- - Rate [#149](https://github.com/Tencent/tdesign-miniprogram/pull/149) [@LeeJim](https://github.com/LeeJim)
- - Tabbar [#148](https://github.com/Tencent/tdesign-miniprogram/pull/148) [@LeeJim](https://github.com/LeeJim)
- - Tabs [#147](https://github.com/Tencent/tdesign-miniprogram/pull/147) [@LeeJim](https://github.com/LeeJim)
- - Steps [#146](https://github.com/Tencent/tdesign-miniprogram/pull/146) [@LeeJim](https://github.com/LeeJim)
- - Radio [#143](https://github.com/Tencent/tdesign-miniprogram/pull/143) [@LeeJim](https://github.com/LeeJim)
- - Tag [#130](https://github.com/Tencent/tdesign-miniprogram/pull/130) [@LeeJim](https://github.com/LeeJim)
- - Dialog [#124](https://github.com/Tencent/tdesign-miniprogram/pull/124) [@LeeJim](https://github.com/LeeJim)
- - Switch [#122](https://github.com/Tencent/tdesign-miniprogram/pull/122) [@LeeJim](https://github.com/LeeJim)
-- Textarea: 属性 `name` 变更为 `label` [#157](https://github.com/Tencent/tdesign-miniprogram/pull/157) [@LeeJim](https://github.com/LeeJim)
-- Input: 属性 `name` 变更为 `label` [#153](https://github.com/Tencent/tdesign-miniprogram/pull/153) [@LeeJim](https://github.com/LeeJim)
-- Search: [#152](https://github.com/Tencent/tdesign-miniprogram/pull/152) [@LeeJim](https://github.com/LeeJim)
- - 属性 `actionText` 变更为 `action`
- - 属性 `keyword` 变更为 `value`
-
-### Bug Fixes
-
-- 修复基础样式丢失的问题:
- - Loading [#140](https://github.com/Tencent/tdesign-miniprogram/pull/140) [@JJunYang](https://github.com/JJunYang)
- - Badge [#131](https://github.com/Tencent/tdesign-miniprogram/pull/131) [@Perisiguiendo](https://github.com/Perisiguiendo)
- - Avatar [#116](https://github.com/Tencent/tdesign-miniprogram/pull/116) [@Perisiguiendo](https://github.com/Perisiguiendo)
-- Button: 修复 `disabled` 失效的问题 [#134](https://github.com/Tencent/tdesign-miniprogram/pull/134) [@LeeJim](https://github.com/LeeJim)
-- Search: 修复事件参数错误的问题 [#132](https://github.com/Tencent/tdesign-miniprogram/pull/132) [@Perisiguiendo](https://github.com/Perisiguiendo)
-- Dialog: 修复 `Dialog.action` 显示错误的问题 [#124](https://github.com/Tencent/tdesign-miniprogram/pull/124) [@LeeJim](https://github.com/LeeJim)
-
-### Feature
-
-- Input: 支持双向绑定 [#133](https://github.com/Tencent/tdesign-miniprogram/pull/133) [@LeeJim](https://github.com/LeeJim)
-- Tabbar: 新增 `split` 属性控制是否展示分割线 [#126](https://github.com/Tencent/tdesign-miniprogram/pull/126) [@LeeJim](https://github.com/LeeJim)
-- Icon: 支持自定义 `prefix` [#117](https://github.com/Tencent/tdesign-miniprogram/pull/117) [@vhxubo](https://github.com/vhxubo)
-## 0.4.2 `2022-1-10`
-
-### Bug Fixes
-
-- Popup: 修复事件参数错误的问题 [#91](https://github.com/Tencent/tdesign-miniprogram/pull/91) [@LeeJim](https://github.com/LeeJim)
-- Checkbox: 完善缺失的插槽(`label`、`content`) [#95](https://github.com/Tencent/tdesign-miniprogram/pull/95) [@LeeJim](https://github.com/LeeJim)
-- Dialog: 修复按钮宽度计算错误的问题 [#100](https://github.com/Tencent/tdesign-miniprogram/pull/100) [@LeeJim](https://github.com/LeeJim)
-- Button: 修复在 `{ style: "v2" }` 的情况下,按钮宽度异常的问题 [#79](https://github.com/Tencent/tdesign-miniprogram/pull/79) [@vhxubo](https://github.com/vhxubo)
-
-## 0.4.1 `2022-1-6`
-### Bug Fixes
-
-- Tabs: 修复滑动切换时,不会触发 `change` 事件的问题 [#65](https://github.com/Tencent/tdesign-miniprogram/pull/65) [@BeanCookie](https://github.com/BeanCookie)
-- Message: 未正确引入组件时,抛出的错误信息 [#73](https://github.com/Tencent/tdesign-miniprogram/pull/73) [@LeeJim](https://github.com/LeeJim)
-- Dialog: 修复样式异常的问题 [#83](https://github.com/Tencent/tdesign-miniprogram/pull/83) [@LeeJim](https://github.com/LeeJim)
-
-### Feature
-
-- Button: 支持 `content` 属性,代表按钮内容 [#83](https://github.com/Tencent/tdesign-miniprogram/pull/83) [@LeeJim](https://github.com/LeeJim)
-- Dialog: `cancelBtn` 和 `confirmBtn` 支持所有 `t-button` 的属性 [#83](https://github.com/Tencent/tdesign-miniprogram/pull/83) [@LeeJim](https://github.com/LeeJim)
-
-## 0.4.0 `2021-12-30`
-
-### BREAKING CHANGES
-- CSS 类名规范:
- - Slider [#45](https://github.com/Tencent/tdesign-miniprogram/pull/45) [@JJunYang](https://github.com/JJunYang)
- - Stepper [#46](https://github.com/Tencent/tdesign-miniprogram/pull/46) [@JJunYang](https://github.com/JJunYang)
- - Button [#51](https://github.com/Tencent/tdesign-miniprogram/pull/51) [@LeeJim](https://github.com/LeeJim)
- - Search [#54](https://github.com/Tencent/tdesign-miniprogram/pull/54) [@JJunYang](https://github.com/JJunYang)
- - Upload [#55](https://github.com/Tencent/tdesign-miniprogram/pull/55) [@JJunYang](https://github.com/JJunYang)
- - Radio [#56](https://github.com/Tencent/tdesign-miniprogram/pull/56) [@LeeJim](https://github.com/LeeJim)
-### Bug Fixes
-
-- Input: 移除了废弃属性 `auto-focus`,详情可关注小程序官方文档 [@LeeJim](https://github.com/LeeJim)
-- Tabs:
- - 修复选项卡底部滑条丢失的问题 [#52](https://github.com/Tencent/tdesign-miniprogram/pull/52) [@LeeJim](https://github.com/LeeJim)
- - 补充了初始化样式 [#68](https://github.com/Tencent/tdesign-miniprogram/pull/68) [@LeeJim](https://github.com/LeeJim)
-
-## 0.3.0 `2021-12-23`
-
-### BREAKING CHANGES
-- CSS 类名规范:
- - Textarea [#26](https://github.com/Tencent/tdesign-miniprogram/pull/26) [@JJunYang](https://github.com/JJunYang)
- - Toast [#27](https://github.com/Tencent/tdesign-miniprogram/pull/27) [@jin0209](https://github.com/jin0209)
- - Sticky [#24](https://github.com/Tencent/tdesign-miniprogram/pull/24) [@jin0209](https://github.com/jin0209)
- - Search [#28](https://github.com/Tencent/tdesign-miniprogram/pull/28) [@JJunYang](https://github.com/JJunYang)
- - Tabbar [#34](https://github.com/Tencent/tdesign-miniprogram/pull/34) [@LeeJim](https://github.com/LeeJim)
- - Backtop [#35](https://github.com/Tencent/tdesign-miniprogram/pull/35) [@LeeJim](https://github.com/LeeJim)
- - Skeleton [#20](https://github.com/Tencent/tdesign-miniprogram/pull/20) [@jin0209](https://github.com/jin0209)
- - PullDownRefresh [#38](https://github.com/Tencent/tdesign-miniprogram/pull/38) [@jin0209](https://github.com/jin0209)
-
-### Bug Fixes
-
-- 修复开发者工具进行 NPM 构建时报错的问题 [@LeeJim](https://github.com/LeeJim)
-
-### Feature
-
-- Steps: 支持通过 `slot` 的方式传入 `icon` [#22](https://github.com/Tencent/tdesign-miniprogram/pull/22) [@LeeJim](https://github.com/LeeJim)
-
-## 0.2.0 `2021-12-20`
-### BREAKING CHANGES
-
-- CSS 类名规范:
- - Cell [[4a0db04]](https://github.com/Tencent/tdesign-miniprogram/commit/4a0db04768f56016b27405090890d8fcb113c38b) [@jin0209](https://github.com/jin0209)
- - Grid [[13c77c9]](https://github.com/Tencent/tdesign-miniprogram/commit/13c77c93f55e04d7fac144ba5a0b16d336642080) [@jin0209](https://github.com/jin0209)
- - Tabs [[e064d8e]](https://github.com/Tencent/tdesign-miniprogram/commit/e064d8e7fd6c33e81b399bf0b5c15f21ebc7c38e) [@jin0209](https://github.com/jin0209)
- - NavBar [[249af24]](https://github.com/Tencent/tdesign-miniprogram/commit/249af24a8dc05eb868d63138069ad13858a586eb) [@jin0209](https://github.com/jin0209)
- - CountDown [[c6ce131]](https://github.com/Tencent/tdesign-miniprogram/commit/c6ce131cdfd453c8250124d874d6a705a4332a07) [@jin0209](https://github.com/jin0209)
- - Image [[707f9ec]](https://github.com/Tencent/tdesign-miniprogram/commit/707f9ec91cf95a70db86c6dc519d0c4ad869a9c0) [@jin0209](https://github.com/jin0209)
- - Footer [[15036a7]](https://github.com/Tencent/tdesign-miniprogram/commit/15036a75f47244fb859f067309a8a8288b4b606d) [@jin0209](https://github.com/jin0209)
- - Divider [[4cad692]](https://github.com/Tencent/tdesign-miniprogram/commit/4cad69212ab4d71fc84014a82a43440ac9c47592) [@jin0209](https://github.com/jin0209)
- - Avatar [[b7ef036]](https://github.com/Tencent/tdesign-miniprogram/commit/b7ef036106a662275941c4217c4e870a2460736f) [@jin0209](https://github.com/jin0209)
- - Badge [[154a087]](https://github.com/Tencent/tdesign-miniprogram/commit/154a0870f8565f42168990af207051b0c2e427d4) [@jin0209](https://github.com/jin0209)
- - Indexes [[bf0ae0]](https://github.com/Tencent/tdesign-miniprogram/commit/bf0ae05dc0f419aa0a50904f0d22221f67526b18) [@jin0209](https://github.com/jin0209)
- - Input [[6201113]](https://github.com/Tencent/tdesign-miniprogram/commit/6201113a3a7d114b75ca7813ac4c6cb74ccbbf1f) [@JJunYang](https://github.com/JJunYang)
- - Checkbox [[6bf8fc8]](https://github.com/Tencent/tdesign-miniprogram/commit/6bf8fc8c49abf9084c4f968374896ae63270c0a7) [@JJunYang](https://github.com/JJunYang)
-- Tabs: 移除 `click` 事件 [[5973c8a]](https://github.com/Tencent/tdesign-miniprogram/commit/5973c8a76e18fe68bfba81a26ff78a30f11cd5eb) [@JJunYang](https://github.com/JJunYang)
-
-### Bug Fixes
-
-- Icon: 修复没有垂直居中的问题 [[97e1b7f]](https://github.com/Tencent/tdesign-miniprogram/commit/97e1b7f86cb406e49fc73f154a90a1107ddb17e3) [@LeeJim](https://github.com/LeeJim)
-- Rate: 修复展示错乱的问题 [[8c5fe61]](https://github.com/Tencent/tdesign-miniprogram/commit/8c5fe61d4fe00ffe86996743414a738d6e8b2407) [@LeeJim](https://github.com/LeeJim)
-- Tabs: 修复初始化时触发 `change` 的问题 [[1411217]](https://github.com/Tencent/tdesign-miniprogram/commit/141121785f6d7ca2458425aa5fcf10d2419ec248) [@JJunYang](https://github.com/JJunYang)
-
-### Feature
-
-- Tag: 支持不同尺寸的 `icon` [[574cc3c]](https://github.com/Tencent/tdesign-miniprogram/commit/6eee831f4308d205cc2e7187886909922) [@LeeJim](https://github.com/LeeJim)
-
-## 0.1.0-alpha.1 `2021-12-8`
-
-### Bug Fixes
-
-- Swiper: 修复无法切换的问题
-- Picker: 修复默认按钮没显示的问题
-
-## 0.1.0 (2021-11-25)
-
-### BREAKING CHANGES
-
-- Badege: 属性 `visible` 更名为 `showZero`
-- Steps: 属性 `direction` 更名为 `layout`
-
-### Bug Fixes
-
-- DateTimePicker: 修复初始值为空时,取消筛选的问题
+---
+title: 更新日志
+spline: explain
+toc: false
+docClass: timeline
+---
+
+## 🌈 1.0.4 `2023-03-20`
+### 🚀 Features
+- `PullDownRefresh`: 支持无障碍访问支持 @shinyina ([#1241](https://github.com/Tencent/tdesign-miniprogram/pull/1241))
+- `Steps`: 支持无障碍访问 @tangzixuan ([#1783](https://github.com/Tencent/tdesign-miniprogram/pull/1783))
+
+### 🐞 Bug Fixes
+- `Textarea`: 修复 `autosize` 为 `true` 时,`placeholder` 上移问题 @anlyyao ([#1781](https://github.com/Tencent/tdesign-miniprogram/pull/1781))
+- `Switch`: 修复 label 和 icon 渲染顺序错误的问题 @LeeJim ([#1809](https://github.com/Tencent/tdesign-miniprogram/pull/1809))
+- `Loading`: 修复错误的 style 导致 wxs 报错 @LeeJim ([#1810](https://github.com/Tencent/tdesign-miniprogram/pull/1810))
+- `Radio`: 修复 placement 优先级的问题 @LeeJim ([#1812](https://github.com/Tencent/tdesign-miniprogram/pull/1812))
+- `Button`: 解决多个插槽的渲染问题 @LeeJim ([#1813](https://github.com/Tencent/tdesign-miniprogram/pull/1813))
+- `Link`: 解决多个插槽无法渲染的问题 @LeeJim ([#1816](https://github.com/Tencent/tdesign-miniprogram/pull/1816))
+- `TabPanel`: 解决多个插槽无法渲染的问题 @LeeJim ([#1816](https://github.com/Tencent/tdesign-miniprogram/pull/1816))
+- `Upload`: 修复点击事件失效问题 @yaogengzhu ([#1802](https://github.com/Tencent/tdesign-miniprogram/pull/1802))
+- `Upload`: 修复 limit 限制的问题 @yaogengzhu ([#1800](https://github.com/Tencent/tdesign-miniprogram/pull/1800))
+
+
+## 🌈 1.0.3 `2023-03-14`
+### 🚀 Features
+- `Picker`: 新增支持 keys 属性 @LeeJim ([#1759](https://github.com/Tencent/tdesign-miniprogram/pull/1759))
+- `Input`: 支持 `nicknamereview` 事件 @anlyyao ([#1755](https://github.com/Tencent/tdesign-miniprogram/pull/1755))
+- `Popup`: 增加默认圆角、默认背景色、安全底边距 @jarmywang ([#1758](https://github.com/Tencent/tdesign-miniprogram/pull/1758))
+### 🐞 Bug Fixes
+- `DropdownMenu`: 修复 label 的展示逻辑 @LeeJim ([#1748](https://github.com/Tencent/tdesign-miniprogram/pull/1748))
+- `DropdownMenu`: 修复 radio 图标的展示位置 @LeeJim ([#1748](https://github.com/Tencent/tdesign-miniprogram/pull/1748))
+- `Popup`: 修复关闭按钮无法点击的问题 @jarmywang ([#1754](https://github.com/Tencent/tdesign-miniprogram/pull/1754))
+- `Calendar`: 修复 format 属性不是响应式的问题 @LeeJim ([#1753](https://github.com/Tencent/tdesign-miniprogram/pull/1753))
+- `Checkbox`: 修复存在 disabled 选项时,全选出错的问题 @LeeJim ([#1766](https://github.com/Tencent/tdesign-miniprogram/pull/1766))
+- `Badge`: 修复 shape = ribbon 时,修改 color 不能改变全部颜色的问题 @LeeJim ([#1764](https://github.com/Tencent/tdesign-miniprogram/pull/1764))
+- `Upload`: 修复 sizelimit 不支持对象传参的问题 @LeeJim ([#1763](https://github.com/Tencent/tdesign-miniprogram/pull/1763))
+- `Upload`: 修复 sizelimit 默认单位和文档不一致的问题,从 `B` 改成 `KB` @LeeJim ([#1763](https://github.com/Tencent/tdesign-miniprogram/pull/1763))
+- `Button`: 取消 `loading` 态下的 hover 效果 @anlyyao ([#1739](https://github.com/Tencent/tdesign-miniprogram/pull/1739))
+- `Button`: 事件 `tap` 仅在非加载或禁用状态时触发 @anlyyao ([#1739](https://github.com/Tencent/tdesign-miniprogram/pull/1739))
+- `Badge`: 优化和不同组件组合的无障碍访问 @yaogengzhu ([#1428](https://github.com/Tencent/tdesign-miniprogram/pull/1428))
+- `Cell`: 修复 `note` 内容超出被遮挡问题 @anlyyao ([#1769](https://github.com/Tencent/tdesign-miniprogram/pull/1769))
+- `Progress`: 修复 label 插槽无效 @anlyyao ([#1771](https://github.com/Tencent/tdesign-miniprogram/pull/1771))
+- `Grid`: 修复 grid-item 的 image 插槽不可用的问题,需传入 image = slot 才可使用插槽 @LeeJim ([#1772](https://github.com/Tencent/tdesign-miniprogram/pull/1772))
+
+### 🚧 Others
+- `Picker`: 文档中移除 render-label、columns 还不支持的属性 @LeeJim ([#1759](https://github.com/Tencent/tdesign-miniprogram/pull/1759))
+
+## 🌈 1.0.2 `2023-03-07`
+### 🐞 Bug Fixes
+- `Radio`: 修复使用 options 时可传入的属性不齐的问题 @LeeJim ([#1707](https://github.com/Tencent/tdesign-miniprogram/pull/1707))
+- `Checkbox`: 修复使用 options 时可传入的属性不齐的问题 @LeeJim ([#1707](https://github.com/Tencent/tdesign-miniprogram/pull/1707))
+- `RadioGroup`: 修复 placement 默认值错误的问题 @LeeJim ([#1707](https://github.com/Tencent/tdesign-miniprogram/pull/1707))
+- `RadioGroup`: 修复 icon 消失的问题 @LeeJim ([#1707](https://github.com/Tencent/tdesign-miniprogram/pull/1707))
+- `ActionSheet`: 修复点击报错的问题 @LeeJim ([#1726](https://github.com/Tencent/tdesign-miniprogram/pull/1726))
+- `Swiper`: 修复在真机上圆角无效问题 @anlyyao ([#1733](https://github.com/Tencent/tdesign-miniprogram/pull/1733))
+- `NavBar`: 修复外部样式类不可用的问题 @LeeJim ([#1735](https://github.com/Tencent/tdesign-miniprogram/pull/1735))
+- `Footer`: 补齐 API 文档描述 @anlyyao ([#1737](https://github.com/Tencent/tdesign-miniprogram/pull/1737))
+- `Swiper`: 修复基础调试库低于2.19.2时,图片不显示问题 @anlyyao ([#1736](https://github.com/Tencent/tdesign-miniprogram/pull/1736))
+- `ImageViewer`: 修复图片显示不全的问题 @anlyyao ([#1656](https://github.com/Tencent/tdesign-miniprogram/pull/1656))
+- `Input`: 修复 `maxLength` 无效问题,并将默认值变更为 -1 @anlyyao ([#1732](https://github.com/Tencent/tdesign-miniprogram/pull/1732))
+- `Input`: 修复键盘弹起时,点击 clear 没反应的问题 @anlyyao ([#1732](https://github.com/Tencent/tdesign-miniprogram/pull/1732))
+
+## 🌈 1.0.1 `2023-03-01`
+### 🚀 Features
+- `Cascader`: 新增 close 事件 @LeeJim ([#1685](https://github.com/Tencent/tdesign-miniprogram/pull/1685))
+- `Picker`: 新增 close 事件 @LeeJim ([#1687](https://github.com/Tencent/tdesign-miniprogram/pull/1687))
+- `DateTimePicker`: 新增 close 事件 @LeeJim ([#1687](https://github.com/Tencent/tdesign-miniprogram/pull/1687))
+- `Upload`: 支持无障碍访问 @zhangpaopao0609 ([#1238](https://github.com/Tencent/tdesign-miniprogram/pull/1238))
+### 🐞 Bug Fixes
+- `ActionSheet`: 补充 close 事件,增加 trigger 参数 @LeeJim ([#1683](https://github.com/Tencent/tdesign-miniprogram/pull/1683))
+- `Cascader`: 修复 pick 事件的参数 @LeeJim ([#1685](https://github.com/Tencent/tdesign-miniprogram/pull/1685))
+- `drawer`: 修复 close 事件不生效的问题 @LeeJim ([#1686](https://github.com/Tencent/tdesign-miniprogram/pull/1686))
+- `Message`: 修复外部样式类 `t-class-link` 无效问题 @anlyyao ([#1690](https://github.com/Tencent/tdesign-miniprogram/pull/1690))
+- `Cascader`: 修复 radio 图标显示位置不正确的问题 @LeeJim ([#1693](https://github.com/Tencent/tdesign-miniprogram/pull/1693))
+- `DropdownMenu`: 修复 radio 图标显示位置不正确的问题 @LeeJim ([#1693](https://github.com/Tencent/tdesign-miniprogram/pull/1693))
+- `TreeSelect`: 修复 radio 图标显示位置不正确的问题 @LeeJim ([#1693](https://github.com/Tencent/tdesign-miniprogram/pull/1693))
+- `Message`: 更新内嵌 `link` 组件的属性 @anlyyao ([#1694](https://github.com/Tencent/tdesign-miniprogram/pull/1694))
+
+## 🌈 1.0.0 `2023-02-27`
+### ❗ Breaking Changes
+- 主题色 CSS Variables 命名从 `--td-primary-color` 改成 `--td-brand-color` @LeeJim ([#1623](https://github.com/Tencent/tdesign-miniprogram/pull/1623))
+- `Cell`: 调整 hover 状态对应的类名 @anlyyao ([#1635](https://github.com/Tencent/tdesign-miniprogram/pull/1635))
+- `Checkbox`: 属性 align 更名为 placement @anlyyao ([#1629](https://github.com/Tencent/tdesign-miniprogram/pull/1629))
+- `Toast`: 属性 theme 的枚举值 fail 替换成 error @LeeJim ([#1647](https://github.com/Tencent/tdesign-miniprogram/pull/1647))
+- `Slider`: 移除 colors 和 disabledColor,建议使用 CSS Variables 修改 @LeeJim ([#1676](https://github.com/Tencent/tdesign-miniprogram/pull/1676))
+- `Loading`: 移除 theme = error 以及 theme = bar,以及调整 DOM @LeeJim ([#1626](https://github.com/Tencent/tdesign-miniprogram/pull/1626))
+- `Picker`: 移除 `footer` 插槽 @anlyyao ([#1631](https://github.com/Tencent/tdesign-miniprogram/pull/1631))
+- `DateTimePicker`: 移除 `footer` 插槽 @anlyyao ([#1631](https://github.com/Tencent/tdesign-miniprogram/pull/1631))
+- `Radio`: 属性 align 更名为 placement @anlyyao ([#1630](https://github.com/Tencent/tdesign-miniprogram/pull/1630))
+- `RadioGroup`: 属性 align 更名为 placement @anlyyao ([#1630](https://github.com/Tencent/tdesign-miniprogram/pull/1630))
+- `Search`: 移除 `right-icon` 属性相关 @anlyyao ([#1628](https://github.com/Tencent/tdesign-miniprogram/pull/1628))
+- `Avatar`: 移除 `bordered` 属性 @anlyyao ([#1632](https://github.com/Tencent/tdesign-miniprogram/pull/1632))
+- `AvatarGroup`: `cascading` 属性默认值变更为 `left-up` @anlyyao ([#1632](https://github.com/Tencent/tdesign-miniprogram/pull/1632))
+- `Message`: 移除 `action` 属性相关,使用 `link` 代替 @anlyyao ([#1637](https://github.com/Tencent/tdesign-miniprogram/pull/1637))
+- `Footer`: `copyright` 更名为 `text` @anlyyao ([#1642](https://github.com/Tencent/tdesign-miniprogram/pull/1642))
+- `Footer`: `textLinkList` 更名为 `links` @anlyyao ([#1642](https://github.com/Tencent/tdesign-miniprogram/pull/1642))
+- `Footer`: 移除 `theme` 属性 @anlyyao ([#1642](https://github.com/Tencent/tdesign-miniprogram/pull/1642))
+- `CountDown`: `theme` 属性移除 `hightlight` @anlyyao ([#1645](https://github.com/Tencent/tdesign-miniprogram/pull/1645))
+- `Link`: 移除 `status` 属性 @anlyyao ([#1652](https://github.com/Tencent/tdesign-miniprogram/pull/1652))
+- `Rate`: 移除 variant 属性,完全依赖 icon 属性来控制图标 @LeeJim ([#1674](https://github.com/Tencent/tdesign-miniprogram/pull/1674))
+- `NoticeBar`: `extra` 属性更名为 `operation` @anlyyao ([#1638](https://github.com/Tencent/tdesign-miniprogram/pull/1638))
+
+### 🚀 Features
+- `Search`: 新增 `clearable`,用于启用清除控件 @anlyyao ([#1628](https://github.com/Tencent/tdesign-miniprogram/pull/1628))
+- `Button`: 新增支持 suffix 插槽 @LeeJim ([#1624](https://github.com/Tencent/tdesign-miniprogram/pull/1624))
+- `Message`: 新增 `link` 属性 @anlyyao ([#1637](https://github.com/Tencent/tdesign-miniprogram/pull/1637))
+- `Link`: 新增 `disabled` 属性 @anlyyao ([#1652](https://github.com/Tencent/tdesign-miniprogram/pull/1652))
+- `Link`: 新增 `hover` 属性 @anlyyao ([#1652](https://github.com/Tencent/tdesign-miniprogram/pull/1652))
+- `Link`: 新增 `externalClasses` 属性 @anlyyao ([#1652](https://github.com/Tencent/tdesign-miniprogram/pull/1652))
+- `Drawer`: 补充 `hover` 态样式 @anlyyao ([#1673](https://github.com/Tencent/tdesign-miniprogram/pull/1673))
+- `AvatarGroup`: 头像组中默认带边框 @anlyyao ([#1678](https://github.com/Tencent/tdesign-miniprogram/pull/1678))
+### 🐞 Bug Fixes
+- `Fab`: 修复丢失style 默认值的问题 @LeeJim ([#1625](https://github.com/Tencent/tdesign-miniprogram/pull/1625))
+- `Dialog`: 修复文字按钮`hover`态圆角不正确 @anlyyao ([#1633](https://github.com/Tencent/tdesign-miniprogram/pull/1633))
+- `Switch`: 优化禁用态下 loading 的颜色 @LeeJim ([#1627](https://github.com/Tencent/tdesign-miniprogram/pull/1627))
+- `Message`: 修复主题图标不正确 @anlyyao ([#1637](https://github.com/Tencent/tdesign-miniprogram/pull/1637))
+- `NavBar`: 修复胶囊内部点击事件没反应的问题 @LeeJim ([#1641](https://github.com/Tencent/tdesign-miniprogram/pull/1641))
+- `Dialog`: 修复 confirm 的拼写错误 @zzzimooo ([#1644](https://github.com/Tencent/tdesign-miniprogram/pull/1644))
+- `CountDown`: 修复默认风格下时间单位分割的问题 @anlyyao ([#1645](https://github.com/Tencent/tdesign-miniprogram/pull/1645))
+- `Slider`: 优化无障碍访问支持 @byq1213 ([#1388](https://github.com/Tencent/tdesign-miniprogram/pull/1388))
+- `Collapse`: 修复 disabled 状态下标题颜色错误的问题 @LeeJim ([#1648](https://github.com/Tencent/tdesign-miniprogram/pull/1648))
+- `Cell`: 修复外部样式类 t-class-title 放置位置错误的问题 @LeeJim ([#1648](https://github.com/Tencent/tdesign-miniprogram/pull/1648))
+- `Tag`: 修复 `close` 与 `click` 事件一并触发的问题 @anlyyao ([#1669](https://github.com/Tencent/tdesign-miniprogram/pull/1669))
+- `Rate`: 修复 tips 偶尔会不消失的问题 @LeeJim ([#1674](https://github.com/Tencent/tdesign-miniprogram/pull/1674))
+- `BackTop`: 修复 `icon` 不显示问题 @anlyyao ([#1660](https://github.com/Tencent/tdesign-miniprogram/pull/1660))
+- `NoticeBar`: 修复主题图标不正确 @anlyyao ([#1638](https://github.com/Tencent/tdesign-miniprogram/pull/1638))
+- `Badge`: 调整 display 使用 block 替换 inline-block @anlyyao ([#1679](https://github.com/Tencent/tdesign-miniprogram/pull/1679))
+- `Dialog`: 修复命令行方式没法调整按钮布局的问题 @zzzimooo ([#1655](https://github.com/Tencent/tdesign-miniprogram/pull/1655))
+## 🌈 1.0.0-rc.3 `2023-02-20`
+### ❗ Breaking Changes
+- `Image`: 插槽的渲染需要传入对应 slot 的字符串 @LeeJim ([#1609](https://github.com/Tencent/tdesign-miniprogram/pull/1609))
+- `Input`: 调整 DOM 以及类名 @anlyyao ([#1585](https://github.com/Tencent/tdesign-miniprogram/pull/1585))
+
+### 🚀 Features
+- 所有组件新增支持 class 外部样式类,仅在开启 virtualHost 的情况下生效 @anlyyao ([#1587](https://github.com/Tencent/tdesign-miniprogram/pull/1587))
+- `Input`: 支持 `tips` 文本方向与 `align` 属性值一致 @anlyyao ([#1585](https://github.com/Tencent/tdesign-miniprogram/pull/1585))
+- `CellGroup`: 默认最后一项 `cell` 无底部边框线 @anlyyao ([#1607](https://github.com/Tencent/tdesign-miniprogram/pull/1607))
+- `Image`: 补充外部样式类名 `class` @anlyyao ([#1611](https://github.com/Tencent/tdesign-miniprogram/pull/1611))
+- `DropdownMenu`: 新增 `reset` 事件 @LeeJim ([#1617](https://github.com/Tencent/tdesign-miniprogram/pull/1617))
+- `Drawer`: 支持无障碍访问 @zhangpaopao0609 ([#1552](https://github.com/Tencent/tdesign-miniprogram/pull/1552))
+
+### 🐞 Bug Fixes
+- `Input`: 修复 `layout = 'vertical'` 时,样式不正确 @anlyyao ([#1585](https://github.com/Tencent/tdesign-miniprogram/pull/1585))
+- `Swiper`: 修复图片压缩变形问题 @anlyyao ([#1607](https://github.com/Tencent/tdesign-miniprogram/pull/1607))
+- `Navbar`: 修复左侧胶囊按钮在真机上上边框线消失问题 @anlyyao ([#1607](https://github.com/Tencent/tdesign-miniprogram/pull/1607))
+- `Upload`: 解决因无备用值产生的告警 @anlyyao ([#1611](https://github.com/Tencent/tdesign-miniprogram/pull/1611))
+- `Picker`: 解决因无备用值产生的告警 @anlyyao ([#1611](https://github.com/Tencent/tdesign-miniprogram/pull/1611))
+- `PullDownRefresh`: 解决因无备用值产生的告警 @anlyyao ([#1611](https://github.com/Tencent/tdesign-miniprogram/pull/1611))
+- `NoticeBar`: 解决 `SelectorQuery` 带来的告警 @anlyyao ([#1611](https://github.com/Tencent/tdesign-miniprogram/pull/1611))
+- `Link`: 修复 API 文档错误 @anlyyao ([#1611](https://github.com/Tencent/tdesign-miniprogram/pull/1611))
+- `Tabs`: 修复属性不支持响应式变化的问题 @LeeJim ([#1616](https://github.com/Tencent/tdesign-miniprogram/pull/1616))
+- `DropdownMenu`: 修复下拉菜单遮罩层无法点击 @RoseyW ([#1615](https://github.com/Tencent/tdesign-miniprogram/pull/1615))
+- `Message`: 修复事件名称,以符合文档 @LeeJim ([#1618](https://github.com/Tencent/tdesign-miniprogram/pull/1618))
+- `Dialog`: 修复事件名,从 `overlayClick` 改成 `overlay-click` @LeeJim ([#1619](https://github.com/Tencent/tdesign-miniprogram/pull/1619))
+- `SwiperNav`: 修复事件名,从 `navBtnChange` 改成 `nav-btn-change` @LeeJim ([#1619](https://github.com/Tencent/tdesign-miniprogram/pull/1619))
+- `TextArea`: 修复事件名,从 `lineChange` 改成 `line-change` @LeeJim ([#1619](https://github.com/Tencent/tdesign-miniprogram/pull/1619))
+
+## 🌈 1.0.0-rc.2 `2023-02-13`
+### ❗ Breaking Changes
+- `Icon`: `size` 和 `color` 属性默认值变更为 `''` @anlyyao ([#1553](https://github.com/Tencent/tdesign-miniprogram/pull/1553))
+### 🚀 Features
+- 所有组件同时支持 `style` 和 `customStyle` 属性 @LeeJim ([#1532](https://github.com/Tencent/tdesign-miniprogram/pull/1532))
+- `Button`: 支持点击态边框颜色 CSS Variable @anlyyao ([#1530](https://github.com/Tencent/tdesign-miniprogram/pull/1530))
+- `Result`: 属性 icon 支持对象类型,透传至图标组件 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `TabBar`: 属性 icon 支持对象类型,透传至图标组件 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Toast`: 属性 icon 支持对象类型,透传至图标组件 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+### 🐞 Bug Fixes
+- 修复因 template 引起的控制台告警 @anlyyao ([#1548](https://github.com/Tencent/tdesign-miniprogram/pull/1548))
+- 修复控制台告警 @LeeJim ([#1586](https://github.com/Tencent/tdesign-miniprogram/pull/1586))
+- `NavBar`: 补充根元素缺失的高度 @LeeJim ([#1526](https://github.com/Tencent/tdesign-miniprogram/pull/1526))
+- `Search`: 修复插槽命名错误 @anlyyao ([#1529](https://github.com/Tencent/tdesign-miniprogram/pull/1529))
+- `Loading`: 支持无障碍访问 @yaogengzhu ([#1534](https://github.com/Tencent/tdesign-miniprogram/pull/1534))
+- `Checkbox`: 修复 `--td-checkbox-icon-size` 对未选中态复选框不生效问题 @anlyyao ([#1530](https://github.com/Tencent/tdesign-miniprogram/pull/1530))
+- `BackTop`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Badge`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Grid`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Image`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Input`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Link`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Loading`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Message`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `BackTop`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `CountDown`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `TabBar`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `TextArea`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Toast`: 优化插槽渲染不再需要传入 slot 字符串 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `CountDown`: 补充 content 插槽 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Drawer`: 补充 title 插槽 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `Radio`: 补充 label、content 插槽 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `TabPanel`: 补充 panel 插槽 @LeeJim ([#1539](https://github.com/Tencent/tdesign-miniprogram/pull/1539))
+- `ImageViewer`: 优化插槽渲染逻辑,不再需要传入 slot 字符串 @LeeJim ([#1544](https://github.com/Tencent/tdesign-miniprogram/pull/1544))
+- `ImageViewer`: 修复关闭点击不生效的问题,以及 trigger 参数不对的问题 @LeeJim ([#1544](https://github.com/Tencent/tdesign-miniprogram/pull/1544))
+- `Calendar`: 移除 `tabindex` 元素 的 `outline` 样式 @anlyyao ([#1573](https://github.com/Tencent/tdesign-miniprogram/pull/1573))
+- `Input`: 支持名为 `tips` 的插槽 @anlyyao ([#1572](https://github.com/Tencent/tdesign-miniprogram/pull/1572))
+- `Button`: 修复 CSS Variable 变量命名错误 @anlyyao ([#1563](https://github.com/Tencent/tdesign-miniprogram/pull/1563))
+- `Calendar`: 优化 title 插槽,不再需要传入 slot 字符串 @LeeJim ([#1588](https://github.com/Tencent/tdesign-miniprogram/pull/1588))
+
+## 🌈 1.0.0-rc.1 `2023-01-18`
+### ❗ BREAKING CHANGES
+- `Dialog`: 移除内置的 input 样式 @LeeJim ([#1516](https://github.com/Tencent/tdesign-miniprogram/pull/1516))
+- `Input`: 优化 DOM,移除外置的 wapper 元素 @LeeJim ([#1516](https://github.com/Tencent/tdesign-miniprogram/pull/1516))
+
+### 🚀 Features
+- `Cell`: 新增底边框左右边距 CSS Variables @anlyyao ([#1515](https://github.com/Tencent/tdesign-miniprogram/pull/1515))
+- `Cell`: 补充 CSS Variables @anlyyao ([#1517](https://github.com/Tencent/tdesign-miniprogram/pull/1517))
+- `SideBar`: 支持传入 Icon @LeeJim ([#1520](https://github.com/Tencent/tdesign-miniprogram/pull/1520))
+- `Tabs`: 支持传入 icon @LeeJim ([#1519](https://github.com/Tencent/tdesign-miniprogram/pull/1519))
+### 🐞 Bug Fixes
+- `Upload`: 修复 add-content 不生效的问题 @LeeJim ([#1507](https://github.com/Tencent/tdesign-miniprogram/pull/1507))
+- `Upload`: 优化插槽渲染,不再需要传入 add-content = 'slot' @LeeJim ([#1507](https://github.com/Tencent/tdesign-miniprogram/pull/1507))
+- `Cascader`: 修复 slot 无法使用的问题 @LeeJim ([#1508](https://github.com/Tencent/tdesign-miniprogram/pull/1508))
+- `Picker`: 修复样式、优化布局以及交互体验 @LeeJim ([#1513](https://github.com/Tencent/tdesign-miniprogram/pull/1513))
+- `Swiper`: 修复 `autoplay` 状态下,`swiper` 偶现左右抖动问题 @anlyyao ([#1494](https://github.com/Tencent/tdesign-miniprogram/pull/1494))
+
+## 🌈 1.0.0-rc `2023-01-12`
+### ❗ Breaking Changes
+- 全部组件开启 vritualHost,当基础库版本低于 2.19.2 自动关闭 @LeeJim ([#1495](https://github.com/Tencent/tdesign-miniprogram/pull/1495))
+- 全部组件使用 style 属性替代 customStyle @LeeJim ([#1495](https://github.com/Tencent/tdesign-miniprogram/pull/1495))
+- `Tabs`: 废弃 placement 属性,左右布局请使用 SideBar 组件 @LeeJim ([#1492](https://github.com/Tencent/tdesign-miniprogram/pull/1492))
+
+### 🚀 Features
+- `Cell`: 新增 CSS Varialbes 用于控制高度 @LeeJim ([#1482](https://github.com/Tencent/tdesign-miniprogram/pull/1482))
+- `Indexes`: 新增支持 stickyOffset 属性,用于调整吸顶时的距离 @LeeJim ([#1485](https://github.com/Tencent/tdesign-miniprogram/pull/1485))
+- `Button`: 支持 0.5px 边框 @anlyyao ([#1474](https://github.com/Tencent/tdesign-miniprogram/pull/1474))
+
+### 🐞 Bug Fixes
+- `Button`: 修复 `shape = 'round'` 或 `‘circle’` 时,`border`样式错误 @anlyyao ([#1491](https://github.com/Tencent/tdesign-miniprogram/pull/1491))
+- `Calendar`: 修复视觉问题 @LeeJim ([#1473](https://github.com/Tencent/tdesign-miniprogram/pull/1473))
+- `Collapse`: 当 panel 内容为动态内容时,支持展开 @LeeJim ([#1477](https://github.com/Tencent/tdesign-miniprogram/pull/1477))
+- `Textarea`: 支持自适应父容器高度 @anlyyao ([#1484](https://github.com/Tencent/tdesign-miniprogram/pull/1484))
+- `Dialog`: 修复 confirmBtn 为 string 类型时,样式错误 @anlyyao ([#1474](https://github.com/Tencent/tdesign-miniprogram/pull/1474))
+- `Stepper`: 修复 `theme='normal'`时禁用态视觉错误 @anlyyao ([#1487](https://github.com/Tencent/tdesign-miniprogram/pull/1487))
+- `Rate`: 修复半选时 tips 的图标 @LeeJim ([#1490](https://github.com/Tencent/tdesign-miniprogram/pull/1490))
+- `Collapse`: 面板收起时,隐藏 header 的边框 @LeeJim ([#1493](https://github.com/Tencent/tdesign-miniprogram/pull/1493))
+
+## 🌈 0.34.0 `2023-01-09`
+### ❗ Breaking Changes
+- `Avatar`: 优化类名,符合 BEM 规范 @LeeJim ([#1441](https://github.com/Tencent/tdesign-miniprogram/pull/1441))
+- `Button`: 优化类名,符合 BEM 规范 @anlyyao ([#1352](https://github.com/Tencent/tdesign-miniprogram/pull/1352))
+- `Input`: 移除 size 属性 @anlyyao ([#1381](https://github.com/Tencent/tdesign-miniprogram/pull/1381))
+- `Input`: 属性 borderless 默认值变更为 false @anlyyao ([#1381](https://github.com/Tencent/tdesign-miniprogram/pull/1381))
+- `Avatar`: 将 avatar-group 的路径调整为 `tdesign-miniprogram/avatar-group/avatar-group` @LeeJim ([#1452](https://github.com/Tencent/tdesign-miniprogram/pull/1452))
+- `Collapse`: 将 collapse-panel 的路径调整为 `tdesign-miniprogram/collapse-panel/collapse-panel` @LeeJim ([#1453](https://github.com/Tencent/tdesign-miniprogram/pull/1453))
+- `DropdownMenu`: 将 dropdown-item 的路径调整为 `tdesign-miniprogram/dropdown-item/dropdown-item` @LeeJim ([#1454](https://github.com/Tencent/tdesign-miniprogram/pull/1454))
+- `Picker`: 将 picker-item 的路径调整为 `tdesign-miniprogram/picker-item/picker-item` @LeeJim ([#1455](https://github.com/Tencent/tdesign-miniprogram/pull/1455))
+- `Steps`: 将 step-item 的路径调整为 `tdesign-miniprogram/step-item/step-item` @LeeJim ([#1456](https://github.com/Tencent/tdesign-miniprogram/pull/1456))
+- `Swiper`: 将 swiper-nav 的路径调整为 `tdesign-miniprogram/swiper-nav/swiper-nav` @LeeJim ([#1457](https://github.com/Tencent/tdesign-miniprogram/pull/1457))
+- `Grid`: 将 grid-item 的路径调整为 `tdesign-miniprogram/grid-item/grid-item` @LeeJim ([#1459](https://github.com/Tencent/tdesign-miniprogram/pull/1459))
+- `TabBar`: 将 tab-bar-item 的路径调整为 `tdesign-miniprogram/tab-bar-item/tab-bar-item` @LeeJim ([#1460](https://github.com/Tencent/tdesign-miniprogram/pull/1460))
+- `Tabs`: 将 tab-panel 的路径调整为 `tdesign-miniprogram/tab-panel/tab-panel` @LeeJim ([#1462](https://github.com/Tencent/tdesign-miniprogram/pull/1462))
+- `Tag`: 将 check-tag 的路径调整为 `tdesign-miniprogram/check-tag/check-tag` @LeeJim ([#1466](https://github.com/Tencent/tdesign-miniprogram/pull/1466))
+
+### 🚀 Features
+- `ActionSheet`: 支持透传 image 至 Grid 组件 @LeeJim ([#1382](https://github.com/Tencent/tdesign-miniprogram/pull/1382))
+- `Swiper`: 属性 navigation 支持 boolean,默认值为 true @LeeJim ([#1387](https://github.com/Tencent/tdesign-miniprogram/pull/1387))
+- `SwiperNav`: 新增属性用于单独控制 @LeeJim ([#1387](https://github.com/Tencent/tdesign-miniprogram/pull/1387))
+- `Indexes`: 增加 change 事件 @LeeJim ([#1403](https://github.com/Tencent/tdesign-miniprogram/pull/1403))
+- `Indexes`: 修复视觉问题 @LeeJim ([#1403](https://github.com/Tencent/tdesign-miniprogram/pull/1403))
+- `Swiper`: 新增 image-props 属性 @LeeJim ([#1411](https://github.com/Tencent/tdesign-miniprogram/pull/1411))
+- `Button`: 新增部分 CSS Variables @anlyyao ([#1407](https://github.com/Tencent/tdesign-miniprogram/pull/1407))
+- `Swiper`: 增加 click 事件 @LeeJim ([#1420](https://github.com/Tencent/tdesign-miniprogram/pull/1420))
+- `PullDownRefresh`: 新增 scroll 事件 @LeeJim ([#1424](https://github.com/Tencent/tdesign-miniprogram/pull/1424))
+- `BackTop`: 放置 pull-down-refresh 内部时,将会滚动该容器到顶部 @LeeJim ([#1424](https://github.com/Tencent/tdesign-miniprogram/pull/1424))
+- `Swiper`: 增加 click 事件 @LeeJim ([#1435](https://github.com/Tencent/tdesign-miniprogram/pull/1435))
+- `Collapse`: 新增 placment 属性,支持内容面板在上方 @LeeJim ([#1446](https://github.com/Tencent/tdesign-miniprogram/pull/1446))
+- `Calendar`: 新增 auto-close 属性,以及 close 事件 @LeeJim ([#1448](https://github.com/Tencent/tdesign-miniprogram/pull/1448))
+- `Textarea`: 补充 cursor、disableDefaultPadding、showConfirmBar、 selection-Start、 selectionEnd、holdKeyboard 等属性 @anlyyao ([#1463](https://github.com/Tencent/tdesign-miniprogram/pull/1463))
+- `Textarea`: 补充 keyboardheightchange 事件 @anlyyao ([#1463](https://github.com/Tencent/tdesign-miniprogram/pull/1463))
+
+### 🐞 Bug Fixes
+- `ActionSheet`: 修复视觉问题 @LeeJim ([#1382](https://github.com/Tencent/tdesign-miniprogram/pull/1382))
+- `SideBar`: 支持选项标题换行 @LeeJim ([#1392](https://github.com/Tencent/tdesign-miniprogram/pull/1392))
+- `TreeSelect`: 修复视觉问题 @LeeJim ([#1401](https://github.com/Tencent/tdesign-miniprogram/pull/1401))
+- `Avatar`: 修复 cascading = ‘left-up' 时,位置不正确问题 @anlyyao ([#1413](https://github.com/Tencent/tdesign-miniprogram/pull/1413))
+- `Radio`: 修复 a11y 的点击事件 @LeeJim ([#1416](https://github.com/Tencent/tdesign-miniprogram/pull/1416))
+- `Checkbox`: 修复 a11y 的点击事件 @LeeJim ([#1416](https://github.com/Tencent/tdesign-miniprogram/pull/1416))
+- `Dialog`: 修复 Dialog 的按钮不能使用 ghost 和 shape 属性的问题 @anlyyao ([#1407](https://github.com/Tencent/tdesign-miniprogram/pull/1407))
+- `ActionSheet`: 移除 focus 样式 @byq1213 ([#1427](https://github.com/Tencent/tdesign-miniprogram/pull/1427))
+- `Badge`: 修复样式问题 @LeeJim ([#1429](https://github.com/Tencent/tdesign-miniprogram/pull/1429))
+- `Toast`: 禁止 toast 区域滑动 @LeeJim ([#1430](https://github.com/Tencent/tdesign-miniprogram/pull/1430))
+- `Icon`: 移除无效的 behaviors @LeeJim ([#1434](https://github.com/Tencent/tdesign-miniprogram/pull/1434))
+- `Slider`: 优化刻度样式,以及默认风格时滑动的距离 @LeeJim ([#1440](https://github.com/Tencent/tdesign-miniprogram/pull/1440))
+- `Collapse`: 修复在 Android 下部分机型收起延迟的问题 @LeeJim ([#1445](https://github.com/Tencent/tdesign-miniprogram/pull/1445))
+- `SwipeCell`: 修复滑动距离计算错误 @anlyyao ([#1449](https://github.com/Tencent/tdesign-miniprogram/pull/1449))
+- `Textarea`: 修复 model:value 无效的问题 @anlyyao ([#1463](https://github.com/Tencent/tdesign-miniprogram/pull/1463))
+
+## 🌈 0.33.0 `2023-01-02`
+### ❗ Breaking Changes
+- `Swiper`: 增加 `18rpx` 的圆角,并支持 CSS Variables,移除了图片的 shape @LeeJim ([#1327](https://github.com/Tencent/tdesign-miniprogram/pull/1327))
+- `Rate`: 修复 gap 取值错误,移除 disabled 的样式 @LeeJim ([#1350](https://github.com/Tencent/tdesign-miniprogram/pull/1350))
+- `Avatar`: 移除 iconProps 属性,属性 icon 支持传入对象 @anlyyao ([#1295](https://github.com/Tencent/tdesign-miniprogram/pull/1295))
+- `Button`: 移除 iconProps 属性,属性 icon 支持传入对象 @anlyyao ([#1295](https://github.com/Tencent/tdesign-miniprogram/pull/1295))
+- `Empty`: 移除 iconProps 属性,属性 icon 支持传入对象 @anlyyao ([#1295](https://github.com/Tencent/tdesign-miniprogram/pull/1295))
+- `GridItem`: 移除 iconProps 属性,属性 icon 支持传入对象 @anlyyao ([#1295](https://github.com/Tencent/tdesign-miniprogram/pull/1295))
+- `ImageViewer`: 移除 deleteIconProps、closeIconProps 属性,属性 delete-btn、close-btn 支持传入对象 @anlyyao ([#1295](https://github.com/Tencent/tdesign-miniprogram/pull/1295))
+- `Result`: 移除 iconProps 属性,属性 icon 支持传入对象 @anlyyao ([#1295](https://github.com/Tencent/tdesign-miniprogram/pull/1295))
+- docs: 文档 button 属性使用错误 @AuYuHui ([#1347](https://github.com/Tencent/tdesign-miniprogram/pull/1347))
+- `NavBar`: 胶囊相关 CSS Variables 命名变更 @LeeJim ([#1372](https://github.com/Tencent/tdesign-miniprogram/pull/1372))
+
+### 🚀 Features
+- `Cascader`: 自动定位到已选的 radio 项 @LeeJim ([#1326](https://github.com/Tencent/tdesign-miniprogram/pull/1326))
+- `tag`: 属性 icon 支持对象,透传至 icon 组件 @LeeJim ([#1358](https://github.com/Tencent/tdesign-miniprogram/pull/1358))
+- `CheckTag`: 属性 content 支持数组类型,用于显示已选/未选文案 @LeeJim ([#1358](https://github.com/Tencent/tdesign-miniprogram/pull/1358))
+- `Cell`: 支持无障碍访问 @lsdyi ([#1212](https://github.com/Tencent/tdesign-miniprogram/pull/1212))
+- `DropdownMenu`: 支持无障碍访问 @Lindddt ([#1285](https://github.com/Tencent/tdesign-miniprogram/pull/1285))
+- `Indexes`: 支持无障碍访问 @Leon-z ([#1237](https://github.com/Tencent/tdesign-miniprogram/pull/1237))
+- `Cell`: 支持无障碍访问 @lsdyi ([#1212](https://github.com/Tencent/tdesign-miniprogram/pull/1212))
+- `Indexes`: 支持无障碍访问 @Leon-z ([#1237](https://github.com/Tencent/tdesign-miniprogram/pull/1237))
+- `Badge`: 支持无障碍访问 @yaogengzhu ([#1196](https://github.com/Tencent/tdesign-miniprogram/pull/1196))
+- `Progress`: 支持无障碍访问 @yaogengzhu ([#1283](https://github.com/Tencent/tdesign-miniprogram/pull/1283))
+- `TreeSelect): 支持无障碍访问 @Leon-z ([#1355](https://github.com/Tencent/tdesign-miniprogram/pull/1355))
+- `ActionSheet`: 支持无障碍访问 @byq1213 ([#1235](https://github.com/Tencent/tdesign-miniprogram/pull/1235))
+- `Switch`: 支持无障碍访问 @byq1213 ([#1279](https://github.com/Tencent/tdesign-miniprogram/pull/1279))
+- `Slider`: 支持无障碍访问 @byq1213 ([#1360](https://github.com/Tencent/tdesign-miniprogram/pull/1360))
+
+### 🐞 Bug Fixes
+- `Empty`: 移除无用示例,更新占位图片 @anlyyao ([#1314](https://github.com/Tencent/tdesign-miniprogram/pull/1314))
+- `NoticeBar`: 修复示例样式问题 @anlyyao ([#1314](https://github.com/Tencent/tdesign-miniprogram/pull/1314))
+- `Cascader`: 修复视觉问题 @LeeJim ([#1326](https://github.com/Tencent/tdesign-miniprogram/pull/1326))
+- `Result`: 修复视觉问题 @anlyyao ([#1325](https://github.com/Tencent/tdesign-miniprogram/pull/1325))
+- `PullDownRefresh`: 修复示例视觉错误,并移除无关示例 @anlyyao ([#1333](https://github.com/Tencent/tdesign-miniprogram/pull/1333))
+- `Progress`: 修复视觉问题 @anlyyao ([#1328](https://github.com/Tencent/tdesign-miniprogram/pull/1328))
+- `Tabs`: 修复视觉问题 @LeeJim ([#1339](https://github.com/Tencent/tdesign-miniprogram/pull/1339))
+- `Tabs`: 修复激活项定位的问题 @LeeJim ([#1339](https://github.com/Tencent/tdesign-miniprogram/pull/1339))
+- `Steps`: 修复垂直样式不对齐的问题 @LeeJim ([#1351](https://github.com/Tencent/tdesign-miniprogram/pull/1351))
+- `Stepper`: 修复组件视觉错误 @anlyyao ([#1356](https://github.com/Tencent/tdesign-miniprogram/pull/1356))
+- `CheckTag`: 修复非受控用法 @LeeJim ([#1358](https://github.com/Tencent/tdesign-miniprogram/pull/1358))
+- `CheckTag`: 修复 content 不可用的问题 @LeeJim ([#1358](https://github.com/Tencent/tdesign-miniprogram/pull/1358))
+- `Drawer`: 修复样式问题 @LeeJim ([#1359](https://github.com/Tencent/tdesign-miniprogram/pull/1359))
+- `Upload`: 修复样式问题 @LeeJim ([#1365](https://github.com/Tencent/tdesign-miniprogram/pull/1365))
+- `DropdownMenu`: 修复重置逻辑,调整字体大小 @LeeJim ([#1363](https://github.com/Tencent/tdesign-miniprogram/pull/1363))
+- `TabBar`: 修复视觉问题 @LeeJim ([#1369](https://github.com/Tencent/tdesign-miniprogram/pull/1369))
+- `Checkbox`: 修复水平布局时垂直居中的问题 @LeeJim ([#1371](https://github.com/Tencent/tdesign-miniprogram/pull/1371))
+- `NavBar`: 修复视觉问题 @LeeJim ([#1372](https://github.com/Tencent/tdesign-miniprogram/pull/1372))
+- `Navbar`: 修复 custom-style 属性的响应式问题 @LeeJim ([#1374](https://github.com/Tencent/tdesign-miniprogram/pull/1374))
+
+## 🌈 0.32.0 `2022-12-27`
+### ❗ Breaking Changes
+- 全局修正插槽名称,保持和文档一致,使用 kebab-case @LeeJim ([#1277](https://github.com/Tencent/tdesign-miniprogram/pull/1277))
+- `ButtonGroup`: 移除该组件 @LeeJim ([#1289](https://github.com/Tencent/tdesign-miniprogram/pull/1289))
+- `DropdownMenu`: 调整外部样式类命名、DOM @LeeJim ([#1259](https://github.com/Tencent/tdesign-miniprogram/pull/1259))
+- `DropdownMenu`: 废弃 optionsLayout 属性,移除 tree 相关逻辑,独立出 treeSelect 组件 @LeeJim ([#1265](https://github.com/Tencent/tdesign-miniprogram/pull/1265))
+- `DropdownMenu`: 变更外部样式类命名 @LeeJim ([#1265](https://github.com/Tencent/tdesign-miniprogram/pull/1265))
+- `Indexes`: 不再依赖 Cell ,独立出锚点组件,可自定义内容 @LeeJim ([#1267](https://github.com/Tencent/tdesign-miniprogram/pull/1267))
+- `Indexes`: 移除 height 属性 @LeeJim ([#1271](https://github.com/Tencent/tdesign-miniprogram/pull/1271))
+- `Indexes`: 移除 scroll-view,使用全局滚动 @LeeJim ([#1271](https://github.com/Tencent/tdesign-miniprogram/pull/1271))
+- `CheckTag`: 移除 closable、shape 属性,以及 close 事件 @LeeJim ([#1274](https://github.com/Tencent/tdesign-miniprogram/pull/1274))
+- `Swiper`: 基于原生 swiper 组件改造,移除 t-swiper-item 组件,新增 list 属性。 @LeeJim ([#1282](https://github.com/Tencent/tdesign-miniprogram/pull/1282))
+- `SwiperNav`: 属性 show-nav-btn 更名为 show-controls @LeeJim ([#1282](https://github.com/Tencent/tdesign-miniprogram/pull/1282))
+- `Input`: 移除聚焦相关样式 @anlyyao ([#1247](https://github.com/Tencent/tdesign-miniprogram/pull/1247))
+
+### 🚀 Features
+- `Link`: 新增链接组件 @anlyyao ([#1236](https://github.com/Tencent/tdesign-miniprogram/pull/1236))
+- `TreeSelect`: 新增树形选择组件 @LeeJim ([#1262](https://github.com/Tencent/tdesign-miniprogram/pull/1262))
+- `IndexesAnchor`: 新增索引锚点组件 @LeeJim ([#1267](https://github.com/Tencent/tdesign-miniprogram/pull/1267))
+- `DropdownMenu`: 视觉升级 @LeeJim ([#1259](https://github.com/Tencent/tdesign-miniprogram/pull/1259))
+- `Indexes`: 视觉升级 @LeeJim ([#1267](https://github.com/Tencent/tdesign-miniprogram/pull/1267))
+- `Calendar`: 支持 CSS Variables,可自定义主题 @LeeJim ([#1252](https://github.com/Tencent/tdesign-miniprogram/pull/1252))
+- `Collapse`: 支持 CSS Variables,可自定义主题 @LeeJim ([#1273](https://github.com/Tencent/tdesign-miniprogram/pull/1273))
+- `Swiper`: 支持 CSS Variables,可自定义主题 @LeeJim ([#1282](https://github.com/Tencent/tdesign-miniprogram/pull/1282))
+- `Overlay`: 支持 CSS Variables,可自定义主题 @LeeJim ([#1258](https://github.com/Tencent/tdesign-miniprogram/pull/1258))
+- `DropdownMenu`: 支持 CSS Variables,可自定义主题 @LeeJim ([#1259](https://github.com/Tencent/tdesign-miniprogram/pull/1259))
+- `Calendar`: 新增 usePopup 属性,支持不使用弹出层用法 @LeeJim ([#1252](https://github.com/Tencent/tdesign-miniprogram/pull/1252))
+- `DropdownMenu`: 可通过 value 和 options 自动切换 label @LeeJim ([#1265](https://github.com/Tencent/tdesign-miniprogram/pull/1265))
+- `CheckTag`: 新增 click 事件 @LeeJim ([#1274](https://github.com/Tencent/tdesign-miniprogram/pull/1274))
+- `Input`: 新增 click 事件 @anlyyao ([#1247](https://github.com/Tencent/tdesign-miniprogram/pull/1247))
+- `Popup`: 支持无障碍访问 @zhangpaopao0609 ([#1189](https://github.com/Tencent/tdesign-miniprogram/pull/1189))
+- `Input`: 支持无障碍访问 @szu-bee ([#1246](https://github.com/Tencent/tdesign-miniprogram/pull/1246))
+- `Empty`: 支持无障碍访问 @huaiyinfeilong ([#1187](https://github.com/Tencent/tdesign-miniprogram/pull/1187))
+- `Tag`: 支持无障碍访问 @huaiyinfeilong ([#1220](https://github.com/Tencent/tdesign-miniprogram/pull/1220))
+- `Link`: 支持无障碍访问 @byq1213 ([#1263](https://github.com/Tencent/tdesign-miniprogram/pull/1263))
+
+### 🐞 Bug Fixes
+- `Popup`: 修复 placement 不支持响应式的问题 @LeeJim ([#1257](https://github.com/Tencent/tdesign-miniprogram/pull/1257))
+- `Checkbox`: 修复图标右侧显示时 border 样式错误的问题 @LeeJim ([#1259](https://github.com/Tencent/tdesign-miniprogram/pull/1259))
+- `Radio`: 修复图标右侧显示时 border 样式错误的问题 @LeeJim ([#1259](https://github.com/Tencent/tdesign-miniprogram/pull/1259))
+- `Search`: 修复 CSS Variables 命名错误的问题 @LeeJim ([#1272](https://github.com/Tencent/tdesign-miniprogram/pull/1272))
+- `Radio`: 修复 icon = line 时,图标错误的问题 @LeeJim ([#1284](https://github.com/Tencent/tdesign-miniprogram/pull/1284))
+- `Checkbox`: 修复 icon = line 时,图标错误的问题 @LeeJim ([#1284](https://github.com/Tencent/tdesign-miniprogram/pull/1284))
+- `Textarea`: 支持 value 变更时更新字符长度 @anlyyao ([#1280](https://github.com/Tencent/tdesign-miniprogram/pull/1280))
+- `Textarea`: 修复 less 变量使用错误 @anlyyao ([#1280](https://github.com/Tencent/tdesign-miniprogram/pull/1280))
+- `NoticeBar`: 修复右侧额外信息行高不正确问题 @anlyyao ([#1281](https://github.com/Tencent/tdesign-miniprogram/pull/1281))
+- `Message`: 修复间距、颜色样式错误问题 @anlyyao ([#1286](https://github.com/Tencent/tdesign-miniprogram/pull/1286))
+
+## 🌈 0.31.0 `2022-12-19`
+### ❗ BREAKING CHANGES
+- `Input`: 移除 clearableIconProps、prefixIconProps、suffixIconProps 属性 @anlyyao ([#1188](https://github.com/Tencent/tdesign-miniprogram/pull/1188))
+- `SwipeCell`: 调整 DOM @anlyyao ([#1201](https://github.com/Tencent/tdesign-miniprogram/pull/1201))
+- `Dialog`: 属性 closeOnOverlayClick 默认值从 true 改成 undefined @LeeJim ([#1240](https://github.com/Tencent/tdesign-miniprogram/pull/1240))
+- `Dialog`: 调整 DOM @LeeJim ([#1240](https://github.com/Tencent/tdesign-miniprogram/pull/1240))
+
+### 🚀 Features
+- `Steps`: 视觉升级 @LeeJim ([#1225](https://github.com/Tencent/tdesign-miniprogram/pull/1225))
+- `Picker`: 视觉升级 @LeeJim ([#1248](https://github.com/Tencent/tdesign-miniprogram/pull/1248))
+- `Dialog`: 视觉升级 @LeeJim ([#1240](https://github.com/Tencent/tdesign-miniprogram/pull/1240))
+- `Dialog`: 新增 closeBtn 属性,支持关闭按钮 @LeeJim ([#1240](https://github.com/Tencent/tdesign-miniprogram/pull/1240))
+- `Dialog`: 支持 CSS Variables,支持主题定制 @LeeJim ([#1240](https://github.com/Tencent/tdesign-miniprogram/pull/1240))
+- `Picker`: 支持 CSS Variables,支持主题定制 @LeeJim ([#1248](https://github.com/Tencent/tdesign-miniprogram/pull/1248))
+- `DateTimePicker`: 支持 CSS Variables,支持主题定制 @LeeJim ([#1248](https://github.com/Tencent/tdesign-miniprogram/pull/1248))
+- `Input`: clearable、prefixIcon、suffixIcon等属性新增 Object 类型,透传至 icon 组件 @anlyyao ([#1188](https://github.com/Tencent/tdesign-miniprogram/pull/1188))
+- `SwipeCell`: 属性 right 和 left 支持使用 icon @anlyyao ([#1201](https://github.com/Tencent/tdesign-miniprogram/pull/1201))
+- `Overlay`: 支持无障碍访问 @szu-bee ([#1205](https://github.com/Tencent/tdesign-miniprogram/pull/1205))
+- `BackTop`: 支持无障碍访问 @szu-bee ([#1206](https://github.com/Tencent/tdesign-miniprogram/pull/1206))
+- `CountDown`: 支持无障碍访问 @szu-bee ([#1207](https://github.com/Tencent/tdesign-miniprogram/pull/1207))
+- `Button`: 支持无障碍访问 @zhangpaopao0609 ([#1149](https://github.com/Tencent/tdesign-miniprogram/pull/1149))
+- `Collapse`: 支持无障碍访问 @gzzhanghao ([#1224](https://github.com/Tencent/tdesign-miniprogram/pull/1224))
+- `Calendar`: 支持无障碍访问 @gzzhanghao ([#1217](https://github.com/Tencent/tdesign-miniprogram/pull/1217))
+- `Fab`: 支持无障碍访问 @zhangpaopao0609 ([#1231](https://github.com/Tencent/tdesign-miniprogram/pull/1231))
+- `Tabs`: 支持无障碍访问 @zhangpaopao0609 ([#1227](https://github.com/Tencent/tdesign-miniprogram/pull/1227))
+- `Overlay`: 支持无障碍访问 @szu-bee ([#1205](https://github.com/Tencent/tdesign-miniprogram/pull/1205))
+- `Toast`: 支持无障碍访问 @huaiyinfeilong ([#1210](https://github.com/Tencent/tdesign-miniprogram/pull/1210))
+
+### 🐞 Bug Fixes
+- `TabBar`: 修复圆角下开启安全距离时视觉错误的问题 @LeeJim ([#1223](https://github.com/Tencent/tdesign-miniprogram/pull/1223))
+
+
+## 🌈 0.30.0 `2022-12-12`
+### ❗ BREAKING CHANGE
+- `Rate`: 属性 gap 默认值由 8 调整成 4 @LeeJim ([#1177](https://github.com/Tencent/tdesign-miniprogram/pull/1177))
+- `Rate`: 属性 size 默认值由 20 调整成 24 @LeeJim ([#1177](https://github.com/Tencent/tdesign-miniprogram/pull/1177))
+- `Stepper`: 属性 theme 的 gray 名为 filled,并新增 outline 主题 @anlyyao ([#1191](https://github.com/Tencent/tdesign-miniprogram/pull/1191))
+- `Slider`: 属性 colors 和 disabledColor 移除默认值 @LeeJim ([#1192](https://github.com/Tencent/tdesign-miniprogram/pull/1192))
+- `Calendar`: 按钮的插槽变更成和文档一致:`confirm-btn` @LeeJim ([#1204](https://github.com/Tencent/tdesign-miniprogram/pull/1204))
+
+### 🚀 Features
+- `Rate`: 视觉升级 @LeeJim ([#1177](https://github.com/Tencent/tdesign-miniprogram/pull/1177))
+- `Slider`: 视觉升级 @LeeJim ([#1192](https://github.com/Tencent/tdesign-miniprogram/pull/1192))
+- `Rate`: 新增 color 属性,并支持 CSS Variables @LeeJim ([#1177](https://github.com/Tencent/tdesign-miniprogram/pull/1177))
+- `Rate`: 新增 icon 属性,可自定义图标 @LeeJim ([#1177](https://github.com/Tencent/tdesign-miniprogram/pull/1177))
+- `NoticeBar`: 新增 direction 属性,新支持垂直方向滚动 @anlyyao ([#1036](https://github.com/Tencent/tdesign-miniprogram/pull/1036))
+- `Slider`: 新增 theme 属性,新增胶囊风格 @LeeJim ([#1192](https://github.com/Tencent/tdesign-miniprogram/pull/1192))
+- `Message`: 属性 icon 和 closeBtn 新增 Object 类型透传至 icon 组件 @anlyyao ([#1153](https://github.com/Tencent/tdesign-miniprogram/pull/1153))
+- `BackTop`: 属性 icon 新增支持 Object 类型透传至图标组件,并支持同名插槽 @anlyyao ([#1151](https://github.com/Tencent/tdesign-miniprogram/pull/1151))
+- `NoticeBar`: 属性 content 新增 Array 类型 @anlyyao ([#1036](https://github.com/Tencent/tdesign-miniprogram/pull/1036))
+- `NoticeBar`: 属性 suffixIcon 新增 Object 类型透传至图标组件 @anlyyao ([#1036](https://github.com/Tencent/tdesign-miniprogram/pull/1036))
+- `NoticeBar`: 属性 prefixIcon 新增 Boolean、Object 类型 @anlyyao ([#1036](https://github.com/Tencent/tdesign-miniprogram/pull/1036))
+- `Stepper`: input-width 属性默认单位更新为 px @anlyyao ([#1191](https://github.com/Tencent/tdesign-miniprogram/pull/1191))
+- `Progress`: 属性 theme 支持 plump 和 circle 类型 @anlyyao ([#1178](https://github.com/Tencent/tdesign-miniprogram/pull/1178))
+- `Message`: 新增 CSS Variables, 用于调整信息通知文本、背景颜色 @anlyyao ([#1153](https://github.com/Tencent/tdesign-miniprogram/pull/1153))
+- `BackTop`: 新增 CSS Variables @anlyyao ([#1151](https://github.com/Tencent/tdesign-miniprogram/pull/1151))
+- `Slider`: 支持 CSS Variables @LeeJim ([#1192](https://github.com/Tencent/tdesign-miniprogram/pull/1192))
+- `NoticeBar`: 新增 CSS Variables, 用于调整公告栏文本、背景颜色 @anlyyao ([#1036](https://github.com/Tencent/tdesign-miniprogram/pull/1036))
+- `Stepper`: 新增 CSS Variables, 用于调整步进器文本/图标颜色等 @anlyyao ([#1191](https://github.com/Tencent/tdesign-miniprogram/pull/1191))
+- `Progress`: 新增 CSS Variables, 用于调整进度条背景颜色 @anlyyao ([#1178](https://github.com/Tencent/tdesign-miniprogram/pull/1178))
+- `Grid`: 支持无障碍访问 @zhangpaopao0609 ([#1138](https://github.com/Tencent/tdesign-miniprogram/pull/1138))
+- `NavBar`: 支持无障碍访问 @Lindddt ([#1140](https://github.com/Tencent/tdesign-miniprogram/pull/1140))
+- `TabBar`: 支持无障碍访问 @Isabella327 ([#1148](https://github.com/Tencent/tdesign-miniprogram/pull/1148))
+
+
+### 🐞 Bug Fixes
+
+- `Message`: 修复入场动画错误 @anlyyao ([#1153](https://github.com/Tencent/tdesign-miniprogram/pull/1153))
+- `Calendar`: 修复 `max-date`, `min-date`, `firstDayOfWeek` 无法动态修改的问题 @LeeJim ([#1172](https://github.com/Tencent/tdesign-miniprogram/pull/1172))
+- `Switch`: 修复视觉问题 @LeeJim ([#1186](https://github.com/Tencent/tdesign-miniprogram/pull/1186))
+- `Calendar`: 修复小屏幕适配的问题 @LeeJim ([#1203](https://github.com/Tencent/tdesign-miniprogram/pull/1203))
+- `Calendar`: 修复按钮传入 text 不生效,以及不支持响应式的问题 @LeeJim ([#1204](https://github.com/Tencent/tdesign-miniprogram/pull/1204))
+
+
+## 🌈 0.29.0 `2022-12-05`
+### ❗ BREAKING CHANGES
+- `Loading`: `theme = spinner` 默认颜色改成黑色 @LeeJim ([#1152](https://github.com/Tencent/tdesign-miniprogram/pull/1152))
+- `Loading`: 简化 DOM @LeeJim ([#1152](https://github.com/Tencent/tdesign-miniprogram/pull/1152))
+
+### 🚀 Features
+- `ActionSheet`: 视觉升级 @LeeJim ([#1142](https://github.com/Tencent/tdesign-miniprogram/pull/1142))
+- `Drawer`: 视觉升级 @LeeJim ([#1147](https://github.com/Tencent/tdesign-miniprogram/pull/1147))
+- `Search`: 支持无障碍访问 @Isabella327 ([#1132](https://github.com/Tencent/tdesign-miniprogram/pull/1132))
+- `Message`: 支持无障碍访问 @zhangpaopao0609 ([#1150](https://github.com/Tencent/tdesign-miniprogram/pull/1150))
+- `Stepper`: 支持无障碍访问 @zhangpaopao0609 ([#1144](https://github.com/Tencent/tdesign-miniprogram/pull/1144))
+- `Progress`: 支持无障碍访问 @yaogengzhu ([#1156](https://github.com/Tencent/tdesign-miniprogram/pull/1156))
+- `Image`: 支持无障碍访问 @zhangpaopao0609 ([#1136](https://github.com/Tencent/tdesign-miniprogram/pull/1136))
+- `Radio`: 支持无障碍访问 @byq1213 ([#1139](https://github.com/Tencent/tdesign-miniprogram/pull/1139))
+- `Avatar`: 支持无障碍访问 @byq1213 ([#1137](https://github.com/Tencent/tdesign-miniprogram/pull/1137))
+- `ActionSheet`: 新增 description 和 align 属性 @LeeJim ([#1142](https://github.com/Tencent/tdesign-miniprogram/pull/1142))
+- `Loading`: 支持默认插槽、CSS Variables @LeeJim ([#1152](https://github.com/Tencent/tdesign-miniprogram/pull/1152))
+- `Drawer`: 新增支持 titile 属性,footer 插槽 @LeeJim ([#1147](https://github.com/Tencent/tdesign-miniprogram/pull/1147))
+- `ActionSheet`: 新增支持 CSS Variables @LeeJim ([#1142](https://github.com/Tencent/tdesign-miniprogram/pull/1142))
+
+### 🐞 Bug Fixes
+- `Checkbox`: 修复数组图标无法使用的问题 @LeeJim ([#1135](https://github.com/Tencent/tdesign-miniprogram/pull/1135))
+- `Cascader`: 修复重置 `options = []` 时报错的问题 @LeeJim ([#1163](https://github.com/Tencent/tdesign-miniprogram/pull/1163))
+
+## 🌈 0.28.0 `2022-11-28`
+### ❗ BREAKING CHANGES
+- `Radio`: 调整 icon 属性,新增 dot 类型,并简化原有命名 @LeeJim ([#1098](https://github.com/Tencent/tdesign-miniprogram/pull/1098))
+- `Checkbox`: 移除 color 属性,使用 CSS Variables 代替 @LeeJim ([#1100](https://github.com/Tencent/tdesign-miniprogram/pull/1100))
+- `Search`: 移除 label 属性 @LeeJim ([#1103](https://github.com/Tencent/tdesign-miniprogram/pull/1103))
+- `Textarea`: 类名变更,默认不展示计数器,需设置 indicator = true @anlyyao ([#1097](https://github.com/Tencent/tdesign-miniprogram/pull/1097))
+- `CountDown`: size 属性默认值变更为 `medium` @anlyyao ([#1085](https://github.com/Tencent/tdesign-miniprogram/pull/1085))
+- `Calendar`: 事件返回参数改成时间戳,保持和 value 一致 @LeeJim ([#1120](https://github.com/Tencent/tdesign-miniprogram/pull/1120))
+- `Input`: 外部样式类 t-class-icon 变更为 t-class-prefix-icon @anlyyao ([#1109](https://github.com/Tencent/tdesign-miniprogram/pull/1109))
+- `Input`: size 属性默认值变更为 medium @anlyyao ([#1109](https://github.com/Tencent/tdesign-miniprogram/pull/1109))
+
+### 🚀 Features
+- `Radio`: 视觉更新 @LeeJim ([#1098](https://github.com/Tencent/tdesign-miniprogram/pull/1098))
+- `Checkbox`: 视觉升级 @LeeJim ([#1100](https://github.com/Tencent/tdesign-miniprogram/pull/1100))
+- `Search`: 视觉升级 @LeeJim ([#1103](https://github.com/Tencent/tdesign-miniprogram/pull/1103))
+- `Radio`: 新增 block 属性,支持横向布局 @LeeJim ([#1098](https://github.com/Tencent/tdesign-miniprogram/pull/1098))
+- `Radio`: 支持 icon 同名插槽 @LeeJim ([#1098](https://github.com/Tencent/tdesign-miniprogram/pull/1098))
+- `Checkbox`: 新增 block 属性,支持横向布局 @LeeJim ([#1100](https://github.com/Tencent/tdesign-miniprogram/pull/1100))
+- `Checkbox`: 属性 icon 新增 string 类型,可选值为 circle/line/rectangle @LeeJim ([#1100](https://github.com/Tencent/tdesign-miniprogram/pull/1100))
+- `Search`: 支持更多 CSS Variables @LeeJim ([#1103](https://github.com/Tencent/tdesign-miniprogram/pull/1103))
+- `Textarea`: 新增 placeholderStyle、fixed 、bordered、 indicator 等属性 @anlyyao ([#1097](https://github.com/Tencent/tdesign-miniprogram/pull/1097))
+- `Textarea`: 新增 CSS Variables, 用于调整文本框背景、输入文本颜色 @anlyyao ([#1097](https://github.com/Tencent/tdesign-miniprogram/pull/1097))
+- `Textarea`: 外部样式类新增 t-class-indicator @anlyyao ([#1097](https://github.com/Tencent/tdesign-miniprogram/pull/1097))
+- `CountDown`: 外部样式类新增 `t-class-count` 和 `t-class-split` @anlyyao ([#1085](https://github.com/Tencent/tdesign-miniprogram/pull/1085))
+- `CountDown`: 新增 CSS Variables, 用于调整倒计时背景、文本颜色 @anlyyao ([#1085](https://github.com/Tencent/tdesign-miniprogram/pull/1085))
+- `Input`: 新增支持 type = nickname @LeeJim ([#1115](https://github.com/Tencent/tdesign-miniprogram/pull/1115))
+- `Calendar`: 自动滚动到 value 对应的月份 @LeeJim ([#1119](https://github.com/Tencent/tdesign-miniprogram/pull/1119))
+- `Calendar`: 新增 change 事件,在不显示确认按钮时使用 @LeeJim ([#1120](https://github.com/Tencent/tdesign-miniprogram/pull/1120))
+- `Checkbox`: 无障碍支持 @Isabella327 ([#1105](https://github.com/Tencent/tdesign-miniprogram/pull/1105))
+- `Grid`: 新增 iconProps 属性 @anlyyao ([#1123](https://github.com/Tencent/tdesign-miniprogram/pull/1123))
+- `Icon`: 新增支持 `aira-*` 属性 @LeeJim ([#1127](https://github.com/Tencent/tdesign-miniprogram/pull/1127))
+- `Input`: 完成 status 和 tips 属性开发 @anlyyao ([#1109](https://github.com/Tencent/tdesign-miniprogram/pull/1109))
+- `Input`: 新增 layout、clearableIconProps、suffixIconProps、 prefixIconProps属性 @anlyyao ([#1109](https://github.com/Tencent/tdesign-miniprogram/pull/1109))
+- `Input`: 新增 CSS Variables @anlyyao ([#1109](https://github.com/Tencent/tdesign-miniprogram/pull/1109))
+- `Input`: 外部样式新增 t-class-tips @anlyyao ([#1109](https://github.com/Tencent/tdesign-miniprogram/pull/1109))
+### 🐞 Bug Fixes
+- `Tabs`: 修复渲染 panel 时闪烁的问题 @LeeJim ([#1093](https://github.com/Tencent/tdesign-miniprogram/pull/1093))
+- `Result`: 修复装饰性图标获取焦点的问题 @aomnisz ([#1082](https://github.com/Tencent/tdesign-miniprogram/pull/1082))
+- `Tabs`: 修复 placement=left 时,面板内容不显示问题 @anlyyao ([#1099](https://github.com/Tencent/tdesign-miniprogram/pull/1099))
+- `Toast`: 支持文字换行 @LeeJim ([#1107](https://github.com/Tencent/tdesign-miniprogram/pull/1107))
+- `Tabs`: 修复 panel 切换的问题 @LeeJim ([#1106](https://github.com/Tencent/tdesign-miniprogram/pull/1106))
+- `Textarea`: maxlength 默认值变更为 -1 @anlyyao ([#1097](https://github.com/Tencent/tdesign-miniprogram/pull/1097))
+- `Tabs`: 修复下标不显示的问题 @LeeJim ([#1111](https://github.com/Tencent/tdesign-miniprogram/pull/1111))
+- `Footer`: 支持无障碍 @Isabella327 ([#1104](https://github.com/Tencent/tdesign-miniprogram/pull/1104))
+- `NavBar`: 修复背景色失效的问题 @LeeJim ([#1116](https://github.com/Tencent/tdesign-miniprogram/pull/1116))
+- `Calendar`: 修复受控用法 @LeeJim ([#1119](https://github.com/Tencent/tdesign-miniprogram/pull/1119))
+- `Calendar`: 修复 confirm-btn = null 时仍显示按钮的问题 @LeeJim ([#1120](https://github.com/Tencent/tdesign-miniprogram/pull/1120))
+- `Cell`: 新增支持 CSS Variables @LeeJim ([#1117](https://github.com/Tencent/tdesign-miniprogram/pull/1117))
+- `Popup`: 修复 Popup 以及底层依赖 Popup 的组件无法滚动的问题 @LeeJim ([#1125](https://github.com/Tencent/tdesign-miniprogram/pull/1125))
+- `Loading`: 修复尺寸问题 @LeeJim ([#1128](https://github.com/Tencent/tdesign-miniprogram/pull/1128))
+- `Result`: 修复装饰性图标获取焦点的问题 @aomnisz ([#1082](https://github.com/Tencent/tdesign-miniprogram/pull/1082))
+- `Footer`: 支持无障碍 @Isabella327 ([#1104](https://github.com/Tencent/tdesign-miniprogram/pull/1104))
+
+## 🌈 0.27.0 `2022-11-21`
+### ❗️BREAKING CHANGES
+- `Divider`: 移除 line-color 属性,使用 CSS Variables 代替 @LeeJim ([#1035](https://github.com/Tencent/tdesign-miniprogram/pull/1035))
+- `Upload`: 数据对象 file 新增 status 字段,不再以 percent 区分 @LeeJim ([#1034](https://github.com/Tencent/tdesign-miniprogram/pull/1034))
+- `Switch`: 移除 colors 属性,使用 CSS Variables 代替 @LeeJim ([#1080](https://github.com/Tencent/tdesign-miniprogram/pull/1080))
+- `Switch`: 调整 label 的类型,改成 Array 类型,同时调整显示位置 @LeeJim ([#1080](https://github.com/Tencent/tdesign-miniprogram/pull/1080))
+- `Badge`: 移除 shape 属性的 square 类型,新增 bubble 类型 @LeeJim ([#1004](https://github.com/Tencent/tdesign-miniprogram/pull/1004))
+
+### 🚀 Features
+- `Divider`: 视觉升级 @LeeJim ([#1035](https://github.com/Tencent/tdesign-miniprogram/pull/1035))
+- `Upload`: 视觉升级 @LeeJim ([#1034](https://github.com/Tencent/tdesign-miniprogram/pull/1034))
+- `Image`: 视觉升级 @LeeJim ([#1038](https://github.com/Tencent/tdesign-miniprogram/pull/1038))
+- `Toast`: 视觉升级 @LeeJim ([#1073](https://github.com/Tencent/tdesign-miniprogram/pull/1073))
+- `Skeleton`: 视觉升级 @anlyyao ([#1037](https://github.com/Tencent/tdesign-miniprogram/pull/1037))
+- `Switch`: 视觉升级 @LeeJim ([#1080](https://github.com/Tencent/tdesign-miniprogram/pull/1080))
+- `Badge`: 视觉升级 @LeeJim ([#1004](https://github.com/Tencent/tdesign-miniprogram/pull/1004))
+- `Collapse`: 新增 theme 属性,支持 card 风格 @LeeJim ([#1039](https://github.com/Tencent/tdesign-miniprogram/pull/1039))
+- `Image`: 新增 `width` 和 `height` 属性用于控制图片尺寸 @LeeJim ([#1038](https://github.com/Tencent/tdesign-miniprogram/pull/1038))
+- `Empty`: 新增 iconProps 属性 @anlyyao ([#1041](https://github.com/Tencent/tdesign-miniprogram/pull/1041))
+- `Empty`: 新增 CSS Variables, 用于调整描述、操作内容文本颜色和间距等 @anlyyao ([#1041](https://github.com/Tencent/tdesign-miniprogram/pull/1041))
+- `Result`: 新增 iconProps 属性 @anlyyao ([#1040](https://github.com/Tencent/tdesign-miniprogram/pull/1040))
+- `Result`: 新增 CSS Variables, 用于调整标题、描述文本颜色 @anlyyao ([#1040](https://github.com/Tencent/tdesign-miniprogram/pull/1040))
+- `Skeleton`: 新增 CSS Variables, 用于调整骨架屏背景颜色、行间距等 @anlyyao ([#1037](https://github.com/Tencent/tdesign-miniprogram/pull/1037))
+- `ImageViewer`: 新增 closeIconProps 和 deleteIconProps 属性 @anlyyao ([#1074](https://github.com/Tencent/tdesign-miniprogram/pull/1074))
+- `ImageViewer`: 新增 CSS Variables, 用于调整操作条背景、文本颜色等 @anlyyao ([#1074](https://github.com/Tencent/tdesign-miniprogram/pull/1074))
+- `Footer`: 新增 CSS Variables, 用于调整页脚文本大小、颜色等 @anlyyao ([#1042](https://github.com/Tencent/tdesign-miniprogram/pull/1042))
+- `Switch`: 新增 icon 属性,用于显示开关的图标 @LeeJim ([#1080](https://github.com/Tencent/tdesign-miniprogram/pull/1080))
+- `Avatar`: 新增 CSS Variables, 用于调整头像背景、文本颜色 @anlyyao ([#1076](https://github.com/Tencent/tdesign-miniprogram/pull/1076))
+- `Avatar`: 支持 imageProps,并新增 iconProps 和 bordered 属性 @anlyyao ([#1076](https://github.com/Tencent/tdesign-miniprogram/pull/1076))
+
+### 🐞 Bug Fixes
+- `Switch`: 修复 size、loading 不生效的问题 @LeeJim ([#1080](https://github.com/Tencent/tdesign-miniprogram/pull/1080))
+- `Avatar`: 修复 alt 属性无效 @anlyyao ([#1076](https://github.com/Tencent/tdesign-miniprogram/pull/1076))
+- `NavBar`: 使用正确的状态栏高度 @LeeJim ([#1083](https://github.com/Tencent/tdesign-miniprogram/pull/1083))
+- `Search`: 修复插槽需要对应值为空时才渲染的问题 @LeeJim ([#1087](https://github.com/Tencent/tdesign-miniprogram/pull/1087))
+
+## 🌈 0.26.0 `2022-11-14`
+### ❗ Breaking Changes
+- `Textarea`: 调整 confirm-type 的默认值为 return @LeeJim ([#1007](https://github.com/Tencent/tdesign-miniprogram/pull/1007))
+- `Navbar`: 移除 background 使用 CSS Variables 代替 @LeeJim ([#1010](https://github.com/Tencent/tdesign-miniprogram/pull/1010))
+- `Navbar`: 属性 left-icon 更名为 left-arrow,只保留 Boolean 类型 @LeeJim ([#1010](https://github.com/Tencent/tdesign-miniprogram/pull/1010))
+- `Navbar`: 移除 home-icon,新增名为 left 和 capsule 的插槽 @LeeJim ([#1010](https://github.com/Tencent/tdesign-miniprogram/pull/1010))
+- `Navbar`: 移除 go-home 事件 @LeeJim ([#1010](https://github.com/Tencent/tdesign-miniprogram/pull/1010))
+
+### 🚀 Features
+- `Button`: 视觉升级 @LeeJim ([#993](https://github.com/Tencent/tdesign-miniprogram/pull/993))
+- `Fab`: 视觉升级 @LeeJim ([#995](https://github.com/Tencent/tdesign-miniprogram/pull/995))
+- `Tag`: 视觉升级 @LeeJim ([#997](https://github.com/Tencent/tdesign-miniprogram/pull/997))
+- `Cell`: 视觉升级 @LeeJim ([#1003](https://github.com/Tencent/tdesign-miniprogram/pull/1003))
+- `Grid`: 视觉升级 @LeeJim ([#1006](https://github.com/Tencent/tdesign-miniprogram/pull/1006))
+- `Navbar`: 视觉升级 @LeeJim ([#1010](https://github.com/Tencent/tdesign-miniprogram/pull/1010))
+- `Button`: 新增 light 主题 @LeeJim ([#993](https://github.com/Tencent/tdesign-miniprogram/pull/993))
+- `Tag`: 属性 size 新增 extra-large 加大尺寸 @LeeJim ([#997](https://github.com/Tencent/tdesign-miniprogram/pull/997))
+- `CheckTag`: 新增支持 variant 支持 4 种变体 @LeeJim ([#997](https://github.com/Tencent/tdesign-miniprogram/pull/997))
+- `NoticeBar`: 支持 prefixIcon 、theme 属性动态更新 @anlyyao ([#999](https://github.com/Tencent/tdesign-miniprogram/pull/999))
+- `CellGroup`: 新增 theme 属性,支持 card 风格 @LeeJim ([#1003](https://github.com/Tencent/tdesign-miniprogram/pull/1003))
+- `Grid`: 新增 theme 属性,增加 card 风格 @LeeJim ([#1006](https://github.com/Tencent/tdesign-miniprogram/pull/1006))
+- `Grid`: 新增 BadgeProps 属性,透传至徽章组件 @LeeJim ([#1006](https://github.com/Tencent/tdesign-miniprogram/pull/1006))
+- `Grid`: 新增 icon 属性,支持传入图标 @LeeJim ([#1006](https://github.com/Tencent/tdesign-miniprogram/pull/1006))
+- `Grid`: 支持当 column = 0 时,将不平分空间,支持滑动 @LeeJim ([#1006](https://github.com/Tencent/tdesign-miniprogram/pull/1006))
+
+### 🐞 Bug Fixes
+- `Button`: 修复有主题的幽灵按钮颜色丢失的问题 @LeeJim ([#993](https://github.com/Tencent/tdesign-miniprogram/pull/993))
+- `NoticeBar`: 修复 content 动态更新时, 滚动动画计算错误。 @anlyyao ([#999](https://github.com/Tencent/tdesign-miniprogram/pull/999))
+- `TabBar`: 修复绝对定位时,宽度没有撑开的问题 @LeeJim ([#1001](https://github.com/Tencent/tdesign-miniprogram/pull/1001))
+- `Cascader`: 修复异步获取 options 时,无法使用 value 初始化已选选项 @LeeJim ([#1011](https://github.com/Tencent/tdesign-miniprogram/pull/1011))
+
+## 🌈 0.25.0 `2022-11-07`
+### ❗ Breaking Changes
+- `Badge`: 修复 offset 的顺序,首值应该调整水平方向 @LeeJim ([#971](https://github.com/Tencent/tdesign-miniprogram/pull/971))
+- `Tabs`: 调整非 BEM 的类名,此变更属于破坏性变更 @LeeJim ([#970](https://github.com/Tencent/tdesign-miniprogram/pull/970))
+### 🚀 Features
+- 全部组件支持 `customStyle` 属性,作为 style 传入根元素 @anlyyao ([#985](https://github.com/Tencent/tdesign-miniprogram/pull/985))
+- `SideBar`: 新增侧边导航组件 @LeeJim ([#974](https://github.com/Tencent/tdesign-miniprogram/pull/974))
+- `RadioGroup`: 新增支持 keys 属性,使用 options 时有效 @LeeJim ([#964](https://github.com/Tencent/tdesign-miniprogram/pull/964))
+- `Tabs`: 新增 space-evenly 属性,默认均分选项卡片的空间 @LeeJim ([#965](https://github.com/Tencent/tdesign-miniprogram/pull/965))
+- `Cascader`: 视觉全新升级 @LeeJim ([#966](https://github.com/Tencent/tdesign-miniprogram/pull/966))
+- `Cascader`: 新增 theme 属性,新增 tab 风格 @LeeJim ([#966](https://github.com/Tencent/tdesign-miniprogram/pull/966))
+- `Cascader`: 新增 keys 属性,支持映射 optiosn 属性名 @LeeJim ([#966](https://github.com/Tencent/tdesign-miniprogram/pull/966))
+- `Cascader`: 新增 sub-titles 属性,显示每级的次标题 @LeeJim ([#966](https://github.com/Tencent/tdesign-miniprogram/pull/966))
+- `Button`: 新增 CSS Variable 调整文本、边框、背景等颜色,具体查看文档 @anlyyao ([#947](https://github.com/Tencent/tdesign-miniprogram/pull/947))
+- `GridItem`: 新增 image-props 透传至 image 组件 @LeeJim ([#976](https://github.com/Tencent/tdesign-miniprogram/pull/976))
+- `TabBar`: 视觉升级 @LeeJim ([#987](https://github.com/Tencent/tdesign-miniprogram/pull/987))
+- `TabBar`: 新增 shape 属性,新增悬浮胶囊形状的标签栏 @LeeJim ([#987](https://github.com/Tencent/tdesign-miniprogram/pull/987))
+- `TabBar`: 新增 theme 属性,新增 tag 风格 @LeeJim ([#987](https://github.com/Tencent/tdesign-miniprogram/pull/987))
+- `DropdownMenu`: 新增 `external-classes` 属性 @anlyyao ([#991](https://github.com/Tencent/tdesign-miniprogram/pull/991))
+- `Csacader`: 支持 CSS Variables 进行自定义主题 @LeeJim ([#990](https://github.com/Tencent/tdesign-miniprogram/pull/990))
+### 🐞 Bug Fixes
+- 修复没传值时不支持非受控的问题 @LeeJim ([#977](https://github.com/Tencent/tdesign-miniprogram/pull/977))
+- `RadioGroup`: 修复使用 options 时无法选中的问题 @LeeJim ([#964](https://github.com/Tencent/tdesign-miniprogram/pull/964))
+- `Tabs`: 修复动态 label 无法生效的问题 @LeeJim ([#963](https://github.com/Tencent/tdesign-miniprogram/pull/963))
+- `Tabs`: 优化样式细节 @LeeJim ([#965](https://github.com/Tencent/tdesign-miniprogram/pull/965))
+- `Cascader`: 修复传入 value 不会渲染选项的问题 @LeeJim ([#966](https://github.com/Tencent/tdesign-miniprogram/pull/966))
+- `Button`: 修复 variant=text 时,文本颜色样式错误 @anlyyao ([#947](https://github.com/Tencent/tdesign-miniprogram/pull/947))
+- `Input`: 修复 `--td-input-disabled-text-color` 无效的问题 @anlyyao ([#960](https://github.com/Tencent/tdesign-miniprogram/pull/960))
+- `Calendar`: 修复无法滚动的问题 @LeeJim ([#989](https://github.com/Tencent/tdesign-miniprogram/pull/989))
+- `Calandar`: 修复在布局不兼容的问题 @LeeJim ([#989](https://github.com/Tencent/tdesign-miniprogram/pull/989))
+
+## 🌈 0.24.0 `2022-10-31`
+### ❗️BREAKING CHANGES
+- `Radio`: 移除 color 属性,使用 CSS Variable 替代 @anlyyao ([#944](https://github.com/Tencent/tdesign-miniprogram/pull/944))
+
+### 🚀 Features
+- `Tabs`: 视觉全新升级 @LeeJim ([#957](https://github.com/Tencent/tdesign-miniprogram/pull/957))
+- `Tabs`: 新增 theme 属性,支持 line/tag/card @LeeJim ([#957](https://github.com/Tencent/tdesign-miniprogram/pull/957))
+- `Tabs`: 新增 CSS Variables,用于调整滑块尺寸 @LeeJim ([#957](https://github.com/Tencent/tdesign-miniprogram/pull/957))
+- `TabPanel`: 新增 badgeProps 属性,支持使用徽章 @LeeJim ([#957](https://github.com/Tencent/tdesign-miniprogram/pull/957))
+- `CheckTag`: 支持外部样式类 @anlyyao ([#945](https://github.com/Tencent/tdesign-miniprogram/pull/945))
+- `Radio`: 新增 CSS Variable 调整文案、图标等颜色,具体查看文档 @anlyyao ([#944](https://github.com/Tencent/tdesign-miniprogram/pull/944))
+
+### 🐞 Bug Fixes
+- `Popup`: 阻止内容区域滑动穿透 @LeeJim ([#943](https://github.com/Tencent/tdesign-miniprogram/pull/943))
+- `Cascader`: 调整 `usingComponents` 中的绝对路径为相对路径 @miauyo ([#938](https://github.com/Tencent/tdesign-miniprogram/pull/938))
+- `Icon`: 修复 customStyle 属性无效的问题 @anlyyao ([#950](https://github.com/Tencent/tdesign-miniprogram/pull/950))
+- `DateTimePicker`: 修复 mode = second 不生效的问题 @LeeJim ([#952](https://github.com/Tencent/tdesign-miniprogram/pull/952))
+### 🚧 Others
+- `Textarea`: 修复 "带标题多行文本框" 示例不显示 @anlyyao ([#937](https://github.com/Tencent/tdesign-miniprogram/pull/937))
+
+## 🌈 0.23.1 `2022-10-24`
+### 🐞 Bug Fixes
+
+- `Steps`: 修复内存溢出的问题 @LeeJim ([#928](https://github.com/Tencent/tdesign-miniprogram/pull/928))
+- `tabBar`: 使用正确的备用初始值 @anlyyao ([#930](https://github.com/Tencent/tdesign-miniprogram/pull/930))
+
+### 🚧 Others
+- `Input`: 修复 `demo`中 `value` 属性拼写错误 @anlyyao ([#923](https://github.com/Tencent/tdesign-miniprogram/pull/923))
+- `Cascader`: 修改文档导入示例错误 @miauyo ([#924](https://github.com/Tencent/tdesign-miniprogram/pull/924))
+- `Message`: 新增示例演示如何在自定义导航栏时使用 message @LeeJim ([#932](https://github.com/Tencent/tdesign-miniprogram/pull/932))
+- 修复因 buffer 超出限制导致单元测试报错的问题 @LeeJim ([#925](https://github.com/Tencent/tdesign-miniprogram/pull/925))
+- 更新官网 Demo 示例的二维码 @anlyyao ([#917](https://github.com/Tencent/tdesign-miniprogram/pull/917))
+
+
+## 🌈 0.23.0 `2022-10-17`
+### 🚀 Features
+- `Cascader`: 新增级联选择器 @LeeJim ([#912](https://github.com/Tencent/tdesign-miniprogram/pull/912))
+- `RadioGroup`: 新增 align 和 icon 属性,当使用 options 渲染子项时有效 @LeeJim ([#912](https://github.com/Tencent/tdesign-miniprogram/pull/912))
+### 🐞 Bug Fixes
+- `PulldownRefresh`: 修复高度无法自适应外容器的问题 @LeeJim ([#909](https://github.com/Tencent/tdesign-miniprogram/pull/909))
+- `Tabs`: 修复 placement = left 时, Nav 不可见且不居左的问题 @LeeJim ([#908](https://github.com/Tencent/tdesign-miniprogram/pull/908))
+- `TabBar`: 修复 item 不传 value 时无法自动生成备用值的问题 @LeeJim ([#914](https://github.com/Tencent/tdesign-miniprogram/pull/914))
+### 🚧 Others
+- `Calendar`: 修复动态数据导致测试用例一直报错的问题 @LeeJim ([#916](https://github.com/Tencent/tdesign-miniprogram/pull/916))
+
+## 🌈 0.22.0 `2022-10-10`
+### 🚀 Features
+- `Calendar`: 新增日历组件 @LeeJim ([#896](https://github.com/Tencent/tdesign-miniprogram/pull/896))
+### 🐞 Bug Fixes
+- `Dialog`: 函数式`Dialog.close()` 关闭窗体支持自定义 `selector` @anlyyao ([#894](https://github.com/Tencent/tdesign-miniprogram/pull/894))
+- `Message`: 函数式`Dialog.hide()` 关闭窗体支持自定义 `selector` @anlyyao ([#894](https://github.com/Tencent/tdesign-miniprogram/pull/894))
+
+## 🌈 0.21.2 `2022-09-26`
+### 🐞 Bug Fixes
+- `Input`: 修复 `clearable` 的显示和隐藏问题 @anlyyao ([#874](https://github.com/Tencent/tdesign-miniprogram/pull/874))
+- `Tabbar`: 使用 fallback value 保证颜色展示正确 @LeeJim ([#875](https://github.com/Tencent/tdesign-miniprogram/pull/875))
+- `Icon`: 移除 `CSS` 属性 `speak` @anlyyao ([#885](https://github.com/Tencent/tdesign-miniprogram/pull/885))
+- `Textarea`: 修复 maxLength 情况下,显示值和实际值不一致问题 @anlyyao ([#883](https://github.com/Tencent/tdesign-miniprogram/pull/883))
+- `Textarea`: 修复 maxcharacter 情况下,输入值超出 maxcharacter 的问题 @anlyyao ([#883](https://github.com/Tencent/tdesign-miniprogram/pull/883))
+- `Input`: 修复 maxcharacter 情况下,输入值超出 maxcharacter 的问题 @anlyyao ([#883](https://github.com/Tencent/tdesign-miniprogram/pull/883))
+- `DateTimePicker`: 修复选项重置错误的问题 @LeeJim ([#888](https://github.com/Tencent/tdesign-miniprogram/pull/888))
+### 🚧 Others
+- NPM 包中保留 dts,更好得支持 TypeScript @AntzyMo ([#682](https://github.com/Tencent/tdesign-miniprogram/pull/682))
+
+## 🌈 0.21.1 `2022-09-19`
+### 🚀 Features
+- `Toast`: 使用 Transition 实现淡入淡出动画 @LeeJim ([#863](https://github.com/Tencent/tdesign-miniprogram/pull/863))
+- `Upload`: 新增 source 属性,支持从聊天会话中读取文件 @LeeJim ([#868](https://github.com/Tencent/tdesign-miniprogram/pull/868))
+### 🐞 Bug Fixes
+- `Toast`: 重构 DOM 以及代码逻辑 @LeeJim ([#863](https://github.com/Tencent/tdesign-miniprogram/pull/863))
+- `ActionSheet`: 修复 theme = list 时点击选项之后报错的问题 @LeeJim ([#866](https://github.com/Tencent/tdesign-miniprogram/pull/866))
+- `Tabs`: 修复嵌套使用时样式错误的问题 @LeeJim ([#869](https://github.com/Tencent/tdesign-miniprogram/pull/869))
+### 🚧 Others
+- `Indexes`: 新增单元测试 @CodingOnStar ([#850](https://github.com/Tencent/tdesign-miniprogram/pull/850))
+- `Message`: 新增单元测试 @anlyyao ([#859](https://github.com/Tencent/tdesign-miniprogram/pull/859))
+- `SwipeCell`: 新增单元测试 @webwyb ([#861](https://github.com/Tencent/tdesign-miniprogram/pull/861))
+- `Swiper`: 新增单元测试 @anlyyao ([#864](https://github.com/Tencent/tdesign-miniprogram/pull/864))
+
+## 🌈 0.21.0 `2022-09-13`
+### ❗️BREAKING CHANGES
+- `TabBar`: 点击 subTabBar 选项时,返回的值从数组改成选项的值 @LeeJim ([#846](https://github.com/Tencent/tdesign-miniprogram/pull/846))
+### 🚀 Features
+- `Slider`: 属性 marks 支持动态响应 @LeeJim ([#853](https://github.com/Tencent/tdesign-miniprogram/pull/853))
+### 🐞 Bug Fixes
+- `TabBar`: 修复子选项激活时,父选项未展示激活的问题 @LeeJim ([#846](https://github.com/Tencent/tdesign-miniprogram/pull/846))
+- `Slider`: 修复 disabled 状态下点击报错的问题 @LeeJim ([#853](https://github.com/Tencent/tdesign-miniprogram/pull/853))
+### 🚧 Others
+- `TabBar`: 新增单元测试 @LeeJim ([#846](https://github.com/Tencent/tdesign-miniprogram/pull/846))
+- `Upload`: 新增单元测试 @anlyyao ([#847](https://github.com/Tencent/tdesign-miniprogram/pull/847))
+- `DropdownMenu`: 新增单元测试 @LeeJim ([#848](https://github.com/Tencent/tdesign-miniprogram/pull/848))
+- `Slider`: 新增单元测试 @LeeJim ([#853](https://github.com/Tencent/tdesign-miniprogram/pull/853))
+- `Picker`: 新增单元测试 @LeeJim ([#854](https://github.com/Tencent/tdesign-miniprogram/pull/854))
+- `DateTimePicker`: 新增单元测试 @LeeJim ([#855](https://github.com/Tencent/tdesign-miniprogram/pull/855))
+- `Sticky`: 新增单元测试 @Perisiguiendo ([#852](https://github.com/Tencent/tdesign-miniprogram/pull/852))
+
+## 🌈 0.20.0 `2022-09-05`
+### ❗️BREKING CHANGES
+- `Icon`: `size` 不在支持 `middle`、`small`等关键字,默认单位 `px` @anlyyao ([#828](https://github.com/Tencent/tdesign-miniprogram/pull/828))
+### 🚀 Features
+- `Textarea`: 更新演示代码文档 @anlyyao ([#817](https://github.com/Tencent/tdesign-miniprogram/pull/817))
+- `Dialog`: 新增 overlayProps 属性透传至 Overlay 组件 @LeeJim ([#822](https://github.com/Tencent/tdesign-miniprogram/pull/822))
+- `Icon`: `name` 支持图片链接 @anlyyao ([#828](https://github.com/Tencent/tdesign-miniprogram/pull/828))
+- `Tabs`: change 和 click 事件返回 label 的值 @LeeJim ([#841](https://github.com/Tencent/tdesign-miniprogram/pull/841))
+- `Icon`: 新增更多的图标 @anlyyao ([#838](https://github.com/Tencent/tdesign-miniprogram/pull/838))
+
+### 🐞 Bug Fixes
+- `Tab`: 修复滑块定位错误的问题 @CodingOnStar ([#781](https://github.com/Tencent/tdesign-miniprogram/pull/781))
+- `NoticeBar`: 解决函数同名导致控制台报错 @anlyyao ([#814](https://github.com/Tencent/tdesign-miniprogram/pull/814))
+- `tabs`: 修复无法正常移除 tab panel 的问题 @LeeJim ([#830](https://github.com/Tencent/tdesign-miniprogram/pull/830))
+- `DropdownMenu`: 修复下拉菜单定位错误的问题 @LeeJim ([#836](https://github.com/Tencent/tdesign-miniprogram/pull/836))
+- `Tabs`: 修复垂直模式下内容区域绑定事件无效的问题 @anlyyao ([#837](https://github.com/Tencent/tdesign-miniprogram/pull/837))
+- `Fab`: 修复悬浮按钮随页面滚动的问题 @anlyyao ([#842](https://github.com/Tencent/tdesign-miniprogram/pull/842))
+### 🚧 Others
+- `ActionSheet`: 新增单元测试 @anlyyao ([#832](https://github.com/Tencent/tdesign-miniprogram/pull/832))
+- `Dialog`: 新增单元测试 @LeeJim ([#816](https://github.com/Tencent/tdesign-miniprogram/pull/816))
+- `Overlay`: 新增单元测试 @LeeJim ([#818](https://github.com/Tencent/tdesign-miniprogram/pull/818))
+- `Avatar`: 新增单元测试 @Perisiguiendo ([#812](https://github.com/Tencent/tdesign-miniprogram/pull/812))
+- `Image`: 新增单元测试 @LeeJim ([#820](https://github.com/Tencent/tdesign-miniprogram/pull/820))
+- `NoticeBar`: 新增单元测试 @anlyyao ([#821](https://github.com/Tencent/tdesign-miniprogram/pull/821))
+- `CountDown`: 新增单元测试 @LeeJim ([#824](https://github.com/Tencent/tdesign-miniprogram/pull/824))
+- `Collapse`: 新增单元测试 @LeeJim ([#825](https://github.com/Tencent/tdesign-miniprogram/pull/825))
+- `Navbar`: 新增单元测试 @LeeJim ([#829](https://github.com/Tencent/tdesign-miniprogram/pull/829))
+- `ImageViewer`: 新增单元测试 @LeeJim ([#826](https://github.com/Tencent/tdesign-miniprogram/pull/826))
+- `Tabs`: 新增单元测试 @LeeJim ([#831](https://github.com/Tencent/tdesign-miniprogram/pull/831))
+- `PullDownRefresh`: 新增单元测试 @anlyyao ([#835](https://github.com/Tencent/tdesign-miniprogram/pull/835))
+
+## 🌈 0.19.3 `2022-08-29`
+### 🚀 Features
+- `Toast`: 新增 close 事件 @AntzyMo ([#680](https://github.com/Tencent/tdesign-miniprogram/pull/680))
+- `Toast`: 新增 destory 事件 @LeeJim ([#796](https://github.com/Tencent/tdesign-miniprogram/pull/796))
+### 🐞 Bug Fixes
+- `Picker`: 修复 `Picker` 示例显示不全 @anlyyao ([#804](https://github.com/Tencent/tdesign-miniprogram/pull/804))
+### 🚧 Others
+- `Toast`: 新增单元测试 @LeeJim ([#797](https://github.com/Tencent/tdesign-miniprogram/pull/797))
+- `Footer`: 新增单元测试 @zhangpaopao0609 ([#794](https://github.com/Tencent/tdesign-miniprogram/pull/794))
+- `Step`: 新增单元测试 @isanxia ([#792](https://github.com/Tencent/tdesign-miniprogram/pull/792))
+- `Search`: 新增单元测试 @Perisiguiendo ([#790](https://github.com/Tencent/tdesign-miniprogram/pull/790))
+- `Switch`: 新增单元测试 @Perisiguiendo ([#791](https://github.com/Tencent/tdesign-miniprogram/pull/791))
+- `Empty`: 新增单元测试 @AntzyMo ([#801](https://github.com/Tencent/tdesign-miniprogram/pull/801))
+- `Skeleton`: 新增单元测试 @Perisiguiendo ([#803](https://github.com/Tencent/tdesign-miniprogram/pull/803))
+
+## 🌈 0.19.2 `2022-08-22`
+### 🚀 Features
+- `Badge`: 新增单元测试 @Perisiguiendo ([#776](https://github.com/Tencent/tdesign-miniprogram/pull/776))
+- `Input`: 新增单元测试 @anlyyao ([#775](https://github.com/Tencent/tdesign-miniprogram/pull/775))
+- `Textarea`: 新增单元测试 @anlyyao ([#774](https://github.com/Tencent/tdesign-miniprogram/pull/774))
+- `Stepper`: 新增单元测试 @anlyyao ([#773](https://github.com/Tencent/tdesign-miniprogram/pull/773))
+- `Divider`: 新增单元测试 @Perisiguiendo ([#771](https://github.com/Tencent/tdesign-miniprogram/pull/771))
+- `Result`: 新增单元测试 @CodingOnStar ([#769](https://github.com/Tencent/tdesign-miniprogram/pull/769))
+- `Progress`: `strokeWidth` 支持字符类型 @anlyyao ([#772](https://github.com/Tencent/tdesign-miniprogram/pull/772))
+- `Progress`: 更新测试用例 @anlyyao ([#772](https://github.com/Tencent/tdesign-miniprogram/pull/772))
+- `Rate`: 新增单元测试 @isanxia ([#767](https://github.com/Tencent/tdesign-miniprogram/pull/767))
+- `ImageViewer`: 更新 `demo` 示例图片 @anlyyao ([#782](https://github.com/Tencent/tdesign-miniprogram/pull/782))
+- `Rate`: 新增单元测试 @isanxia ([#767](https://github.com/Tencent/tdesign-miniprogram/pull/767))
+### 🐞 Bug Fixes
+- `Badge`: 修复 `showZero` && `offset` 无单位情况 @Perisiguiendo ([#776](https://github.com/Tencent/tdesign-miniprogram/pull/776))
+- `Popup`: 修复 `zIndex` 无效问题 @anlyyao ([#784](https://github.com/Tencent/tdesign-miniprogram/pull/784))
+- `ImageViewer`: 修复图片宽高都小于屏幕宽高时的拉伸问题 @anlyyao ([#782](https://github.com/Tencent/tdesign-miniprogram/pull/782))
+
+## 🌈 0.19.1 `2022-08-15`
+### 🚀 Features
+- `Upload`: 新增 click 事件 @LeeJim ([#762](https://github.com/Tencent/tdesign-miniprogram/pull/762))
+
+### 🐞 Bug Fixes
+- `Tag`: 修复 click 事件不生效 @anlyyao ([#738](https://github.com/Tencent/tdesign-miniprogram/pull/738))
+- `Tag`: 修复行内元素基线对齐不正确 @anlyyao ([#738](https://github.com/Tencent/tdesign-miniprogram/pull/738))
+- `Grid`: 修复垂直布局时间,align 无效 @anlyyao ([#739](https://github.com/Tencent/tdesign-miniprogram/pull/739))
+- `Tag`: 修复 disabled 为true时,closable 无效的问题 @anlyyao ([#743](https://github.com/Tencent/tdesign-miniprogram/pull/743))
+- `Tag`: 修复 maxWidth 输入为字符时,宽度计算错误问题 @anlyyao ([#743](https://github.com/Tencent/tdesign-miniprogram/pull/743))
+- `Upload`: 修复自定义上传没有关联成功/失败状态 @Winfans ([#758](https://github.com/Tencent/tdesign-miniprogram/pull/758))
+- `Swiper`: 修复动态修改 `swiper-item` 时,视图响应不正确问题 @anlyyao ([#761](https://github.com/Tencent/tdesign-miniprogram/pull/761))
+- `Tabs`: 修复垂直布局时,内容区域不正确。 @anlyyao ([#760](https://github.com/Tencent/tdesign-miniprogram/pull/760))
+
+### 🚧 Others
+- `Fab`: 新增单元测试 @LeeJim ([#740](https://github.com/Tencent/tdesign-miniprogram/pull/740))
+- `Icon`: 新增单元测试 @LeeJim ([#741](https://github.com/Tencent/tdesign-miniprogram/pull/741))
+- `Cell`: 新增单元测试 @LeeJim ([#742](https://github.com/Tencent/tdesign-miniprogram/pull/742))
+- `Popup`: 完善单元测试 @LeeJim ([#746](https://github.com/Tencent/tdesign-miniprogram/pull/746))
+- `Progress`: 新增单元测试 @anlyyao ([#731](https://github.com/Tencent/tdesign-miniprogram/pull/731))
+- `Drawer`: 新增单元测试 @anlyyao ([#732](https://github.com/Tencent/tdesign-miniprogram/pull/732))
+- `Loading`: 新增单元测试 @anlyyao ([#733](https://github.com/Tencent/tdesign-miniprogram/pull/733))
+- `Tag`: 修复文档 CheckTag 事件名称不正确 @anlyyao ([#738](https://github.com/Tencent/tdesign-miniprogram/pull/738))
+- `Tag`: 完善单元测试 @anlyyao ([#743](https://github.com/Tencent/tdesign-miniprogram/pull/743))
+- `Grid`: 新增单元测试 @LeeJim ([#752](https://github.com/Tencent/tdesign-miniprogram/pull/752))
+
+## 🌈 0.19.0 `2022-08-08`
+### 🚀 Features
+- `Skeleton`: 新增 `t-class-row` 外部样式类 @anlyyao ([#699](https://github.com/Tencent/tdesign-miniprogram/pull/699))
+- `Cell`: 新增 `t-class-left-icon` 外部样式类 @anlyyao ([#703](https://github.com/Tencent/tdesign-miniprogram/pull/703))
+- `Tabs`: 新增 sticky 和 stickyProps 属性透传至 Sticky 组件 @anlyyao ([#725](https://github.com/Tencent/tdesign-miniprogram/pull/725))
+- `Tabs`: 新增 CSS Variable 调整选项卡背景色 @anlyyao ([#725](https://github.com/Tencent/tdesign-miniprogram/pull/725))
+- `Tabs`: 新增 scroll 事件 @anlyyao ([#725](https://github.com/Tencent/tdesign-miniprogram/pull/725))
+- `PulldownRefresh`: 新增 ScrollToTop 方法,手动调用滚动到顶部 @LeeJim ([#730](https://github.com/Tencent/tdesign-miniprogram/pull/730))
+- `Checkbox`: 新增单元测试 @LeeJim ([#724](https://github.com/Tencent/tdesign-miniprogram/pull/724))
+- `Button`: 新增单元测试 @LeeJim ([#726](https://github.com/Tencent/tdesign-miniprogram/pull/726))
+- `Radio`: 新增单元测试 @LeeJim ([#729](https://github.com/Tencent/tdesign-miniprogram/pull/729))
+- `BackTop`: 新增单元测试 @anlyyao ([#728](https://github.com/Tencent/tdesign-miniprogram/pull/728))
+### 🐞 Bug Fixes
+- `Cell`: 修复 `image` 插槽无效问题 @anlyyao ([#703](https://github.com/Tencent/tdesign-miniprogram/pull/703))
+- `Tag`: 改用 `display: inline-flex`,宽度自适应 @anlyyao ([#723](https://github.com/Tencent/tdesign-miniprogram/pull/723))
+### 🚧 Others
+- 新增单元测试 @LeeJim ([#700](https://github.com/Tencent/tdesign-miniprogram/pull/700))
+- `SwipeCell`: 更新示例代码 @anlyyao ([#698](https://github.com/Tencent/tdesign-miniprogram/pull/698))
+- `Message`: 更新示例代码 @AntzyMo ([#695](https://github.com/Tencent/tdesign-miniprogram/pull/695))
+- `Dialog`: 更新示例代码 @AntzyMo ([#704](https://github.com/Tencent/tdesign-miniprogram/pull/704))
+- `Input`: 修复文档描述错误 @anlyyao ([#706](https://github.com/Tencent/tdesign-miniprogram/pull/706))
+- `Checkbox`: 更新示例代码 @wangyuan0108 ([#668](https://github.com/Tencent/tdesign-miniprogram/pull/668))
+- `Radio`: 更新示例代码 @wangyuan0108 ([#667](https://github.com/Tencent/tdesign-miniprogram/pull/667))
+- `Toast`: 更新示例代码 @CodingOnStar ([#676](https://github.com/Tencent/tdesign-miniprogram/pull/676))
+- `Empty`: 更新示例代码 @AntzyMo ([#709](https://github.com/Tencent/tdesign-miniprogram/pull/709))
+- `Toast`: 优化示例代码 @LeeJim ([#711](https://github.com/Tencent/tdesign-miniprogram/pull/711))
+- `BackTop`: 更新示例代码 @anlyyao ([#710](https://github.com/Tencent/tdesign-miniprogram/pull/710))
+- `ActionSheet`: 更新示例代码 @LeeJim ([#716](https://github.com/Tencent/tdesign-miniprogram/pull/716))
+- `DropdownMenu`: 更新示例代码 @LeeJim ([#721](https://github.com/Tencent/tdesign-miniprogram/pull/721))
+- `ImageViewer`: 更新示例代码 @anlyyao ([#712](https://github.com/Tencent/tdesign-miniprogram/pull/712))
+- `Sticky`: 更新示例代码 @anlyyao ([#720](https://github.com/Tencent/tdesign-miniprogram/pull/720))
+- `Countdown`: 更新示例代码 @AntzyMo ([#714](https://github.com/Tencent/tdesign-miniprogram/pull/714))
+- `Badge`: 更新示例代码 @wangyuan0108 ([#717](https://github.com/Tencent/tdesign-miniprogram/pull/717))
+- `Message`: 更新示例代码 @AntzyMo ([#695](https://github.com/Tencent/tdesign-miniprogram/pull/695))
+
+## 🌈 0.18.0 `2022-08-01`
+
+### ❗️ BREAKING CHANGES
+- `Tabbar`: CSS Variables 命名规则由 `--t` 改成 `--td` 开头 @LeeJim ([#663](https://github.com/Tencent/tdesign-miniprogram/pull/663))
+- `Avatar`: 头像组的样式内置进组件内 @anlyyao ([#665](https://github.com/Tencent/tdesign-miniprogram/pull/665))
+### 🚀 Features
+- `Avatar`: 新增 CSS Variable 调整 Avatar 背景、内容(文本或图标)颜色 @anlyyao ([#665](https://github.com/Tencent/tdesign-miniprogram/pull/665))
+- `Swiper`: 新增 `paginationPosition` 属性,用于调整页码信息的位置 @anlyyao ([#669](https://github.com/Tencent/tdesign-miniprogram/pull/669))
+- `Swiper`: 新增 CSS Variable 调整 Swiper 导航器背景、内容颜色 @anlyyao ([#669](https://github.com/Tencent/tdesign-miniprogram/pull/669))
+- `Button`: 新增 loadingProps 属性透传至 Loading 组件 @anlyyao ([#673](https://github.com/Tencent/tdesign-miniprogram/pull/673))
+- `Tabs`: 新增 CSS Variables 调整字体、滑块颜色等,具体查看文档 @LeeJim ([#684](https://github.com/Tencent/tdesign-miniprogram/pull/684))
+- `Toast`: 支持 `duration` 传入 0 的时候,toast 不消失 @LeeJim ([#683](https://github.com/Tencent/tdesign-miniprogram/pull/683))
+### 🐞 Bug Fixes
+- `Tabbar`: 修复因 CSS Variables 没有写 fallback 导致样式丢失的问题 @LeeJim ([#663](https://github.com/Tencent/tdesign-miniprogram/pull/663))
+- `Avatar`: 修复组件类名错误 @anlyyao ([#665](https://github.com/Tencent/tdesign-miniprogram/pull/665))
+- `upload`: 修复组件中图片被挤压问题 @anlyyao ([#666](https://github.com/Tencent/tdesign-miniprogram/pull/666))
+- `Button`: 修复 loading 无效的问题 @anlyyao ([#673](https://github.com/Tencent/tdesign-miniprogram/pull/673))
+- `DropdownMenu`: 修复树形选择时,点击单选仍自动关闭的问题 @LeeJim ([#686](https://github.com/Tencent/tdesign-miniprogram/pull/686))
+- `DropdownMenu`: 修复 `closeOnClickOverlay` 不生效的问题 @LeeJim ([#685](https://github.com/Tencent/tdesign-miniprogram/pull/685))
+- `Cell`: 优化 slot 的渲染逻辑 @LeeJim ([#688](https://github.com/Tencent/tdesign-miniprogram/pull/688))
+
+### 🚧 Others
+- `Avatar`: 更新示例代码 @anlyyao ([#665](https://github.com/Tencent/tdesign-miniprogram/pull/665))
+- `Swiper`: 更新示例代码 @anlyyao ([#669](https://github.com/Tencent/tdesign-miniprogram/pull/669))
+- `Stepper`: 更新示例代码 @anlyyao ([#670](https://github.com/Tencent/tdesign-miniprogram/pull/670))
+- `Progress`: 更新示例代码 @anlyyao ([#690](https://github.com/Tencent/tdesign-miniprogram/pull/690))
+- `Loading`: 更新示例代码 @anlyyao ([#691](https://github.com/Tencent/tdesign-miniprogram/pull/691))
+- `Slider`: 更新示例代码 @anlyyao ([#671](https://github.com/Tencent/tdesign-miniprogram/pull/671))
+- `Cell`: 更新示例代码 @CodingOnStar ([#675](https://github.com/Tencent/tdesign-miniprogram/pull/675))
+- `tabbar`: 修复文档中主题定制前缀错误的问题 @anlyyao ([#674](https://github.com/Tencent/tdesign-miniprogram/pull/674))
+
+## 🌈 0.17.0 `2022-07-25`
+### ❗️BREAKING CHANGES
+- `Tabbar`: 移除 color 属性,使用 CSS Variable 替代 @LeeJim ([#650](https://github.com/Tencent/tdesign-miniprogram/pull/650))
+- `Rate`: 移除 color 属性,使用 CSS Variable 替代 @anlyyao ([#653](https://github.com/Tencent/tdesign-miniprogram/pull/653))
+- `Rate`: `external-classes` 属性中的 `t-class-desc` 更名为 `t-class-text` @anlyyao ([#653](https://github.com/Tencent/tdesign-miniprogram/pull/653))
+- `Search`: 将 `external-classes` 属性中的 `t-class-cancel` 更名为 `t-class-action`。 @anlyyao ([#654](https://github.com/Tencent/tdesign-miniprogram/pull/654))
+
+### 🚀 Features
+- `Tabs`: 超过屏幕时,自动将激活的选项滚动到中间 @LeeJim ([#633](https://github.com/Tencent/tdesign-miniprogram/pull/633))
+- `Tabs`: 新增 `swipeable` 属性,用于控制是否滑动切换 @LeeJim ([#634](https://github.com/Tencent/tdesign-miniprogram/pull/634))
+- `PullDownRefresh`: 新增 `scrolltolower` 事件 @ws2003gq ([#641](https://github.com/Tencent/tdesign-miniprogram/pull/641))
+- `Button`: `variant` 属性新增 `dashed` @anlyyao ([#648](https://github.com/Tencent/tdesign-miniprogram/pull/648))
+- `Tabbar`: 新增 CSS Variable 调整标签栏字体和图标颜色,具体查看文档 @LeeJim ([#650](https://github.com/Tencent/tdesign-miniprogram/pull/650))
+- `Grid`: `external-classes` 属性增加 `t-class-content` @anlyyao ([#635](https://github.com/Tencent/tdesign-miniprogram/pull/635))
+- `Grid`: 新增 CSS Variable 调整宫格背景、文本等颜色,具体查看文档 @anlyyao ([#635](https://github.com/Tencent/tdesign-miniprogram/pull/635))
+- `Search`: 新增 CSS Variable 调整 `Search` 字体、背景、图标等颜色,具体查看文档 @anlyyao ([#654](https://github.com/Tencent/tdesign-miniprogram/pull/654))
+- `Rate`: 新增 CSS Variable 调整 Rate 辅助文本、选中、未选中及禁用态图标颜色,具体查看文档 @anlyyao ([#653](https://github.com/Tencent/tdesign-miniprogram/pull/653))
+- `Input`: 移除 `external-classes` 属性中的 `t-class-placeholder`。 @anlyyao ([#651](https://github.com/Tencent/tdesign-miniprogram/pull/651))
+- `Input`: `external-classes` 属性新增 `t-class-icon`, `t-class-label`, `t-class-clearable`, `t-class-suffix`, `t-class-suffix-icon` @anlyyao ([#651](https://github.com/Tencent/tdesign-miniprogram/pull/651))
+- `Input`: 新增 CSS Variable 调整 `Input` 字体、背景、图标等颜色,具体查看文档 @anlyyao ([#651](https://github.com/Tencent/tdesign-miniprogram/pull/651))
+- `Divider`: 新增 CSS Variable 调整分割线、文本颜色,具体查看文档 @anlyyao ([#656](https://github.com/Tencent/tdesign-miniprogram/pull/656))
+- `Indexes`: 新增 CSS Variable 调整 标题、背景、文本等颜色,具体查看文档 @anlyyao ([#649](https://github.com/Tencent/tdesign-miniprogram/pull/649))
+- `Drawer`: 新增 CSS Variable 调整抽屉背景、列表项标题、列表项图标、列表项下边框颜色,具体查看文档 @anlyyao ([#658](https://github.com/Tencent/tdesign-miniprogram/pull/658))
+
+### 🐞 Bug Fixes
+- `Tabs`: 修复值等于 0 时不能正常切换的问题 @LeeJim ([#632](https://github.com/Tencent/tdesign-miniprogram/pull/632))
+- `Textarea`: 修复超出 `maxcharacter` 后,仍能继续输入的问题 @anlyyao ([#625](https://github.com/Tencent/tdesign-miniprogram/pull/625))
+- `Picker`: 修复因重复定义 `options` 导致告警的问题 @LeeJim ([#638](https://github.com/Tencent/tdesign-miniprogram/pull/638))
+- `Image`: 补充缺失的 `shape = square` 样式 @anlyyao ([#637](https://github.com/Tencent/tdesign-miniprogram/pull/637))
+- `Button`: 修复 `variant=outline`无效 @anlyyao ([#648](https://github.com/Tencent/tdesign-miniprogram/pull/648))
+
+### 🚧 Others
+- `Navbar`: 更新示例代码 @anlyyao ([#636](https://github.com/Tencent/tdesign-miniprogram/pull/636))
+- `Textarea`: 更新示例代码 @anlyyao ([#625](https://github.com/Tencent/tdesign-miniprogram/pull/625))
+- `Icon`: 更新示例代码 @anlyyao ([#642](https://github.com/Tencent/tdesign-miniprogram/pull/642))
+- `Image`: 更新示例代码 @anlyyao ([#637](https://github.com/Tencent/tdesign-miniprogram/pull/637))
+- `Fab`: 更新示例代码 @wangyuan0108 ([#602](https://github.com/Tencent/tdesign-miniprogram/pull/602))
+- `Tabbar`: 新增自定义主题示例代码 @LeeJim ([#650](https://github.com/Tencent/tdesign-miniprogram/pull/650))
+- `Divider`: 更新示例代码 @wangyuan0108 ([#608](https://github.com/Tencent/tdesign-miniprogram/pull/608))
+- `Overlay`: 更新示例代码 @LeeJim ([#655](https://github.com/Tencent/tdesign-miniprogram/pull/655))
+- `Grid`: 更新示例代码 @anlyyao ([#635](https://github.com/Tencent/tdesign-miniprogram/pull/635))
+- `Search`: 更新示例代码 @anlyyao ([#654](https://github.com/Tencent/tdesign-miniprogram/pull/654))
+- `Rate`: 更新示例代码 @anlyyao ([#653](https://github.com/Tencent/tdesign-miniprogram/pull/653))
+- `DateTimePicker`: 更新示例代码 @anlyyao ([#652](https://github.com/Tencent/tdesign-miniprogram/pull/652))
+- `Button`: 更新示例代码 @wangyuan0108 ([#607](https://github.com/Tencent/tdesign-miniprogram/pull/607))
+- `Drawer`: 更新示例代码 @wangyuan0108 ([#613](https://github.com/Tencent/tdesign-miniprogram/pull/613))
+- `Tabs`: 更新示例代码 @wangyuan0108 ([#616](https://github.com/Tencent/tdesign-miniprogram/pull/616))
+- `Input`: 更新示例代码 @anlyyao ([#651](https://github.com/Tencent/tdesign-miniprogram/pull/651))
+- `Indexes`: 更新示例代码 @anlyyao ([#649](https://github.com/Tencent/tdesign-miniprogram/pull/649))
+
+## 🌈 0.16.0 `2022-07-18`
+### ❗ BREAKING CHANGES
+- `Drawer`: 调整 `placement` 属性,只支持 `left` 和 `right` @LeeJim ([#619](https://github.com/Tencent/tdesign-miniprogram/pull/619))
+- `Button`: `tap` 事件返回值更新为 `event` 对象 @anlyyao ([#603](https://github.com/Tencent/tdesign-miniprogram/pull/603))
+- `Skeleton`: 属性 `theme` 移除 `avatar-text`;新增 `avatar` 、`image` 、`paragraph` @anlyyao ([#617](https://github.com/Tencent/tdesign-miniprogram/pull/617))
+- `Skeleton`: 外部样式类移除 `t-class-avatar` 、`t-class-image` 、`t-class-text` ;新增 `t-class-col` @anlyyao ([#617](https://github.com/Tencent/tdesign-miniprogram/pull/617))
+- `Skeleton`: 属性 `rowCol ` 移除默认值 `[1, 1, 1, { width: 70% }]` @anlyyao ([#617](https://github.com/Tencent/tdesign-miniprogram/pull/617))
+### 🚀 Features
+- `Picker`: 增加 `autoClose` 属性,点击确认、取消、遮罩层时自动关闭 @LeeJim ([#614](https://github.com/Tencent/tdesign-miniprogram/pull/614))
+- `Result`: 新增组件 @anlyyao ([#589](https://github.com/Tencent/tdesign-miniprogram/pull/589))
+### 🐞 Bug Fixes
+- `Picker`: 修复 `pick` 事件返回的 `label `不正确的问题 @LeeJim ([#612](https://github.com/Tencent/tdesign-miniprogram/pull/612))
+- `Picker`: `confirm-btn` 和 `cancel-btn` 增加 `boolean` 类型,值为 `true` 时使用默认文案 @LeeJim ([#614](https://github.com/Tencent/tdesign-miniprogram/pull/614))
+- `DropdownMenu`: 移除冗余的 `z-index` @LeeJim ([#623](https://github.com/Tencent/tdesign-miniprogram/pull/623))
+- `Loading`: 修复 `text` 为空时仍渲染非空节点的问题 @wanpan11 ([#621](https://github.com/Tencent/tdesign-miniprogram/pull/621))
+### 🚧 Others
+- `Switch`: 更新示例代码 @wangyuan0108 ([#615](https://github.com/Tencent/tdesign-miniprogram/pull/615))
+- `NoticeBar`: 更新示例代码 @anlyyao ([#610](https://github.com/Tencent/tdesign-miniprogram/pull/610))
+- `Picker`: 展示示例代码 @anlyyao ([#606](https://github.com/Tencent/tdesign-miniprogram/pull/606))
+- `Tag`: 更新示例代码 @anlyyao ([#622](https://github.com/Tencent/tdesign-miniprogram/pull/622))
+- `Steps`: 更新示例代码 @anlyyao ([#609](https://github.com/Tencent/tdesign-miniprogram/pull/609))
+- `Skeleton`: 更新示例代码 @anlyyao ([#617](https://github.com/Tencent/tdesign-miniprogram/pull/617))
+
+## 🌈 0.15.1 `2022-07-13`
+### 🚀 Features
+- `TabBar`: 支持使用 CSS Variable 定制颜色 @LeeJim ([#601](https://github.com/Tencent/tdesign-miniprogram/pull/601))
+### 🐞 Bug Fixes
+- `DropdownMenu`: 优化按钮样式 @LeeJim ([#592](https://github.com/Tencent/tdesign-miniprogram/pull/592))
+- `DropdownMenu`: 修复切换菜单时出现漂移的问题 @LeeJim ([#592](https://github.com/Tencent/tdesign-miniprogram/pull/592))
+- `Dialog`: 修复无法展示的问题以及过渡动画 @LeeJim ([#596](https://github.com/Tencent/tdesign-miniprogram/pull/596))
+- `DropdownMenu`: 修复下拉菜单无法展开的问题 @LeeJim ([#604](https://github.com/Tencent/tdesign-miniprogram/pull/604))
+### 🚧 Others
+- 官网文档升级更新: 展示所有代码(WXML、JS、WXSS、JSON),并且 DEMO 与 示例代码保持一致 @LeeJim ([#590](https://github.com/Tencent/tdesign-miniprogram/pull/590))
+- `Popup`: 展示示例代码 @LeeJim ([#599](https://github.com/Tencent/tdesign-miniprogram/pull/599))
+- `Upload`: 展示示例代码 @anlyyao ([#595](https://github.com/Tencent/tdesign-miniprogram/pull/595))
+- `TabBar`: 更新示例代码 @LeeJim ([#601](https://github.com/Tencent/tdesign-miniprogram/pull/601))
+- `Footer`: 更新示例代码 @wangyuan0108 ([#593](https://github.com/Tencent/tdesign-miniprogram/pull/593))
+
+## 0.15.0 `2022-7-11`
+
+### BREAKING CHANGES
+
+- DropdownMenu: 属性 overlay 更名为 showOverlay [#582](https://github.com/Tencent/tdesign-miniprogram/pull/582) [@LeeJim](https://github.com/LeeJim)
+- Popup: 移除 transitionProps 属性 [#585](https://github.com/Tencent/tdesign-miniprogram/pull/585) [@LeeJim](https://github.com/LeeJim)
+### Bug Fixes
+
+- Tabs: 修复选项卡不存在时滑动报错问题 [#573](https://github.com/Tencent/tdesign-miniprogram/pull/573) [@anlyyao](https://github.com/anlyyao)
+- DropdownMenu: 修复关闭时无动画的问题 [#587](https://github.com/Tencent/tdesign-miniprogram/pull/587) [@LeeJim](https://github.com/LeeJim)
+### Features
+
+- Fab: 支持文本自适应 [#575](https://github.com/Tencent/tdesign-miniprogram/pull/575) [@anlyyao](https://github.com/anlyyao)
+- Tag: [#581](https://github.com/Tencent/tdesign-miniprogram/pull/581) [@anlyyao](https://github.com/anlyyao)
+ - 视觉更新
+ - 支持图标
+- DropdownMenu: 新增 toggle 示例方法,用于切换下拉菜单 [#584](https://github.com/Tencent/tdesign-miniprogram/pull/584) [@LeeJim](https://github.com/LeeJim)
+- DropdownMenu: 新增 keys 属性以支持自定义 label 和 value 的字段名 [#582](https://github.com/Tencent/tdesign-miniprogram/pull/582) [@LeeJim](https://github.com/LeeJim)
+- Popup: [#585](https://github.com/Tencent/tdesign-miniprogram/pull/585) [@LeeJim](https://github.com/LeeJim)
+ - 新增 duration 属性,控制动画过渡时间
+ - 新增 customStyle 透传样式至根节点
+ - 新增 overlayProps 属性,透传至 overlay 组件
+
+## 0.14.0 `2022-7-1`
+
+### BREAKING CHANGES
+
+- TextArea: 移除不生效的外部样式类 `t-class-placeholder`, 建议使用类名 `t-textarea__placeholder` 进行样式覆盖 [#541](https://github.com/Tencent/tdesign-miniprogram/pull/541) [@anlyyao](https://github.com/anlyyao)
+### Bug Fixes
+
+- Tabbar: 修复具名插槽无法使用的问题 [#548](https://github.com/Tencent/tdesign-miniprogram/pull/548) [@LeeJim](https://github.com/LeeJim)
+- 修复默认层级问题 [#553](https://github.com/Tencent/tdesign-miniprogram/pull/553) [@webwyb](https://github.com/webwyb)
+ - Dialog
+ - DropdownMenu
+ - Drawer
+ - Message
+ - Popup
+- Fab: 修复 `text` 属性不生效的问题 [#561](https://github.com/Tencent/tdesign-miniprogram/pull/561) [@LeeJim](https://github.com/LeeJim)
+- NoticeBar: 修复公告不滚动问题 [#562](https://github.com/Tencent/tdesign-miniprogram/pull/562) [@LeeJim](https://github.com/LeeJim)
+- Dialog: 修复点击遮罩层不会触发 `close` 事件的问题 [#566](https://github.com/Tencent/tdesign-miniprogram/pull/566) [@LeeJim](https://github.com/LeeJim)
+
+### Features
+
+- ActionSheet: 新增 `t-class-content`、`t-class-cancel` 外部样式类 [#557](https://github.com/Tencent/tdesign-miniprogram/pull/557) [@webwyb](https://github.com/webwyb)
+- Progress: 新增 `t-class-bar` 外部样式类 [#558](https://github.com/Tencent/tdesign-miniprogram/pull/558) [@anlyyao](https://github.com/anlyyao)
+- Picker: [#565](https://github.com/Tencent/tdesign-miniprogram/pull/565) [@LeeJim](https://github.com/LeeJim)
+ - 新增 `confirm` 事件,返回参数和 `change` 一致
+ - `confirm`、`change`、`pick` 事件均返回 `label` 参数
+
+## 0.13.2 `2022-6-16`
+
+### Bug Fixes
+
+- Dialog: 修复取消按钮传递 Object 显示不正确的问题 [#510](https://github.com/Tencent/tdesign-miniprogram/pull/510) [@weihongyu12](https://github.com/weihongyu12)
+- Checkbox: 修复外部样式类无法使用的问题 [#535](https://github.com/Tencent/tdesign-miniprogram/pull/535) [@LeeJim](https://github.com/LeeJim)
+
+### Features
+
+- DropdownMenu: 单选的情况下,选择之后直接关闭 [#539](https://github.com/Tencent/tdesign-miniprogram/pull/539) [@LeeJim](https://github.com/LeeJim)
+
+## 0.13.1 `2022-6-10`
+
+### Bug Fixes
+
+- Textarea: 修复字数统计不生效的问题 [#510](https://github.com/Tencent/tdesign-miniprogram/pull/510) [@anlyyao](https://github.com/anlyyao)
+- Textarea: 移除无用的组件依赖 [#520](https://github.com/Tencent/tdesign-miniprogram/pull/520) [@LeeJim](https://github.com/LeeJim)
+
+### Features
+
+- Textarea: 支持 `cursor-spacing` 属性 [#512](https://github.com/Tencent/tdesign-miniprogram/pull/512) [@anlyyao](https://github.com/anlyyao)
+- Toast: 新增 `showToast` 和 `hideToast` 方法 [#514](https://github.com/Tencent/tdesign-miniprogram/pull/514) [@webwyb](https://github.com/webwyb)
+
+### Others
+
+- 支持微信开发者工具可视化编程
+
+## 0.13.0 `2022-6-1`
+### BREAKING CHANGES
+
+- Picker: [#462](https://github.com/Tencent/tdesign-miniprogram/pull/462) [@wutianSweet](https://github.com/wutianSweet)
+ - 事件 `change` 更名为 `pick`
+ - 事件 `confirm` 更名为 `change`
+- PickerItem: [#462](https://github.com/Tencent/tdesign-miniprogram/pull/462) [@wutianSweet](https://github.com/wutianSweet)
+ - 移除 `value` 属性
+- DateTimePicker: [#462](https://github.com/Tencent/tdesign-miniprogram/pull/462) [@wutianSweet](https://github.com/wutianSweet)
+ - 新增 `start` 和 `end` 属性用于替代 `disable-date` 属性
+ - 移除 `disable-date` 属性
+ - 事件 `change` 更名为 `pick`
+ - 事件 `confirm` 更名为 `change`
+ - 移除 `column-change` 事件
+ - 属性 `format` 默认值改成 `''`
+ - 重构了事件返回参数,在传入了 `format` 属性时,`value` 则是格式化之后的值,否则就是 `picker-item` 的值
+
+### Bug Fixes
+
+- Tabs: 修复在 `popup` 中使用时丢失 `tab-nav` 的问题 [#491](https://github.com/Tencent/tdesign-miniprogram/pull/491) [@LeeJim](https://github.com/LeeJim)
+- Input: 修复 `max-character` 不生效的问题 [#495](https://github.com/Tencent/tdesign-miniprogram/pull/495) [@LeeJim](https://github.com/LeeJim)
+- PullDownRefresh: 修复使用组件之后无法滚动的问题 [#502](https://github.com/Tencent/tdesign-miniprogram/pull/502) [@LeeJim](https://github.com/LeeJim)
+
+### Features
+
+- Tabbar: 新增支持 `icon` 插槽 [#485](https://github.com/Tencent/tdesign-miniprogram/pull/485) [@LeeJim](https://github.com/LeeJim)
+- Button: 新增 `iconProps` 属性透传至 `icon` [#492](https://github.com/Tencent/tdesign-miniprogram/pull/492) [@LeeJim](https://github.com/LeeJim)
+- Collapse: 新增 `t-class-header` & `t-class-content` 外部样式类 [#496](https://github.com/Tencent/tdesign-miniprogram/pull/496) [@LeeJim](https://github.com/LeeJim)
+- Input: 新增 `prefixIcon` 属性和插槽 [#498](https://github.com/Tencent/tdesign-miniprogram/pull/498) [@LeeJim](https://github.com/LeeJim)
+
+## 0.12.1 `2022-5-27`
+### Bug Fixes
+
+- Dialog: 修复按钮传入 `openType` 不生效的问题 [#470](https://github.com/Tencent/tdesign-miniprogram/pull/470) [@LeeJim](https://github.com/LeeJim)
+- Collapse: 修复 `t-class` 外部样式类无法使用的问题 [#473](https://github.com/Tencent/tdesign-miniprogram/pull/473) [@LeeJim](https://github.com/LeeJim)
+- DropdownMenu: 修复 `label` 无法实时更新的问题 [#474](https://github.com/Tencent/tdesign-miniprogram/pull/474) [@LeeJim](https://github.com/LeeJim)
+- Sticky: 修复吸顶后 `tabs` 无法滑动的问题 [#475](https://github.com/Tencent/tdesign-miniprogram/pull/475) [@LeeJim](https://github.com/LeeJim)
+- Tabbar: 补充缺失的 `icon` 插槽 [#485](https://github.com/Tencent/tdesign-miniprogram/pull/485) [@LeeJim](https://github.com/LeeJim)
+
+## 0.12.0 `2022-5-24`
+
+### BREAKING CHANGES
+
+- Collapse: `expandIcon` 默认值从 `true` 改成 `null` [#462](https://github.com/Tencent/tdesign-miniprogram/pull/462) [@LeeJim](https://github.com/LeeJim)
+- Collapse: `headerRightContent` 移除 `boolean` 类型 [#462](https://github.com/Tencent/tdesign-miniprogram/pull/462) [@LeeJim](https://github.com/LeeJim)
+### Bug Fixes
+
+- Tabbar: 优化代码避免在 setData 里传输不必要的页面实例 [#448](https://github.com/Tencent/tdesign-miniprogram/pull/448) [@1977474741](https://github.com/1977474741)
+- Sticky: 修复在无法获取页面实例时报错的问题 [#449](https://github.com/Tencent/tdesign-miniprogram/pull/449) [@JJunYang](https://github.com/JJunYang)
+- Skeleton: 添加组件基础默认样式 [#453](https://github.com/Tencent/tdesign-miniprogram/pull/453) [@JJunYang](https://github.com/JJunYang)
+- DropdownMenu: 修正遮罩层的位置,以及下拉菜单的高度 [#456](https://github.com/Tencent/tdesign-miniprogram/pull/456) [@LeeJim](https://github.com/LeeJim)
+- DropdownMenu: 修复菜单选项点击区域过小的问题 [#457](https://github.com/Tencent/tdesign-miniprogram/pull/457) [@LeeJim](https://github.com/LeeJim)
+- BackTop: 修复丢失的 `to-top` 事件 [#460](https://github.com/Tencent/tdesign-miniprogram/pull/460) [@JJunYang](https://github.com/JJunYang)
+- Collapse: 修复 `header`、`expand-icon`、`header-right-content` 插槽无法使用的问题 [#462](https://github.com/Tencent/tdesign-miniprogram/pull/462) [@LeeJim](https://github.com/LeeJim)
+### Features
+
+- Steps: 节点支持自定义样式 [#437](https://github.com/Tencent/tdesign-miniprogram/pull/437) [@anlyyao](https://github.com/anlyyao)
+
+## 0.11.2 `2022-5-15`
+
+### Bug Fixes
+
+- Picker: 修复在没有取消和确认按钮的时候,标题没居中对齐的问题 [#435](https://github.com/Tencent/tdesign-miniprogram/pull/435) [@LeeJim](https://github.com/LeeJim)
+- Sticky: 修复在极端情况下报错的问题 [#440](https://github.com/Tencent/tdesign-miniprogram/pull/440) [@JJunYang](https://github.com/JJunYang)
+
+### Features
+
+- 完善 Input 原生属性: [#434](https://github.com/Tencent/tdesign-miniprogram/pull/434) [@LeeJim](https://github.com/LeeJim)
+ - 完善 `change` 事件,增加返回 `cursor` 和 `keyCode` 数据
+ - 增加 `keyboardheightchange` 事件,键盘高度发生变化的时候触发
+ - 增加占位符相关属性:`placehoderStyle` 和 `placeholderClass`
+ - 增加光标相关属性:`cursor`、`selection-start`、`selection-end`
+ - 增加 `hold-keyboard` 属性
+ - 增加安全键盘相关属性
+- Button: 增加 `bindchooseavatar` 原生事件,用户选择头像 [#443](https://github.com/Tencent/tdesign-miniprogram/pull/443) [@anlyyao](https://github.com/anlyyao)
+- Input: 支持 `borderless` 属性 [3cd7d58](https://github.com/Tencent/tdesign-miniprogram/commit/3cd7d58beed539914382784701e1b611293ad257) [@LeeJim](https://github.com/LeeJim)
+## 0.11.1 `2022-5-10`
+
+### Bug Fixes
+
+- 依赖错误的问题 [#438](https://github.com/Tencent/tdesign-miniprogram/pull/438) [@LeeJim](https://github.com/LeeJim)
+
+## 0.11.0 `2022-5-7`
+
+### BREAKING CHANGES
+
+- Tabs: 不再支持 slot 类型的 `label` [#423](https://github.com/Tencent/tdesign-miniprogram/pull/423) [@LeeJim](https://github.com/LeeJim)
+
+### Bug Fixes
+
+- Picker: 修复滑动延迟的问题 [#415](https://github.com/Tencent/tdesign-miniprogram/pull/415) [@LeeJim](https://github.com/LeeJim)
+- Avatar: 修复图标大小不随尺寸变化的问题 [#424](https://github.com/Tencent/tdesign-miniprogram/pull/424) [@Perisiguiendo](https://github.com/Perisiguiendo)
+- Tabbar: 修复样式告警问题 [#426](https://github.com/Tencent/tdesign-miniprogram/pull/426) [@anlyyao](https://github.com/anlyyao)
+- 修复样式告警问题: [#431](https://github.com/Tencent/tdesign-miniprogram/pull/431) [@anlyyao](https://github.com/anlyyao)
+ - ActionSheet
+ - ImageViewer
+ - Picker
+ - Steps
+## 0.10.0 `2022-4-29`
+
+### BREAKING CHANGES
+
+- Picker: 子组件名称从 `t-picker-column` 改成 `t-picker-item` [#392](https://github.com/Tencent/tdesign-miniprogram/pull/392) [@LeeJim](https://github.com/LeeJim)
+- DateTimePicker: `value` 从非受控改成受控 [#413](https://github.com/Tencent/tdesign-miniprogram/pull/413) [@LeeJim](https://github.com/LeeJim)
+### Bug Fixes
+
+- Drawer: 修复 `items` 标题无法显示的问题 [#388](https://github.com/Tencent/tdesign-miniprogram/pull/388) [@anlyyao](https://github.com/anlyyao)
+- PullDownRefresh: 修复无法使用的问题 [#400](https://github.com/Tencent/tdesign-miniprogram/pull/400) [@LeeJim](https://github.com/LeeJim)
+- Toast: 更正 `Loading` 标志的颜色 [#405](https://github.com/Tencent/tdesign-miniprogram/pull/405) [@LeeJim](https://github.com/LeeJim)
+- DateTimePicker: 修复 `defaultValue` 无法使用的问题 [#413](https://github.com/Tencent/tdesign-miniprogram/pull/413) [@LeeJim](https://github.com/LeeJim)
+
+### Features
+
+- Overlay: 新增遮罩层组件 [#407](https://github.com/Tencent/tdesign-miniprogram/pull/407) [@LeeJim](https://github.com/LeeJim)
+- ImageViewer: 新增图片预览组件 [#408](https://github.com/Tencent/tdesign-miniprogram/pull/408) [@NuoHui](https://github.com/NuoHui)
+- Tabs: 新增 `click` 事件 [#384](https://github.com/Tencent/tdesign-miniprogram/pull/384) [@JJunYang](https://github.com/JJunYang)
+- Grid: 新增 default `slot` [#395](https://github.com/Tencent/tdesign-miniprogram/pull/395) [@LeeJim](https://github.com/LeeJim)
+- Loading: 新增 `inheritColor` 属性,加载标志的颜色继承外部 [#404](https://github.com/Tencent/tdesign-miniprogram/pull/404) [@LeeJim](https://github.com/LeeJim)
+- Toast: 新增遮罩层,通过 `showOverlay` 和 `overlayProps` 控制 [#409](https://github.com/Tencent/tdesign-miniprogram/pull/409) [@LeeJim](https://github.com/LeeJim)
+
+## 0.9.0 `2022-4-21`
+
+### BREAKING CHANGES
+
+- Steps: 子组件名称从 `t-step` 改成 `t-step-item` [#373](https://github.com/Tencent/tdesign-miniprogram/pull/373) [@anlyyao](https://github.com/anlyyao)
+### Bug Fixes
+
+- Checkbox: 优化渲染性能 [#358](https://github.com/Tencent/tdesign-miniprogram/pull/358) [@LeeJim](https://github.com/LeeJim)
+- Switch: 修复无法选择的问题 [#362](https://github.com/Tencent/tdesign-miniprogram/pull/362) [@LeeJim](https://github.com/LeeJim)
+
+### Features
+
+- ActionSheet: 新增动作面板组件 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@NuoHui](https://github.com/NuoHui)
+- NoticeBar: 新增公告栏组件 [#354](https://github.com/Tencent/tdesign-miniprogram/pull/354) [@anlyyao](https://github.com/anlyyao)
+
+## 0.8.0 `2022-4-15`
+
+### BREAKING CHANGES
+
+- CheckboxGroup: change 事件返回的 value 将会过滤非 checkbox 的值 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+### Bug Fixes
+
+- Steps: 修复子步骤条不支持 status 的问题 [#334](https://github.com/Tencent/tdesign-miniprogram/pull/334) [@anlyyao](https://github.com/anlyyao)
+- Picker: 修复出现空白的取消和确认按钮 [#342](https://github.com/Tencent/tdesign-miniprogram/pull/342) [@jin0209](https://github.com/jin0209)
+- Swiper: 修复点击误触发翻页问题 [#343](https://github.com/Tencent/tdesign-miniprogram/pull/343) [@esky](https://github.com/esky)
+- Radio: 修复 label 错误的渲染位置 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+- Checkbox: 修复 label 错误的渲染位置 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+- Textarea:
+ - 修复缺失的 label 插槽 [#348](https://github.com/Tencent/tdesign-miniprogram/pull/348) [@anlyyao](https://github.com/anlyyao)
+ - 修复传入 adjust-position 不生效的问题 [#349](https://github.com/Tencent/tdesign-miniprogram/pull/349) [@anlyyao](https://github.com/anlyyao)
+- Transition: 修复动画过程中触发 leave 会导致界面卡死的问题 [#356](https://github.com/Tencent/tdesign-miniprogram/pull/356) [@esky](https://github.com/esky)
+### Features
+
+- DropdownMenu: 新增下拉菜单组件 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+- Radio: 新增 borderless 属性 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+- Checkbox:
+ - 新增 borderless 属性 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+ - 新增 theme 属性,添加 tag 类型,默认值为 default [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+- CheckboxGroup: 新增 customStyle 属性,透传 style 至根元素 [#347](https://github.com/Tencent/tdesign-miniprogram/pull/347) [@LeeJim](https://github.com/LeeJim)
+
+
+
+## 0.7.3 `2022-4-7`
+
+### Bug Fixes
+
+- Cell: 修复传入 String 类型的 `right-icon` 不生效的问题 [#321](https://github.com/Tencent/tdesign-miniprogram/pull/321) [@LeeJim](https://github.com/LeeJim)
+- Tabs: 属性 `label` 支持 slot [#327](https://github.com/Tencent/tdesign-miniprogram/pull/327) [@LeeJim](https://github.com/LeeJim)
+- Dialog: 完善 `close` 事件返回的参数 [#332](https://github.com/Tencent/tdesign-miniprogram/pull/332) [@LeeJim](https://github.com/LeeJim)
+- 受控优化:支持不传值时默认为非受控用法 [#329](https://github.com/Tencent/tdesign-miniprogram/pull/329) [#331](https://github.com/Tencent/tdesign-miniprogram/pull/331) [@LeeJim](https://github.com/LeeJim)
+### Features
+
+- 新增组件:
+ - Collapse 折叠面板 [#322](https://github.com/Tencent/tdesign-miniprogram/pull/322) [@LeeJim](https://github.com/LeeJim)
+ - Progress 进度条 [#318](https://github.com/Tencent/tdesign-miniprogram/pull/318) [@anlyyao](https://github.com/anlyyao)
+- Picker: 新增属性 `header` 以及 `header` 和 `footer` 的插槽 [#323](https://github.com/Tencent/tdesign-miniprogram/pull/323) [@jin0209](https://github.com/jin0209)
+- DateTimePicker: 新增属性 `header` 以及 `header` 和 `footer` 的插槽 [#323](https://github.com/Tencent/tdesign-miniprogram/pull/323) [@jin0209](https://github.com/jin0209)
+
+## 0.7.2 `2022-3-31`
+
+### Bug Fixes
+
+- Search: 修复 `submit` 事件返回参数错误的问题 [#291](https://github.com/Tencent/tdesign-miniprogram/pull/291) [@anlyyao](https://github.com/anlyyao)
+- Toast: 修复最大宽度和文案没对齐的问题 [#301](https://github.com/Tencent/tdesign-miniprogram/pull/301) [@zhenzhencai](https://github.com/zhenzhencai)
+- Input: 修复设置 `clearable` ,点击不清除内容的问题 [#303](https://github.com/Tencent/tdesign-miniprogram/pull/303) [@LeeJim](https://github.com/LeeJim)
+- Dialog: 修复 1px 边框在 iOS 上消失的问题 [#304](https://github.com/Tencent/tdesign-miniprogram/pull/304) [@jin0209](https://github.com/jin0209)
+- Swiper: 修复延迟设置地址时,显示不正常的问题 [#305](https://github.com/Tencent/tdesign-miniprogram/pull/305) [@esky](https://github.com/esky)
+- Button: 修复文案没有垂直居中的问题 [#311](https://github.com/Tencent/tdesign-miniprogram/pull/311) [@anlyyao](https://github.com/anlyyao)
+
+### Features
+
+- 新增组件:
+ - Fab 悬浮按钮 [#310](https://github.com/Tencent/tdesign-miniprogram/pull/310) [@LeeJim](https://github.com/LeeJim)
+ - Drawer 抽屉 [#308](https://github.com/Tencent/tdesign-miniprogram/pull/308) [@anlyyao](https://github.com/anlyyao)
+
+## 0.7.1 `2022-3-25`
+### Bug Fixes
+
+- Loading: 修复 `loading` 默认值为 `true` 但不显示的问题 [#272](https://github.com/Tencent/tdesign-miniprogram/pull/272) [@JJunYang](https://github.com/JJunYang)
+- Stepper: 修复图标偏移的问题 [#280](https://github.com/Tencent/tdesign-miniprogram/pull/280) [@Winfans](https://github.com/Winfans)
+- Search: 修复 `action-click` 事件不生效的问题 [#283](https://github.com/Tencent/tdesign-miniprogram/pull/283) [@LeeJim](https://github.com/LeeJim)
+- Textarea: 修复 `Form` 无法获取值的问题 [#284](https://github.com/Tencent/tdesign-miniprogram/pull/284) [@anlyyao](https://github.com/anlyyao)
+
+### Feature
+
+- 增加点击态:[#279](https://github.com/Tencent/tdesign-miniprogram/pull/279) [@Perisiguiendo](https://github.com/Perisiguiendo)
+ - Grid
+ - Tabbar
+- Upload: 使用 `t-image` 封装,并支持 `image-props` 用于属性透传 [#289](https://github.com/Tencent/tdesign-miniprogram/pull/289) [@xihangzhou](https://github.com/xihangzhou)
+
+## 0.7.0 `2022-3-18`
+
+### BREAKING CHANGES
+
+- Image:
+ - 属性 `load-failed` 变更为 `error` [#265](https://github.com/Tencent/tdesign-miniprogram/pull/265) [@xihangzhou](https://github.com/xihangzhou)
+ - 属性 `lazy-load` 变更为 `lazy` [#269](https://github.com/Tencent/tdesign-miniprogram/pull/269) [@LeeJim](https://github.com/LeeJim)
+
+### Bug Fixes
+
+- Button: 样式调整 [#262](https://github.com/Tencent/tdesign-miniprogram/pull/262) [@anlyyao](https://github.com/anlyyao)
+- Tag: 修复样式文件冗余的问题 [#267](https://github.com/Tencent/tdesign-miniprogram/pull/267) [@LeeJim](https://github.com/LeeJim)
+- Steps: 修复样式文件冗余的问题 [#268](https://github.com/Tencent/tdesign-miniprogram/pull/268) [@LeeJim](https://github.com/LeeJim)
+
+### Feature
+
+- Image: 新增 `shape` 属性 [#265](https://github.com/Tencent/tdesign-miniprogram/pull/265) [@xihangzhou](https://github.com/xihangzhou)
+
+## 0.6.2 `2022-3-14`
+
+### Bug Fixes
+
+- Button:
+ - 兼容不支持 `wx://form-field-button` 的版本 [#249](https://github.com/Tencent/tdesign-miniprogram/pull/249) [@anlyyao](https://github.com/anlyyao)
+ - 修正 type 属性的正确实现 [#250](https://github.com/Tencent/tdesign-miniprogram/pull/250) [@anlyyao](https://github.com/anlyyao)
+- 修复在 `form` 下无法获取值的问题:
+ - Input [#256](https://github.com/Tencent/tdesign-miniprogram/pull/256) [@anlyyao](https://github.com/anlyyao)
+ - Checkbox、Radio、Switch [#257](https://github.com/Tencent/tdesign-miniprogram/pull/257) [@anlyyao](https://github.com/anlyyao)
+- Upload: 修复关闭按钮层级过低的问题 [#246](https://github.com/Tencent/tdesign-miniprogram/pull/246) [@Winfans ](https://github.com/Winfans )
+- Toast: 修复层级过低的问题 [f4f6b5b](https://github.com/Tencent/tdesign-miniprogram/commit/f4f6b5be9c0f770c54c9c3ac976dce3f57ca2591) [@LeeJim](https://github.com/LeeJim)
+- Rate: 修复 iOS 下颜色失效的问题 [#244](https://github.com/Tencent/tdesign-miniprogram/pull/244) [@zhenzhencai ](https://github.com/zhenzhencai )
+### Feature
+
+- Button: 新增 `customDataset` 属性,可通过 `event.currentTarget.dataset.custom` 获取 [#259](https://github.com/Tencent/tdesign-miniprogram/pull/259) [@anlyyao](https://github.com/anlyyao)
+- Upload: 支持对图片和视频的同时上传 [#245](https://github.com/Tencent/tdesign-miniprogram/pull/245) [@xihangzhou](https://github.com/xihangzhou)
+
+## 0.6.1 `2022-3-10`
+
+### Bug Fixes
+- Dialog:
+ - 修复调用时没重复默认值问题 [#235](https://github.com/Tencent/tdesign-miniprogram/pull/235) [@scshsy](https://github.com/scshsy)
+ - 修复内部 `Button` 样式错误 [#236](https://github.com/Tencent/tdesign-miniprogram/pull/236) [@anlyyao](https://github.com/anlyyao)
+- Upload: 修复在 iOS 上无法选择的问题 [#239](https://github.com/Tencent/tdesign-miniprogram/pull/239) [@LeeJim](https://github.com/LeeJim)
+- Button: 属性 shape 的默认值改为 rectangle [#240](https://github.com/Tencent/tdesign-miniprogram/pull/240) [@anlyyao](https://github.com/anlyyao)
+- Rate: 修复 `value = 0` 时无法点击的问题 [#242](https://github.com/Tencent/tdesign-miniprogram/pull/242) [@zhenzhencai](https://github.com/zhenzhencai)
+- Grid: 修复样式问题 [#243](https://github.com/Tencent/tdesign-miniprogram/pull/243) [@xihangzhou](https://github.com/xihangzhou)
+
+## 0.6.0 `2022-3-8`
+
+### BREAKING CHANGES
+
+- Button: [#212](https://github.com/Tencent/tdesign-miniprogram/pull/212) [@anlyyao](https://github.com/anlyyao)
+ - 重构 `shape` 的实现,新增支持 `rectangle`、`circle` 类型
+ - 修复 `shape = round` 样式不对的问题
+ - 支持纯图标按钮
+### Bug Fixes
+
+- Stepper: 修复 `Stepper` 组件事件向上冒泡 [#216](https://github.com/Tencent/tdesign-miniprogram/pull/216) [@zhenzhencai](https://github.com/zhenzhencai)
+- Checkbox: 修复 `prefix` 问题 [#218](https://github.com/Tencent/tdesign-miniprogram/pull/218) [@amberlwan](https://github.com/amberlwan)
+- Popup: 支持默认 `slot` [#219](https://github.com/Tencent/tdesign-miniprogram/pull/219) [@Perisiguiendo](https://github.com/Perisiguiendo)
+- Image: 记录 `Image` 组件传入的 src, 防止 src 相同时重复刷新 [#221](https://github.com/Tencent/tdesign-miniprogram/pull/221) [@xihangzhou](https://github.com/xihangzhou)
+- Tag: 增加外部样式类 [#223](https://github.com/Tencent/tdesign-miniprogram/pull/223) [@xihangzhou](https://github.com/xihangzhou)
+- Button: 修改对 `Button` 组件的使用 demo [#229](https://github.com/Tencent/tdesign-miniprogram/pull/229) [@anlyyao](https://github.com/anlyyao)
+- Toast:
+ - 修改未传入的参数为默认值 [#230](https://github.com/Tencent/tdesign-miniprogram/pull/230) [@scshsy](https://github.com/scshsy)
+ - 修复 `z-index` 低于 `Popup` 问题 [#233](https://github.com/Tencent/tdesign-miniprogram/pull/233) [@LeeJim](https://github.com/LeeJim)
+
+## 0.5.4 `2022-3-4`
+### Bug Fixes
+- Slider: 视觉调整 & demo无法滑动问题修复 [#200](https://github.com/Tencent/tdesign-miniprogram/pull/200) [@anlyyao](https://github.com/anlyyao)
+- Search: 修复圆角样式不生效问题 [#208](https://github.com/Tencent/tdesign-miniprogram/pull/208) [@JJunYang](https://github.com/JJunYang)
+- Tab-bar: 修复 `value` 不生效问题 [#211](https://github.com/Tencent/tdesign-miniprogram/pull/211) [@LeeJim](https://github.com/LeeJim)
+### Feature
+- Picker: 支持渐进式滚动 [#203](https://github.com/Tencent/tdesign-miniprogram/pull/203) [@wutianSweet](https://github.com/wutianSweet)
+- Tabs: 添加滚动条外部样式类 [#213](https://github.com/Tencent/tdesign-miniprogram/pull/213) [@JJunYang](https://github.com/JJunYang)
+
+## 0.5.3 `2022-2-24`
+### Bug Fixes
+- Input: 修复 `label` 不生效的问题 [#190](https://github.com/Tencent/tdesign-miniprogram/pull/190) [@zhenzhencai](https://github.com/zhenzhencai)
+- Slider: 修复 `value` 不受控的问题 [#193](https://github.com/Tencent/tdesign-miniprogram/pull/193) [@LeeJim](https://github.com/LeeJim)
+- Search: [#195](https://github.com/Tencent/tdesign-miniprogram/pull/195) [@LeeJim](https://github.com/LeeJim)
+ - 移除受控用法
+ - 支持双向绑定
+ - 修复 `placeholder` 展示错误的问题
+## 0.5.2 `2022-2-15`
+
+### Bug Fixes
+- Stepper: 修复标签过长时的遮挡问题 [#175](https://github.com/Tencent/tdesign-miniprogram/pull/175) [@GAOGAO1994](https://github.com/GAOGAO1994)
+- Upload: 修复 `success` 事件,返回当前选择的所有文件 [#181](https://github.com/Tencent/tdesign-miniprogram/pull/181) [@LeeJim](https://github.com/LeeJim)
+- Checkbox: 修复选择异常的问题 [#181](https://github.com/Tencent/tdesign-miniprogram/pull/181) [@LeeJim](https://github.com/LeeJim)
+### Feature
+- Upload: 新增 `add` 事件,返回当前选择的文件 [#181](https://github.com/Tencent/tdesign-miniprogram/pull/181) [@LeeJim](https://github.com/LeeJim)
+
+## 0.5.1 `2022-2-15`
+
+### Bug Fixes
+
+- Stepper
+ - 修复外部样式类失效的问题 [#168](https://github.com/Tencent/tdesign-miniprogram/pull/168) [@walkerliu01](https://github.com/walkerliu01)
+ - 修复点击热区过于小的问题 [#169](https://github.com/Tencent/tdesign-miniprogram/pull/169) [@LeeJim](https://github.com/LeeJim)
+- Cell: 修复基础样式丢失的问题 [#171](https://github.com/Tencent/tdesign-miniprogram/pull/171) [@LeeJim](https://github.com/LeeJim)
+- CountDown: 修复基础样式丢失的问题 [#172](https://github.com/Tencent/tdesign-miniprogram/pull/172) [@LeeJim](https://github.com/LeeJim)
+- Divider: 修复基础样式丢失的问题 [#173](https://github.com/Tencent/tdesign-miniprogram/pull/173) [@LeeJim](https://github.com/LeeJim)
+- Checkbox: 修复禁用状态下的选中态 [#175](https://github.com/Tencent/tdesign-miniprogram/pull/175) [@amberlwan](https://github.com/amberlwan)
+### Feature
+
+- Steps: 升级新版视觉 [#167](https://github.com/Tencent/tdesign-miniprogram/pull/167) [@LeeJim](https://github.com/LeeJim)
+- Dialog: 新增外部样式类 [#170](https://github.com/Tencent/tdesign-miniprogram/pull/170) [@LeeJim](https://github.com/LeeJim)
+- CountDown: 新增 3 个属性:`size`、`theme`、`splitWithUnit` [#172](https://github.com/Tencent/tdesign-miniprogram/pull/172) [@LeeJim](https://github.com/LeeJim)
+
+## 0.5.0 `2022-1-28`
+
+### BREAKING CHANGES
+
+- 组件支持受控用法,对应的非受控属性增加了 `default` 前缀。支持受控的组件如下:
+ - Checkbox [#158](https://github.com/Tencent/tdesign-miniprogram/pull/158) [@amberlwan](https://github.com/amberlwan)
+ - Upload [#156](https://github.com/Tencent/tdesign-miniprogram/pull/156) [@LeeJim](https://github.com/LeeJim)
+ - Search [#152](https://github.com/Tencent/tdesign-miniprogram/pull/152) [@LeeJim](https://github.com/LeeJim)
+ - Slider [#151](https://github.com/Tencent/tdesign-miniprogram/pull/151) [@LeeJim](https://github.com/LeeJim)
+ - Stepper [#150](https://github.com/Tencent/tdesign-miniprogram/pull/150) [@LeeJim](https://github.com/LeeJim)
+ - Rate [#149](https://github.com/Tencent/tdesign-miniprogram/pull/149) [@LeeJim](https://github.com/LeeJim)
+ - Tabbar [#148](https://github.com/Tencent/tdesign-miniprogram/pull/148) [@LeeJim](https://github.com/LeeJim)
+ - Tabs [#147](https://github.com/Tencent/tdesign-miniprogram/pull/147) [@LeeJim](https://github.com/LeeJim)
+ - Steps [#146](https://github.com/Tencent/tdesign-miniprogram/pull/146) [@LeeJim](https://github.com/LeeJim)
+ - Radio [#143](https://github.com/Tencent/tdesign-miniprogram/pull/143) [@LeeJim](https://github.com/LeeJim)
+ - Tag [#130](https://github.com/Tencent/tdesign-miniprogram/pull/130) [@LeeJim](https://github.com/LeeJim)
+ - Dialog [#124](https://github.com/Tencent/tdesign-miniprogram/pull/124) [@LeeJim](https://github.com/LeeJim)
+ - Switch [#122](https://github.com/Tencent/tdesign-miniprogram/pull/122) [@LeeJim](https://github.com/LeeJim)
+- Textarea: 属性 `name` 变更为 `label` [#157](https://github.com/Tencent/tdesign-miniprogram/pull/157) [@LeeJim](https://github.com/LeeJim)
+- Input: 属性 `name` 变更为 `label` [#153](https://github.com/Tencent/tdesign-miniprogram/pull/153) [@LeeJim](https://github.com/LeeJim)
+- Search: [#152](https://github.com/Tencent/tdesign-miniprogram/pull/152) [@LeeJim](https://github.com/LeeJim)
+ - 属性 `actionText` 变更为 `action`
+ - 属性 `keyword` 变更为 `value`
+
+### Bug Fixes
+
+- 修复基础样式丢失的问题:
+ - Loading [#140](https://github.com/Tencent/tdesign-miniprogram/pull/140) [@JJunYang](https://github.com/JJunYang)
+ - Badge [#131](https://github.com/Tencent/tdesign-miniprogram/pull/131) [@Perisiguiendo](https://github.com/Perisiguiendo)
+ - Avatar [#116](https://github.com/Tencent/tdesign-miniprogram/pull/116) [@Perisiguiendo](https://github.com/Perisiguiendo)
+- Button: 修复 `disabled` 失效的问题 [#134](https://github.com/Tencent/tdesign-miniprogram/pull/134) [@LeeJim](https://github.com/LeeJim)
+- Search: 修复事件参数错误的问题 [#132](https://github.com/Tencent/tdesign-miniprogram/pull/132) [@Perisiguiendo](https://github.com/Perisiguiendo)
+- Dialog: 修复 `Dialog.action` 显示错误的问题 [#124](https://github.com/Tencent/tdesign-miniprogram/pull/124) [@LeeJim](https://github.com/LeeJim)
+
+### Feature
+
+- Input: 支持双向绑定 [#133](https://github.com/Tencent/tdesign-miniprogram/pull/133) [@LeeJim](https://github.com/LeeJim)
+- Tabbar: 新增 `split` 属性控制是否展示分割线 [#126](https://github.com/Tencent/tdesign-miniprogram/pull/126) [@LeeJim](https://github.com/LeeJim)
+- Icon: 支持自定义 `prefix` [#117](https://github.com/Tencent/tdesign-miniprogram/pull/117) [@vhxubo](https://github.com/vhxubo)
+## 0.4.2 `2022-1-10`
+
+### Bug Fixes
+
+- Popup: 修复事件参数错误的问题 [#91](https://github.com/Tencent/tdesign-miniprogram/pull/91) [@LeeJim](https://github.com/LeeJim)
+- Checkbox: 完善缺失的插槽(`label`、`content`) [#95](https://github.com/Tencent/tdesign-miniprogram/pull/95) [@LeeJim](https://github.com/LeeJim)
+- Dialog: 修复按钮宽度计算错误的问题 [#100](https://github.com/Tencent/tdesign-miniprogram/pull/100) [@LeeJim](https://github.com/LeeJim)
+- Button: 修复在 `{ style: "v2" }` 的情况下,按钮宽度异常的问题 [#79](https://github.com/Tencent/tdesign-miniprogram/pull/79) [@vhxubo](https://github.com/vhxubo)
+
+## 0.4.1 `2022-1-6`
+### Bug Fixes
+
+- Tabs: 修复滑动切换时,不会触发 `change` 事件的问题 [#65](https://github.com/Tencent/tdesign-miniprogram/pull/65) [@BeanCookie](https://github.com/BeanCookie)
+- Message: 未正确引入组件时,抛出的错误信息 [#73](https://github.com/Tencent/tdesign-miniprogram/pull/73) [@LeeJim](https://github.com/LeeJim)
+- Dialog: 修复样式异常的问题 [#83](https://github.com/Tencent/tdesign-miniprogram/pull/83) [@LeeJim](https://github.com/LeeJim)
+
+### Feature
+
+- Button: 支持 `content` 属性,代表按钮内容 [#83](https://github.com/Tencent/tdesign-miniprogram/pull/83) [@LeeJim](https://github.com/LeeJim)
+- Dialog: `cancelBtn` 和 `confirmBtn` 支持所有 `t-button` 的属性 [#83](https://github.com/Tencent/tdesign-miniprogram/pull/83) [@LeeJim](https://github.com/LeeJim)
+
+## 0.4.0 `2021-12-30`
+
+### BREAKING CHANGES
+- CSS 类名规范:
+ - Slider [#45](https://github.com/Tencent/tdesign-miniprogram/pull/45) [@JJunYang](https://github.com/JJunYang)
+ - Stepper [#46](https://github.com/Tencent/tdesign-miniprogram/pull/46) [@JJunYang](https://github.com/JJunYang)
+ - Button [#51](https://github.com/Tencent/tdesign-miniprogram/pull/51) [@LeeJim](https://github.com/LeeJim)
+ - Search [#54](https://github.com/Tencent/tdesign-miniprogram/pull/54) [@JJunYang](https://github.com/JJunYang)
+ - Upload [#55](https://github.com/Tencent/tdesign-miniprogram/pull/55) [@JJunYang](https://github.com/JJunYang)
+ - Radio [#56](https://github.com/Tencent/tdesign-miniprogram/pull/56) [@LeeJim](https://github.com/LeeJim)
+### Bug Fixes
+
+- Input: 移除了废弃属性 `auto-focus`,详情可关注小程序官方文档 [@LeeJim](https://github.com/LeeJim)
+- Tabs:
+ - 修复选项卡底部滑条丢失的问题 [#52](https://github.com/Tencent/tdesign-miniprogram/pull/52) [@LeeJim](https://github.com/LeeJim)
+ - 补充了初始化样式 [#68](https://github.com/Tencent/tdesign-miniprogram/pull/68) [@LeeJim](https://github.com/LeeJim)
+
+## 0.3.0 `2021-12-23`
+
+### BREAKING CHANGES
+- CSS 类名规范:
+ - Textarea [#26](https://github.com/Tencent/tdesign-miniprogram/pull/26) [@JJunYang](https://github.com/JJunYang)
+ - Toast [#27](https://github.com/Tencent/tdesign-miniprogram/pull/27) [@jin0209](https://github.com/jin0209)
+ - Sticky [#24](https://github.com/Tencent/tdesign-miniprogram/pull/24) [@jin0209](https://github.com/jin0209)
+ - Search [#28](https://github.com/Tencent/tdesign-miniprogram/pull/28) [@JJunYang](https://github.com/JJunYang)
+ - Tabbar [#34](https://github.com/Tencent/tdesign-miniprogram/pull/34) [@LeeJim](https://github.com/LeeJim)
+ - Backtop [#35](https://github.com/Tencent/tdesign-miniprogram/pull/35) [@LeeJim](https://github.com/LeeJim)
+ - Skeleton [#20](https://github.com/Tencent/tdesign-miniprogram/pull/20) [@jin0209](https://github.com/jin0209)
+ - PullDownRefresh [#38](https://github.com/Tencent/tdesign-miniprogram/pull/38) [@jin0209](https://github.com/jin0209)
+
+### Bug Fixes
+
+- 修复开发者工具进行 NPM 构建时报错的问题 [@LeeJim](https://github.com/LeeJim)
+
+### Feature
+
+- Steps: 支持通过 `slot` 的方式传入 `icon` [#22](https://github.com/Tencent/tdesign-miniprogram/pull/22) [@LeeJim](https://github.com/LeeJim)
+
+## 0.2.0 `2021-12-20`
+### BREAKING CHANGES
+
+- CSS 类名规范:
+ - Cell [[4a0db04]](https://github.com/Tencent/tdesign-miniprogram/commit/4a0db04768f56016b27405090890d8fcb113c38b) [@jin0209](https://github.com/jin0209)
+ - Grid [[13c77c9]](https://github.com/Tencent/tdesign-miniprogram/commit/13c77c93f55e04d7fac144ba5a0b16d336642080) [@jin0209](https://github.com/jin0209)
+ - Tabs [[e064d8e]](https://github.com/Tencent/tdesign-miniprogram/commit/e064d8e7fd6c33e81b399bf0b5c15f21ebc7c38e) [@jin0209](https://github.com/jin0209)
+ - NavBar [[249af24]](https://github.com/Tencent/tdesign-miniprogram/commit/249af24a8dc05eb868d63138069ad13858a586eb) [@jin0209](https://github.com/jin0209)
+ - CountDown [[c6ce131]](https://github.com/Tencent/tdesign-miniprogram/commit/c6ce131cdfd453c8250124d874d6a705a4332a07) [@jin0209](https://github.com/jin0209)
+ - Image [[707f9ec]](https://github.com/Tencent/tdesign-miniprogram/commit/707f9ec91cf95a70db86c6dc519d0c4ad869a9c0) [@jin0209](https://github.com/jin0209)
+ - Footer [[15036a7]](https://github.com/Tencent/tdesign-miniprogram/commit/15036a75f47244fb859f067309a8a8288b4b606d) [@jin0209](https://github.com/jin0209)
+ - Divider [[4cad692]](https://github.com/Tencent/tdesign-miniprogram/commit/4cad69212ab4d71fc84014a82a43440ac9c47592) [@jin0209](https://github.com/jin0209)
+ - Avatar [[b7ef036]](https://github.com/Tencent/tdesign-miniprogram/commit/b7ef036106a662275941c4217c4e870a2460736f) [@jin0209](https://github.com/jin0209)
+ - Badge [[154a087]](https://github.com/Tencent/tdesign-miniprogram/commit/154a0870f8565f42168990af207051b0c2e427d4) [@jin0209](https://github.com/jin0209)
+ - Indexes [[bf0ae0]](https://github.com/Tencent/tdesign-miniprogram/commit/bf0ae05dc0f419aa0a50904f0d22221f67526b18) [@jin0209](https://github.com/jin0209)
+ - Input [[6201113]](https://github.com/Tencent/tdesign-miniprogram/commit/6201113a3a7d114b75ca7813ac4c6cb74ccbbf1f) [@JJunYang](https://github.com/JJunYang)
+ - Checkbox [[6bf8fc8]](https://github.com/Tencent/tdesign-miniprogram/commit/6bf8fc8c49abf9084c4f968374896ae63270c0a7) [@JJunYang](https://github.com/JJunYang)
+- Tabs: 移除 `click` 事件 [[5973c8a]](https://github.com/Tencent/tdesign-miniprogram/commit/5973c8a76e18fe68bfba81a26ff78a30f11cd5eb) [@JJunYang](https://github.com/JJunYang)
+
+### Bug Fixes
+
+- Icon: 修复没有垂直居中的问题 [[97e1b7f]](https://github.com/Tencent/tdesign-miniprogram/commit/97e1b7f86cb406e49fc73f154a90a1107ddb17e3) [@LeeJim](https://github.com/LeeJim)
+- Rate: 修复展示错乱的问题 [[8c5fe61]](https://github.com/Tencent/tdesign-miniprogram/commit/8c5fe61d4fe00ffe86996743414a738d6e8b2407) [@LeeJim](https://github.com/LeeJim)
+- Tabs: 修复初始化时触发 `change` 的问题 [[1411217]](https://github.com/Tencent/tdesign-miniprogram/commit/141121785f6d7ca2458425aa5fcf10d2419ec248) [@JJunYang](https://github.com/JJunYang)
+
+### Feature
+
+- Tag: 支持不同尺寸的 `icon` [[574cc3c]](https://github.com/Tencent/tdesign-miniprogram/commit/6eee831f4308d205cc2e7187886909922) [@LeeJim](https://github.com/LeeJim)
+
+## 0.1.0-alpha.1 `2021-12-8`
+
+### Bug Fixes
+
+- Swiper: 修复无法切换的问题
+- Picker: 修复默认按钮没显示的问题
+
+## 0.1.0 (2021-11-25)
+
+### BREAKING CHANGES
+
+- Badege: 属性 `visible` 更名为 `showZero`
+- Steps: 属性 `direction` 更名为 `layout`
+
+### Bug Fixes
+
+- DateTimePicker: 修复初始值为空时,取消筛选的问题
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 42f910ad2..bd64d085a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -54,14 +54,14 @@ npm start
此时会同时启动 `dist` 与 `example` 的构建服务,对应的开发路径与构建路径分别为:
- `src` -> `miniprogram_dist`
-- `example` -> `_example`
+- `src/*/_exmaple` -> `example` -> `_example`
使用微信开发者工具导入项目 `_example` 文件夹
### 组件开发
- 在 `src` 路径下创建组件文件夹及对应的 `wxml` `ts` `json` `md` 文件
-- 在 `example/pages` 路径下创建组件示例页面,路由路径规范未`pages/${组件名}/${组件名}`,例如 `pages/button/button`
+- 在文件夹内创建 `_example`,路径下创建组件示例页面,路由路径规范为 `src/${组件名}/_example/${组件名}`,例如 `src/button/_example/button`。代码最终会拷贝到 `example/${组件名}/${组件名}` 目录。
- 进行组件开发与示例页开发
### 官方文档开发
diff --git a/README.md b/README.md
index 8da1cd767..276da27d2 100644
--- a/README.md
+++ b/README.md
@@ -9,37 +9,61 @@
-
-
+
+
-
-
+
+
[TDesign](https://github.com/Tencent/tdesign) 适配微信小程序的组件库。
+---
+title: QQ MiniProgram
+description: TDesign QQ小程序组件库。
+spline: explain
+---
+
+
+
+ 目前组件库处于 Alpha 阶段,快速迭代中,请留意版本变化。
+
+
## 预览
-小程序组件示例小程序,请使用微信扫码预览 ↓
+小程序组件示例小程序,请使用QQ扫码预览 ↓
-
+
+
+## 使用之前
+
+使用前,请确保你已经学习过QQ官方的 [开发教程](https://q.qq.com/wiki/develop/miniprogram/frame/) 和 [自定义组件介绍](https://q.qq.com/wiki/develop/miniprogram/frame/diy_components/)。
## 安装
### 使用 NPM
-小程序已经支持使用 NPM 安装第三方包。
+小程序已经支持使用 NPM 安装第三方包,详见 [NPM 支持](https://q.qq.com/wiki/cloud/guide/functions/npm.html)
-具体使用方式,可以参考小程序官网文档: [《NPM 支持》](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm)
+```bash
+npm i tdesign-qq-miniprogram -S --production
+```
+
+> 安装完之后,需要在QQ开发者工具中对 npm 进行构建:`工具 - 构建 npm`
+
+### 通过 Git Clone
+
+克隆到源代码之后,切换到 `qq` 分支, 然后将 `tdesign-qq-miniprogram` 目录拷贝到自己的项目中
```bash
-npm i tdesign-miniprogram -S --production
+git clone git@github.com:Tencent/tdesign-miniprogram.git
```
-> 建议使用 NPM,不再推荐“源码拷贝的方式”
## 使用组件
@@ -48,11 +72,17 @@ npm i tdesign-miniprogram -S --production
```json
{
"usingComponents": {
- "t-button": "tdesign-miniprogram/button/button"
+ "t-button": "/path/to/tdesign-qq-miniprogram/dist/button/index"
}
}
```
+接着就可以在 wxml 或 qml 中直接使用组件
+
+```html
+按钮
+```
+
## 在开发者工具中预览
```bash
@@ -60,54 +90,14 @@ npm i tdesign-miniprogram -S --production
npm install
# 执行组件编译
-npm run dev
+npm run dev:qq
```
-打开[微信开发者工具](https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html),把 `_example` 目录添加进去就可以预览示例了。
+打开[QQ开发者工具](https://q.qq.com/wiki/tools/devtool/),把`_example`目录添加进去就可以预览示例了。
## 基础库版本
-最低基础库版本`^2.6.5`
-
-## 仓库
-
-TDesign 是一个 `multi-repo`, TDesign 有如下代码仓库:
-
-### 桌面端组件库
-
-| 仓库 | 描述 | 状态 |
-| --------------------------------------------------------------- | -------------------- | -------- |
-| [tdesign-vue](https://github.com/Tencent/tdesign-vue) | Vue 2.x 技术栈 | `Beta` |
-| [tdesign-vue-next](https://github.com/Tencent/tdesign-vue-next) | Vue 3.x 技术栈 | `Alpha` |
-| [tdesign-react](https://github.com/Tencent/tdesign-react) | React 16.x 技术栈 | `Alpha` |
-| tdesign-angular | 基于 Angular 10 实现 | `待上线` |
-
-### 移动端组件库
-
-| 仓库 | 描述 | 状态 |
-| --------------------------------------------------------------------- | ----------------- | -------- |
-| [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram) | 微信小程序 | `Alpha` |
-| [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue) | Vue 3.x 技术栈 | `Alpha` |
-| tdesign-mobile-react | React 16.x 技术栈 | `待上线` |
-| tdesign-flutter | 1.17.0 | `待上线` |
-
-### 基础通用仓库
-
-| 仓库 | 描述 |
-| ----------------------------------------------------------- | -------------------- |
-| [tdesign](https://github.com/Tencent/tdesign) | TDesign 主仓库和文档 |
-| [tdesign-icons](https://github.com/Tencent/tdesign-icons) | TDesign 公共图标 |
-| [tdesign-common](https://github.com/Tencent/tdesign-common) | TDesign 公共样式 |
-
-### 解决方案及周边
-
-| 仓库 | 描述 |
-| ------------------------------------------------------------------------------- | -------------------------------- |
-| [tdesign-starter-cli](https://github.com/Tencent/tdesign-starter-cli) | TDesign 解决方案的脚手架 |
-| [tdesign-vue-starter](https://github.com/Tencent/tdesign-vue-starter) | 基于 tdesign-vue 的解决方案 |
-| [tdesign-vue-next-starter](https://github.com/Tencent/tdesign-vue-next-starter) | 基于 tdesign-vue-next 的解决方案 |
-| [tdesign-react-starter](https://github.com/Tencent/tdesign-react-starter) | 基于 tdesign-react 的解决方案 |
-| [tdesign-miniprogram-starter-retail](https://github.com/Tencent/tdesign-miniprogram-starter-retail) | 基于 tdesign-miniprogram 的零售行业解决方案 |
+最低基础库版本`^1.1.7`
## 开源协议
diff --git a/USED.md b/USED.md
index 48182f153..613cf1a5b 100644
--- a/USED.md
+++ b/USED.md
@@ -8,54 +8,70 @@ spline: explain
目前已上线 400+个小程序,部分小程序二维码如下
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
diff --git a/babel.config.js b/babel.config.js
index ee8946385..dd4e3d695 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,4 +1,8 @@
// babel.config.js
module.exports = {
presets: [['@babel/preset-env', { targets: { node: 'current' } }], '@babel/preset-typescript'],
+ plugins: [
+ ['@babel/plugin-proposal-decorators', { legacy: true }],
+ ['@babel/plugin-proposal-class-properties', { loose: true }],
+ ],
};
diff --git a/example/README.md b/example/README.md
deleted file mode 100644
index a4341fcae..000000000
--- a/example/README.md
+++ /dev/null
@@ -1,119 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-[TDesign](https://github.com/Tencent/tdesign) 适配微信小程序的组件库。
-
-## 预览
-
-小程序组件示例小程序,请使用微信扫码预览 ↓
-
-
-

-
-## 安装
-
-### 使用 NPM
-
-小程序已经支持使用 NPM 安装第三方包。
-
-具体使用方式,可以参考小程序官网文档: [《NPM 支持》](https://developers.weixin.qq.com/miniprogram/dev/devtools/npm.html?search-key=npm)
-
-```bash
-npm i tdesign-miniprogram -S --production
-```
-
-> 建议使用 NPM,不再推荐“源码拷贝的方式”
-
-## 使用组件
-
-以按钮组件为例,只需要在 `JSON` 文件中引入按钮对应的自定义组件即可
-
-```json
-{
- "usingComponents": {
- "t-button": "tdesign-miniprogram/button/button"
- }
-}
-```
-
-## 在开发者工具中预览
-
-```bash
-# 安装项目依赖
-npm install
-
-# 执行组件编译
-npm run dev
-```
-
-打开[微信开发者工具](https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/download.html),把 `_example` 目录添加进去就可以预览示例了。
-
-## 基础库版本
-
-最低基础库版本`^2.6.5`
-
-## 反馈&共建
-
-目前TDesign 小程序组件库已在[ github ](https://github.com/Tencent/tdesign-miniprogram)上开源,欢迎大家反馈问题和参与共建:
-

-
-## 仓库
-
-TDesign 是一个 `multi-repo`, TDesign 有如下代码仓库:
-
-### 桌面端组件库
-
-| 仓库 | 描述 | 状态 |
-| --------------------------------------------------------------- | -------------------- | -------- |
-| [tdesign-vue](https://github.com/Tencent/tdesign-vue) | Vue 2.x 技术栈 | `Beta` |
-| [tdesign-vue-next](https://github.com/Tencent/tdesign-vue-next) | Vue 3.x 技术栈 | `Alpha` |
-| [tdesign-react](https://github.com/Tencent/tdesign-react) | React 16.x 技术栈 | `Alpha` |
-| tdesign-angular | 基于 Angular 10 实现 | `待上线` |
-
-### 移动端组件库
-
-| 仓库 | 描述 | 状态 |
-| --------------------------------------------------------------------- | ----------------- | -------- |
-| [tdesign-miniprogram](https://github.com/Tencent/tdesign-miniprogram) | 微信小程序 | `Alpha` |
-| [tdesign-mobile-vue](https://github.com/Tencent/tdesign-mobile-vue) | Vue 3.x 技术栈 | `Alpha` |
-| tdesign-mobile-react | React 16.x 技术栈 | `待上线` |
-| tdesign-flutter | 1.17.0 | `待上线` |
-
-### 基础通用仓库
-
-| 仓库 | 描述 |
-| ----------------------------------------------------------- | -------------------- |
-| [tdesign](https://github.com/Tencent/tdesign) | TDesign 主仓库和文档 |
-| [tdesign-icons](https://github.com/Tencent/tdesign-icons) | TDesign 公共图标 |
-| [tdesign-common](https://github.com/Tencent/tdesign-common) | TDesign 公共样式 |
-
-### 解决方案及周边
-
-| 仓库 | 描述 |
-| --------------------------------------------------------------------------------------------------- | ------------------------------------------- |
-| [tdesign-starter-cli](https://github.com/Tencent/tdesign-starter-cli) | TDesign 解决方案的脚手架 |
-| [tdesign-vue-starter](https://github.com/Tencent/tdesign-vue-starter) | 基于 tdesign-vue 的解决方案 |
-| [tdesign-vue-next-starter](https://github.com/Tencent/tdesign-vue-next-starter) | 基于 tdesign-vue-next 的解决方案 |
-| [tdesign-react-starter](https://github.com/Tencent/tdesign-react-starter) | 基于 tdesign-react 的解决方案 |
-| [tdesign-miniprogram-starter-retail](https://github.com/Tencent/tdesign-miniprogram-starter-retail) | 基于 tdesign-miniprogram 的零售行业解决方案 |
-
-
-## 开源协议
-
-TDesign 遵循 [MIT 协议](https://github.com/Tencent/tdesign-miniprogram/LICENSE)。
diff --git a/example/app.json b/example/app.json
index bde31dc6f..205142546 100644
--- a/example/app.json
+++ b/example/app.json
@@ -1,17 +1,12 @@
{
"pages": [
"pages/home/home",
- "pages/picker/picker",
- "pages/avatar/avatar",
"pages/button/button",
- "pages/button-group/button-group",
- "pages/dialog/dialog",
"pages/tabs/tabs",
"pages/icon/icon",
"pages/loading/loading",
- "pages/loading/loadingProgress/loadingProgress",
- "pages/rate/rate",
"pages/progress/progress",
+ "pages/cascader/cascader",
"pages/cell/cell",
"pages/cell-group/cell-group",
"pages/collapse/collapse",
@@ -20,12 +15,9 @@
"pages/textarea/textarea",
"pages/message/message",
"pages/toast/toast",
- "pages/segmented-control/segmented-control",
"pages/stepper/stepper",
"pages/slider/slider",
"pages/radio/radio",
- "pages/swipe-cell/swipe-cell",
- "pages/swiper/swiper",
"pages/switch/switch",
"pages/sticky/sticky",
"pages/tag/tag",
@@ -35,8 +27,6 @@
"pages/tab-bar/tab-bar",
"pages/transition/transition",
"pages/popup/popup",
- "pages/indexes/indexes",
- "pages/indexes/display",
"pages/steps/steps",
"pages/dropdown-menu/dropdown-menu",
"pages/drawer/drawer",
@@ -45,85 +35,73 @@
"pages/footer/footer",
"pages/divider/divider",
"pages/empty/empty",
- "pages/empty/empty-page",
"pages/back-top/back-top",
"pages/grid/grid",
"pages/upload/upload",
"pages/count-down/count-down",
+ "pages/overlay/overlay",
"pages/image/image",
"pages/search/search",
"pages/home/navigateFail/navigateFail",
"pages/navbar/navbar",
"pages/date-time-picker/date-time-picker",
- "pages/action-sheet/action-sheet",
- "pages/notice-bar/notice-bar"
+ "pages/notice-bar/notice-bar",
+ "pages/image-viewer/image-viewer",
+ "pages/result/result",
+ "pages/result/result-page",
+ "pages/link/link",
+ "pages/col/col"
+ ],
+ "subpackages": [
+ {
+ "root": "pages/side-bar/",
+ "pages": ["side-bar", "base/index", "switch/index", "custom/index", "with-icon/index"]
+ },
+ {
+ "root": "pages/action-sheet/",
+ "pages": ["action-sheet"]
+ },
+ {
+ "root": "pages/avatar/",
+ "pages": ["avatar"]
+ },
+ {
+ "root": "pages/calendar/",
+ "pages": ["calendar"]
+ },
+ {
+ "root": "pages/dialog/",
+ "pages": ["dialog"]
+ },
+ {
+ "root": "pages/picker/",
+ "pages": ["picker"]
+ },
+ {
+ "root": "pages/rate/",
+ "pages": ["rate"]
+ },
+ {
+ "root": "pages/swiper/",
+ "pages": ["swiper"]
+ },
+ {
+ "root": "pages/swipe-cell/",
+ "pages": ["swipe-cell"]
+ },
+ {
+ "root": "pages/tree-select/",
+ "pages": ["tree-select"]
+ },
+ {
+ "root": "pages/indexes/",
+ "pages": ["indexes", "base/index", "custom/index"]
+ }
],
"usingComponents": {
- "t-demo": "../../components/demo-block/index",
- "t-avatar": "tdesign-miniprogram/avatar/avatar",
- "t-avatar-group": "tdesign-miniprogram/avatar/avatar-group",
- "t-badge": "tdesign-miniprogram/badge/badge",
+ "t-demo": "./components/demo-block/index",
"t-button": "tdesign-miniprogram/button/button",
- "t-cell": "tdesign-miniprogram/cell/cell",
- "t-cell-group": "tdesign-miniprogram/cell-group/cell-group",
- "t-collapse": "tdesign-miniprogram/collapse/collapse",
- "t-collapse-panel": "tdesign-miniprogram/collapse/collapse-panel",
- "t-dialog": "tdesign-miniprogram/dialog/dialog",
- "t-tabs": "tdesign-miniprogram/tabs/tabs",
- "t-tab-panel": "tdesign-miniprogram/tabs/tab-panel",
- "t-loading": "tdesign-miniprogram/loading/loading",
- "t-button-group": "tdesign-miniprogram/button-group/button-group",
- "t-icon": "tdesign-miniprogram/icon/icon",
- "t-rate": "tdesign-miniprogram/rate/rate",
- "t-picker": "tdesign-miniprogram/picker/picker",
- "t-picker-item": "tdesign-miniprogram/picker/picker-item",
- "t-progress": "tdesign-miniprogram/progress/progress",
- "t-input": "tdesign-miniprogram/input/input",
- "t-textarea": "tdesign-miniprogram/textarea/textarea",
- "t-message": "tdesign-miniprogram/message/message",
- "t-toast": "tdesign-miniprogram/toast/toast",
- "t-segmented-control": "tdesign-miniprogram/segmented-control/segmented-control",
- "t-stepper": "tdesign-miniprogram/stepper/stepper",
- "t-slider": "tdesign-miniprogram/slider/slider",
- "t-tag": "tdesign-miniprogram/tag/tag",
- "t-radio": "tdesign-miniprogram/radio/radio",
- "t-radio-group": "tdesign-miniprogram/radio-group/radio-group",
- "t-check-tag": "tdesign-miniprogram/tag/check-tag",
- "t-checkbox": "tdesign-miniprogram/checkbox/checkbox",
- "t-checkbox-group": "tdesign-miniprogram/checkbox-group/checkbox-group",
- "t-swipe-cell": "tdesign-miniprogram/swipe-cell/swipe-cell",
- "t-swiper": "tdesign-miniprogram/swiper/swiper",
- "t-swiper-item": "tdesign-miniprogram/swiper/swiper-item",
- "t-swiper-nav": "tdesign-miniprogram/swiper/swiper-nav",
- "t-switch": "tdesign-miniprogram/switch/switch",
- "t-sticky": "tdesign-miniprogram/sticky/sticky",
- "t-fab": "tdesign-miniprogram/fab/fab",
- "t-tab-bar": "tdesign-miniprogram/tab-bar/tab-bar",
- "t-tab-bar-item": "tdesign-miniprogram/tab-bar/tab-bar-item",
- "t-transition": "tdesign-miniprogram/transition/transition",
- "t-popup": "tdesign-miniprogram/popup/popup",
- "t-indexes": "tdesign-miniprogram/indexes/indexes",
- "t-steps": "tdesign-miniprogram/steps/steps",
- "t-step-item": "tdesign-miniprogram/steps/step-item",
- "t-dropdown-menu": "tdesign-miniprogram/dropdown-menu/dropdown-menu",
- "t-dropdown-item": "tdesign-miniprogram/dropdown-menu/dropdown-item",
- "t-drawer": "tdesign-miniprogram/drawer/drawer",
- "t-pull-down-refresh": "tdesign-miniprogram/pull-down-refresh/pull-down-refresh",
- "t-skeleton": "tdesign-miniprogram/skeleton/skeleton",
- "t-footer": "tdesign-miniprogram/footer/footer",
- "t-divider": "tdesign-miniprogram/divider/divider",
- "t-empty": "tdesign-miniprogram/empty/empty",
- "t-back-top": "tdesign-miniprogram/back-top/back-top",
- "t-grid-item": "tdesign-miniprogram/grid/grid-item",
- "t-grid": "tdesign-miniprogram/grid/grid",
- "t-upload": "tdesign-miniprogram/upload/upload",
- "t-count-down": "tdesign-miniprogram/count-down/count-down",
- "t-image": "tdesign-miniprogram/image/image",
- "t-search": "tdesign-miniprogram/search/search",
- "t-navbar": "tdesign-miniprogram/navbar/navbar",
- "t-date-time-picker": "tdesign-miniprogram/date-time-picker/date-time-picker",
- "t-action-sheet": "tdesign-miniprogram/action-sheet/action-sheet",
- "t-notice-bar": "tdesign-miniprogram/notice-bar/notice-bar"
+ "t-icon": "tdesign-miniprogram/icon/icon"
},
"window": {
"backgroundTextStyle": "light",
diff --git a/example/app.less b/example/app.less
index 7775c1640..05b867769 100644
--- a/example/app.less
+++ b/example/app.less
@@ -1,3 +1,5 @@
+@import '../src/common/style/_variables.less';
+
page {
background: #f6f6f6; // 和设计师确认过,统一改成这个颜色
}
@@ -8,54 +10,17 @@ page {
// padding-bottom: constant(safe-area-inset-bottom, 28px);
&-title {
- font-size: 40rpx;
+ font-size: 48rpx;
font-weight: 700;
- line-height: 56rpx;
+ line-height: 64rpx;
margin: 48rpx 32rpx 0;
- color: rgba(0, 0, 0, .9);
+ color: @font-gray-1;
}
&-desc {
- font-size: 24rpx;
- color: #999;
- margin: 8rpx 32rpx;
- line-height: 36rpx;
- }
-
- &-section {
- margin-top: 56rpx;
-
- &__title {
- font-size: 32rpx;
- margin: 32rpx 32rpx 0;
- color: rgba(0, 0, 0, .9);
- line-height: 48rpx;
- }
-
- &__sub-title {
- font-size: 28rpx;
- margin: 32rpx 32rpx 24rpx 32rpx;
- color: rgba(0, 0, 0, .9);
- line-height: 44rpx;
- }
-
- &__desc {
- font-size: 24rpx;
- color: rgba(0, 0, 0, .4);
- margin: 8rpx 32rpx;
- line-height: 40rpx;
- }
-
- &__container {
- padding: 0 32rpx;
- }
-
- .button-group {
- margin: 56rrpx 0rpx;
- }
-
- .button-group-item {
- margin-bottom: 48rrpx;
- }
+ font-size: 28rpx;
+ color: @font-gray-2;
+ margin: 16rpx 32rpx 0;
+ line-height: 44rpx;
}
}
diff --git a/example/components/demo-block/index.less b/example/components/demo-block/index.less
index ec12b6c8b..8295155a2 100644
--- a/example/components/demo-block/index.less
+++ b/example/components/demo-block/index.less
@@ -1,23 +1,24 @@
@import '../../../src/common/style/_variables.less';
.demo-block {
- margin: @spacer-3 0 0;
- line-height: @text-line-height;
- font-size: @font-size-m;
+ margin: @spacer-4 0 0;
- &__heander {
- color: @text-level-1-color;
- margin: @spacer @spacer-2;
+ &__header {
+ color: #000;
+ margin: 0 @spacer-2;
&-title {
font-weight: 700;
+ font-size: 36rpx;
+ line-height: 52rpx;
}
&-desc {
- margin: @spacer 0 @spacer-2;
- font-size: @font-size-s;
+ margin-top: @spacer;
+ font-size: @font-size-base;
white-space: pre-line;
- opacity: 0.4;
+ color: @font-gray-2;
+ line-height: 22px;
}
}
@@ -40,7 +41,7 @@
margin-top: @spacer-2;
&.with-padding {
- margin: 0 @spacer-2;
+ margin: @spacer-2 @spacer-2 0;
}
}
}
@@ -49,6 +50,6 @@
margin-top: 0px;
.demo-block_subtitle {
- margin-top: 32rpx;
+ margin-top: @spacer-3;
}
}
diff --git a/example/components/demo-block/index.wxml b/example/components/demo-block/index.wxml
index b9dcc1afb..ff89daad8 100644
--- a/example/components/demo-block/index.wxml
+++ b/example/components/demo-block/index.wxml
@@ -1,21 +1,13 @@
-
- {{ title }}
- {{ desc }}
+
{{ operItem.title }}
-
+
{{ btnItem.text }}
diff --git a/example/components/pull-down-list/index.wxml b/example/components/pull-down-list/index.wxml
index a7a375161..cf58f3b70 100644
--- a/example/components/pull-down-list/index.wxml
+++ b/example/components/pull-down-list/index.wxml
@@ -1,12 +1,12 @@
-
+
{{ name }}
-
+
-
-
+
+
{{ item.name }} {{ item.label }}
-
+
diff --git a/example/pages/action-sheet/action-sheet.json b/example/pages/action-sheet/action-sheet.json
deleted file mode 100644
index 87ad06d65..000000000
--- a/example/pages/action-sheet/action-sheet.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "navigationBarTitleText": "ActionSheet",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index",
- "t-toast": "tdesign-miniprogram/toast/toast"
- }
-}
diff --git a/example/pages/action-sheet/action-sheet.less b/example/pages/action-sheet/action-sheet.less
deleted file mode 100644
index 6b7f96b49..000000000
--- a/example/pages/action-sheet/action-sheet.less
+++ /dev/null
@@ -1,62 +0,0 @@
-.action-sheet {
- background-color: #fff;
- font-size: 32rpx;
- line-height: 48rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 48rpx 0rpx 96rpx 0rpx;
- height: 100vh;
-
- .slot-wrap {
- background-color: #fff;
- padding: 10px;
- }
-
- .title {
- font-weight: bold;
- font-size: 40rpx;
- line-height: 56rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 0 32rpx;
- }
-
- .desc {
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- color: rgba(0, 0, 0, 0.4);
- padding: 0 32rpx;
- }
-
- .sub-title {
- margin-top: 40rpx;
- font-weight: bold;
- padding: 0 32rpx;
- }
-
- .t-button {
- width: 686rpx;
- height: 96rpx;
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 32rpx;
-
- &::after {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 200%;
- height: 200%;
- transform: scale(0.5);
- transform-origin: 0 0;
- box-sizing: border-box;
- border: 2rpx solid #dcdcdc;
- }
- }
-
- .demo-block__oper {
- padding: 0 32rpx;
- }
-}
diff --git a/example/pages/action-sheet/action-sheet.ts b/example/pages/action-sheet/action-sheet.ts
deleted file mode 100644
index eef7525ca..000000000
--- a/example/pages/action-sheet/action-sheet.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import ActionSheet from 'tdesign-miniprogram/action-sheet/index';
-import Toast from 'tdesign-miniprogram/toast/index';
-import { basicListOption, withIconListOption, grid, withSwiperGrid } from './constants';
-
-Page({
- data: {
- visible: false,
- handler: null,
- operList1: [
- {
- title: '基础动作面板',
- btns: [
- {
- type: 'list',
- text: '列表型',
- },
- {
- type: 'withIconList',
- text: '带图标列表型',
- },
- {
- type: 'grid',
- text: '宫格型',
- },
- {
- type: 'withSwiperGrid',
- text: '宫格型-多页',
- },
- ],
- },
- ],
- },
- clickHandle(e: any) {
- let handler;
- const { detail } = e;
- switch (detail) {
- case 'list':
- handler = ActionSheet.show(basicListOption);
- break;
- case 'withIconList':
- handler = ActionSheet.show(withIconListOption);
- break;
- case 'grid':
- handler = ActionSheet.show(grid);
- break;
- case 'withSwiperGrid':
- handler = ActionSheet.show(withSwiperGrid);
- break;
- default:
- break;
- }
- this.setData({
- handler,
- });
- },
- onCancelBaseImperative() {
- Toast({
- context: this,
- selector: '#t-toast',
- message: '点击取消',
- });
- this.data.handler?.close();
- },
- onSelectBaseImperative(e) {
- const {
- detail: {
- selected: { label },
- },
- } = e;
- Toast({
- context: this,
- selector: '#t-toast',
- message: `选中${label}`,
- });
- this.data.handler?.close();
- },
- onVisibleChangeBaseImperative(e) {
- const {
- detail: { visible },
- } = e;
- this.setData({
- visible,
- });
- },
-});
diff --git a/example/pages/action-sheet/action-sheet.wxml b/example/pages/action-sheet/action-sheet.wxml
deleted file mode 100644
index 897475867..000000000
--- a/example/pages/action-sheet/action-sheet.wxml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- ActionSheet 动作面板
- 底部弹起的模态面板,包含与当前情境相关的多个选项。
-
-
-
-
-
diff --git a/example/pages/action-sheet/constants.ts b/example/pages/action-sheet/constants.ts
deleted file mode 100644
index a5a696a70..000000000
--- a/example/pages/action-sheet/constants.ts
+++ /dev/null
@@ -1,195 +0,0 @@
-import { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';
-
-const singleCharItems = ['默认选项1', '默认选项2', '默认选项3'];
-
-const basicListOption = {
- theme: ActionSheetTheme.List,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '默认选项',
- },
- {
- label: '自定义选项',
- color: '#0052D9',
- },
- {
- label: '失效选项',
- disabled: true,
- },
- {
- label: '警告选项',
- color: '#e34d59',
- },
- ],
-};
-
-const withIconListOption = {
- theme: ActionSheetTheme.List,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '默认选项',
- icon: 'app',
- },
- {
- label: '自定义选项',
- icon: 'app',
- color: '#0052D9',
- },
- {
- label: '失效选项',
- disabled: true,
- icon: 'app',
- },
- {
- label: '警告选项',
- color: '#e34d59',
- icon: 'app',
- },
- ],
-};
-
-const grid = {
- theme: ActionSheetTheme.Grid,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- ],
-};
-
-const withSwiperGrid = {
- theme: ActionSheetTheme.Grid,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- ],
-};
-
-export { singleCharItems, basicListOption, withIconListOption, grid, withSwiperGrid };
diff --git a/example/pages/avatar/avatar.json b/example/pages/avatar/avatar.json
deleted file mode 100644
index 4500b03d8..000000000
--- a/example/pages/avatar/avatar.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Avatar",
- "navigationBarBackgroundColor": "#fff"
-}
\ No newline at end of file
diff --git a/example/pages/avatar/avatar.less b/example/pages/avatar/avatar.less
deleted file mode 100644
index 14fa1fbf3..000000000
--- a/example/pages/avatar/avatar.less
+++ /dev/null
@@ -1,113 +0,0 @@
-page {
- background: #fff;
-}
-
-.desc {
- margin: 10rpx 32rpx;
- color: #999;
- font-size: 26rpx;
- line-height: 36rpx;
-}
-
-.row {
- display: flex;
- width: 100%;
- margin: 20rpx 0;
-
- .avatar-example {
- text-align: center;
- font-size: 24rpx;
- display: flex;
- flex-direction: column;
-
- .avatar-word {
- margin-top: 16rpx;
- }
- }
-
- .text {
- width: 130rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
-
- .row-text {
- &-64 {
- width: 128rpx;
- }
-
- &-48 {
- width: 96rpx;
- }
-
- &-40 {
- width: 80rpx;
- }
-
- &-32 {
- width: 64rpx;
- }
-
- &-24 {
- width: 48rpx;
- }
- }
-
- .row-text-common {
- // display: flex;
- text-align: center;
- }
-
- .font-size-20 {
- font-size: 40rpx;
- }
-
- .border-size {
- &-2 {
- border: 4rpx solid #fff;
- }
-
- &-3 {
- border: 6rpx solid #fff;
- }
-
- &-4 {
- border: 8rpx solid #fff;
- }
- }
-
- .excursion-right-8 {
- margin-right: -16rpx;
- }
-
- .alt-example {
- color: #fff;
- background-color: #0052d9;
- font-weight: 400;
- }
-}
-
-.bottom-row {
- padding-bottom: 96rpx;
-}
-
-.gutter-column-12 {
- width: 24rpx;
- display: inline-block;
-}
-
-.gutter-column-24 {
- width: 48rpx;
- display: inline-block;
-}
-
-.gutter-column-32 {
- width: 64rpx;
- display: inline-block;
-}
-
-.gutter-column-64 {
- width: 128rpx;
- display: inline-block;
-}
diff --git a/example/pages/avatar/avatar.ts b/example/pages/avatar/avatar.ts
deleted file mode 100644
index 4d50602ad..000000000
--- a/example/pages/avatar/avatar.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-Page({
- data: {
- pics6: [
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/1.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/2.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/3.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/4.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/5.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/1.png',
- ],
- },
- onAddTap() {
- wx.showToast({ title: '您按下了添加', icon: 'none', duration: 1000 });
- },
-});
diff --git a/example/pages/avatar/avatar.wxml b/example/pages/avatar/avatar.wxml
deleted file mode 100644
index dc950896b..000000000
--- a/example/pages/avatar/avatar.wxml
+++ /dev/null
@@ -1,222 +0,0 @@
-Avatar 头像
-用于展示用户头像信息,除了纯展示也可点击进入个人详情等操作。
-
-
-
-
-
- 默认
-
-
-
-
- 用户
-
-
-
-
- 圆形
-
-
-
-
- 方形
-
-
-
- A
- 自定义文字
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- L
-
- M
-
- S
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A
-
-
-
- A
-
-
-
- A
-
-
-
-
diff --git a/example/pages/back-top/api.md b/example/pages/back-top/api.md
deleted file mode 100644
index f30a679a0..000000000
--- a/example/pages/back-top/api.md
+++ /dev/null
@@ -1,15 +0,0 @@
-### BackTop Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| ----- | ------- | --------- | ------------------------------------------------------------------- | ---- |
-| fixed | Boolean | true | 是否绝对定位固定到屏幕右下方 | N |
-| icon | String | 'backtop' | 图标 | N |
-| show | Boolean | false | 是否显示组件 | N |
-| text | String | '' | 文案 | N |
-| type | String | round | 预设的样式类型。可选值:round/half-round/round-dark/half-round-dark | N |
-
-### BackTop Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ---- | -------- |
-| to-top | - | 点击触发 |
diff --git a/example/pages/back-top/back-top.json b/example/pages/back-top/back-top.json
deleted file mode 100644
index f8daf81c9..000000000
--- a/example/pages/back-top/back-top.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Back top",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/back-top/back-top.less b/example/pages/back-top/back-top.less
deleted file mode 100644
index e44fb4c9d..000000000
--- a/example/pages/back-top/back-top.less
+++ /dev/null
@@ -1,34 +0,0 @@
-page {
- background: #fff;
-
- .button-group {
- margin-top: 32rpx;
-
- &-item {
- margin: 0 32rpx 32rpx;
-
- .t-class-button {
- font-size: 32rpx;
- }
- }
- }
-
- .flex {
- display: flex;
- }
-
- .skeleton-text {
- border-radius: 16rpx;
- }
-
- .skeleton-item {
- padding-bottom: 24rpx;
- }
-
- .container-flex {
- display: flex;
- justify-content: space-between;
- margin: 32rpx;
- flex-wrap: wrap;
- }
-}
diff --git a/example/pages/back-top/back-top.ts b/example/pages/back-top/back-top.ts
deleted file mode 100644
index 1b9c47e1a..000000000
--- a/example/pages/back-top/back-top.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-const backTopDemos = [
- { text: '顶部', theme: 'round' },
- { text: '顶部', theme: 'round-dark' },
- { text: '', theme: 'round' },
- { text: '', theme: 'round-dark' },
- { text: '返回顶部', theme: 'half-round' },
- { text: '返回顶部', theme: 'half-round-dark' },
-];
-
-Page({
- /**
- * 页面的初始数据
- */
- data: {
- backTopDemo: backTopDemos[0],
- showBackTop: false,
- skeleton: {
- rowWidth: ['340rpx', '340rpx', '218rpx', '190rpx'],
- rowHeight: ['342rpx', '32rpx', '32rpx', '32rpx'],
- },
- rowCol3: [
- { width: '332rpx', height: '342rpx' },
- { width: '332rpx', height: '32rpx' },
- { width: '214rpx', height: '32rpx' },
- [
- { width: '186rpx', height: '32rpx' },
- { width: '64rpx', height: '32rpx', marginLeft: '82rpx' },
- ],
- ],
- },
-
- windowHeight: null as null | number,
-
- onPageScroll(e) {
- if (!this.windowHeight) {
- this.windowHeight = wx.getSystemInfoSync().windowHeight;
- }
- const isShowBackTop = e.scrollTop > this.windowHeight;
- if (isShowBackTop !== this.data.showBackTop) {
- this.setData({ showBackTop: isShowBackTop });
- }
- },
-
- onBtnClick(e: any) {
- const index = e.currentTarget.dataset.index as number;
- this.setData({ backTopDemo: backTopDemos[index] });
- wx.pageScrollTo({ duration: 300, scrollTop: 1000 });
- },
-});
diff --git a/example/pages/back-top/back-top.wxml b/example/pages/back-top/back-top.wxml
deleted file mode 100644
index 343e0a605..000000000
--- a/example/pages/back-top/back-top.wxml
+++ /dev/null
@@ -1,134 +0,0 @@
-
- BackTop 返回顶部
- 用于当页面过长往下滑动时,帮助用户快速回到页面顶部。
-
-
- 圆型返回顶部
-
-
-
- 圆白底
-
-
-
-
- 圆黑底
-
-
-
-
- 圆白底纯图标
-
-
-
-
- 圆黑底纯图标
-
-
-
-
- 半圆型返回顶部
-
-
-
- 半圆白底
-
-
-
-
- 半圆黑底
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/badge/badge.json b/example/pages/badge/badge.json
deleted file mode 100644
index 091ed5337..000000000
--- a/example/pages/badge/badge.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Badge 徽标"
-}
diff --git a/example/pages/badge/badge.less b/example/pages/badge/badge.less
deleted file mode 100644
index 1ce9f077a..000000000
--- a/example/pages/badge/badge.less
+++ /dev/null
@@ -1,32 +0,0 @@
-.cell-badge {
- margin-left: 16rpx;
-}
-
-.cell-badge-wrap {
- padding-bottom: 8rpx;
-}
-
-.demo-grid {
- display: grid;
- margin: 32rpx 32rpx 0rpx;
- grid-template-columns: repeat(4, 1fr);
- grid-auto-rows: 92rpx;
-}
-
-.size-mini {
- width: 120rpx;
- height: 60rpx !important;
-}
-
-.tab-bar-wrapper {
- padding-top: 12rpx;
- &::after {
- content: '';
- position: absolute;
- top: -34px;
- left: 16px;
- line-height: 20px;
- color: rgba(0, 0, 0, 0.4);
- font-size: 12px;
- }
-}
diff --git a/example/pages/badge/badge.wxml b/example/pages/badge/badge.wxml
deleted file mode 100644
index 02d773e44..000000000
--- a/example/pages/badge/badge.wxml
+++ /dev/null
@@ -1,59 +0,0 @@
-Badge 徽标
-用于告知用户,该区域的状态变化或者待处理任务的数量。
-
-
-
-
-
- 消息
-
-
- 消息
-
-
- 小按钮
-
-
- 小按钮
-
-
- 小按钮
-
-
- 小按钮
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文字
- 文字
- 文字
-
- 文字
-
-
-
diff --git a/example/pages/button-group/button-group.json b/example/pages/button-group/button-group.json
deleted file mode 100644
index 19cdfeef4..000000000
--- a/example/pages/button-group/button-group.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "ButtonGroup 按钮组"
-}
diff --git a/example/pages/button-group/button-group.wxml b/example/pages/button-group/button-group.wxml
deleted file mode 100644
index b865d5ecd..000000000
--- a/example/pages/button-group/button-group.wxml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- 置底按钮
- 置底按钮
-
-
- 置底按钮
- 置底按钮
-
-
-
-
- 置底按钮
- 置底按钮
- 置底按钮
-
-
- 置底按钮
- 置底按钮
- 置底按钮
-
-
-
diff --git a/example/pages/button/button.json b/example/pages/button/button.json
deleted file mode 100644
index a3c6d69af..000000000
--- a/example/pages/button/button.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Button 按钮",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/button/button.less b/example/pages/button/button.less
deleted file mode 100644
index 3c52f30c3..000000000
--- a/example/pages/button/button.less
+++ /dev/null
@@ -1,37 +0,0 @@
-.demo {
- .t-button {
- margin-top: 32rpx;
- }
-
- .full-width {
- background: rgba(0, 0, 0, 0.4);
- padding: 8px 0;
- margin-top: 16px;
-
- .t-button {
- margin-top: 0;
- }
- }
-
- .no-border {
- border: 0;
- }
-
- .no-border-radius {
- border-radius: 0;
- }
-
- .content-margin-right {
- margin-right: 32rpx;
- }
-
- .box {
- margin: 0 32rpx;
- }
-
- .align-bottom {
- display: flex;
- flex-direction: row;
- align-items: flex-end;
- }
-}
diff --git a/example/pages/button/button.wxml b/example/pages/button/button.wxml
deleted file mode 100644
index 0a4a49374..000000000
--- a/example/pages/button/button.wxml
+++ /dev/null
@@ -1,119 +0,0 @@
-
- Button 按钮
- 用于开启一个闭环的操作任务,如“删除”对象、“购买”商品等。
-
- 基础按钮
-
- 强按钮
- 弱按钮
- 次按钮
- 强告警按钮
- 弱告警按钮
- 带图标按钮
-
-
-
-
- 幽灵按钮
-
-
-
-
- 文字按钮
-
- 通栏按钮
-
- 次按钮
- 主按钮
-
-
-
-
-
- 带图标按钮
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
-
-
- 按钮禁用态
-
- 强按钮
- 弱按钮
- 次按钮
- 强告警按钮
- 弱告警按钮
- 带图标按钮
-
-
-
-
- 幽灵按钮
-
-
-
-
- 文字按钮
-
-
- 通栏按钮
-
- 次按钮
- 主按钮
-
-
-
-
-
- 带图标按钮
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
-
-
- 按钮尺寸
-
- 按钮 44
- 按钮 40
- 按钮 36
-
-
-
- 按钮
- 按钮
- 按钮
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/cell-group/cell-group.json b/example/pages/cell-group/cell-group.json
deleted file mode 100644
index 53282121e..000000000
--- a/example/pages/cell-group/cell-group.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "cell-group 组合单元格",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/cell/api.md b/example/pages/cell/api.md
deleted file mode 100644
index 4f0d19cb4..000000000
--- a/example/pages/cell/api.md
+++ /dev/null
@@ -1,24 +0,0 @@
-### Cell Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | ------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
-| align | String | middle | 内容的对齐方式,默认居中对齐。可选值:top/middle/bottom | N |
-| arrow | Boolean | false | 是否显示右侧箭头 | N |
-| bordered | Boolean | true | 是否显示下边框 | N |
-| description | String / Slot | - | 下方内容描述。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| externalClasses | Array | - | 组件类名,分别用于设置 组件外层类名、标题类名、右侧说明文字类名、下方描述内容类名、图片类名、激活态类名、左侧图标类名、右侧图标类名 等。`['t-class', 't-class-title', 't-class-note', 't-class-description', 't-class-thumb', 't-class-hover', 't-class-left', 't-class-right']` | N |
-| hover | Boolean | - | 是否开启点击反馈 | N |
-| image | String / Slot | - | 主图。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| jumpType | String | navigateTo | 链接跳转类型。可选值:redirectTo/switchTab/reLaunch/navigateTo | N |
-| leftIcon | Slot | - | 左侧图标,出现在单元格标题的左侧。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| note | String / Slot | - | 和标题同行的说明文字。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| required | Boolean | false | 是否显示表单必填星号 | N |
-| rightIcon | Slot | - | 最右侧图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| title | String / Slot | - | 标题。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| url | String | - | 点击后跳转链接地址。如果值为空,则表示不需要跳转 | N |
-
-### Cell Events
-
-| 名称 | 参数 | 描述 |
-| ----- | ------------------------------ | --------------------------------------------------------------------------------------------------------------- |
-| click | `(context: { e: MouseEvent })` | 右侧内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) |
diff --git a/example/pages/cell/cell.json b/example/pages/cell/cell.json
deleted file mode 100644
index ceaf4364e..000000000
--- a/example/pages/cell/cell.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "cell 单元格",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/cell/cell.less b/example/pages/cell/cell.less
deleted file mode 100644
index 456b35ded..000000000
--- a/example/pages/cell/cell.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.demo-section__wrapper {
- margin: 32rpx 0;
-
- .t-class-left {
- align-self: flex-start;
- }
-
- .avatar {
- width: 96rpx;
- height: 96rpx;
- border-radius: 50%;
- overflow: hidden;
- }
-}
diff --git a/example/pages/cell/cell.ts b/example/pages/cell/cell.ts
deleted file mode 100644
index 31d8d3d90..000000000
--- a/example/pages/cell/cell.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-Page({
- data: {},
-});
diff --git a/example/pages/cell/cell.wxml b/example/pages/cell/cell.wxml
deleted file mode 100644
index ecedb8d3d..000000000
--- a/example/pages/cell/cell.wxml
+++ /dev/null
@@ -1,57 +0,0 @@
-
- Cell 单元格
- 用于各个类别行的信息展示。
-
- 单行
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 多行
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/checkbox/api.md b/example/pages/checkbox/api.md
deleted file mode 100644
index 20f21d40c..000000000
--- a/example/pages/checkbox/api.md
+++ /dev/null
@@ -1,40 +0,0 @@
-### Checkbox Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------- | --- |
-| align | String | left | 复选框和内容相对位置。可选值:left/right | N |
-| checked | Boolean | false | 是否选中 | N |
-| content | String / Slot | - | 复选框内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| contentDisabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N |
-| disabled | Boolean | undefined | 是否禁用组件 | N |
-| externalClasses | Array | - | 组件类名,分别用于设置 组件外层、复选框图标、主文案、内容 等元素类名。`['t-class', 't-class-icon', 't-class-label', 't-class-content']` | N |
-| icon | Array | - | 自定义选中图标和非选中图标。TS 类型:`Array` | N |
-| indeterminate | Boolean | false | 是否为半选 | N |
-| label | String / Slot | - | 主文案。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| maxContentRow | Number | 5 | 内容最大行数限制 | N |
-| maxLabelRow | Number | 3 | 主文案最大行数限制 | N |
-| name | String | - | HTM 元素原生属性 | N |
-| readonly | Boolean | false | 组件是否只读 | N |
-| value | String / Number | - | 复选框的值。TS 类型:`string | number` | N |
-
-### Checkbox Events
-
-| 名称 | 参数 | 描述 |
-| ------ | -------------------- | ------------ |
-| change | `(checked: boolean)` | 值变化时触发 |
-
-### CheckboxGroup Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| -------- | ------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
-| disabled | Boolean | false | 是否禁用组件 | N |
-| max | Number | - | 支持最多选中的数量 | N |
-| name | String | - | 统一设置内部复选框 HTML 属性 | N |
-| options | Array | [] | 以配置形式设置子元素。示例 1:['北京', '上海'] ,示例 2: [{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/checkbox/type.ts) | N |
-| value | Array | [] | 选中值。TS 类型:`CheckboxGroupValue`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/checkbox/type.ts) | N |
-
-### CheckboxGroup Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ---------------------------------------------------- | ------------ |
-| change | `(value: CheckboxGroupValue, context: { e: Event })` | 值变化时触发 |
diff --git a/example/pages/checkbox/checkbox.json b/example/pages/checkbox/checkbox.json
deleted file mode 100644
index 707cbaef5..000000000
--- a/example/pages/checkbox/checkbox.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Checkbox 复选框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/checkbox/checkbox.less b/example/pages/checkbox/checkbox.less
deleted file mode 100644
index 3ac7fe45b..000000000
--- a/example/pages/checkbox/checkbox.less
+++ /dev/null
@@ -1,11 +0,0 @@
-.t-checkbox-demo {
- display: block;
- margin-top: 16px;
-}
-
-.t-checkbox-padding {
- padding: 24rpx 32rpx !important;
-}
-.disable-border {
- display: none;
-}
diff --git a/example/pages/checkbox/checkbox.ts b/example/pages/checkbox/checkbox.ts
deleted file mode 100644
index b3e3e0dee..000000000
--- a/example/pages/checkbox/checkbox.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-Page({
- data: {
- demoCheckbox1: ['checkbox2', 'checkbox3'],
- demoCheckbox2: ['checkbox2', 'checkbox3'],
- demoCheckboxMax: ['checkbox1', 'checkbox2'],
- demoCheckbox3: ['checkbox2', 'checkbox4'],
- controledData: [],
- checked: true,
- checked1: true,
- options: [
- { label: '全选', checkAll: true },
- '多选1',
- '多选2',
- { label: '多选3', value: '多选3' },
- ],
- checkAllValues: ['多选1', '多选2', ''],
- activeImage:
- 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox-checked.png',
- inActiveImage:
- 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox.png',
- check5: true,
- checkAll1: ['checkbox1'],
- },
- handleGroupChange(event) {
- console.log('group', event.detail.value);
- this.setData({
- demoCheckbox1: event.detail.value,
- });
- },
- onChange(event) {
- console.log('checkbox', event.detail.value);
- },
- onCheckAllChange(event) {
- console.log('checkbox', event.detail.value);
- this.setData({
- checkAllValues: event.detail,
- });
- },
- toggle5(e) {
- console.log('checkbox', e.detail.value);
- this.setData({
- check5: e.detail.value,
- });
- },
- handleControled() {
- const data = !this.data.controledData.length
- ? ['checkbox1', 'checkbox3', 'checkbox2', 'checkbox4', 'checkbox5']
- : [];
- this.setData({
- controledData: data,
- });
- },
- testControll(val) {
- console.log(val.detail);
- },
- // 受控
- controlledHandler(e) {
- console.log(e.detail.value);
- this.setData({
- checked1: e.detail.checked,
- });
- },
- buttonControl() {
- console.log(!this.data.checked1);
- this.setData({
- checked1: !this.data.checked1,
- });
- },
- changeChecked(e) {
- this.setData({
- checked: e.detail.checked,
- });
- },
-});
diff --git a/example/pages/checkbox/checkbox.wxml b/example/pages/checkbox/checkbox.wxml
deleted file mode 100644
index 574fd1970..000000000
--- a/example/pages/checkbox/checkbox.wxml
+++ /dev/null
@@ -1,99 +0,0 @@
-
- Checkbox多选框
- 用于预设的一组选项中执行多项选择,并呈现选择结果。
-
-
-
-
-
-
-
-
-
-
- 多选多选多选多选多选多选多选多选多选多选多选多选多选多选多选多选多选选多选多选多选选多选多选多选多选
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/collapse/collapse.json b/example/pages/collapse/collapse.json
deleted file mode 100644
index e2178559a..000000000
--- a/example/pages/collapse/collapse.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Collapse 折叠面板"
-}
diff --git a/example/pages/collapse/collapse.wxml b/example/pages/collapse/collapse.wxml
deleted file mode 100644
index ab16598f2..000000000
--- a/example/pages/collapse/collapse.wxml
+++ /dev/null
@@ -1,36 +0,0 @@
-
- Collapse 折叠面板
- 用于对复杂区域进行分组和隐藏 常用于订单信息展示等
-
-
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 带操作说明
-
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
-
- 手风琴式
-
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
-
-
diff --git a/example/pages/count-down/count-down.json b/example/pages/count-down/count-down.json
deleted file mode 100644
index 066b7f77f..000000000
--- a/example/pages/count-down/count-down.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "count-down 倒计时",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/count-down/count-down.less b/example/pages/count-down/count-down.less
deleted file mode 100644
index 0dc4a7bbd..000000000
--- a/example/pages/count-down/count-down.less
+++ /dev/null
@@ -1,52 +0,0 @@
-@gray: rgba(0, 0, 0, .4);
-
-page {
- background: #fff;
-}
-
-.flex {
- display: flex;
- align-items: center;
-}
-
-.base-time {
- margin-top: 52rpx;
- justify-content: space-between;
-
- &-text {
- font-size: 20rpx;
- color: @gray;
- width: 60%;
- }
-
- &-cls {
- color: #333;
- font-weight: 700;
- }
-}
-
-.spec-item {
- justify-content: space-between;
- margin-top: 32rpx;
-
- &-right {
- width: 118 * 2rpx;
- }
-
- &-left {
- width: 176 * 2rpx;
- }
-
- &-after {
- font-size: 20rpx;
- color: @gray;
- justify-content: center;
- display: inline-flex;
- align-items: center;
- width: 30%;
- }
-}
-
-.last-padding {
- padding-bottom: 80rpx;
-}
diff --git a/example/pages/count-down/count-down.wxml b/example/pages/count-down/count-down.wxml
deleted file mode 100644
index 5b22b4cea..000000000
--- a/example/pages/count-down/count-down.wxml
+++ /dev/null
@@ -1,58 +0,0 @@
-Count down 倒计时
-用于实时展示倒计时数值。
-
-
-
-
- 时分秒
-
-
-
- 带毫秒
-
-
-
- 带方形底
-
-
-
- 带圆形底
-
-
-
- 带单位
-
-
-
- 无底色带单位
-
-
-
-
-
-
-
-
-
-
- S
-
-
-
-
-
-
-
-
- M
-
-
-
-
-
-
-
-
- L
-
-
diff --git a/example/pages/date-time-picker/date-time-picker.json b/example/pages/date-time-picker/date-time-picker.json
deleted file mode 100644
index 05d02519d..000000000
--- a/example/pages/date-time-picker/date-time-picker.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "DateTimePicker",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/date-time-picker/date-time-picker.less b/example/pages/date-time-picker/date-time-picker.less
deleted file mode 100644
index 16257c949..000000000
--- a/example/pages/date-time-picker/date-time-picker.less
+++ /dev/null
@@ -1,20 +0,0 @@
-.t-cell.pannel-item {
- margin-bottom: 32rpx;
-
- &::after {
- border: 0;
- }
-}
-
-.t-cell {
- .sub-text {
- color: #000;
- opacity: .9;
- }
-
- .empty {
- color: #000;
- opacity: .32;
- }
-}
-
diff --git a/example/pages/date-time-picker/date-time-picker.ts b/example/pages/date-time-picker/date-time-picker.ts
deleted file mode 100644
index 9772fa502..000000000
--- a/example/pages/date-time-picker/date-time-picker.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-Page({
- data: {
- mode: '',
-
- dateVisible: false,
- date: new Date().getTime(), // 支持时间戳传入
- dateText: '',
-
- monthVisible: false,
- month: '2021-09',
- monthText: '',
-
- timeVisible: false,
- time: '',
- timeText: '',
-
- monthDateVisible: false,
- monthDate: '2019-09-21', // 需要传入年 不然无法确定是哪一年的
- monthDateText: '',
-
- datetimeVisible: false,
- datetime: '2021-06-06 12:11:11',
- datetimeText: '',
-
- // 指定选择区间起始值
- disableDate: {
- before: '2000-01-01 00:00:00',
- after: '2022-09-09 12:12:12',
- },
- },
- showPicker(e) {
- const { mode } = e?.currentTarget?.dataset;
- this.setData({
- mode,
- [`${mode}Visible`]: true,
- });
- },
- hidePicker() {
- const { mode } = this.data;
- this.setData({
- [`${mode}Visible`]: false,
- });
- },
- onConfirm(e) {
- const { value, formatValue } = e?.detail;
- const { mode } = this.data;
-
- console.log(value, formatValue);
-
- this.setData({
- [mode]: value.valueOf(),
- [`${mode}Text`]: formatValue,
- });
-
- this.hidePicker();
- },
-});
diff --git a/example/pages/date-time-picker/date-time-picker.wxml b/example/pages/date-time-picker/date-time-picker.wxml
deleted file mode 100644
index 27e42774d..000000000
--- a/example/pages/date-time-picker/date-time-picker.wxml
+++ /dev/null
@@ -1,112 +0,0 @@
-
- DateTimePicker 时间选择器
- 用于选择一个时间点或者一个时间段。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/dialog/dialog.json b/example/pages/dialog/dialog.json
deleted file mode 100644
index a24a4d068..000000000
--- a/example/pages/dialog/dialog.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Dialog 对话框",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/dialog/dialog.less b/example/pages/dialog/dialog.less
deleted file mode 100644
index 77a3b3b24..000000000
--- a/example/pages/dialog/dialog.less
+++ /dev/null
@@ -1,41 +0,0 @@
-page {
- background: #fff;
-
- .t-dialog {
- .custom-confirm-btn {
- color: #ff4646;
- }
- }
-
- .demo-block__oper {
- margin: 0 32rpx;
- }
-}
-
-.long-content {
- height: 576rpx;
- margin-top: 16rpx;
- font-size: 32rpx;
- color: #888;
-
- .content-cintainer {
- width: 540rpx;
- }
-}
-
-input {
- height: 96rpx;
- padding: 0 24rpx;
- text-align: left;
- margin-top: 32rpx;
- border-radius: 8rpx;
- background-color: #f5f5f5;
-}
-
-.placeholder {
- color: rgba(0, 0, 0, .26);
- line-height: 96rpx;
- height: 96rpx !important;
- display: flex;
- align-items: center;
-}
diff --git a/example/pages/dialog/dialog.ts b/example/pages/dialog/dialog.ts
deleted file mode 100644
index 6058de3ba..000000000
--- a/example/pages/dialog/dialog.ts
+++ /dev/null
@@ -1,260 +0,0 @@
-// @ts-ignore
-import Dialog from 'tdesign-miniprogram/dialog/index';
-
-const title = '对话框标题';
-const maxTitle = '对话框标题告知当前状态、信息和解决方法,等内容。描述文案尽可能控制在三行内';
-const message = '告知当前状态、信息和解决方法,等内容。描述文案尽可能控制在三行内';
-
-interface Config {
- title: string;
- tConfirmBtn: string;
- content: string;
- confirmBtn: string;
- cancelBtn: string;
- buttonLayout: 'horizontal' | 'vertical';
- actions: boolean | { name: string; primary?: boolean; style?: string }[];
-}
-
-const dialogConfig: Config = {
- title: '',
- tConfirmBtn: '',
- content: '',
- confirmBtn: '',
- cancelBtn: '',
- buttonLayout: 'horizontal',
- actions: false,
-};
-
-const modelConfigFactory = (opt: Partial) => {
- return {
- ...dialogConfig,
- ...opt,
- };
-};
-
-Page({
- data: {
- show: false,
- useSlot: false,
- dialogConfig,
- currentKey: '',
- operList: [
- {
- title: '反馈类对话框',
- btns: [
- {
- type: 'text',
- text: '单行标题',
- },
- {
- type: 'multiText',
- text: '多行标题最大高度',
- },
- {
- type: 'textAndTitle',
- text: '带说明文本',
- },
- {
- type: 'multiTextAndTitle',
- text: '带说明文本最大高度',
- },
- ],
- },
- {
- title: '确认类对话框',
- btns: [
- {
- type: 'confirm',
- text: '双按钮',
- },
- {
- type: 'warnConfirm',
- text: '带警示按钮',
- },
- {
- type: 'tooLongBtnContent',
- text: '双按钮文字过长',
- },
- {
- type: 'multiBtn',
- text: '多按钮',
- },
- ],
- },
- {
- title: '输入类对话框',
- btns: [
- {
- type: 'withInput',
- text: '单行标题',
- },
- {
- type: 'textAndTitleWithInput',
- text: '带说明文本',
- },
- ],
- },
- {
- title: '命令调用',
- btns: [
- {
- type: 'commandWithCancel',
- text: '带取消按钮',
- },
- {
- type: 'command',
- text: '无取消按钮',
- },
- ],
- },
- ],
- },
-
- /** 切换dialog配置项 */
- clickHandle(e) {
- const key = e.detail;
- switch (key) {
- // 纯文本弹窗
- case 'text':
- case 'multiText': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title: key === 'text' ? title : maxTitle,
- confirmBtn: '知道了',
- }),
- });
- return;
- }
- // 标题&副标题弹窗
- case 'textAndTitle':
- case 'multiTextAndTitle': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title: key === 'textAndTitle' ? title : '对话框带文本最大高度',
- content: key === 'textAndTitle' ? message : '',
- confirmBtn: '我知道了',
- }),
- });
- return;
- }
- // 确认弹窗-普通
- case 'confirm': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- content: message,
- confirmBtn: '按钮最多字数',
- cancelBtn: '取消',
- }),
- });
- return;
- }
- // 确认弹窗-警示操作
- case 'warnConfirm': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- tConfirmBtn: 'custom-confirm-btn',
- confirmBtn: '警示操作',
- cancelBtn: '取消',
- }),
- });
- return;
- }
- // 按钮文字过长弹层
- case 'tooLongBtnContent': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- content: message,
- confirmBtn: '按钮文案文字内容较长',
- cancelBtn: '取消',
- buttonLayout: 'vertical',
- }),
- });
- return;
- }
- // 多按钮弹层
- case 'multiBtn': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- content: message,
- buttonLayout: 'vertical', // 'horizontal' | 'vertical'
- actions: [
- { name: '取消', primary: false },
- { name: '单行按钮最多十五个字符文案内容', primary: true },
- { name: '按钮文案文字内容较长', primary: true, style: 'color:red;' },
- ], // {name: string, primary?: string}
- }),
- });
- return;
- }
- // 带输入弹窗
- case 'withInput':
- case 'textAndTitleWithInput': {
- this.setData({
- show: true,
- useSlot: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title: '带输入框对话框',
- content: key === 'withInput' ? '' : message,
- confirmBtn: '确认',
- cancelBtn: '取消',
- }),
- });
- return;
- }
- case 'commandWithCancel': {
- Dialog.confirm({
- title: '弹窗标题',
- content: '告知当前状态、信息和解决方法等内容。',
- confirmBtn: '确认按钮',
- cancelBtn: '取消按钮',
- });
- return;
- }
- case 'command': {
- Dialog.confirm({
- title: '弹窗标题',
- content: '告知当前状态、信息和解决方法等内容。',
- confirmBtn: '确认按钮',
- });
- return;
- }
- default: {
- Dialog.alert({
- title: `未知key: ${key}`,
- content: '',
- });
- break;
- }
- }
- },
-
- /** 异步关闭弹层 */
- closeHandle() {
- this.confirmHandle();
- },
-
- /** 普通弹层关闭 */
- confirmHandle() {
- this.setData({
- show: false,
- useSlot: false,
- });
- },
-});
diff --git a/example/pages/dialog/dialog.wxml b/example/pages/dialog/dialog.wxml
deleted file mode 100644
index 62214bd37..000000000
--- a/example/pages/dialog/dialog.wxml
+++ /dev/null
@@ -1,40 +0,0 @@
-
- Dialog 对话框
- 用于显示重要提示或请求用户进行重要操作,一种打断当前操作的模态视图。
-
-
-
-
-
-
-
-
- 告知当前状态、信息和解决方法,等内容。描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案
-
-
-
-
diff --git a/example/pages/divider/api.md b/example/pages/divider/api.md
deleted file mode 100644
index 1be9c9a81..000000000
--- a/example/pages/divider/api.md
+++ /dev/null
@@ -1,11 +0,0 @@
-### Divider Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | ------------- | ---------- | ------------------------------------------------------------------------------------------------------------- | ---- |
-| align | String | center | 文本位置(仅在水平分割线有效)。可选值:left/right/center | N |
-| content | String / Slot | - | 子元素。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N |
-| externalClasses | Array | - | 组件类名,分别用于设置 组件外层类名、分隔线类名 等。`['t-class', 't-class-line', 't-class-content']` | N |
-| lineColor | String | - | 分隔线颜色 | N |
-| theme | String | horizontal | 分隔线类型有两种:水平和垂直。可选值:horizontal/vertical | N |
-| tStyle | Object | - | 组件样式。TS 类型:`Record` | N |
diff --git a/example/pages/divider/divider.json b/example/pages/divider/divider.json
deleted file mode 100644
index dcef1d829..000000000
--- a/example/pages/divider/divider.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Divider",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/divider/divider.less b/example/pages/divider/divider.less
deleted file mode 100644
index 87bcc2074..000000000
--- a/example/pages/divider/divider.less
+++ /dev/null
@@ -1,59 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.demo-block__slot {
- margin: 0;
-}
-
-.demo-block {
- margin-bottom: 32rpx;
- font-size: 24rpx;
-
- &__desc {
- margin-left: 32rpx;
- margin-bottom: 16rpx;
- line-height: 40rpx;
- color: rgba(0, 0, 0, .4);
- }
-
- &__wrapper {
- display: grid;
- align-items: center;
- }
-}
-
-.t-class-content {
- margin-right: 20rpx;
- margin-left: 20rpx;
-}
-
-.demo-2 {
- margin: 0 32rpx;
-}
-
-.demo-3 {
- margin-left: 32rpx;
-}
-
-.demo-4 {
- margin-left: 152rpx;
-}
-
-.demo-5 {
- margin: 0 32rpx;
-}
-
-.demo-6 {
- display: flex;
- height: 20px;
- line-height: center;
- align-items: center;
- margin: 0 32rpx;
- font-size: 12px;
-
- &--text-color {
- color: #000;
- opacity: .4;
- }
-}
diff --git a/example/pages/divider/divider.ts b/example/pages/divider/divider.ts
deleted file mode 100644
index f15277f21..000000000
--- a/example/pages/divider/divider.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-Page({
- /**
- * 页面的初始数据
- */
- data: {},
-});
diff --git a/example/pages/divider/divider.wxml b/example/pages/divider/divider.wxml
deleted file mode 100644
index 70ccbbffc..000000000
--- a/example/pages/divider/divider.wxml
+++ /dev/null
@@ -1,71 +0,0 @@
-
- Divider 分割符
- 用于分割、组织、细化有一定逻辑的组织元素内容和页面结构。
-
-
-
- 直线拉通
-
-
-
-
-
- 虚线拉通
-
-
-
-
-
- 左右间距
-
-
-
-
-
- 右侧拉通
-
-
-
-
-
-
- 自定义左侧间距
-
-
-
-
-
- 文字+直线
-
-
- 文字信息
-
-
-
-
- 文字+虚线
-
-
-
-
-
- 纯文字
-
-
- 没有更多了~
-
-
-
-
- 垂直分割
-
- 文字信息
-
- 文字信息
-
- 文字信息
-
-
-
-
-
diff --git a/example/pages/drawer/drawer.json b/example/pages/drawer/drawer.json
deleted file mode 100644
index 0089269e5..000000000
--- a/example/pages/drawer/drawer.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Drawer",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/drawer/drawer.less b/example/pages/drawer/drawer.less
deleted file mode 100644
index fe6d16e28..000000000
--- a/example/pages/drawer/drawer.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.box {
- margin: 32rpx;
-}
diff --git a/example/pages/drawer/drawer.ts b/example/pages/drawer/drawer.ts
deleted file mode 100644
index 743af8dda..000000000
--- a/example/pages/drawer/drawer.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-Page({
- data: {
- placement: 'left',
- sidebar: [],
- baseSidebar: [
- {
- title: '菜单一',
- },
- {
- title: '菜单二',
- },
- {
- title: '菜单三',
- },
- {
- title: '菜单四',
- },
- {
- title: '菜单五',
- },
- {
- title: '菜单六',
- },
- {
- title: '菜单七',
- },
- {
- title: '菜单八',
- },
- ],
- iconSidebar: [
- {
- title: '菜单一',
- icon: 'app',
- },
- {
- title: '菜单二',
- icon: 'app',
- },
- {
- title: '菜单三',
- icon: 'app',
- },
- {
- title: '菜单四',
- icon: 'app',
- },
- {
- title: '菜单五',
- icon: 'app',
- },
- {
- title: '菜单六',
- icon: 'app',
- },
- {
- title: '菜单七',
- icon: 'app',
- },
- {
- title: '菜单八',
- icon: 'app',
- },
- ],
- },
-
- openDrawerBase() {
- this.setData({
- visible: true,
- sidebar: this.data.baseSidebar,
- });
- },
-
- openDrawerIcon() {
- this.setData({
- visible: true,
- sidebar: this.data.iconSidebar,
- });
- },
-
- itemClick(e) {
- console.log(e.detail);
- },
-
- overlayClick(e) {
- console.log(e.detail);
- },
-});
diff --git a/example/pages/drawer/drawer.wxml b/example/pages/drawer/drawer.wxml
deleted file mode 100644
index 10847406b..000000000
--- a/example/pages/drawer/drawer.wxml
+++ /dev/null
@@ -1,24 +0,0 @@
-
- Drawer 弹出层
- 用作一组平行关系页面/内容的切换器,相较于Tab,同屏可展示更多的选项数量。
-
-
diff --git a/example/pages/dropdown-menu/dropdown-menu.json b/example/pages/dropdown-menu/dropdown-menu.json
deleted file mode 100644
index 4eca9396a..000000000
--- a/example/pages/dropdown-menu/dropdown-menu.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Dropdown Menu 下拉菜单"
-}
\ No newline at end of file
diff --git a/example/pages/dropdown-menu/dropdown-menu.ts b/example/pages/dropdown-menu/dropdown-menu.ts
deleted file mode 100644
index a86370a7f..000000000
--- a/example/pages/dropdown-menu/dropdown-menu.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-const chineseNumber = '一二三四五六七八九十'.split('');
-
-const singleSelectOptions = new Array(8).fill(null).map((_, i) => ({
- label: `选项${chineseNumber[i]}`,
- value: `option_${i + 1}`,
- disabled: false,
-}));
-
-singleSelectOptions.push({
- label: '禁用选项',
- value: 'disabled',
- disabled: true,
-});
-
-const doubleColumnsOptions = [
- ...singleSelectOptions,
- {
- label: '禁用选项',
- value: 'disabled',
- disabled: true,
- },
-];
-
-const tripleColumnsOptions = [
- ...doubleColumnsOptions,
- {
- label: '禁用选项',
- value: 'disabled',
- disabled: true,
- },
-];
-
-tripleColumnsOptions.splice(8, 0, {
- label: `选项${chineseNumber[8]}`,
- value: `option_${9}`,
- disabled: false,
-});
-
-const generateTree = function (deep = 0, count = 10, prefix?: string) {
- const ans = [];
-
- for (let i = 0; i < count; i += 1) {
- const value = prefix ? `${prefix}-${i}` : `${i}`;
- const rect: any = {
- label: `选项${chineseNumber[i]}`,
- value,
- };
-
- if (deep > 0) {
- rect.options = generateTree(deep - 1, 10, value);
- }
- ans.push(rect);
- }
-
- return ans;
-};
-
-Page({
- data: {
- singleSelect: {
- value: 'option_3',
- options: singleSelectOptions,
- },
- multipleSelect: {
- value: ['option_1'],
- options: singleSelectOptions,
- },
- doubleColumnsOptions,
- tripleColumnsOptions,
- doubleColumnsTree: {
- options: generateTree(1),
- value: ['0', '0-0'],
- },
- tripleColumnsTree: {
- options: generateTree(2),
- value: ['0', '0-0', ['0-0-0', '0-0-1']],
- },
- },
-
- handleSingleSelect(e) {
- this.setData({
- 'singleSelect.value': e.detail.value,
- });
- },
-
- handleMultipleSelect(e) {
- this.setData({
- 'multipleSelect.value': e.detail.value,
- });
- },
-
- handleTreeSelect(e) {
- this.setData({
- 'doubleColumnsTree.value': e.detail.value,
- });
- },
-});
diff --git a/example/pages/dropdown-menu/dropdown-menu.wxml b/example/pages/dropdown-menu/dropdown-menu.wxml
deleted file mode 100644
index 8577c4f04..000000000
--- a/example/pages/dropdown-menu/dropdown-menu.wxml
+++ /dev/null
@@ -1,86 +0,0 @@
-
- DropdownMenu 下拉菜单
- 菜单呈现数个并列的选项类目,用于整个页面的内容筛选,由菜单面板和菜单选项组成。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/empty/empty-page.json b/example/pages/empty/empty-page.json
deleted file mode 100644
index 5bbe4be05..000000000
--- a/example/pages/empty/empty-page.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Empty",
- "navigationBarBackgroundColor": "#fff"
-}
diff --git a/example/pages/empty/empty-page.less b/example/pages/empty/empty-page.less
deleted file mode 100644
index d99284e6b..000000000
--- a/example/pages/empty/empty-page.less
+++ /dev/null
@@ -1,13 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.page {
- padding-top: 240rpx;
-}
-
-.t-empty {
- &__actions {
- margin-top: 128rpx !important;
- }
-}
\ No newline at end of file
diff --git a/example/pages/empty/empty-page.wxml b/example/pages/empty/empty-page.wxml
deleted file mode 100644
index c16bd2bbe..000000000
--- a/example/pages/empty/empty-page.wxml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
- 按钮
-
-
diff --git a/example/pages/empty/empty.json b/example/pages/empty/empty.json
deleted file mode 100644
index 5bbe4be05..000000000
--- a/example/pages/empty/empty.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Empty",
- "navigationBarBackgroundColor": "#fff"
-}
diff --git a/example/pages/empty/empty.less b/example/pages/empty/empty.less
deleted file mode 100644
index 7f83bb05c..000000000
--- a/example/pages/empty/empty.less
+++ /dev/null
@@ -1,39 +0,0 @@
-page {
- background: #fff;
-}
-
-.empty-text {
- color: #999;
- font-size: 24rpx;
- margin-left: 32rpx;
-}
-
-.demo-block__slot {
- margin-top: 0;
-}
-
-.t-empty {
- &__image {
- width: 240rpx !important;
- height: 240rpx !important;
- }
-
- &__button {
- width: 320rpx !important;
- height: 72rpx !important;
- line-height: 72rpx !important;
- }
-}
-
-.demo {
- &-section {
- &__desc {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- &__wrapper {
- margin: 32rpx 0;
- }
- }
-}
\ No newline at end of file
diff --git a/example/pages/empty/empty.ts b/example/pages/empty/empty.ts
deleted file mode 100644
index a8b5f8ee4..000000000
--- a/example/pages/empty/empty.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * @Author: shiyanzhang
- * @Date: 2021-08-24 15:56:07
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/empty/empty.ts
- */
-Page({
- data: {
- image:
- 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/empty__demo-image.png',
- },
- goEmptyPage() {
- wx.navigateTo({ url: './empty-page' });
- },
-});
diff --git a/example/pages/empty/empty.wxml b/example/pages/empty/empty.wxml
deleted file mode 100644
index ebbc38d2d..000000000
--- a/example/pages/empty/empty.wxml
+++ /dev/null
@@ -1,32 +0,0 @@
-
- Empty 空状态
- 用于空状态时的占位提示。
-
-
-
-
- 自定义图片空状态
-
-
-
- 带操作空状态
-
-
- 操作按钮
-
-
- 空页面
-
-
- 空页面
-
-
-
-
diff --git a/example/pages/fab/fab.json b/example/pages/fab/fab.json
deleted file mode 100644
index 08691a362..000000000
--- a/example/pages/fab/fab.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Fab 悬浮按钮"
-}
diff --git a/example/pages/fab/fab.ts b/example/pages/fab/fab.ts
deleted file mode 100644
index 643567467..000000000
--- a/example/pages/fab/fab.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-Page({
- data: {
- fabButton: {
- openType: 'getPhoneNumber',
- },
- },
- handleClick(e) {
- console.log(e);
- },
-});
diff --git a/example/pages/fab/fab.wxml b/example/pages/fab/fab.wxml
deleted file mode 100644
index 58a5c88f8..000000000
--- a/example/pages/fab/fab.wxml
+++ /dev/null
@@ -1,6 +0,0 @@
-Fab 悬浮按钮
-当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布
-
-
-
-
diff --git a/example/pages/footer/footer.json b/example/pages/footer/footer.json
deleted file mode 100644
index a31213f18..000000000
--- a/example/pages/footer/footer.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "footer 页脚",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/footer/footer.less b/example/pages/footer/footer.less
deleted file mode 100644
index d405bbbd3..000000000
--- a/example/pages/footer/footer.less
+++ /dev/null
@@ -1,12 +0,0 @@
-page {
- background: #fff;
-}
-
-.t-footer-demo {
- margin: 16rpx 0;
- font-size: 24rpx;
-
- &--divider {
- height: 32rpx;
- }
-}
diff --git a/example/pages/footer/footer.ts b/example/pages/footer/footer.ts
deleted file mode 100644
index bc3ec82e4..000000000
--- a/example/pages/footer/footer.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-Page({
- data: {
- copyright: 'Copyright © 2021-2031 TD.All Rights Reserved.',
- textLinkListOne: [
- {
- name: '底部链接',
- url: '/pages/index',
- openType: 'navigate',
- },
- ],
- textLinkListTwo: [
- {
- name: '底部链接',
- url: '/pages/index',
- openType: 'navigate',
- },
- {
- name: '底部链接',
- url: '',
- openType: 'navigateBack',
- },
- ],
- logo: {
- url: 'https://cdn-we-retail.ym.tencent.com/miniapp/articleFooter/example3.png', // 占位图片
- },
- },
-});
diff --git a/example/pages/footer/footer.wxml b/example/pages/footer/footer.wxml
deleted file mode 100644
index 9a8e90fdb..000000000
--- a/example/pages/footer/footer.wxml
+++ /dev/null
@@ -1,29 +0,0 @@
-Footer 页脚
-用于基础列表展示,可附带文字、品牌logo、操作,常用商详、个人中心、设置等页面。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/grid/grid.json b/example/pages/grid/grid.json
deleted file mode 100644
index 8d69427b8..000000000
--- a/example/pages/grid/grid.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Grid宫格",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/grid/grid.less b/example/pages/grid/grid.less
deleted file mode 100644
index 1323f0dff..000000000
--- a/example/pages/grid/grid.less
+++ /dev/null
@@ -1,199 +0,0 @@
-@gutter-row-height: 32rpx;
-
-page {
- .demo {
- min-height: 100vh;
- overflow: hidden;
- }
-
- .demo-section__wrapper {
- margin: 32rpx 0;
- }
-
- .small-icon-image {
- width: 28px;
- height: 28px;
- }
-
- .middle-icon-image {
- width: 32px;
- height: 32px;
- }
-
- .gutter-row {
- height: @gutter-row-height;
- }
-}
-
-// 以下是覆盖grid组件内的样式
-page {
- .three-border {
- .text {
- margin-bottom: 24rpx;
- padding-top: 8rpx;
- }
-
- .image-icon {
- padding-top: 24rpx;
- width: 48px;
- height: 48px;
- }
- }
-
- .four {
- .text {
- margin-bottom: 32rpx;
- font-size: 24rpx;
- padding-top: 16rpx;
- }
-
- .image-icon {
- padding-top: 32rpx;
- width: 64rpx;
- height: 64rpx;
- }
- }
-
- .five {
- .text {
- padding-top: 20rpx;
- margin-bottom: 32rpx;
- font-size: 24rpx;
- }
-
- .image-icon {
- padding-top: 32rpx;
- width: 56rpx;
- height: 56rpx;
- }
- }
-
- .five-with-padding {
- padding: 0 24rpx;
-
- .grid {
- border-radius: 16rpx;
-
- .image-icon {
- padding-top: 24rpx;
- width: 56rpx;
- height: 56rpx;
- }
-
- .text {
- padding-top: 20rpx;
- margin-bottom: 20rpx;
- font-size: 24rpx;
- }
- }
- }
-
- .three {
- .text {
- margin-bottom: 24rpx;
- font-size: 28rpx;
- padding-top: 9rpx;
- }
-
- .image-icon {
- padding-top: 24rpx;
- width: 96rpx;
- height: 96rpx;
- }
- }
-
- .two-des {
- .image-icon {
- padding-top: 24rpx;
- width: 96rpx;
- height: 96rpx;
- padding-left: 24rpx;
- padding-bottom: 32rpx;
- }
-
- .t-grid-item__image {
- width: 120rpx;
- height: 160rpx;
- flex-grow: 0;
- }
-
- .t-grid-item__words {
- display: block;
- }
-
- .text {
- margin-top: 24rpx;
- padding-left: 25rpx;
- }
-
- .t-grid-item {
- display: block !important;
- }
-
- .description {
- padding-left: 25rpx;
- padding-top: 8rpx;
- }
- }
-
- .three-des {
- .text {
- padding-top: 7rpx;
- font-size: 28rpx;
- }
-
- .image-icon {
- padding-top: 24rpx;
- width: 96rpx;
- height: 96rpx;
- }
-
- .description {
- margin-top: 8rpx;
- margin-bottom: 24rpx;
- }
- }
-
- .badge {
- .text {
- padding-top: 16rpx;
- margin-bottom: 32rpx;
- font-size: 24rpx;
- }
-
- .image-icon {
- width: 64rpx;
- height: 64rpx;
- }
-
- .badge-item {
- margin-top: 32rpx;
- }
-
- .badge-circle {
- display: flex;
- justify-content: center;
- background-color: #e34d59;
- border-radius: 15rpx;
- width: 36rpx;
- height: 32rpx;
- align-items: center;
- position: absolute;
- top: -15rpx;
- left: 46rpx;
-
- .circle {
- width: 4rpx;
- height: 4rpx;
- border-radius: 2rpx;
- background-color: white;
- margin-left: 4rpx;
- }
-
- .badge-circle-container {
- margin-left: -4rpx;
- display: flex;
- }
- }
- }
-}
diff --git a/example/pages/grid/grid.ts b/example/pages/grid/grid.ts
deleted file mode 100644
index ece7e7486..000000000
--- a/example/pages/grid/grid.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-Page({
- data: {
- border: {
- color: '#f6f6f6',
- },
- },
-});
diff --git a/example/pages/grid/grid.wxml b/example/pages/grid/grid.wxml
deleted file mode 100644
index 23339256e..000000000
--- a/example/pages/grid/grid.wxml
+++ /dev/null
@@ -1,188 +0,0 @@
-
- Grid 宫格
- 用于功能入口布局,将页面或特定区域切分成若干等大的区块,形成若干功能入口。
-
-
- 一行三个带边框
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行四个
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行五个
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行三个
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行二个带说明
-
-
-
-
-
-
-
-
-
-
-
- 一行三个带说明
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 带徽标
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/home/data/base.ts b/example/pages/home/data/base.ts
index 20586f424..c9a01ba47 100644
--- a/example/pages/home/data/base.ts
+++ b/example/pages/home/data/base.ts
@@ -1,5 +1,5 @@
const base = {
- name: '设计基础',
+ name: '基础',
icon: 'app',
childArr: [
// {
@@ -30,10 +30,15 @@ const base = {
name: 'Icon',
label: '图标',
},
- // {
- // name: 'Layout',
- // label: '布局',
- // },
+ {
+ name: 'Link',
+ label: '链接',
+ },
+ {
+ name: 'Layout',
+ label: '布局',
+ path: '/pages/col/col',
+ },
// {
// name: 'Typography',
// label: '字体',
diff --git a/example/pages/home/data/display.ts b/example/pages/home/data/display.ts
index 89a6d6ed7..492a6d485 100644
--- a/example/pages/home/data/display.ts
+++ b/example/pages/home/data/display.ts
@@ -1,5 +1,5 @@
const display = {
- name: '信息展示',
+ name: '数据展示',
icon: 'image',
childArr: [
{
@@ -11,10 +11,6 @@ const display = {
label: '徽标',
},
// {
- // name: 'Calendar',
- // label: '日历',
- // },
- // {
// name: 'CanvasPoster',
// label: '海报分享',
// },
@@ -30,10 +26,6 @@ const display = {
name: 'CountDown',
label: '倒计时',
},
- {
- name: 'DropdownMenu',
- label: '下拉菜单',
- },
{
name: 'Empty',
label: '空状态',
@@ -54,17 +46,17 @@ const display = {
name: 'Image',
label: '图片',
},
- // {
- // name: 'Preview',
- // label: '图片预览',
- // },
{
- name: 'Swiper',
- label: '轮播图',
+ name: 'ImageViewer',
+ label: '图片预览',
},
{
- name: 'Tag',
- label: '标签',
+ name: 'Progress',
+ label: '进度条',
+ },
+ {
+ name: 'Result',
+ label: '结果',
},
{
name: 'Skeleton',
@@ -75,8 +67,12 @@ const display = {
label: '吸顶',
},
{
- name: 'NoticeBar',
- label: '公告栏',
+ name: 'Swiper',
+ label: '轮播图',
+ },
+ {
+ name: 'Tag',
+ label: '标签',
},
],
};
diff --git a/example/pages/home/data/form.ts b/example/pages/home/data/form.ts
index 54476ec6f..4ae3b0fde 100644
--- a/example/pages/home/data/form.ts
+++ b/example/pages/home/data/form.ts
@@ -1,7 +1,15 @@
const form = {
- name: '表单',
+ name: '输入',
icon: 'bulletpoint',
childArr: [
+ {
+ name: 'Calendar',
+ label: '日历',
+ },
+ {
+ name: 'Cascader',
+ label: '级联选择器',
+ },
{
name: 'Checkbox',
label: '多选框',
@@ -14,10 +22,6 @@ const form = {
name: 'Input',
label: '输入框',
},
- {
- name: 'Textarea',
- label: '多行输入框',
- },
{
name: 'Picker',
label: '选择器',
@@ -46,6 +50,14 @@ const form = {
name: 'Switch',
label: '开关',
},
+ {
+ name: 'Textarea',
+ label: '多行文本框',
+ },
+ {
+ name: 'TreeSelect',
+ label: '树形选择器',
+ },
// {
// name: 'PeriodSelector',
// label: '时间段选择器',
diff --git a/example/pages/home/data/index.ts b/example/pages/home/data/index.ts
index b00872acb..5671c1da2 100644
--- a/example/pages/home/data/index.ts
+++ b/example/pages/home/data/index.ts
@@ -4,4 +4,4 @@ import display from './display';
import form from './form';
import ux from './ux';
-export default [base, nav, display, form, ux];
+export default [base, nav, form, display, ux];
diff --git a/example/pages/home/data/nav.ts b/example/pages/home/data/nav.ts
index 466202f5f..294e3ce01 100644
--- a/example/pages/home/data/nav.ts
+++ b/example/pages/home/data/nav.ts
@@ -2,6 +2,10 @@ const nav = {
name: ' 导航',
icon: 'view-module',
childArr: [
+ {
+ name: 'BackTop',
+ label: '返回顶部',
+ },
{
name: 'Drawer',
label: '抽屉',
@@ -14,10 +18,10 @@ const nav = {
name: 'Navbar',
label: '导航栏',
},
- // {
- // name: 'SegmentedControl',
- // label: '分段器',
- // },
+ {
+ name: 'SideBar',
+ label: '侧边栏',
+ },
{
name: 'Steps',
label: '步骤条',
diff --git a/example/pages/home/data/ux.ts b/example/pages/home/data/ux.ts
index de8a13faa..067a1990a 100644
--- a/example/pages/home/data/ux.ts
+++ b/example/pages/home/data/ux.ts
@@ -1,19 +1,19 @@
const ux = {
- name: '反馈提示',
+ name: '反馈',
icon: 'chat',
childArr: [
{
name: 'ActionSheet',
label: '动作面板',
},
- {
- name: 'BackTop',
- label: '返回顶部',
- },
{
name: 'Dialog',
label: '对话框',
},
+ {
+ name: 'DropdownMenu',
+ label: '下拉菜单',
+ },
{
name: 'Loading',
label: '加载',
@@ -26,17 +26,17 @@ const ux = {
name: 'Message',
label: '消息通知',
},
- // {
- // name: 'NoticeBar',
- // label: '公告栏',
- // },
{
- name: 'Popup',
- label: '弹出层',
+ name: 'NoticeBar',
+ label: '公告栏',
+ },
+ {
+ name: 'Overlay',
+ label: '遮罩层',
},
{
- name: 'Progress',
- label: '进度条',
+ name: 'Popup',
+ label: '弹出层',
},
{
name: 'PullDownRefresh',
diff --git a/example/pages/home/home.json b/example/pages/home/home.json
index 4f76dd586..f96706eaf 100644
--- a/example/pages/home/home.json
+++ b/example/pages/home/home.json
@@ -1,6 +1,5 @@
{
"usingComponents": {
- "t-demo": "../../components/demo-block/index",
"pull-down-list": "../../components/pull-down-list/index"
},
"navigationBarTitleText": "TDesign UI",
diff --git a/example/pages/home/home.wxml b/example/pages/home/home.wxml
index d1748df57..5b346e0c1 100644
--- a/example/pages/home/home.wxml
+++ b/example/pages/home/home.wxml
@@ -1,8 +1,8 @@
-
+
- TDesign 适配微信小程序的组件库
+ TDesign 适配QQ小程序的组件库
-
-
- {{name}}
-
-
-
-
- Icon 图标
- 用于界面中的操作、入口、功能、服务等视觉表达,icon风格与品牌风格需要保持一致的感受,从而增加一致性
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/image/image.json b/example/pages/image/image.json
deleted file mode 100644
index 0a1ae94e9..000000000
--- a/example/pages/image/image.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Image",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/image/image.less b/example/pages/image/image.less
deleted file mode 100644
index 3622dff3c..000000000
--- a/example/pages/image/image.less
+++ /dev/null
@@ -1,133 +0,0 @@
-page {
- background: #fff;
-}
-
-.title {
- margin: 0rpx 32rpx;
- padding-top: 48rpx;
- font-size: 44rpx;
- font-weight: bold;
- line-height: 64rpx;
-}
-
-.desc {
- margin-top: 10rpx;
- margin-bottom: 10rpx;
- margin-left: 32rpx;
- margin-right: 32rpx;
- color: #999;
- font-size: 26rpx;
- line-height: 36rpx;
-}
-
-.row {
- display: flex;
- align-items: flex-end;
-}
-
-.gutter-row {
- height: 32rpx;
-}
-
-.gutter-column-24 {
- width: 24rpx * 2;
- display: inline-block;
-}
-
-.gutter-column-32 {
- width: 32rpx * 2;
- display: inline-block;
-}
-
-.image-example {
- display: flex;
- align-items: center;
- flex-direction: column;
-
- .text {
- margin-top: 8rpx * 2;
- font-size: 20rpx;
- color: #999;
- }
-}
-
-.custom-loading-failed {
- font-size: 20rpx;
- color: #999;
-}
-
-.loading__mask2 {
- background-color: #f2f2f2 !important;
-}
-
-.loading-text {
- height: 0px;
- width: 0px;
-}
-
-.loading-container {
- display: flex;
-}
-
-.bottom-row {
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
-}
-
-// 以下覆盖组件内部样式
-page {
- .t-image {
- border-radius: 0;
- overflow: hidden;
- }
-
- .t-image__mask {
- background-color: #f2f2f2;
- }
-
- .radius-l .t-image {
- border-radius: 16rpx;
- }
-
- .radius-m .t-image {
- border-radius: 8rpx;
- }
-
- .radius-s .t-image {
- border-radius: 4rpx;
- }
-
- .radius-round .t-image {
- border-radius: 999px;
- }
-
- .size-xl .t-image {
- width: 120rpx * 2;
- height: 120rpx * 2;
- }
-
- .size-l .t-image {
- width: 72rpx * 2;
- height: 72rpx * 2;
- }
-
- .size-m .t-image {
- width: 56rpx * 2;
- height: 56rpx * 2;
- }
-
- .size-s .t-image {
- width: 48rpx * 2;
- height: 48rpx * 2;
- }
-
- .size-xs .t-image {
- width: 32rpx * 2;
- height: 32rpx * 2;
- }
-
- .size-xss .t-image {
- width: 24rpx * 2;
- height: 24rpx * 2;
- }
-}
diff --git a/example/pages/image/image.ts b/example/pages/image/image.ts
deleted file mode 100644
index 142d22ece..000000000
--- a/example/pages/image/image.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-Page({
- data: {
- imgUrl: 'https://cdn-we-retail.ym.tencent.com/miniapp/home/home-default-logo.png',
- },
- onReady() {
- const loadingImage = this.selectComponent('#loading-img');
- loadingImage.onLoadError = null;
- loadingImage.onLoaded = null;
- loadingImage.setData({
- isLoading: true,
- isFailed: false,
- });
- const loadingImageCustom = this.selectComponent('#loading-img-custom');
- loadingImageCustom.onLoadError = null;
- loadingImageCustom.onLoaded = null;
- loadingImageCustom.setData({
- isLoading: true,
- isFailed: false,
- });
- },
-});
diff --git a/example/pages/image/image.wxml b/example/pages/image/image.wxml
deleted file mode 100644
index 9cdf51c9c..000000000
--- a/example/pages/image/image.wxml
+++ /dev/null
@@ -1,176 +0,0 @@
-Image 图片
-用于展示效果,主要为上下左右居中裁切、拉伸、平铺等方式。
-
-
-
-
-
- 裁切
-
-
-
-
- 适应高
-
-
-
-
- 拉伸
-
-
-
-
-
-
-
-
-
- 方形
-
-
-
-
- 圆角方形
-
-
-
-
- 圆形
-
-
-
-
-
-
-
-
-
- 默认提示
-
-
-
-
-
-
- 自定义提示
-
-
-
-
-
-
-
-
-
- 默认提示
-
-
-
-
- 加载失败
-
- 自定义提示
-
-
-
-
-
-
-
-
-
- 图片 56
-
-
-
-
- 图片 48
-
-
-
-
- 图片 32
-
-
-
-
- 图片 24
-
-
-
-
-
-
- 图片 120
-
-
-
-
- 图片 72
-
-
-
-
diff --git a/example/pages/indexes/data.js b/example/pages/indexes/data.js
deleted file mode 100644
index 30e5e7933..000000000
--- a/example/pages/indexes/data.js
+++ /dev/null
@@ -1,186 +0,0 @@
-const letter = [
- {
- title: 'A开头',
- index: 'A',
- children: [
- { title: '阿坝' },
- { title: '阿拉善' },
- { title: '阿里' },
- { title: '安康' },
- { title: '安庆' },
- { title: '鞍山' },
- { title: '安顺' },
- { title: '安阳' },
- { title: '澳门' },
- ],
- },
- {
- title: 'B开头',
- index: 'B',
- children: [
- { title: '北京' },
- { title: '白银' },
- { title: '保定' },
- { title: '宝鸡' },
- { title: '保山' },
- { title: '包头' },
- { title: '巴中' },
- { title: '北海' },
- { title: '蚌埠' },
- { title: '本溪' },
- { title: '毕节' },
- { title: '滨州' },
- { title: '百色' },
- { title: '亳州' },
- ],
- },
- {
- title: 'C开头',
- index: 'C',
- children: [
- { title: '重庆' },
- { title: '成都' },
- { title: '长沙' },
- { title: '长春' },
- { title: '沧州' },
- { title: '常德' },
- { title: '昌都' },
- { title: '长治' },
- { title: '常州' },
- { title: '巢湖' },
- { title: '潮州' },
- { title: '承德' },
- { title: '郴州' },
- { title: '赤峰' },
- { title: '池州' },
- { title: '崇左' },
- { title: '楚雄' },
- { title: '滁州' },
- { title: '朝阳' },
- ],
- },
- {
- title: 'D开头',
- index: 'D',
- children: [
- { title: '大连' },
- { title: '东莞' },
- { title: '大理' },
- { title: '丹东' },
- { title: '大庆' },
- { title: '大同' },
- { title: '大兴安岭' },
- { title: '德宏' },
- { title: '德阳' },
- { title: '德州' },
- { title: '定西' },
- { title: '迪庆' },
- { title: '东营' },
- ],
- },
- {
- title: 'E开头',
- index: 'E',
- children: [{ title: '鄂尔多斯' }, { title: '恩施' }, { title: '鄂州' }],
- },
- {
- title: 'F开头',
- index: 'F',
- children: [
- { title: '福州' },
- { title: '防城港' },
- { title: '佛山' },
- { title: '抚顺' },
- { title: '抚州' },
- { title: '阜新' },
- { title: '阜阳' },
- ],
- },
- {
- title: 'G开头',
- index: 'G',
- children: [
- { title: '广州' },
- { title: '桂林' },
- { title: '贵阳' },
- { title: '甘南' },
- { title: '赣州' },
- { title: '甘孜' },
- { title: '广安' },
- { title: '广元' },
- { title: '贵港' },
- { title: '果洛' },
- ],
- },
-];
-
-const number = [
- {
- title: '第一章',
- index: '1',
- children: [
- { title: '第一章第一节' },
- { title: '第一章第二节' },
- { title: '第一章第三节' },
- { title: '第一章第四节' },
- { title: '第一章第五节' },
- ],
- },
- {
- title: '第二章',
- index: '2',
- children: [
- { title: '第二章第一节' },
- { title: '第二章第二节' },
- { title: '第二章第三节' },
- { title: '第二章第四节' },
- { title: '第二章第五节' },
- ],
- },
- {
- title: '第三章',
- index: '3',
- children: [
- { title: '第三章第一节' },
- { title: '第三章第二节' },
- { title: '第三章第三节' },
- { title: '第三章第四节' },
- { title: '第三章第五节' },
- ],
- },
- {
- title: '第四章',
- index: '4',
- children: [
- { title: '第四章第一节' },
- { title: '第四章第二节' },
- { title: '第四章第三节' },
- { title: '第四章第四节' },
- { title: '第四章第五节' },
- ],
- },
- {
- title: '第五章',
- index: '5',
- children: [
- { title: '第五章第一节' },
- { title: '第五章第二节' },
- { title: '第五章第三节' },
- { title: '第五章第四节' },
- { title: '第五章第五节' },
- ],
- },
- {
- title: '第六章',
- index: '6',
- children: [
- { title: '第六章第一节' },
- { title: '第六章第二节' },
- { title: '第六章第三节' },
- { title: '第六章第四节' },
- { title: '第六章第五节' },
- ],
- },
-];
-
-export { letter, number };
diff --git a/example/pages/indexes/display.json b/example/pages/indexes/display.json
deleted file mode 100644
index d3a39e77f..000000000
--- a/example/pages/indexes/display.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Indexes 索引",
- "navigationBarBackgroundColor": "#fff"
-}
\ No newline at end of file
diff --git a/example/pages/indexes/display.ts b/example/pages/indexes/display.ts
deleted file mode 100644
index 74fdf8f6d..000000000
--- a/example/pages/indexes/display.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * @Author: shiyanzhang
- * @Date: 2021-09-26 15:06:16
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/indexes/display.ts
- */
-import { letter, number } from './data.js';
-
-Page({
- data: {
- list: letter,
- barHeight: null as any,
- },
- onLoad(options) {
- const { type } = options;
- let list = letter;
- if (type === 'number') {
- list = number;
- }
-
- this.setData({ list });
- },
- onReady() {
- this.getTopHeight().then((res: any) => {
- const { windowHeight } = wx.getSystemInfoSync();
- this.setData({
- barHeight: windowHeight - res.top,
- });
- });
- },
- onShow() {},
- getTopHeight() {
- return new Promise((resolve) => {
- const query = wx.createSelectorQuery();
- query
- .select('#bar')
- .boundingClientRect((res) => {
- resolve(res);
- })
- .exec();
- });
- },
- tapShowLetter() {
- this.setData({ list: letter });
- },
- tapShowNumber() {
- this.setData({ list: number });
- },
- onSelect(e) {
- const { indexes } = e.detail;
- if (indexes.length < 2) {
- console.warn('需要两个index才能确定city');
- return;
- }
- const group = this.data.list[indexes[0]];
- const city = group.children[indexes[1]];
- wx.showToast({
- icon: 'none',
- title: `你选择了: ${group.title}>${city.title}`,
- });
- },
-});
diff --git a/example/pages/indexes/display.wxml b/example/pages/indexes/display.wxml
deleted file mode 100644
index d1ed0a3c5..000000000
--- a/example/pages/indexes/display.wxml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/example/pages/indexes/indexes.json b/example/pages/indexes/indexes.json
deleted file mode 100644
index 6488843ed..000000000
--- a/example/pages/indexes/indexes.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Indexes 索引",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/indexes/indexes.less b/example/pages/indexes/indexes.less
deleted file mode 100644
index 0078e0192..000000000
--- a/example/pages/indexes/indexes.less
+++ /dev/null
@@ -1,35 +0,0 @@
-.indexes {
- background-color: #fff;
- font-size: 32rpx;
- line-height: 48rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 48rpx 0rpx 96rpx 0rpx;
- min-height: 100vh;
-
- .box {
- margin: 0 32rpx;
- }
-
- .sub-title {
- margin-top: 40rpx;
- font-weight: bold;
- padding: 0 32rpx;
- }
-
- .button-wrap {
- display: flex;
- margin: 32rpx 0 64rpx;
- }
-
- .type-button {
- height: 80rpx;
- border-radius: 8rpx;
- border: 1rpx solid #dcdcdc;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- color: rgba(0, 0, 0, 0.9);
- margin-bottom: 18px;
- }
-}
diff --git a/example/pages/indexes/indexes.ts b/example/pages/indexes/indexes.ts
deleted file mode 100644
index d4d64489a..000000000
--- a/example/pages/indexes/indexes.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * @Author: shiyanzhang
- * @Date: 2021-08-24 19:27:04
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/indexes/indexes.ts
- */
-
-Page({
- data: {},
- onLoad() {},
- onReady() {},
- onShow() {},
- tapShowLetter() {
- wx.navigateTo({ url: '/pages/indexes/display?type=letter' });
- },
- tapShowNumber() {
- wx.navigateTo({ url: '/pages/indexes/display?type=number' });
- },
-});
diff --git a/example/pages/indexes/indexes.wxml b/example/pages/indexes/indexes.wxml
deleted file mode 100644
index 04d0b2603..000000000
--- a/example/pages/indexes/indexes.wxml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- Indexes 索引
- 用于页面中信息快速检索,可以根据目录中的页码快速找到所需的内容。
-
-
-
- 字母索引
-
-
- 数字索引
-
-
-
-
diff --git a/example/pages/input/api.md b/example/pages/input/api.md
deleted file mode 100644
index 06f6bdafb..000000000
--- a/example/pages/input/api.md
+++ /dev/null
@@ -1,32 +0,0 @@
-### Input Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| -------------- | --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- | -------- | --- |
-| adjustPosition | Boolean | true | 键盘弹起时,是否自动上推页面 | N |
-| align | String | left | 文本内容位置,居左/居中/居右。可选值:left/center/right | N |
-| autofocus | Boolean | false | 自动聚焦 | N |
-| clearable | Boolean | false | 是否可清空 | N |
-| confirmHold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起点 | N |
-| confirmType | String | done | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选值:send/search/next/go/done | N |
-| disabled | Boolean | false | 是否禁用输入框 | N |
-| errorMessage | String | - | 错误提示文本 | N |
-| focus | Boolean | false | 自动聚焦 | N |
-| maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 | N |
-| maxlength | Number | - | 用户最多可以输入的文本长度。值小于等于 0 的时候,则不限制输入长度 | N |
-| name | String | - | 名称 | N |
-| placeholder | String | - | 占位符 | N |
-| size | String | small | 输入框尺寸。可选值:small/medium。TS 类型:`'medium' | 'small'` | N |
-| suffix | String | - | 后置文本内容 | N |
-| suffixIcon | String / Slot | - | 组件后置图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| type | String | text | 输入框类型。可选值:text/number/idcard/digit/safe-password/password | N |
-| value | String / Number | - | 输入框的值。TS 类型:`InputValue`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts) | N |
-
-### Input Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ---------------------------------------------------- | ---------------------- |
-| blur | `(value: InputValue, context: { e: FocusEvent })` | 失去焦点时触发 |
-| change | `(value: InputValue` | 输入框值发生变化时触发 |
-| clear | `(context: { e: MouseEvent })` | 清空按钮点击时触发 |
-| enter | `(value: InputValue, context: { e: KeyboardEvent })` | 回车键按下时触发 |
-| focus | `(value: InputValue, context: { e: FocusEvent })` | 获得焦点时触发 |
diff --git a/example/pages/input/input.json b/example/pages/input/input.json
deleted file mode 100644
index 534538fb9..000000000
--- a/example/pages/input/input.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Input 输入框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/input/input.less b/example/pages/input/input.less
deleted file mode 100644
index ec8d8a12a..000000000
--- a/example/pages/input/input.less
+++ /dev/null
@@ -1,16 +0,0 @@
-.input-example {
- padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
- padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
- .cell {
- margin-bottom: 32rpx;
- }
-
- .verify {
- font-size: 32rpx;
- color: #0052d9;
- }
-
- .error-msg {
- text-align: right !important;
- }
-}
diff --git a/example/pages/input/input.wxml b/example/pages/input/input.wxml
deleted file mode 100644
index 770304c1f..000000000
--- a/example/pages/input/input.wxml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
- Input 输入框
- 用于单行文本信息输入。
-
-
-
-
-
- 标签文字 *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发送验证码
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/loading/loading.json b/example/pages/loading/loading.json
deleted file mode 100644
index 20398bf01..000000000
--- a/example/pages/loading/loading.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Loading",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/loading/loading.less b/example/pages/loading/loading.less
deleted file mode 100644
index cd80b1126..000000000
--- a/example/pages/loading/loading.less
+++ /dev/null
@@ -1,96 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.demo {
- .demo-title {
- margin-top: 48rpx;
- }
-
- .demo-desc {
- margin-top: 16rpx;
- }
-}
-
-.loading-container-flex {
- display: flex;
- align-items: center;
- margin: 36rpx 32rpx;
- font-size: 24rpx;
-
- t-loading {
- min-width: 20%;
- margin-right: 40rpx;
- display: flex;
- }
-}
-
-.loading-container-flex-column {
- display: block;
- margin-left: 32rpx;
- font-size: 24rpx;
-
- t-loading {
- display: flex;
- margin-top: 32rpx;
- }
-}
-
-.loading-style {
- display: flex;
- margin: 36rpx 32rpx;
- font-size: 24rpx;
-}
-
-.box {
- margin: 0 32rpx;
-}
-
-.t-slider__container {
- margin: 0 32rpx;
-}
-
-.t-switch__label {
- margin-right: 0px !important;
-}
-
-.progress-btn {
- display: block;
- margin-top: 32rpx;
-}
-
-.text-info {
- margin-left: 24rpx;
- color: rgba(0, 0, 0, 0.4);
-}
-
-.text-m {
- font-size: 28rpx;
-}
-
-.text-l {
- font-size: 32rpx;
-}
-
-.indicator-blue {
- color: #0052d9;
-}
-
-.indicator-black {
- color: #000000 !important;
-}
-
-.text-blue {
- color: #0052d9;
-}
-
-.slider-container {
- display: flex;
- align-items: center;
- width: 718rpx;
- padding-left: 32rpx;
-
- .slider-class {
- flex-grow: 1;
- }
-}
diff --git a/example/pages/loading/loading.ts b/example/pages/loading/loading.ts
deleted file mode 100644
index aa9096b3d..000000000
--- a/example/pages/loading/loading.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-Page({
- data: {
- isCheck: false,
- duration: 800,
- },
-
- switchChange() {
- const { isCheck } = this.data;
- this.setData({ isCheck: !isCheck });
- },
-
- durationChange(e) {
- this.setData({ duration: e.detail.value });
- },
-
- goToProgress() {
- wx.redirectTo({
- url: '/pages/loading/loadingProgress/loadingProgress',
- });
- },
-
- reloadPage() {
- wx.redirectTo({
- url: '/pages/loading/loading',
- });
- },
-});
diff --git a/example/pages/loading/loading.wxml b/example/pages/loading/loading.wxml
deleted file mode 100644
index 89871d104..000000000
--- a/example/pages/loading/loading.wxml
+++ /dev/null
@@ -1,80 +0,0 @@
-
- Loading 加载
- 用于表示页面或操作的加载状态,给予用户反馈的同时减缓等待的焦虑感,由一个或一组反馈动效组成。
-
-
- 纯icon
-
-
-
-
-
- icon加文字横向
-
-
-
-
- 加载中...
-
-
- icon加文字竖向
-
- 纯文字
-
- 加载失败
-
- 进度条加载
-
- 页面进度条加载
-
-
-
-
-
-
- {{isCheck?'请求发起,延迟显示loading加载':'请求结束,隐藏loading加载'}}
-
-
-
-
-
-
-
-
-
- 速度调整
-
-
-
-
-
- 支持自定义加载规格
-
-
-
-
-
-
-
diff --git a/example/pages/loading/loadingProgress/loadingProgress.json b/example/pages/loading/loadingProgress/loadingProgress.json
deleted file mode 100644
index 16738c730..000000000
--- a/example/pages/loading/loadingProgress/loadingProgress.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "页面加载样式",
- "usingComponents": {}
-}
diff --git a/example/pages/loading/loadingProgress/loadingProgress.ts b/example/pages/loading/loadingProgress/loadingProgress.ts
deleted file mode 100644
index cc993fa9e..000000000
--- a/example/pages/loading/loadingProgress/loadingProgress.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-Page({
- data: {
- progress: 100,
- isLoading: false,
- barLoadingTimeOut: null,
- },
-
- onLoad() {
- const timeout = setTimeout(() => {
- this.setData({ isLoading: false });
- }, 10000);
- this.setData({
- progress: -1,
- isLoading: true,
- barLoadingTimeOut: timeout,
- });
- },
-
- onUnload() {
- clearTimeout(this.data.barLoadingTimeOut);
- },
-});
diff --git a/example/pages/loading/loadingProgress/loadingProgress.wxml b/example/pages/loading/loadingProgress/loadingProgress.wxml
deleted file mode 100644
index 2f3d6c89c..000000000
--- a/example/pages/loading/loadingProgress/loadingProgress.wxml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/example/pages/message/message.json b/example/pages/message/message.json
deleted file mode 100644
index 200101f2e..000000000
--- a/example/pages/message/message.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Message",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/message/message.less b/example/pages/message/message.less
deleted file mode 100644
index c1218f389..000000000
--- a/example/pages/message/message.less
+++ /dev/null
@@ -1,15 +0,0 @@
-page {
- background: #fff;
-}
-
-.demo-block__oper {
- padding: 0 32rpx;
-}
-
-.button-group {
- margin-top: 32rpx;
-
- .button-group-item {
- margin-bottom: 32rpx;
- }
-}
diff --git a/example/pages/message/message.ts b/example/pages/message/message.ts
deleted file mode 100644
index 49d7dda12..000000000
--- a/example/pages/message/message.ts
+++ /dev/null
@@ -1,148 +0,0 @@
-import Message from 'tdesign-miniprogram/message/index';
-
-Page({
- data: {
- operList1: [
- {
- title: '弹窗内容为纯文本、标题和副标题、带输入框',
- btns: [
- {
- type: 'text',
- text: '纯文字通知',
- },
- {
- type: 'icon',
- text: '带图标通知',
- },
- {
- type: 'closeable',
- text: '带关闭通知',
- },
- {
- type: 'scroll',
- text: '滚动通知',
- },
- {
- type: 'btn',
- text: '带按钮通知',
- },
- ],
- },
- ],
- operList2: [
- {
- title: '弹窗状态为普通弹窗、警示提示弹窗、成功提示弹窗、错误提示弹窗。',
- btns: [
- {
- type: 'info',
- text: '普通通知',
- },
- {
- type: 'warning',
- text: '警示提示通知',
- },
- {
- type: 'success',
- text: '成功提示通知',
- },
- {
- type: 'error',
- text: '错误提示通知',
- },
- ],
- },
- ],
- },
- showMessage(e) {
- switch (e.detail) {
- case 'text': {
- Message.info({
- offset: [20, 32],
- duration: 5000,
- icon: false,
- content: '这是一条纯文字的消息通知 5s消失',
- });
- break;
- }
- case 'icon': {
- Message.info({
- offset: ['20rpx', '32rpx'],
- duration: 5000,
- icon: 'error-circle',
- content: '这是一条带图标的消息通知 5s消失',
- });
- break;
- }
- case 'closeable': {
- Message.info({
- offset: ['20rpx', 32],
- icon: 'error-circle',
- content: '这是一条带关闭的消息通知 常驻可关闭',
- duration: -1,
- closeBtn: true,
- });
- break;
- }
- case 'scroll': {
- Message.info({
- offset: [20, 32],
- marquee: { speed: 50, loop: -1, delay: 5000 },
- icon: false,
- content: '这是一条滚动的通知信息',
- duration: -1,
- });
- break;
- }
- case 'btn': {
- Message.info({
- offset: [20, 32],
- icon: 'notification',
- content: '这是一条带操作的消息通知',
- duration: -1,
- action: '按钮',
- });
- break;
- }
- case 'info': {
- Message.info({
- offset: [20, 32],
- duration: 5000,
- content: '这是一条普通通知信息',
- });
- break;
- }
- case 'warning': {
- Message.warning({
- offset: [20, 32],
- duration: -1,
- content: '这是一条需要用户关注到的警示通知',
- });
- break;
- }
- case 'success': {
- Message.success({
- offset: [20, 32],
- duration: -1,
- content: '这是一条需要成功的提示消息',
- });
- break;
- }
- case 'error': {
- Message.error({
- offset: [20, 32],
- duration: -1,
- content: '这是一条错误提示通知',
- });
- break;
- }
- default: {
- break;
- }
- }
- },
-
- clickMessageBtnHadnle({ detail: { self } }) {
- wx.showToast({ title: '点击按钮' });
- self.hide();
- },
-});
diff --git a/example/pages/message/message.wxml b/example/pages/message/message.wxml
deleted file mode 100644
index c7e3d9447..000000000
--- a/example/pages/message/message.wxml
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Message 消息通知
- 用于轻量级反馈或提示,不会打断用户操作。
-
-
-
-
diff --git a/example/pages/navbar/navbar.json b/example/pages/navbar/navbar.json
deleted file mode 100644
index 7d6f365d9..000000000
--- a/example/pages/navbar/navbar.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationStyle": "custom",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/navbar/navbar.less b/example/pages/navbar/navbar.less
deleted file mode 100644
index 12416ed88..000000000
--- a/example/pages/navbar/navbar.less
+++ /dev/null
@@ -1,63 +0,0 @@
-page {
- background: #fff;
-}
-
-.slot-left {
- padding-left: 20rpx;
-}
-
-.demo-block__oper {
- margin: 0 32rpx;
-}
-
-.img {
- height: 50rpx;
- width: 280rpx;
-}
-
-.t-navbar__left {
- width: 100% !important;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.long-brand {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
-}
-
-.navbar {
- background-color: #999;
-}
-
-.left-icon-slot {
- overflow: hidden;
-}
-
-.left-icon-back {
- font-size: 24px !important;
-}
-
-.home-icon {
- font-size: 24px !important;
-}
-
-.nav-title {
- font-size: 16px !important;
-}
-
-.capsule {
- width: 180rpx;
- height: 48rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-left: 24rpx;
- line-height: 48rpx;
- border-radius: 32rpx;
- background: rgba(0, 0, 0, .14);
- border: 1rpx solid rgba(255, 255, 255, .2);
- font-size: 24rpx;
-}
diff --git a/example/pages/navbar/navbar.ts b/example/pages/navbar/navbar.ts
deleted file mode 100644
index 5d416e0f9..000000000
--- a/example/pages/navbar/navbar.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-Page({
- data: {
- demoType: 'base-default',
- normalOperList: [
- {
- title: '基础导航栏',
- btns: [
- {
- type: 'base-default',
- text: '基础导航栏',
- },
- {
- type: 'base-back',
- text: '带返回导航栏',
- },
- {
- type: 'base-back-home',
- text: '带返回、主页按钮导航栏',
- },
- {
- type: 'base-brand',
- text: '自定义品牌导航栏',
- },
- {
- type: 'base-img',
- text: '自定义图片导航栏',
- },
- ],
- },
- ],
- specialOperList: [
- {
- title: '品牌超长文字导航栏',
- btns: [
- {
- type: 'base-brand-long',
- text: '品牌超长文字导航栏',
- },
- {
- type: 'custom-capsule',
- text: '自定义导航胶囊',
- },
- ],
- },
- ],
- },
-
- onGoHome() {
- wx.navigateTo({
- url: '/pages/index',
- });
- },
-
- /** 切换 navbar 示例 */
- clickHandle(e) {
- const key = e.detail;
- this.setData({
- demoType: key,
- });
- },
-});
diff --git a/example/pages/navbar/navbar.wxml b/example/pages/navbar/navbar.wxml
deleted file mode 100644
index 27c643822..000000000
--- a/example/pages/navbar/navbar.wxml
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 品牌名称
-
-
-
-
-
-
-
-
-
-
- 品牌名称最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长
-
-
-
-
-
- 自定义胶囊
-
-
-
-
- NavBar 导航栏
- 用于不同页面之间切换或者跳转,位于内容区的上方,系统状态栏的下方。
-
-
-
diff --git a/example/pages/notice-bar/notice-bar.json b/example/pages/notice-bar/notice-bar.json
deleted file mode 100644
index ff3d083fb..000000000
--- a/example/pages/notice-bar/notice-bar.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "navigationBarTitleText": "NoticeBar",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {}
-}
diff --git a/example/pages/notice-bar/notice-bar.less b/example/pages/notice-bar/notice-bar.less
deleted file mode 100644
index 97ce35201..000000000
--- a/example/pages/notice-bar/notice-bar.less
+++ /dev/null
@@ -1,19 +0,0 @@
-.demo {
- .demo-section__desc {
- margin: 0 32rpx 32rpx;
- }
-
- .box {
- margin-bottom: 32rpx;
-
- .t-class {
- color: #ffffff;
- background-color: #a6a6a6;
- }
- .extra {
- display: inline-block;
- font-weight: 700;
- border-bottom: 2rpx solid;
- }
- }
-}
diff --git a/example/pages/notice-bar/notice-bar.ts b/example/pages/notice-bar/notice-bar.ts
deleted file mode 100644
index d4d01c330..000000000
--- a/example/pages/notice-bar/notice-bar.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-Page({
- data: {
- visible: true,
- marquee1: {
- speed: 80,
- loop: -1,
- delay: 0,
- },
- marquee2: {
- speed: 60,
- loop: -1,
- delay: 0,
- },
- },
-
- onReady() {
- /**
- * notice-bar组件的滚动动画依赖自身样式数据。
- * 页面中有多个滚动notice-bar时,建议用wx:if手动控制,需要显示时渲染组件,保证组件能够成功初始化。
- * */
- },
-
- click(e) {
- const { trigger } = e.detail;
- if (trigger === 'prefix-icon') {
- console.log('click prefix-icon text');
- } else if (trigger === 'content') {
- console.log('click content text');
- } else if (trigger === 'extra') {
- console.log('click extra text');
- } else if (trigger === 'suffix-icon') {
- console.log('click suffix-icon text');
- }
- },
-
- clickDetail() {
- console.log('click detail text');
- },
-});
diff --git a/example/pages/notice-bar/notice-bar.wxml b/example/pages/notice-bar/notice-bar.wxml
deleted file mode 100644
index f69741963..000000000
--- a/example/pages/notice-bar/notice-bar.wxml
+++ /dev/null
@@ -1,108 +0,0 @@
-
- NoticeBar 公告栏
- 在导航栏下方,用于给用户显示提示消息
-
-
-
-
-
- 带图标静态公告栏
-
-
-
-
-
-
-
-
- 带操作公告栏
-
-
-
-
-
- 提示文字描述提示文字描述
-
-
-
-
- 滚动公告栏
-
-
-
-
-
-
- 自定义样式
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 自定义样式
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提示文字描述提示文字描述提示文字描述提示文字描述提示文字描述提示文字描述
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/picker/picker.json b/example/pages/picker/picker.json
deleted file mode 100644
index f294ad3be..000000000
--- a/example/pages/picker/picker.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Picker 选择器",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/picker/picker.less b/example/pages/picker/picker.less
deleted file mode 100644
index 3ffd58732..000000000
--- a/example/pages/picker/picker.less
+++ /dev/null
@@ -1,38 +0,0 @@
-.area-picker-demo {
- height: 100vh;
- overflow: hidden;
-
- .demo-section__desc {
- margin-top: 32rpx;
- margin-bottom: 32rpx;
- }
-
- .pannel-item {
- display: flex;
- align-items: center;
- height: 96rpx;
- padding: 0 32rpx;
- font-size: 32rpx;
- margin-bottom: 32rpx;
- background-color: #fff;
-
- &.last {
- margin-bottom: -13rpx;
- }
- }
-
- .pannel-label {
- width: 160rpx;
- margin-right: 32rpx;
- }
-
- .pannel-text {
- flex: 1;
- color: #000;
- opacity: .9;
-
- &.empty {
- opacity: .26;
- }
- }
-}
diff --git a/example/pages/picker/picker.ts b/example/pages/picker/picker.ts
deleted file mode 100644
index 907ed5006..000000000
--- a/example/pages/picker/picker.ts
+++ /dev/null
@@ -1,160 +0,0 @@
-Page({
- data: {
- picker1Visible: false,
- picker2Visible: false,
- picker3Visible: false,
- picker4Visible: false,
- picker5Visible: false,
- picker6Visible: false,
-
- pickerTitle: '',
- citys: [
- { label: '北京', value: '北京' },
- { label: '上海', value: '上海' },
- { label: '广州', value: '广州' },
- { label: '深圳', value: '深圳' },
- { label: '成都', value: '成都' },
- ],
- years: [
- { label: '2021年', value: '2021' },
- { label: '2020年', value: '2020' },
- { label: '2019年', value: '2019' },
- ],
- months: Array.from(new Array(12), (_, index) => ({
- label: `${index + 1}月`,
- value: index + 1,
- })),
- days: Array.from(new Array(31), (_, index) => ({ label: `${index + 1}日`, value: index + 1 })),
- seasons: [
- { label: '春', value: '春' },
- { label: '夏', value: '夏' },
- { label: '秋', value: '秋' },
- { label: '冬', value: '冬' },
- ],
- selectedCityValue: '广州',
- selectedYearsWithSeason: '',
- selectedYearsWithDate: '',
- selectedSeason: '',
- selectedMonth: '',
- selectedDay: '',
-
- // 带标题的选中值
- selectedCityValue2: '广州',
- selectedYearsWithSeason2: '',
- selectedYearsWithDate2: '',
- selectedSeason2: '',
- selectedMonth2: '',
- selectedDay2: '',
- },
-
- onColumnChange(e) {
- console.log('column change:', e.detail);
- },
-
- onClickPicker(e) {
- const { index } = e?.currentTarget?.dataset;
-
- this.setData({
- [`picker${index}Visible`]: true,
- });
- },
-
- onPickerChange(e) {
- console.log('picker change:', e.detail);
- },
-
- /** **********************Picker1*************************** */
- onPicker1Confirm(e) {
- console.log('picker1 confirm:', e.detail);
- this.setData({
- picker1Visible: false,
- selectedCityValue: e.detail.value[0].value,
- });
- },
- onPicker1Cancel() {
- console.log('picker1 cancel:');
- this.setData({
- picker1Visible: false,
- });
- },
- /** **********************Picker1*************************** */
-
- /** **********************Picker2*************************** */
- onPicker2Confirm(e) {
- console.log('picker2 confirm:', e.detail);
- this.setData({
- picker2Visible: false,
- selectedYearsWithSeason: e.detail.value[0]?.value,
- selectedSeason: e.detail.value[1]?.value,
- });
- },
- onPicker2Cancel() {
- console.log('picker2 cancel:');
- this.setData({
- picker2Visible: false,
- });
- },
- /** **********************Picker2*************************** */
-
- /** **********************Picker3*************************** */
- onPicker3Confirm(e) {
- console.log('picker3 confirm:', e.detail);
- this.setData({
- picker3Visible: false,
- selectedYearsWithDate: e.detail.value[0]?.value,
- selectedMonth: e.detail.value[1]?.value,
- selectedDay: e.detail.value[2]?.value,
- });
- },
-
- onPicker3Cancel() {
- console.log('picker3 cancel:');
- this.setData({
- picker3Visible: false,
- });
- },
- /** **********************Picker3*************************** */
-
- /** **********************Picker4*************************** */
- onPicker4Confirm(e) {
- console.log(4);
- this.setData({
- picker4Visible: false,
- selectedCityValue2: e.detail.value[0].value,
- });
- },
- onPicker4Cancel() {
- this.setData({
- picker4Visible: false,
- });
- },
-
- /** **********************Picker5*************************** */
- onPicker5Confirm(e) {
- this.setData({
- picker5Visible: false,
- selectedYearsWithSeason2: e.detail.value[0]?.value,
- selectedSeason2: e.detail.value[1]?.value,
- });
- },
- onPicker5Cancel() {
- this.setData({
- picker5Visible: false,
- });
- },
- /** **********************Picker6*************************** */
- onPicker6Confirm(e) {
- this.setData({
- picker6Visible: false,
- selectedYearsWithDate2: e.detail.value[0]?.value,
- selectedMonth2: e.detail.value[1]?.value,
- selectedDay2: e.detail.value[2]?.value,
- });
- },
-
- onPicker6Cancel() {
- this.setData({
- picker6Visible: false,
- });
- },
-});
diff --git a/example/pages/picker/picker.wxml b/example/pages/picker/picker.wxml
deleted file mode 100644
index 229dcb1ac..000000000
--- a/example/pages/picker/picker.wxml
+++ /dev/null
@@ -1,131 +0,0 @@
-
- Picker 选择器
- 用于一组预设数据中的选择。
-
-
- 城市
- {{selectedCityValue || '选择城市'}}
-
-
-
- 年份和季节
-
- {{selectedYearsWithSeason}} {{selectedSeason}} {{ !selectedYearsWithSeason ? '选择年份和季节' : ''}}
-
-
-
- 日期
-
- {{selectedYearsWithDate}} {{selectedMonth}} {{selectedDay}} {{!selectedYearsWithDate ? '选择日期' : ''}}
-
-
-
-
-
- 城市
- {{selectedCityValue2 || '选择城市'}}
-
-
-
- 年份和季节
-
- {{selectedYearsWithSeason2}} {{selectedSeason2}} {{ !selectedYearsWithSeason2 ? '选择年份和季节' : ''}}
-
-
-
- 日期
-
- {{selectedYearsWithDate2}} {{selectedMonth2}} {{selectedDay2}} {{!selectedYearsWithDate2 ? '选择日期' :
- ''}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/popup/popup.json b/example/pages/popup/popup.json
deleted file mode 100644
index 6c52c1230..000000000
--- a/example/pages/popup/popup.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "popup 弹窗",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/popup/popup.less b/example/pages/popup/popup.less
deleted file mode 100644
index 6fe8d59f5..000000000
--- a/example/pages/popup/popup.less
+++ /dev/null
@@ -1,62 +0,0 @@
-page {
- background: #fff;
-}
-
-page .demo-block__oper {
- margin: 0 32rpx;
-}
-
-.tdesign-demo-popup {
- .demo-title {
- margin-bottom: 48rpx;
- font-size: 32rpx;
- font-weight: 500;
- }
-
- .t-button + .t-button {
- margin-left: 16rpx;
- }
-
- .t-button {
- margin-top: 20rpx;
- }
-
- .block {
- width: 176rpx;
- height: 176rpx;
- background: #fff;
- color: #333;
- display: flex;
- align-items: center;
- justify-content: center;
-
- &--border {
- border: 1rpx solid #d8d8d8;
- }
-
- &--left,
- &--right {
- width: 87vw;
- height: 100vh;
- border-radius: 0;
- }
-
- &--middle {
- border-radius: 16rpx;
- }
-
- &--top {
- width: 100vw;
- height: 35vh;
- border-bottom-left-radius: 16rpx;
- border-bottom-right-radius: 16rpx;
- }
-
- &--bottom {
- width: 100vw;
- height: 35vh;
- border-top-left-radius: 16rpx;
- border-top-right-radius: 16rpx;
- }
- }
-}
diff --git a/example/pages/popup/popup.ts b/example/pages/popup/popup.ts
deleted file mode 100644
index 0ab866047..000000000
--- a/example/pages/popup/popup.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-Page({
- data: {
- bottom: false,
- top: false,
- center: false,
- left: false,
- right: false,
- operList: [
- {
- title: '弹出层出现为止可能为顶部、底部、中部、左侧或右侧',
- btns: [
- {
- type: 'top',
- text: '顶部弹出',
- },
- {
- type: 'bottom',
- text: '底部弹出',
- },
- {
- type: 'center',
- text: '中部弹出',
- },
- {
- type: 'left',
- text: '左侧弹出',
- },
- {
- type: 'right',
- text: '右侧弹出',
- },
- ],
- },
- ],
- },
-
- clickHandle({ detail: placement }) {
- this.setData({
- [`${placement}`]: true,
- });
- },
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
-
- onVisibleChange({ detail }) {
- const { visible } = detail;
- this.setData({
- top: visible,
- bottom: visible,
- center: visible,
- left: visible,
- right: visible,
- });
- },
-
- onClose() {
- this.setData({
- visible: false,
- });
- },
-});
diff --git a/example/pages/popup/popup.wxml b/example/pages/popup/popup.wxml
deleted file mode 100644
index 4f4d40355..000000000
--- a/example/pages/popup/popup.wxml
+++ /dev/null
@@ -1,26 +0,0 @@
-Popup 弹出层
-由其他控件触发,屏幕滑出或弹出一块自定义内容区域。
-
diff --git a/example/pages/progress/progress.json b/example/pages/progress/progress.json
deleted file mode 100644
index 7fa4c67fc..000000000
--- a/example/pages/progress/progress.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "navigationBarTitleText": "Progress 进度条",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {}
-}
diff --git a/example/pages/progress/progress.less b/example/pages/progress/progress.less
deleted file mode 100644
index 22c1c6f98..000000000
--- a/example/pages/progress/progress.less
+++ /dev/null
@@ -1,18 +0,0 @@
-.box {
- background-color: #fff;
- padding: 16rpx 32rpx;
- margin-bottom: 32rpx;
-
- .button-group {
- display: flex;
- justify-content: center;
- padding-bottom: 16rpx;
- .space {
- width: 32rpx;
- }
- }
-
- .t-class-label {
- color: #d504d9;
- }
-}
diff --git a/example/pages/progress/progress.ts b/example/pages/progress/progress.ts
deleted file mode 100644
index 30ee8f2e0..000000000
--- a/example/pages/progress/progress.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-Page({
- data: {
- percentage: 88,
- },
-
- clickAdd() {
- this.setData({
- percentage: this.data.percentage + 10,
- });
- },
-
- clickReduce() {
- this.setData({
- percentage: Math.max(0, this.data.percentage - 10),
- });
- },
-});
diff --git a/example/pages/progress/progress.wxml b/example/pages/progress/progress.wxml
deleted file mode 100644
index c5e686ad3..000000000
--- a/example/pages/progress/progress.wxml
+++ /dev/null
@@ -1,62 +0,0 @@
-
- Progress 进度条
- 在导航栏下方,用于给用户显示提示消息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 进度状态发生重大错误
-
-
-
-
- 进度中止
-
-
-
-
- 进度完成
-
-
-
-
- 过度样式
-
-
-
- 减少
-
- 增加
-
-
-
- 自定义颜色
-
-
-
-
-
-
-
-
-
-
- 无数值进度条
-
-
-
-
-
diff --git a/example/pages/pull-down-refresh/pull-down-refresh.json b/example/pages/pull-down-refresh/pull-down-refresh.json
deleted file mode 100644
index 9b9bddc7f..000000000
--- a/example/pages/pull-down-refresh/pull-down-refresh.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "PullDownRefresh 下拉刷新",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/pull-down-refresh/pull-down-refresh.less b/example/pages/pull-down-refresh/pull-down-refresh.less
deleted file mode 100644
index 3db527d8b..000000000
--- a/example/pages/pull-down-refresh/pull-down-refresh.less
+++ /dev/null
@@ -1,33 +0,0 @@
-page {
- background: #fff;
- .demo {
- padding-bottom: 0;
- }
-}
-
-.pulldown-reflesh__content {
- justify-content: space-between;
- margin: 0 24rpx;
- flex-wrap: wrap;
- padding-bottom: 32rpx;
- position: relative;
-
- .text {
- position: absolute;
- top: 152rpx;
- left: 0;
- right: 0;
- text-align: center;
- font-size: 32rpx;
- color: rgba(0, 0, 0, .26);
- width: 686rpx;
- }
-}
-
-.indicator-blue {
- color: #0052d9;
-}
-
-.skeleton-text {
- border-radius: 16rpx;
-}
diff --git a/example/pages/pull-down-refresh/pull-down-refresh.ts b/example/pages/pull-down-refresh/pull-down-refresh.ts
deleted file mode 100644
index 6f3dd45ca..000000000
--- a/example/pages/pull-down-refresh/pull-down-refresh.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-Page({
- pullDownRefresh0: null as WechatMiniprogram.Component.TrivialInstance | null,
- pullDownRefresh1: null as WechatMiniprogram.Component.TrivialInstance | null,
- data: {
- error: false,
- loadingProps0: {
- size: '50rpx',
- },
- loadingProps1: {
- size: '60rpx',
- },
- rowCol: [
- { width: '100%', height: '342rpx' },
- [
- { width: '332.26rpx', height: '32rpx' },
- { width: '332.26rpx', height: '32rpx', marginLeft: '21.5rpx' },
- ],
- [
- { width: '213.04rpx', height: '32rpx' },
- { width: '213.04rpx', height: '32rpx', marginLeft: '140.72rpx' },
- ],
- ],
- },
- onLoad() {
- this.pullDownRefresh0 = this.selectComponent('#pull-down-refresh-0');
- this.pullDownRefresh1 = this.selectComponent('#pull-down-refresh-1');
- },
- // 监听页面滚动事件,并调用pull-down-refresh组件的onPageScroll方法
- // 组件内根据页面滚动距离来判定页面是否到顶部,页面回到顶部后才能下拉刷新
- onPageScroll(e) {
- this.pullDownRefresh0 && this.pullDownRefresh0.onPageScroll(e);
- this.pullDownRefresh1 && this.pullDownRefresh1.onPageScroll(e);
- },
-
- onPullDownRefresh0(e) {
- // 模拟1秒刷新完成
- const { callback } = e.detail;
-
- if (callback) {
- setTimeout(() => {
- callback();
- }, 1000);
- }
- },
-
- timeoutCallback() {
- console.log('timeout');
- },
-
- onPullDownRefresh1(e) {
- // 模拟2秒刷新完成
- const { callback } = e.detail;
-
- if (callback) {
- setTimeout(() => {
- callback();
- }, 2000);
- }
- },
-
- toggleError() {
- this.setData({
- error: !this.data.error,
- });
- },
-});
diff --git a/example/pages/pull-down-refresh/pull-down-refresh.wxml b/example/pages/pull-down-refresh/pull-down-refresh.wxml
deleted file mode 100644
index 03d0a38c3..000000000
--- a/example/pages/pull-down-refresh/pull-down-refresh.wxml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- PullDownRefresh 下拉刷新
- 用于快速刷新页面信息,刷新可以是整页刷新也可以是页面的局部刷新。
-
-
-
-
-
- 下拉刷新大致分为顶部下拉和中间下拉
-
-
-
-
-
-
-
- 拖拽该区域演示 中间下拉刷新
-
-
diff --git a/example/pages/radio/__test__/index.test.js b/example/pages/radio/__test__/index.test.js
deleted file mode 100644
index 06af72090..000000000
--- a/example/pages/radio/__test__/index.test.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* eslint-disable no-undef */
-import automator from 'miniprogram-automator';
-
-describe('radio', () => {
- let miniProgram;
- let page;
- const timeout = 1 * 60 * 1000;
- beforeAll(async () => {
- try {
- miniProgram = await automator.launch({
- projectPath: '_example',
- port: 9420,
- });
- await miniProgram.navigateTo('/pages/radio/radio');
- page = await miniProgram.currentPage();
- } catch (error) {
- console.error(error);
- }
- }, 10 * 60 * 1000);
-
- test(
- 'active class should update correctly',
- async () => {
- const basicDemo = await page.$('.basic-demo');
- const radio = await basicDemo.$('.basic-radio');
- const cell = await radio.$('t-cell');
- const button = await radio.$('.t-radio__button');
- let cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBe(-1);
- await cell.trigger('click');
- await page.waitFor(100);
- cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBeGreaterThan(-1);
- },
- timeout,
- );
- test('disabled prop', async () => {
- const basicDemo = await page.$('.disabled-demo');
- const radio = await basicDemo.$('.radio-disabled');
- const button = await radio.$('.t-radio__button');
- let cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBeGreaterThan(-1);
- const cell = await radio.$('t-cell');
- await cell.trigger('click');
- await page.waitFor(100);
- cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBeGreaterThan(-1);
- });
- test("radio group's active class should update correctly", async () => {
- const radioGroup = await page.$('.group-demo');
- const radios = await radioGroup.$$('t-radio');
- const button0 = await radios[0].$('.t-radio__button');
- let buttonCls0 = await button0.attribute('class');
- const button1 = await radios[1].$('.t-radio__button');
- let buttonCls1 = await button1.attribute('class');
- const button2 = await radios[2].$('.t-radio__button');
- let buttonCls2 = await button2.attribute('class');
- expect(buttonCls0.indexOf('t-is-active')).toBeGreaterThan(-1);
- expect(buttonCls1.indexOf('t-is-active')).toBe(-1);
- expect(buttonCls2.indexOf('t-is-active')).toBe(-1);
- const cell1 = await radios[1].$('t-cell');
- await cell1.trigger('click');
- await page.waitFor(100);
- buttonCls0 = await button0.attribute('class');
- buttonCls1 = await button1.attribute('class');
- buttonCls2 = await button2.attribute('class');
- expect(buttonCls0.indexOf('t-is-active')).toBe(-1);
- expect(buttonCls1.indexOf('t-is-active')).toBeGreaterThan(-1);
- expect(buttonCls2.indexOf('t-is-active')).toBe(-1);
- });
- afterAll(async () => {
- await miniProgram.close();
- });
-});
diff --git a/example/pages/radio/radio.json b/example/pages/radio/radio.json
deleted file mode 100644
index 8d597125a..000000000
--- a/example/pages/radio/radio.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "radio 单选框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/radio/radio.ts b/example/pages/radio/radio.ts
deleted file mode 100644
index 7f640f56d..000000000
--- a/example/pages/radio/radio.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-Page({
- data: {
- check5: false,
- activeImage: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox-checked.png',
- inActiveImage: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox.png',
- options: [
- '字符串',
- // 'string22',
- // 100,
- '数字',
- // { label: 'object1', value: 'value1', disabled: true },
- { label: '对象', value: 'value2', disabled: true },
- ],
- },
- onChange(event) {
- console.log('radio', event.detail);
- },
- toggle5(e) {
- console.log('radio', e.detail);
- this.setData({
- check5: e.detail,
- });
- },
-});
diff --git a/example/pages/radio/radio.wxml b/example/pages/radio/radio.wxml
deleted file mode 100644
index 605b22377..000000000
--- a/example/pages/radio/radio.wxml
+++ /dev/null
@@ -1,99 +0,0 @@
-
- radio 单选框
- 用于在预设的一组选项中执行单项选择,并呈现选择结果。
-
-
-
-
-
- 单选单选单选单选单选单选单选单选单选单选单选单选单选单选
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 单选单选单选单选单选单选单选单选单选单选单选单选单选单选单
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/rate/api.md b/example/pages/rate/api.md
deleted file mode 100644
index 41c9feb6e..000000000
--- a/example/pages/rate/api.md
+++ /dev/null
@@ -1,20 +0,0 @@
-### Rate Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------- | --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | --- |
-| allowHalf | Boolean | false | 是否允许半选 | N |
-| color | String / Array | - | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,两个值表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色。示例:['#ED7B2F', '#999999']。TS 类型:`string | Array` | N |
-| count | Number | 5 | 评分的数量 | N |
-| disabled | Boolean | false | 是否禁用评分 | N |
-| gap | Number | 6 | 评分图标的间距 | N |
-| showText | Boolean | false | 是否显示对应的辅助文字 | N |
-| size | String | - | 评分图标的大小,示例:`20` | N |
-| texts | Boolean / Array | false | 自定义评分等级对应的辅助文字。值为 false 或者 [] 表示不显示,值为 true 则使用组件内置的值:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1 分', '2 分', '3 分', '4 分', '5 分']。TS 类型:`boolean | Array` | N |
-| value | Number | 0 | 必需。选择评分的值 | Y |
-| variant | String | outline | 形状类型,有描边类型和填充类型两种。可选值:outline/filled | N |
-
-### Rate Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ----------------- | ---------------- |
-| change | `(value: number)` | 评分数改变时触发 |
diff --git a/example/pages/rate/rate.json b/example/pages/rate/rate.json
deleted file mode 100644
index b27e5c1bd..000000000
--- a/example/pages/rate/rate.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Rate",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/rate/rate.less b/example/pages/rate/rate.less
deleted file mode 100644
index 9ab77a235..000000000
--- a/example/pages/rate/rate.less
+++ /dev/null
@@ -1,25 +0,0 @@
-.demo {
- .item {
- background-color: #fff;
- width: 100%;
- height: 96rpx;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- padding: 0 32rpx;
- border-bottom: solid 1rpx #f0f0f0;
- border-top: solid 1rpx #f0f0f0;
- margin-top: 32rpx;
- margin-bottom: 32rpx;
-
- &__title {
- width: 200rpx;
- }
-
- &__transparent {
- background-color: transparent;
- padding-left: 32rpx;
- border: 0;
- }
- }
-}
diff --git a/example/pages/rate/rate.ts b/example/pages/rate/rate.ts
deleted file mode 100644
index b0135fa12..000000000
--- a/example/pages/rate/rate.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * @Author: rileycai
- * @Date: 2022-03-04 23:00:57
- * @LastEditTime: 2022-03-10 15:15:10
- * @LastEditors: rileycai
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/rate/rate.ts
- */
-Page({
- data: {
- value: [1, 2, 3, 3.5, 4, 5, 3, 3, 3, 3, 3, 3, 2.5],
- texts: ['1分', '2分', '3分', '4分', '5分'],
- },
-
- onChange(e) {
- const { index } = e.currentTarget.dataset;
- const { value } = e.detail;
- this.setData({
- [`value[${index}]`]: value,
- });
- },
-});
diff --git a/example/pages/rate/rate.wxml b/example/pages/rate/rate.wxml
deleted file mode 100644
index 09b0ec068..000000000
--- a/example/pages/rate/rate.wxml
+++ /dev/null
@@ -1,79 +0,0 @@
-
- Rate 评分
- 用于对某行为/事物进行打分。
-
- 实心评分
-
- 请点击评分
-
-
-
- 空心评分
-
- 请点击评分
-
-
-
- 自定义数量评分
-
- 自定义数量
-
-
-
- 半星评分
-
- 半星评价
-
-
-
- 带描述评分
-
- 请点击评分
-
-
-
- 请点击评分
-
-
- 禁用评分
-
- 仅展示
-
-
- 设置评分颜色
-
- 空心评分
-
-
-
- 实心评分
-
-
-
-
- 评价规格
-
- 规格 20
-
-
-
- 规格 16
-
-
-
-
diff --git a/example/pages/search/api.md b/example/pages/search/api.md
deleted file mode 100644
index f2c1acbab..000000000
--- a/example/pages/search/api.md
+++ /dev/null
@@ -1,25 +0,0 @@
-### Search Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| ----------- | ------- | -------- | -------------------------------- | ---- |
-| actionText | String | '' | 自定义右侧 cancel 文字 | N |
-| center | Boolean | false | 是否居中 | N |
-| disabled | Boolean | false | 是否禁用 | N |
-| focus | Boolean | false | 是否聚焦 | N |
-| keyword | String | '' | 值 | N |
-| label | String | '' | 左侧文本 | N |
-| leftIcon | String | 'search' | 左侧图标 | N |
-| placeholder | String | '' | 占位符 | N |
-| rightIcon | String | 'close' | 右侧图标 | N |
-| shape | String | 'square' | 搜索框形状。可选值:square/round | N |
-
-### Search Events
-
-| 名称 | 参数 | 描述 |
-| ------ | --------------------- | -------------------------- |
-| blur | `({ value: string })` | 失去焦点时触发 |
-| cancel | `({})` | 点击右侧 cancel 文字时触发 |
-| change | `({ value: string })` | 值发生变化时触发 |
-| clear | `({ value: string })` | 点击清除时触发 |
-| focus | `({ value: string })` | 聚焦时触发 |
-| submit | `({ value: string })` | 提交时触发 |
diff --git a/example/pages/search/search.json b/example/pages/search/search.json
deleted file mode 100644
index f3cfc6f44..000000000
--- a/example/pages/search/search.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Search",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/search/search.less b/example/pages/search/search.less
deleted file mode 100644
index 9abf52598..000000000
--- a/example/pages/search/search.less
+++ /dev/null
@@ -1,13 +0,0 @@
-page {
- .demo-section__wrapper {
- margin: 32rpx 0;
- padding: 16rpx 32rpx;
- opacity: 1;
- background: rgba(255, 255, 255, 1);
- }
-
- .t-class-cancel {
- color: rgba(0, 82, 217, 1);
- font-weight: 400;
- }
-}
diff --git a/example/pages/search/search.ts b/example/pages/search/search.ts
deleted file mode 100644
index 3be0ca090..000000000
--- a/example/pages/search/search.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-const placeholder = '搜索预设文案';
-const actionText = '取消';
-Page({
- data: {
- first: '',
- searchBoxGroup: [
- {
- id: `${Math.random()}`,
- keyword: '',
- placeholder,
- actionText: '',
- },
- {
- id: `${Math.random()}`,
- keyword: '',
- placeholder,
- actionText: '取消',
- },
- {
- id: `${Math.random()}`,
- keyword: '关键词',
- placeholder,
- actionText: '取消',
- },
- ],
- },
-
- changeHandle({
- detail,
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.setData({
- [`searchBoxGroup[${idx}].keyword`]: detail.value,
- });
- },
-
- focusHandle({
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.data.searchBoxGroup.forEach((_, index) => {
- this.setData({
- [`searchBoxGroup[${index}].actionText`]: '',
- });
- });
-
- this.setData({
- [`searchBoxGroup[${idx}].actionText`]: actionText,
- [`searchBoxGroup[${idx}].focus`]: true,
- });
- },
-
- cancelHandle({
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.setData({
- [`searchBoxGroup[${idx}].actionText`]: '',
- });
- },
-
- clearHandle({
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.setData({
- [`searchBoxGroup[${idx}].keyword`]: '',
- });
- },
-});
diff --git a/example/pages/search/search.wxml b/example/pages/search/search.wxml
deleted file mode 100644
index b50099c7f..000000000
--- a/example/pages/search/search.wxml
+++ /dev/null
@@ -1,29 +0,0 @@
-
- Search 搜索
- 用于用户输入搜索信息,并进行页面内容搜索。
-
- 基础搜索框
-
-
-
-
-
-
- {{item.title}}
-
-
-
-
-
-
diff --git a/example/pages/segmented-control/segmented-control.json b/example/pages/segmented-control/segmented-control.json
deleted file mode 100644
index 373529d22..000000000
--- a/example/pages/segmented-control/segmented-control.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "SegmentedControl 分段器"
-}
diff --git a/example/pages/segmented-control/segmented-control.less b/example/pages/segmented-control/segmented-control.less
deleted file mode 100644
index 156b94b7d..000000000
--- a/example/pages/segmented-control/segmented-control.less
+++ /dev/null
@@ -1,9 +0,0 @@
-.segmented-control-wrapper {
- padding: 4px;
-}
-
-.segmented-control-content {
- padding-top: 8px;
- font-size: 12px;
- text-align: center;
-}
diff --git a/example/pages/segmented-control/segmented-control.ts b/example/pages/segmented-control/segmented-control.ts
deleted file mode 100644
index 0568aba8b..000000000
--- a/example/pages/segmented-control/segmented-control.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-Page({
- data: {
- list1: [{ text: '项目一' }, { text: '项目二' }],
- list2: [
- { text: '项目A', value: 'item_1' },
- { text: '项目B', value: 'item_2' },
- ],
- currentValue: -1,
- currentValue2: '',
- },
- onChange(event) {
- console.log(`点击: ${event.detail}`);
- this.setData({ currentValue: event.detail });
- },
- onChange2(event) {
- console.log(`点击: ${event.detail}`);
- this.setData({ currentValue2: event.detail });
- },
-});
diff --git a/example/pages/segmented-control/segmented-control.wxml b/example/pages/segmented-control/segmented-control.wxml
deleted file mode 100644
index a98cc2186..000000000
--- a/example/pages/segmented-control/segmented-control.wxml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选项一的内容
- 选项二的内容
-
-
-
-
-
-
-
-
-
-
- 选项A的内容
- 选项B的内容
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/skeleton/skeleton.json b/example/pages/skeleton/skeleton.json
deleted file mode 100644
index f59178634..000000000
--- a/example/pages/skeleton/skeleton.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Skeleton 骨架屏",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/skeleton/skeleton.less b/example/pages/skeleton/skeleton.less
deleted file mode 100644
index 49adc28e4..000000000
--- a/example/pages/skeleton/skeleton.less
+++ /dev/null
@@ -1,33 +0,0 @@
-page {
- background-color: #fff;
-
- .skeleton-basic {
- margin: 32rpx;
- width: 686rpx;
- }
-
- .basic-text {
- border-radius: 4rpx;
- }
-
- .skeleton-avatar {
- margin: 32rpx;
-
- .skeleton-avatar-size {
- height: 96rpx;
- width: 96rpx;
- border-radius: 100%;
- margin-right: 24rpx;
- }
- }
-
- .skeleton-text {
- border-radius: 16rpx;
- }
-
- .container-flex {
- display: flex;
- justify-content: space-between;
- margin: 32rpx;
- }
-}
diff --git a/example/pages/skeleton/skeleton.ts b/example/pages/skeleton/skeleton.ts
deleted file mode 100644
index cb3ce3e87..000000000
--- a/example/pages/skeleton/skeleton.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-Page({
- data: {
- rowCol: [
- { width: '686rpx', height: '32rpx' },
- 2,
- 3,
- [
- { width: '38rpx', height: '32rpx', marginRight: '20rpx', marginLeft: '20rpx' },
- { width: '38rpx', height: '32rpx' },
- ],
- { width: '380rpx' },
- ],
- rowCol1: [{ width: '686rpx', height: '32rpx' }, 1, 1, { width: '380rpx', height: '32rpx' }],
- rowCol2: [
- { width: '566rpx', height: '32rpx' },
- { width: '100%', height: '32rpx' },
- { width: '100%', height: '32rpx' },
- { width: '314rpx', height: '32rpx' },
- ],
- rowCol3: [
- { width: '332rpx', height: '342rpx' },
- { width: '332rpx', height: '32rpx' },
- { width: '214rpx', height: '32rpx' },
- [
- { width: '186rpx', height: '32rpx' },
- { width: '64rpx', height: '32rpx', marginLeft: '82rpx' },
- ],
- ],
- },
-});
diff --git a/example/pages/skeleton/skeleton.wxml b/example/pages/skeleton/skeleton.wxml
deleted file mode 100644
index ac573cf22..000000000
--- a/example/pages/skeleton/skeleton.wxml
+++ /dev/null
@@ -1,49 +0,0 @@
-
- Skeleton 骨架屏
- 用于等待加载内容所展示的占位图形组合,有动态效果加载效果,减少用户等待焦虑。
-
- 基础
-
- 头像组合
-
- 图片组合
-
-
-
-
-
-
- 渐变加载动画
-
- 闪烁加载动画
-
-
-
diff --git a/example/pages/slider/slider.json b/example/pages/slider/slider.json
deleted file mode 100644
index dbe5ae1a9..000000000
--- a/example/pages/slider/slider.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Slider 滑块",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/slider/slider.less b/example/pages/slider/slider.less
deleted file mode 100644
index c55b10ec4..000000000
--- a/example/pages/slider/slider.less
+++ /dev/null
@@ -1,71 +0,0 @@
-page {
- background: #fff;
- padding-bottom: 100rpx;
-}
-
-.t-slider {
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- padding-top: 48rpx;
- font-size: 40rpx;
- font-weight: 500;
- line-height: 56rpx;
- }
-
- &-desc {
- color: rgba(0, 0, 0, .4);
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- }
-}
-
-.t-slider-wrapper {
- margin-top: 40rpx;
- margin-bottom: 8rpx;
-
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- color: rgba(0, 0, 0, .9);
- font-size: 32rpx;
- font-weight: 500;
- line-height: 48rpx;
- margin-bottom: 16rpx;
- margin-top: 48rpx;
- }
-
- &-desc {
- margin: 32rpx;
- color: rgba(0, 0, 0, .4);
- font-size: 24rpx;
- line-height: 36rpx;
- white-space: pre-line;
- }
-
- .space-container {
- margin-bottom: 48rpx;
- }
-}
-
-.label {
- display: flex;
- align-items: center;
- width: 718rpx;
- padding-left: 32rpx;
-}
-
-.label-class {
- flex-grow: 1;
-}
-
-.t-slider__mark {
- margin: 0 12rpx;
-}
diff --git a/example/pages/slider/slider.ts b/example/pages/slider/slider.ts
deleted file mode 100644
index a83651c5d..000000000
--- a/example/pages/slider/slider.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-Page({
- data: {
- value: 40,
- value1: 10,
- value2: 10,
- value3: 50,
- valueStep: 24,
- valueRange: [],
- valueRange2: [],
- mask1: [0, 50, 100],
- mask2: {
- 0: '¥0',
- 50: '¥50',
- 100: '¥100',
- },
- mask3: {
- 0: '小',
- 50: '中',
- 100: '大',
- },
- /** 滑动条的颜色 */
- colors: ['#0052D9', '#E7E7E7'],
- /** 禁用状态滑动条的颜色) */
- disabledColor: ['#BBD3FB', '#E7E7E7'],
- },
- handleChange(e) {
- this.setData({
- value3: e.detail.value,
- });
- },
- handleChange2(e) {
- console.log(e);
- },
-});
diff --git a/example/pages/slider/slider.wxml b/example/pages/slider/slider.wxml
deleted file mode 100644
index 52a81d0b5..000000000
--- a/example/pages/slider/slider.wxml
+++ /dev/null
@@ -1,85 +0,0 @@
-Slider 滑动选择器
-用于选择横轴上的数值、区间、档位。
-
-
-
-
- 带数值滑动选择器
-
-
-
- 起始非零滑动选择器
-
-
-
- 带刻度滑动选择器
-
-
-
- 区间滑动选择器
-
-
-
-
-
-
- 带数值滑动选择器
-
-
-
- 起始非零滑动选择器
-
-
-
- 带刻度滑动选择器
-
-
-
- 区间滑动选择器
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选择器标题
-
-
-
diff --git a/example/pages/stepper/stepper.json b/example/pages/stepper/stepper.json
deleted file mode 100644
index 2cbf9a488..000000000
--- a/example/pages/stepper/stepper.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Stepper 步进器",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/stepper/stepper.less b/example/pages/stepper/stepper.less
deleted file mode 100644
index 07cf72ef6..000000000
--- a/example/pages/stepper/stepper.less
+++ /dev/null
@@ -1,57 +0,0 @@
-.t-stepper {
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- padding-top: 48rpx;
- font-size: 40rpx;
- font-weight: 500;
- line-height: 56rpx;
- }
-
- &-desc {
- color: rgba(0, 0, 0, .4);
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- }
-}
-
-.t-stepper-wrapper {
- margin-top: 40rpx;
- margin-bottom: 8rpx;
-
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- color: rgba(0, 0, 0, .9);
- font-size: 32rpx;
- font-weight: 500;
- line-height: 48rpx;
- margin-bottom: 16rpx;
- }
-
- &-desc {
- margin: 32rpx;
- color: rgba(0, 0, 0, .4);
- font-size: 26rpx;
- line-height: 36rpx;
- white-space: pre-line;
- }
-}
-
-.pure-stepper-container {
- padding: 24rpx 32rpx;
- background-color: #fff;
- display: flex;
- justify-content: space-between;
-}
-
-.interval {
- height: 32rpx;
-}
diff --git a/example/pages/stepper/stepper.ts b/example/pages/stepper/stepper.ts
deleted file mode 100644
index 2705dff17..000000000
--- a/example/pages/stepper/stepper.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-Page({
- data: {
- value: 20,
- },
-
- handleChange(e) {
- const { value } = e.detail;
-
- console.log(value);
- this.setData({
- value,
- });
- },
-});
diff --git a/example/pages/stepper/stepper.wxml b/example/pages/stepper/stepper.wxml
deleted file mode 100644
index 829072e35..000000000
--- a/example/pages/stepper/stepper.wxml
+++ /dev/null
@@ -1,57 +0,0 @@
-
- Stepper 步进器
- 用于数量的增减。
-
-
-
-
-
-
- 带单位步进器
-
-
-
-
-
- 纯步进器
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/steps/steps.json b/example/pages/steps/steps.json
deleted file mode 100644
index d4790ba28..000000000
--- a/example/pages/steps/steps.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Steps"
-}
diff --git a/example/pages/steps/steps.less b/example/pages/steps/steps.less
deleted file mode 100644
index 528e37399..000000000
--- a/example/pages/steps/steps.less
+++ /dev/null
@@ -1,38 +0,0 @@
-.demo-steps {
- padding-top: 80rpx;
-
- .t-cell-group {
- background-color: #fbfbfb;
-
- .mb-12 {
- margin-bottom: 24rpx;
- display: block;
- }
- }
-}
-
-.demo-steps.vertical {
- padding-left: 32rpx;
-
- + .demo-steps {
- padding-top: 30rpx;
- }
-}
-
-.group {
- padding-bottom: 80rpx;
- margin-top: 32rpx;
- background: #fff;
-
- & + .demo-section__desc {
- margin-top: 32rpx;
- }
-
- &.vertical {
- padding-bottom: 30rpx;
- }
-}
-
-.extra-img {
- font-size: 0;
-}
\ No newline at end of file
diff --git a/example/pages/steps/steps.ts b/example/pages/steps/steps.ts
deleted file mode 100644
index bafc6541a..000000000
--- a/example/pages/steps/steps.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Page({
- data: {
- current: 1,
- subStepItems: [
- {
- title: '二级步骤描述',
- },
- {
- title: '二级步骤描述',
- },
- ],
- },
-
- handleChange({ detail }) {
- console.log(detail.current);
- this.setData({
- current: detail.current,
- });
- },
-});
diff --git a/example/pages/steps/steps.wxml b/example/pages/steps/steps.wxml
deleted file mode 100644
index f1f63ddbc..000000000
--- a/example/pages/steps/steps.wxml
+++ /dev/null
@@ -1,176 +0,0 @@
-
- Steps 步骤条
- 用于任务步骤展示或任务进度展示。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 横向带图标可操作步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 横向只读步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 竖向只读步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
- 竖向双层级只读步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
- 竖向简化只读步骤条
-
-
-
-
-
-
-
-
- 自定义内容步骤条
-
-
-
- 可自定义此处内容
-
-
-
- 可自定义此处内容
-
-
- 可自定义此处内容
-
-
-
-
-
diff --git a/example/pages/sticky/sticky.json b/example/pages/sticky/sticky.json
deleted file mode 100644
index 9faaa4e79..000000000
--- a/example/pages/sticky/sticky.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Sticky",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/sticky/sticky.less b/example/pages/sticky/sticky.less
deleted file mode 100644
index 8ed513ed8..000000000
--- a/example/pages/sticky/sticky.less
+++ /dev/null
@@ -1,33 +0,0 @@
-.tdesign-demo-sticky-base {
- height: 3000rpx;
-
- .inner-box {
- width: 208rpx;
- height: 88rpx;
- }
-
- .box1 {
- margin-left: 32rpx;
- }
-
- .box2 {
- margin-left: 272rpx;
- background-color: rgba(48, 106, 255, .6);
- }
-
- .box3 {
- margin-left: 512rpx;
- background-color: rgba(48, 106, 255, .3);
- }
-
- .box-c {
- width: 100%;
- height: 150px;
- background-color: rgba(255, 255, 255, 1);
- }
-
- .green-button {
- background-color: rgba(0, 168, 112, 1);
- color: #fff;
- }
-}
diff --git a/example/pages/sticky/sticky.ts b/example/pages/sticky/sticky.ts
deleted file mode 100644
index fed953036..000000000
--- a/example/pages/sticky/sticky.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-Page({
- data: {
- container: null,
- },
- onLoad() {
- this.setData({
- // @ts-ignore
- container: () => wx.createSelectorQuery().select('.box-c'),
- });
- },
-});
diff --git a/example/pages/sticky/sticky.wxml b/example/pages/sticky/sticky.wxml
deleted file mode 100644
index aefb1f956..000000000
--- a/example/pages/sticky/sticky.wxml
+++ /dev/null
@@ -1,21 +0,0 @@
-
- Sticky 吸顶
- 用于常驻页面顶部的信息、操作展示。
-
-
- 基础吸顶
-
-
-
-
- 吸顶距离
-
-
-
-
-
- 指定容器
-
-
-
-
diff --git a/example/pages/swipe-cell/swipe-cell.json b/example/pages/swipe-cell/swipe-cell.json
deleted file mode 100644
index 90cb7ffda..000000000
--- a/example/pages/swipe-cell/swipe-cell.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "navigationBarTitleText": "SwipeCell",
- "navigationBarBackgroundColor": "#f9f9f9",
- "backgroundColorTop":"#f9f9f9",
- "backgroundColorBottom":"#f9f9f9",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/swipe-cell/swipe-cell.less b/example/pages/swipe-cell/swipe-cell.less
deleted file mode 100644
index a5fd394ab..000000000
--- a/example/pages/swipe-cell/swipe-cell.less
+++ /dev/null
@@ -1,56 +0,0 @@
-page {
- background: #f9f9f9;
-
- .t-swipe-cell-demo {
- &-desc {
- margin-bottom: 32rpx;
- }
-
- &-divider {
- height: 32rpx;
- }
-
- &-btn-wrapper {
- height: 100%;
- }
-
- &-btn {
- display: inline-flex;
- justify-content: center;
- align-items: center;
- width: 144rpx;
- height: 100%;
- text-align: center;
- color: white;
-
- &.delete-btn {
- background-color: #e34d59;
- }
-
- &.edit-btn {
- background-color: #ed7b2f;
- }
-
- &.favor-btn {
- background-color: #0052d9;
- }
- }
- }
-
- .title-image-large {
- margin-right: 8rpx;
- width: 144rpx;
- height: 144rpx;
- }
-
- // 覆盖t-cell-group组件内部样式
- .t-cell-group__title {
- line-height: 104rpx;
- font-size: 24rpx;
- }
-
- // 覆盖demo-block内部样式
- .demo-block__slot {
- margin-top: 0;
- }
-}
diff --git a/example/pages/swipe-cell/swipe-cell.wxml b/example/pages/swipe-cell/swipe-cell.wxml
deleted file mode 100644
index 811d54b32..000000000
--- a/example/pages/swipe-cell/swipe-cell.wxml
+++ /dev/null
@@ -1,46 +0,0 @@
-
- SwipeCell 滑动操作
- 用于承载列表中的更多操作,通过左右滑动来展示,按钮的宽度固定高度根据列表高度而变化。
-
-
- 往左滑动
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
- 收藏
- 编辑
- 删除
-
-
-
-
-
- 删除
-
-
-
-
- 选择
-
-
-
-
-
diff --git a/example/pages/swiper/swiper.json b/example/pages/swiper/swiper.json
deleted file mode 100644
index cb859a03a..000000000
--- a/example/pages/swiper/swiper.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "navigationBarTitleText": "Swiper",
- "navigationBarBackgroundColor": "#fff",
- "backgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/swiper/swiper.less b/example/pages/swiper/swiper.less
deleted file mode 100644
index 519b4e0e2..000000000
--- a/example/pages/swiper/swiper.less
+++ /dev/null
@@ -1,148 +0,0 @@
-page {
- background: #fff;
-}
-
-.swiper-demo {
- .demo-section {
- }
-
- .t-slider__wrapper .t-slider__main {
- margin: 0;
- }
-
- &-tag {
- line-height: 1.4;
- font-size: 30rpx;
- padding-left: 20rpx;
- border-left: 4rpx solid #c461a3;
- margin: 20rpx 0;
- }
-
- &-space {
- height: 30rpx;
- }
-
- .swiper-switch {
- margin: 22rpx 0;
-
- .t-switch__label {
- display: none;
- }
- }
-
- .swiper-wrap {
- // border-radius: 16rpx;
- // overflow: hidden;
- // transform: translateY(0);
- }
-
- .swiper-box {
- margin: 0 32rpx;
- border-radius: 16rpx;
- overflow: hidden;
- // fix: 小程序webview圆角BUG,下面的样式规避圆角在真机失效的问题
- // https://developers.weixin.qq.com/community/develop/doc/00026658428810dd8c07c062556400
- transform: translateY(0);
- }
- // 样式覆盖
- // .t-swiper-nav-dots-bar-item {
- // background: #1b131850;
- // }
-
- // .t-swiper-nav-dots-bar-item.active {
- // background: #080006;
- // }
-
- .swiper-box-option {
- overflow: visible;
- border-radius: 0;
- }
-
- .swiper-vertical {
- height: 400rpx;
- }
-
- // .swiper-box2 {
- // .item {
- // .img {
- // height: 300rpx;
- // }
- // }
- // }
-
- .swiper-box-vertical {
- .item {
- line-height: 400rpx;
-
- // .img {
- // }
- }
- }
-
- .item {
- width: 100%;
- height: 100%;
- // background-color: #0052d9;
- text-align: center;
- line-height: 300rpx;
-
- .img {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- }
-
- // &.item0 {
- // background-color: #4fb669;
- // }
-
- // &.item1 {
- // background-color: #c461a3;
- // }
-
- // &.item2 {
- // background-color: #3830a1;
- // }
-
- // &.item3 {
- // background-color: #acb47e;
- // }
-
- // &.item4 {
- // background-color: #363444;
- // }
- }
-
- .cell {
- padding: 10rpx 0;
- font-size: 28rpx;
- color: #999;
-
- &.row {
- display: flex;
- flex-direction: row;
- }
-
- .label {
- color: #999;
- margin-right: 20rpx;
- }
-
- .option {
- display: flex;
- flex-direction: row;
- justify-content: start;
- align-items: center;
- }
-
- .option-desc {
- padding: 0 30rpx;
- }
-
- .swiper-slider {
- flex: 1;
- }
- }
-}
diff --git a/example/pages/swiper/swiper.ts b/example/pages/swiper/swiper.ts
deleted file mode 100644
index e73392d7d..000000000
--- a/example/pages/swiper/swiper.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-const imageCdn = 'https://tdesign.gtimg.com/site/swiper';
-const items = [
- {
- cls: 'item0',
- image: `${imageCdn}/01.png`,
- },
- {
- cls: 'item1',
- image: `${imageCdn}/02.png`,
- },
- {
- cls: 'item2',
- image: `${imageCdn}/03.png`,
- },
- {
- cls: 'item3',
- image: `${imageCdn}/04.png`,
- },
- {
- cls: 'item4',
- image: `${imageCdn}/05.png`,
- },
-];
-
-Page({
- data: {
- current: 1,
- autoplay: true,
- duration: 500,
- interval: 5000,
- items,
- navigation1: { type: 'dots-bar' },
- navigation2: { type: 'fraction' },
- navigation3: { type: '', hasNavBtn: true },
- },
- onChange(e) {
- const {
- detail: { current, source },
- } = e;
- console.log(current, source);
- // if (source === 'touch') {
- // this.setData({
- // current,
- // });
- // }
- },
- onAutoplayChange(e) {
- this.setData({
- autoplay: e.detail.value,
- });
- },
- onIntervalChange(e) {
- this.setData({
- interval: e.detail.value,
- });
- },
- onDurationChange(e) {
- this.setData({
- duration: e.detail.value,
- });
- },
-});
diff --git a/example/pages/swiper/swiper.wxml b/example/pages/swiper/swiper.wxml
deleted file mode 100644
index 8c11fc11c..000000000
--- a/example/pages/swiper/swiper.wxml
+++ /dev/null
@@ -1,163 +0,0 @@
-
- Swiper 轮播
-
- 用于循环轮播一组图片或内容,也可以滑动进行切换,轮播动效时间可以设置。
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
- 自动播放
-
-
- {{autoplay?'开':'关'}}
-
-
-
- 自动播放间隔时间(单位毫秒)
-
-
- {{interval}}
-
-
-
- 动画持续时间(单位毫秒)
-
-
- {{duration}}
-
-
-
-
-
-
diff --git a/example/pages/switch/switch.json b/example/pages/switch/switch.json
deleted file mode 100644
index cbe852e09..000000000
--- a/example/pages/switch/switch.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Switch",
- "usingComponents": {
- "t-demo": "../../components/demo-block"
- }
-}
\ No newline at end of file
diff --git a/example/pages/switch/switch.less b/example/pages/switch/switch.less
deleted file mode 100644
index 66ea5578f..000000000
--- a/example/pages/switch/switch.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.group {
- margin-top: 24px;
-}
diff --git a/example/pages/switch/switch.ts b/example/pages/switch/switch.ts
deleted file mode 100644
index 84897575f..000000000
--- a/example/pages/switch/switch.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-Page({
- data: {
- defaultVal: true,
- },
- handleChange(e) {
- this.setData({
- defaultVal: e.detail.value,
- });
- },
-});
diff --git a/example/pages/switch/switch.wxml b/example/pages/switch/switch.wxml
deleted file mode 100644
index 3492ae078..000000000
--- a/example/pages/switch/switch.wxml
+++ /dev/null
@@ -1,50 +0,0 @@
-
- Switch 开关
- 用于控制某个功能的开启和关闭。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/tab-bar/tab-bar.json b/example/pages/tab-bar/tab-bar.json
deleted file mode 100644
index 2de1b1484..000000000
--- a/example/pages/tab-bar/tab-bar.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "TabBar"
-}
diff --git a/example/pages/tab-bar/tab-bar.less b/example/pages/tab-bar/tab-bar.less
deleted file mode 100644
index 798d84014..000000000
--- a/example/pages/tab-bar/tab-bar.less
+++ /dev/null
@@ -1,39 +0,0 @@
-.demo {
- font-family: Arial, Helvetica, sans-serif;
-
- .mb-12 {
- margin-bottom: 24rpx;
- display: block;
- }
-
- .mg-16 {
- margin: 32rpx;
- }
-
- .t-tab-bar {
- position: relative;
- padding-bottom: 0;
- }
-
- .t-badge--basic:not(.t-badge--dot) {
- padding: 0 10rpx;
- }
-
- .demo-word {
- margin-top: 364rpx;
- }
-
- .bottom-row {
- padding-bottom: env(safe-area-inset-bottom);
- }
-
- .t-tab-bar-item__spread-item {
- color: rgba(0, 0, 0, .6);
- }
-
- .t-tab-bar-item__content:not(.t-is-checked) {
- .t-tab-bar-item__text {
- color: rgba(0, 0, 0, .6) !important;
- }
- }
-}
diff --git a/example/pages/tab-bar/tab-bar.ts b/example/pages/tab-bar/tab-bar.ts
deleted file mode 100644
index 158706377..000000000
--- a/example/pages/tab-bar/tab-bar.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-/* eslint-disable */
-
-const list_1 = [
- {
- value: 'label_1',
- label: '标签栏一',
- icon: 'app',
- },
- {
- value: 'label_2',
- label: '标签栏二',
- icon: 'app',
- },
-];
-const list_2 = [
- ...list_1,
- {
- value: 'label_3',
- label: '标签栏三',
- icon: 'app',
- },
-];
-const list_3 = [
- ...list_2,
- {
- value: 'label_4',
- label: '标签栏四',
- icon: 'app',
- },
-];
-
-const list_11 = [
- {
- value: 'label_1',
- label: '文字',
- icon: 'app',
- },
- {
- value: 'label_2',
- label: '文字',
- icon: 'app',
- },
-];
-const list_21 = [
- ...list_11,
- {
- value: 'label_3',
- label: '文字',
- icon: 'app',
- },
-];
-const list_31 = [
- ...list_21,
- {
- value: 'label_4',
- label: '文字',
- icon: 'app',
- },
-];
-const list_41 = [
- ...list_31,
- {
- value: 'label_5',
- label: '文字',
- icon: 'app',
- },
-];
-
-const list_5 = [
- ...list_1,
- {
- value: 'label_3',
- label: '此处展开',
- children: [
- {
- value: 'spread_3',
- label: '展开项三',
- },
- {
- value: 'spread_2',
- label: '展开项二',
- },
- {
- value: 'spread_1',
- label: '展开项一',
- },
- ],
- },
-];
-
-Page({
- data: {
- value: 'label_1',
- demoList_1: [list_1, list_2, list_3],
- demoList_2: [list_11, list_21, list_31, list_41],
- list_5,
- },
- onChange(event) {
- console.log(event.detail);
- },
-});
diff --git a/example/pages/tab-bar/tab-bar.wxml b/example/pages/tab-bar/tab-bar.wxml
deleted file mode 100644
index 6ceae7e62..000000000
--- a/example/pages/tab-bar/tab-bar.wxml
+++ /dev/null
@@ -1,105 +0,0 @@
-
- TabBar 标签栏
- 用于在不同功能模块之间进行快速切换,位于页面底部。
-
-
-
- {{item.label}}
-
-
-
-
-
-
- {{item.label}}
-
-
-
- 文字
-
- 文字
-
- 文字
-
- 文字
-
-
-
-
-
-
-
-
-
-
-
-
- {{item.label}}
-
-
-
-
-
diff --git a/example/pages/tabs/tabs.json b/example/pages/tabs/tabs.json
deleted file mode 100644
index dc4fc5ad7..000000000
--- a/example/pages/tabs/tabs.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Tabs",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/tabs/tabs.less b/example/pages/tabs/tabs.less
deleted file mode 100644
index 9b23b86e9..000000000
--- a/example/pages/tabs/tabs.less
+++ /dev/null
@@ -1,22 +0,0 @@
-.custom-tabs-vertical {
- .tab-content {
- margin-top: 250rpx;
- color: rgba(0, 0, 0, .26);
- text-align: center;
- justify-content: center;
- }
-}
-
-.custom-tabs {
- t-tab-panel {
- text-align: center;
- justify-content: center;
- height: 172rpx;
- line-height: 172rpx;
- color: rgba(0, 0, 0, .26);
- }
-}
-
-.active-item {
- font-size: 32rpx;
-}
diff --git a/example/pages/tabs/tabs.ts b/example/pages/tabs/tabs.ts
deleted file mode 100644
index b91f93177..000000000
--- a/example/pages/tabs/tabs.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-Page({
- data: {
- animation: { duration: 2 },
- },
-
- onTabsChange(event: any) {
- console.log(`Change tab, tab-panel value is ${event.detail.value}.`);
- },
-
- onTabsClick(event: any) {
- console.log(`Click tab, tab-panel value is ${event.detail.value}.`);
- },
-});
diff --git a/example/pages/tabs/tabs.wxml b/example/pages/tabs/tabs.wxml
deleted file mode 100644
index d0ded8dea..000000000
--- a/example/pages/tabs/tabs.wxml
+++ /dev/null
@@ -1,117 +0,0 @@
-
- Tabs 选项卡
- 用于内容分类后的展示切换。
-
-
- 标签一内容
- 标签二内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
- 标签五内容
- 标签六内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 禁用状态
-
-
-
-
-
- 标签一内容区
-
-
- 标签二内容区
-
-
- 标签三内容区
-
-
- 标签四内容区
-
-
- 标签五内容区
-
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
diff --git a/example/pages/tag/tag.json b/example/pages/tag/tag.json
deleted file mode 100644
index e8f159825..000000000
--- a/example/pages/tag/tag.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Tag"
-}
diff --git a/example/pages/tag/tag.less b/example/pages/tag/tag.less
deleted file mode 100644
index d7548a348..000000000
--- a/example/pages/tag/tag.less
+++ /dev/null
@@ -1,31 +0,0 @@
-.group {
- min-height: 56px;
- margin: 16px 0;
- padding: 0 16px;
- background-color: #fff;
- display: flex;
- align-items: center;
-
- &.d-flex {
- display: flex;
- align-items: flex-start;
- }
-
- .left {
- width: 172px;
- }
-
- > view {
- display: flex;
- flex-direction: column;
- padding-top: 16px;
-
- .t-tag {
- margin-bottom: 17px;
- }
- }
-
- .t-tag {
- margin: 0 4px;
- }
-}
diff --git a/example/pages/tag/tag.ts b/example/pages/tag/tag.ts
deleted file mode 100644
index 7648103e6..000000000
--- a/example/pages/tag/tag.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-Page({
- data: {
- show: true,
- items: [
- {
- name: '已点击',
- checked: true,
- },
- {
- name: '未点击',
- checked: false,
- },
- {
- name: '不可点击',
- checked: false,
- disabled: true,
- },
- ],
- },
- handleCheckTagChange(e) {
- console.log(e.detail.checked);
- },
- handleClose() {
- this.setData({
- show: false,
- });
- },
-});
diff --git a/example/pages/tag/tag.wxml b/example/pages/tag/tag.wxml
deleted file mode 100644
index e97e9fe0c..000000000
--- a/example/pages/tag/tag.wxml
+++ /dev/null
@@ -1,65 +0,0 @@
-
- Tag 标签
- 用于表明主体的类目,属性或状态。
-
-
-
- 重要
- 危险
- 警告
- 成功
- 信息
-
-
-
- 镂空标签
- 浅底标签
- 标签
-
-
-
- 圆角标签
- 半圆角标签
-
-
-
- 标签
-
-
-
- 超长省略文本标签超长省略文本标签
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
- 展示标签30
- 展示标签24
- 展示标签22
-
-
-
- 点击标签30
- 点击标签24
-
-
-
-
diff --git a/example/pages/textarea/api.md b/example/pages/textarea/api.md
deleted file mode 100644
index 6f1b4392c..000000000
--- a/example/pages/textarea/api.md
+++ /dev/null
@@ -1,26 +0,0 @@
-### Textarea Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| -------------- | ------- | ------ | ---------------------------------------------------------------------------------------------------- | -------- | ------ | ---- | ------- | --- |
-| adjustPosition | Boolean | true | 键盘弹起时,是否自动上推页面 | N |
-| autofocus | Boolean | false | 自动聚焦,拉起键盘 | N |
-| autosize | Boolean | false | 是否自动增高,值为 autosize 时,style.height 不生效 | N |
-| confirmHold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起点 | N |
-| confirmType | String | done | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选值:send/search/next/go/done。TS 类型:`'send' | 'search' | 'next' | 'go' | 'done'` | N |
-| disabled | Boolean | false | 是否禁用文本框 | N |
-| focus | Boolean | false | 自动聚焦 | N |
-| maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 | N |
-| maxlength | Number | - | 用户最多可以输入的字符个数 | N |
-| name | String | - | 名称 | N |
-| placeholder | String | - | 占位符 | N |
-| value | String | - | 文本框值 | N |
-
-### Textarea Events
-
-| 名称 | 参数 | 描述 |
-| ----------- | ------------------------------------------------------ | ------------------ |
-| blur | `(value: TextareaValue, context: { e: FocusEvent })` | 失去焦点时触发 |
-| change | `(value: TextareaValue, context?: { e?: InputEvent })` | 输入内容变化时触发 |
-| enter | `(value: TextareaValue)` | 点击完成时触发 |
-| focus | `(value: TextareaValue, context: { e: FocusEvent })` | 获得焦点时触发 |
-| line-change | `(value: TextareaValue)` | 行高发生变化时触发 |
diff --git a/example/pages/textarea/textarea.json b/example/pages/textarea/textarea.json
deleted file mode 100644
index 60f92d530..000000000
--- a/example/pages/textarea/textarea.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Textarea 多行输入框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/textarea/textarea.less b/example/pages/textarea/textarea.less
deleted file mode 100644
index 0f187e62b..000000000
--- a/example/pages/textarea/textarea.less
+++ /dev/null
@@ -1,12 +0,0 @@
-.textarea-example {
- padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
- padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
- .cell {
- margin-bottom: 32rpx;
- }
-
- .verify {
- font-size: 32rpx;
- color: #0052d9;
- }
-}
diff --git a/example/pages/textarea/textarea.wxml b/example/pages/textarea/textarea.wxml
deleted file mode 100644
index 0284d8f8d..000000000
--- a/example/pages/textarea/textarea.wxml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- Textarea 多行文本框
- 用于多行文本信息输入。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/example/pages/toast/toast.json b/example/pages/toast/toast.json
deleted file mode 100644
index 50a7f9669..000000000
--- a/example/pages/toast/toast.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Toast",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/toast/toast.less b/example/pages/toast/toast.less
deleted file mode 100644
index 084fb68e3..000000000
--- a/example/pages/toast/toast.less
+++ /dev/null
@@ -1,57 +0,0 @@
-.toast {
- background-color: #fff;
- font-size: 32rpx;
- line-height: 48rpx;
- color: rgba(0, 0, 0, .9);
- padding: 48rpx 0rpx 96rpx 0rpx;
- min-height: 100vh;
-
- .title {
- font-weight: bold;
- font-size: 40rpx;
- line-height: 56rpx;
- color: rgba(0, 0, 0, .9);
- padding: 0 32rpx;
- }
-
- .desc {
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- color: rgba(0, 0, 0, .4);
- padding: 0 32rpx;
- }
-
- .sub-title {
- margin-top: 40rpx;
- font-weight: bold;
- padding: 0 32rpx;
- }
-
- .t-button {
- width: 686rpx;
- height: 96rpx;
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 32rpx;
-
- &::after {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 200%;
- height: 200%;
- transform: scale(.5);
- transform-origin: 0 0;
- box-sizing: border-box;
- border: 2rpx solid #dcdcdc;
- }
- }
-
- .demo-block__oper {
- padding: 0 32rpx;
- }
-}
diff --git a/example/pages/toast/toast.ts b/example/pages/toast/toast.ts
deleted file mode 100644
index 163e3cb68..000000000
--- a/example/pages/toast/toast.ts
+++ /dev/null
@@ -1,206 +0,0 @@
-import Toast from 'tdesign-miniprogram/toast/index';
-
-Page({
- data: {
- operList1: [
- {
- title: '基础提示',
- btns: [
- {
- type: 'pureText',
- text: '纯文本',
- },
- {
- type: 'withIconRow',
- text: '带图标-横向',
- },
- {
- type: 'withIconColumn',
- text: '带图标-竖向',
- },
- {
- type: 'pureTextMaxHeight',
- text: '纯文本最大高度',
- },
- ],
- },
- {
- title: '默认提示',
- btns: [
- {
- type: 'successRow',
- text: '成功-横向',
- },
- {
- type: 'warnRow',
- text: '警告-横向',
- },
- {
- type: 'successColumn',
- text: '成功-竖向',
- },
- {
- type: 'warnColumn',
- text: '警告-竖向',
- },
- {
- type: 'loading',
- text: '加载',
- },
- ],
- },
- ],
- operList2: [
- {
- label: '02 展示位置和展示时间',
- title: '弹窗展示位置为顶部、中部、底部三种,展示时间可自定义',
- btns: [
- {
- type: 'topShow',
- text: '顶部展示1秒',
- },
- {
- type: 'middleShow',
- text: '中间展示2秒',
- },
- {
- type: 'bottomShow',
- text: '底部展示3秒',
- },
- ],
- },
- ],
- operList3: [
- {
- title: '弹窗可现实遮罩,禁止滑动和点击',
- btns: [
- {
- type: 'disableSlideAndClick',
- text: '禁止滑动和点击',
- },
- ],
- },
- ],
- },
- handleToast(option) {
- Toast({
- context: this,
- selector: '#t-toast',
- ...option,
- });
- },
- clickHandle(e) {
- switch (e.detail) {
- case 'pureText': {
- this.handleToast({
- message: '轻提示文字内容',
- });
- break;
- }
- case 'withIconRow': {
- this.handleToast({
- message: '带图标横向',
- icon: 'check-circle',
- });
- break;
- }
- case 'withIconColumn': {
- this.handleToast({
- message: '带图标竖向',
- icon: 'star',
- direction: 'column',
- });
- break;
- }
- case 'pureTextMaxHeight': {
- this.handleToast({
- message: '最多一行展示十个汉字宽度限制最多不超过三行文字行文字行文字',
- });
- break;
- }
- case 'successRow': {
- this.handleToast({
- message: '成功文案',
- theme: 'success',
- });
- break;
- }
- case 'warnRow': {
- this.handleToast({
- message: '警告文案',
- theme: 'fail',
- });
- break;
- }
- case 'successColumn': {
- this.handleToast({
- message: '成功文案',
- theme: 'success',
- direction: 'column',
- });
- break;
- }
- case 'warnColumn': {
- this.handleToast({
- message: '警告文案',
- theme: 'fail',
- direction: 'column',
- });
- break;
- }
- case 'loading': {
- this.handleToast({
- message: '加载中...',
- theme: 'loading',
- direction: 'column',
- });
- break;
- }
- case 'topShow': {
- this.handleToast({
- message: '顶部-展示1秒',
- direction: 'column',
- placement: 'top',
- duration: 1000,
- icon: 'star',
- });
- break;
- }
- case 'middleShow': {
- this.handleToast({
- message: '中间-展示2秒',
- direction: 'column',
- duration: 2000,
- icon: 'star',
- });
- break;
- }
- case 'bottomShow': {
- this.handleToast({
- message: '底部-展示3秒',
- direction: 'column',
- placement: 'bottom',
- duration: 3000,
- icon: 'star',
- });
- break;
- }
- case 'disableSlideAndClick': {
- this.handleToast({
- message: '禁止滑动和点击',
- direction: 'column',
- placement: 'bottom',
- duration: 5000,
- preventScrollThrough: true,
- icon: 'poweroff',
- });
- break;
- }
- default: {
- this.handleToast({
- message: '未知点击事件',
- });
- }
- }
- },
-});
diff --git a/example/pages/toast/toast.wxml b/example/pages/toast/toast.wxml
deleted file mode 100644
index 0ebf5cb15..000000000
--- a/example/pages/toast/toast.wxml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- Toast 轻提示
- 用于轻量级反馈或提示,不会打断用户操作。
-
-
-
-
-
diff --git a/example/pages/transition/demos/appear/index.wxml b/example/pages/transition/demos/appear/index.wxml
deleted file mode 100644
index 80703a3cf..000000000
--- a/example/pages/transition/demos/appear/index.wxml
+++ /dev/null
@@ -1,6 +0,0 @@
-Toggle attach
-
-
-
-
-
diff --git a/example/pages/transition/demos/base/index.wxml b/example/pages/transition/demos/base/index.wxml
deleted file mode 100644
index 6774e25ff..000000000
--- a/example/pages/transition/demos/base/index.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-Toggle
-
-
-
diff --git a/example/pages/transition/demos/custom/index.json b/example/pages/transition/demos/custom/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/example/pages/transition/demos/custom/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/example/pages/transition/demos/custom/index.wxml b/example/pages/transition/demos/custom/index.wxml
deleted file mode 100644
index 8c3394ff0..000000000
--- a/example/pages/transition/demos/custom/index.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-Toggle
-
-
-
diff --git a/example/pages/transition/demos/destroy/index.json b/example/pages/transition/demos/destroy/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/example/pages/transition/demos/destroy/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/example/pages/transition/demos/destroy/index.ts b/example/pages/transition/demos/destroy/index.ts
deleted file mode 100644
index 5e423455c..000000000
--- a/example/pages/transition/demos/destroy/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Component({
- options: {
- addGlobalClass: true,
- },
- data: {
- visible: false,
- },
- methods: {
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
- onClose() {
- this.setData({
- visible: false,
- });
- },
- },
-});
diff --git a/example/pages/transition/demos/destroy/index.wxml b/example/pages/transition/demos/destroy/index.wxml
deleted file mode 100644
index c605a6abf..000000000
--- a/example/pages/transition/demos/destroy/index.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-Toggle
-
-
-
diff --git a/example/pages/transition/transition.json b/example/pages/transition/transition.json
deleted file mode 100644
index f828c66ff..000000000
--- a/example/pages/transition/transition.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "navigationBarTitleText": "Transition 过渡",
- "usingComponents": {
- "base-demo": "./demos/base",
- "custom-demo": "./demos/custom",
- "destroy-demo": "./demos/destroy",
- "appear-demo": "./demos/appear"
- }
-}
diff --git a/example/pages/transition/transition.less b/example/pages/transition/transition.less
deleted file mode 100644
index f8ddfc4e9..000000000
--- a/example/pages/transition/transition.less
+++ /dev/null
@@ -1,36 +0,0 @@
-.tdesign-demo-transition {
- padding: 16px;
-
- .demo-title {
- margin-bottom: 10px;
- }
-
- .block {
- margin-top: 10px;
- width: 100px;
- height: 100px;
- background: #0052d9;
- }
-}
-
-.translate-enter {
- opacity: 0;
- transform: translateX(40px);
-}
-
-.translate-enter-to {
- opacity: 1;
- transform: translateY(0%);
- transition: all 1s;
-}
-
-.translate-leave {
- opacity: 1;
- transform: translateY(0%);
-}
-
-.translate-leave-to {
- opacity: 0;
- transform: translateX(40px);
- transition: all 1s;
-}
diff --git a/example/pages/transition/transition.wxml b/example/pages/transition/transition.wxml
deleted file mode 100644
index 905e37181..000000000
--- a/example/pages/transition/transition.wxml
+++ /dev/null
@@ -1,27 +0,0 @@
-
- 基础示例
-
-
-
-
-
-
- 自定义动画
-
-
-
-
-
-
- 首次出现动画 appear
-
-
-
-
-
-
- 隐藏不渲染
-
-
-
-
diff --git a/example/pages/upload/upload.json b/example/pages/upload/upload.json
deleted file mode 100644
index 133752aea..000000000
--- a/example/pages/upload/upload.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Upload 上传",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/example/pages/upload/upload.less b/example/pages/upload/upload.less
deleted file mode 100644
index 6fc5444fe..000000000
--- a/example/pages/upload/upload.less
+++ /dev/null
@@ -1,38 +0,0 @@
-page {
- .demo {
- min-height: 100vh;
- overflow: hidden;
-
- &-title {
- font-size: 40rpx;
- font-weight: 700;
- line-height: 56rpx;
- margin: 48rpx 32rpx 0;
- color: rgba(0, 0, 0, .9);
- }
-
- &-desc {
- margin-top: 16rpx;
- font-size: 24rpx;
- line-height: 40rpx;
- }
- }
-
- .item {
- background-color: #fff;
- padding-top: 24rpx;
- box-sizing: border-box;
- padding-left: 32rpx;
-
- .upload-wrapper {
- padding-right: 32rpx;
- padding-top: 20rpx;
- padding-bottom: 24rpx;
- }
-
- &__title {
- font-size: 32rpx;
- color: rgba(0, 0, 0, .9);
- }
- }
-}
diff --git a/example/pages/upload/upload.ts b/example/pages/upload/upload.ts
deleted file mode 100644
index fd6c36169..000000000
--- a/example/pages/upload/upload.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-Page({
- data: {
- originFiles1: [
- {
- url: 'https://tdesign.gtimg.com/site/upload1.png',
- name: 'uploaded1.png',
- type: 'image',
- },
- ],
- originFiles2: [
- {
- url: 'https://tdesign.gtimg.com/site/upload1.png',
- name: 'uploaded1.png',
- type: 'image',
- },
- {
- url: 'https://tdesign.gtimg.com/site/upload2.png',
- name: 'uploaded2.png',
- type: 'image',
- },
- {
- url: 'https://tdesign.gtimg.com/site/upload1.png',
- name: 'uploaded1.png',
- type: 'image',
- percent: -1,
- },
- ],
- // requestMethod: null,
- gridConfig: {
- column: 4,
- width: 160,
- height: 160,
- },
- config1: {
- count: 1,
- },
- },
- // onLoad() {
- // this.setData({
- // requestMethod: (files) => {
- // // 模拟处理微信返回的files结果。
- // console.log(files);
- // new Promise((resolve) => {
- // console.log('uploading');
- // resolve([
- // {
- // url: 'https://tdesign.gtimg.com/site/upload2.png',
- // name: 'uploaded2.png',
- // type: 'image',
- // percent: -1,
- // },
- // ]);
- // })
- // .then((res: any) => {
- // this.setData({
- // originFiles1: [...this.data.originFiles1, ...res],
- // });
- // console.log('success');
- // })
- // .catch(() => {
- // console.log('error');
- // });
- // },
- // });
- // },
- // 选中文件之后,计算一个随机的短文件名
- getRandFileName(filePath) {
- const extIndex = filePath.lastIndexOf('.');
- const extName = extIndex === -1 ? '' : filePath.substr(extIndex);
- return parseInt(`${Date.now()}${Math.floor(Math.random() * 900 + 100)}`, 10).toString(36) + extName;
- },
- handleSuccess(e) {
- const { files } = e.detail;
-
- this.setData({
- originFiles1: files,
- });
- },
- handleRemove(e) {
- const { index } = e.detail;
- const { originFiles1 } = this.data;
- originFiles1.splice(index, 1);
- this.setData({
- originFiles1,
- });
- },
- handleSuccess2(e) {
- const { files } = e.detail;
-
- this.setData({
- originFiles2: files,
- });
- },
- handleRemove2(e) {
- const { index } = e.detail;
- const { originFiles2 } = this.data;
- originFiles2.splice(index, 1);
- this.setData({
- originFiles2,
- });
- },
-});
diff --git a/example/pages/upload/upload.wxml b/example/pages/upload/upload.wxml
deleted file mode 100644
index ab7f021a9..000000000
--- a/example/pages/upload/upload.wxml
+++ /dev/null
@@ -1,35 +0,0 @@
-
- Upload 上传
- 用于相册读取或拉起拍照的图片上传功能。
-
-
- 上传图片
-
-
-
-
-
-
-
-
-
- 上传图片
-
-
-
-
-
-
diff --git a/example/project.config.json b/example/project.config.json
index ac76fc5cb..78afaa040 100644
--- a/example/project.config.json
+++ b/example/project.config.json
@@ -24,7 +24,7 @@
"showShadowRootInWxmlPanel": true
},
"compileType": "miniprogram",
- "libVersion": "2.11.3",
+ "libVersion": "2.20.2",
"appid": "wx6f3e38f61d138c04",
"projectname": "TDesign",
"debugOptions": {
@@ -57,34 +57,345 @@
"current": 0,
"list": [
{
- "id": -1,
- "name": "custom",
+ "name": "action-sheet",
+ "pathName": "pages/action-sheet/action-sheet",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "avatar",
+ "pathName": "pages/avatar/avatar",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "badge",
+ "pathName": "pages/badge/badge",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "back-top",
+ "pathName": "pages/back-top/back-top",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "button",
"pathName": "pages/button/button",
"query": "",
"scene": null
},
{
- "id": -1,
- "name": "rate",
- "pathName": "pages/rate/rate",
+ "name": "calendar",
+ "pathName": "pages/calendar/calendar",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "cascader",
+ "pathName": "pages/cascader/cascader",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "cell",
+ "pathName": "pages/cell/cell",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "collapse",
+ "pathName": "pages/collapse/collapse",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "count-down",
+ "pathName": "pages/count-down/count-down",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "checkbox",
+ "pathName": "pages/checkbox/checkbox",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "dialog",
+ "pathName": "pages/dialog/dialog",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "divider",
+ "pathName": "pages/divider/divider",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "date-time-picker",
+ "pathName": "pages/date-time-picker/date-time-picker",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "drawer",
+ "pathName": "pages/drawer/drawer",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "dropdown-menu",
+ "pathName": "pages/dropdown-menu/dropdown-menu",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "empty",
+ "pathName": "pages/empty/empty",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "fab",
+ "pathName": "pages/fab/fab",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "footer",
+ "pathName": "pages/footer/footer",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "grid",
+ "pathName": "pages/grid/grid",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "icon",
+ "pathName": "pages/icon/icon",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "image",
+ "pathName": "pages/image/image",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "image-viewer",
+ "pathName": "pages/image-viewer/image-viewer",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "input",
+ "pathName": "pages/input/input",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "link",
+ "pathName": "pages/link/link",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "message",
+ "pathName": "pages/message/message",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "navbar",
+ "pathName": "pages/navbar/navbar",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "notice-bar",
+ "pathName": "pages/notice-bar/notice-bar",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "loading",
+ "pathName": "pages/loading/loading",
+ "query": "",
"scene": null
},
{
- "id": -1,
"name": "indexes",
"pathName": "pages/indexes/indexes",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "progress",
+ "pathName": "pages/progress/progress",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "overlay",
+ "pathName": "pages/overlay/overlay",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "picker",
+ "pathName": "pages/picker/picker",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "popup",
+ "pathName": "pages/popup/popup",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "pull-down-refresh",
+ "pathName": "pages/pull-down-refresh/pull-down-refresh",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "radio",
+ "pathName": "pages/radio/radio",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "rate",
+ "pathName": "pages/rate/rate",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "result",
+ "pathName": "pages/result/result",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "search",
+ "pathName": "pages/search/search",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "slider",
+ "pathName": "pages/slider/slider",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "side-bar",
+ "pathName": "pages/side-bar/side-bar",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "skeleton",
+ "pathName": "pages/skeleton/skeleton",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "steps",
+ "pathName": "pages/steps/steps",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "stepper",
+ "pathName": "pages/stepper/stepper",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "sticky",
+ "pathName": "pages/sticky/sticky",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "switch",
+ "pathName": "pages/switch/switch",
+ "query": "",
"scene": null
},
{
- "id": -1,
"name": "swiper",
"pathName": "pages/swiper/swiper",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "swipe-cell",
+ "pathName": "pages/swipe-cell/swipe-cell",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "tab-bar",
+ "pathName": "pages/tab-bar/tab-bar",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "tabs",
+ "pathName": "pages/tabs/tabs",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "tag",
+ "pathName": "pages/tag/tag",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "textarea",
+ "pathName": "pages/textarea/textarea",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "toast",
+ "pathName": "pages/toast/toast",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "tree-select",
+ "pathName": "pages/tree-select/tree-select",
+ "query": "",
+ "scene": null
+ },
+ {
+ "name": "upload",
+ "pathName": "pages/upload/upload",
+ "query": "",
"scene": null
},
{
"id": -1,
- "name": "actionSheet",
- "pathName": "pages/action-sheet/action-sheet",
+ "name": "search",
+ "pathName": "pages/search/search",
+ "scene": null
+ },
+ {
+ "id": -1,
+ "name": "checkbox",
+ "pathName": "pages/checkbox/checkbox",
"scene": null
}
]
diff --git a/gen-demo-test.js b/gen-demo-test.js
new file mode 100644
index 000000000..3ecfa9a49
--- /dev/null
+++ b/gen-demo-test.js
@@ -0,0 +1,124 @@
+const fs = require('fs');
+const path = require('path');
+const camelCase = require('lodash/camelCase');
+const upperFirst = require('lodash/upperFirst');
+
+// const fixedDateComponentList = ['config-provider', 'time-picker', 'date-picker', 'table', 'form', 'calendar']; // 需要在测试阶段固定日期的组件,table中因为有filter例子 渲染datepicker需要固定
+
+// // TODO 过滤掉一些导致挂掉的demo
+// const filterCom = ['table'];
+// const filterDemo = {
+// table: ['virtual-scroll'],
+// };
+
+const CONFIG = {
+ sourcePath: path.resolve(__dirname, 'src'),
+ targetPath: path.resolve(__dirname, 'src'),
+ defaultTemplate: ['import simulate from \'miniprogram-simulate\';', 'import path from \'path\';'].join('\n'),
+};
+
+/*
+import simulate from 'miniprogram-simulate';
+import getDemoPath from '../../../test/utils/getDemoPath';
+
+describe('radio basic demo', () => {
+ let id;
+ beforeAll(() => {
+ id = simulate.load(getDemoPath('radio', 'basic'), {
+ less: true,
+ });
+ });
+ test('demo should render correctly', async () => {
+ const container = simulate.render(id);
+ container.attach(document.createElement('parent-wrapper'));
+ expect(container.toJSON()).toMatchSnapshot();
+ });
+});
+*/
+
+const { sourcePath, targetPath, defaultTemplate } = CONFIG;
+
+const data = `/**
+ * 该文件为由脚本 \`npm run test:demo\` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
+ */
+
+${defaultTemplate}
+{{ HERE IS DEMO LIST }}
+`;
+
+function getKeyFunction(component) {
+ const newComponent = upperFirst(camelCase(component));
+
+ return `
+describe('${newComponent}', () => {
+ mapper.forEach((demoName) => {
+ it(\`${newComponent} \${demoName} demo works fine\`, () => {
+ const id = load(path.resolve(__dirname, \`../../${component}/_example/\${demoName}/index\`), demoName);
+ const container = simulate.render(id);
+ container.attach(document.createElement('parent-wrapper'));
+ expect(container.toJSON()).toMatchSnapshot();
+ });
+ });
+});`;
+}
+
+function outputOneComponentTestFile(component, demoFiles) {
+ const outputPath = `${targetPath}/${component}/__test__`;
+ const imports = [];
+ const demos = [];
+ let hasDemo = false;
+
+ demoFiles.forEach((demo) => {
+ const fp = path.resolve(`${sourcePath}/${component}/_example/${demo}`);
+ // if (filterCom.includes(component) && filterDemo[component].includes(demo.replace('.vue', ''))) return;
+ if (fs.statSync(fp).isDirectory()) {
+ // const name = camelCase(demo);
+ // imports.push(`import ${name} from '@/examples/${component}/demos/${demo}';`);
+ demos.push(`'${demo}'`);
+ hasDemo = true;
+ }
+ });
+ // if (fixedDateComponentList.includes(component)) {
+ // imports.unshift('import MockDate from \'mockdate\';\n');
+ // imports.push('\nMockDate.set(\'2020-12-28\');');
+ // }
+
+ if (!hasDemo) return;
+
+ const keyData = [imports.join('\n'), `const mapper = [${demos.join(', ')}];`, getKeyFunction(component)].join('\n');
+ const testFileData = data.replace('{{ HERE IS DEMO LIST }}', keyData);
+ fs.mkdir(outputPath, { recursive: true }, (err) => {
+ if (err) {
+ console.error(err);
+ return;
+ }
+ fs.writeFile(`${outputPath}/demo.test.js`, testFileData, (writeErr) => {
+ if (writeErr) {
+ return console.error(writeErr);
+ }
+ return console.log(`test file: ${outputPath} has been created.`);
+ });
+ });
+}
+
+function main() {
+ fs.readdir(sourcePath, (err, files) => {
+ if (err) {
+ console.log('Error', err);
+ } else {
+ const generation = (componentFolder) => {
+ const demoPath = `${sourcePath}/${componentFolder}/_example`;
+ fs.readdir(demoPath, (err1, demoFiles) => {
+ if (err1) {
+ console.log('Error', err1);
+ } else {
+ outputOneComponentTestFile(componentFolder, demoFiles);
+ }
+ });
+ }
+ files.forEach(generation);
+ }
+ });
+}
+
+main();
diff --git a/jest.config.js b/jest.config.js
new file mode 100644
index 000000000..3b2caef7f
--- /dev/null
+++ b/jest.config.js
@@ -0,0 +1,31 @@
+module.exports = {
+ verbose: true,
+ testEnvironment: 'jsdom',
+ testURL: 'http://localhost/',
+ moduleFileExtensions: ['js', 'ts'],
+ moduleNameMapper: {
+ '^tdesign-miniprogram/(.*)': '/src/$1',
+ },
+ testMatch: ['/src/**/__test__/**/*.test.{js,ts}'],
+ collectCoverageFrom: ['/src/**/*.{js,ts}', '!**/__test__/**', '!**/_example/**'],
+ collectCoverage: true,
+ coverageProvider: 'v8',
+ coverageDirectory: '/test/unit/coverage',
+ reporters: [
+ 'default',
+ [
+ './node_modules/jest-html-reporter',
+ {
+ pageTitle: 'TDesign-miniprogram Unit Test Report',
+ outputPath: './test/unit/report/test-report.html',
+ },
+ ],
+ ],
+ setupFiles: ['/script/test/setup.js'],
+ coverageReporters: ['html', 'json-summary'],
+ globals: {
+ CONFIG_PREFIX: 't',
+ },
+ globalSetup: '/script/test/globalSetup.js',
+ snapshotSerializers: ['miniprogram-simulate/jest-snapshot-plugin'],
+};
diff --git a/jest.unit.config.js b/jest.unit.config.js
deleted file mode 100644
index b8a97f9a4..000000000
--- a/jest.unit.config.js
+++ /dev/null
@@ -1,18 +0,0 @@
-module.exports = {
- verbose: true,
- testEnvironment: 'jsdom',
- testURL: 'http://localhost/',
- moduleFileExtensions: ['js', 'ts'],
- testMatch: ['/src/**/__test__/**/*.test.{js,ts}'],
- collectCoverageFrom: ['/src/**/*.{js,ts}', '!**/__test__/**'],
- collectCoverage: true,
- coverageDirectory: '/test/unit/coverage',
- reporters: [
- 'default',
- ['./node_modules/jest-html-reporter', {
- pageTitle: 'TDesign-miniprogram Unit Test Report',
- outputPath: './test/unit/report/test-report.html',
- }],
- ],
- coverageReporters: ['html', 'text-summary'],
-};
diff --git a/jest.virtualHost.config.js b/jest.virtualHost.config.js
new file mode 100644
index 000000000..1f25661ea
--- /dev/null
+++ b/jest.virtualHost.config.js
@@ -0,0 +1,37 @@
+/**
+ * virtualHost 的开启和关闭对 dom 渲染会产生较大差异,且在单测中无法通过 selectComponent 获取子组件实例,
+ * 故设置两个 jest 配置文件,区分 virtualHost 的两种状态。
+ */
+
+module.exports = {
+ verbose: true,
+ testEnvironment: 'jsdom',
+ testURL: 'http://localhost/',
+ moduleFileExtensions: ['js', 'ts'],
+ moduleNameMapper: {
+ '^tdesign-miniprogram/(.*)': '/src/$1',
+ },
+ testMatch: ['/src/**/__test__/**/*.test.{js,ts}'],
+ collectCoverageFrom: ['/src/**/*.{js,ts}', '!**/__test__/**', '!**/_example/**'],
+ collectCoverage: true,
+ coverageProvider: 'v8',
+ coverageDirectory: '/test/unit-virtualHost/coverage',
+ reporters: [
+ 'default',
+ [
+ './node_modules/jest-html-reporter',
+ {
+ pageTitle: 'TDesign-miniprogram Unit Test Report(virtualHost)',
+ outputPath: './test/unit-virtualHost/report/test-report.html',
+ },
+ ],
+ ],
+ setupFiles: ['/script/test/virtualHostSetup.js'],
+ coverageReporters: ['html', 'json-summary'],
+ globals: {
+ CONFIG_PREFIX: 't',
+ },
+ globalSetup: '/script/test/globalSetup.js',
+ snapshotSerializers: ['miniprogram-simulate/jest-snapshot-plugin'],
+ snapshotResolver: '/script/test/snapshotResolver.js',
+};
diff --git a/package.json b/package.json
index 61902fe15..13455f4e9 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,11 @@
"qq",
"miniprogram"
],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/Tencent/tdesign-miniprogram"
+ },
+ "homepage": "https://tdesign.tencent.com/miniprogram",
"scripts": {
"start": "npm run dev",
"dev": "cross-env NODE_ENV=development gulp dev --gulpfile script/gulpfile.js --cwd ./",
@@ -34,19 +39,26 @@
"site:qq": "cd qq/site && vite build",
"site:dev:qq": "cd qq/site && vite",
"site:intranet:qq": "cd qq/site && vite build --mode intranet",
- "test": "jest -c jest.unit.config.js && jest -c jest.e2e.config.js",
- "test:unit": "jest -c jest.unit.config.js",
+ "cover": "jest --coverage",
+ "test": "jest && jest -c jest.virtualHost.config.js && jest -c jest.e2e.config.js",
+ "test:virtualHost": "jest -c jest.virtualHost.config.js",
+ "test:snap-update": "npm run test:virtualHost -- -u && npm run test:unit -- -u",
+ "test:demo": "node gen-demo-test.js",
+ "test:unit": "jest",
"test:e2e": "jest -c jest.e2e.config.js",
+ "badge": "node script/coverage-badge.js",
"prepare": "husky install",
"generate": "gulp generate --gulpfile script/gulpfile.js --cwd ./",
"changelog": "node script/generate-changelog.js",
"changelog:qq": "node qq/script/generate-changelog.js",
- "robot": "publish-cli robot-msg"
+ "robot": "publish-cli robot-msg",
+ "qrcode": "node script/qrcode/index.js"
},
"author": "tdesign",
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.12.10",
+ "@babel/plugin-proposal-decorators": "^7.18.9",
"@babel/preset-env": "^7.12.11",
"@babel/preset-typescript": "^7.12.7",
"@commitlint/cli": "^16.0.2",
@@ -54,20 +66,22 @@
"@rollup/plugin-node-resolve": "^13.0.5",
"@types/jest": "^27.0.3",
"@typescript-eslint/eslint-plugin": "^5.6.0",
- "@typescript-eslint/parser": "^5.6.0",
- "@vitejs/plugin-vue": "^1.4.0",
+ "@typescript-eslint/parser": "~5.35.0",
+ "@vitejs/plugin-vue": "^2.3.3",
"@vitejs/plugin-vue-jsx": "^1.1.7",
"@vue/compiler-sfc": "^3.2.4",
+ "axios": "^1.1.3",
"babel-jest": "^26.6.3",
"commitizen": "^4.2.4",
"cross-env": "^7.0.2",
"cz-conventional-changelog": "^3.3.0",
- "del": "^5.1.0",
+ "del": "^6.1.1",
"eslint": "^7.0.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-prettier": "^4.0.0",
+ "glob": "^8.1.0",
"gray-matter": "^4.0.3",
"gulp": "^4.0.2",
"gulp-changed": "^4.0.2",
@@ -79,25 +93,28 @@
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-replace-task": "^2.0.1",
- "gulp-sourcemaps": "^2.6.5",
+ "gulp-sourcemaps": "^3.0.0",
"gulp-typescript": "^6.0.0-alpha.1",
"husky": "^7.0.4",
"jest": "^26.6.3",
"jest-html-reporter": "^3.3.0",
+ "jsdom": "^20.0.0",
"less": "^4.1.1",
"lint-staged": "^10.0.0-1",
+ "lodash": "^4.17.21",
"miniprogram-api-typings": "^3.4.6",
"miniprogram-automator": "^0.10.0",
- "miniprogram-simulate": "^1.2.8",
+ "miniprogram-simulate": "^1.5.7",
"npm-run-all": "^4.1.5",
"playwright": "^1.19.1",
"prettier": "^2.0.5",
"prismjs": "^1.24.1",
"standard-changelog": "^2.0.27",
"stylelint": "^13.13.1",
- "tdesign-publish-cli": "^0.0.9",
- "tdesign-site-components": "^0.10.0",
- "typescript": "^4.5.2",
+ "tdesign-icons-view": "^0.1.0",
+ "tdesign-publish-cli": "^0.0.12",
+ "tdesign-site-components": "^0.12.2",
+ "typescript": "~4.7.2",
"vite": "^2.7.6",
"vite-plugin-tdoc": "^2.0.1",
"vue": "^3.2.4",
@@ -109,7 +126,7 @@
}
},
"lint-staged": {
- "{src,example,script}/**/*.{js,ts,wxml,html,json,wxs,less}": [
+ "{src,example,script}/**/*.{js,ts,wxml,html,json,less}": [
"prettier --write"
],
"{src,example}/**/*.{js,ts}": [
diff --git a/qq/example/.stylelintrc b/qq/example/.stylelintrc
deleted file mode 100644
index 3a6f456a3..000000000
--- a/qq/example/.stylelintrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- extends: ["../.stylelintrc"],
- rules: {
- "declaration-no-important": null
- },
-}
\ No newline at end of file
diff --git a/qq/example/app.json b/qq/example/app.json
deleted file mode 100644
index 5f00df819..000000000
--- a/qq/example/app.json
+++ /dev/null
@@ -1,143 +0,0 @@
-{
- "pages": [
- "pages/home/home",
- "pages/home/navigateFail/navigateFail",
- "pages/gulp-error/index"
- ],
- "usingComponents": {
- "t-demo": "../../components/demo-block/index",
- "t-avatar": "tdesign-qq-miniprogram/avatar/avatar",
- "t-avatar-group": "tdesign-qq-miniprogram/avatar/avatar-group",
- "t-badge": "tdesign-qq-miniprogram/badge/badge",
- "t-button": "tdesign-qq-miniprogram/button/button",
- "t-cell": "tdesign-qq-miniprogram/cell/cell",
- "t-cell-group": "tdesign-qq-miniprogram/cell-group/cell-group",
- "t-collapse": "tdesign-qq-miniprogram/collapse/collapse",
- "t-collapse-panel": "tdesign-qq-miniprogram/collapse/collapse-panel",
- "t-dialog": "tdesign-qq-miniprogram/dialog/dialog",
- "t-tabs": "tdesign-qq-miniprogram/tabs/tabs",
- "t-tab-panel": "tdesign-qq-miniprogram/tabs/tab-panel",
- "t-loading": "tdesign-qq-miniprogram/loading/loading",
- "t-button-group": "tdesign-qq-miniprogram/button-group/button-group",
- "t-icon": "tdesign-qq-miniprogram/icon/icon",
- "t-rate": "tdesign-qq-miniprogram/rate/rate",
- "t-picker": "tdesign-qq-miniprogram/picker/picker",
- "t-picker-item": "tdesign-qq-miniprogram/picker/picker-item",
- "t-progress": "tdesign-qq-miniprogram/progress/progress",
- "t-input": "tdesign-qq-miniprogram/input/input",
- "t-textarea": "tdesign-qq-miniprogram/textarea/textarea",
- "t-message": "tdesign-qq-miniprogram/message/message",
- "t-toast": "tdesign-qq-miniprogram/toast/toast",
- "t-segmented-control": "tdesign-qq-miniprogram/segmented-control/segmented-control",
- "t-stepper": "tdesign-qq-miniprogram/stepper/stepper",
- "t-slider": "tdesign-qq-miniprogram/slider/slider",
- "t-tag": "tdesign-qq-miniprogram/tag/tag",
- "t-radio": "tdesign-qq-miniprogram/radio/radio",
- "t-radio-group": "tdesign-qq-miniprogram/radio-group/radio-group",
- "t-check-tag": "tdesign-qq-miniprogram/tag/check-tag",
- "t-checkbox": "tdesign-qq-miniprogram/checkbox/checkbox",
- "t-checkbox-group": "tdesign-qq-miniprogram/checkbox-group/checkbox-group",
- "t-swipe-cell": "tdesign-qq-miniprogram/swipe-cell/swipe-cell",
- "t-swiper": "tdesign-qq-miniprogram/swiper/swiper",
- "t-swiper-item": "tdesign-qq-miniprogram/swiper/swiper-item",
- "t-swiper-nav": "tdesign-qq-miniprogram/swiper/swiper-nav",
- "t-switch": "tdesign-qq-miniprogram/switch/switch",
- "t-sticky": "tdesign-qq-miniprogram/sticky/sticky",
- "t-fab": "tdesign-qq-miniprogram/fab/fab",
- "t-tab-bar": "tdesign-qq-miniprogram/tab-bar/tab-bar",
- "t-tab-bar-item": "tdesign-qq-miniprogram/tab-bar/tab-bar-item",
- "t-transition": "tdesign-qq-miniprogram/transition/transition",
- "t-popup": "tdesign-qq-miniprogram/popup/popup",
- "t-indexes": "tdesign-qq-miniprogram/indexes/indexes",
- "t-steps": "tdesign-qq-miniprogram/steps/steps",
- "t-step-item": "tdesign-qq-miniprogram/steps/step-item",
- "t-dropdown-menu": "tdesign-qq-miniprogram/dropdown-menu/dropdown-menu",
- "t-dropdown-item": "tdesign-qq-miniprogram/dropdown-menu/dropdown-item",
- "t-drawer": "tdesign-qq-miniprogram/drawer/drawer",
- "t-pull-down-refresh": "tdesign-qq-miniprogram/pull-down-refresh/pull-down-refresh",
- "t-skeleton": "tdesign-qq-miniprogram/skeleton/skeleton",
- "t-footer": "tdesign-qq-miniprogram/footer/footer",
- "t-divider": "tdesign-qq-miniprogram/divider/divider",
- "t-empty": "tdesign-qq-miniprogram/empty/empty",
- "t-back-top": "tdesign-qq-miniprogram/back-top/back-top",
- "t-grid-item": "tdesign-qq-miniprogram/grid/grid-item",
- "t-grid": "tdesign-qq-miniprogram/grid/grid",
- "t-upload": "tdesign-qq-miniprogram/upload/upload",
- "t-count-down": "tdesign-qq-miniprogram/count-down/count-down",
- "t-image": "tdesign-qq-miniprogram/image/image",
- "t-search": "tdesign-qq-miniprogram/search/search",
- "t-navbar": "tdesign-qq-miniprogram/navbar/navbar",
- "t-date-time-picker": "tdesign-qq-miniprogram/date-time-picker/date-time-picker",
- "t-action-sheet": "tdesign-qq-miniprogram/action-sheet/action-sheet",
- "t-notice-bar": "tdesign-qq-miniprogram/notice-bar/notice-bar"
- },
- "subpackages": [
- {
- "root": "subpages",
- "pages": [
- "picker/picker",
- "avatar/avatar",
- "button/button",
- "button-group/button-group",
- "dialog/dialog",
- "tabs/tabs",
- "icon/icon",
- "loading/loading",
- "loading/loadingProgress/loadingProgress",
- "rate/rate",
- "progress/progress",
- "cell/cell",
- "cell-group/cell-group",
- "collapse/collapse",
- "input/input",
- "badge/badge",
- "textarea/textarea",
- "message/message",
- "toast/toast",
- "segmented-control/segmented-control",
- "stepper/stepper",
- "slider/slider",
- "radio/radio",
- "swipe-cell/swipe-cell",
- "swiper/swiper",
- "switch/switch",
- "sticky/sticky",
- "tag/tag",
- "checkbox/checkbox",
- "fab/fab",
- "tab-bar/tab-bar",
- "transition/transition",
- "popup/popup",
- "indexes/indexes",
- "indexes/display",
- "steps/steps",
- "dropdown-menu/dropdown-menu",
- "drawer/drawer",
- "pull-down-refresh/pull-down-refresh",
- "skeleton/skeleton",
- "footer/footer",
- "divider/divider",
- "empty/empty",
- "empty/empty-page",
- "back-top/back-top",
- "grid/grid",
- "upload/upload",
- "count-down/count-down",
- "image/image",
- "search/search",
- "navbar/navbar",
- "date-time-picker/date-time-picker",
- "action-sheet/action-sheet",
- "notice-bar/notice-bar"
- ]
- }
- ],
- "window": {
- "backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#f6f6f6",
- "backgroundColor": "#f6f6f6",
- "navigationBarTitleText": "TDesign",
- "navigationBarTextStyle": "black"
- },
- "sitemapLocation": "sitemap.json"
-}
diff --git a/qq/example/app.less b/qq/example/app.less
deleted file mode 100644
index 7775c1640..000000000
--- a/qq/example/app.less
+++ /dev/null
@@ -1,61 +0,0 @@
-page {
- background: #f6f6f6; // 和设计师确认过,统一改成这个颜色
-}
-
-.demo {
- padding-bottom: 56rpx;
- // padding-bottom: env(safe-area-inset-bottom, 28px); 小程序真机渲染有bug
- // padding-bottom: constant(safe-area-inset-bottom, 28px);
-
- &-title {
- font-size: 40rpx;
- font-weight: 700;
- line-height: 56rpx;
- margin: 48rpx 32rpx 0;
- color: rgba(0, 0, 0, .9);
- }
-
- &-desc {
- font-size: 24rpx;
- color: #999;
- margin: 8rpx 32rpx;
- line-height: 36rpx;
- }
-
- &-section {
- margin-top: 56rpx;
-
- &__title {
- font-size: 32rpx;
- margin: 32rpx 32rpx 0;
- color: rgba(0, 0, 0, .9);
- line-height: 48rpx;
- }
-
- &__sub-title {
- font-size: 28rpx;
- margin: 32rpx 32rpx 24rpx 32rpx;
- color: rgba(0, 0, 0, .9);
- line-height: 44rpx;
- }
-
- &__desc {
- font-size: 24rpx;
- color: rgba(0, 0, 0, .4);
- margin: 8rpx 32rpx;
- line-height: 40rpx;
- }
-
- &__container {
- padding: 0 32rpx;
- }
-
- .button-group {
- margin: 56rrpx 0rpx;
- }
-
- .button-group-item {
- margin-bottom: 48rrpx;
- }
- }
-}
diff --git a/qq/example/app.ts b/qq/example/app.ts
deleted file mode 100644
index fa5510a8b..000000000
--- a/qq/example/app.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import gulpError from './utils/gulpError';
-
-App({
- onShow() {
- if (gulpError !== 'gulpErrorPlaceHolder') {
- wx.redirectTo({
- url: `/pages/gulp-error/index?gulpError=${gulpError}`,
- });
- }
- },
-});
diff --git a/qq/example/assets/TDesignLogo@2x.png b/qq/example/assets/TDesignLogo@2x.png
deleted file mode 100644
index ab44a8929..000000000
Binary files a/qq/example/assets/TDesignLogo@2x.png and /dev/null differ
diff --git a/qq/example/components/demo-block/index.json b/qq/example/components/demo-block/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/components/demo-block/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/components/demo-block/index.less b/qq/example/components/demo-block/index.less
deleted file mode 100644
index 7b435f121..000000000
--- a/qq/example/components/demo-block/index.less
+++ /dev/null
@@ -1,54 +0,0 @@
-@import '../../../../src/common/style/_variables.less';
-
-.demo-block {
- margin: @spacer-3 0 0;
- line-height: @text-line-height;
- font-size: @font-size-m;
-
- &__heander {
- color: @text-level-1-color;
- margin: @spacer @spacer-2;
-
- &-title {
- font-weight: 700;
- }
-
- &-desc {
- margin: @spacer 0 @spacer-2;
- font-size: @font-size-s;
- white-space: pre-line;
- opacity: 0.4;
- }
- }
-
- &__oper {
- margin-top: @spacer;
-
- &-subtitle {
- font-size: @font-size-s;
- margin-bottom: @spacer-2;
- opacity: 0.4;
- }
-
- &-btn {
- margin: 0 0 @spacer-2 0;
- height: 48rpx * 2;
- }
- }
-
- &__slot {
- margin-top: @spacer-2;
-
- &.with-padding {
- margin: 0 @spacer-2;
- }
- }
-}
-
-.demo-block_notitle {
- margin-top: 0px;
-
- .demo-block_subtitle {
- margin-top: 32rpx;
- }
-}
diff --git a/qq/example/components/demo-block/index.ts b/qq/example/components/demo-block/index.ts
deleted file mode 100644
index b09a0f627..000000000
--- a/qq/example/components/demo-block/index.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-Component({
- options: {
- multipleSlots: true,
- addGlobalClass: true,
- },
- properties: {
- title: {
- type: String,
- default: '',
- },
- desc: {
- type: String,
- default: '',
- },
- operList: Array,
- padding: {
- type: Boolean,
- default: false,
- },
- },
- methods: {
- clickHandle(e) {
- const { type } = e.currentTarget.dataset;
- this.triggerEvent('clickoper', type);
- },
- },
-});
diff --git a/qq/example/components/demo-block/index.wxml b/qq/example/components/demo-block/index.wxml
deleted file mode 100644
index b9dcc1afb..000000000
--- a/qq/example/components/demo-block/index.wxml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
- {{ title }}
- {{ desc }}
-
-
-
- {{ operItem.title }}
-
-
- {{ btnItem.text }}
-
-
-
-
-
-
-
diff --git a/qq/example/components/pull-down-list/index.less b/qq/example/components/pull-down-list/index.less
deleted file mode 100644
index 1062736e1..000000000
--- a/qq/example/components/pull-down-list/index.less
+++ /dev/null
@@ -1,59 +0,0 @@
-.pullDownList {
- width: 100%;
- box-sizing: border-box;
- background-color: #fff;
- border-radius: 8rpx;
- margin-bottom: 12rpx * 2;
- overflow: hidden;
-
- .switchBox {
- height: 60rpx * 2;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 16rpx * 2;
- font-size: 16rpx * 2;
- line-height: 24rpx * 2;
- color: #333;
- }
-
- .name,
- .icon {
- transition: opacity 0.3s;
- }
-
- .name {
- opacity: 0.9;
- }
-
- &.actived {
- .name {
- opacity: 0.4;
- }
-
- .icon {
- opacity: 0.4;
- }
- }
-
- .childBox {
- transition: height 0.3s;
-
- .child {
- box-sizing: border-box;
- border-bottom: 1rpx solid #e5e5e5;
- height: 56rpx * 2;
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-left: 16rpx * 2;
- margin-right: 16rpx * 2;
- font-size: 16rpx * 2;
- opacity: 0.9;
-
- &:last-of-type {
- border-bottom-color: transparent;
- }
- }
- }
-}
diff --git a/qq/example/components/pull-down-list/index.ts b/qq/example/components/pull-down-list/index.ts
deleted file mode 100644
index 004d49f12..000000000
--- a/qq/example/components/pull-down-list/index.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-const itemHeight = 56 * 2;
-
-Component({
- data: {
- childBoxHeight: 0,
- },
- externalClasses: ['t-class'],
- properties: {
- defaultOpen: {
- type: Boolean,
- value: false,
- },
- name: {
- type: String,
- value: '',
- },
- icon: {
- type: String,
- value: '',
- },
- childArr: {
- type: Array,
- value: [],
- observer(childArr: any[]) {
- this.setData({
- childBoxHeight: this.data.defaultOpen ? itemHeight * childArr.length : 0,
- });
- },
- },
- },
- methods: {
- switchHandle() {
- const { childArr, childBoxHeight } = this.data;
- this.setData({
- childBoxHeight: childBoxHeight > 0 ? 0 : childArr.length * itemHeight,
- });
- },
- tapChild(e: any) {
- this.triggerEvent('click', e.target.dataset);
- },
- },
-});
diff --git a/qq/example/components/pull-down-list/index.wxml b/qq/example/components/pull-down-list/index.wxml
deleted file mode 100644
index a7a375161..000000000
--- a/qq/example/components/pull-down-list/index.wxml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
- {{ name }}
-
-
-
-
- {{ item.name }} {{ item.label }}
-
-
-
-
diff --git a/qq/example/demos/radio/basic/basic.json b/qq/example/demos/radio/basic/basic.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/demos/radio/basic/basic.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/demos/radio/basic/basic.wxml b/qq/example/demos/radio/basic/basic.wxml
deleted file mode 100644
index c1c2a6991..000000000
--- a/qq/example/demos/radio/basic/basic.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/qq/example/demos/radio/group/group.json b/qq/example/demos/radio/group/group.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/demos/radio/group/group.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/demos/radio/group/group.ts b/qq/example/demos/radio/group/group.ts
deleted file mode 100644
index 15a997ed2..000000000
--- a/qq/example/demos/radio/group/group.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-Component({
- properties: {
- items: {
- type: Array,
- value: [],
- },
- value: {
- type: String,
- value: '',
- },
- },
- data: {
- currentValue: '',
- },
- methods: {
- onChange(event) {
- this.setData({
- currentValue: event.detail.name,
- });
- },
- },
-});
diff --git a/qq/example/demos/radio/group/group.wxml b/qq/example/demos/radio/group/group.wxml
deleted file mode 100644
index 8ff56d4c1..000000000
--- a/qq/example/demos/radio/group/group.wxml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
diff --git a/qq/example/pages/gulp-error/index.json b/qq/example/pages/gulp-error/index.json
deleted file mode 100644
index 6a202bc43..000000000
--- a/qq/example/pages/gulp-error/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "gulp编译错误"
-}
diff --git a/qq/example/pages/gulp-error/index.ts b/qq/example/pages/gulp-error/index.ts
deleted file mode 100644
index 91a582c71..000000000
--- a/qq/example/pages/gulp-error/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-Page({
- data: {
- gulpError: '',
- },
- onLoad({ gulpError }) {
- this.setData({ gulpError });
- },
-});
diff --git a/qq/example/pages/gulp-error/index.wxml b/qq/example/pages/gulp-error/index.wxml
deleted file mode 100644
index 65a9a36bc..000000000
--- a/qq/example/pages/gulp-error/index.wxml
+++ /dev/null
@@ -1 +0,0 @@
-gulp编译错误: {{gulpError}}
diff --git a/qq/example/pages/home/data/base.ts b/qq/example/pages/home/data/base.ts
deleted file mode 100644
index ee72480b8..000000000
--- a/qq/example/pages/home/data/base.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-const base = {
- name: '设计基础',
- icon: 'app',
- childArr: [
- // {
- // name: 'Color',
- // label: '色彩',
- // },
- // {
- // name: 'ComerRadius',
- // label: '圆角',
- // },
- // {
- // name: 'Environment',
- // label: '环境',
- // },
- {
- name: 'Button',
- label: '按钮',
- path: 'subpages',
- },
- {
- name: 'Divider',
- label: '分割线',
- path: 'subpages',
- },
- {
- name: 'Fab',
- label: '悬浮按钮',
- path: 'subpages',
- },
- {
- name: 'Icon',
- label: '图标',
- path: 'subpages',
- },
- // {
- // name: 'Layout',
- // label: '布局',
- // },
- // {
- // name: 'Typography',
- // label: '字体',
- // },
- ],
-};
-
-export default base;
diff --git a/qq/example/pages/home/data/display.ts b/qq/example/pages/home/data/display.ts
deleted file mode 100644
index 27ef170dd..000000000
--- a/qq/example/pages/home/data/display.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-const display = {
- name: '信息展示',
- icon: 'image',
- childArr: [
- {
- name: 'Avatar',
- label: '头像',
- path: 'subpages',
- },
- {
- name: 'Badge',
- label: '徽标',
- path: 'subpages',
- },
- // {
- // name: 'Calendar',
- // label: '日历',
- // },
- // {
- // name: 'CanvasPoster',
- // label: '海报分享',
- // },
- {
- name: 'Cell',
- label: '单元格',
- path: 'subpages',
- },
- {
- name: 'Collapse',
- label: '折叠面板',
- path: 'subpages',
- },
- {
- name: 'CountDown',
- label: '倒计时',
- path: 'subpages',
- },
- {
- name: 'DropdownMenu',
- label: '下拉菜单',
- path: 'subpages',
- },
- {
- name: 'Empty',
- label: '空状态',
- path: 'subpages',
- },
- // {
- // name: 'Error',
- // label: '错误状态',
- // },
- {
- name: 'Footer',
- label: '页脚',
- path: 'subpages',
- },
- {
- name: 'Grid',
- label: '宫格',
- path: 'subpages',
- },
- {
- name: 'Image',
- label: '图片',
- path: 'subpages',
- },
- // {
- // name: 'Preview',
- // label: '图片预览',
- // },
- {
- name: 'Swiper',
- label: '轮播图',
- path: 'subpages',
- },
- {
- name: 'Tag',
- label: '标签',
- path: 'subpages',
- },
- {
- name: 'Skeleton',
- label: '骨架屏',
- path: 'subpages',
- },
- {
- name: 'Sticky',
- label: '吸顶',
- path: 'subpages',
- },
- {
- name: 'NoticeBar',
- label: '公告栏',
- path: 'subpages',
- },
- ],
-};
-
-export default display;
diff --git a/qq/example/pages/home/data/form.ts b/qq/example/pages/home/data/form.ts
deleted file mode 100644
index cfb732d68..000000000
--- a/qq/example/pages/home/data/form.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-const form = {
- name: '表单',
- icon: 'bulletpoint',
- childArr: [
- {
- name: 'Checkbox',
- label: '多选框',
- path: 'subpages',
- },
- {
- name: 'DateTimePicker',
- label: '时间选择器',
- path: 'subpages',
- },
- {
- name: 'Input',
- label: '输入框',
- path: 'subpages',
- },
- {
- name: 'Textarea',
- label: '多行输入框',
- path: 'subpages',
- },
- {
- name: 'Picker',
- label: '选择器',
- path: 'subpages',
- },
- {
- name: 'Radio',
- label: '单选框',
- path: 'subpages',
- },
- {
- name: 'Rate',
- label: '评分',
- path: 'subpages',
- },
- {
- name: 'Search',
- label: '搜索框',
- path: 'subpages',
- },
- {
- name: 'Slider',
- label: '滑动选择器',
- path: 'subpages',
- },
- {
- name: 'Stepper',
- label: '步进器',
- path: 'subpages',
- },
- {
- name: 'Switch',
- label: '开关',
- path: 'subpages',
- },
- // {
- // name: 'PeriodSelector',
- // label: '时间段选择器',
- // },
- {
- name: 'Upload',
- label: '上传',
- path: 'subpages',
- },
- ],
-};
-
-export default form;
diff --git a/qq/example/pages/home/data/index.ts b/qq/example/pages/home/data/index.ts
deleted file mode 100644
index b00872acb..000000000
--- a/qq/example/pages/home/data/index.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import base from './base';
-import nav from './nav';
-import display from './display';
-import form from './form';
-import ux from './ux';
-
-export default [base, nav, display, form, ux];
diff --git a/qq/example/pages/home/data/nav.ts b/qq/example/pages/home/data/nav.ts
deleted file mode 100644
index 435c8d8d1..000000000
--- a/qq/example/pages/home/data/nav.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-const nav = {
- name: ' 导航',
- icon: 'view-module',
- childArr: [
- {
- name: 'Drawer',
- label: '抽屉',
- path: 'subpages',
- },
- {
- name: 'Indexes',
- label: '索引',
- path: 'subpages',
- },
- {
- name: 'Navbar',
- label: '导航栏',
- path: 'subpages',
- },
- // {
- // name: 'SegmentedControl',
- // label: '分段器',
- // },
- {
- name: 'Steps',
- label: '步骤条',
- path: 'subpages',
- },
- {
- name: 'TabBar',
- label: '标签栏',
- path: 'subpages',
- },
- {
- name: 'Tabs',
- label: '选项卡',
- path: 'subpages',
- },
- ],
-};
-
-export default nav;
diff --git a/qq/example/pages/home/data/ux.ts b/qq/example/pages/home/data/ux.ts
deleted file mode 100644
index b9fa38a7c..000000000
--- a/qq/example/pages/home/data/ux.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-const ux = {
- name: '反馈提示',
- icon: 'chat',
- childArr: [
- {
- name: 'ActionSheet',
- label: '动作面板',
- path: 'subpages',
- },
- {
- name: 'BackTop',
- label: '返回顶部',
- path: 'subpages',
- },
- {
- name: 'Dialog',
- label: '对话框',
- path: 'subpages',
- },
- {
- name: 'Loading',
- label: '加载',
- path: 'subpages',
- },
- // {
- // name: 'LoadMore',
- // label: '加载更多',
- // },
- {
- name: 'Message',
- label: '消息通知',
- path: 'subpages',
- },
- // {
- // name: 'NoticeBar',
- // label: '公告栏',
- // },
- {
- name: 'Popup',
- label: '弹出层',
- path: 'subpages',
- },
- {
- name: 'Progress',
- label: '进度条',
- path: 'subpages',
- },
- {
- name: 'PullDownRefresh',
- label: '下拉刷新',
- path: 'subpages',
- },
- {
- name: 'SwipeCell',
- label: '滑动操作',
- path: 'subpages',
- },
- {
- name: 'Toast',
- label: '轻提示',
- path: 'subpages',
- },
- ],
-};
-
-export default ux;
diff --git a/qq/example/pages/home/home.json b/qq/example/pages/home/home.json
deleted file mode 100644
index 4f76dd586..000000000
--- a/qq/example/pages/home/home.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "usingComponents": {
- "t-demo": "../../components/demo-block/index",
- "pull-down-list": "../../components/pull-down-list/index"
- },
- "navigationBarTitleText": "TDesign UI",
- "navigationBarBackgroundColor": "#f6f6f6",
- "navigationBarTextStyle": "black",
- "backgroundColor": "#f6f6f6"
-}
diff --git a/qq/example/pages/home/home.less b/qq/example/pages/home/home.less
deleted file mode 100644
index 0bffac306..000000000
--- a/qq/example/pages/home/home.less
+++ /dev/null
@@ -1,36 +0,0 @@
-page {
- background-color: #f6f6f6;
-}
-
-.main {
- width: 100%;
- box-sizing: border-box;
- padding-left: 16rpx * 2;
- padding-right: 16rpx * 2;
- padding-top: 24rpx * 2;
- padding-bottom: 120rpx * 2;
-}
-
-.title-wrap {
- display: flex;
- align-items: center;
- justify-content: flex-start;
- padding-left: 8rpx * 2;
- padding-right: 8rpx * 2;
-}
-
-.title-icon {
- width: 148rpx * 2;
- height: 40rpx * 2;
-}
-
-.desc {
- color: rgba(0, 0, 0, .4);
- margin-top: 16rpx * 2;
- font-size: 14rpx * 2;
- font-weight: 400;
- line-height: 22rpx * 2;
- margin-bottom: 24rpx * 2;
- padding-left: 8rpx * 2;
- padding-right: 8rpx * 2;
-}
diff --git a/qq/example/pages/home/home.ts b/qq/example/pages/home/home.ts
deleted file mode 100644
index 73f345001..000000000
--- a/qq/example/pages/home/home.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import list from './data/index';
-
-Page({
- data: {
- list,
- },
- onLoad(options) {
- const { q } = options;
- console.info('options', options);
- // 小程序跳转各个小程序组件库
- if (q) {
- // Navigator.gotoPage(path, rest);
- // console.log(option);
- const str = this.getQueryByUrl(decodeURIComponent(q));
- console.log(str, str.page);
- wx.navigateTo({
- url: `/pages/${str.page}/${str.page}`,
- });
- }
- },
-
- clickHandle(e) {
- let { name, path = '' } = e.detail.item as {
- name: string;
- path?: string;
- };
- name = name.replace(/^[A-Z]/, (match) => `${match}`.toLocaleLowerCase());
- name = name.replace(/[A-Z]/g, (match) => {
- return `-${match.toLowerCase()}`;
- });
- if (!path) {
- path = `/subpages/${name}/${name}`;
- }
- path = `/${path}/${name}/${name}`;
-
- wx.navigateTo({
- url: path,
- fail: () => {
- wx.navigateTo({
- url: '/pages/home/navigateFail/navigateFail',
- });
- },
- });
- },
-
- onShareAppMessage() {
- return {
- title: 'TDesign UI',
- path: '/pages/home/home',
- };
- },
- getQueryByUrl(url: string) {
- const data = {};
- const queryArr = `${url}`.match(/([^=?]+)=[^]+/g) || [];
- // 必须是合法字符串
- if (queryArr.length) {
- queryArr.forEach((para) => {
- const d = para.split('=');
- const val = decodeURIComponent(d[1]);
- if (data[d[0]] !== undefined) {
- data[d[0]] += `,${val}`;
- } else {
- data[d[0]] = val;
- }
- });
- }
- return data;
- },
-});
diff --git a/qq/example/pages/home/home.wxml b/qq/example/pages/home/home.wxml
deleted file mode 100644
index 7dda1056c..000000000
--- a/qq/example/pages/home/home.wxml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
- TDesign 适配QQ小程序的组件库
-
-
diff --git a/qq/example/pages/home/navigateFail/navigateFail.json b/qq/example/pages/home/navigateFail/navigateFail.json
deleted file mode 100644
index 9e26dfeeb..000000000
--- a/qq/example/pages/home/navigateFail/navigateFail.json
+++ /dev/null
@@ -1 +0,0 @@
-{}
\ No newline at end of file
diff --git a/qq/example/pages/home/navigateFail/navigateFail.less b/qq/example/pages/home/navigateFail/navigateFail.less
deleted file mode 100644
index 4f067564d..000000000
--- a/qq/example/pages/home/navigateFail/navigateFail.less
+++ /dev/null
@@ -1,24 +0,0 @@
-.demo {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 500rpx * 2;
-
- .fail-error {
- margin-top: 24rpx * 2;
- margin-bottom: 48rpx * 2;
- width: 100%;
- color: rgba(0, 0, 0, 0.4);
- font-size: 14rpx * 2;
- font-weight: 400;
- text-align: center;
- }
-
- .t-button--default {
- width: 160rpx * 2;
- height: 40rpx * 2;
- color: rgba(0, 0, 0, 0.9);
- font-weight: 700;
- font-size: 14rpx * 2;
- }
-}
diff --git a/qq/example/pages/home/navigateFail/navigateFail.ts b/qq/example/pages/home/navigateFail/navigateFail.ts
deleted file mode 100644
index e055770b5..000000000
--- a/qq/example/pages/home/navigateFail/navigateFail.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-Page({
- data: {
- failImage: 'error-circle-filled',
- },
-
- toHome() {
- wx.reLaunch({
- url: '/pages/home/home',
- });
- },
-});
diff --git a/qq/example/pages/home/navigateFail/navigateFail.wxml b/qq/example/pages/home/navigateFail/navigateFail.wxml
deleted file mode 100644
index 22010d144..000000000
--- a/qq/example/pages/home/navigateFail/navigateFail.wxml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
- 页面加载错误
- 回到首页
-
-
diff --git a/qq/example/project.config.json b/qq/example/project.config.json
deleted file mode 100644
index 1c3160cf9..000000000
--- a/qq/example/project.config.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "description": "项目配置文件",
- "packOptions": {
- "ignore": []
- },
- "setting": {
- "urlCheck": false,
- "scopeDataCheck": false,
- "coverView": true,
- "es6": true,
- "postcss": true,
- "compileHotReLoad": false,
- "preloadBackgroundData": false,
- "minified": true,
- "autoAudits": false,
- "newFeature": true,
- "uglifyFileName": false,
- "uploadWithSourceMap": true,
- "useIsolateContext": true,
- "nodeModules": true,
- "enhance": false,
- "useCompilerModule": true,
- "userConfirmedUseCompilerModuleSwitch": false,
- "showShadowRootInWxmlPanel": true
- },
- "compileType": "miniprogram",
- "libVersion": "2.11.3",
- "appid": "wx6f3e38f61d138c04",
- "projectname": "TDesign",
- "debugOptions": {
- "hidedInDevtools": []
- },
- "scripts": {},
- "simulatorType": "wechat",
- "simulatorPluginLibVersion": {},
- "condition": {
- "search": {
- "current": -1,
- "list": []
- },
- "conversation": {
- "current": -1,
- "list": []
- },
- "plugin": {
- "current": -1,
- "list": []
- },
- "game": {
- "list": []
- },
- "gamePlugin": {
- "current": -1,
- "list": []
- },
- "miniprogram": {
- "current": 0,
- "list": []
- }
- }
-}
diff --git a/qq/example/sitemap.json b/qq/example/sitemap.json
deleted file mode 100644
index 9230ad86f..000000000
--- a/qq/example/sitemap.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
- "rules": [
- {
- "action": "allow",
- "page": "*"
- }
- ]
-}
diff --git a/qq/example/subpages/action-sheet/action-sheet.json b/qq/example/subpages/action-sheet/action-sheet.json
deleted file mode 100644
index 972e51df4..000000000
--- a/qq/example/subpages/action-sheet/action-sheet.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "navigationBarTitleText": "ActionSheet",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index",
- "t-toast": "tdesign-qq-miniprogram/toast/toast"
- }
-}
diff --git a/qq/example/subpages/action-sheet/action-sheet.less b/qq/example/subpages/action-sheet/action-sheet.less
deleted file mode 100644
index 6b7f96b49..000000000
--- a/qq/example/subpages/action-sheet/action-sheet.less
+++ /dev/null
@@ -1,62 +0,0 @@
-.action-sheet {
- background-color: #fff;
- font-size: 32rpx;
- line-height: 48rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 48rpx 0rpx 96rpx 0rpx;
- height: 100vh;
-
- .slot-wrap {
- background-color: #fff;
- padding: 10px;
- }
-
- .title {
- font-weight: bold;
- font-size: 40rpx;
- line-height: 56rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 0 32rpx;
- }
-
- .desc {
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- color: rgba(0, 0, 0, 0.4);
- padding: 0 32rpx;
- }
-
- .sub-title {
- margin-top: 40rpx;
- font-weight: bold;
- padding: 0 32rpx;
- }
-
- .t-button {
- width: 686rpx;
- height: 96rpx;
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 32rpx;
-
- &::after {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 200%;
- height: 200%;
- transform: scale(0.5);
- transform-origin: 0 0;
- box-sizing: border-box;
- border: 2rpx solid #dcdcdc;
- }
- }
-
- .demo-block__oper {
- padding: 0 32rpx;
- }
-}
diff --git a/qq/example/subpages/action-sheet/action-sheet.ts b/qq/example/subpages/action-sheet/action-sheet.ts
deleted file mode 100644
index e242a2565..000000000
--- a/qq/example/subpages/action-sheet/action-sheet.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-// @ts-ignore
-import ActionSheet from 'tdesign-qq-miniprogram/action-sheet/index';
-// @ts-ignore
-import Toast from 'tdesign-qq-miniprogram/toast/index';
-import { basicListOption, withIconListOption, grid, withSwiperGrid } from './constants';
-
-Page({
- data: {
- visible: false,
- handler: null,
- operList1: [
- {
- title: '基础动作面板',
- btns: [
- {
- type: 'list',
- text: '列表型',
- },
- {
- type: 'withIconList',
- text: '带图标列表型',
- },
- {
- type: 'grid',
- text: '宫格型',
- },
- {
- type: 'withSwiperGrid',
- text: '宫格型-多页',
- },
- ],
- },
- ],
- },
- clickHandle(e) {
- let handler;
- const { detail } = e;
- switch (detail) {
- case 'list':
- handler = ActionSheet.show(basicListOption);
- break;
- case 'withIconList':
- handler = ActionSheet.show(withIconListOption);
- break;
- case 'grid':
- handler = ActionSheet.show(grid);
- break;
- case 'withSwiperGrid':
- handler = ActionSheet.show(withSwiperGrid);
- break;
- default:
- break;
- }
- this.setData({
- handler,
- });
- },
- onCancelBaseImperative() {
- Toast({
- context: this,
- selector: '#t-toast',
- message: '点击取消',
- });
- this.data.handler?.close();
- },
- onSelectBaseImperative(e) {
- const {
- detail: {
- selected: { label },
- },
- } = e;
- Toast({
- context: this,
- selector: '#t-toast',
- message: `选中${label}`,
- });
- this.data.handler?.close();
- },
- onVisibleChangeBaseImperative(e) {
- const {
- detail: { visible },
- } = e;
- this.setData({
- visible,
- });
- },
-});
diff --git a/qq/example/subpages/action-sheet/action-sheet.wxml b/qq/example/subpages/action-sheet/action-sheet.wxml
deleted file mode 100644
index 897475867..000000000
--- a/qq/example/subpages/action-sheet/action-sheet.wxml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- ActionSheet 动作面板
- 底部弹起的模态面板,包含与当前情境相关的多个选项。
-
-
-
-
-
diff --git a/qq/example/subpages/action-sheet/constants.ts b/qq/example/subpages/action-sheet/constants.ts
deleted file mode 100644
index b22c17732..000000000
--- a/qq/example/subpages/action-sheet/constants.ts
+++ /dev/null
@@ -1,196 +0,0 @@
-// @ts-ignore
-import { ActionSheetTheme } from 'tdesign-qq-miniprogram/action-sheet/index';
-
-const singleCharItems = ['默认选项1', '默认选项2', '默认选项3'];
-
-const basicListOption = {
- theme: ActionSheetTheme.List,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '默认选项',
- },
- {
- label: '自定义选项',
- color: '#0052D9',
- },
- {
- label: '失效选项',
- disabled: true,
- },
- {
- label: '警告选项',
- color: '#e34d59',
- },
- ],
-};
-
-const withIconListOption = {
- theme: ActionSheetTheme.List,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '默认选项',
- icon: 'app',
- },
- {
- label: '自定义选项',
- icon: 'app',
- color: '#0052D9',
- },
- {
- label: '失效选项',
- disabled: true,
- icon: 'app',
- },
- {
- label: '警告选项',
- color: '#e34d59',
- icon: 'app',
- },
- ],
-};
-
-const grid = {
- theme: ActionSheetTheme.Grid,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- ],
-};
-
-const withSwiperGrid = {
- theme: ActionSheetTheme.Grid,
- selector: '#t-action-sheet-imperative',
- items: [
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- {
- label: '文字',
- icon: 'image',
- },
- ],
-};
-
-export { singleCharItems, basicListOption, withIconListOption, grid, withSwiperGrid };
diff --git a/qq/example/subpages/avatar/avatar.json b/qq/example/subpages/avatar/avatar.json
deleted file mode 100644
index 4500b03d8..000000000
--- a/qq/example/subpages/avatar/avatar.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Avatar",
- "navigationBarBackgroundColor": "#fff"
-}
\ No newline at end of file
diff --git a/qq/example/subpages/avatar/avatar.less b/qq/example/subpages/avatar/avatar.less
deleted file mode 100644
index 14fa1fbf3..000000000
--- a/qq/example/subpages/avatar/avatar.less
+++ /dev/null
@@ -1,113 +0,0 @@
-page {
- background: #fff;
-}
-
-.desc {
- margin: 10rpx 32rpx;
- color: #999;
- font-size: 26rpx;
- line-height: 36rpx;
-}
-
-.row {
- display: flex;
- width: 100%;
- margin: 20rpx 0;
-
- .avatar-example {
- text-align: center;
- font-size: 24rpx;
- display: flex;
- flex-direction: column;
-
- .avatar-word {
- margin-top: 16rpx;
- }
- }
-
- .text {
- width: 130rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
-
- .row-text {
- &-64 {
- width: 128rpx;
- }
-
- &-48 {
- width: 96rpx;
- }
-
- &-40 {
- width: 80rpx;
- }
-
- &-32 {
- width: 64rpx;
- }
-
- &-24 {
- width: 48rpx;
- }
- }
-
- .row-text-common {
- // display: flex;
- text-align: center;
- }
-
- .font-size-20 {
- font-size: 40rpx;
- }
-
- .border-size {
- &-2 {
- border: 4rpx solid #fff;
- }
-
- &-3 {
- border: 6rpx solid #fff;
- }
-
- &-4 {
- border: 8rpx solid #fff;
- }
- }
-
- .excursion-right-8 {
- margin-right: -16rpx;
- }
-
- .alt-example {
- color: #fff;
- background-color: #0052d9;
- font-weight: 400;
- }
-}
-
-.bottom-row {
- padding-bottom: 96rpx;
-}
-
-.gutter-column-12 {
- width: 24rpx;
- display: inline-block;
-}
-
-.gutter-column-24 {
- width: 48rpx;
- display: inline-block;
-}
-
-.gutter-column-32 {
- width: 64rpx;
- display: inline-block;
-}
-
-.gutter-column-64 {
- width: 128rpx;
- display: inline-block;
-}
diff --git a/qq/example/subpages/avatar/avatar.ts b/qq/example/subpages/avatar/avatar.ts
deleted file mode 100644
index 4d50602ad..000000000
--- a/qq/example/subpages/avatar/avatar.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-Page({
- data: {
- pics6: [
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/1.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/2.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/3.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/4.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/5.png',
- 'https://cdn-we-retail.ym.tencent.com/retail-ui/components-exp/avatar/avatar-v2/1.png',
- ],
- },
- onAddTap() {
- wx.showToast({ title: '您按下了添加', icon: 'none', duration: 1000 });
- },
-});
diff --git a/qq/example/subpages/avatar/avatar.wxml b/qq/example/subpages/avatar/avatar.wxml
deleted file mode 100644
index dc950896b..000000000
--- a/qq/example/subpages/avatar/avatar.wxml
+++ /dev/null
@@ -1,222 +0,0 @@
-Avatar 头像
-用于展示用户头像信息,除了纯展示也可点击进入个人详情等操作。
-
-
-
-
-
- 默认
-
-
-
-
- 用户
-
-
-
-
- 圆形
-
-
-
-
- 方形
-
-
-
- A
- 自定义文字
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- L
-
- M
-
- S
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- A
-
-
-
- A
-
-
-
- A
-
-
-
-
diff --git a/qq/example/subpages/back-top/api.md b/qq/example/subpages/back-top/api.md
deleted file mode 100644
index f30a679a0..000000000
--- a/qq/example/subpages/back-top/api.md
+++ /dev/null
@@ -1,15 +0,0 @@
-### BackTop Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| ----- | ------- | --------- | ------------------------------------------------------------------- | ---- |
-| fixed | Boolean | true | 是否绝对定位固定到屏幕右下方 | N |
-| icon | String | 'backtop' | 图标 | N |
-| show | Boolean | false | 是否显示组件 | N |
-| text | String | '' | 文案 | N |
-| type | String | round | 预设的样式类型。可选值:round/half-round/round-dark/half-round-dark | N |
-
-### BackTop Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ---- | -------- |
-| to-top | - | 点击触发 |
diff --git a/qq/example/subpages/back-top/back-top.json b/qq/example/subpages/back-top/back-top.json
deleted file mode 100644
index f8daf81c9..000000000
--- a/qq/example/subpages/back-top/back-top.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Back top",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/back-top/back-top.less b/qq/example/subpages/back-top/back-top.less
deleted file mode 100644
index e44fb4c9d..000000000
--- a/qq/example/subpages/back-top/back-top.less
+++ /dev/null
@@ -1,34 +0,0 @@
-page {
- background: #fff;
-
- .button-group {
- margin-top: 32rpx;
-
- &-item {
- margin: 0 32rpx 32rpx;
-
- .t-class-button {
- font-size: 32rpx;
- }
- }
- }
-
- .flex {
- display: flex;
- }
-
- .skeleton-text {
- border-radius: 16rpx;
- }
-
- .skeleton-item {
- padding-bottom: 24rpx;
- }
-
- .container-flex {
- display: flex;
- justify-content: space-between;
- margin: 32rpx;
- flex-wrap: wrap;
- }
-}
diff --git a/qq/example/subpages/back-top/back-top.ts b/qq/example/subpages/back-top/back-top.ts
deleted file mode 100644
index 1b9c47e1a..000000000
--- a/qq/example/subpages/back-top/back-top.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-const backTopDemos = [
- { text: '顶部', theme: 'round' },
- { text: '顶部', theme: 'round-dark' },
- { text: '', theme: 'round' },
- { text: '', theme: 'round-dark' },
- { text: '返回顶部', theme: 'half-round' },
- { text: '返回顶部', theme: 'half-round-dark' },
-];
-
-Page({
- /**
- * 页面的初始数据
- */
- data: {
- backTopDemo: backTopDemos[0],
- showBackTop: false,
- skeleton: {
- rowWidth: ['340rpx', '340rpx', '218rpx', '190rpx'],
- rowHeight: ['342rpx', '32rpx', '32rpx', '32rpx'],
- },
- rowCol3: [
- { width: '332rpx', height: '342rpx' },
- { width: '332rpx', height: '32rpx' },
- { width: '214rpx', height: '32rpx' },
- [
- { width: '186rpx', height: '32rpx' },
- { width: '64rpx', height: '32rpx', marginLeft: '82rpx' },
- ],
- ],
- },
-
- windowHeight: null as null | number,
-
- onPageScroll(e) {
- if (!this.windowHeight) {
- this.windowHeight = wx.getSystemInfoSync().windowHeight;
- }
- const isShowBackTop = e.scrollTop > this.windowHeight;
- if (isShowBackTop !== this.data.showBackTop) {
- this.setData({ showBackTop: isShowBackTop });
- }
- },
-
- onBtnClick(e: any) {
- const index = e.currentTarget.dataset.index as number;
- this.setData({ backTopDemo: backTopDemos[index] });
- wx.pageScrollTo({ duration: 300, scrollTop: 1000 });
- },
-});
diff --git a/qq/example/subpages/back-top/back-top.wxml b/qq/example/subpages/back-top/back-top.wxml
deleted file mode 100644
index 04ac6e01c..000000000
--- a/qq/example/subpages/back-top/back-top.wxml
+++ /dev/null
@@ -1,57 +0,0 @@
-
- BackTop 返回顶部
- 用于当页面过长往下滑动时,帮助用户快速回到页面顶部。
-
-
- 圆型返回顶部
-
-
-
- 圆白底
-
-
-
-
- 圆黑底
-
-
-
-
- 圆白底纯图标
-
-
-
-
- 圆黑底纯图标
-
-
-
-
- 半圆型返回顶部
-
-
-
- 半圆白底
-
-
-
-
- 半圆黑底
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/badge/api.md b/qq/example/subpages/badge/api.md
deleted file mode 100644
index 859bc039f..000000000
--- a/qq/example/subpages/badge/api.md
+++ /dev/null
@@ -1,14 +0,0 @@
-### Badge Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | ---------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | --- |
-| color | String | - | 颜色 | N |
-| content | String | - | 徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义 | N |
-| count | String / Number / Slot | 0 | 徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| dot | Boolean | false | 是否为红点 | N |
-| externalClasses | Array | - | 组件类名,分别用于设置外层元素、默认内容、右上角内容等元素类名。`['t-class', 't-class-content', 't-class-count']` | N |
-| maxCount | Number | 99 | 封顶的数字值 | N |
-| offset | Array | [0,0] | 设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']。TS 类型:`Array` | N |
-| shape | String | circle | 形状。可选值:circle/square/round/ribbon | N |
-| size | String | medium | 尺寸。可选值:small/medium | N |
-| visible | Boolean | false | 当数值为 0 时,是否展示徽标 | N |
diff --git a/qq/example/subpages/badge/badge.json b/qq/example/subpages/badge/badge.json
deleted file mode 100644
index 091ed5337..000000000
--- a/qq/example/subpages/badge/badge.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Badge 徽标"
-}
diff --git a/qq/example/subpages/badge/badge.less b/qq/example/subpages/badge/badge.less
deleted file mode 100644
index 1ce9f077a..000000000
--- a/qq/example/subpages/badge/badge.less
+++ /dev/null
@@ -1,32 +0,0 @@
-.cell-badge {
- margin-left: 16rpx;
-}
-
-.cell-badge-wrap {
- padding-bottom: 8rpx;
-}
-
-.demo-grid {
- display: grid;
- margin: 32rpx 32rpx 0rpx;
- grid-template-columns: repeat(4, 1fr);
- grid-auto-rows: 92rpx;
-}
-
-.size-mini {
- width: 120rpx;
- height: 60rpx !important;
-}
-
-.tab-bar-wrapper {
- padding-top: 12rpx;
- &::after {
- content: '';
- position: absolute;
- top: -34px;
- left: 16px;
- line-height: 20px;
- color: rgba(0, 0, 0, 0.4);
- font-size: 12px;
- }
-}
diff --git a/qq/example/subpages/badge/badge.wxml b/qq/example/subpages/badge/badge.wxml
deleted file mode 100644
index f14711e06..000000000
--- a/qq/example/subpages/badge/badge.wxml
+++ /dev/null
@@ -1,55 +0,0 @@
-Badge 徽标
-用于告知用户,该区域的状态变化或者待处理任务的数量。
-
-
-
-
-
- 消息
-
-
- 消息
-
-
- 小按钮
-
-
- 小按钮
-
-
- 小按钮
-
-
- 小按钮
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 文字
- 文字
- 文字
- 文字
-
-
diff --git a/qq/example/subpages/button-group/button-group.json b/qq/example/subpages/button-group/button-group.json
deleted file mode 100644
index 19cdfeef4..000000000
--- a/qq/example/subpages/button-group/button-group.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "ButtonGroup 按钮组"
-}
diff --git a/qq/example/subpages/button-group/button-group.wxml b/qq/example/subpages/button-group/button-group.wxml
deleted file mode 100644
index b865d5ecd..000000000
--- a/qq/example/subpages/button-group/button-group.wxml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
- 置底按钮
- 置底按钮
-
-
- 置底按钮
- 置底按钮
-
-
-
-
- 置底按钮
- 置底按钮
- 置底按钮
-
-
- 置底按钮
- 置底按钮
- 置底按钮
-
-
-
diff --git a/qq/example/subpages/button/button.json b/qq/example/subpages/button/button.json
deleted file mode 100644
index a3c6d69af..000000000
--- a/qq/example/subpages/button/button.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Button 按钮",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/button/button.less b/qq/example/subpages/button/button.less
deleted file mode 100644
index 3c52f30c3..000000000
--- a/qq/example/subpages/button/button.less
+++ /dev/null
@@ -1,37 +0,0 @@
-.demo {
- .t-button {
- margin-top: 32rpx;
- }
-
- .full-width {
- background: rgba(0, 0, 0, 0.4);
- padding: 8px 0;
- margin-top: 16px;
-
- .t-button {
- margin-top: 0;
- }
- }
-
- .no-border {
- border: 0;
- }
-
- .no-border-radius {
- border-radius: 0;
- }
-
- .content-margin-right {
- margin-right: 32rpx;
- }
-
- .box {
- margin: 0 32rpx;
- }
-
- .align-bottom {
- display: flex;
- flex-direction: row;
- align-items: flex-end;
- }
-}
diff --git a/qq/example/subpages/button/button.wxml b/qq/example/subpages/button/button.wxml
deleted file mode 100644
index 0a4a49374..000000000
--- a/qq/example/subpages/button/button.wxml
+++ /dev/null
@@ -1,119 +0,0 @@
-
- Button 按钮
- 用于开启一个闭环的操作任务,如“删除”对象、“购买”商品等。
-
- 基础按钮
-
- 强按钮
- 弱按钮
- 次按钮
- 强告警按钮
- 弱告警按钮
- 带图标按钮
-
-
-
-
- 幽灵按钮
-
-
-
-
- 文字按钮
-
- 通栏按钮
-
- 次按钮
- 主按钮
-
-
-
-
-
- 带图标按钮
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
-
-
- 按钮禁用态
-
- 强按钮
- 弱按钮
- 次按钮
- 强告警按钮
- 弱告警按钮
- 带图标按钮
-
-
-
-
- 幽灵按钮
-
-
-
-
- 文字按钮
-
-
- 通栏按钮
-
- 次按钮
- 主按钮
-
-
-
-
-
- 带图标按钮
-
-
-
-
-
-
-
-
-
-
- 加载中...
-
-
-
-
- 按钮尺寸
-
- 按钮 44
- 按钮 40
- 按钮 36
-
-
-
- 按钮
- 按钮
- 按钮
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/cell-group/api.md b/qq/example/subpages/cell-group/api.md
deleted file mode 100644
index d299e3126..000000000
--- a/qq/example/subpages/cell-group/api.md
+++ /dev/null
@@ -1,7 +0,0 @@
-### CellGroup Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| ---------------- | ------- | ------ | ----------------------- | ---- |
-| bordered | Boolean | - | 是否显示组边框 | N |
-| external-classes | Array | - | 组件类名。`['t-class']` | N |
-| title | String | - | 必需。单元格组标题 | Y |
diff --git a/qq/example/subpages/cell-group/cell-group.json b/qq/example/subpages/cell-group/cell-group.json
deleted file mode 100644
index 53282121e..000000000
--- a/qq/example/subpages/cell-group/cell-group.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "cell-group 组合单元格",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/cell-group/cell-group.less b/qq/example/subpages/cell-group/cell-group.less
deleted file mode 100644
index cb72f4ce5..000000000
--- a/qq/example/subpages/cell-group/cell-group.less
+++ /dev/null
@@ -1,7 +0,0 @@
-page {
- // 覆盖t-cell-group组件内部样式
- .t-cell-group__title {
- line-height: 104rpx;
- font-size: 24rpx;
- }
-}
diff --git a/qq/example/subpages/cell-group/cell-group.ts b/qq/example/subpages/cell-group/cell-group.ts
deleted file mode 100644
index 31d8d3d90..000000000
--- a/qq/example/subpages/cell-group/cell-group.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-Page({
- data: {},
-});
diff --git a/qq/example/subpages/cell-group/cell-group.wxml b/qq/example/subpages/cell-group/cell-group.wxml
deleted file mode 100644
index a4b64828b..000000000
--- a/qq/example/subpages/cell-group/cell-group.wxml
+++ /dev/null
@@ -1,13 +0,0 @@
-
- Cell-group 组合单元格
- cell的组合单元格
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/cell/api.md b/qq/example/subpages/cell/api.md
deleted file mode 100644
index 4f0d19cb4..000000000
--- a/qq/example/subpages/cell/api.md
+++ /dev/null
@@ -1,24 +0,0 @@
-### Cell Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | ------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
-| align | String | middle | 内容的对齐方式,默认居中对齐。可选值:top/middle/bottom | N |
-| arrow | Boolean | false | 是否显示右侧箭头 | N |
-| bordered | Boolean | true | 是否显示下边框 | N |
-| description | String / Slot | - | 下方内容描述。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| externalClasses | Array | - | 组件类名,分别用于设置 组件外层类名、标题类名、右侧说明文字类名、下方描述内容类名、图片类名、激活态类名、左侧图标类名、右侧图标类名 等。`['t-class', 't-class-title', 't-class-note', 't-class-description', 't-class-thumb', 't-class-hover', 't-class-left', 't-class-right']` | N |
-| hover | Boolean | - | 是否开启点击反馈 | N |
-| image | String / Slot | - | 主图。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| jumpType | String | navigateTo | 链接跳转类型。可选值:redirectTo/switchTab/reLaunch/navigateTo | N |
-| leftIcon | Slot | - | 左侧图标,出现在单元格标题的左侧。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| note | String / Slot | - | 和标题同行的说明文字。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| required | Boolean | false | 是否显示表单必填星号 | N |
-| rightIcon | Slot | - | 最右侧图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| title | String / Slot | - | 标题。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| url | String | - | 点击后跳转链接地址。如果值为空,则表示不需要跳转 | N |
-
-### Cell Events
-
-| 名称 | 参数 | 描述 |
-| ----- | ------------------------------ | --------------------------------------------------------------------------------------------------------------- |
-| click | `(context: { e: MouseEvent })` | 右侧内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) |
diff --git a/qq/example/subpages/cell/cell.json b/qq/example/subpages/cell/cell.json
deleted file mode 100644
index ceaf4364e..000000000
--- a/qq/example/subpages/cell/cell.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "cell 单元格",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/cell/cell.less b/qq/example/subpages/cell/cell.less
deleted file mode 100644
index 456b35ded..000000000
--- a/qq/example/subpages/cell/cell.less
+++ /dev/null
@@ -1,14 +0,0 @@
-.demo-section__wrapper {
- margin: 32rpx 0;
-
- .t-class-left {
- align-self: flex-start;
- }
-
- .avatar {
- width: 96rpx;
- height: 96rpx;
- border-radius: 50%;
- overflow: hidden;
- }
-}
diff --git a/qq/example/subpages/cell/cell.ts b/qq/example/subpages/cell/cell.ts
deleted file mode 100644
index 31d8d3d90..000000000
--- a/qq/example/subpages/cell/cell.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-Page({
- data: {},
-});
diff --git a/qq/example/subpages/cell/cell.wxml b/qq/example/subpages/cell/cell.wxml
deleted file mode 100644
index ecedb8d3d..000000000
--- a/qq/example/subpages/cell/cell.wxml
+++ /dev/null
@@ -1,57 +0,0 @@
-
- Cell 单元格
- 用于各个类别行的信息展示。
-
- 单行
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 多行
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/checkbox/api.md b/qq/example/subpages/checkbox/api.md
deleted file mode 100644
index 20f21d40c..000000000
--- a/qq/example/subpages/checkbox/api.md
+++ /dev/null
@@ -1,40 +0,0 @@
-### Checkbox Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | --------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------- | --- |
-| align | String | left | 复选框和内容相对位置。可选值:left/right | N |
-| checked | Boolean | false | 是否选中 | N |
-| content | String / Slot | - | 复选框内容。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| contentDisabled | Boolean | - | 是否禁用组件内容(content)触发选中 | N |
-| disabled | Boolean | undefined | 是否禁用组件 | N |
-| externalClasses | Array | - | 组件类名,分别用于设置 组件外层、复选框图标、主文案、内容 等元素类名。`['t-class', 't-class-icon', 't-class-label', 't-class-content']` | N |
-| icon | Array | - | 自定义选中图标和非选中图标。TS 类型:`Array` | N |
-| indeterminate | Boolean | false | 是否为半选 | N |
-| label | String / Slot | - | 主文案。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| maxContentRow | Number | 5 | 内容最大行数限制 | N |
-| maxLabelRow | Number | 3 | 主文案最大行数限制 | N |
-| name | String | - | HTM 元素原生属性 | N |
-| readonly | Boolean | false | 组件是否只读 | N |
-| value | String / Number | - | 复选框的值。TS 类型:`string | number` | N |
-
-### Checkbox Events
-
-| 名称 | 参数 | 描述 |
-| ------ | -------------------- | ------------ |
-| change | `(checked: boolean)` | 值变化时触发 |
-
-### CheckboxGroup Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| -------- | ------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
-| disabled | Boolean | false | 是否禁用组件 | N |
-| max | Number | - | 支持最多选中的数量 | N |
-| name | String | - | 统一设置内部复选框 HTML 属性 | N |
-| options | Array | [] | 以配置形式设置子元素。示例 1:['北京', '上海'] ,示例 2: [{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]。checkAll 值为 true 表示当前选项为「全选选项」。TS 类型:`Array`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/checkbox/type.ts) | N |
-| value | Array | [] | 选中值。TS 类型:`CheckboxGroupValue`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/checkbox/type.ts) | N |
-
-### CheckboxGroup Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ---------------------------------------------------- | ------------ |
-| change | `(value: CheckboxGroupValue, context: { e: Event })` | 值变化时触发 |
diff --git a/qq/example/subpages/checkbox/checkbox.json b/qq/example/subpages/checkbox/checkbox.json
deleted file mode 100644
index 707cbaef5..000000000
--- a/qq/example/subpages/checkbox/checkbox.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Checkbox 复选框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/checkbox/checkbox.less b/qq/example/subpages/checkbox/checkbox.less
deleted file mode 100644
index 3ac7fe45b..000000000
--- a/qq/example/subpages/checkbox/checkbox.less
+++ /dev/null
@@ -1,11 +0,0 @@
-.t-checkbox-demo {
- display: block;
- margin-top: 16px;
-}
-
-.t-checkbox-padding {
- padding: 24rpx 32rpx !important;
-}
-.disable-border {
- display: none;
-}
diff --git a/qq/example/subpages/checkbox/checkbox.ts b/qq/example/subpages/checkbox/checkbox.ts
deleted file mode 100644
index 9727db67a..000000000
--- a/qq/example/subpages/checkbox/checkbox.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-Page({
- data: {
- demoCheckbox1: ['checkbox2', 'checkbox3'],
- demoCheckbox2: ['checkbox2', 'checkbox3'],
- demoCheckboxMax: ['checkbox1', 'checkbox2'],
- demoCheckbox3: ['checkbox2', 'checkbox4'],
- controledData: [],
- checked: true,
- checked1: true,
- options: [{ label: '全选', checkAll: true }, '多选1', '多选2', { label: '多选3', value: '多选3' }],
- checkAllValues: ['多选1', '多选2', ''],
- activeImage: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox-checked.png',
- inActiveImage: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox.png',
- check5: true,
- checkAll1: ['checkbox1'],
- },
- handleGroupChange(event) {
- console.log('group', event.detail.value);
- this.setData({
- demoCheckbox1: event.detail.value,
- });
- },
- onChange(event) {
- console.log('checkbox', event.detail.value);
- },
- onCheckAllChange(event) {
- console.log('checkbox', event.detail.value);
- this.setData({
- checkAllValues: event.detail,
- });
- },
- toggle5(e) {
- console.log('checkbox', e.detail.value);
- this.setData({
- check5: e.detail.value,
- });
- },
- handleControled() {
- const data = !this.data.controledData.length
- ? ['checkbox1', 'checkbox3', 'checkbox2', 'checkbox4', 'checkbox5']
- : [];
- this.setData({
- controledData: data,
- });
- },
- testControll(val) {
- console.log(val.detail);
- },
- // 受控
- controlledHandler(e) {
- console.log(e.detail.value);
- this.setData({
- checked1: e.detail.checked,
- });
- },
- buttonControl() {
- console.log(!this.data.checked1);
- this.setData({
- checked1: !this.data.checked1,
- });
- },
- changeChecked(e) {
- this.setData({
- checked: e.detail.checked,
- });
- },
-});
diff --git a/qq/example/subpages/checkbox/checkbox.wxml b/qq/example/subpages/checkbox/checkbox.wxml
deleted file mode 100644
index 574fd1970..000000000
--- a/qq/example/subpages/checkbox/checkbox.wxml
+++ /dev/null
@@ -1,99 +0,0 @@
-
- Checkbox多选框
- 用于预设的一组选项中执行多项选择,并呈现选择结果。
-
-
-
-
-
-
-
-
-
-
- 多选多选多选多选多选多选多选多选多选多选多选多选多选多选多选多选多选选多选多选多选选多选多选多选多选
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/collapse/collapse.json b/qq/example/subpages/collapse/collapse.json
deleted file mode 100644
index e2178559a..000000000
--- a/qq/example/subpages/collapse/collapse.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Collapse 折叠面板"
-}
diff --git a/qq/example/subpages/collapse/collapse.less b/qq/example/subpages/collapse/collapse.less
deleted file mode 100644
index 29b53f1f3..000000000
--- a/qq/example/subpages/collapse/collapse.less
+++ /dev/null
@@ -1,45 +0,0 @@
-.flex {
- display: flex;
- align-items: center;
- justify-content: space-between;
-}
-
-.collapse-content-item {
- margin: 16rpx 0;
-
- &-title {
- width: 176rpx;
- display: inline-flex;
- font-size: 28rpx;
- color: #666;
- }
-
- &-val {
- display: inline-flex;
- justify-content: right;
- font-size: 28rpx;
- color: #333;
- align-items: center;
- }
-}
-
-.copy-button {
- margin-left: 16rpx;
-
- .t-btn {
- width: 80rpx !important;
- height: 40rpx !important;
- display: inline-flex !important;
- align-items: center !important;
- border: 2rpx solid #ddd !important;
- font-size: 24rpx !important;
- color: #333 !important;
- border-radius: 24rpx !important;
- background-color: #fff !important;
- white-space: nowrap;
- }
-}
-
-.collapse-demo {
- margin-top: 32rpx;
-}
diff --git a/qq/example/subpages/collapse/collapse.ts b/qq/example/subpages/collapse/collapse.ts
deleted file mode 100644
index f142e9af8..000000000
--- a/qq/example/subpages/collapse/collapse.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-Page({
- data: {
- activeValues: [0],
- },
- handleChange(e) {
- this.setData({
- activeValues: e.detail.value,
- });
- },
-});
diff --git a/qq/example/subpages/collapse/collapse.wxml b/qq/example/subpages/collapse/collapse.wxml
deleted file mode 100644
index ab16598f2..000000000
--- a/qq/example/subpages/collapse/collapse.wxml
+++ /dev/null
@@ -1,36 +0,0 @@
-
- Collapse 折叠面板
- 用于对复杂区域进行分组和隐藏 常用于订单信息展示等
-
-
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 带操作说明
-
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
-
- 手风琴式
-
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
- 此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容此处可自定义内容可自定义内容
-
-
-
-
diff --git a/qq/example/subpages/count-down/count-down.json b/qq/example/subpages/count-down/count-down.json
deleted file mode 100644
index 066b7f77f..000000000
--- a/qq/example/subpages/count-down/count-down.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "count-down 倒计时",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/count-down/count-down.ts b/qq/example/subpages/count-down/count-down.ts
deleted file mode 100644
index fc3339691..000000000
--- a/qq/example/subpages/count-down/count-down.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-Page({
- data: {
- time: 96 * 60 * 1000,
- time1: 46 * 60 * 1000,
- timeData: {},
- counting: false,
- },
- onChange(e) {
- this.setData({
- timeData: e.detail,
- });
- },
- start() {
- const countDown = this.selectComponent('.control-count-down');
- if (!countDown.counting) {
- countDown.start();
- this.setData({ counting: true });
- } else {
- countDown.pause();
- this.setData({ counting: false });
- }
- },
-
- reset() {
- const countDown = this.selectComponent('.control-count-down');
- countDown.reset();
- },
-
- finished() {
- wx.showToast({
- icon: 'none',
- title: '倒计时结束',
- });
- this.setData({ counting: false });
- },
-});
diff --git a/qq/example/subpages/count-down/count-down.wxml b/qq/example/subpages/count-down/count-down.wxml
deleted file mode 100644
index 5b22b4cea..000000000
--- a/qq/example/subpages/count-down/count-down.wxml
+++ /dev/null
@@ -1,58 +0,0 @@
-Count down 倒计时
-用于实时展示倒计时数值。
-
-
-
-
- 时分秒
-
-
-
- 带毫秒
-
-
-
- 带方形底
-
-
-
- 带圆形底
-
-
-
- 带单位
-
-
-
- 无底色带单位
-
-
-
-
-
-
-
-
-
-
- S
-
-
-
-
-
-
-
-
- M
-
-
-
-
-
-
-
-
- L
-
-
diff --git a/qq/example/subpages/date-time-picker/date-time-picker.json b/qq/example/subpages/date-time-picker/date-time-picker.json
deleted file mode 100644
index 05d02519d..000000000
--- a/qq/example/subpages/date-time-picker/date-time-picker.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "DateTimePicker",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/date-time-picker/date-time-picker.less b/qq/example/subpages/date-time-picker/date-time-picker.less
deleted file mode 100644
index ecc4c47eb..000000000
--- a/qq/example/subpages/date-time-picker/date-time-picker.less
+++ /dev/null
@@ -1,19 +0,0 @@
-.t-cell.pannel-item {
- margin-bottom: 32rpx;
-
- &::after {
- border: 0;
- }
-}
-
-.t-cell {
- .sub-text {
- color: #000;
- opacity: 0.9;
- }
-
- .empty {
- color: #000;
- opacity: 0.32;
- }
-}
diff --git a/qq/example/subpages/date-time-picker/date-time-picker.ts b/qq/example/subpages/date-time-picker/date-time-picker.ts
deleted file mode 100644
index 9772fa502..000000000
--- a/qq/example/subpages/date-time-picker/date-time-picker.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-Page({
- data: {
- mode: '',
-
- dateVisible: false,
- date: new Date().getTime(), // 支持时间戳传入
- dateText: '',
-
- monthVisible: false,
- month: '2021-09',
- monthText: '',
-
- timeVisible: false,
- time: '',
- timeText: '',
-
- monthDateVisible: false,
- monthDate: '2019-09-21', // 需要传入年 不然无法确定是哪一年的
- monthDateText: '',
-
- datetimeVisible: false,
- datetime: '2021-06-06 12:11:11',
- datetimeText: '',
-
- // 指定选择区间起始值
- disableDate: {
- before: '2000-01-01 00:00:00',
- after: '2022-09-09 12:12:12',
- },
- },
- showPicker(e) {
- const { mode } = e?.currentTarget?.dataset;
- this.setData({
- mode,
- [`${mode}Visible`]: true,
- });
- },
- hidePicker() {
- const { mode } = this.data;
- this.setData({
- [`${mode}Visible`]: false,
- });
- },
- onConfirm(e) {
- const { value, formatValue } = e?.detail;
- const { mode } = this.data;
-
- console.log(value, formatValue);
-
- this.setData({
- [mode]: value.valueOf(),
- [`${mode}Text`]: formatValue,
- });
-
- this.hidePicker();
- },
-});
diff --git a/qq/example/subpages/date-time-picker/date-time-picker.wxml b/qq/example/subpages/date-time-picker/date-time-picker.wxml
deleted file mode 100644
index 27e42774d..000000000
--- a/qq/example/subpages/date-time-picker/date-time-picker.wxml
+++ /dev/null
@@ -1,112 +0,0 @@
-
- DateTimePicker 时间选择器
- 用于选择一个时间点或者一个时间段。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/dialog/dialog.json b/qq/example/subpages/dialog/dialog.json
deleted file mode 100644
index a24a4d068..000000000
--- a/qq/example/subpages/dialog/dialog.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Dialog 对话框",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/dialog/dialog.less b/qq/example/subpages/dialog/dialog.less
deleted file mode 100644
index 77a3b3b24..000000000
--- a/qq/example/subpages/dialog/dialog.less
+++ /dev/null
@@ -1,41 +0,0 @@
-page {
- background: #fff;
-
- .t-dialog {
- .custom-confirm-btn {
- color: #ff4646;
- }
- }
-
- .demo-block__oper {
- margin: 0 32rpx;
- }
-}
-
-.long-content {
- height: 576rpx;
- margin-top: 16rpx;
- font-size: 32rpx;
- color: #888;
-
- .content-cintainer {
- width: 540rpx;
- }
-}
-
-input {
- height: 96rpx;
- padding: 0 24rpx;
- text-align: left;
- margin-top: 32rpx;
- border-radius: 8rpx;
- background-color: #f5f5f5;
-}
-
-.placeholder {
- color: rgba(0, 0, 0, .26);
- line-height: 96rpx;
- height: 96rpx !important;
- display: flex;
- align-items: center;
-}
diff --git a/qq/example/subpages/dialog/dialog.ts b/qq/example/subpages/dialog/dialog.ts
deleted file mode 100644
index 1dcec8675..000000000
--- a/qq/example/subpages/dialog/dialog.ts
+++ /dev/null
@@ -1,260 +0,0 @@
-// @ts-ignore
-import Dialog from 'tdesign-qq-miniprogram/dialog/index';
-
-const title = '对话框标题';
-const maxTitle = '对话框标题告知当前状态、信息和解决方法,等内容。描述文案尽可能控制在三行内';
-const message = '告知当前状态、信息和解决方法,等内容。描述文案尽可能控制在三行内';
-
-interface Config {
- title: string;
- tConfirmBtn: string;
- content: string;
- confirmBtn: string;
- cancelBtn: string;
- buttonLayout: 'horizontal' | 'vertical';
- actions: boolean | { name: string; primary?: boolean; style?: string }[];
-}
-
-const dialogConfig: Config = {
- title: '',
- tConfirmBtn: '',
- content: '',
- confirmBtn: '',
- cancelBtn: '',
- buttonLayout: 'horizontal',
- actions: false,
-};
-
-const modelConfigFactory = (opt: Partial) => {
- return {
- ...dialogConfig,
- ...opt,
- };
-};
-
-Page({
- data: {
- show: false,
- useSlot: false,
- dialogConfig,
- currentKey: '',
- operList: [
- {
- title: '反馈类对话框',
- btns: [
- {
- type: 'text',
- text: '单行标题',
- },
- {
- type: 'multiText',
- text: '多行标题最大高度',
- },
- {
- type: 'textAndTitle',
- text: '带说明文本',
- },
- {
- type: 'multiTextAndTitle',
- text: '带说明文本最大高度',
- },
- ],
- },
- {
- title: '确认类对话框',
- btns: [
- {
- type: 'confirm',
- text: '双按钮',
- },
- {
- type: 'warnConfirm',
- text: '带警示按钮',
- },
- {
- type: 'tooLongBtnContent',
- text: '双按钮文字过长',
- },
- {
- type: 'multiBtn',
- text: '多按钮',
- },
- ],
- },
- {
- title: '输入类对话框',
- btns: [
- {
- type: 'withInput',
- text: '单行标题',
- },
- {
- type: 'textAndTitleWithInput',
- text: '带说明文本',
- },
- ],
- },
- {
- title: '命令调用',
- btns: [
- {
- type: 'commandWithCancel',
- text: '带取消按钮',
- },
- {
- type: 'command',
- text: '无取消按钮',
- },
- ],
- },
- ],
- },
-
- /** 切换dialog配置项 */
- clickHandle(e) {
- const key = e.detail;
- switch (key) {
- // 纯文本弹窗
- case 'text':
- case 'multiText': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title: key === 'text' ? title : maxTitle,
- confirmBtn: '知道了',
- }),
- });
- return;
- }
- // 标题&副标题弹窗
- case 'textAndTitle':
- case 'multiTextAndTitle': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title: key === 'textAndTitle' ? title : '对话框带文本最大高度',
- content: key === 'textAndTitle' ? message : '',
- confirmBtn: '我知道了',
- }),
- });
- return;
- }
- // 确认弹窗-普通
- case 'confirm': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- content: message,
- confirmBtn: '按钮最多字数',
- cancelBtn: '取消',
- }),
- });
- return;
- }
- // 确认弹窗-警示操作
- case 'warnConfirm': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- tConfirmBtn: 'custom-confirm-btn',
- confirmBtn: '警示操作',
- cancelBtn: '取消',
- }),
- });
- return;
- }
- // 按钮文字过长弹层
- case 'tooLongBtnContent': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- content: message,
- confirmBtn: '按钮文案文字内容较长',
- cancelBtn: '取消',
- buttonLayout: 'vertical',
- }),
- });
- return;
- }
- // 多按钮弹层
- case 'multiBtn': {
- this.setData({
- show: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title,
- content: message,
- buttonLayout: 'vertical', // 'horizontal' | 'vertical'
- actions: [
- { name: '取消', primary: false },
- { name: '单行按钮最多十五个字符文案内容', primary: true },
- { name: '按钮文案文字内容较长', primary: true, style: 'color:red;' },
- ], // {name: string, primary?: string}
- }),
- });
- return;
- }
- // 带输入弹窗
- case 'withInput':
- case 'textAndTitleWithInput': {
- this.setData({
- show: true,
- useSlot: true,
- currentKey: key,
- dialogConfig: modelConfigFactory({
- title: '带输入框对话框',
- content: key === 'withInput' ? '' : message,
- confirmBtn: '确认',
- cancelBtn: '取消',
- }),
- });
- return;
- }
- case 'commandWithCancel': {
- Dialog.confirm({
- title: '弹窗标题',
- content: '告知当前状态、信息和解决方法等内容。',
- confirmBtn: '确认按钮',
- cancelBtn: '取消按钮',
- });
- return;
- }
- case 'command': {
- Dialog.confirm({
- title: '弹窗标题',
- content: '告知当前状态、信息和解决方法等内容。',
- confirmBtn: '确认按钮',
- });
- return;
- }
- default: {
- Dialog.alert({
- title: `未知key: ${key}`,
- content: '',
- });
- break;
- }
- }
- },
-
- /** 异步关闭弹层 */
- closeHandle() {
- this.confirmHandle();
- },
-
- /** 普通弹层关闭 */
- confirmHandle() {
- this.setData({
- show: false,
- useSlot: false,
- });
- },
-});
diff --git a/qq/example/subpages/dialog/dialog.wxml b/qq/example/subpages/dialog/dialog.wxml
deleted file mode 100644
index 62214bd37..000000000
--- a/qq/example/subpages/dialog/dialog.wxml
+++ /dev/null
@@ -1,40 +0,0 @@
-
- Dialog 对话框
- 用于显示重要提示或请求用户进行重要操作,一种打断当前操作的模态视图。
-
-
-
-
-
-
-
-
- 告知当前状态、信息和解决方法,等内容。描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案很多描述文案
-
-
-
-
diff --git a/qq/example/subpages/divider/api.md b/qq/example/subpages/divider/api.md
deleted file mode 100644
index 1be9c9a81..000000000
--- a/qq/example/subpages/divider/api.md
+++ /dev/null
@@ -1,11 +0,0 @@
-### Divider Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------------- | ------------- | ---------- | ------------------------------------------------------------------------------------------------------------- | ---- |
-| align | String | center | 文本位置(仅在水平分割线有效)。可选值:left/right/center | N |
-| content | String / Slot | - | 子元素。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| dashed | Boolean | false | 是否虚线(仅在水平分割线有效) | N |
-| externalClasses | Array | - | 组件类名,分别用于设置 组件外层类名、分隔线类名 等。`['t-class', 't-class-line', 't-class-content']` | N |
-| lineColor | String | - | 分隔线颜色 | N |
-| theme | String | horizontal | 分隔线类型有两种:水平和垂直。可选值:horizontal/vertical | N |
-| tStyle | Object | - | 组件样式。TS 类型:`Record` | N |
diff --git a/qq/example/subpages/divider/divider.json b/qq/example/subpages/divider/divider.json
deleted file mode 100644
index dcef1d829..000000000
--- a/qq/example/subpages/divider/divider.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Divider",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/divider/divider.less b/qq/example/subpages/divider/divider.less
deleted file mode 100644
index ef2fbc3f5..000000000
--- a/qq/example/subpages/divider/divider.less
+++ /dev/null
@@ -1,59 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.demo-block__slot {
- margin: 0;
-}
-
-.demo-block {
- margin-bottom: 32rpx;
- font-size: 24rpx;
-
- &__desc {
- margin-left: 32rpx;
- margin-bottom: 16rpx;
- line-height: 40rpx;
- color: rgba(0, 0, 0, 0.4);
- }
-
- &__wrapper {
- display: grid;
- align-items: center;
- }
-}
-
-.t-class-content {
- margin-right: 20rpx;
- margin-left: 20rpx;
-}
-
-.demo-2 {
- margin: 0 32rpx;
-}
-
-.demo-3 {
- margin-left: 32rpx;
-}
-
-.demo-4 {
- margin-left: 152rpx;
-}
-
-.demo-5 {
- margin: 0 32rpx;
-}
-
-.demo-6 {
- display: flex;
- height: 20px;
- line-height: center;
- align-items: center;
- margin: 0 32rpx;
- font-size: 12px;
-
- &--text-color {
- color: #000;
- opacity: 0.4;
- }
-}
diff --git a/qq/example/subpages/divider/divider.ts b/qq/example/subpages/divider/divider.ts
deleted file mode 100644
index f15277f21..000000000
--- a/qq/example/subpages/divider/divider.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-Page({
- /**
- * 页面的初始数据
- */
- data: {},
-});
diff --git a/qq/example/subpages/divider/divider.wxml b/qq/example/subpages/divider/divider.wxml
deleted file mode 100644
index 70ccbbffc..000000000
--- a/qq/example/subpages/divider/divider.wxml
+++ /dev/null
@@ -1,71 +0,0 @@
-
- Divider 分割符
- 用于分割、组织、细化有一定逻辑的组织元素内容和页面结构。
-
-
-
- 直线拉通
-
-
-
-
-
- 虚线拉通
-
-
-
-
-
- 左右间距
-
-
-
-
-
- 右侧拉通
-
-
-
-
-
-
- 自定义左侧间距
-
-
-
-
-
- 文字+直线
-
-
- 文字信息
-
-
-
-
- 文字+虚线
-
-
-
-
-
- 纯文字
-
-
- 没有更多了~
-
-
-
-
- 垂直分割
-
- 文字信息
-
- 文字信息
-
- 文字信息
-
-
-
-
-
diff --git a/qq/example/subpages/drawer/drawer.json b/qq/example/subpages/drawer/drawer.json
deleted file mode 100644
index 0089269e5..000000000
--- a/qq/example/subpages/drawer/drawer.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Drawer",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/drawer/drawer.less b/qq/example/subpages/drawer/drawer.less
deleted file mode 100644
index fe6d16e28..000000000
--- a/qq/example/subpages/drawer/drawer.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.box {
- margin: 32rpx;
-}
diff --git a/qq/example/subpages/drawer/drawer.ts b/qq/example/subpages/drawer/drawer.ts
deleted file mode 100644
index 0c8fdbcbf..000000000
--- a/qq/example/subpages/drawer/drawer.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-Page({
- data: {
- placement: 'left',
- sidebar: [],
- baseSidebar: [
- {
- name: '菜单一',
- },
- {
- name: '菜单二',
- },
- {
- name: '菜单三',
- },
- {
- name: '菜单四',
- },
- {
- name: '菜单五',
- },
- {
- name: '菜单六',
- },
- {
- name: '菜单七',
- },
- {
- name: '菜单八',
- },
- ],
- iconSidebar: [
- {
- name: '菜单一',
- icon: 'app',
- },
- {
- name: '菜单二',
- icon: 'app',
- },
- {
- name: '菜单三',
- icon: 'app',
- },
- {
- name: '菜单四',
- icon: 'app',
- },
- {
- name: '菜单五',
- icon: 'app',
- },
- {
- name: '菜单六',
- icon: 'app',
- },
- {
- name: '菜单七',
- icon: 'app',
- },
- {
- name: '菜单八',
- icon: 'app',
- },
- ],
- },
-
- openDrawerBase() {
- this.setData({
- visible: true,
- sidebar: this.data.baseSidebar,
- });
- },
-
- openDrawerIcon() {
- this.setData({
- visible: true,
- sidebar: this.data.iconSidebar,
- });
- },
-
- itemClick(e) {
- console.log(e.detail);
- },
-
- overlayClick(e) {
- console.log(e.detail);
- },
-});
diff --git a/qq/example/subpages/drawer/drawer.wxml b/qq/example/subpages/drawer/drawer.wxml
deleted file mode 100644
index 10847406b..000000000
--- a/qq/example/subpages/drawer/drawer.wxml
+++ /dev/null
@@ -1,24 +0,0 @@
-
- Drawer 弹出层
- 用作一组平行关系页面/内容的切换器,相较于Tab,同屏可展示更多的选项数量。
-
-
diff --git a/qq/example/subpages/dropdown-menu/dropdown-menu.json b/qq/example/subpages/dropdown-menu/dropdown-menu.json
deleted file mode 100644
index 9a84a56a4..000000000
--- a/qq/example/subpages/dropdown-menu/dropdown-menu.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Dropdown Menu 下拉菜单"
-}
diff --git a/qq/example/subpages/dropdown-menu/dropdown-menu.less b/qq/example/subpages/dropdown-menu/dropdown-menu.less
deleted file mode 100644
index 209ef3d9a..000000000
--- a/qq/example/subpages/dropdown-menu/dropdown-menu.less
+++ /dev/null
@@ -1,9 +0,0 @@
-.wrapper {
- width: 100%;
- height: 300px;
-}
-
-.buttons .t-button {
- display: flex;
- margin: 30rpx;
-}
diff --git a/qq/example/subpages/dropdown-menu/dropdown-menu.ts b/qq/example/subpages/dropdown-menu/dropdown-menu.ts
deleted file mode 100644
index a86370a7f..000000000
--- a/qq/example/subpages/dropdown-menu/dropdown-menu.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-const chineseNumber = '一二三四五六七八九十'.split('');
-
-const singleSelectOptions = new Array(8).fill(null).map((_, i) => ({
- label: `选项${chineseNumber[i]}`,
- value: `option_${i + 1}`,
- disabled: false,
-}));
-
-singleSelectOptions.push({
- label: '禁用选项',
- value: 'disabled',
- disabled: true,
-});
-
-const doubleColumnsOptions = [
- ...singleSelectOptions,
- {
- label: '禁用选项',
- value: 'disabled',
- disabled: true,
- },
-];
-
-const tripleColumnsOptions = [
- ...doubleColumnsOptions,
- {
- label: '禁用选项',
- value: 'disabled',
- disabled: true,
- },
-];
-
-tripleColumnsOptions.splice(8, 0, {
- label: `选项${chineseNumber[8]}`,
- value: `option_${9}`,
- disabled: false,
-});
-
-const generateTree = function (deep = 0, count = 10, prefix?: string) {
- const ans = [];
-
- for (let i = 0; i < count; i += 1) {
- const value = prefix ? `${prefix}-${i}` : `${i}`;
- const rect: any = {
- label: `选项${chineseNumber[i]}`,
- value,
- };
-
- if (deep > 0) {
- rect.options = generateTree(deep - 1, 10, value);
- }
- ans.push(rect);
- }
-
- return ans;
-};
-
-Page({
- data: {
- singleSelect: {
- value: 'option_3',
- options: singleSelectOptions,
- },
- multipleSelect: {
- value: ['option_1'],
- options: singleSelectOptions,
- },
- doubleColumnsOptions,
- tripleColumnsOptions,
- doubleColumnsTree: {
- options: generateTree(1),
- value: ['0', '0-0'],
- },
- tripleColumnsTree: {
- options: generateTree(2),
- value: ['0', '0-0', ['0-0-0', '0-0-1']],
- },
- },
-
- handleSingleSelect(e) {
- this.setData({
- 'singleSelect.value': e.detail.value,
- });
- },
-
- handleMultipleSelect(e) {
- this.setData({
- 'multipleSelect.value': e.detail.value,
- });
- },
-
- handleTreeSelect(e) {
- this.setData({
- 'doubleColumnsTree.value': e.detail.value,
- });
- },
-});
diff --git a/qq/example/subpages/dropdown-menu/dropdown-menu.wxml b/qq/example/subpages/dropdown-menu/dropdown-menu.wxml
deleted file mode 100644
index 8577c4f04..000000000
--- a/qq/example/subpages/dropdown-menu/dropdown-menu.wxml
+++ /dev/null
@@ -1,86 +0,0 @@
-
- DropdownMenu 下拉菜单
- 菜单呈现数个并列的选项类目,用于整个页面的内容筛选,由菜单面板和菜单选项组成。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/empty/empty-page.json b/qq/example/subpages/empty/empty-page.json
deleted file mode 100644
index 5bbe4be05..000000000
--- a/qq/example/subpages/empty/empty-page.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Empty",
- "navigationBarBackgroundColor": "#fff"
-}
diff --git a/qq/example/subpages/empty/empty-page.less b/qq/example/subpages/empty/empty-page.less
deleted file mode 100644
index 22453b00e..000000000
--- a/qq/example/subpages/empty/empty-page.less
+++ /dev/null
@@ -1,13 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.page {
- padding-top: 240rpx;
-}
-
-.t-empty {
- &__actions {
- margin-top: 128rpx !important;
- }
-}
diff --git a/qq/example/subpages/empty/empty-page.wxml b/qq/example/subpages/empty/empty-page.wxml
deleted file mode 100644
index 3ea6f5e8d..000000000
--- a/qq/example/subpages/empty/empty-page.wxml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- 按钮
-
-
diff --git a/qq/example/subpages/empty/empty.json b/qq/example/subpages/empty/empty.json
deleted file mode 100644
index 5bbe4be05..000000000
--- a/qq/example/subpages/empty/empty.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Empty",
- "navigationBarBackgroundColor": "#fff"
-}
diff --git a/qq/example/subpages/empty/empty.less b/qq/example/subpages/empty/empty.less
deleted file mode 100644
index 9a59d0cfc..000000000
--- a/qq/example/subpages/empty/empty.less
+++ /dev/null
@@ -1,39 +0,0 @@
-page {
- background: #fff;
-}
-
-.empty-text {
- color: #999;
- font-size: 24rpx;
- margin-left: 32rpx;
-}
-
-.demo-block__slot {
- margin-top: 0;
-}
-
-.t-empty {
- &__image {
- width: 240rpx !important;
- height: 240rpx !important;
- }
-
- &__button {
- width: 320rpx !important;
- height: 72rpx !important;
- line-height: 72rpx !important;
- }
-}
-
-.demo {
- &-section {
- &__desc {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- &__wrapper {
- margin: 32rpx 0;
- }
- }
-}
diff --git a/qq/example/subpages/empty/empty.ts b/qq/example/subpages/empty/empty.ts
deleted file mode 100644
index 7653d212b..000000000
--- a/qq/example/subpages/empty/empty.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * @Author: shiyanzhang
- * @Date: 2021-08-24 15:56:07
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/empty/empty.ts
- */
-Page({
- data: {
- image: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/empty__demo-image.png',
- },
- goEmptyPage() {
- wx.navigateTo({ url: './empty-page' });
- },
-});
diff --git a/qq/example/subpages/empty/empty.wxml b/qq/example/subpages/empty/empty.wxml
deleted file mode 100644
index 71569547e..000000000
--- a/qq/example/subpages/empty/empty.wxml
+++ /dev/null
@@ -1,25 +0,0 @@
-
- Empty 空状态
- 用于空状态时的占位提示。
-
-
-
-
- 自定义图片空状态
-
-
-
- 带操作空状态
-
-
- 操作按钮
-
-
- 空页面
-
-
- 空页面
-
-
-
-
diff --git a/qq/example/subpages/fab/fab.json b/qq/example/subpages/fab/fab.json
deleted file mode 100644
index 08691a362..000000000
--- a/qq/example/subpages/fab/fab.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Fab 悬浮按钮"
-}
diff --git a/qq/example/subpages/fab/fab.ts b/qq/example/subpages/fab/fab.ts
deleted file mode 100644
index 643567467..000000000
--- a/qq/example/subpages/fab/fab.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-Page({
- data: {
- fabButton: {
- openType: 'getPhoneNumber',
- },
- },
- handleClick(e) {
- console.log(e);
- },
-});
diff --git a/qq/example/subpages/fab/fab.wxml b/qq/example/subpages/fab/fab.wxml
deleted file mode 100644
index 58a5c88f8..000000000
--- a/qq/example/subpages/fab/fab.wxml
+++ /dev/null
@@ -1,6 +0,0 @@
-Fab 悬浮按钮
-当功能使用图标即可表意清楚时,可使用纯图标悬浮按钮,例如:添加、发布
-
-
-
-
diff --git a/qq/example/subpages/footer/footer.json b/qq/example/subpages/footer/footer.json
deleted file mode 100644
index a31213f18..000000000
--- a/qq/example/subpages/footer/footer.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "footer 页脚",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/footer/footer.less b/qq/example/subpages/footer/footer.less
deleted file mode 100644
index d405bbbd3..000000000
--- a/qq/example/subpages/footer/footer.less
+++ /dev/null
@@ -1,12 +0,0 @@
-page {
- background: #fff;
-}
-
-.t-footer-demo {
- margin: 16rpx 0;
- font-size: 24rpx;
-
- &--divider {
- height: 32rpx;
- }
-}
diff --git a/qq/example/subpages/footer/footer.ts b/qq/example/subpages/footer/footer.ts
deleted file mode 100644
index bc3ec82e4..000000000
--- a/qq/example/subpages/footer/footer.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-Page({
- data: {
- copyright: 'Copyright © 2021-2031 TD.All Rights Reserved.',
- textLinkListOne: [
- {
- name: '底部链接',
- url: '/pages/index',
- openType: 'navigate',
- },
- ],
- textLinkListTwo: [
- {
- name: '底部链接',
- url: '/pages/index',
- openType: 'navigate',
- },
- {
- name: '底部链接',
- url: '',
- openType: 'navigateBack',
- },
- ],
- logo: {
- url: 'https://cdn-we-retail.ym.tencent.com/miniapp/articleFooter/example3.png', // 占位图片
- },
- },
-});
diff --git a/qq/example/subpages/footer/footer.wxml b/qq/example/subpages/footer/footer.wxml
deleted file mode 100644
index e1a6f5f04..000000000
--- a/qq/example/subpages/footer/footer.wxml
+++ /dev/null
@@ -1,17 +0,0 @@
-Footer 页脚
-用于基础列表展示,可附带文字、品牌logo、操作,常用商详、个人中心、设置等页面。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/grid/grid.json b/qq/example/subpages/grid/grid.json
deleted file mode 100644
index 8d69427b8..000000000
--- a/qq/example/subpages/grid/grid.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Grid宫格",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/grid/grid.less b/qq/example/subpages/grid/grid.less
deleted file mode 100644
index 1323f0dff..000000000
--- a/qq/example/subpages/grid/grid.less
+++ /dev/null
@@ -1,199 +0,0 @@
-@gutter-row-height: 32rpx;
-
-page {
- .demo {
- min-height: 100vh;
- overflow: hidden;
- }
-
- .demo-section__wrapper {
- margin: 32rpx 0;
- }
-
- .small-icon-image {
- width: 28px;
- height: 28px;
- }
-
- .middle-icon-image {
- width: 32px;
- height: 32px;
- }
-
- .gutter-row {
- height: @gutter-row-height;
- }
-}
-
-// 以下是覆盖grid组件内的样式
-page {
- .three-border {
- .text {
- margin-bottom: 24rpx;
- padding-top: 8rpx;
- }
-
- .image-icon {
- padding-top: 24rpx;
- width: 48px;
- height: 48px;
- }
- }
-
- .four {
- .text {
- margin-bottom: 32rpx;
- font-size: 24rpx;
- padding-top: 16rpx;
- }
-
- .image-icon {
- padding-top: 32rpx;
- width: 64rpx;
- height: 64rpx;
- }
- }
-
- .five {
- .text {
- padding-top: 20rpx;
- margin-bottom: 32rpx;
- font-size: 24rpx;
- }
-
- .image-icon {
- padding-top: 32rpx;
- width: 56rpx;
- height: 56rpx;
- }
- }
-
- .five-with-padding {
- padding: 0 24rpx;
-
- .grid {
- border-radius: 16rpx;
-
- .image-icon {
- padding-top: 24rpx;
- width: 56rpx;
- height: 56rpx;
- }
-
- .text {
- padding-top: 20rpx;
- margin-bottom: 20rpx;
- font-size: 24rpx;
- }
- }
- }
-
- .three {
- .text {
- margin-bottom: 24rpx;
- font-size: 28rpx;
- padding-top: 9rpx;
- }
-
- .image-icon {
- padding-top: 24rpx;
- width: 96rpx;
- height: 96rpx;
- }
- }
-
- .two-des {
- .image-icon {
- padding-top: 24rpx;
- width: 96rpx;
- height: 96rpx;
- padding-left: 24rpx;
- padding-bottom: 32rpx;
- }
-
- .t-grid-item__image {
- width: 120rpx;
- height: 160rpx;
- flex-grow: 0;
- }
-
- .t-grid-item__words {
- display: block;
- }
-
- .text {
- margin-top: 24rpx;
- padding-left: 25rpx;
- }
-
- .t-grid-item {
- display: block !important;
- }
-
- .description {
- padding-left: 25rpx;
- padding-top: 8rpx;
- }
- }
-
- .three-des {
- .text {
- padding-top: 7rpx;
- font-size: 28rpx;
- }
-
- .image-icon {
- padding-top: 24rpx;
- width: 96rpx;
- height: 96rpx;
- }
-
- .description {
- margin-top: 8rpx;
- margin-bottom: 24rpx;
- }
- }
-
- .badge {
- .text {
- padding-top: 16rpx;
- margin-bottom: 32rpx;
- font-size: 24rpx;
- }
-
- .image-icon {
- width: 64rpx;
- height: 64rpx;
- }
-
- .badge-item {
- margin-top: 32rpx;
- }
-
- .badge-circle {
- display: flex;
- justify-content: center;
- background-color: #e34d59;
- border-radius: 15rpx;
- width: 36rpx;
- height: 32rpx;
- align-items: center;
- position: absolute;
- top: -15rpx;
- left: 46rpx;
-
- .circle {
- width: 4rpx;
- height: 4rpx;
- border-radius: 2rpx;
- background-color: white;
- margin-left: 4rpx;
- }
-
- .badge-circle-container {
- margin-left: -4rpx;
- display: flex;
- }
- }
- }
-}
diff --git a/qq/example/subpages/grid/grid.ts b/qq/example/subpages/grid/grid.ts
deleted file mode 100644
index ece7e7486..000000000
--- a/qq/example/subpages/grid/grid.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-Page({
- data: {
- border: {
- color: '#f6f6f6',
- },
- },
-});
diff --git a/qq/example/subpages/grid/grid.wxml b/qq/example/subpages/grid/grid.wxml
deleted file mode 100644
index d8ec1969d..000000000
--- a/qq/example/subpages/grid/grid.wxml
+++ /dev/null
@@ -1,189 +0,0 @@
-
- Grid 宫格
- 用于功能入口布局,将页面或特定区域切分成若干等大的区块,形成若干功能入口。
-
-
- 一行三个带边框
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行四个
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行五个
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行三个
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 一行二个带说明
-
-
-
-
-
-
-
-
-
-
-
- 一行三个带说明
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 带徽标
-
-
-
-
-
-
-
-
-
-
-
-
- >
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/gulp-error/index.json b/qq/example/subpages/gulp-error/index.json
deleted file mode 100644
index 6a202bc43..000000000
--- a/qq/example/subpages/gulp-error/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "gulp编译错误"
-}
diff --git a/qq/example/subpages/gulp-error/index.ts b/qq/example/subpages/gulp-error/index.ts
deleted file mode 100644
index 91a582c71..000000000
--- a/qq/example/subpages/gulp-error/index.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-Page({
- data: {
- gulpError: '',
- },
- onLoad({ gulpError }) {
- this.setData({ gulpError });
- },
-});
diff --git a/qq/example/subpages/gulp-error/index.wxml b/qq/example/subpages/gulp-error/index.wxml
deleted file mode 100644
index 65a9a36bc..000000000
--- a/qq/example/subpages/gulp-error/index.wxml
+++ /dev/null
@@ -1 +0,0 @@
-gulp编译错误: {{gulpError}}
diff --git a/qq/example/subpages/icon/data.js b/qq/example/subpages/icon/data.js
deleted file mode 100644
index b051e4a4f..000000000
--- a/qq/example/subpages/icon/data.js
+++ /dev/null
@@ -1,230 +0,0 @@
-const icons = [
- 'add-circle',
- 'add-rectangle',
- 'add',
- 'app',
- 'arrow-down-rectangle',
- 'arrow-down',
- 'arrow-left',
- 'arrow-right',
- 'arrow-up',
- 'attach',
- 'backtop-rectangle',
- 'backtop',
- 'backward',
- 'barcode',
- 'books',
- 'browse-off',
- 'browse',
- 'bulletpoint',
- 'calendar',
- 'call',
- 'caret-down-small',
- 'caret-down',
- 'caret-left-small',
- 'caret-left',
- 'caret-right-small',
- 'caret-right',
- 'caret-up-small',
- 'caret-up',
- 'cart',
- 'chart-bar',
- 'chart-bubble',
- 'chart-pie',
- 'chart',
- 'chat',
- 'check-circle-filled',
- 'check-circle',
- 'check-rectangle-filled',
- 'check-rectangle',
- 'check',
- 'chevron-down-circle',
- 'chevron-down-rectangle',
- 'chevron-down',
- 'chevron-left-circle',
- 'chevron-left-double',
- 'chevron-left-rectangle',
- 'chevron-left',
- 'chevron-right-circle',
- 'chevron-right-double',
- 'chevron-right-rectangle',
- 'chevron-right',
- 'chevron-up-circle',
- 'chevron-up-rectangle',
- 'chevron-up',
- 'circle',
- 'clear',
- 'close-circle-filled',
- 'close-circle',
- 'close-rectangle',
- 'close',
- 'cloud-download',
- 'cloud-upload',
- 'cloud',
- 'code',
- 'control-platform',
- 'creditcard',
- 'dashboard',
- 'delete',
- 'desktop',
- 'discount-filled',
- 'discount',
- 'download',
- 'edit-1',
- 'edit',
- 'ellipsis',
- 'enter',
- 'error-circle-filled',
- 'error-circle',
- 'error',
- 'file-add',
- 'file-copy',
- 'file-excel',
- 'file-image',
- 'file-paste',
- 'file-pdf',
- 'file-powerpoint',
- 'file-unknown',
- 'file-word',
- 'file',
- 'filter-clear',
- 'filter',
- 'flag',
- 'folder-add',
- 'folder-open',
- 'folder',
- 'fork',
- 'format-horizontal-align-bottom',
- 'format-horizontal-align-center',
- 'format-horizontal-align-top',
- 'format-vertical-align-center',
- 'format-vertical-align-left',
- 'format-vertical-align-right',
- 'forward',
- 'fullscreen-exit',
- 'fullscreen',
- 'gender-female',
- 'gender-male',
- 'gift',
- 'heart-filled',
- 'heart',
- 'help-circle-filled',
- 'help-circle',
- 'help',
- 'history',
- 'home',
- 'hourglass',
- 'image',
- 'info-circle-filled',
- 'info-circle',
- 'internet',
- 'jump',
- 'laptop',
- 'layers',
- 'link-unlink',
- 'link',
- 'loading',
- 'location',
- 'lock-off',
- 'lock-on',
- 'login',
- 'logo-android',
- 'logo-apple-filled',
- 'logo-apple',
- 'logo-chrome-filled',
- 'logo-chrome',
- 'logo-codepen',
- 'logo-github-filled',
- 'logo-github',
- 'logo-ie-filled',
- 'logo-ie',
- 'logo-windows-filled',
- 'logo-windows',
- 'logout',
- 'mail',
- 'menu-fold',
- 'menu-unfold',
- 'minus-circle-filled',
- 'minus-circle',
- 'minus-rectangle',
- 'mobile-vibrate',
- 'mobile',
- 'money-circle',
- 'more',
- 'move',
- 'next',
- 'notification-filled',
- 'notification',
- 'order-adjustment-column',
- 'order-ascending',
- 'order-descending',
- 'page-first',
- 'page-last',
- 'pause-circle-filled',
- 'photo',
- 'pin',
- 'play-circle-filled',
- 'play-circle-stroke',
- 'play-circle',
- 'play',
- 'poweroff',
- 'precise-monitor',
- 'previous',
- 'print',
- 'qrcode',
- 'queue',
- 'rectangle',
- 'refresh',
- 'remove',
- 'rollback',
- 'root-list',
- 'round',
- 'save',
- 'scan',
- 'search',
- 'secured',
- 'server',
- 'service',
- 'setting',
- 'share',
- 'shop',
- 'slash',
- 'sound',
- 'star-filled',
- 'star',
- 'stop-circle-1',
- 'stop-circle-filled',
- 'stop-circle',
- 'stop',
- 'swap-left',
- 'swap-right',
- 'swap',
- 'thumb-down',
- 'thumb-up',
- 'time-filled',
- 'time',
- 'tips',
- 'tools',
- 'unfold-less',
- 'unfold-more',
- 'upload',
- 'usb',
- 'user-add',
- 'user-avatar',
- 'user-circle',
- 'user-clear',
- 'user-talk',
- 'user',
- 'usergroup-add',
- 'usergroup-clear',
- 'usergroup',
- 'video',
- 'view-column',
- 'view-list',
- 'view-module',
- 'wallet',
- 'wifi',
- 'zoom-in',
- 'zoom-out',
-];
-export default icons;
diff --git a/qq/example/subpages/icon/icon.json b/qq/example/subpages/icon/icon.json
deleted file mode 100644
index 55ff28ef3..000000000
--- a/qq/example/subpages/icon/icon.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "icon 图标",
- "navigationBarBackgroundColor": "#fff"
-}
diff --git a/qq/example/subpages/icon/icon.less b/qq/example/subpages/icon/icon.less
deleted file mode 100644
index 8f834cc5b..000000000
--- a/qq/example/subpages/icon/icon.less
+++ /dev/null
@@ -1,24 +0,0 @@
-@import (css) './iconfont.wxss';
-
-page {
- background: #fff;
-}
-
-.demo {
- &__list {
- display: flex;
- flex-wrap: wrap;
- padding: 32rpx;
- }
-
- &__card {
- flex: 0 0 25%;
- text-align: center;
- margin-bottom: 30rpx;
-
- &-name {
- font-size: 24rpx;
- color: #999;
- }
- }
-}
diff --git a/qq/example/subpages/icon/icon.ts b/qq/example/subpages/icon/icon.ts
deleted file mode 100644
index 0c5370f42..000000000
--- a/qq/example/subpages/icon/icon.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import icons from './data.js';
-
-Page({
- data: {
- icons: [
- 'arrow-down',
- 'arrow-left',
- 'arrow-right',
- 'arrow-up',
- 'add-circle',
- 'app',
- 'arrow-down-rectangle',
- 'attach',
- 'backtop-rectangle',
- 'backtop',
- 'backward',
- 'barcode',
- 'books',
- 'browse-off',
- 'browse',
- 'bulletpoint',
- 'calendar',
- 'call',
- 'caret-down',
- 'caret-left',
- 'caret-right',
- 'caret-up',
- 'cart',
- 'chart-bar',
- 'chart-bubble',
- 'chart-pie',
- 'chart',
- 'chat',
- ],
- prefixIcons: ['a-0', 'a-1h', 'a-2h', 'a-3h'],
- },
- onLoad() {
- this.setData({
- icons,
- });
- },
- onIconTap(event: any) {
- const { icons } = this.data;
- const { index, type } = event.currentTarget.dataset;
- if (type === 'prefix') {
- return;
- }
- wx.setClipboardData({
- data: icons[index],
- });
- },
-});
diff --git a/qq/example/subpages/icon/icon.wxml b/qq/example/subpages/icon/icon.wxml
deleted file mode 100644
index b149fd3b0..000000000
--- a/qq/example/subpages/icon/icon.wxml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
- {{name}}
-
-
-
-
- Icon 图标
- 用于界面中的操作、入口、功能、服务等视觉表达,icon风格与品牌风格需要保持一致的感受,从而增加一致性
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/icon/iconfont.wxss b/qq/example/subpages/icon/iconfont.wxss
deleted file mode 100644
index 85f8b2080..000000000
--- a/qq/example/subpages/icon/iconfont.wxss
+++ /dev/null
@@ -1,31 +0,0 @@
-@font-face {
- font-family: 'icon'; /* Project id 3144196 */
- src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAPUAAsAAAAACGAAAAOFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGYACDGgqEPIQBATYCJAMUCwwABCAFhDcHQhtVBxHVmy/JfhzGjunMd9u7ZdNoJGL95+B5ckPfvzsIgZjoVHHRKe1qNlEdfUoAPFpzlgKhvLdV7dpf4MyYhRbmw1+ObxM9+wDSmJP2okWn0XkEe1sWSOAJJR4mYA3TSx7kD48ggEsZ9VFNm7ftSsjYQVPHk4DBlwpUtTJ21IhBONyBmagVHAR76U6DbMQCtUo9BzZk75cfVIgDCkvjn9NxeLOhPPTb+R31wtqF6PckEgQ4WwEWoIGih7mk93SgK7pIF6FxhwKGPDTZIOB3rK312yWKZ//hgaDQGBAbvzoIgIYwY8BvFxEI+O0JFPgdCDT4HVVfpN0CwAWWfQ68w1yWUQUvFRUUEJMZ0zBmzKILZ26suXbqHGrh2ZNXV18/fV68hafWnInRi06vPskQ3VV6eKqH9vB2nPDWbNu2C1xZtH31VhgiPfbE7kmo2ba78+R9oy6cueOtuXVuHwt3+kNEdfVYNWfEmhMii067q3cK6kYqetu26F2w6GjUtlO79uXprVE7b7r38YsHl62wxmwPBrvdDvyl7A2Os2v65berseOS461n/fL6PbPim4dlpFSGJIdmpmSGMm3NvmaVrZtVNPePPcwtGCU9i0KcX3dKyKGCTUFnY9aHrCNjTeN5PzcGxQd6498Eh4WH5zXPjbbvdIxJHLz4dnx4QLNlC4Y/nd98/MZvwLSjqfOTGoRGhEX8dfOa50XbtyfEJHVbM+JAnW7F8SnLQr7+lxVUpFRN6PF4ZnpY62/ZybnNs8Ki0qIimiWf7HroYciPBM85E3+uGqdmAKjPamomzPiEAAJN2zkJA0Lr/nY8A8DHwLJq4DAszzgoYIrfbuy7UNRYGTKaoc7Ih2BddD9goQJcXKDWj0Tw8RhT5OIkCKahZFAEEAuNIYUyXAYsPHJgYyiHSyHV+z0iGYhGTCCQwxQAwWEXFCEcgsbhAmW4G7CI4QFsHF7AxXn+ZQ85QYZDxpFxgekHag6eQj1npVcULztmKY8ST8xFwTh0dVvPXdBjXrOmvEXPTEA5ODhvvQ+tDRBz0DhzLZnjvmlo6Cn1HNzqkHFkXIDpB6g5eEos3Fx+RfGyYx5QZ74nQl3hclgPdNS0E9TF4Ce7XrS+vEUPMwFkq4MDzlf70AbpAMThaRpnrpEbknFPg8RoqaG+1uTekpz14a+2RIkWI5bYbAdV7S6ydTKm+/ggVysAAAA=')
- format('woff2'),
- url('//at.alicdn.com/t/font_3144196_s14ifjx2cyi.woff?t=1642299317916') format('woff'),
- url('//at.alicdn.com/t/font_3144196_s14ifjx2cyi.ttf?t=1642299317916') format('truetype');
-}
-
-.icon {
- font-family: 'icon' !important;
- font-size: 16px;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-}
-
-.icon-a-0:before {
- content: '\e64d';
-}
-
-.icon-a-1h:before {
- content: '\e64e';
-}
-
-.icon-a-2h:before {
- content: '\e64f';
-}
-
-.icon-a-3h:before {
- content: '\e650';
-}
diff --git a/qq/example/subpages/image/image.json b/qq/example/subpages/image/image.json
deleted file mode 100644
index 0a1ae94e9..000000000
--- a/qq/example/subpages/image/image.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Image",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/image/image.less b/qq/example/subpages/image/image.less
deleted file mode 100644
index 3622dff3c..000000000
--- a/qq/example/subpages/image/image.less
+++ /dev/null
@@ -1,133 +0,0 @@
-page {
- background: #fff;
-}
-
-.title {
- margin: 0rpx 32rpx;
- padding-top: 48rpx;
- font-size: 44rpx;
- font-weight: bold;
- line-height: 64rpx;
-}
-
-.desc {
- margin-top: 10rpx;
- margin-bottom: 10rpx;
- margin-left: 32rpx;
- margin-right: 32rpx;
- color: #999;
- font-size: 26rpx;
- line-height: 36rpx;
-}
-
-.row {
- display: flex;
- align-items: flex-end;
-}
-
-.gutter-row {
- height: 32rpx;
-}
-
-.gutter-column-24 {
- width: 24rpx * 2;
- display: inline-block;
-}
-
-.gutter-column-32 {
- width: 32rpx * 2;
- display: inline-block;
-}
-
-.image-example {
- display: flex;
- align-items: center;
- flex-direction: column;
-
- .text {
- margin-top: 8rpx * 2;
- font-size: 20rpx;
- color: #999;
- }
-}
-
-.custom-loading-failed {
- font-size: 20rpx;
- color: #999;
-}
-
-.loading__mask2 {
- background-color: #f2f2f2 !important;
-}
-
-.loading-text {
- height: 0px;
- width: 0px;
-}
-
-.loading-container {
- display: flex;
-}
-
-.bottom-row {
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
-}
-
-// 以下覆盖组件内部样式
-page {
- .t-image {
- border-radius: 0;
- overflow: hidden;
- }
-
- .t-image__mask {
- background-color: #f2f2f2;
- }
-
- .radius-l .t-image {
- border-radius: 16rpx;
- }
-
- .radius-m .t-image {
- border-radius: 8rpx;
- }
-
- .radius-s .t-image {
- border-radius: 4rpx;
- }
-
- .radius-round .t-image {
- border-radius: 999px;
- }
-
- .size-xl .t-image {
- width: 120rpx * 2;
- height: 120rpx * 2;
- }
-
- .size-l .t-image {
- width: 72rpx * 2;
- height: 72rpx * 2;
- }
-
- .size-m .t-image {
- width: 56rpx * 2;
- height: 56rpx * 2;
- }
-
- .size-s .t-image {
- width: 48rpx * 2;
- height: 48rpx * 2;
- }
-
- .size-xs .t-image {
- width: 32rpx * 2;
- height: 32rpx * 2;
- }
-
- .size-xss .t-image {
- width: 24rpx * 2;
- height: 24rpx * 2;
- }
-}
diff --git a/qq/example/subpages/image/image.ts b/qq/example/subpages/image/image.ts
deleted file mode 100644
index 142d22ece..000000000
--- a/qq/example/subpages/image/image.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-Page({
- data: {
- imgUrl: 'https://cdn-we-retail.ym.tencent.com/miniapp/home/home-default-logo.png',
- },
- onReady() {
- const loadingImage = this.selectComponent('#loading-img');
- loadingImage.onLoadError = null;
- loadingImage.onLoaded = null;
- loadingImage.setData({
- isLoading: true,
- isFailed: false,
- });
- const loadingImageCustom = this.selectComponent('#loading-img-custom');
- loadingImageCustom.onLoadError = null;
- loadingImageCustom.onLoaded = null;
- loadingImageCustom.setData({
- isLoading: true,
- isFailed: false,
- });
- },
-});
diff --git a/qq/example/subpages/image/image.wxml b/qq/example/subpages/image/image.wxml
deleted file mode 100644
index 33a4752ca..000000000
--- a/qq/example/subpages/image/image.wxml
+++ /dev/null
@@ -1,170 +0,0 @@
-Image 图片
-用于展示效果,主要为上下左右居中裁切、拉伸、平铺等方式。
-
-
-
-
-
- 裁切
-
-
-
-
- 适应高
-
-
-
-
- 拉伸
-
-
-
-
-
-
-
-
-
- 方形
-
-
-
-
- 圆角方形
-
-
-
-
- 圆形
-
-
-
-
-
-
-
-
-
- 默认提示
-
-
-
-
-
-
- 自定义提示
-
-
-
-
-
-
-
-
-
- 默认提示
-
-
-
-
- 加载失败
-
- 自定义提示
-
-
-
-
-
-
-
-
-
- 图片 56
-
-
-
-
- 图片 48
-
-
-
-
- 图片 32
-
-
-
-
- 图片 24
-
-
-
-
-
-
- 图片 120
-
-
-
-
- 图片 72
-
-
-
-
diff --git a/qq/example/subpages/indexes/data.js b/qq/example/subpages/indexes/data.js
deleted file mode 100644
index 30e5e7933..000000000
--- a/qq/example/subpages/indexes/data.js
+++ /dev/null
@@ -1,186 +0,0 @@
-const letter = [
- {
- title: 'A开头',
- index: 'A',
- children: [
- { title: '阿坝' },
- { title: '阿拉善' },
- { title: '阿里' },
- { title: '安康' },
- { title: '安庆' },
- { title: '鞍山' },
- { title: '安顺' },
- { title: '安阳' },
- { title: '澳门' },
- ],
- },
- {
- title: 'B开头',
- index: 'B',
- children: [
- { title: '北京' },
- { title: '白银' },
- { title: '保定' },
- { title: '宝鸡' },
- { title: '保山' },
- { title: '包头' },
- { title: '巴中' },
- { title: '北海' },
- { title: '蚌埠' },
- { title: '本溪' },
- { title: '毕节' },
- { title: '滨州' },
- { title: '百色' },
- { title: '亳州' },
- ],
- },
- {
- title: 'C开头',
- index: 'C',
- children: [
- { title: '重庆' },
- { title: '成都' },
- { title: '长沙' },
- { title: '长春' },
- { title: '沧州' },
- { title: '常德' },
- { title: '昌都' },
- { title: '长治' },
- { title: '常州' },
- { title: '巢湖' },
- { title: '潮州' },
- { title: '承德' },
- { title: '郴州' },
- { title: '赤峰' },
- { title: '池州' },
- { title: '崇左' },
- { title: '楚雄' },
- { title: '滁州' },
- { title: '朝阳' },
- ],
- },
- {
- title: 'D开头',
- index: 'D',
- children: [
- { title: '大连' },
- { title: '东莞' },
- { title: '大理' },
- { title: '丹东' },
- { title: '大庆' },
- { title: '大同' },
- { title: '大兴安岭' },
- { title: '德宏' },
- { title: '德阳' },
- { title: '德州' },
- { title: '定西' },
- { title: '迪庆' },
- { title: '东营' },
- ],
- },
- {
- title: 'E开头',
- index: 'E',
- children: [{ title: '鄂尔多斯' }, { title: '恩施' }, { title: '鄂州' }],
- },
- {
- title: 'F开头',
- index: 'F',
- children: [
- { title: '福州' },
- { title: '防城港' },
- { title: '佛山' },
- { title: '抚顺' },
- { title: '抚州' },
- { title: '阜新' },
- { title: '阜阳' },
- ],
- },
- {
- title: 'G开头',
- index: 'G',
- children: [
- { title: '广州' },
- { title: '桂林' },
- { title: '贵阳' },
- { title: '甘南' },
- { title: '赣州' },
- { title: '甘孜' },
- { title: '广安' },
- { title: '广元' },
- { title: '贵港' },
- { title: '果洛' },
- ],
- },
-];
-
-const number = [
- {
- title: '第一章',
- index: '1',
- children: [
- { title: '第一章第一节' },
- { title: '第一章第二节' },
- { title: '第一章第三节' },
- { title: '第一章第四节' },
- { title: '第一章第五节' },
- ],
- },
- {
- title: '第二章',
- index: '2',
- children: [
- { title: '第二章第一节' },
- { title: '第二章第二节' },
- { title: '第二章第三节' },
- { title: '第二章第四节' },
- { title: '第二章第五节' },
- ],
- },
- {
- title: '第三章',
- index: '3',
- children: [
- { title: '第三章第一节' },
- { title: '第三章第二节' },
- { title: '第三章第三节' },
- { title: '第三章第四节' },
- { title: '第三章第五节' },
- ],
- },
- {
- title: '第四章',
- index: '4',
- children: [
- { title: '第四章第一节' },
- { title: '第四章第二节' },
- { title: '第四章第三节' },
- { title: '第四章第四节' },
- { title: '第四章第五节' },
- ],
- },
- {
- title: '第五章',
- index: '5',
- children: [
- { title: '第五章第一节' },
- { title: '第五章第二节' },
- { title: '第五章第三节' },
- { title: '第五章第四节' },
- { title: '第五章第五节' },
- ],
- },
- {
- title: '第六章',
- index: '6',
- children: [
- { title: '第六章第一节' },
- { title: '第六章第二节' },
- { title: '第六章第三节' },
- { title: '第六章第四节' },
- { title: '第六章第五节' },
- ],
- },
-];
-
-export { letter, number };
diff --git a/qq/example/subpages/indexes/display.json b/qq/example/subpages/indexes/display.json
deleted file mode 100644
index f5de61752..000000000
--- a/qq/example/subpages/indexes/display.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "Indexes 索引",
- "navigationBarBackgroundColor": "#fff"
-}
diff --git a/qq/example/subpages/indexes/display.ts b/qq/example/subpages/indexes/display.ts
deleted file mode 100644
index 74fdf8f6d..000000000
--- a/qq/example/subpages/indexes/display.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * @Author: shiyanzhang
- * @Date: 2021-09-26 15:06:16
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/indexes/display.ts
- */
-import { letter, number } from './data.js';
-
-Page({
- data: {
- list: letter,
- barHeight: null as any,
- },
- onLoad(options) {
- const { type } = options;
- let list = letter;
- if (type === 'number') {
- list = number;
- }
-
- this.setData({ list });
- },
- onReady() {
- this.getTopHeight().then((res: any) => {
- const { windowHeight } = wx.getSystemInfoSync();
- this.setData({
- barHeight: windowHeight - res.top,
- });
- });
- },
- onShow() {},
- getTopHeight() {
- return new Promise((resolve) => {
- const query = wx.createSelectorQuery();
- query
- .select('#bar')
- .boundingClientRect((res) => {
- resolve(res);
- })
- .exec();
- });
- },
- tapShowLetter() {
- this.setData({ list: letter });
- },
- tapShowNumber() {
- this.setData({ list: number });
- },
- onSelect(e) {
- const { indexes } = e.detail;
- if (indexes.length < 2) {
- console.warn('需要两个index才能确定city');
- return;
- }
- const group = this.data.list[indexes[0]];
- const city = group.children[indexes[1]];
- wx.showToast({
- icon: 'none',
- title: `你选择了: ${group.title}>${city.title}`,
- });
- },
-});
diff --git a/qq/example/subpages/indexes/display.wxml b/qq/example/subpages/indexes/display.wxml
deleted file mode 100644
index d1ed0a3c5..000000000
--- a/qq/example/subpages/indexes/display.wxml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/qq/example/subpages/indexes/indexes.json b/qq/example/subpages/indexes/indexes.json
deleted file mode 100644
index 6488843ed..000000000
--- a/qq/example/subpages/indexes/indexes.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Indexes 索引",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/indexes/indexes.less b/qq/example/subpages/indexes/indexes.less
deleted file mode 100644
index 0078e0192..000000000
--- a/qq/example/subpages/indexes/indexes.less
+++ /dev/null
@@ -1,35 +0,0 @@
-.indexes {
- background-color: #fff;
- font-size: 32rpx;
- line-height: 48rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 48rpx 0rpx 96rpx 0rpx;
- min-height: 100vh;
-
- .box {
- margin: 0 32rpx;
- }
-
- .sub-title {
- margin-top: 40rpx;
- font-weight: bold;
- padding: 0 32rpx;
- }
-
- .button-wrap {
- display: flex;
- margin: 32rpx 0 64rpx;
- }
-
- .type-button {
- height: 80rpx;
- border-radius: 8rpx;
- border: 1rpx solid #dcdcdc;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 28rpx;
- color: rgba(0, 0, 0, 0.9);
- margin-bottom: 18px;
- }
-}
diff --git a/qq/example/subpages/indexes/indexes.ts b/qq/example/subpages/indexes/indexes.ts
deleted file mode 100644
index 8c8c0d605..000000000
--- a/qq/example/subpages/indexes/indexes.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * @Author: shiyanzhang
- * @Date: 2021-08-24 19:27:04
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/indexes/indexes.ts
- */
-
-Page({
- data: {},
- onLoad() {},
- onReady() {},
- onShow() {},
- tapShowLetter() {
- wx.navigateTo({ url: '/subpages/indexes/display?type=letter' });
- },
- tapShowNumber() {
- wx.navigateTo({ url: '/subpages/indexes/display?type=number' });
- },
-});
diff --git a/qq/example/subpages/indexes/indexes.wxml b/qq/example/subpages/indexes/indexes.wxml
deleted file mode 100644
index eef3acd82..000000000
--- a/qq/example/subpages/indexes/indexes.wxml
+++ /dev/null
@@ -1,14 +0,0 @@
-
- Indexes 索引
- 用于页面中信息快速检索,可以根据目录中的页码快速找到所需的内容。
-
-
-
- 字母索引
-
-
- 数字索引
-
-
-
-
diff --git a/qq/example/subpages/input/api.md b/qq/example/subpages/input/api.md
deleted file mode 100644
index 06f6bdafb..000000000
--- a/qq/example/subpages/input/api.md
+++ /dev/null
@@ -1,32 +0,0 @@
-### Input Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| -------------- | --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------- | -------- | --- |
-| adjustPosition | Boolean | true | 键盘弹起时,是否自动上推页面 | N |
-| align | String | left | 文本内容位置,居左/居中/居右。可选值:left/center/right | N |
-| autofocus | Boolean | false | 自动聚焦 | N |
-| clearable | Boolean | false | 是否可清空 | N |
-| confirmHold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起点 | N |
-| confirmType | String | done | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选值:send/search/next/go/done | N |
-| disabled | Boolean | false | 是否禁用输入框 | N |
-| errorMessage | String | - | 错误提示文本 | N |
-| focus | Boolean | false | 自动聚焦 | N |
-| maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 | N |
-| maxlength | Number | - | 用户最多可以输入的文本长度。值小于等于 0 的时候,则不限制输入长度 | N |
-| name | String | - | 名称 | N |
-| placeholder | String | - | 占位符 | N |
-| size | String | small | 输入框尺寸。可选值:small/medium。TS 类型:`'medium' | 'small'` | N |
-| suffix | String | - | 后置文本内容 | N |
-| suffixIcon | String / Slot | - | 组件后置图标。[通用类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/common.ts) | N |
-| type | String | text | 输入框类型。可选值:text/number/idcard/digit/safe-password/password | N |
-| value | String / Number | - | 输入框的值。TS 类型:`InputValue`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/input/type.ts) | N |
-
-### Input Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ---------------------------------------------------- | ---------------------- |
-| blur | `(value: InputValue, context: { e: FocusEvent })` | 失去焦点时触发 |
-| change | `(value: InputValue` | 输入框值发生变化时触发 |
-| clear | `(context: { e: MouseEvent })` | 清空按钮点击时触发 |
-| enter | `(value: InputValue, context: { e: KeyboardEvent })` | 回车键按下时触发 |
-| focus | `(value: InputValue, context: { e: FocusEvent })` | 获得焦点时触发 |
diff --git a/qq/example/subpages/input/input.json b/qq/example/subpages/input/input.json
deleted file mode 100644
index 534538fb9..000000000
--- a/qq/example/subpages/input/input.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Input 输入框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/input/input.less b/qq/example/subpages/input/input.less
deleted file mode 100644
index ec8d8a12a..000000000
--- a/qq/example/subpages/input/input.less
+++ /dev/null
@@ -1,16 +0,0 @@
-.input-example {
- padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
- padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
- .cell {
- margin-bottom: 32rpx;
- }
-
- .verify {
- font-size: 32rpx;
- color: #0052d9;
- }
-
- .error-msg {
- text-align: right !important;
- }
-}
diff --git a/qq/example/subpages/input/input.ts b/qq/example/subpages/input/input.ts
deleted file mode 100644
index 820d6d20b..000000000
--- a/qq/example/subpages/input/input.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-Page({
- data: {
- firstValue: '',
- textPassword: '123456',
- phoneError: false,
- phoneNumber: '17600600600',
- price: '10.2',
- priceError: false,
- },
-
- onPhoneInput(e) {
- const { phoneError } = this.data;
- const isPhoneNumber = /^[1][3,4,5,7,8,9][0-9]{9}$/.test(e.detail.value);
- if (phoneError === isPhoneNumber) {
- this.setData({
- phoneError: !isPhoneNumber,
- });
- }
- },
-
- onPriceInput(e) {
- const { priceError } = this.data;
- const isNumber = /^\d+(\.\d+)?$/.test(e.detail.value);
- if (priceError === isNumber) {
- this.setData({
- priceError: !isNumber,
- });
- }
- },
-});
diff --git a/qq/example/subpages/input/input.wxml b/qq/example/subpages/input/input.wxml
deleted file mode 100644
index 770304c1f..000000000
--- a/qq/example/subpages/input/input.wxml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
- Input 输入框
- 用于单行文本信息输入。
-
-
-
-
-
- 标签文字 *
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 发送验证码
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/loading/loading.json b/qq/example/subpages/loading/loading.json
deleted file mode 100644
index 20398bf01..000000000
--- a/qq/example/subpages/loading/loading.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Loading",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/loading/loading.less b/qq/example/subpages/loading/loading.less
deleted file mode 100644
index cd80b1126..000000000
--- a/qq/example/subpages/loading/loading.less
+++ /dev/null
@@ -1,96 +0,0 @@
-page {
- background-color: #fff;
-}
-
-.demo {
- .demo-title {
- margin-top: 48rpx;
- }
-
- .demo-desc {
- margin-top: 16rpx;
- }
-}
-
-.loading-container-flex {
- display: flex;
- align-items: center;
- margin: 36rpx 32rpx;
- font-size: 24rpx;
-
- t-loading {
- min-width: 20%;
- margin-right: 40rpx;
- display: flex;
- }
-}
-
-.loading-container-flex-column {
- display: block;
- margin-left: 32rpx;
- font-size: 24rpx;
-
- t-loading {
- display: flex;
- margin-top: 32rpx;
- }
-}
-
-.loading-style {
- display: flex;
- margin: 36rpx 32rpx;
- font-size: 24rpx;
-}
-
-.box {
- margin: 0 32rpx;
-}
-
-.t-slider__container {
- margin: 0 32rpx;
-}
-
-.t-switch__label {
- margin-right: 0px !important;
-}
-
-.progress-btn {
- display: block;
- margin-top: 32rpx;
-}
-
-.text-info {
- margin-left: 24rpx;
- color: rgba(0, 0, 0, 0.4);
-}
-
-.text-m {
- font-size: 28rpx;
-}
-
-.text-l {
- font-size: 32rpx;
-}
-
-.indicator-blue {
- color: #0052d9;
-}
-
-.indicator-black {
- color: #000000 !important;
-}
-
-.text-blue {
- color: #0052d9;
-}
-
-.slider-container {
- display: flex;
- align-items: center;
- width: 718rpx;
- padding-left: 32rpx;
-
- .slider-class {
- flex-grow: 1;
- }
-}
diff --git a/qq/example/subpages/loading/loading.ts b/qq/example/subpages/loading/loading.ts
deleted file mode 100644
index aa9096b3d..000000000
--- a/qq/example/subpages/loading/loading.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-Page({
- data: {
- isCheck: false,
- duration: 800,
- },
-
- switchChange() {
- const { isCheck } = this.data;
- this.setData({ isCheck: !isCheck });
- },
-
- durationChange(e) {
- this.setData({ duration: e.detail.value });
- },
-
- goToProgress() {
- wx.redirectTo({
- url: '/pages/loading/loadingProgress/loadingProgress',
- });
- },
-
- reloadPage() {
- wx.redirectTo({
- url: '/pages/loading/loading',
- });
- },
-});
diff --git a/qq/example/subpages/loading/loading.wxml b/qq/example/subpages/loading/loading.wxml
deleted file mode 100644
index 89871d104..000000000
--- a/qq/example/subpages/loading/loading.wxml
+++ /dev/null
@@ -1,80 +0,0 @@
-
- Loading 加载
- 用于表示页面或操作的加载状态,给予用户反馈的同时减缓等待的焦虑感,由一个或一组反馈动效组成。
-
-
- 纯icon
-
-
-
-
-
- icon加文字横向
-
-
-
-
- 加载中...
-
-
- icon加文字竖向
-
- 纯文字
-
- 加载失败
-
- 进度条加载
-
- 页面进度条加载
-
-
-
-
-
-
- {{isCheck?'请求发起,延迟显示loading加载':'请求结束,隐藏loading加载'}}
-
-
-
-
-
-
-
-
-
- 速度调整
-
-
-
-
-
- 支持自定义加载规格
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/loading/loadingProgress/loadingProgress.json b/qq/example/subpages/loading/loadingProgress/loadingProgress.json
deleted file mode 100644
index 16738c730..000000000
--- a/qq/example/subpages/loading/loadingProgress/loadingProgress.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "navigationBarTitleText": "页面加载样式",
- "usingComponents": {}
-}
diff --git a/qq/example/subpages/loading/loadingProgress/loadingProgress.ts b/qq/example/subpages/loading/loadingProgress/loadingProgress.ts
deleted file mode 100644
index cc993fa9e..000000000
--- a/qq/example/subpages/loading/loadingProgress/loadingProgress.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-Page({
- data: {
- progress: 100,
- isLoading: false,
- barLoadingTimeOut: null,
- },
-
- onLoad() {
- const timeout = setTimeout(() => {
- this.setData({ isLoading: false });
- }, 10000);
- this.setData({
- progress: -1,
- isLoading: true,
- barLoadingTimeOut: timeout,
- });
- },
-
- onUnload() {
- clearTimeout(this.data.barLoadingTimeOut);
- },
-});
diff --git a/qq/example/subpages/loading/loadingProgress/loadingProgress.wxml b/qq/example/subpages/loading/loadingProgress/loadingProgress.wxml
deleted file mode 100644
index 2f3d6c89c..000000000
--- a/qq/example/subpages/loading/loadingProgress/loadingProgress.wxml
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/qq/example/subpages/message/message.json b/qq/example/subpages/message/message.json
deleted file mode 100644
index 200101f2e..000000000
--- a/qq/example/subpages/message/message.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Message",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/message/message.less b/qq/example/subpages/message/message.less
deleted file mode 100644
index c1218f389..000000000
--- a/qq/example/subpages/message/message.less
+++ /dev/null
@@ -1,15 +0,0 @@
-page {
- background: #fff;
-}
-
-.demo-block__oper {
- padding: 0 32rpx;
-}
-
-.button-group {
- margin-top: 32rpx;
-
- .button-group-item {
- margin-bottom: 32rpx;
- }
-}
diff --git a/qq/example/subpages/message/message.ts b/qq/example/subpages/message/message.ts
deleted file mode 100644
index 256016835..000000000
--- a/qq/example/subpages/message/message.ts
+++ /dev/null
@@ -1,149 +0,0 @@
-// @ts-ignore
-import Message from 'tdesign-qq-miniprogram/message/index';
-
-Page({
- data: {
- operList1: [
- {
- title: '弹窗内容为纯文本、标题和副标题、带输入框',
- btns: [
- {
- type: 'text',
- text: '纯文字通知',
- },
- {
- type: 'icon',
- text: '带图标通知',
- },
- {
- type: 'closeable',
- text: '带关闭通知',
- },
- {
- type: 'scroll',
- text: '滚动通知',
- },
- {
- type: 'btn',
- text: '带按钮通知',
- },
- ],
- },
- ],
- operList2: [
- {
- title: '弹窗状态为普通弹窗、警示提示弹窗、成功提示弹窗、错误提示弹窗。',
- btns: [
- {
- type: 'info',
- text: '普通通知',
- },
- {
- type: 'warning',
- text: '警示提示通知',
- },
- {
- type: 'success',
- text: '成功提示通知',
- },
- {
- type: 'error',
- text: '错误提示通知',
- },
- ],
- },
- ],
- },
- showMessage(e) {
- switch (e.detail) {
- case 'text': {
- Message.info({
- offset: [20, 32],
- duration: 5000,
- icon: false,
- content: '这是一条纯文字的消息通知 5s消失',
- });
- break;
- }
- case 'icon': {
- Message.info({
- offset: ['20rpx', '32rpx'],
- duration: 5000,
- icon: 'error-circle',
- content: '这是一条带图标的消息通知 5s消失',
- });
- break;
- }
- case 'closeable': {
- Message.info({
- offset: ['20rpx', 32],
- icon: 'error-circle',
- content: '这是一条带关闭的消息通知 常驻可关闭',
- duration: -1,
- closeBtn: true,
- });
- break;
- }
- case 'scroll': {
- Message.info({
- offset: [20, 32],
- marquee: { speed: 50, loop: -1, delay: 5000 },
- icon: false,
- content: '这是一条滚动的通知信息',
- duration: -1,
- });
- break;
- }
- case 'btn': {
- Message.info({
- offset: [20, 32],
- icon: 'notification',
- content: '这是一条带操作的消息通知',
- duration: -1,
- action: '按钮',
- });
- break;
- }
- case 'info': {
- Message.info({
- offset: [20, 32],
- duration: 5000,
- content: '这是一条普通通知信息',
- });
- break;
- }
- case 'warning': {
- Message.warning({
- offset: [20, 32],
- duration: -1,
- content: '这是一条需要用户关注到的警示通知',
- });
- break;
- }
- case 'success': {
- Message.success({
- offset: [20, 32],
- duration: -1,
- content: '这是一条需要成功的提示消息',
- });
- break;
- }
- case 'error': {
- Message.error({
- offset: [20, 32],
- duration: -1,
- content: '这是一条错误提示通知',
- });
- break;
- }
- default: {
- break;
- }
- }
- },
-
- clickMessageBtnHadnle({ detail: { self } }) {
- wx.showToast({ title: '点击按钮' });
- self.hide();
- },
-});
diff --git a/qq/example/subpages/message/message.wxml b/qq/example/subpages/message/message.wxml
deleted file mode 100644
index c7e3d9447..000000000
--- a/qq/example/subpages/message/message.wxml
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Message 消息通知
- 用于轻量级反馈或提示,不会打断用户操作。
-
-
-
-
diff --git a/qq/example/subpages/navbar/navbar.json b/qq/example/subpages/navbar/navbar.json
deleted file mode 100644
index 7d6f365d9..000000000
--- a/qq/example/subpages/navbar/navbar.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationStyle": "custom",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/navbar/navbar.less b/qq/example/subpages/navbar/navbar.less
deleted file mode 100644
index 4792abb8d..000000000
--- a/qq/example/subpages/navbar/navbar.less
+++ /dev/null
@@ -1,63 +0,0 @@
-page {
- background: #fff;
-}
-
-.slot-left {
- padding-left: 20rpx;
-}
-
-.demo-block__oper {
- margin: 0 32rpx;
-}
-
-.img {
- height: 50rpx;
- width: 280rpx;
-}
-
-.t-navbar__left {
- width: 100% !important;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-
-.long-brand {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
-}
-
-.navbar {
- background-color: #999;
-}
-
-.left-icon-slot {
- overflow: hidden;
-}
-
-.left-icon-back {
- font-size: 24px !important;
-}
-
-.home-icon {
- font-size: 24px !important;
-}
-
-.nav-title {
- font-size: 16px !important;
-}
-
-.capsule {
- width: 180rpx;
- height: 48rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-left: 24rpx;
- line-height: 48rpx;
- border-radius: 32rpx;
- background: rgba(0, 0, 0, 0.14);
- border: 1rpx solid rgba(255, 255, 255, 0.2);
- font-size: 24rpx;
-}
diff --git a/qq/example/subpages/navbar/navbar.ts b/qq/example/subpages/navbar/navbar.ts
deleted file mode 100644
index 5d416e0f9..000000000
--- a/qq/example/subpages/navbar/navbar.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-Page({
- data: {
- demoType: 'base-default',
- normalOperList: [
- {
- title: '基础导航栏',
- btns: [
- {
- type: 'base-default',
- text: '基础导航栏',
- },
- {
- type: 'base-back',
- text: '带返回导航栏',
- },
- {
- type: 'base-back-home',
- text: '带返回、主页按钮导航栏',
- },
- {
- type: 'base-brand',
- text: '自定义品牌导航栏',
- },
- {
- type: 'base-img',
- text: '自定义图片导航栏',
- },
- ],
- },
- ],
- specialOperList: [
- {
- title: '品牌超长文字导航栏',
- btns: [
- {
- type: 'base-brand-long',
- text: '品牌超长文字导航栏',
- },
- {
- type: 'custom-capsule',
- text: '自定义导航胶囊',
- },
- ],
- },
- ],
- },
-
- onGoHome() {
- wx.navigateTo({
- url: '/pages/index',
- });
- },
-
- /** 切换 navbar 示例 */
- clickHandle(e) {
- const key = e.detail;
- this.setData({
- demoType: key,
- });
- },
-});
diff --git a/qq/example/subpages/navbar/navbar.wxml b/qq/example/subpages/navbar/navbar.wxml
deleted file mode 100644
index 84ea74deb..000000000
--- a/qq/example/subpages/navbar/navbar.wxml
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
- 品牌名称
-
-
-
-
-
-
-
-
-
-
- 品牌名称最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长最长
-
-
-
-
-
- 自定义胶囊
-
-
-
-
- NavBar 导航栏
- 用于不同页面之间切换或者跳转,位于内容区的上方,系统状态栏的下方。
-
-
-
diff --git a/qq/example/subpages/notice-bar/notice-bar.json b/qq/example/subpages/notice-bar/notice-bar.json
deleted file mode 100644
index ff3d083fb..000000000
--- a/qq/example/subpages/notice-bar/notice-bar.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "navigationBarTitleText": "NoticeBar",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {}
-}
diff --git a/qq/example/subpages/notice-bar/notice-bar.less b/qq/example/subpages/notice-bar/notice-bar.less
deleted file mode 100644
index 97ce35201..000000000
--- a/qq/example/subpages/notice-bar/notice-bar.less
+++ /dev/null
@@ -1,19 +0,0 @@
-.demo {
- .demo-section__desc {
- margin: 0 32rpx 32rpx;
- }
-
- .box {
- margin-bottom: 32rpx;
-
- .t-class {
- color: #ffffff;
- background-color: #a6a6a6;
- }
- .extra {
- display: inline-block;
- font-weight: 700;
- border-bottom: 2rpx solid;
- }
- }
-}
diff --git a/qq/example/subpages/notice-bar/notice-bar.ts b/qq/example/subpages/notice-bar/notice-bar.ts
deleted file mode 100644
index d4d01c330..000000000
--- a/qq/example/subpages/notice-bar/notice-bar.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-Page({
- data: {
- visible: true,
- marquee1: {
- speed: 80,
- loop: -1,
- delay: 0,
- },
- marquee2: {
- speed: 60,
- loop: -1,
- delay: 0,
- },
- },
-
- onReady() {
- /**
- * notice-bar组件的滚动动画依赖自身样式数据。
- * 页面中有多个滚动notice-bar时,建议用wx:if手动控制,需要显示时渲染组件,保证组件能够成功初始化。
- * */
- },
-
- click(e) {
- const { trigger } = e.detail;
- if (trigger === 'prefix-icon') {
- console.log('click prefix-icon text');
- } else if (trigger === 'content') {
- console.log('click content text');
- } else if (trigger === 'extra') {
- console.log('click extra text');
- } else if (trigger === 'suffix-icon') {
- console.log('click suffix-icon text');
- }
- },
-
- clickDetail() {
- console.log('click detail text');
- },
-});
diff --git a/qq/example/subpages/notice-bar/notice-bar.wxml b/qq/example/subpages/notice-bar/notice-bar.wxml
deleted file mode 100644
index f69741963..000000000
--- a/qq/example/subpages/notice-bar/notice-bar.wxml
+++ /dev/null
@@ -1,108 +0,0 @@
-
- NoticeBar 公告栏
- 在导航栏下方,用于给用户显示提示消息
-
-
-
-
-
- 带图标静态公告栏
-
-
-
-
-
-
-
-
- 带操作公告栏
-
-
-
-
-
- 提示文字描述提示文字描述
-
-
-
-
- 滚动公告栏
-
-
-
-
-
-
- 自定义样式
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 自定义样式
-
-
-
-
-
-
-
-
-
-
-
-
-
- 提示文字描述提示文字描述提示文字描述提示文字描述提示文字描述提示文字描述
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/picker/picker.json b/qq/example/subpages/picker/picker.json
deleted file mode 100644
index f294ad3be..000000000
--- a/qq/example/subpages/picker/picker.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Picker 选择器",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/picker/picker.less b/qq/example/subpages/picker/picker.less
deleted file mode 100644
index 3ffd58732..000000000
--- a/qq/example/subpages/picker/picker.less
+++ /dev/null
@@ -1,38 +0,0 @@
-.area-picker-demo {
- height: 100vh;
- overflow: hidden;
-
- .demo-section__desc {
- margin-top: 32rpx;
- margin-bottom: 32rpx;
- }
-
- .pannel-item {
- display: flex;
- align-items: center;
- height: 96rpx;
- padding: 0 32rpx;
- font-size: 32rpx;
- margin-bottom: 32rpx;
- background-color: #fff;
-
- &.last {
- margin-bottom: -13rpx;
- }
- }
-
- .pannel-label {
- width: 160rpx;
- margin-right: 32rpx;
- }
-
- .pannel-text {
- flex: 1;
- color: #000;
- opacity: .9;
-
- &.empty {
- opacity: .26;
- }
- }
-}
diff --git a/qq/example/subpages/picker/picker.ts b/qq/example/subpages/picker/picker.ts
deleted file mode 100644
index 907ed5006..000000000
--- a/qq/example/subpages/picker/picker.ts
+++ /dev/null
@@ -1,160 +0,0 @@
-Page({
- data: {
- picker1Visible: false,
- picker2Visible: false,
- picker3Visible: false,
- picker4Visible: false,
- picker5Visible: false,
- picker6Visible: false,
-
- pickerTitle: '',
- citys: [
- { label: '北京', value: '北京' },
- { label: '上海', value: '上海' },
- { label: '广州', value: '广州' },
- { label: '深圳', value: '深圳' },
- { label: '成都', value: '成都' },
- ],
- years: [
- { label: '2021年', value: '2021' },
- { label: '2020年', value: '2020' },
- { label: '2019年', value: '2019' },
- ],
- months: Array.from(new Array(12), (_, index) => ({
- label: `${index + 1}月`,
- value: index + 1,
- })),
- days: Array.from(new Array(31), (_, index) => ({ label: `${index + 1}日`, value: index + 1 })),
- seasons: [
- { label: '春', value: '春' },
- { label: '夏', value: '夏' },
- { label: '秋', value: '秋' },
- { label: '冬', value: '冬' },
- ],
- selectedCityValue: '广州',
- selectedYearsWithSeason: '',
- selectedYearsWithDate: '',
- selectedSeason: '',
- selectedMonth: '',
- selectedDay: '',
-
- // 带标题的选中值
- selectedCityValue2: '广州',
- selectedYearsWithSeason2: '',
- selectedYearsWithDate2: '',
- selectedSeason2: '',
- selectedMonth2: '',
- selectedDay2: '',
- },
-
- onColumnChange(e) {
- console.log('column change:', e.detail);
- },
-
- onClickPicker(e) {
- const { index } = e?.currentTarget?.dataset;
-
- this.setData({
- [`picker${index}Visible`]: true,
- });
- },
-
- onPickerChange(e) {
- console.log('picker change:', e.detail);
- },
-
- /** **********************Picker1*************************** */
- onPicker1Confirm(e) {
- console.log('picker1 confirm:', e.detail);
- this.setData({
- picker1Visible: false,
- selectedCityValue: e.detail.value[0].value,
- });
- },
- onPicker1Cancel() {
- console.log('picker1 cancel:');
- this.setData({
- picker1Visible: false,
- });
- },
- /** **********************Picker1*************************** */
-
- /** **********************Picker2*************************** */
- onPicker2Confirm(e) {
- console.log('picker2 confirm:', e.detail);
- this.setData({
- picker2Visible: false,
- selectedYearsWithSeason: e.detail.value[0]?.value,
- selectedSeason: e.detail.value[1]?.value,
- });
- },
- onPicker2Cancel() {
- console.log('picker2 cancel:');
- this.setData({
- picker2Visible: false,
- });
- },
- /** **********************Picker2*************************** */
-
- /** **********************Picker3*************************** */
- onPicker3Confirm(e) {
- console.log('picker3 confirm:', e.detail);
- this.setData({
- picker3Visible: false,
- selectedYearsWithDate: e.detail.value[0]?.value,
- selectedMonth: e.detail.value[1]?.value,
- selectedDay: e.detail.value[2]?.value,
- });
- },
-
- onPicker3Cancel() {
- console.log('picker3 cancel:');
- this.setData({
- picker3Visible: false,
- });
- },
- /** **********************Picker3*************************** */
-
- /** **********************Picker4*************************** */
- onPicker4Confirm(e) {
- console.log(4);
- this.setData({
- picker4Visible: false,
- selectedCityValue2: e.detail.value[0].value,
- });
- },
- onPicker4Cancel() {
- this.setData({
- picker4Visible: false,
- });
- },
-
- /** **********************Picker5*************************** */
- onPicker5Confirm(e) {
- this.setData({
- picker5Visible: false,
- selectedYearsWithSeason2: e.detail.value[0]?.value,
- selectedSeason2: e.detail.value[1]?.value,
- });
- },
- onPicker5Cancel() {
- this.setData({
- picker5Visible: false,
- });
- },
- /** **********************Picker6*************************** */
- onPicker6Confirm(e) {
- this.setData({
- picker6Visible: false,
- selectedYearsWithDate2: e.detail.value[0]?.value,
- selectedMonth2: e.detail.value[1]?.value,
- selectedDay2: e.detail.value[2]?.value,
- });
- },
-
- onPicker6Cancel() {
- this.setData({
- picker6Visible: false,
- });
- },
-});
diff --git a/qq/example/subpages/picker/picker.wxml b/qq/example/subpages/picker/picker.wxml
deleted file mode 100644
index 229dcb1ac..000000000
--- a/qq/example/subpages/picker/picker.wxml
+++ /dev/null
@@ -1,131 +0,0 @@
-
- Picker 选择器
- 用于一组预设数据中的选择。
-
-
- 城市
- {{selectedCityValue || '选择城市'}}
-
-
-
- 年份和季节
-
- {{selectedYearsWithSeason}} {{selectedSeason}} {{ !selectedYearsWithSeason ? '选择年份和季节' : ''}}
-
-
-
- 日期
-
- {{selectedYearsWithDate}} {{selectedMonth}} {{selectedDay}} {{!selectedYearsWithDate ? '选择日期' : ''}}
-
-
-
-
-
- 城市
- {{selectedCityValue2 || '选择城市'}}
-
-
-
- 年份和季节
-
- {{selectedYearsWithSeason2}} {{selectedSeason2}} {{ !selectedYearsWithSeason2 ? '选择年份和季节' : ''}}
-
-
-
- 日期
-
- {{selectedYearsWithDate2}} {{selectedMonth2}} {{selectedDay2}} {{!selectedYearsWithDate2 ? '选择日期' :
- ''}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/popup/popup.json b/qq/example/subpages/popup/popup.json
deleted file mode 100644
index 6c52c1230..000000000
--- a/qq/example/subpages/popup/popup.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "popup 弹窗",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/popup/popup.less b/qq/example/subpages/popup/popup.less
deleted file mode 100644
index 6fe8d59f5..000000000
--- a/qq/example/subpages/popup/popup.less
+++ /dev/null
@@ -1,62 +0,0 @@
-page {
- background: #fff;
-}
-
-page .demo-block__oper {
- margin: 0 32rpx;
-}
-
-.tdesign-demo-popup {
- .demo-title {
- margin-bottom: 48rpx;
- font-size: 32rpx;
- font-weight: 500;
- }
-
- .t-button + .t-button {
- margin-left: 16rpx;
- }
-
- .t-button {
- margin-top: 20rpx;
- }
-
- .block {
- width: 176rpx;
- height: 176rpx;
- background: #fff;
- color: #333;
- display: flex;
- align-items: center;
- justify-content: center;
-
- &--border {
- border: 1rpx solid #d8d8d8;
- }
-
- &--left,
- &--right {
- width: 87vw;
- height: 100vh;
- border-radius: 0;
- }
-
- &--middle {
- border-radius: 16rpx;
- }
-
- &--top {
- width: 100vw;
- height: 35vh;
- border-bottom-left-radius: 16rpx;
- border-bottom-right-radius: 16rpx;
- }
-
- &--bottom {
- width: 100vw;
- height: 35vh;
- border-top-left-radius: 16rpx;
- border-top-right-radius: 16rpx;
- }
- }
-}
diff --git a/qq/example/subpages/popup/popup.ts b/qq/example/subpages/popup/popup.ts
deleted file mode 100644
index 0ab866047..000000000
--- a/qq/example/subpages/popup/popup.ts
+++ /dev/null
@@ -1,64 +0,0 @@
-Page({
- data: {
- bottom: false,
- top: false,
- center: false,
- left: false,
- right: false,
- operList: [
- {
- title: '弹出层出现为止可能为顶部、底部、中部、左侧或右侧',
- btns: [
- {
- type: 'top',
- text: '顶部弹出',
- },
- {
- type: 'bottom',
- text: '底部弹出',
- },
- {
- type: 'center',
- text: '中部弹出',
- },
- {
- type: 'left',
- text: '左侧弹出',
- },
- {
- type: 'right',
- text: '右侧弹出',
- },
- ],
- },
- ],
- },
-
- clickHandle({ detail: placement }) {
- this.setData({
- [`${placement}`]: true,
- });
- },
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
-
- onVisibleChange({ detail }) {
- const { visible } = detail;
- this.setData({
- top: visible,
- bottom: visible,
- center: visible,
- left: visible,
- right: visible,
- });
- },
-
- onClose() {
- this.setData({
- visible: false,
- });
- },
-});
diff --git a/qq/example/subpages/popup/popup.wxml b/qq/example/subpages/popup/popup.wxml
deleted file mode 100644
index 130f9422d..000000000
--- a/qq/example/subpages/popup/popup.wxml
+++ /dev/null
@@ -1,21 +0,0 @@
-Popup 弹出层
-由其他控件触发,屏幕滑出或弹出一块自定义内容区域。
-
diff --git a/qq/example/subpages/progress/progress.json b/qq/example/subpages/progress/progress.json
deleted file mode 100644
index 7fa4c67fc..000000000
--- a/qq/example/subpages/progress/progress.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "navigationBarTitleText": "Progress 进度条",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {}
-}
diff --git a/qq/example/subpages/progress/progress.less b/qq/example/subpages/progress/progress.less
deleted file mode 100644
index 22c1c6f98..000000000
--- a/qq/example/subpages/progress/progress.less
+++ /dev/null
@@ -1,18 +0,0 @@
-.box {
- background-color: #fff;
- padding: 16rpx 32rpx;
- margin-bottom: 32rpx;
-
- .button-group {
- display: flex;
- justify-content: center;
- padding-bottom: 16rpx;
- .space {
- width: 32rpx;
- }
- }
-
- .t-class-label {
- color: #d504d9;
- }
-}
diff --git a/qq/example/subpages/progress/progress.ts b/qq/example/subpages/progress/progress.ts
deleted file mode 100644
index 30ee8f2e0..000000000
--- a/qq/example/subpages/progress/progress.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-Page({
- data: {
- percentage: 88,
- },
-
- clickAdd() {
- this.setData({
- percentage: this.data.percentage + 10,
- });
- },
-
- clickReduce() {
- this.setData({
- percentage: Math.max(0, this.data.percentage - 10),
- });
- },
-});
diff --git a/qq/example/subpages/progress/progress.wxml b/qq/example/subpages/progress/progress.wxml
deleted file mode 100644
index c5e686ad3..000000000
--- a/qq/example/subpages/progress/progress.wxml
+++ /dev/null
@@ -1,62 +0,0 @@
-
- Progress 进度条
- 在导航栏下方,用于给用户显示提示消息
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 进度状态发生重大错误
-
-
-
-
- 进度中止
-
-
-
-
- 进度完成
-
-
-
-
- 过度样式
-
-
-
- 减少
-
- 增加
-
-
-
- 自定义颜色
-
-
-
-
-
-
-
-
-
-
- 无数值进度条
-
-
-
-
-
diff --git a/qq/example/subpages/pull-down-refresh/pull-down-refresh.json b/qq/example/subpages/pull-down-refresh/pull-down-refresh.json
deleted file mode 100644
index 9b9bddc7f..000000000
--- a/qq/example/subpages/pull-down-refresh/pull-down-refresh.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "PullDownRefresh 下拉刷新",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/pull-down-refresh/pull-down-refresh.less b/qq/example/subpages/pull-down-refresh/pull-down-refresh.less
deleted file mode 100644
index 93f69d3cc..000000000
--- a/qq/example/subpages/pull-down-refresh/pull-down-refresh.less
+++ /dev/null
@@ -1,33 +0,0 @@
-page {
- background: #fff;
- .demo {
- padding-bottom: 0;
- }
-}
-
-.pulldown-reflesh__content {
- justify-content: space-between;
- margin: 0 24rpx;
- flex-wrap: wrap;
- padding-bottom: 32rpx;
- position: relative;
-
- .text {
- position: absolute;
- top: 152rpx;
- left: 0;
- right: 0;
- text-align: center;
- font-size: 32rpx;
- color: rgba(0, 0, 0, 0.26);
- width: 686rpx;
- }
-}
-
-.indicator-blue {
- color: #0052d9;
-}
-
-.skeleton-text {
- border-radius: 16rpx;
-}
diff --git a/qq/example/subpages/pull-down-refresh/pull-down-refresh.ts b/qq/example/subpages/pull-down-refresh/pull-down-refresh.ts
deleted file mode 100644
index 6f3dd45ca..000000000
--- a/qq/example/subpages/pull-down-refresh/pull-down-refresh.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-Page({
- pullDownRefresh0: null as WechatMiniprogram.Component.TrivialInstance | null,
- pullDownRefresh1: null as WechatMiniprogram.Component.TrivialInstance | null,
- data: {
- error: false,
- loadingProps0: {
- size: '50rpx',
- },
- loadingProps1: {
- size: '60rpx',
- },
- rowCol: [
- { width: '100%', height: '342rpx' },
- [
- { width: '332.26rpx', height: '32rpx' },
- { width: '332.26rpx', height: '32rpx', marginLeft: '21.5rpx' },
- ],
- [
- { width: '213.04rpx', height: '32rpx' },
- { width: '213.04rpx', height: '32rpx', marginLeft: '140.72rpx' },
- ],
- ],
- },
- onLoad() {
- this.pullDownRefresh0 = this.selectComponent('#pull-down-refresh-0');
- this.pullDownRefresh1 = this.selectComponent('#pull-down-refresh-1');
- },
- // 监听页面滚动事件,并调用pull-down-refresh组件的onPageScroll方法
- // 组件内根据页面滚动距离来判定页面是否到顶部,页面回到顶部后才能下拉刷新
- onPageScroll(e) {
- this.pullDownRefresh0 && this.pullDownRefresh0.onPageScroll(e);
- this.pullDownRefresh1 && this.pullDownRefresh1.onPageScroll(e);
- },
-
- onPullDownRefresh0(e) {
- // 模拟1秒刷新完成
- const { callback } = e.detail;
-
- if (callback) {
- setTimeout(() => {
- callback();
- }, 1000);
- }
- },
-
- timeoutCallback() {
- console.log('timeout');
- },
-
- onPullDownRefresh1(e) {
- // 模拟2秒刷新完成
- const { callback } = e.detail;
-
- if (callback) {
- setTimeout(() => {
- callback();
- }, 2000);
- }
- },
-
- toggleError() {
- this.setData({
- error: !this.data.error,
- });
- },
-});
diff --git a/qq/example/subpages/pull-down-refresh/pull-down-refresh.wxml b/qq/example/subpages/pull-down-refresh/pull-down-refresh.wxml
deleted file mode 100644
index 03d0a38c3..000000000
--- a/qq/example/subpages/pull-down-refresh/pull-down-refresh.wxml
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
- PullDownRefresh 下拉刷新
- 用于快速刷新页面信息,刷新可以是整页刷新也可以是页面的局部刷新。
-
-
-
-
-
- 下拉刷新大致分为顶部下拉和中间下拉
-
-
-
-
-
-
-
- 拖拽该区域演示 中间下拉刷新
-
-
diff --git a/qq/example/subpages/radio/__test__/index.test.js b/qq/example/subpages/radio/__test__/index.test.js
deleted file mode 100644
index 06af72090..000000000
--- a/qq/example/subpages/radio/__test__/index.test.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/* eslint-disable no-undef */
-import automator from 'miniprogram-automator';
-
-describe('radio', () => {
- let miniProgram;
- let page;
- const timeout = 1 * 60 * 1000;
- beforeAll(async () => {
- try {
- miniProgram = await automator.launch({
- projectPath: '_example',
- port: 9420,
- });
- await miniProgram.navigateTo('/pages/radio/radio');
- page = await miniProgram.currentPage();
- } catch (error) {
- console.error(error);
- }
- }, 10 * 60 * 1000);
-
- test(
- 'active class should update correctly',
- async () => {
- const basicDemo = await page.$('.basic-demo');
- const radio = await basicDemo.$('.basic-radio');
- const cell = await radio.$('t-cell');
- const button = await radio.$('.t-radio__button');
- let cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBe(-1);
- await cell.trigger('click');
- await page.waitFor(100);
- cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBeGreaterThan(-1);
- },
- timeout,
- );
- test('disabled prop', async () => {
- const basicDemo = await page.$('.disabled-demo');
- const radio = await basicDemo.$('.radio-disabled');
- const button = await radio.$('.t-radio__button');
- let cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBeGreaterThan(-1);
- const cell = await radio.$('t-cell');
- await cell.trigger('click');
- await page.waitFor(100);
- cls = await button.attribute('class');
- expect(cls.indexOf('t-is-active')).toBeGreaterThan(-1);
- });
- test("radio group's active class should update correctly", async () => {
- const radioGroup = await page.$('.group-demo');
- const radios = await radioGroup.$$('t-radio');
- const button0 = await radios[0].$('.t-radio__button');
- let buttonCls0 = await button0.attribute('class');
- const button1 = await radios[1].$('.t-radio__button');
- let buttonCls1 = await button1.attribute('class');
- const button2 = await radios[2].$('.t-radio__button');
- let buttonCls2 = await button2.attribute('class');
- expect(buttonCls0.indexOf('t-is-active')).toBeGreaterThan(-1);
- expect(buttonCls1.indexOf('t-is-active')).toBe(-1);
- expect(buttonCls2.indexOf('t-is-active')).toBe(-1);
- const cell1 = await radios[1].$('t-cell');
- await cell1.trigger('click');
- await page.waitFor(100);
- buttonCls0 = await button0.attribute('class');
- buttonCls1 = await button1.attribute('class');
- buttonCls2 = await button2.attribute('class');
- expect(buttonCls0.indexOf('t-is-active')).toBe(-1);
- expect(buttonCls1.indexOf('t-is-active')).toBeGreaterThan(-1);
- expect(buttonCls2.indexOf('t-is-active')).toBe(-1);
- });
- afterAll(async () => {
- await miniProgram.close();
- });
-});
diff --git a/qq/example/subpages/radio/radio.json b/qq/example/subpages/radio/radio.json
deleted file mode 100644
index 8d597125a..000000000
--- a/qq/example/subpages/radio/radio.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "radio 单选框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/radio/radio.less b/qq/example/subpages/radio/radio.less
deleted file mode 100644
index a7b9c5b3d..000000000
--- a/qq/example/subpages/radio/radio.less
+++ /dev/null
@@ -1,10 +0,0 @@
-.t-radio-padding {
- padding: 24rpx 32rpx !important;
-}
-
-.t-radio-demo {
- margin-top: 16px;
-}
-.disable-border {
- display: none;
-}
diff --git a/qq/example/subpages/radio/radio.ts b/qq/example/subpages/radio/radio.ts
deleted file mode 100644
index 7f640f56d..000000000
--- a/qq/example/subpages/radio/radio.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-Page({
- data: {
- check5: false,
- activeImage: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox-checked.png',
- inActiveImage: 'https://oteam-tdesign-1258344706.cos.ap-guangzhou.myqcloud.com/miniprogram/checkbox.png',
- options: [
- '字符串',
- // 'string22',
- // 100,
- '数字',
- // { label: 'object1', value: 'value1', disabled: true },
- { label: '对象', value: 'value2', disabled: true },
- ],
- },
- onChange(event) {
- console.log('radio', event.detail);
- },
- toggle5(e) {
- console.log('radio', e.detail);
- this.setData({
- check5: e.detail,
- });
- },
-});
diff --git a/qq/example/subpages/radio/radio.wxml b/qq/example/subpages/radio/radio.wxml
deleted file mode 100644
index 605b22377..000000000
--- a/qq/example/subpages/radio/radio.wxml
+++ /dev/null
@@ -1,99 +0,0 @@
-
- radio 单选框
- 用于在预设的一组选项中执行单项选择,并呈现选择结果。
-
-
-
-
-
- 单选单选单选单选单选单选单选单选单选单选单选单选单选单选
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 单选单选单选单选单选单选单选单选单选单选单选单选单选单选单
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/rate/api.md b/qq/example/subpages/rate/api.md
deleted file mode 100644
index 41c9feb6e..000000000
--- a/qq/example/subpages/rate/api.md
+++ /dev/null
@@ -1,20 +0,0 @@
-### Rate Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| --------- | --------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | --- |
-| allowHalf | Boolean | false | 是否允许半选 | N |
-| color | String / Array | - | 评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,两个值表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色。示例:['#ED7B2F', '#999999']。TS 类型:`string | Array` | N |
-| count | Number | 5 | 评分的数量 | N |
-| disabled | Boolean | false | 是否禁用评分 | N |
-| gap | Number | 6 | 评分图标的间距 | N |
-| showText | Boolean | false | 是否显示对应的辅助文字 | N |
-| size | String | - | 评分图标的大小,示例:`20` | N |
-| texts | Boolean / Array | false | 自定义评分等级对应的辅助文字。值为 false 或者 [] 表示不显示,值为 true 则使用组件内置的值:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1 分', '2 分', '3 分', '4 分', '5 分']。TS 类型:`boolean | Array` | N |
-| value | Number | 0 | 必需。选择评分的值 | Y |
-| variant | String | outline | 形状类型,有描边类型和填充类型两种。可选值:outline/filled | N |
-
-### Rate Events
-
-| 名称 | 参数 | 描述 |
-| ------ | ----------------- | ---------------- |
-| change | `(value: number)` | 评分数改变时触发 |
diff --git a/qq/example/subpages/rate/rate.json b/qq/example/subpages/rate/rate.json
deleted file mode 100644
index b27e5c1bd..000000000
--- a/qq/example/subpages/rate/rate.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Rate",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/rate/rate.less b/qq/example/subpages/rate/rate.less
deleted file mode 100644
index 9ab77a235..000000000
--- a/qq/example/subpages/rate/rate.less
+++ /dev/null
@@ -1,25 +0,0 @@
-.demo {
- .item {
- background-color: #fff;
- width: 100%;
- height: 96rpx;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- padding: 0 32rpx;
- border-bottom: solid 1rpx #f0f0f0;
- border-top: solid 1rpx #f0f0f0;
- margin-top: 32rpx;
- margin-bottom: 32rpx;
-
- &__title {
- width: 200rpx;
- }
-
- &__transparent {
- background-color: transparent;
- padding-left: 32rpx;
- border: 0;
- }
- }
-}
diff --git a/qq/example/subpages/rate/rate.ts b/qq/example/subpages/rate/rate.ts
deleted file mode 100644
index b0135fa12..000000000
--- a/qq/example/subpages/rate/rate.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * @Author: rileycai
- * @Date: 2022-03-04 23:00:57
- * @LastEditTime: 2022-03-10 15:15:10
- * @LastEditors: rileycai
- * @Description:
- * @FilePath: /tdesign-miniprogram/example/pages/rate/rate.ts
- */
-Page({
- data: {
- value: [1, 2, 3, 3.5, 4, 5, 3, 3, 3, 3, 3, 3, 2.5],
- texts: ['1分', '2分', '3分', '4分', '5分'],
- },
-
- onChange(e) {
- const { index } = e.currentTarget.dataset;
- const { value } = e.detail;
- this.setData({
- [`value[${index}]`]: value,
- });
- },
-});
diff --git a/qq/example/subpages/rate/rate.wxml b/qq/example/subpages/rate/rate.wxml
deleted file mode 100644
index 09b0ec068..000000000
--- a/qq/example/subpages/rate/rate.wxml
+++ /dev/null
@@ -1,79 +0,0 @@
-
- Rate 评分
- 用于对某行为/事物进行打分。
-
- 实心评分
-
- 请点击评分
-
-
-
- 空心评分
-
- 请点击评分
-
-
-
- 自定义数量评分
-
- 自定义数量
-
-
-
- 半星评分
-
- 半星评价
-
-
-
- 带描述评分
-
- 请点击评分
-
-
-
- 请点击评分
-
-
- 禁用评分
-
- 仅展示
-
-
- 设置评分颜色
-
- 空心评分
-
-
-
- 实心评分
-
-
-
-
- 评价规格
-
- 规格 20
-
-
-
- 规格 16
-
-
-
-
diff --git a/qq/example/subpages/search/api.md b/qq/example/subpages/search/api.md
deleted file mode 100644
index f2c1acbab..000000000
--- a/qq/example/subpages/search/api.md
+++ /dev/null
@@ -1,25 +0,0 @@
-### Search Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| ----------- | ------- | -------- | -------------------------------- | ---- |
-| actionText | String | '' | 自定义右侧 cancel 文字 | N |
-| center | Boolean | false | 是否居中 | N |
-| disabled | Boolean | false | 是否禁用 | N |
-| focus | Boolean | false | 是否聚焦 | N |
-| keyword | String | '' | 值 | N |
-| label | String | '' | 左侧文本 | N |
-| leftIcon | String | 'search' | 左侧图标 | N |
-| placeholder | String | '' | 占位符 | N |
-| rightIcon | String | 'close' | 右侧图标 | N |
-| shape | String | 'square' | 搜索框形状。可选值:square/round | N |
-
-### Search Events
-
-| 名称 | 参数 | 描述 |
-| ------ | --------------------- | -------------------------- |
-| blur | `({ value: string })` | 失去焦点时触发 |
-| cancel | `({})` | 点击右侧 cancel 文字时触发 |
-| change | `({ value: string })` | 值发生变化时触发 |
-| clear | `({ value: string })` | 点击清除时触发 |
-| focus | `({ value: string })` | 聚焦时触发 |
-| submit | `({ value: string })` | 提交时触发 |
diff --git a/qq/example/subpages/search/search.json b/qq/example/subpages/search/search.json
deleted file mode 100644
index f3cfc6f44..000000000
--- a/qq/example/subpages/search/search.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Search",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/search/search.less b/qq/example/subpages/search/search.less
deleted file mode 100644
index 9abf52598..000000000
--- a/qq/example/subpages/search/search.less
+++ /dev/null
@@ -1,13 +0,0 @@
-page {
- .demo-section__wrapper {
- margin: 32rpx 0;
- padding: 16rpx 32rpx;
- opacity: 1;
- background: rgba(255, 255, 255, 1);
- }
-
- .t-class-cancel {
- color: rgba(0, 82, 217, 1);
- font-weight: 400;
- }
-}
diff --git a/qq/example/subpages/search/search.ts b/qq/example/subpages/search/search.ts
deleted file mode 100644
index 3be0ca090..000000000
--- a/qq/example/subpages/search/search.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-const placeholder = '搜索预设文案';
-const actionText = '取消';
-Page({
- data: {
- first: '',
- searchBoxGroup: [
- {
- id: `${Math.random()}`,
- keyword: '',
- placeholder,
- actionText: '',
- },
- {
- id: `${Math.random()}`,
- keyword: '',
- placeholder,
- actionText: '取消',
- },
- {
- id: `${Math.random()}`,
- keyword: '关键词',
- placeholder,
- actionText: '取消',
- },
- ],
- },
-
- changeHandle({
- detail,
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.setData({
- [`searchBoxGroup[${idx}].keyword`]: detail.value,
- });
- },
-
- focusHandle({
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.data.searchBoxGroup.forEach((_, index) => {
- this.setData({
- [`searchBoxGroup[${index}].actionText`]: '',
- });
- });
-
- this.setData({
- [`searchBoxGroup[${idx}].actionText`]: actionText,
- [`searchBoxGroup[${idx}].focus`]: true,
- });
- },
-
- cancelHandle({
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.setData({
- [`searchBoxGroup[${idx}].actionText`]: '',
- });
- },
-
- clearHandle({
- currentTarget: {
- dataset: { idx },
- },
- }) {
- this.setData({
- [`searchBoxGroup[${idx}].keyword`]: '',
- });
- },
-});
diff --git a/qq/example/subpages/search/search.wxml b/qq/example/subpages/search/search.wxml
deleted file mode 100644
index b50099c7f..000000000
--- a/qq/example/subpages/search/search.wxml
+++ /dev/null
@@ -1,29 +0,0 @@
-
- Search 搜索
- 用于用户输入搜索信息,并进行页面内容搜索。
-
- 基础搜索框
-
-
-
-
-
-
- {{item.title}}
-
-
-
-
-
-
diff --git a/qq/example/subpages/segmented-control/segmented-control.json b/qq/example/subpages/segmented-control/segmented-control.json
deleted file mode 100644
index 373529d22..000000000
--- a/qq/example/subpages/segmented-control/segmented-control.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "SegmentedControl 分段器"
-}
diff --git a/qq/example/subpages/segmented-control/segmented-control.less b/qq/example/subpages/segmented-control/segmented-control.less
deleted file mode 100644
index 156b94b7d..000000000
--- a/qq/example/subpages/segmented-control/segmented-control.less
+++ /dev/null
@@ -1,9 +0,0 @@
-.segmented-control-wrapper {
- padding: 4px;
-}
-
-.segmented-control-content {
- padding-top: 8px;
- font-size: 12px;
- text-align: center;
-}
diff --git a/qq/example/subpages/segmented-control/segmented-control.ts b/qq/example/subpages/segmented-control/segmented-control.ts
deleted file mode 100644
index 0568aba8b..000000000
--- a/qq/example/subpages/segmented-control/segmented-control.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-Page({
- data: {
- list1: [{ text: '项目一' }, { text: '项目二' }],
- list2: [
- { text: '项目A', value: 'item_1' },
- { text: '项目B', value: 'item_2' },
- ],
- currentValue: -1,
- currentValue2: '',
- },
- onChange(event) {
- console.log(`点击: ${event.detail}`);
- this.setData({ currentValue: event.detail });
- },
- onChange2(event) {
- console.log(`点击: ${event.detail}`);
- this.setData({ currentValue2: event.detail });
- },
-});
diff --git a/qq/example/subpages/segmented-control/segmented-control.wxml b/qq/example/subpages/segmented-control/segmented-control.wxml
deleted file mode 100644
index a98cc2186..000000000
--- a/qq/example/subpages/segmented-control/segmented-control.wxml
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选项一的内容
- 选项二的内容
-
-
-
-
-
-
-
-
-
-
- 选项A的内容
- 选项B的内容
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/skeleton/skeleton.json b/qq/example/subpages/skeleton/skeleton.json
deleted file mode 100644
index f59178634..000000000
--- a/qq/example/subpages/skeleton/skeleton.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Skeleton 骨架屏",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/skeleton/skeleton.less b/qq/example/subpages/skeleton/skeleton.less
deleted file mode 100644
index 49adc28e4..000000000
--- a/qq/example/subpages/skeleton/skeleton.less
+++ /dev/null
@@ -1,33 +0,0 @@
-page {
- background-color: #fff;
-
- .skeleton-basic {
- margin: 32rpx;
- width: 686rpx;
- }
-
- .basic-text {
- border-radius: 4rpx;
- }
-
- .skeleton-avatar {
- margin: 32rpx;
-
- .skeleton-avatar-size {
- height: 96rpx;
- width: 96rpx;
- border-radius: 100%;
- margin-right: 24rpx;
- }
- }
-
- .skeleton-text {
- border-radius: 16rpx;
- }
-
- .container-flex {
- display: flex;
- justify-content: space-between;
- margin: 32rpx;
- }
-}
diff --git a/qq/example/subpages/skeleton/skeleton.ts b/qq/example/subpages/skeleton/skeleton.ts
deleted file mode 100644
index cb3ce3e87..000000000
--- a/qq/example/subpages/skeleton/skeleton.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-Page({
- data: {
- rowCol: [
- { width: '686rpx', height: '32rpx' },
- 2,
- 3,
- [
- { width: '38rpx', height: '32rpx', marginRight: '20rpx', marginLeft: '20rpx' },
- { width: '38rpx', height: '32rpx' },
- ],
- { width: '380rpx' },
- ],
- rowCol1: [{ width: '686rpx', height: '32rpx' }, 1, 1, { width: '380rpx', height: '32rpx' }],
- rowCol2: [
- { width: '566rpx', height: '32rpx' },
- { width: '100%', height: '32rpx' },
- { width: '100%', height: '32rpx' },
- { width: '314rpx', height: '32rpx' },
- ],
- rowCol3: [
- { width: '332rpx', height: '342rpx' },
- { width: '332rpx', height: '32rpx' },
- { width: '214rpx', height: '32rpx' },
- [
- { width: '186rpx', height: '32rpx' },
- { width: '64rpx', height: '32rpx', marginLeft: '82rpx' },
- ],
- ],
- },
-});
diff --git a/qq/example/subpages/skeleton/skeleton.wxml b/qq/example/subpages/skeleton/skeleton.wxml
deleted file mode 100644
index 4a2d1cfd1..000000000
--- a/qq/example/subpages/skeleton/skeleton.wxml
+++ /dev/null
@@ -1,42 +0,0 @@
-
- Skeleton 骨架屏
- 用于等待加载内容所展示的占位图形组合,有动态效果加载效果,减少用户等待焦虑。
-
- 基础
-
- 头像组合
-
- 图片组合
-
-
-
-
-
-
- 渐变加载动画
-
- 闪烁加载动画
-
-
-
diff --git a/qq/example/subpages/slider/slider.json b/qq/example/subpages/slider/slider.json
deleted file mode 100644
index dbe5ae1a9..000000000
--- a/qq/example/subpages/slider/slider.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Slider 滑块",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/slider/slider.less b/qq/example/subpages/slider/slider.less
deleted file mode 100644
index 78a99595b..000000000
--- a/qq/example/subpages/slider/slider.less
+++ /dev/null
@@ -1,71 +0,0 @@
-page {
- background: #fff;
- padding-bottom: 100rpx;
-}
-
-.t-slider {
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- padding-top: 48rpx;
- font-size: 40rpx;
- font-weight: 500;
- line-height: 56rpx;
- }
-
- &-desc {
- color: rgba(0, 0, 0, 0.4);
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- }
-}
-
-.t-slider-wrapper {
- margin-top: 40rpx;
- margin-bottom: 8rpx;
-
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- color: rgba(0, 0, 0, 0.9);
- font-size: 32rpx;
- font-weight: 500;
- line-height: 48rpx;
- margin-bottom: 16rpx;
- margin-top: 48rpx;
- }
-
- &-desc {
- margin: 32rpx;
- color: rgba(0, 0, 0, 0.4);
- font-size: 24rpx;
- line-height: 36rpx;
- white-space: pre-line;
- }
-
- .space-container {
- margin-bottom: 48rpx;
- }
-}
-
-.label {
- display: flex;
- align-items: center;
- width: 718rpx;
- padding-left: 32rpx;
-}
-
-.label-class {
- flex-grow: 1;
-}
-
-.t-slider__mark {
- margin: 0 12rpx;
-}
diff --git a/qq/example/subpages/slider/slider.ts b/qq/example/subpages/slider/slider.ts
deleted file mode 100644
index a83651c5d..000000000
--- a/qq/example/subpages/slider/slider.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-Page({
- data: {
- value: 40,
- value1: 10,
- value2: 10,
- value3: 50,
- valueStep: 24,
- valueRange: [],
- valueRange2: [],
- mask1: [0, 50, 100],
- mask2: {
- 0: '¥0',
- 50: '¥50',
- 100: '¥100',
- },
- mask3: {
- 0: '小',
- 50: '中',
- 100: '大',
- },
- /** 滑动条的颜色 */
- colors: ['#0052D9', '#E7E7E7'],
- /** 禁用状态滑动条的颜色) */
- disabledColor: ['#BBD3FB', '#E7E7E7'],
- },
- handleChange(e) {
- this.setData({
- value3: e.detail.value,
- });
- },
- handleChange2(e) {
- console.log(e);
- },
-});
diff --git a/qq/example/subpages/slider/slider.wxml b/qq/example/subpages/slider/slider.wxml
deleted file mode 100644
index dc2e41c03..000000000
--- a/qq/example/subpages/slider/slider.wxml
+++ /dev/null
@@ -1,62 +0,0 @@
-Slider 滑动选择器
-用于选择横轴上的数值、区间、档位。
-
-
-
-
- 带数值滑动选择器
-
-
-
- 起始非零滑动选择器
-
-
-
- 带刻度滑动选择器
-
-
-
- 区间滑动选择器
-
-
-
-
-
-
- 带数值滑动选择器
-
-
-
- 起始非零滑动选择器
-
-
-
- 带刻度滑动选择器
-
-
-
- 区间滑动选择器
-
-
-
-
-
-
-
-
-
-
-
-
-
- 选择器标题
-
-
-
diff --git a/qq/example/subpages/stepper/stepper.json b/qq/example/subpages/stepper/stepper.json
deleted file mode 100644
index 2cbf9a488..000000000
--- a/qq/example/subpages/stepper/stepper.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Stepper 步进器",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/stepper/stepper.less b/qq/example/subpages/stepper/stepper.less
deleted file mode 100644
index 8ef7fd97b..000000000
--- a/qq/example/subpages/stepper/stepper.less
+++ /dev/null
@@ -1,57 +0,0 @@
-.t-stepper {
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- padding-top: 48rpx;
- font-size: 40rpx;
- font-weight: 500;
- line-height: 56rpx;
- }
-
- &-desc {
- color: rgba(0, 0, 0, 0.4);
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- }
-}
-
-.t-stepper-wrapper {
- margin-top: 40rpx;
- margin-bottom: 8rpx;
-
- &-title,
- &-desc {
- margin: 0 32rpx;
- }
-
- &-title {
- color: rgba(0, 0, 0, 0.9);
- font-size: 32rpx;
- font-weight: 500;
- line-height: 48rpx;
- margin-bottom: 16rpx;
- }
-
- &-desc {
- margin: 32rpx;
- color: rgba(0, 0, 0, 0.4);
- font-size: 26rpx;
- line-height: 36rpx;
- white-space: pre-line;
- }
-}
-
-.pure-stepper-container {
- padding: 24rpx 32rpx;
- background-color: #fff;
- display: flex;
- justify-content: space-between;
-}
-
-.interval {
- height: 32rpx;
-}
diff --git a/qq/example/subpages/stepper/stepper.ts b/qq/example/subpages/stepper/stepper.ts
deleted file mode 100644
index 2705dff17..000000000
--- a/qq/example/subpages/stepper/stepper.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-Page({
- data: {
- value: 20,
- },
-
- handleChange(e) {
- const { value } = e.detail;
-
- console.log(value);
- this.setData({
- value,
- });
- },
-});
diff --git a/qq/example/subpages/stepper/stepper.wxml b/qq/example/subpages/stepper/stepper.wxml
deleted file mode 100644
index 829072e35..000000000
--- a/qq/example/subpages/stepper/stepper.wxml
+++ /dev/null
@@ -1,57 +0,0 @@
-
- Stepper 步进器
- 用于数量的增减。
-
-
-
-
-
-
- 带单位步进器
-
-
-
-
-
- 纯步进器
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/steps/steps.json b/qq/example/subpages/steps/steps.json
deleted file mode 100644
index d4790ba28..000000000
--- a/qq/example/subpages/steps/steps.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Steps"
-}
diff --git a/qq/example/subpages/steps/steps.less b/qq/example/subpages/steps/steps.less
deleted file mode 100644
index 668b754c2..000000000
--- a/qq/example/subpages/steps/steps.less
+++ /dev/null
@@ -1,38 +0,0 @@
-.demo-steps {
- padding-top: 80rpx;
-
- .t-cell-group {
- background-color: #fbfbfb;
-
- .mb-12 {
- margin-bottom: 24rpx;
- display: block;
- }
- }
-}
-
-.demo-steps.vertical {
- padding-left: 32rpx;
-
- + .demo-steps {
- padding-top: 30rpx;
- }
-}
-
-.group {
- padding-bottom: 80rpx;
- margin-top: 32rpx;
- background: #fff;
-
- & + .demo-section__desc {
- margin-top: 32rpx;
- }
-
- &.vertical {
- padding-bottom: 30rpx;
- }
-}
-
-.extra-img {
- font-size: 0;
-}
diff --git a/qq/example/subpages/steps/steps.ts b/qq/example/subpages/steps/steps.ts
deleted file mode 100644
index bafc6541a..000000000
--- a/qq/example/subpages/steps/steps.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Page({
- data: {
- current: 1,
- subStepItems: [
- {
- title: '二级步骤描述',
- },
- {
- title: '二级步骤描述',
- },
- ],
- },
-
- handleChange({ detail }) {
- console.log(detail.current);
- this.setData({
- current: detail.current,
- });
- },
-});
diff --git a/qq/example/subpages/steps/steps.wxml b/qq/example/subpages/steps/steps.wxml
deleted file mode 100644
index f1f63ddbc..000000000
--- a/qq/example/subpages/steps/steps.wxml
+++ /dev/null
@@ -1,176 +0,0 @@
-
- Steps 步骤条
- 用于任务步骤展示或任务进度展示。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 横向带图标可操作步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 横向只读步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 竖向只读步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
- 竖向双层级只读步骤条
-
-
-
-
-
-
-
-
-
-
-
-
-
- 竖向简化只读步骤条
-
-
-
-
-
-
-
-
- 自定义内容步骤条
-
-
-
- 可自定义此处内容
-
-
-
- 可自定义此处内容
-
-
- 可自定义此处内容
-
-
-
-
-
diff --git a/qq/example/subpages/sticky/sticky.json b/qq/example/subpages/sticky/sticky.json
deleted file mode 100644
index 9faaa4e79..000000000
--- a/qq/example/subpages/sticky/sticky.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Sticky",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/sticky/sticky.less b/qq/example/subpages/sticky/sticky.less
deleted file mode 100644
index f9c59b499..000000000
--- a/qq/example/subpages/sticky/sticky.less
+++ /dev/null
@@ -1,33 +0,0 @@
-.tdesign-demo-sticky-base {
- height: 3000rpx;
-
- .inner-box {
- width: 208rpx;
- height: 88rpx;
- }
-
- .box1 {
- margin-left: 32rpx;
- }
-
- .box2 {
- margin-left: 272rpx;
- background-color: rgba(48, 106, 255, 0.6);
- }
-
- .box3 {
- margin-left: 512rpx;
- background-color: rgba(48, 106, 255, 0.3);
- }
-
- .box-c {
- width: 100%;
- height: 150px;
- background-color: rgba(255, 255, 255, 1);
- }
-
- .green-button {
- background-color: rgba(0, 168, 112, 1);
- color: #fff;
- }
-}
diff --git a/qq/example/subpages/sticky/sticky.ts b/qq/example/subpages/sticky/sticky.ts
deleted file mode 100644
index fed953036..000000000
--- a/qq/example/subpages/sticky/sticky.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-Page({
- data: {
- container: null,
- },
- onLoad() {
- this.setData({
- // @ts-ignore
- container: () => wx.createSelectorQuery().select('.box-c'),
- });
- },
-});
diff --git a/qq/example/subpages/sticky/sticky.wxml b/qq/example/subpages/sticky/sticky.wxml
deleted file mode 100644
index aefb1f956..000000000
--- a/qq/example/subpages/sticky/sticky.wxml
+++ /dev/null
@@ -1,21 +0,0 @@
-
- Sticky 吸顶
- 用于常驻页面顶部的信息、操作展示。
-
-
- 基础吸顶
-
-
-
-
- 吸顶距离
-
-
-
-
-
- 指定容器
-
-
-
-
diff --git a/qq/example/subpages/swipe-cell/swipe-cell.json b/qq/example/subpages/swipe-cell/swipe-cell.json
deleted file mode 100644
index 866f0182f..000000000
--- a/qq/example/subpages/swipe-cell/swipe-cell.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "navigationBarTitleText": "SwipeCell",
- "navigationBarBackgroundColor": "#f9f9f9",
- "backgroundColorTop": "#f9f9f9",
- "backgroundColorBottom": "#f9f9f9",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/swipe-cell/swipe-cell.less b/qq/example/subpages/swipe-cell/swipe-cell.less
deleted file mode 100644
index a5fd394ab..000000000
--- a/qq/example/subpages/swipe-cell/swipe-cell.less
+++ /dev/null
@@ -1,56 +0,0 @@
-page {
- background: #f9f9f9;
-
- .t-swipe-cell-demo {
- &-desc {
- margin-bottom: 32rpx;
- }
-
- &-divider {
- height: 32rpx;
- }
-
- &-btn-wrapper {
- height: 100%;
- }
-
- &-btn {
- display: inline-flex;
- justify-content: center;
- align-items: center;
- width: 144rpx;
- height: 100%;
- text-align: center;
- color: white;
-
- &.delete-btn {
- background-color: #e34d59;
- }
-
- &.edit-btn {
- background-color: #ed7b2f;
- }
-
- &.favor-btn {
- background-color: #0052d9;
- }
- }
- }
-
- .title-image-large {
- margin-right: 8rpx;
- width: 144rpx;
- height: 144rpx;
- }
-
- // 覆盖t-cell-group组件内部样式
- .t-cell-group__title {
- line-height: 104rpx;
- font-size: 24rpx;
- }
-
- // 覆盖demo-block内部样式
- .demo-block__slot {
- margin-top: 0;
- }
-}
diff --git a/qq/example/subpages/swipe-cell/swipe-cell.ts b/qq/example/subpages/swipe-cell/swipe-cell.ts
deleted file mode 100644
index 8002c41bd..000000000
--- a/qq/example/subpages/swipe-cell/swipe-cell.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-Page({
- data: {
- right: [
- {
- text: '编辑',
- className: 't-swipe-cell-demo-btn edit-btn',
- },
- {
- text: '删除',
- className: 't-swipe-cell-demo-btn delete-btn',
- },
- ],
- },
-
- onActionClick({ detail }) {
- wx.showToast({ title: `你点击了${detail.text}`, icon: 'none' });
- },
-
- onDelete() {
- wx.showToast({ title: '你点击了删除', icon: 'none' });
- },
- onEdit() {
- wx.showToast({ title: '你点击了编辑', icon: 'none' });
- },
- onFavor() {
- wx.showToast({ title: '你点击了收藏', icon: 'none' });
- },
- onChoice() {
- wx.showToast({ title: '你点击了选择', icon: 'none' });
- },
-});
diff --git a/qq/example/subpages/swipe-cell/swipe-cell.wxml b/qq/example/subpages/swipe-cell/swipe-cell.wxml
deleted file mode 100644
index f98469282..000000000
--- a/qq/example/subpages/swipe-cell/swipe-cell.wxml
+++ /dev/null
@@ -1,44 +0,0 @@
-
- SwipeCell 滑动操作
- 用于承载列表中的更多操作,通过左右滑动来展示,按钮的宽度固定高度根据列表高度而变化。
-
-
- 往左滑动
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
- 收藏
- 编辑
- 删除
-
-
-
-
-
- 删除
-
-
-
-
- 选择
-
-
-
-
-
diff --git a/qq/example/subpages/swiper/swiper.json b/qq/example/subpages/swiper/swiper.json
deleted file mode 100644
index cb859a03a..000000000
--- a/qq/example/subpages/swiper/swiper.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "navigationBarTitleText": "Swiper",
- "navigationBarBackgroundColor": "#fff",
- "backgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/swiper/swiper.less b/qq/example/subpages/swiper/swiper.less
deleted file mode 100644
index 519b4e0e2..000000000
--- a/qq/example/subpages/swiper/swiper.less
+++ /dev/null
@@ -1,148 +0,0 @@
-page {
- background: #fff;
-}
-
-.swiper-demo {
- .demo-section {
- }
-
- .t-slider__wrapper .t-slider__main {
- margin: 0;
- }
-
- &-tag {
- line-height: 1.4;
- font-size: 30rpx;
- padding-left: 20rpx;
- border-left: 4rpx solid #c461a3;
- margin: 20rpx 0;
- }
-
- &-space {
- height: 30rpx;
- }
-
- .swiper-switch {
- margin: 22rpx 0;
-
- .t-switch__label {
- display: none;
- }
- }
-
- .swiper-wrap {
- // border-radius: 16rpx;
- // overflow: hidden;
- // transform: translateY(0);
- }
-
- .swiper-box {
- margin: 0 32rpx;
- border-radius: 16rpx;
- overflow: hidden;
- // fix: 小程序webview圆角BUG,下面的样式规避圆角在真机失效的问题
- // https://developers.weixin.qq.com/community/develop/doc/00026658428810dd8c07c062556400
- transform: translateY(0);
- }
- // 样式覆盖
- // .t-swiper-nav-dots-bar-item {
- // background: #1b131850;
- // }
-
- // .t-swiper-nav-dots-bar-item.active {
- // background: #080006;
- // }
-
- .swiper-box-option {
- overflow: visible;
- border-radius: 0;
- }
-
- .swiper-vertical {
- height: 400rpx;
- }
-
- // .swiper-box2 {
- // .item {
- // .img {
- // height: 300rpx;
- // }
- // }
- // }
-
- .swiper-box-vertical {
- .item {
- line-height: 400rpx;
-
- // .img {
- // }
- }
- }
-
- .item {
- width: 100%;
- height: 100%;
- // background-color: #0052d9;
- text-align: center;
- line-height: 300rpx;
-
- .img {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- }
-
- // &.item0 {
- // background-color: #4fb669;
- // }
-
- // &.item1 {
- // background-color: #c461a3;
- // }
-
- // &.item2 {
- // background-color: #3830a1;
- // }
-
- // &.item3 {
- // background-color: #acb47e;
- // }
-
- // &.item4 {
- // background-color: #363444;
- // }
- }
-
- .cell {
- padding: 10rpx 0;
- font-size: 28rpx;
- color: #999;
-
- &.row {
- display: flex;
- flex-direction: row;
- }
-
- .label {
- color: #999;
- margin-right: 20rpx;
- }
-
- .option {
- display: flex;
- flex-direction: row;
- justify-content: start;
- align-items: center;
- }
-
- .option-desc {
- padding: 0 30rpx;
- }
-
- .swiper-slider {
- flex: 1;
- }
- }
-}
diff --git a/qq/example/subpages/swiper/swiper.ts b/qq/example/subpages/swiper/swiper.ts
deleted file mode 100644
index e73392d7d..000000000
--- a/qq/example/subpages/swiper/swiper.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-const imageCdn = 'https://tdesign.gtimg.com/site/swiper';
-const items = [
- {
- cls: 'item0',
- image: `${imageCdn}/01.png`,
- },
- {
- cls: 'item1',
- image: `${imageCdn}/02.png`,
- },
- {
- cls: 'item2',
- image: `${imageCdn}/03.png`,
- },
- {
- cls: 'item3',
- image: `${imageCdn}/04.png`,
- },
- {
- cls: 'item4',
- image: `${imageCdn}/05.png`,
- },
-];
-
-Page({
- data: {
- current: 1,
- autoplay: true,
- duration: 500,
- interval: 5000,
- items,
- navigation1: { type: 'dots-bar' },
- navigation2: { type: 'fraction' },
- navigation3: { type: '', hasNavBtn: true },
- },
- onChange(e) {
- const {
- detail: { current, source },
- } = e;
- console.log(current, source);
- // if (source === 'touch') {
- // this.setData({
- // current,
- // });
- // }
- },
- onAutoplayChange(e) {
- this.setData({
- autoplay: e.detail.value,
- });
- },
- onIntervalChange(e) {
- this.setData({
- interval: e.detail.value,
- });
- },
- onDurationChange(e) {
- this.setData({
- duration: e.detail.value,
- });
- },
-});
diff --git a/qq/example/subpages/swiper/swiper.wxml b/qq/example/subpages/swiper/swiper.wxml
deleted file mode 100644
index 31b0d3687..000000000
--- a/qq/example/subpages/swiper/swiper.wxml
+++ /dev/null
@@ -1,150 +0,0 @@
-
- Swiper 轮播
- 用于循环轮播一组图片或内容,也可以滑动进行切换,轮播动效时间可以设置。
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
-
- {{index}}
-
-
-
-
-
-
- 自动播放
-
-
- {{autoplay?'开':'关'}}
-
-
-
- 自动播放间隔时间(单位毫秒)
-
-
- {{interval}}
-
-
-
- 动画持续时间(单位毫秒)
-
-
- {{duration}}
-
-
-
-
-
-
diff --git a/qq/example/subpages/switch/switch.json b/qq/example/subpages/switch/switch.json
deleted file mode 100644
index e72bbb8d1..000000000
--- a/qq/example/subpages/switch/switch.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Switch",
- "usingComponents": {
- "t-demo": "../../components/demo-block"
- }
-}
diff --git a/qq/example/subpages/switch/switch.less b/qq/example/subpages/switch/switch.less
deleted file mode 100644
index 66ea5578f..000000000
--- a/qq/example/subpages/switch/switch.less
+++ /dev/null
@@ -1,3 +0,0 @@
-.group {
- margin-top: 24px;
-}
diff --git a/qq/example/subpages/switch/switch.ts b/qq/example/subpages/switch/switch.ts
deleted file mode 100644
index 84897575f..000000000
--- a/qq/example/subpages/switch/switch.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-Page({
- data: {
- defaultVal: true,
- },
- handleChange(e) {
- this.setData({
- defaultVal: e.detail.value,
- });
- },
-});
diff --git a/qq/example/subpages/switch/switch.wxml b/qq/example/subpages/switch/switch.wxml
deleted file mode 100644
index 3492ae078..000000000
--- a/qq/example/subpages/switch/switch.wxml
+++ /dev/null
@@ -1,50 +0,0 @@
-
- Switch 开关
- 用于控制某个功能的开启和关闭。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/tab-bar/tab-bar.json b/qq/example/subpages/tab-bar/tab-bar.json
deleted file mode 100644
index 2de1b1484..000000000
--- a/qq/example/subpages/tab-bar/tab-bar.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "TabBar"
-}
diff --git a/qq/example/subpages/tab-bar/tab-bar.less b/qq/example/subpages/tab-bar/tab-bar.less
deleted file mode 100644
index e306e1b89..000000000
--- a/qq/example/subpages/tab-bar/tab-bar.less
+++ /dev/null
@@ -1,39 +0,0 @@
-.demo {
- font-family: Arial, Helvetica, sans-serif;
-
- .mb-12 {
- margin-bottom: 24rpx;
- display: block;
- }
-
- .mg-16 {
- margin: 32rpx;
- }
-
- .t-tab-bar {
- position: relative;
- padding-bottom: 0;
- }
-
- .t-badge--basic:not(.t-badge--dot) {
- padding: 0 10rpx;
- }
-
- .demo-word {
- margin-top: 364rpx;
- }
-
- .bottom-row {
- padding-bottom: env(safe-area-inset-bottom);
- }
-
- .t-tab-bar-item__spread-item {
- color: rgba(0, 0, 0, 0.6);
- }
-
- .t-tab-bar-item__content:not(.t-is-checked) {
- .t-tab-bar-item__text {
- color: rgba(0, 0, 0, 0.6) !important;
- }
- }
-}
diff --git a/qq/example/subpages/tab-bar/tab-bar.ts b/qq/example/subpages/tab-bar/tab-bar.ts
deleted file mode 100644
index 158706377..000000000
--- a/qq/example/subpages/tab-bar/tab-bar.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-/* eslint-disable */
-
-const list_1 = [
- {
- value: 'label_1',
- label: '标签栏一',
- icon: 'app',
- },
- {
- value: 'label_2',
- label: '标签栏二',
- icon: 'app',
- },
-];
-const list_2 = [
- ...list_1,
- {
- value: 'label_3',
- label: '标签栏三',
- icon: 'app',
- },
-];
-const list_3 = [
- ...list_2,
- {
- value: 'label_4',
- label: '标签栏四',
- icon: 'app',
- },
-];
-
-const list_11 = [
- {
- value: 'label_1',
- label: '文字',
- icon: 'app',
- },
- {
- value: 'label_2',
- label: '文字',
- icon: 'app',
- },
-];
-const list_21 = [
- ...list_11,
- {
- value: 'label_3',
- label: '文字',
- icon: 'app',
- },
-];
-const list_31 = [
- ...list_21,
- {
- value: 'label_4',
- label: '文字',
- icon: 'app',
- },
-];
-const list_41 = [
- ...list_31,
- {
- value: 'label_5',
- label: '文字',
- icon: 'app',
- },
-];
-
-const list_5 = [
- ...list_1,
- {
- value: 'label_3',
- label: '此处展开',
- children: [
- {
- value: 'spread_3',
- label: '展开项三',
- },
- {
- value: 'spread_2',
- label: '展开项二',
- },
- {
- value: 'spread_1',
- label: '展开项一',
- },
- ],
- },
-];
-
-Page({
- data: {
- value: 'label_1',
- demoList_1: [list_1, list_2, list_3],
- demoList_2: [list_11, list_21, list_31, list_41],
- list_5,
- },
- onChange(event) {
- console.log(event.detail);
- },
-});
diff --git a/qq/example/subpages/tab-bar/tab-bar.wxml b/qq/example/subpages/tab-bar/tab-bar.wxml
deleted file mode 100644
index 79002d346..000000000
--- a/qq/example/subpages/tab-bar/tab-bar.wxml
+++ /dev/null
@@ -1,86 +0,0 @@
-
- TabBar 标签栏
- 用于在不同功能模块之间进行快速切换,位于页面底部。
-
-
-
- {{item.label}}
-
-
-
-
-
-
- {{item.label}}
-
-
-
- 文字
- 文字
- 文字
- 文字
-
-
-
-
-
-
-
-
-
-
-
- {{item.label}}
-
-
-
-
-
diff --git a/qq/example/subpages/tabs/tabs.json b/qq/example/subpages/tabs/tabs.json
deleted file mode 100644
index dc4fc5ad7..000000000
--- a/qq/example/subpages/tabs/tabs.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Tabs",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/tabs/tabs.less b/qq/example/subpages/tabs/tabs.less
deleted file mode 100644
index 9b23b86e9..000000000
--- a/qq/example/subpages/tabs/tabs.less
+++ /dev/null
@@ -1,22 +0,0 @@
-.custom-tabs-vertical {
- .tab-content {
- margin-top: 250rpx;
- color: rgba(0, 0, 0, .26);
- text-align: center;
- justify-content: center;
- }
-}
-
-.custom-tabs {
- t-tab-panel {
- text-align: center;
- justify-content: center;
- height: 172rpx;
- line-height: 172rpx;
- color: rgba(0, 0, 0, .26);
- }
-}
-
-.active-item {
- font-size: 32rpx;
-}
diff --git a/qq/example/subpages/tabs/tabs.ts b/qq/example/subpages/tabs/tabs.ts
deleted file mode 100644
index 264de8db3..000000000
--- a/qq/example/subpages/tabs/tabs.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-Page({
- data: {
- animation: { duration: 2 },
- },
-
- onTabsChange(event: any) {
- console.log(event.detail);
- },
-});
diff --git a/qq/example/subpages/tabs/tabs.wxml b/qq/example/subpages/tabs/tabs.wxml
deleted file mode 100644
index 4f5669326..000000000
--- a/qq/example/subpages/tabs/tabs.wxml
+++ /dev/null
@@ -1,113 +0,0 @@
-
- Tabs 选项卡
- 用于内容分类后的展示切换。
-
-
- 标签一内容
- 标签二内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
- 标签五内容
- 标签六内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 禁用状态
-
-
-
-
-
- 标签一内容区
-
-
- 标签二内容区
-
-
- 标签三内容区
-
-
- 标签四内容区
-
-
- 标签五内容区
-
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
-
- 标签一内容
- 标签二内容
- 标签三内容
- 标签四内容
-
-
-
diff --git a/qq/example/subpages/tag/tag.json b/qq/example/subpages/tag/tag.json
deleted file mode 100644
index e8f159825..000000000
--- a/qq/example/subpages/tag/tag.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "navigationBarTitleText": "Tag"
-}
diff --git a/qq/example/subpages/tag/tag.less b/qq/example/subpages/tag/tag.less
deleted file mode 100644
index d7548a348..000000000
--- a/qq/example/subpages/tag/tag.less
+++ /dev/null
@@ -1,31 +0,0 @@
-.group {
- min-height: 56px;
- margin: 16px 0;
- padding: 0 16px;
- background-color: #fff;
- display: flex;
- align-items: center;
-
- &.d-flex {
- display: flex;
- align-items: flex-start;
- }
-
- .left {
- width: 172px;
- }
-
- > view {
- display: flex;
- flex-direction: column;
- padding-top: 16px;
-
- .t-tag {
- margin-bottom: 17px;
- }
- }
-
- .t-tag {
- margin: 0 4px;
- }
-}
diff --git a/qq/example/subpages/tag/tag.ts b/qq/example/subpages/tag/tag.ts
deleted file mode 100644
index 7648103e6..000000000
--- a/qq/example/subpages/tag/tag.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-Page({
- data: {
- show: true,
- items: [
- {
- name: '已点击',
- checked: true,
- },
- {
- name: '未点击',
- checked: false,
- },
- {
- name: '不可点击',
- checked: false,
- disabled: true,
- },
- ],
- },
- handleCheckTagChange(e) {
- console.log(e.detail.checked);
- },
- handleClose() {
- this.setData({
- show: false,
- });
- },
-});
diff --git a/qq/example/subpages/tag/tag.wxml b/qq/example/subpages/tag/tag.wxml
deleted file mode 100644
index 437597f09..000000000
--- a/qq/example/subpages/tag/tag.wxml
+++ /dev/null
@@ -1,63 +0,0 @@
-
- Tag 标签
- 用于表明主体的类目,属性或状态。
-
-
-
- 重要
- 危险
- 警告
- 成功
- 信息
-
-
-
- 镂空标签
- 浅底标签
- 标签
-
-
-
- 圆角标签
- 半圆角标签
-
-
-
- 标签
-
-
-
- 超长省略文本标签超长省略文本标签
-
-
-
-
-
- {{item.name}}
-
-
-
-
-
-
- 展示标签30
- 展示标签24
- 展示标签22
-
-
-
- 点击标签30
- 点击标签24
-
-
-
-
diff --git a/qq/example/subpages/textarea/api.md b/qq/example/subpages/textarea/api.md
deleted file mode 100644
index 6f1b4392c..000000000
--- a/qq/example/subpages/textarea/api.md
+++ /dev/null
@@ -1,26 +0,0 @@
-### Textarea Props
-
-| 名称 | 类型 | 默认值 | 说明 | 必传 |
-| -------------- | ------- | ------ | ---------------------------------------------------------------------------------------------------- | -------- | ------ | ---- | ------- | --- |
-| adjustPosition | Boolean | true | 键盘弹起时,是否自动上推页面 | N |
-| autofocus | Boolean | false | 自动聚焦,拉起键盘 | N |
-| autosize | Boolean | false | 是否自动增高,值为 autosize 时,style.height 不生效 | N |
-| confirmHold | Boolean | false | 点击键盘右下角按钮时是否保持键盘不收起点 | N |
-| confirmType | String | done | 设置键盘右下角按钮的文字,仅在 type='text'时生效。可选值:send/search/next/go/done。TS 类型:`'send' | 'search' | 'next' | 'go' | 'done'` | N |
-| disabled | Boolean | false | 是否禁用文本框 | N |
-| focus | Boolean | false | 自动聚焦 | N |
-| maxcharacter | Number | - | 用户最多可以输入的字符个数,一个中文汉字表示两个字符长度 | N |
-| maxlength | Number | - | 用户最多可以输入的字符个数 | N |
-| name | String | - | 名称 | N |
-| placeholder | String | - | 占位符 | N |
-| value | String | - | 文本框值 | N |
-
-### Textarea Events
-
-| 名称 | 参数 | 描述 |
-| ----------- | ------------------------------------------------------ | ------------------ |
-| blur | `(value: TextareaValue, context: { e: FocusEvent })` | 失去焦点时触发 |
-| change | `(value: TextareaValue, context?: { e?: InputEvent })` | 输入内容变化时触发 |
-| enter | `(value: TextareaValue)` | 点击完成时触发 |
-| focus | `(value: TextareaValue, context: { e: FocusEvent })` | 获得焦点时触发 |
-| line-change | `(value: TextareaValue)` | 行高发生变化时触发 |
diff --git a/qq/example/subpages/textarea/textarea.json b/qq/example/subpages/textarea/textarea.json
deleted file mode 100644
index 60f92d530..000000000
--- a/qq/example/subpages/textarea/textarea.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Textarea 多行输入框",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/textarea/textarea.less b/qq/example/subpages/textarea/textarea.less
deleted file mode 100644
index 0f187e62b..000000000
--- a/qq/example/subpages/textarea/textarea.less
+++ /dev/null
@@ -1,12 +0,0 @@
-.textarea-example {
- padding-bottom: constant(safe-area-inset-bottom); /* 兼容 iOS < 11.2 */
- padding-bottom: env(safe-area-inset-bottom); /* 兼容 iOS >= 11.2 */
- .cell {
- margin-bottom: 32rpx;
- }
-
- .verify {
- font-size: 32rpx;
- color: #0052d9;
- }
-}
diff --git a/qq/example/subpages/textarea/textarea.wxml b/qq/example/subpages/textarea/textarea.wxml
deleted file mode 100644
index 0284d8f8d..000000000
--- a/qq/example/subpages/textarea/textarea.wxml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- Textarea 多行文本框
- 用于多行文本信息输入。
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/qq/example/subpages/toast/toast.json b/qq/example/subpages/toast/toast.json
deleted file mode 100644
index 50a7f9669..000000000
--- a/qq/example/subpages/toast/toast.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "navigationBarTitleText": "Toast",
- "navigationBarBackgroundColor": "#fff",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/toast/toast.less b/qq/example/subpages/toast/toast.less
deleted file mode 100644
index 3c545ffb2..000000000
--- a/qq/example/subpages/toast/toast.less
+++ /dev/null
@@ -1,57 +0,0 @@
-.toast {
- background-color: #fff;
- font-size: 32rpx;
- line-height: 48rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 48rpx 0rpx 96rpx 0rpx;
- min-height: 100vh;
-
- .title {
- font-weight: bold;
- font-size: 40rpx;
- line-height: 56rpx;
- color: rgba(0, 0, 0, 0.9);
- padding: 0 32rpx;
- }
-
- .desc {
- margin-top: 16rpx;
- font-size: 26rpx;
- line-height: 36rpx;
- color: rgba(0, 0, 0, 0.4);
- padding: 0 32rpx;
- }
-
- .sub-title {
- margin-top: 40rpx;
- font-weight: bold;
- padding: 0 32rpx;
- }
-
- .t-button {
- width: 686rpx;
- height: 96rpx;
- border-radius: 8rpx;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-top: 32rpx;
-
- &::after {
- content: '';
- position: absolute;
- top: 0;
- left: 0;
- width: 200%;
- height: 200%;
- transform: scale(0.5);
- transform-origin: 0 0;
- box-sizing: border-box;
- border: 2rpx solid #dcdcdc;
- }
- }
-
- .demo-block__oper {
- padding: 0 32rpx;
- }
-}
diff --git a/qq/example/subpages/toast/toast.ts b/qq/example/subpages/toast/toast.ts
deleted file mode 100644
index 28e294ed6..000000000
--- a/qq/example/subpages/toast/toast.ts
+++ /dev/null
@@ -1,207 +0,0 @@
-// @ts-ignore
-import Toast from 'tdesign-qq-miniprogram/toast/index';
-
-Page({
- data: {
- operList1: [
- {
- title: '基础提示',
- btns: [
- {
- type: 'pureText',
- text: '纯文本',
- },
- {
- type: 'withIconRow',
- text: '带图标-横向',
- },
- {
- type: 'withIconColumn',
- text: '带图标-竖向',
- },
- {
- type: 'pureTextMaxHeight',
- text: '纯文本最大高度',
- },
- ],
- },
- {
- title: '默认提示',
- btns: [
- {
- type: 'successRow',
- text: '成功-横向',
- },
- {
- type: 'warnRow',
- text: '警告-横向',
- },
- {
- type: 'successColumn',
- text: '成功-竖向',
- },
- {
- type: 'warnColumn',
- text: '警告-竖向',
- },
- {
- type: 'loading',
- text: '加载',
- },
- ],
- },
- ],
- operList2: [
- {
- label: '02 展示位置和展示时间',
- title: '弹窗展示位置为顶部、中部、底部三种,展示时间可自定义',
- btns: [
- {
- type: 'topShow',
- text: '顶部展示1秒',
- },
- {
- type: 'middleShow',
- text: '中间展示2秒',
- },
- {
- type: 'bottomShow',
- text: '底部展示3秒',
- },
- ],
- },
- ],
- operList3: [
- {
- title: '弹窗可现实遮罩,禁止滑动和点击',
- btns: [
- {
- type: 'disableSlideAndClick',
- text: '禁止滑动和点击',
- },
- ],
- },
- ],
- },
- handleToast(option) {
- Toast({
- context: this,
- selector: '#t-toast',
- ...option,
- });
- },
- clickHandle(e) {
- switch (e.detail) {
- case 'pureText': {
- this.handleToast({
- message: '轻提示文字内容',
- });
- break;
- }
- case 'withIconRow': {
- this.handleToast({
- message: '带图标横向',
- icon: 'check-circle',
- });
- break;
- }
- case 'withIconColumn': {
- this.handleToast({
- message: '带图标竖向',
- icon: 'star',
- direction: 'column',
- });
- break;
- }
- case 'pureTextMaxHeight': {
- this.handleToast({
- message: '最多一行展示十个汉字宽度限制最多不超过三行文字行文字行文字',
- });
- break;
- }
- case 'successRow': {
- this.handleToast({
- message: '成功文案',
- theme: 'success',
- });
- break;
- }
- case 'warnRow': {
- this.handleToast({
- message: '警告文案',
- theme: 'fail',
- });
- break;
- }
- case 'successColumn': {
- this.handleToast({
- message: '成功文案',
- theme: 'success',
- direction: 'column',
- });
- break;
- }
- case 'warnColumn': {
- this.handleToast({
- message: '警告文案',
- theme: 'fail',
- direction: 'column',
- });
- break;
- }
- case 'loading': {
- this.handleToast({
- message: '加载中...',
- theme: 'loading',
- direction: 'column',
- });
- break;
- }
- case 'topShow': {
- this.handleToast({
- message: '顶部-展示1秒',
- direction: 'column',
- placement: 'top',
- duration: 1000,
- icon: 'star',
- });
- break;
- }
- case 'middleShow': {
- this.handleToast({
- message: '中间-展示2秒',
- direction: 'column',
- duration: 2000,
- icon: 'star',
- });
- break;
- }
- case 'bottomShow': {
- this.handleToast({
- message: '底部-展示3秒',
- direction: 'column',
- placement: 'bottom',
- duration: 3000,
- icon: 'star',
- });
- break;
- }
- case 'disableSlideAndClick': {
- this.handleToast({
- message: '禁止滑动和点击',
- direction: 'column',
- placement: 'bottom',
- duration: 5000,
- preventScrollThrough: true,
- icon: 'poweroff',
- });
- break;
- }
- default: {
- this.handleToast({
- message: '未知点击事件',
- });
- }
- }
- },
-});
diff --git a/qq/example/subpages/toast/toast.wxml b/qq/example/subpages/toast/toast.wxml
deleted file mode 100644
index e6fe817cd..000000000
--- a/qq/example/subpages/toast/toast.wxml
+++ /dev/null
@@ -1,8 +0,0 @@
-
- Toast 轻提示
- 用于轻量级反馈或提示,不会打断用户操作。
-
-
-
-
-
diff --git a/qq/example/subpages/transition/api.md b/qq/example/subpages/transition/api.md
deleted file mode 100644
index 0eaec7625..000000000
--- a/qq/example/subpages/transition/api.md
+++ /dev/null
@@ -1,10 +0,0 @@
-
-### Transition Props
-名称 | 类型 | 默认值 | 说明 | 必传
--- | -- | -- | -- | --
-appear | Boolean | false | 首次出现是否展示动画 | N
-customClass | String | '' | 自定义容器类名 | N
-destoryOnClose | Boolean | false | 隐藏时是否销毁内容 | N
-duration | Number | - | 指定过渡时间 | N
-name | String | 't-transition' | 过渡类名 | N
-visible | Boolean | false | 是否显示 | N
\ No newline at end of file
diff --git a/qq/example/subpages/transition/demos/appear/index.json b/qq/example/subpages/transition/demos/appear/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/subpages/transition/demos/appear/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/subpages/transition/demos/appear/index.ts b/qq/example/subpages/transition/demos/appear/index.ts
deleted file mode 100644
index 5e423455c..000000000
--- a/qq/example/subpages/transition/demos/appear/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Component({
- options: {
- addGlobalClass: true,
- },
- data: {
- visible: false,
- },
- methods: {
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
- onClose() {
- this.setData({
- visible: false,
- });
- },
- },
-});
diff --git a/qq/example/subpages/transition/demos/appear/index.wxml b/qq/example/subpages/transition/demos/appear/index.wxml
deleted file mode 100644
index 80703a3cf..000000000
--- a/qq/example/subpages/transition/demos/appear/index.wxml
+++ /dev/null
@@ -1,6 +0,0 @@
-Toggle attach
-
-
-
-
-
diff --git a/qq/example/subpages/transition/demos/base/index.json b/qq/example/subpages/transition/demos/base/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/subpages/transition/demos/base/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/subpages/transition/demos/base/index.ts b/qq/example/subpages/transition/demos/base/index.ts
deleted file mode 100644
index 5e423455c..000000000
--- a/qq/example/subpages/transition/demos/base/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Component({
- options: {
- addGlobalClass: true,
- },
- data: {
- visible: false,
- },
- methods: {
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
- onClose() {
- this.setData({
- visible: false,
- });
- },
- },
-});
diff --git a/qq/example/subpages/transition/demos/base/index.wxml b/qq/example/subpages/transition/demos/base/index.wxml
deleted file mode 100644
index 6774e25ff..000000000
--- a/qq/example/subpages/transition/demos/base/index.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-Toggle
-
-
-
diff --git a/qq/example/subpages/transition/demos/custom/index.json b/qq/example/subpages/transition/demos/custom/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/subpages/transition/demos/custom/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/subpages/transition/demos/custom/index.less b/qq/example/subpages/transition/demos/custom/index.less
deleted file mode 100644
index 4dc98622c..000000000
--- a/qq/example/subpages/transition/demos/custom/index.less
+++ /dev/null
@@ -1,21 +0,0 @@
-.translate-enter {
- opacity: 0;
- transform: translateX(100%);
-}
-
-.translate-enter-to {
- opacity: 1;
- transform: translateX(0%);
- transition: all 1s;
-}
-
-.translate-leave {
- opacity: 1;
- transform: translateX(0%);
-}
-
-.translate-leave-to {
- opacity: 0;
- transform: translateX(100%);
- transition: all 1s;
-}
diff --git a/qq/example/subpages/transition/demos/custom/index.ts b/qq/example/subpages/transition/demos/custom/index.ts
deleted file mode 100644
index 5e423455c..000000000
--- a/qq/example/subpages/transition/demos/custom/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Component({
- options: {
- addGlobalClass: true,
- },
- data: {
- visible: false,
- },
- methods: {
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
- onClose() {
- this.setData({
- visible: false,
- });
- },
- },
-});
diff --git a/qq/example/subpages/transition/demos/custom/index.wxml b/qq/example/subpages/transition/demos/custom/index.wxml
deleted file mode 100644
index 8c3394ff0..000000000
--- a/qq/example/subpages/transition/demos/custom/index.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-Toggle
-
-
-
diff --git a/qq/example/subpages/transition/demos/destroy/index.json b/qq/example/subpages/transition/demos/destroy/index.json
deleted file mode 100644
index 467ce2945..000000000
--- a/qq/example/subpages/transition/demos/destroy/index.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "component": true
-}
diff --git a/qq/example/subpages/transition/demos/destroy/index.ts b/qq/example/subpages/transition/demos/destroy/index.ts
deleted file mode 100644
index 5e423455c..000000000
--- a/qq/example/subpages/transition/demos/destroy/index.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-Component({
- options: {
- addGlobalClass: true,
- },
- data: {
- visible: false,
- },
- methods: {
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
- onClose() {
- this.setData({
- visible: false,
- });
- },
- },
-});
diff --git a/qq/example/subpages/transition/demos/destroy/index.wxml b/qq/example/subpages/transition/demos/destroy/index.wxml
deleted file mode 100644
index c605a6abf..000000000
--- a/qq/example/subpages/transition/demos/destroy/index.wxml
+++ /dev/null
@@ -1,4 +0,0 @@
-Toggle
-
-
-
diff --git a/qq/example/subpages/transition/transition.json b/qq/example/subpages/transition/transition.json
deleted file mode 100644
index f828c66ff..000000000
--- a/qq/example/subpages/transition/transition.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "navigationBarTitleText": "Transition 过渡",
- "usingComponents": {
- "base-demo": "./demos/base",
- "custom-demo": "./demos/custom",
- "destroy-demo": "./demos/destroy",
- "appear-demo": "./demos/appear"
- }
-}
diff --git a/qq/example/subpages/transition/transition.less b/qq/example/subpages/transition/transition.less
deleted file mode 100644
index f8ddfc4e9..000000000
--- a/qq/example/subpages/transition/transition.less
+++ /dev/null
@@ -1,36 +0,0 @@
-.tdesign-demo-transition {
- padding: 16px;
-
- .demo-title {
- margin-bottom: 10px;
- }
-
- .block {
- margin-top: 10px;
- width: 100px;
- height: 100px;
- background: #0052d9;
- }
-}
-
-.translate-enter {
- opacity: 0;
- transform: translateX(40px);
-}
-
-.translate-enter-to {
- opacity: 1;
- transform: translateY(0%);
- transition: all 1s;
-}
-
-.translate-leave {
- opacity: 1;
- transform: translateY(0%);
-}
-
-.translate-leave-to {
- opacity: 0;
- transform: translateX(40px);
- transition: all 1s;
-}
diff --git a/qq/example/subpages/transition/transition.ts b/qq/example/subpages/transition/transition.ts
deleted file mode 100644
index 27578a9da..000000000
--- a/qq/example/subpages/transition/transition.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-Page({
- data: {
- visible: false,
- },
-
- onTriggerClick() {
- this.setData({
- visible: !this.data.visible,
- });
- },
-});
diff --git a/qq/example/subpages/transition/transition.wxml b/qq/example/subpages/transition/transition.wxml
deleted file mode 100644
index 905e37181..000000000
--- a/qq/example/subpages/transition/transition.wxml
+++ /dev/null
@@ -1,27 +0,0 @@
-
- 基础示例
-
-
-
-
-
-
- 自定义动画
-
-
-
-
-
-
- 首次出现动画 appear
-
-
-
-
-
-
- 隐藏不渲染
-
-
-
-
diff --git a/qq/example/subpages/upload/upload.json b/qq/example/subpages/upload/upload.json
deleted file mode 100644
index 133752aea..000000000
--- a/qq/example/subpages/upload/upload.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "navigationBarTitleText": "Upload 上传",
- "usingComponents": {
- "t-demo": "../../components/demo-block/index"
- }
-}
diff --git a/qq/example/subpages/upload/upload.less b/qq/example/subpages/upload/upload.less
deleted file mode 100644
index 422b9ef1e..000000000
--- a/qq/example/subpages/upload/upload.less
+++ /dev/null
@@ -1,38 +0,0 @@
-page {
- .demo {
- min-height: 100vh;
- overflow: hidden;
-
- &-title {
- font-size: 40rpx;
- font-weight: 700;
- line-height: 56rpx;
- margin: 48rpx 32rpx 0;
- color: rgba(0, 0, 0, 0.9);
- }
-
- &-desc {
- margin-top: 16rpx;
- font-size: 24rpx;
- line-height: 40rpx;
- }
- }
-
- .item {
- background-color: #fff;
- padding-top: 24rpx;
- box-sizing: border-box;
- padding-left: 32rpx;
-
- .upload-wrapper {
- padding-right: 32rpx;
- padding-top: 20rpx;
- padding-bottom: 24rpx;
- }
-
- &__title {
- font-size: 32rpx;
- color: rgba(0, 0, 0, 0.9);
- }
- }
-}
diff --git a/qq/example/subpages/upload/upload.ts b/qq/example/subpages/upload/upload.ts
deleted file mode 100644
index fd6c36169..000000000
--- a/qq/example/subpages/upload/upload.ts
+++ /dev/null
@@ -1,102 +0,0 @@
-Page({
- data: {
- originFiles1: [
- {
- url: 'https://tdesign.gtimg.com/site/upload1.png',
- name: 'uploaded1.png',
- type: 'image',
- },
- ],
- originFiles2: [
- {
- url: 'https://tdesign.gtimg.com/site/upload1.png',
- name: 'uploaded1.png',
- type: 'image',
- },
- {
- url: 'https://tdesign.gtimg.com/site/upload2.png',
- name: 'uploaded2.png',
- type: 'image',
- },
- {
- url: 'https://tdesign.gtimg.com/site/upload1.png',
- name: 'uploaded1.png',
- type: 'image',
- percent: -1,
- },
- ],
- // requestMethod: null,
- gridConfig: {
- column: 4,
- width: 160,
- height: 160,
- },
- config1: {
- count: 1,
- },
- },
- // onLoad() {
- // this.setData({
- // requestMethod: (files) => {
- // // 模拟处理微信返回的files结果。
- // console.log(files);
- // new Promise((resolve) => {
- // console.log('uploading');
- // resolve([
- // {
- // url: 'https://tdesign.gtimg.com/site/upload2.png',
- // name: 'uploaded2.png',
- // type: 'image',
- // percent: -1,
- // },
- // ]);
- // })
- // .then((res: any) => {
- // this.setData({
- // originFiles1: [...this.data.originFiles1, ...res],
- // });
- // console.log('success');
- // })
- // .catch(() => {
- // console.log('error');
- // });
- // },
- // });
- // },
- // 选中文件之后,计算一个随机的短文件名
- getRandFileName(filePath) {
- const extIndex = filePath.lastIndexOf('.');
- const extName = extIndex === -1 ? '' : filePath.substr(extIndex);
- return parseInt(`${Date.now()}${Math.floor(Math.random() * 900 + 100)}`, 10).toString(36) + extName;
- },
- handleSuccess(e) {
- const { files } = e.detail;
-
- this.setData({
- originFiles1: files,
- });
- },
- handleRemove(e) {
- const { index } = e.detail;
- const { originFiles1 } = this.data;
- originFiles1.splice(index, 1);
- this.setData({
- originFiles1,
- });
- },
- handleSuccess2(e) {
- const { files } = e.detail;
-
- this.setData({
- originFiles2: files,
- });
- },
- handleRemove2(e) {
- const { index } = e.detail;
- const { originFiles2 } = this.data;
- originFiles2.splice(index, 1);
- this.setData({
- originFiles2,
- });
- },
-});
diff --git a/qq/example/subpages/upload/upload.wxml b/qq/example/subpages/upload/upload.wxml
deleted file mode 100644
index ab7f021a9..000000000
--- a/qq/example/subpages/upload/upload.wxml
+++ /dev/null
@@ -1,35 +0,0 @@
-
- Upload 上传
- 用于相册读取或拉起拍照的图片上传功能。
-
-
- 上传图片
-
-
-
-
-
-
-
-
-
- 上传图片
-
-
-
-
-
-
diff --git a/qq/example/utils/gulpError.js b/qq/example/utils/gulpError.js
deleted file mode 100644
index 1f66bb5f0..000000000
--- a/qq/example/utils/gulpError.js
+++ /dev/null
@@ -1,3 +0,0 @@
-/* eslint-disable */
-const gulpError = `gulpErrorPlaceHolder`;
-export default gulpError;
diff --git a/qq/script/gulpfile.base.js b/qq/script/gulpfile.base.js
index 44bd10754..d1f0f7a30 100644
--- a/qq/script/gulpfile.base.js
+++ b/qq/script/gulpfile.base.js
@@ -17,7 +17,7 @@ const config = require('./config');
const isProduction = process.env.NODE_ENV === 'production';
-const srcExamplePath = 'qq/example';
+const srcExamplePath = 'example';
// set displayName
const setDisplayName = (tasks, moduleName) => {
@@ -58,6 +58,20 @@ function replaceCommonPath() {
return gulpIf(isNeedReplacePath, replace('../common/', './common/'));
}
+// replace usingComponents json
+function replaceComponentsPath() {
+ return gulpIf(true, replace('tdesign-miniprogram/', 'tdesign-qq-miniprogram/'));
+}
+
+const isExamplePath = (file) => {
+ return /\/_example\//.test(file.path) || /example/.test(file.path);
+};
+
+// add index in usingComponents json
+function replaceRelativeComponentsPathInExample() {
+ return gulpIf(isExamplePath, replace(/\.\/([a-zA-Z][-a-zA-Z]*)"/g, './$1/index"'));
+}
+
// generate config replace task
const generateConfigReplaceTask = (replaceConfig, options = {}) => {
return replaceTask({
@@ -72,12 +86,13 @@ const generateConfigReplaceTask = (replaceConfig, options = {}) => {
/* return gulpfile base tasks */
module.exports = (src, dist, moduleName) => {
const tsProject = gulpTs.createProject('tsconfig.json', {
- declaration: !isProduction,
+ declaration: true,
removeComments: isProduction,
});
// options
- const srcOptions = { base: src, ignore: ['**/__test__', '**/__test__/**'] };
+ const ignore = ['**/__test__', '**/__test__/**', '**/_example/**', '**/_common/**'];
+ const srcOptions = { base: src, ignore };
const watchOptions = { events: ['add', 'change'] };
const gulpErrorPath = `${srcExamplePath}/utils/gulpError.js`;
@@ -89,7 +104,7 @@ module.exports = (src, dist, moduleName) => {
json: `${src}/**/*.json`, // 匹配 json 文件
less: `${src}/**/*.less`, // 匹配 less 文件
wxss: `${src}/**/*.wxss`, // 匹配 wxss 文件
- md: `${src}/**/*.md`, // 匹配 md 文件
+ // md: `${src}/**/*.md`, // 匹配 md 文件
wxml: `${src}/**/*.wxml`,
};
// 匹配需要拷贝的文件
@@ -101,7 +116,8 @@ module.exports = (src, dist, moduleName) => {
`!${globs.json}`,
`!${globs.less}`,
`!${globs.wxss}`,
- `!${globs.md}`,
+ // `!${globs.md}`,
+ '!**/_example/**',
`!${globs.wxml}`,
];
@@ -133,7 +149,8 @@ module.exports = (src, dist, moduleName) => {
/** `gulp resetError`
* 重置gulpError
* */
- tasks.resetError = () => gulp.src(gulpErrorPath, { base: srcExamplePath, allowEmpty: true }).pipe(gulp.dest('_example/'));
+ tasks.resetError = () =>
+ gulp.src(gulpErrorPath, { base: srcExamplePath, allowEmpty: true }).pipe(gulp.dest('_example/'));
/** `gulp copy`
* 清理
@@ -175,6 +192,7 @@ module.exports = (src, dist, moduleName) => {
.src(globs.js, { ...srcOptions, since: since(tasks.js) })
.pipe(generateConfigReplaceTask(config, { stringify: true }))
.pipe(fileter())
+ .pipe(replaceComponentsPath())
.pipe(replaceCommonPath())
.pipe(renameFilePath())
.pipe(gulp.dest(dist));
@@ -196,9 +214,11 @@ module.exports = (src, dist, moduleName) => {
* */
tasks.json = () =>
gulp
- .src(globs.json, { ...srcOptions, since: since(tasks.json) })
+ .src(globs.json, { ...srcOptions, dot: true, since: since(tasks.json) })
.pipe(fileter())
.pipe(replaceCommonPath())
+ .pipe(replaceRelativeComponentsPathInExample())
+ .pipe(replaceComponentsPath())
.pipe(renameFilePath())
.pipe(gulp.dest(dist));
@@ -211,6 +231,7 @@ module.exports = (src, dist, moduleName) => {
.pipe(
plumber({
errorHandler: (err) => {
+ console.log(err);
tasks.handleError(err.message);
},
}),
@@ -220,9 +241,6 @@ module.exports = (src, dist, moduleName) => {
.pipe(gulpLess()) // 编译less
.pipe(rename({ extname: '.wxss' }))
.pipe(gulpIf(!isProduction, sourcemaps.write('.')))
- .pipe(fileter())
- .pipe(replaceCommonPath())
- .pipe(renameFilePath())
.pipe(gulp.dest(dist));
/** `gulp wxss`
@@ -250,7 +268,7 @@ module.exports = (src, dist, moduleName) => {
/** `gulp common`
* 拷贝common中样式
*/
- // tasks.common = () => gulp.src(globs.wxss, { ...srcOptions, since: since(tasks.wxss) }).pipe(gulp.dest(dist));
+ tasks.common = () => gulp.src(globs.wxss, { ...srcOptions, since: since(tasks.wxss) }).pipe(gulp.dest(dist));
// set displayName
setDisplayName(tasks, moduleName);
diff --git a/qq/script/gulpfile.example.js b/qq/script/gulpfile.example.js
index 6b2c7fd51..c0342ad28 100644
--- a/qq/script/gulpfile.example.js
+++ b/qq/script/gulpfile.example.js
@@ -1,4 +1,5 @@
const gulp = require('gulp');
+const del = require('del');
const changed = require('gulp-changed');
const rename = require('gulp-rename');
const gulpLess = require('gulp-less');
@@ -9,12 +10,35 @@ const packageJSON = require('../../package.json');
const base = require('./gulpfile.base');
/* config */
-const src = 'qq/example';
+const src = 'example';
const dist = '_example';
/* base tasks */
const { clear, build: baseBuild, watch: baseWatch, handleError, resetError } = base(src, dist, 'example');
+// src component examples
+const srcExampleInput = 'src/**/_example/**/*.*';
+const srcExampleOutput = 'example/pages';
+const copySrcExample = () => {
+ return gulp
+ .src(srcExampleInput)
+ .pipe(changed(srcExampleOutput))
+ .pipe(
+ rename((path) => {
+ const { dirname, extname } = path;
+ const [, realDir] = dirname.split('_example');
+ const reg = /^([\w-]+)/.exec(dirname);
+ const component = reg ? reg[1] : '';
+
+ path.dirname = component + (extname ? realDir : '');
+ }),
+ )
+ .pipe(gulp.dest(srcExampleOutput));
+};
+const cleanSrcExample = () => del([`${srcExampleOutput}/**`, `!${srcExampleOutput}/{home,gulp-error}/**`]);
+
+const watchSrcExample = () => gulp.watch(srcExampleInput, copySrcExample);
+
// 包装 gulp.lastRun, 引入文件 ctime 作为文件变动判断另一标准
// https://github.com/gulpjs/vinyl-fs/issues/226
const since = (task) => (file) => gulp.lastRun(task) > file.stat.ctime ? gulp.lastRun(task) : 0;
@@ -39,7 +63,7 @@ watchDist.displayName = 'syncDist:watch';
/** `gulp build`
* 构建
* */
-const build = gulp.series(baseBuild, syncDist);
+const build = gulp.series(cleanSrcExample, copySrcExample, baseBuild, syncDist);
/** `gulp task`
* 编译app.less
@@ -74,7 +98,7 @@ const watchCommonLess = () => {
/** `gulp watch`
* 监听
* */
-const watch = gulp.parallel(baseWatch, watchCommonLess, watchDist);
+const watch = gulp.parallel(baseWatch, watchSrcExample, watchCommonLess, watchDist);
// `gulp --tasks --gulpfile script/gulpfile.example.js` list tasks
module.exports = {
diff --git a/qq/site/docs/custom-style.md b/qq/site/docs/custom-style.md
new file mode 100644
index 000000000..de2f6a25d
--- /dev/null
+++ b/qq/site/docs/custom-style.md
@@ -0,0 +1,113 @@
+---
+title: 样式覆盖
+description: QQ小程序提供了多种方式可以实现样式覆盖
+spline: explain
+---
+
+基于微信小程序的设计,TDesign 提供了 4 种方式用于样式覆盖
+
+## 1 使用 Style
+
+> TDesign 全部组件均支持 `custom-style` 和 `style` 属性。可传入 CSS 字符串,将会应用于组件的根元素。
+
+### 开启 virtualHost
+
+从 `1.0.0-rc` 版本开始,在基础库版本高于 2.19.2 的情况下,TDesign 会默认开启 `virtualHost` 属性。
+
+此时 `custom-style` 和 `style` 的效果是一致的,任选其一即可:
+
+```html
+填充按钮
+
+填充按钮
+```
+
+渲染的结果如下:
+
+```html
+
-
消息提醒8
+
反馈10
+
+
+
+
+
+
+
+
+
+
diff --git a/qq/site/plugin-tdoc/component.vue b/qq/site/plugin-tdoc/component.vue
index 2e8edf78f..6259715c0 100644
--- a/qq/site/plugin-tdoc/component.vue
+++ b/qq/site/plugin-tdoc/component.vue
@@ -5,12 +5,18 @@
-
-
![]()
+
![]()
+
-
+
@@ -18,7 +24,7 @@
-
+
@@ -53,11 +59,17 @@ export default defineComponent({
},
name() {
const { path } = this.$route;
- return path.slice(path.lastIndexOf('/') + 1)
+ return path.slice(path.lastIndexOf('/') + 1);
},
liveUrl() {
- return `//tdesign.tencent.com/miniprogram-live/m2w/program/miniprogram/#!pages/${this.name}/${this.name}.html`
- }
+ return `/miniprogram-live/m2w/program/miniprogram/#!pages/${this.name}/${this.name}.html`;
+ },
+ qrcode() {
+ const { path } = this.$route;
+ const name = path.slice(path.lastIndexOf('/') + 1);
+ // new URL(): https://cn.vitejs.dev/guide/assets.html#new-url-url-import-meta-url
+ return new URL(`../public/assets/qrcode/${name}.png`, import.meta.url).href;
+ },
},
mounted() {
@@ -65,12 +77,10 @@ export default defineComponent({
const { tdDocContent, tdDocHeader, tdDocTabs } = this.$refs;
if (info.isComponent) {
- tdDocTabs.onchange = ({ detail: currentTab }) => this.tab = currentTab;
+ tdDocTabs.onchange = ({ detail: currentTab }) => (this.tab = currentTab);
tdDocHeader.componentName = info.componentName;
}
-
Prismjs.highlightAll();
-
tdDocHeader.spline = info.spline;
tdDocHeader.docInfo = { title: info.title, desc: info.description };
@@ -93,17 +103,17 @@ export default defineComponent({
text-align: center;
background-color: #fff;
border-radius: 6px 6px 0 0;
- border: 1px solid #DCDCDC;
-
+ border: 1px solid #dcdcdc;
+
&--gray {
background-color: #eee;
}
- :root[theme-mode="dark"] & img {
+ :root[theme-mode='dark'] & img {
filter: unset;
}
- div[name=DEMO] & + pre {
+ div[name='DEMO'] & + pre {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
diff --git a/qq/site/plugin-tdoc/md-to-vue.ts b/qq/site/plugin-tdoc/md-to-vue.ts
index fdeeb7ccf..21f1a2673 100644
--- a/qq/site/plugin-tdoc/md-to-vue.ts
+++ b/qq/site/plugin-tdoc/md-to-vue.ts
@@ -6,17 +6,17 @@ import matter from 'gray-matter';
// import testCoverage from '../test-coverage';
-const componentPath = path.join(__dirname, './component.vue');
+const componentPath = path.join(__dirname, './component.vue').replaceAll('\\', '/');
-const DEAULT_TABS = [
+const DEFAULT_TABS = [
{ tab: 'demo', name: '示例' },
{ tab: 'api', name: 'API' },
{ tab: 'design', name: '指南' },
];
-export default function mdToVue(options) {
+export default function mdToVue(options: any) {
const mdSegment = customRender(options);
- const { demoCodesImportsStr, demoCodesDefsStr } = options;
+ const { demoCodesImportsStr = '', demoCodesDefsStr } = options;
// let coverage = '';
// if (mdSegment.isComponent) {
@@ -49,12 +49,12 @@ function customRender({ source, file, md }: any) {
// md top data
const pageData = {
spline: '',
- toc: false,
+ toc: true,
title: '',
description: '',
isComponent: false,
tdDocHeader: true,
- tdDocTabs: DEAULT_TABS,
+ tdDocTabs: DEFAULT_TABS,
apiFlag: /#+\s*API\n/i,
docClass: '',
lastUpdated: Math.round(fs.statSync(file).mtimeMs),
@@ -62,17 +62,12 @@ function customRender({ source, file, md }: any) {
};
// md filename
- const reg = file.match(/src\/(\w+-?\w+)\/(\w+-?\w+)\.md/);
+ const reg = file.match(/src\/(\S*)(?=\/\S*.md)/);
const componentName = reg && reg[1];
// split md
let [demoMd = '', apiMd = ''] = content.split(pageData.apiFlag);
- // fix table | render error
- apiMd = apiMd.replace(/`[^`]+`/g, (str) => str.replace(/\|/g, '\\|'));
- apiMd = apiMd.replace(/\/develop\//g, '/qq/');
- demoMd = demoMd.replace(/tdesign-miniprogram/g, 'tdesign-qq-miniprogram');
-
const mdSegment = {
...pageData,
componentName,
@@ -83,10 +78,16 @@ function customRender({ source, file, md }: any) {
};
if (pageData.isComponent) {
- mdSegment.demoMd = md.render.call(md, `${pageData.toc ? '[toc]\n' : ''}${demoMd.replace(//g, '')}`).html;
- mdSegment.apiMd = md.render.call(md, `${pageData.toc ? '[toc]\n' : ''}${apiMd.replace(//g, '')}`).html;
+ mdSegment.demoMd = md.render.call(md, `${demoMd.replace(//g, '')}`).html;
+ mdSegment.apiMd = md.render.call(
+ md,
+ `${pageData.toc ? '[toc]\n' : ''}${apiMd.replace(//g, '')}`,
+ ).html;
} else {
- mdSegment.docMd = md.render.call(md, `${pageData.toc ? '[toc]\n' : ''}${content.replace(//g, '')}`).html;
+ mdSegment.docMd = md.render.call(
+ md,
+ `${pageData.toc ? '[toc]\n' : ''}${content.replace(//g, '')}`,
+ ).html;
}
// 设计指南内容 不展示 design Tab 则不解析
diff --git a/qq/site/plugin-tdoc/transforms.ts b/qq/site/plugin-tdoc/transforms.ts
index 672c4748b..965a7f604 100644
--- a/qq/site/plugin-tdoc/transforms.ts
+++ b/qq/site/plugin-tdoc/transforms.ts
@@ -1,39 +1,56 @@
+import path from 'path';
+import fs from 'fs';
import mdToVue from './md-to-vue';
-let demoImports: Record
= {};
let demoCodesImports: Record = {};
-const compLists = ['badge', 'cell', 'empty',
-'checkbox', 'date-time-picker', 'input', 'picker', 'radio', 'rate', 'search', 'stepper', 'switch', 'textarea', 'upload',
-'indexes', 'navbar', 'tab-bar', 'tabs',
-'dialog', 'popup', 'swipe-cell']
-
export default {
before({ source, file, md }: any) {
- const reg = file.match(/src\/(\w+-?\w+)\/\w+-?\w+\.md/);
+ const resouceDir = path.dirname(file);
+ const reg = file.match(/src\/(\S*)(?=\/\S*.md)/);
const name = reg && reg[1];
- demoImports = {};
demoCodesImports = {};
// 增加渲染规则
- md.renderer.rules.html_block = function (tokens, idx) {
+ md.renderer.rules.html_block = function (tokens: string, idx: number) {
const { content } = tokens[idx];
- // const hit = compLists.indexOf(name as string) > -1;
-
if (content.startsWith('
- // ${content}
- // `
+ return '';
}
return content;
};
+ // 替换成对应 demo 文件
+ source = source.replace(/{{\s+(.+)\s+}}/g, (_: string, demoDirName: string) => {
+ const demoPath = path.resolve(resouceDir, `./_example/${demoDirName}`);
+ if (!fs.existsSync(demoPath)) {
+ console.log('\x1B[36m%s\x1B[0m', `${name} 组件需要实现 _example/${demoDirName} 示例!`);
+ return '\nDEMO (🚧建设中)...
';
+ }
+ const wxml = fs.readFileSync(path.resolve(demoPath, 'index.wxml'), { encoding: 'utf-8' });
+ const js = fs.readFileSync(path.resolve(demoPath, 'index.js'), { encoding: 'utf-8' });
+ const css = fs.readFileSync(path.resolve(demoPath, 'index.wxss'), { encoding: 'utf-8' });
+ const json = fs.readFileSync(path.resolve(demoPath, 'index.json'), { encoding: 'utf-8' });
+
+ return `
+
+ ${encodeURIComponent(wxml)}
+
+ ${encodeURIComponent(js)}
+
+ ${encodeURIComponent(css)}
+
+ ${encodeURIComponent(json)}
+`;
+ });
+
return source;
},
- render({ source, file, md }: { source: string, file: string, md: any }) {
- const demoCodesDefsStr = Object.keys(demoCodesImports).map((key) => demoCodesImports[key]).join(';\n');
+ render({ source, file, md }: { source: string; file: string; md: any }) {
+ const demoCodesDefsStr = Object.keys(demoCodesImports)
+ .map((key) => demoCodesImports[key])
+ .join(';\n');
const demoCodesInstallStr = Object.keys(demoCodesImports).join(',');
const sfc = mdToVue({
diff --git a/qq/site/public/assets/qrcode/action-sheet.png b/qq/site/public/assets/qrcode/action-sheet.png
new file mode 100644
index 000000000..692ef5d0c
Binary files /dev/null and b/qq/site/public/assets/qrcode/action-sheet.png differ
diff --git a/qq/site/public/assets/qrcode/avatar.png b/qq/site/public/assets/qrcode/avatar.png
new file mode 100644
index 000000000..c3bea0cda
Binary files /dev/null and b/qq/site/public/assets/qrcode/avatar.png differ
diff --git a/qq/site/public/assets/qrcode/back-top.png b/qq/site/public/assets/qrcode/back-top.png
new file mode 100644
index 000000000..9a5e75da5
Binary files /dev/null and b/qq/site/public/assets/qrcode/back-top.png differ
diff --git a/qq/site/public/assets/qrcode/badge.png b/qq/site/public/assets/qrcode/badge.png
new file mode 100644
index 000000000..90628175a
Binary files /dev/null and b/qq/site/public/assets/qrcode/badge.png differ
diff --git a/qq/site/public/assets/qrcode/button.png b/qq/site/public/assets/qrcode/button.png
new file mode 100644
index 000000000..8e040158e
Binary files /dev/null and b/qq/site/public/assets/qrcode/button.png differ
diff --git a/qq/site/public/assets/qrcode/calendar.png b/qq/site/public/assets/qrcode/calendar.png
new file mode 100644
index 000000000..af0090598
Binary files /dev/null and b/qq/site/public/assets/qrcode/calendar.png differ
diff --git a/qq/site/public/assets/qrcode/cascader.png b/qq/site/public/assets/qrcode/cascader.png
new file mode 100644
index 000000000..5aafda095
Binary files /dev/null and b/qq/site/public/assets/qrcode/cascader.png differ
diff --git a/qq/site/public/assets/qrcode/cell-group.png b/qq/site/public/assets/qrcode/cell-group.png
new file mode 100644
index 000000000..b8b1bc1f1
Binary files /dev/null and b/qq/site/public/assets/qrcode/cell-group.png differ
diff --git a/qq/site/public/assets/qrcode/cell.png b/qq/site/public/assets/qrcode/cell.png
new file mode 100644
index 000000000..61926bfc3
Binary files /dev/null and b/qq/site/public/assets/qrcode/cell.png differ
diff --git a/qq/site/public/assets/qrcode/checkbox.png b/qq/site/public/assets/qrcode/checkbox.png
new file mode 100644
index 000000000..bc7e155a3
Binary files /dev/null and b/qq/site/public/assets/qrcode/checkbox.png differ
diff --git a/qq/site/public/assets/qrcode/col.png b/qq/site/public/assets/qrcode/col.png
new file mode 100644
index 000000000..1d5288ca7
Binary files /dev/null and b/qq/site/public/assets/qrcode/col.png differ
diff --git a/qq/site/public/assets/qrcode/collapse.png b/qq/site/public/assets/qrcode/collapse.png
new file mode 100644
index 000000000..128cbda20
Binary files /dev/null and b/qq/site/public/assets/qrcode/collapse.png differ
diff --git a/qq/site/public/assets/qrcode/count-down.png b/qq/site/public/assets/qrcode/count-down.png
new file mode 100644
index 000000000..2fe2853c7
Binary files /dev/null and b/qq/site/public/assets/qrcode/count-down.png differ
diff --git a/qq/site/public/assets/qrcode/date-time-picker.png b/qq/site/public/assets/qrcode/date-time-picker.png
new file mode 100644
index 000000000..aa67a0bc2
Binary files /dev/null and b/qq/site/public/assets/qrcode/date-time-picker.png differ
diff --git a/qq/site/public/assets/qrcode/dialog.png b/qq/site/public/assets/qrcode/dialog.png
new file mode 100644
index 000000000..16ffb86e0
Binary files /dev/null and b/qq/site/public/assets/qrcode/dialog.png differ
diff --git a/qq/site/public/assets/qrcode/divider.png b/qq/site/public/assets/qrcode/divider.png
new file mode 100644
index 000000000..a3437dcbf
Binary files /dev/null and b/qq/site/public/assets/qrcode/divider.png differ
diff --git a/qq/site/public/assets/qrcode/drawer.png b/qq/site/public/assets/qrcode/drawer.png
new file mode 100644
index 000000000..7537b23ee
Binary files /dev/null and b/qq/site/public/assets/qrcode/drawer.png differ
diff --git a/qq/site/public/assets/qrcode/dropdown-menu.png b/qq/site/public/assets/qrcode/dropdown-menu.png
new file mode 100644
index 000000000..e4db5c028
Binary files /dev/null and b/qq/site/public/assets/qrcode/dropdown-menu.png differ
diff --git a/qq/site/public/assets/qrcode/empty.png b/qq/site/public/assets/qrcode/empty.png
new file mode 100644
index 000000000..6e66c4a56
Binary files /dev/null and b/qq/site/public/assets/qrcode/empty.png differ
diff --git a/qq/site/public/assets/qrcode/fab.png b/qq/site/public/assets/qrcode/fab.png
new file mode 100644
index 000000000..d1470ecf0
Binary files /dev/null and b/qq/site/public/assets/qrcode/fab.png differ
diff --git a/qq/site/public/assets/qrcode/footer.png b/qq/site/public/assets/qrcode/footer.png
new file mode 100644
index 000000000..ec1e9ded8
Binary files /dev/null and b/qq/site/public/assets/qrcode/footer.png differ
diff --git a/qq/site/public/assets/qrcode/grid.png b/qq/site/public/assets/qrcode/grid.png
new file mode 100644
index 000000000..e8937c3ba
Binary files /dev/null and b/qq/site/public/assets/qrcode/grid.png differ
diff --git a/qq/site/public/assets/qrcode/icon.png b/qq/site/public/assets/qrcode/icon.png
new file mode 100644
index 000000000..c4849ca80
Binary files /dev/null and b/qq/site/public/assets/qrcode/icon.png differ
diff --git a/qq/site/public/assets/qrcode/image-viewer.png b/qq/site/public/assets/qrcode/image-viewer.png
new file mode 100644
index 000000000..b0a6068e2
Binary files /dev/null and b/qq/site/public/assets/qrcode/image-viewer.png differ
diff --git a/qq/site/public/assets/qrcode/image.png b/qq/site/public/assets/qrcode/image.png
new file mode 100644
index 000000000..d1070caec
Binary files /dev/null and b/qq/site/public/assets/qrcode/image.png differ
diff --git a/qq/site/public/assets/qrcode/index.png b/qq/site/public/assets/qrcode/index.png
new file mode 100644
index 000000000..d1e2cb878
Binary files /dev/null and b/qq/site/public/assets/qrcode/index.png differ
diff --git a/qq/site/public/assets/qrcode/indexes.png b/qq/site/public/assets/qrcode/indexes.png
new file mode 100644
index 000000000..1edd513c8
Binary files /dev/null and b/qq/site/public/assets/qrcode/indexes.png differ
diff --git a/qq/site/public/assets/qrcode/input.png b/qq/site/public/assets/qrcode/input.png
new file mode 100644
index 000000000..214f54f5e
Binary files /dev/null and b/qq/site/public/assets/qrcode/input.png differ
diff --git a/qq/site/public/assets/qrcode/link.png b/qq/site/public/assets/qrcode/link.png
new file mode 100644
index 000000000..06d19a0a8
Binary files /dev/null and b/qq/site/public/assets/qrcode/link.png differ
diff --git a/qq/site/public/assets/qrcode/loading.png b/qq/site/public/assets/qrcode/loading.png
new file mode 100644
index 000000000..214da1cd1
Binary files /dev/null and b/qq/site/public/assets/qrcode/loading.png differ
diff --git a/qq/site/public/assets/qrcode/message.png b/qq/site/public/assets/qrcode/message.png
new file mode 100644
index 000000000..65878aec5
Binary files /dev/null and b/qq/site/public/assets/qrcode/message.png differ
diff --git a/qq/site/public/assets/qrcode/navbar.png b/qq/site/public/assets/qrcode/navbar.png
new file mode 100644
index 000000000..563f9f09d
Binary files /dev/null and b/qq/site/public/assets/qrcode/navbar.png differ
diff --git a/qq/site/public/assets/qrcode/notice-bar.png b/qq/site/public/assets/qrcode/notice-bar.png
new file mode 100644
index 000000000..59fe7974f
Binary files /dev/null and b/qq/site/public/assets/qrcode/notice-bar.png differ
diff --git a/qq/site/public/assets/qrcode/overlay.png b/qq/site/public/assets/qrcode/overlay.png
new file mode 100644
index 000000000..e4af86ee1
Binary files /dev/null and b/qq/site/public/assets/qrcode/overlay.png differ
diff --git a/qq/site/public/assets/qrcode/picker.png b/qq/site/public/assets/qrcode/picker.png
new file mode 100644
index 000000000..e7bb070df
Binary files /dev/null and b/qq/site/public/assets/qrcode/picker.png differ
diff --git a/qq/site/public/assets/qrcode/popup.png b/qq/site/public/assets/qrcode/popup.png
new file mode 100644
index 000000000..4628fe28c
Binary files /dev/null and b/qq/site/public/assets/qrcode/popup.png differ
diff --git a/qq/site/public/assets/qrcode/progress.png b/qq/site/public/assets/qrcode/progress.png
new file mode 100644
index 000000000..ea05e82ef
Binary files /dev/null and b/qq/site/public/assets/qrcode/progress.png differ
diff --git a/qq/site/public/assets/qrcode/pull-down-refresh.png b/qq/site/public/assets/qrcode/pull-down-refresh.png
new file mode 100644
index 000000000..cdf084ca5
Binary files /dev/null and b/qq/site/public/assets/qrcode/pull-down-refresh.png differ
diff --git a/qq/site/public/assets/qrcode/radio.png b/qq/site/public/assets/qrcode/radio.png
new file mode 100644
index 000000000..5dd917053
Binary files /dev/null and b/qq/site/public/assets/qrcode/radio.png differ
diff --git a/qq/site/public/assets/qrcode/rate.png b/qq/site/public/assets/qrcode/rate.png
new file mode 100644
index 000000000..70a7ffb31
Binary files /dev/null and b/qq/site/public/assets/qrcode/rate.png differ
diff --git a/qq/site/public/assets/qrcode/result-page.png b/qq/site/public/assets/qrcode/result-page.png
new file mode 100644
index 000000000..1611d0b1b
Binary files /dev/null and b/qq/site/public/assets/qrcode/result-page.png differ
diff --git a/qq/site/public/assets/qrcode/result.png b/qq/site/public/assets/qrcode/result.png
new file mode 100644
index 000000000..af8a433ab
Binary files /dev/null and b/qq/site/public/assets/qrcode/result.png differ
diff --git a/qq/site/public/assets/qrcode/search.png b/qq/site/public/assets/qrcode/search.png
new file mode 100644
index 000000000..dc26292a7
Binary files /dev/null and b/qq/site/public/assets/qrcode/search.png differ
diff --git a/qq/site/public/assets/qrcode/side-bar.png b/qq/site/public/assets/qrcode/side-bar.png
new file mode 100644
index 000000000..7b174ec81
Binary files /dev/null and b/qq/site/public/assets/qrcode/side-bar.png differ
diff --git a/qq/site/public/assets/qrcode/skeleton.png b/qq/site/public/assets/qrcode/skeleton.png
new file mode 100644
index 000000000..6492704ca
Binary files /dev/null and b/qq/site/public/assets/qrcode/skeleton.png differ
diff --git a/qq/site/public/assets/qrcode/slider.png b/qq/site/public/assets/qrcode/slider.png
new file mode 100644
index 000000000..33587ff60
Binary files /dev/null and b/qq/site/public/assets/qrcode/slider.png differ
diff --git a/qq/site/public/assets/qrcode/stepper.png b/qq/site/public/assets/qrcode/stepper.png
new file mode 100644
index 000000000..7bb423934
Binary files /dev/null and b/qq/site/public/assets/qrcode/stepper.png differ
diff --git a/qq/site/public/assets/qrcode/steps.png b/qq/site/public/assets/qrcode/steps.png
new file mode 100644
index 000000000..53689008c
Binary files /dev/null and b/qq/site/public/assets/qrcode/steps.png differ
diff --git a/qq/site/public/assets/qrcode/sticky.png b/qq/site/public/assets/qrcode/sticky.png
new file mode 100644
index 000000000..3b3854d72
Binary files /dev/null and b/qq/site/public/assets/qrcode/sticky.png differ
diff --git a/qq/site/public/assets/qrcode/swipe-cell.png b/qq/site/public/assets/qrcode/swipe-cell.png
new file mode 100644
index 000000000..d55da0655
Binary files /dev/null and b/qq/site/public/assets/qrcode/swipe-cell.png differ
diff --git a/qq/site/public/assets/qrcode/swiper.png b/qq/site/public/assets/qrcode/swiper.png
new file mode 100644
index 000000000..fa31f9449
Binary files /dev/null and b/qq/site/public/assets/qrcode/swiper.png differ
diff --git a/qq/site/public/assets/qrcode/switch.png b/qq/site/public/assets/qrcode/switch.png
new file mode 100644
index 000000000..27fe3e45d
Binary files /dev/null and b/qq/site/public/assets/qrcode/switch.png differ
diff --git a/qq/site/public/assets/qrcode/tab-bar.png b/qq/site/public/assets/qrcode/tab-bar.png
new file mode 100644
index 000000000..50d63a6cf
Binary files /dev/null and b/qq/site/public/assets/qrcode/tab-bar.png differ
diff --git a/qq/site/public/assets/qrcode/tabs.png b/qq/site/public/assets/qrcode/tabs.png
new file mode 100644
index 000000000..3768ecee6
Binary files /dev/null and b/qq/site/public/assets/qrcode/tabs.png differ
diff --git a/qq/site/public/assets/qrcode/tag.png b/qq/site/public/assets/qrcode/tag.png
new file mode 100644
index 000000000..0688b09c8
Binary files /dev/null and b/qq/site/public/assets/qrcode/tag.png differ
diff --git a/qq/site/public/assets/qrcode/textarea.png b/qq/site/public/assets/qrcode/textarea.png
new file mode 100644
index 000000000..0b3b73d94
Binary files /dev/null and b/qq/site/public/assets/qrcode/textarea.png differ
diff --git a/qq/site/public/assets/qrcode/toast.png b/qq/site/public/assets/qrcode/toast.png
new file mode 100644
index 000000000..ef51c00d9
Binary files /dev/null and b/qq/site/public/assets/qrcode/toast.png differ
diff --git a/qq/site/public/assets/qrcode/transition.png b/qq/site/public/assets/qrcode/transition.png
new file mode 100644
index 000000000..ea3b11047
Binary files /dev/null and b/qq/site/public/assets/qrcode/transition.png differ
diff --git a/qq/site/public/assets/qrcode/tree-select.png b/qq/site/public/assets/qrcode/tree-select.png
new file mode 100644
index 000000000..5ac24e724
Binary files /dev/null and b/qq/site/public/assets/qrcode/tree-select.png differ
diff --git a/qq/site/public/assets/qrcode/upload.png b/qq/site/public/assets/qrcode/upload.png
new file mode 100644
index 000000000..819532ac8
Binary files /dev/null and b/qq/site/public/assets/qrcode/upload.png differ
diff --git a/qq/site/router.ts b/qq/site/router.ts
index a9c19c9b0..2a840d67e 100644
--- a/qq/site/router.ts
+++ b/qq/site/router.ts
@@ -58,7 +58,7 @@ router.beforeEach((to, from, next) => {
// @ts-ignore
if (typeof NProgress !== 'undefined') {
// @ts-ignore
- NProgress.start();
+ window.NProgress && window.NProgress.start();
}
next();
});
diff --git a/qq/site/site.config.mjs b/qq/site/site.config.mjs
index be6779177..75f55fd61 100644
--- a/qq/site/site.config.mjs
+++ b/qq/site/site.config.mjs
@@ -16,8 +16,15 @@ export default {
name: 'develop',
meta: { docType: 'explain' },
path: '/qq-miniprogram/develop',
- component: () => import('~/CONTRIBUTING.md'),
+ component: () => import('../CONTRIBUTING.md'),
},
+ // {
+ // title: '谁在用',
+ // name: 'used',
+ // meta: { docType: 'explain' },
+ // path: '/qq-miniprogram/used',
+ // component: () => import('@pages/used.vue'),
+ // },
{
title: '更新日志',
name: 'changelog',
@@ -25,6 +32,20 @@ export default {
path: '/qq-miniprogram/changelog',
component: () => import('~/CHANGELOG.md'),
},
+ {
+ title: '样式覆盖',
+ name: 'custom-style',
+ meta: { docType: 'explain' },
+ path: '/qq-miniprogram/custom-style',
+ component: () => import('@docs/custom-style.md'),
+ },
+ {
+ title: '自定义主题',
+ name: 'custom-theme',
+ meta: { docType: 'explain' },
+ path: '/qq-miniprogram/custom-theme',
+ component: () => import('@docs/custom-theme.md'),
+ },
{
title: '组件概览',
name: 'overview',
@@ -43,7 +64,7 @@ export default {
name: 'button',
meta: { docType: 'base' },
path: '/qq-miniprogram/components/button',
- component: () => import('@/button/qq/README.md'),
+ component: () => import('@/button/README.md'),
},
{
title: 'Divider 分割线',
@@ -52,6 +73,13 @@ export default {
path: '/qq-miniprogram/components/divider',
component: () => import('@/divider/README.md'),
},
+ {
+ title: 'Fab 悬浮按钮',
+ name: 'fab',
+ meta: { docType: 'form' },
+ path: '/qq-miniprogram/components/fab',
+ component: () => import('@/fab/README.md'),
+ },
{
title: 'Icon 图标',
name: 'icon',
@@ -59,26 +87,40 @@ export default {
path: '/qq-miniprogram/components/icon',
component: () => import('@/icon/README.md'),
},
+ {
+ title: 'Layout 布局',
+ name: 'layout',
+ meta: { docType: 'base' },
+ path: '/qq-miniprogram/components/col',
+ component: () => import('@/col/README.md'),
+ },
+ {
+ title: 'Link 链接',
+ name: 'link',
+ meta: { docType: 'base' },
+ path: '/qq-miniprogram/components/link',
+ component: () => import('@/link/README.md'),
+ },
],
},
{
title: '导航',
type: 'component',
children: [
- // {
- // title: 'Drawer 抽屉',
- // name: 'drawer',
- // meta: { docType: 'navigation' },
- // path: '/qq-miniprogram/components/drawer',
- // component: () => import('@/drawer/README.md'),
- // },
- // {
- // title: 'ImageViewer 图片预览',
- // name: 'image-viewer',
- // meta: { docType: 'navigation' },
- // path: '/qq-miniprogram/components/image-viewer',
- // component: () => import('@/image-viewer/README.md'),
- // },
+ {
+ title: 'BackTop 返回顶部',
+ name: 'back-top',
+ meta: { docType: 'navigation' },
+ path: '/qq-miniprogram/components/back-top',
+ component: () => import('@/back-top/README.md'),
+ },
+ {
+ title: 'Drawer 抽屉',
+ name: 'drawer',
+ meta: { docType: 'navigation' },
+ path: '/qq-miniprogram/components/drawer',
+ component: () => import('@/drawer/README.md'),
+ },
{
title: 'Indexes 索引',
name: 'indexes',
@@ -87,19 +129,19 @@ export default {
component: () => import('@/indexes/README.md'),
},
{
- title: 'Navbar 导航条',
+ title: 'Navbar 导航栏',
name: 'navbar',
meta: { docType: 'navigation' },
path: '/qq-miniprogram/components/navbar',
component: () => import('@/navbar/README.md'),
},
- // {
- // title: 'SegmentedControl 分段器',
- // name: 'segmented-control',
- // meta: { docType: 'navigation' },
- // path: '/qq-miniprogram/components/segmented-control',
- // component: () => import('@/segmented-control/README.md'),
- // },
+ {
+ title: 'SideBar 侧边栏',
+ name: 'sidebar',
+ meta: { docType: 'navigation' },
+ path: '/qq-miniprogram/components/side-bar',
+ component: () => import('@/side-bar/README.md'),
+ },
{
title: 'Steps 步骤条',
name: 'steps',
@@ -128,7 +170,21 @@ export default {
type: 'component',
children: [
{
- title: 'CheckBox 复选框',
+ title: 'Calendar 日历',
+ name: 'calendar',
+ meta: { docType: 'form' },
+ path: '/qq-miniprogram/components/calendar',
+ component: () => import('@/calendar/README.md'),
+ },
+ {
+ title: 'Cascader 级联选择器',
+ name: 'cascader',
+ meta: { docType: 'form' },
+ path: '/qq-miniprogram/components/cascader',
+ component: () => import('@/cascader/README.md'),
+ },
+ {
+ title: 'CheckBox 多选框',
name: 'checkbox',
meta: { docType: 'form' },
path: '/qq-miniprogram/components/checkbox',
@@ -141,13 +197,6 @@ export default {
path: '/qq-miniprogram/components/date-time-picker',
component: () => import('@/date-time-picker/README.md'),
},
- // {
- // title: 'Fab 悬浮按钮',
- // name: 'fab',
- // meta: { docType: 'form' },
- // path: '/qq-miniprogram/components/fab',
- // component: () => import('@/fab/README.md'),
- // },
{
title: 'Input 输入框',
name: 'input',
@@ -212,7 +261,14 @@ export default {
component: () => import('@/textarea/README.md'),
},
{
- title: 'UpLoad 上传',
+ title: 'TreeSelect 树形选择',
+ name: 'treeSelect',
+ meta: { docType: 'form' },
+ path: '/qq-miniprogram/components/tree-select',
+ component: () => import('@/tree-select/README.md'),
+ },
+ {
+ title: 'Upload 上传',
name: 'upload',
meta: { docType: 'form' },
path: '/qq-miniprogram/components/upload',
@@ -238,7 +294,6 @@ export default {
path: '/qq-miniprogram/components/badge',
component: () => import('@/badge/README.md'),
},
-
{
title: 'Cell 单元格',
name: 'cell',
@@ -246,6 +301,13 @@ export default {
path: '/qq-miniprogram/components/cell',
component: () => import('@/cell/README.md'),
},
+ {
+ title: 'Collapse 折叠面板',
+ name: 'collapse',
+ meta: { docType: 'data' },
+ path: '/qq-miniprogram/components/collapse',
+ component: () => import('@/collapse/README.md'),
+ },
{
title: 'CountDown 倒计时',
name: 'countdown',
@@ -253,20 +315,6 @@ export default {
path: '/qq-miniprogram/components/count-down',
component: () => import('@/count-down/README.md'),
},
- // {
- // title: 'Collapse 折叠面板',
- // name: 'collapse',
- // meta: { docType: 'data' },
- // path: '/qq-miniprogram/components/collapse',
- // component: () => import('@/collapse/README.md'),
- // },
- // {
- // title: 'DropdownMenu 下拉菜单',
- // name: 'dropdown-menu',
- // meta: { docType: 'data' },
- // path: '/qq-miniprogram/components/dropdown-menu',
- // component: () => import('@/dropdown-menu/README.md'),
- // },
{
title: 'Empty 空状态',
name: 'empty',
@@ -281,6 +329,13 @@ export default {
path: '/qq-miniprogram/components/footer',
component: () => import('@/footer/README.md'),
},
+ {
+ title: 'Image 图片',
+ name: 'image',
+ meta: { docType: 'data' },
+ path: '/qq-miniprogram/components/image',
+ component: () => import('@/image/README.md'),
+ },
{
title: 'Grid 宫格',
name: 'grid',
@@ -289,11 +344,25 @@ export default {
component: () => import('@/grid/README.md'),
},
{
- title: 'Image 图片',
- name: 'image',
+ title: 'ImageViewer 图片预览',
+ name: 'image-viewer',
meta: { docType: 'data' },
- path: '/qq-miniprogram/components/image',
- component: () => import('@/image/README.md'),
+ path: '/qq-miniprogram/components/image-viewer',
+ component: () => import('@/image-viewer/README.md'),
+ },
+ {
+ title: 'Progress 进度条',
+ name: 'progress',
+ meta: { docType: 'message' },
+ path: '/qq-miniprogram/components/progress',
+ component: () => import('@/progress/README.md'),
+ },
+ {
+ title: 'Result 结果',
+ name: 'result',
+ meta: { docType: 'data' },
+ path: '/qq-miniprogram/components/result',
+ component: () => import('@/result/README.md'),
},
{
title: 'Skeleton 骨架屏',
@@ -303,9 +372,9 @@ export default {
component: () => import('@/skeleton/README.md'),
},
{
- title: 'Sticky 吸顶容器',
+ title: 'Sticky 吸顶',
name: 'sticky',
- meta: { docType: 'data' },
+ meta: { docType: 'navigation' },
path: '/qq-miniprogram/components/sticky',
component: () => import('@/sticky/README.md'),
},
@@ -326,30 +395,30 @@ export default {
],
},
{
- title: '消息提醒',
+ title: '反馈',
type: 'component', // 组件文档
children: [
- // {
- // title: 'ActionSheet 动作面板',
- // name: 'actionsheet',
- // meta: { docType: 'message' },
- // path: '/qq-miniprogram/components/actionsheet',
- // component: () => import('@/action-sheet/README.md'),
- // },
{
- title: 'BackTop 返回顶部',
- name: 'back-top',
- meta: { docType: 'navigation' },
- path: '/qq-miniprogram/components/back-top',
- component: () => import('@/back-top/README.md'),
+ title: 'ActionSheet 动作面板',
+ name: 'actionsheet',
+ meta: { docType: 'message' },
+ path: '/qq-miniprogram/components/action-sheet',
+ component: () => import('@/action-sheet/README.md'),
},
{
- title: 'Dialog 弹出框',
+ title: 'Dialog 对话框',
name: 'dialog',
meta: { docType: 'message' },
path: '/qq-miniprogram/components/dialog',
component: () => import('@/dialog/README.md'),
},
+ {
+ title: 'DropdownMenu 下拉菜单',
+ name: 'dropdown-menu',
+ meta: { docType: 'navigation' },
+ path: '/qq-miniprogram/components/dropdown-menu',
+ component: () => import('@/dropdown-menu/README.md'),
+ },
{
title: 'Loading 加载',
name: 'loading',
@@ -364,13 +433,20 @@ export default {
path: '/qq-miniprogram/components/message',
component: () => import('@/message/README.md'),
},
- // {
- // title: 'NoticeBar 公告栏',
- // name: 'noticebar',
- // meta: { docType: 'message' },
- // path: '/qq-miniprogram/components/noticebar',
- // component: () => import('@/noticebar/README.md'),
- // },
+ {
+ title: 'NoticeBar 公告栏',
+ name: 'noticebar',
+ meta: { docType: 'message' },
+ path: '/qq-miniprogram/components/notice-bar',
+ component: () => import('@/notice-bar/README.md'),
+ },
+ {
+ title: 'Overlay 遮罩层',
+ name: 'overlay',
+ meta: { docType: 'message' },
+ path: '/qq-miniprogram/components/overlay',
+ component: () => import('@/overlay/README.md'),
+ },
{
title: 'Popup 弹出层',
name: 'popup',
@@ -378,13 +454,6 @@ export default {
path: '/qq-miniprogram/components/popup',
component: () => import('@/popup/README.md'),
},
- // {
- // title: 'Progress 进度条',
- // name: 'progress',
- // meta: { docType: 'message' },
- // path: '/qq-miniprogram/components/progress',
- // component: () => import('@/progress/README.md'),
- // },
{
title: 'PullDownRefresh 下拉刷新',
name: 'pullDownRefresh',
diff --git a/qq/site/vite.config.ts b/qq/site/vite.config.ts
index 6f1a6a4b7..7a6c41d36 100644
--- a/qq/site/vite.config.ts
+++ b/qq/site/vite.config.ts
@@ -23,6 +23,7 @@ export default ({ mode }: any) => {
'@common': path.resolve(__dirname, '../common'),
'@components': path.resolve(__dirname, './components'),
'@docs': path.resolve(__dirname, './docs'),
+ '@pages': path.resolve(__dirname, './pages'),
},
},
server: {
diff --git a/script/coverage-badge.js b/script/coverage-badge.js
new file mode 100644
index 000000000..038026afc
--- /dev/null
+++ b/script/coverage-badge.js
@@ -0,0 +1,78 @@
+const path = require('path');
+const fs = require('fs');
+const os = require('os');
+
+const specify = process.argv[2];
+
+const data = require('../test/unit/coverage/coverage-summary.json');
+
+const ans = new Map();
+
+Object.keys(data).forEach((fPath) => {
+ const _fPath = os.platform() === 'win32' ? fPath.slice(2).replace(/\\/g, '/') : fPath;
+ if (_fPath.startsWith('/')) {
+ const [, component] = /src\/([\w-]+)\//.exec(_fPath) ?? [];
+
+ if (component) {
+ if (!fPath.includes('/_example/')) {
+ const set = data[fPath];
+ const target = ans.get(component) ?? {
+ lines: { total: 0, covered: 0, skipped: 0 },
+ functions: { total: 0, covered: 0, skipped: 0 },
+ statements: { total: 0, covered: 0, skipped: 0 },
+ branches: { total: 0, covered: 0, skipped: 0 },
+ };
+
+ Object.entries(set).forEach(([type, dataset]) => {
+ Object.entries(dataset).forEach(([category, val]) => {
+ target[type][category] = val + target[type][category];
+ });
+ });
+ ans.set(component, target);
+ }
+ }
+ }
+});
+
+ans.forEach((items, component) => {
+ let svgs = '';
+ Object.entries(items).forEach(([type, item]) => {
+ let val = item.total === 0 ? 100 : ((item.covered / item.total) * 100).toFixed(0);
+ const relatedMap = {
+ avatar: 'avatar-group',
+ button: 'button-group',
+ cell: 'cell-group',
+ checkbox: 'checkbox-group',
+ 'dropdown-menu': 'dropdown-item',
+ grid: 'grid-item',
+ picker: 'picker-item',
+ radio: 'radio-group',
+ steps: 'step-item',
+ // swiper: ['swiper-item', 'swiper-nav'],
+ 'tab-bar': 'tab-bar-item',
+ tabs: 'tab-panel',
+ tag: 'check-tag',
+ };
+
+ if (component in relatedMap) {
+ const related = ans.get(relatedMap[component]);
+ if (related) {
+ const denominator = item.total + related[type].total;
+ val = denominator === 0 ? 100 : (((item.covered + related[type].covered) / denominator) * 100).toFixed(0);
+ }
+ }
+ const message = isNaN(val) ? '0' : val;
+ const color = parseInt(val, 10) >= 80 ? 'blue' : 'red';
+
+ svgs += `
`;
+ });
+
+ if ((specify && component === specify) || !specify) {
+ const fPath = path.resolve(__dirname, `../src/${component}/README.md`);
+ let readme = fs.readFileSync(fPath, { encoding: 'utf-8' });
+
+ readme = readme.replace(/\n/g, '');
+ readme = readme.replace('## 引入', `${svgs}\n## 引入`);
+ fs.writeFileSync(fPath, readme);
+ }
+});
diff --git a/script/gulpfile.base.js b/script/gulpfile.base.js
index 3cb76b6b8..bfd3bc973 100644
--- a/script/gulpfile.base.js
+++ b/script/gulpfile.base.js
@@ -38,12 +38,13 @@ const generateConfigReplaceTask = (replaceConfig, options = {}) => {
/* return gulpfile base tasks */
module.exports = (src, dist, moduleName) => {
const tsProject = gulpTs.createProject('tsconfig.json', {
- declaration: !isProduction,
+ declaration: true,
removeComments: isProduction,
});
// options
- const srcOptions = { base: src, ignore: ['**/__test__', '**/__test__/**'] };
+ const ignore = ['**/__test__', '**/__test__/**', '**/_example/**', '**/_common/**'];
+ const srcOptions = { base: src, ignore };
const watchOptions = { events: ['add', 'change'] };
const gulpErrorPath = 'example/utils/gulpError.js';
// 文件匹配路径
@@ -51,7 +52,7 @@ module.exports = (src, dist, moduleName) => {
ts: `${src}/**/*.ts`, // 匹配 ts 文件
js: `${src}/**/*.js`, // 匹配 js 文件
wxs: `${src}/**/*.wxs`, // 匹配 wxs 文件
- json: `${src}/**/*.json`, // 匹配 json 文件
+ json: [`${src}/**/*.json`], // 匹配 json 文件
less: `${src}/**/*.less`, // 匹配 less 文件
wxss: `${src}/**/*.wxss`, // 匹配 wxss 文件
md: `${src}/**/*.md`, // 匹配 md 文件
@@ -65,6 +66,7 @@ module.exports = (src, dist, moduleName) => {
`!${globs.json}`,
`!${globs.less}`,
`!${globs.wxss}`,
+ '!**/_example/**',
];
// 包装 gulp.lastRun, 引入文件 ctime 作为文件变动判断另一标准
@@ -143,7 +145,7 @@ module.exports = (src, dist, moduleName) => {
/** `gulp json`
* 处理json
* */
- tasks.json = () => gulp.src(globs.json, { ...srcOptions, since: since(tasks.json) }).pipe(gulp.dest(dist));
+ tasks.json = () => gulp.src(globs.json, { ...srcOptions, dot: true, since: since(tasks.json) }).pipe(gulp.dest(dist));
/** `gulp less`
* 处理less
diff --git a/script/gulpfile.example.js b/script/gulpfile.example.js
index b5ef8788f..74edb99dc 100644
--- a/script/gulpfile.example.js
+++ b/script/gulpfile.example.js
@@ -1,4 +1,5 @@
const gulp = require('gulp');
+const del = require('del');
const changed = require('gulp-changed');
const rename = require('gulp-rename');
const gulpLess = require('gulp-less');
@@ -15,6 +16,29 @@ const dist = '_example';
/* base tasks */
const { clear, build: baseBuild, watch: baseWatch, handleError, resetError } = base(src, dist, 'example');
+// src component examples
+const srcExampleInput = 'src/**/_example/**/*.*';
+const srcExampleOutput = 'example/pages';
+const copySrcExample = () => {
+ return gulp
+ .src(srcExampleInput)
+ .pipe(changed(srcExampleOutput))
+ .pipe(
+ rename((path) => {
+ const { dirname, extname } = path;
+ const [, realDir] = dirname.split('_example');
+ const reg = /^([\w-]+)/.exec(dirname);
+ const component = reg ? reg[1] : '';
+
+ path.dirname = component + (extname ? realDir : '');
+ }),
+ )
+ .pipe(gulp.dest(srcExampleOutput));
+};
+const cleanSrcExample = () => del([`${srcExampleOutput}/**`, `!${srcExampleOutput}/{home,gulp-error}/**`]);
+
+const watchSrcExample = () => gulp.watch(srcExampleInput, copySrcExample);
+
// 包装 gulp.lastRun, 引入文件 ctime 作为文件变动判断另一标准
// https://github.com/gulpjs/vinyl-fs/issues/226
const since = (task) => (file) => gulp.lastRun(task) > file.stat.ctime ? gulp.lastRun(task) : 0;
@@ -39,7 +63,7 @@ watchDist.displayName = 'syncDist:watch';
/** `gulp build`
* 构建
* */
-const build = gulp.series(baseBuild, syncDist);
+const build = gulp.series(cleanSrcExample, copySrcExample, baseBuild, syncDist);
/** `gulp task`
* 编译app.less
@@ -74,7 +98,7 @@ const watchCommonLess = () => {
/** `gulp watch`
* 监听
* */
-const watch = gulp.parallel(baseWatch, watchCommonLess, watchDist);
+const watch = gulp.parallel(baseWatch, watchSrcExample, watchCommonLess, watchDist);
// `gulp --tasks --gulpfile script/gulpfile.example.js` list tasks
module.exports = {
diff --git a/script/gulpfile.js b/script/gulpfile.js
index 60308bdfe..4b7b6289a 100644
--- a/script/gulpfile.js
+++ b/script/gulpfile.js
@@ -1,8 +1,8 @@
const gulp = require('gulp');
+const rename = require('gulp-rename');
const dist = require('./gulpfile.dist');
const example = require('./gulpfile.example');
const wechatide = require('./gulpfile.wechatide');
-
/** `gulp build`
* 构建
* */
diff --git a/script/gulpfile.wechatide.js b/script/gulpfile.wechatide.js
index 8fde3454b..dc4776494 100644
--- a/script/gulpfile.wechatide.js
+++ b/script/gulpfile.wechatide.js
@@ -5,7 +5,9 @@ const fs = require('fs');
const config = require('./config.js');
const wechatideConfig = {
- components: [],
+ key: 'TDesign',
+ label: 'Tdesign',
+ components: {},
common: {
properties: {},
events: {},
@@ -32,35 +34,45 @@ gulp.task('wechatide:components', (cb) => {
const componentsFolder = fs.readdirSync(wechatideFolder);
const src = path.resolve(__dirname, '../src');
+ const tplConfigPath = path.resolve(__dirname, './tpl.json');
+ const tplConfigPathJsonFile = fs.readFileSync(tplConfigPath);
+ const componentJson = JSON.parse(tplConfigPathJsonFile.toString());
+
// 根据生成的组件信息转换整合成配置文件内容
componentsFolder.forEach((componentName) => {
const cmpInfoPath = `${wechatideFolder}/${componentName}`;
const cmpInfo = fs.readFileSync(cmpInfoPath);
const cmpInfoJson = JSON.parse(cmpInfo.toString());
+ const componentFileName = componentName.split('.')[0];
// 组件key值替换
- const cmpKey = componentName.split('.')[0];
- cmpInfoJson.key = `t-${cmpKey}`;
-
- let componentJsonFilePath = `${src}/${cmpKey}/${cmpKey}.json`;
- // 获取存放在父组件目录中的子组件json文件地址
- const srcFolder = fs.readdirSync(src);
- srcFolder.forEach((cmp) => {
- if (isExistFile(`${src}/${cmp}/${cmpKey}.json`)) {
- componentJsonFilePath = `${src}/${cmp}/${cmpKey}.json`;
- }
- });
+ const cmpKey = `t-${componentFileName}`;
+ const configJson = componentJson[cmpKey];
+
+ // 如果tpl.json文件没有录入的组件信息
+ if (!configJson) {
+ console.log(`组件${cmpKey}没有录入tpl.json文件,请注意查看组件是否存在`);
+ return;
+ }
+
+ // 组件的key、icon、tpl、require替换
+ cmpInfoJson.key = cmpKey;
+ cmpInfoJson.icon = configJson.icon || '';
+ cmpInfoJson.tpl = configJson.tpl || undefined;
+ cmpInfoJson.require = configJson.require || undefined;
- // 获取到组件依赖组件并录入json
- if (isExistFile(componentJsonFilePath)) {
- const componentJsonFile = fs.readFileSync(componentJsonFilePath);
- const componentJson = JSON.parse(componentJsonFile.toString());
- // usingComponents为空时忽略
- if (componentJson.usingComponents && Object.keys(componentJson.usingComponents).length > 0) {
- cmpInfoJson.require = componentJson.usingComponents;
- }
+ // 获取组件path,可能在父组件目录下
+ if (isExistFile(`${src}/${componentFileName}/${componentFileName}.ts`)) {
+ cmpInfoJson.path = `./${componentFileName}/${componentFileName}`;
+ } else {
+ const srcFolder = fs.readdirSync(src);
+ srcFolder.forEach((cmp) => {
+ if (isExistFile(`${src}/${cmp}/${componentFileName}.ts`)) {
+ cmpInfoJson.path = `./${cmp}/${componentFileName}`;
+ }
+ });
}
- wechatideConfig.components.push(cmpInfoJson);
+ wechatideConfig.components[cmpKey] = cmpInfoJson;
});
cb();
@@ -81,9 +93,7 @@ gulp.task('wechatide:menu', (cb) => {
return {
key: `subMenu-${subItem.name}`,
label: subItem.title,
- components: [
- `${config.CONFIG_PREFIX}-${subItem.name.replace(/([A-Z])/g, '-$1').toLowerCase()}`,
- ],
+ components: [`${config.CONFIG_PREFIX}-${subItem.name.replace(/([A-Z])/g, '-$1').toLowerCase()}`],
};
});
wechatideConfig.menu.push(menuFirst);
@@ -100,7 +110,7 @@ gulp.task('wechatide:menu', (cb) => {
// 生成配置文件
gulp.task('wechatide:generate', (cb) => {
- const base = path.join(__dirname, '../');
+ const base = path.join(__dirname, '../src');
const data = JSON.stringify(wechatideConfig, null, 2);
fs.writeFileSync(`${base}/.wechatide.ib.json`, data);
cb();
diff --git a/script/qrcode/api.js b/script/qrcode/api.js
new file mode 100644
index 000000000..def788bb0
--- /dev/null
+++ b/script/qrcode/api.js
@@ -0,0 +1,35 @@
+const { get, post } = require('./httpRequest');
+
+/**
+ * 获取access_token, 网页调试工具:https://mp.weixin.qq.com/debug/cgi-bin/apiinfo?t=index&type=%E5%9F%BA%E7%A1%80%E6%94%AF%E6%8C%81&form=%E8%8E%B7%E5%8F%96access_token%E6%8E%A5%E5%8F%A3%20/token&token=&lang=zh_CN
+ * @api https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APPID&secret=APPSECRET
+ * @method GET
+ * @parameter grant_type
+ * @parameter appid
+ * @parameter secret
+ * @return Object
+ */
+const getAccessToken = (appId, appSecret) => {
+ const url = `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${appId}&secret=${appSecret}`;
+ return get(url);
+};
+
+/**
+ * 获取小程序码,适用于需要的码数量极多的业务场景。通过该接口生成的小程序码,永久有效,数量暂无限制。
+ * @api https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN
+ * @method POST
+ * @parameter access_token
+ * @parameter body
+ * @parameter scene //跳转带参
+ * @parameter path //跳转页面
+ * @return 二成功时返回的是 Buffer ,失败时返回 JSON
+ */
+const getUnlimitedQRCode = (token, parameter, config) => {
+ const url = `https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=${token}`;
+ return post(url, parameter, config);
+};
+
+module.exports = {
+ getAccessToken,
+ getUnlimitedQRCode,
+};
diff --git a/script/qrcode/httpRequest.js b/script/qrcode/httpRequest.js
new file mode 100644
index 000000000..b54961b2d
--- /dev/null
+++ b/script/qrcode/httpRequest.js
@@ -0,0 +1,74 @@
+/** axios封装
+ * 请求拦截、响应拦截、错误统一处理
+ */
+const axios = require('axios');
+
+// axios.defaults.timeout = 10000; // 超时抛出异常
+// axios.defaults.withCredentials = true;
+axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'; // post请求头
+axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; // 默认异步请求
+
+// 请求拦截
+axios.interceptors.request.use(
+ (config) => config,
+ (error) => Promise.error(error),
+);
+// 响应拦截
+axios.interceptors.response.use(
+ (response) => {
+ if (response.status === 200) {
+ return Promise.resolve(response);
+ }
+ return Promise.reject(response);
+ },
+ // 服务器状态码不是200的情况
+ (error) => {
+ if (error.response.status) {
+ return Promise.reject(error.response);
+ }
+ },
+);
+
+/**
+ * @description get请求
+ * @parameter {String} url [请求的url地址]
+ * @parameter {Object} parameter [请求时携带的参数]
+ * @parameter {Object} config [其他配置信息]
+ */
+const get = (url, parameter, config) => {
+ return new Promise((resolve, reject) => {
+ axios
+ .get(url, parameter, config)
+ .then((res) => {
+ resolve(res.data);
+ })
+ .catch((err) => {
+ reject(err.data);
+ });
+ });
+};
+
+/**
+ * @description post请求
+ * @parameter {String} url [请求的url地址]
+ * @parameter {Object} parameter [请求时携带的参数]
+ * @parameter {Object} config [其他配置信息]
+ */
+
+const post = (url, parameter, config) => {
+ return new Promise((resolve, reject) => {
+ axios
+ .post(url, parameter, config)
+ .then((res) => {
+ resolve(res.data);
+ })
+ .catch((err) => {
+ reject(err.data);
+ });
+ });
+};
+
+module.exports = {
+ get,
+ post,
+};
diff --git a/script/qrcode/index.js b/script/qrcode/index.js
new file mode 100644
index 000000000..c8315a871
--- /dev/null
+++ b/script/qrcode/index.js
@@ -0,0 +1,106 @@
+const fs = require('fs');
+const path = require('path');
+const { getAccessToken, getUnlimitedQRCode } = require('./api');
+
+const APP_ID = process.argv[process.argv.indexOf('--APP_ID') + 1]; // 在 --APP_ID 后面
+const APP_SECRET = process.argv[process.argv.indexOf('--APP_SECRET') + 1]; // --APP_SECRET 后面
+
+// 去读 app.json 中 pages && subpackages 字段
+const { pages, subpackages } = require('../../example/app.json');
+
+const isExistStr = (str, arr) => {
+ const temp = [...new Set(str.split('/').slice(1))].join('-');
+ return arr.includes(temp);
+};
+
+const getImageList = () => {
+ const imageFolderDir = path.resolve(__dirname, `../../site/public/assets/qrcode`);
+ const images = fs.readdirSync(imageFolderDir);
+ const imageOldList = [];
+ images.forEach((item) => {
+ imageOldList.push(item.split('.')[0]);
+ });
+ return imageOldList;
+};
+
+const getNewPageList = (list) => {
+ const pageList = [];
+ const imageOldList = getImageList();
+ list.forEach((item) => {
+ if (Object.prototype.toString.call(item) === '[object Object]') {
+ item.pages.forEach((subItem) => {
+ if (!isExistStr(item.root + subItem, imageOldList)) {
+ pageList.push(item.root + subItem);
+ }
+ });
+ } else if (!isExistStr(item, imageOldList)) {
+ pageList.push(item);
+ }
+ });
+
+ return pageList;
+};
+
+const getUnlimitedQRCodeImage = (appid, appSecret) => {
+ getAccessToken(appid, appSecret).then((e) => {
+ if (e.access_token) {
+ const token = e.access_token;
+ // eslint-disable-next-line no-console
+ console.log('==access_token 2h内有效=', token);
+ const baseParameter = {
+ width: 280, // 小程序码大小
+ // check_path: false,
+ };
+ const baseConfig = {
+ responseType: 'arraybuffer',
+ };
+
+ const pageList = getNewPageList(pages.concat(subpackages));
+
+ // 循环 pages, 获取相应小程序码
+ pageList.forEach((item, index) => {
+ const temp = [...new Set(item.split('/').slice(1))];
+ const fileName = temp.join('-');
+
+ const specialParameter = {
+ page: item, // 扫码进入的小程序页面路径
+ scene: `name=${temp[0]}`, // 标识
+ };
+ getUnlimitedQRCode(token, JSON.stringify({ ...specialParameter, ...baseParameter }), { ...baseConfig }).then(
+ (res) => {
+ // 因为微信接口 getwxacodeunlimit 成功时返回的是 Buffer ,失败时返回 JSON 结构。这里把返回数据全部当成 Buffer 处理,所以 res.length < 200, 则表示获取失败。
+ if (res.length < 200) {
+ const { errcode, errmsg } = JSON.parse(res.toString());
+ // eslint-disable-next-line no-console
+ console.log('===小程序码获取失败===', item, { errcode, errmsg });
+ return;
+ }
+
+ const buffer = Buffer.from(res, 'base64');
+ const destPath = path.resolve(__dirname, `../../site/public/assets/qrcode/${fileName}.png`);
+
+ fs.writeFile(
+ destPath,
+ buffer,
+ {
+ encoding: 'binary',
+ flag: 'w+',
+ },
+ (err) => {
+ if (err) {
+ // eslint-disable-next-line no-console
+ console.log('===小程序码图片存储错误===', err);
+ }
+ },
+ );
+ },
+ );
+ });
+ }
+ });
+};
+
+/**
+ * @description 命令行生成小程序码 npm run qrcode -- --APP_ID xxx --APP_SECRET xxx
+ */
+getUnlimitedQRCodeImage(APP_ID, APP_SECRET);
diff --git a/script/style.js b/script/style.js
new file mode 100644
index 000000000..7f271b40e
--- /dev/null
+++ b/script/style.js
@@ -0,0 +1,25 @@
+const glob = require('glob');
+const fs = require('fs');
+const path = require('path');
+
+glob('src/**/*.md', (err, files) => {
+ if (err) {
+ console.log(err);
+ }
+
+ const handler = (file) => {
+ const filePath = path.resolve(__dirname, '..', file);
+ const content = fs.readFileSync(filePath, { encoding: 'utf8' });
+ const splitContent = content.split('\n');
+
+ splitContent.forEach((content, index) => {
+ if (/custom-style/.test(content)) {
+ splitContent.splice(index, 1);
+ }
+ });
+
+ fs.writeFileSync(filePath, splitContent.join('\n'));
+ console.log(filePath);
+ };
+ files.forEach(handler);
+});
diff --git a/script/test/globalSetup.js b/script/test/globalSetup.js
new file mode 100644
index 000000000..281116891
--- /dev/null
+++ b/script/test/globalSetup.js
@@ -0,0 +1,3 @@
+module.exports = async () => {
+ process.env.TZ = 'Asia/Shanghai';
+};
diff --git a/script/test/setup.js b/script/test/setup.js
new file mode 100644
index 000000000..af8a50d11
--- /dev/null
+++ b/script/test/setup.js
@@ -0,0 +1,17 @@
+import Path from 'path';
+import simulate from 'miniprogram-simulate';
+import { canUseVirtualHost } from '../../src/common/version';
+
+global.getApp = () => null;
+global.Page = (options) => Component(options);
+global.load = (path, demoName) => {
+ return simulate.load(path, demoName, {
+ less: true,
+ rootPath: Path.resolve(__dirname, '../../src'),
+ compilerOptions: {
+ maxBuffer: 1024 * 1024 * 2,
+ },
+ });
+};
+
+global.VIRTUAL_HOST = canUseVirtualHost();
diff --git a/script/test/snapshotResolver.js b/script/test/snapshotResolver.js
new file mode 100644
index 000000000..47664f502
--- /dev/null
+++ b/script/test/snapshotResolver.js
@@ -0,0 +1,12 @@
+module.exports = {
+ // resolves from test to snapshot path
+ resolveSnapshotPath: (testPath, snapshotExtension) =>
+ testPath.replace('__test__', '__test__/__virtualHostSnapshot__') + snapshotExtension,
+
+ // resolves from snapshot to test path
+ resolveTestPath: (snapshotFilePath, snapshotExtension) =>
+ snapshotFilePath.replace('__test__/__virtualHostSnapshot__', '__test__').slice(0, -snapshotExtension.length),
+
+ // Example test path, used for preflight consistency check of the implementation above
+ testPathForConsistencyCheck: 'some/__tests__/example.test.js',
+};
diff --git a/script/test/transform.js b/script/test/transform.js
new file mode 100644
index 000000000..26e54b50d
--- /dev/null
+++ b/script/test/transform.js
@@ -0,0 +1,15 @@
+// 由于开启 vritualHost=true 之后,selectComponent 无法获取,暂时在单测关闭 virtualHost
+const path = require('path');
+const babelJest = require('babel-jest');
+
+module.exports = {
+ process(sourceText, sourcePath) {
+ if (sourcePath.indexOf('instantiationDecorator') > -1) {
+ sourceText = sourceText.replace('virtualHost = true', 'virtualHost = false');
+ }
+
+ return babelJest.process(sourceText, sourcePath, {
+ cwd: path.resolve(__dirname, '../../'),
+ });
+ },
+};
diff --git a/script/test/virtualHostSetup.js b/script/test/virtualHostSetup.js
new file mode 100644
index 000000000..7ddc3fc70
--- /dev/null
+++ b/script/test/virtualHostSetup.js
@@ -0,0 +1,43 @@
+import Path from 'path';
+import simulate from 'miniprogram-simulate';
+import similateApi from 'miniprogram-simulate/src/api';
+import { canUseVirtualHost } from '../../src/common/version';
+
+global.getApp = () => null;
+global.Page = (options) => Component(options);
+global.load = (path, demoName) => {
+ return simulate.load(path, demoName, {
+ less: true,
+ rootPath: Path.resolve(__dirname, '../../src'),
+ compilerOptions: {
+ maxBuffer: 1024 * 1024 * 2,
+ },
+ });
+};
+
+global.wx = {
+ ...similateApi,
+ getSystemInfoSync: () => {
+ return {
+ // SDKVersion > 2.19.2, 开启 VirtualHost
+ SDKVersion: '2.20.0',
+ batteryLevel: 100,
+ benchmarkLevel: 1,
+ brand: 'devtools',
+ fontSizeSetting: 16,
+ language: 'zh_CN',
+ model: 'iPhone 7 Plus',
+ pixelRatio: 3,
+ platform: 'devtools',
+ screenHeight: 736,
+ screenWidth: 414,
+ statusBarHeight: 20,
+ system: 'iOS 10.0.1',
+ version: '6.6.3',
+ windowHeight: 672,
+ windowWidth: 414,
+ };
+ },
+};
+
+global.VIRTUAL_HOST = canUseVirtualHost();
diff --git a/script/tpl.json b/script/tpl.json
new file mode 100644
index 000000000..7fb07dbe9
--- /dev/null
+++ b/script/tpl.json
@@ -0,0 +1,267 @@
+{
+ "t-action-sheet": {
+ "tpl": ""
+ },
+ "t-avatar-group": {
+ "tpl": "",
+ "require": {
+ "t-avatar": "./avatar/avatar"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-avatar.png"
+ },
+ "t-avatar": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-avatar.png"
+ },
+ "t-back-top": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-backtop.png"
+ },
+ "t-badge": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-badge.png"
+ },
+ "t-button": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-button.png"
+ },
+ "t-cell": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-cell.png"
+ },
+ "t-cell-group": {
+ "tpl": "",
+ "require": {
+ "t-cell": "./cell/cell"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-cell.png"
+ },
+ "t-check-tag": {
+ "tpl": "check tag"
+ },
+ "t-checkbox": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-checkbox.png"
+ },
+ "t-checkbox-group": {
+ "tpl": "",
+ "require": {
+ "t-checkbox": "./checkbox/checkbox"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-checkbox.png"
+ },
+ "t-collapse-panel": {
+ "tpl": "此处可自定义内容"
+ },
+ "t-collapse": {
+ "tpl": "此处可自定义内容",
+ "require": {
+ "t-collapse-panel": "./collapse/collapse-panel"
+ }
+ },
+ "t-count-down": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-countdown.png"
+ },
+ "t-date-time-picker": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-datetimepicker.png"
+ },
+ "t-dialog": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dialog.png"
+ },
+ "t-divider": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-divider.png"
+ },
+ "t-drawer": {
+ "tpl": ""
+ },
+ "t-dropdown-item": {
+ "tpl": ""
+ },
+ "t-dropdown-menu": {
+ "tpl": "",
+ "require": {
+ "t-dropdown-menu": "./dropdown-menu/dropdown-item"
+ }
+ },
+ "t-empty": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-empty.png"
+ },
+ "t-fab": {
+ "tpl": ""
+ },
+ "t-footer": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-footer.png"
+ },
+ "t-grid-item": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-grid.png"
+ },
+ "t-grid": {
+ "tpl": "",
+ "require": {
+ "t-grid-item": "./grid/grid-item"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-grid.png"
+ },
+ "t-icon": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-icon.png"
+ },
+ "t-image": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-image.png"
+ },
+ "t-indexes": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-indexes.png"
+ },
+ "t-input": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-input.png"
+ },
+ "t-loading": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-loading.png"
+ },
+ "t-message": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-message.png"
+ },
+ "t-navbar": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-navbar.png"
+ },
+ "t-picker-item": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-picker.png"
+ },
+ "t-picker": {
+ "tpl": "",
+ "require": {
+ "t-picker-item": "./picker/picker-item"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-picker.png"
+ },
+ "t-popup": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-popup.png"
+ },
+ "t-progress": {
+ "tpl": ""
+ },
+ "t-pull-down-refresh": {
+ "tpl": "拖拽该区域演示 中间下拉刷新",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-pulldownrefresh.png"
+ },
+ "t-radio-group": {
+ "tpl": "",
+ "require": {
+ "t-radio": "./radio/radio"
+ },
+ "icon:": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-radio.png"
+ },
+ "t-radio": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-radio.png"
+ },
+ "t-rate": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-rate.png"
+ },
+ "t-search": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-search.png"
+ },
+ "t-skeleton": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-skeleton.png"
+ },
+ "t-slider": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-slider.png"
+ },
+ "t-stepper": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-stepper.png"
+ },
+ "t-step-item": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-steps.png"
+ },
+ "t-steps": {
+ "tpl": "",
+ "require": {
+ "t-step-item": "./steps/step-item"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-steps.png"
+ },
+ "t-sticky": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-sticky.png"
+ },
+ "t-swipe-cell": {
+ "tpl": "删除",
+ "require": {
+ "t-cell": "./cell/cell"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-swipecell.png"
+ },
+ "t-swiper": {
+ "tpl": "",
+ "require": {
+ "t-swiper-item": "./swiper/swiper-item"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-swiper.png"
+ },
+ "t-switch": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-switch.png"
+ },
+ "t-tab-bar-item": {
+ "tpl": "{{item.label}}",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabbar.png"
+ },
+ "t-tab-bar": {
+ "tpl": "{{item.label}}",
+ "require": {
+ "t-tab-bar-item": "./tab-bar/tab-bar-item"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabbar.png"
+ },
+ "t-tab-panel": {
+ "tpl": "标签一内容",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabs.png"
+ },
+ "t-tabs": {
+ "tpl": "标签一内容标签二内容",
+ "require": {
+ "t-tab-panel": "./tabs/tab-panel"
+ },
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabs.png"
+ },
+ "t-tag": {
+ "tpl": "重要",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tag.png"
+ },
+ "t-textarea": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-textarea.png"
+ },
+ "t-toast": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-toast.png"
+ },
+ "t-transition": {
+ "tpl": ""
+ },
+ "t-upload": {
+ "tpl": "",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-upload.png"
+ }
+}
diff --git a/script/update-icons.js b/script/update-icons.js
index b3f11b74e..c2deb44c1 100644
--- a/script/update-icons.js
+++ b/script/update-icons.js
@@ -2,7 +2,7 @@ const path = require('path');
const fs = require('fs');
const iconFile = path.join(__dirname, '..', 'src/icon/icon.less');
-const dataFile = path.join(__dirname, '..', 'example/pages/icon/data.js');
+const dataFile = path.join(__dirname, '..', 'src/icon/_example/data.js');
fs.readFile(iconFile, 'utf8', (err, data) => {
if (err) {
console.error(err);
diff --git a/site/data/projects.ts b/site/data/projects.ts
new file mode 100644
index 000000000..311c6fe22
--- /dev/null
+++ b/site/data/projects.ts
@@ -0,0 +1,70 @@
+export default
+ [
+ {
+ name: '未来运动场',
+ tags: ['趣味游戏'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/weilaiyundongchang.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/weilaiyundongchang-code.jpg',
+ },
+ {
+ name: '程序员做饭指南',
+ tags: ['效率工具', '开源项目'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/zuofanzhinan.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/zuofanzhinan-code.jpg',
+ url: 'https://github.com/LeeJim/HowToCookOnMiniprogram',
+ },
+ {
+ name: '李宁',
+ tags: ['电商'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/lining.jpg'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/lining-code.jpg',
+ },
+ {
+ name: '美宜家',
+ tags: ['电商'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/meiyijia.jpg'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/meiyijia-code.jpg',
+ },
+ {
+ name: '沃尔玛',
+ tags: ['电商'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/walmart.jpg'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/walmart-code.jpg',
+ },
+ {
+ name: '维达',
+ tags: ['电商'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/weida.jpg'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/weida-code.png',
+ },
+ {
+ name: '小云卡片',
+ tags: ['效率工具'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/xiaoyunkapian.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/xiaoyunkapian-code.jpg'
+ },
+ {
+ name: '小楼助教',
+ tags: ['效率工具'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/xiaolouzhujiao.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/xiaolouzhujiao-code.png'
+ },
+ {
+ name: 'frmall',
+ tags: ['电商', '开源项目'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/frmall.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/frmall-code.jpg',
+ },
+ {
+ name: 'Coding 鱼塘',
+ tags: ['效率工具'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/codingyutang.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/codingyutang-code.jpg',
+ },
+ {
+ name: '智写 AI',
+ tags: ['效率工具'],
+ preview: ['https://tdesign.gtimg.com/miniprogram/case/zhixieai.png'],
+ qrcode: 'https://tdesign.gtimg.com/miniprogram/case/zhixieai-code.png',
+ },
+ ]
diff --git a/site/docs/custom-style.md b/site/docs/custom-style.md
new file mode 100644
index 000000000..c460c3f1c
--- /dev/null
+++ b/site/docs/custom-style.md
@@ -0,0 +1,113 @@
+---
+title: 样式覆盖
+description: 微信小程序提供了多种方式可以实现样式覆盖
+spline: explain
+---
+
+基于微信小程序的设计,TDesign 提供了 4 种方式用于样式覆盖
+
+## 1 使用 Style
+
+> TDesign 全部组件均支持 `custom-style` 和 `style` 属性。可传入 CSS 字符串,将会应用于组件的根元素。
+
+### 开启 virtualHost
+
+从 `1.0.0-rc` 版本开始,在基础库版本高于 2.19.2 的情况下,TDesign 会默认开启 `virtualHost` 属性。
+
+此时 `custom-style` 和 `style` 的效果是一致的,任选其一即可:
+
+```html
+填充按钮
+
+填充按钮
+```
+
+渲染的结果如下:
+
+```html
+填充按钮
+```
+
+### 关闭 virtualHost
+
+但在没有开启 `virtualHost` 的情况下,小程序使用的是 Shadow DOM 的渲染机制,自定义组件本身那个节点也会渲染成一个普通节点。
+
+使用 `style` 赋予的样式,将会被自定义组件本身那个节点劫持,导致无法正确传入组件内部,此时只能使用 `custom-style`:
+
+```html
+填充按钮
+```
+
+渲染的结果如下:
+
+```html
+
+ 填充按钮
+
+```
+
+## 2 解除样式隔离
+
+样式隔离相关文档:[微信官网文档](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#%E7%BB%84%E4%BB%B6%E6%A0%B7%E5%BC%8F%E9%9A%94%E7%A6%BB)
+
+TDesign 全体组件均开启了 `addGlobalClass`,可以接受外部传入的样式。
+
+### 在页面中使用 TDesign
+
+```html
+填充按钮
+```
+
+```css
+.t-button--primary {
+ background-color: navy;
+}
+```
+
+### 在自定义组件中使用 TDesign
+
+> 需要在自定义组件的 options 中开启: `styleIsolation: 'shared'`
+
+```html
+填充按钮
+```
+
+对应的自定义组件:
+
+```js
+Component({
+ options: {
+ styleIsolation: 'shared'
+ }
+})
+```
+
+```css
+.t-button--primary {
+ background-color: navy;
+}
+```
+
+## 3 使用外部样式类
+
+外部样式类相关文档:[微信官网文档](https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html#%E5%A4%96%E9%83%A8%E6%A0%B7%E5%BC%8F%E7%B1%BB)
+
+TDesign 在每个组件的内部都预置了许多外部样式类供开发者使用。
+
+**注意:在同一个节点上使用普通样式类和外部样式类时,两个类的优先级是未定义的,所以最好加上 `!important`**
+
+```html
+填充按钮
+```
+
+```css
+.red-loading {
+ color: red !important;
+}
+```
+
+## 4 使用 CSS 变量
+
+TDesign 为所有组件预置了许多 CSS 变量,具体可以查看每个组件的 WXSS 文件。
+
+使用 CSS 变量的好处在于可以多页面复用,不需要重复修改。具体可以参考 [自定义主题](./custom-theme)
\ No newline at end of file
diff --git a/site/docs/custom-theme.md b/site/docs/custom-theme.md
new file mode 100644
index 000000000..8119423c7
--- /dev/null
+++ b/site/docs/custom-theme.md
@@ -0,0 +1,63 @@
+---
+title: 自定义主题
+description: 如何使用 CSS Variables 自定义主题
+spline: explain
+---
+
+组件库通用的 Design Token 均使用 CSS Variables 声明,你可以在自己的项目中声明同名变量来覆盖他们的值。
+
+## 全局自定义
+
+小程序的 CSS Variables 全部定义考验在这里看到: [_variables.less](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/style/_variables.less)
+
+如果你想改变主题色,主要改变这几个变量即可:
+
+```css
+@brand-color: var(--td-brand-color, #0052d9); // 主题色
+@success-color: var(--td-success-color, #00a870); // 成功
+@warning-color: var(--td-warning-color, #ed7b2f); // 警告
+@error-color: var(--td-error-color, #e34d59); // 失败
+```
+
+在 `app.css` 文件添加下行代码即可:
+
+```css
+page {
+ --td-brand-color: navy; // 任何你想要的主题色
+}
+```
+
+> 当然,[_variables.less](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/common/style/_variables.less) 里面都是通用的全局变量,都可以修改
+
+## 局部自定义
+
+在 TDesign 小程序里,你也可以只给某个组件修改主题,下面以 `Rate` 举例:
+
+```css
+page {
+ --td-rate-selected-color: #ed7b2f; /* 选中的颜色 */
+ --td-rate-unselected-color: #e3e6eb; /* 未选中的颜色 */
+}
+```
+
+## 自定义 TabBar
+
+当然,有些组件可能不会被包裹在 `page` 里,比如自定义 `tab-bar`。
+
+此时,可以通过给组件增加 `class` 来实现:
+
+```html
+
+ home
+
+```
+
+对应的 `CSS` 可以这么定义:
+
+```css
+.custom-tab-bar {
+ --td-tab-bar-item-color: red;
+}
+```
+
+> 目前仅有部分组件支持自定义主题,支持的组件在其文档有陈列对应的 CSS Varialbes,可以访问 [tab-bar-item.less](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/tab-bar-item/tab-bar-item.less)
\ No newline at end of file
diff --git a/site/docs/getting-started.md b/site/docs/getting-started.md
index 11ee687c1..0f375d786 100644
--- a/site/docs/getting-started.md
+++ b/site/docs/getting-started.md
@@ -4,13 +4,6 @@ description: TDesign 微信小程序组件库。
spline: explain
---
-
-
- 目前组件库处于 Alpha 阶段,快速迭代中,请留意版本变化。
-
-
## 预览
小程序组件示例小程序,请使用微信扫码预览 ↓
@@ -34,20 +27,22 @@ npm i tdesign-miniprogram -S --production
> 安装完之后,需要在微信开发者工具中对 npm 进行构建:`工具 - 构建 npm`
-### 通过 Git Clone
-
-克隆到源代码之后,然后将 `tdesign-miniprogram` 目录拷贝到自己的项目中
-
-```bash
-git clone git@github.com:Tencent/tdesign-miniprogram.git
-```
-
## 修改 app.json
将 `app.json` 中的 `"style": "v2"` 移除。
> 因为 [该配置](https://developers.weixin.qq.com/miniprogram/dev/reference/configuration/app.html#style) 表示启用新版组件样式,将会导致 TDesign 的组件样式错乱。
+## 修改 tsconfig.json
+如果使用`typescript`开发,需要修改`tsconfig.json`指定`paths`
+```json
+{
+ "paths": {
+ "tdesign-miniprogram/*":["./miniprogram/miniprogram_npm/tdesign-miniprogram/*"]
+ }
+}
+```
+
## 使用组件
以按钮组件为例,只需要在 `JSON` 文件中引入按钮对应的自定义组件即可
@@ -55,7 +50,7 @@ git clone git@github.com:Tencent/tdesign-miniprogram.git
```json
{
"usingComponents": {
- "t-button": "tdesign-miniprogram/dist/button/index"
+ "t-button": "tdesign-miniprogram/button/button"
}
}
```
@@ -63,7 +58,7 @@ git clone git@github.com:Tencent/tdesign-miniprogram.git
接着就可以在 wxml 中直接使用组件
```html
-按钮
+按钮
```
## 在开发者工具中预览
@@ -80,4 +75,4 @@ npm run dev
## 基础库版本
-最低基础库版本`^2.6.1`
+最低基础库版本`^2.6.5`
diff --git a/site/docs/overview.md b/site/docs/overview.md
index 6a604b94c..b9b4ba1ce 100644
--- a/site/docs/overview.md
+++ b/site/docs/overview.md
@@ -4,7 +4,7 @@ description: 将根据业务实践持续新增组件类型,敬请留意组件
spline: explain
---
-基础4
+基础5
-导航6
+导航8
-输入12
+输入14
-数据展示14
+数据展示16
+
+
+
+
-
消息提醒10
+
反馈10
+
+
-
+
diff --git a/site/main.ts b/site/main.ts
index 8921305cc..372a8b83d 100644
--- a/site/main.ts
+++ b/site/main.ts
@@ -10,6 +10,7 @@ import 'tdesign-site-components/lib/styles/style.css';
import 'tdesign-site-components/lib/styles/prism-theme.less';
import 'tdesign-site-components/lib/styles/prism-theme-dark.less';
-createApp(app)
- .use(router)
- .mount('#app');
+// import icons webcomponents
+import 'tdesign-icons-view';
+
+createApp(app).use(router).mount('#app');
diff --git a/site/pages/used.vue b/site/pages/used.vue
new file mode 100644
index 000000000..e2aa3dfca
--- /dev/null
+++ b/site/pages/used.vue
@@ -0,0 +1,172 @@
+
+
+
+
+
上线项目案例
+
目前已上线 400+ 个小程序,部分小程序二维码如下。如果你也在使用 TDesign 搭建你的小程序,也欢迎添加你的项目: 添加项目
+
+
+
+
+
+
+
![]()
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/site/plugin-tdoc/component.vue b/site/plugin-tdoc/component.vue
index 2e8edf78f..d8a8997dd 100644
--- a/site/plugin-tdoc/component.vue
+++ b/site/plugin-tdoc/component.vue
@@ -5,12 +5,13 @@
-
-
![]()
+
![]()
+
-
+
@@ -18,7 +19,7 @@
-
+
@@ -53,11 +54,17 @@ export default defineComponent({
},
name() {
const { path } = this.$route;
- return path.slice(path.lastIndexOf('/') + 1)
+ return path.slice(path.lastIndexOf('/') + 1);
},
liveUrl() {
- return `//tdesign.tencent.com/miniprogram-live/m2w/program/miniprogram/#!pages/${this.name}/${this.name}.html`
- }
+ return `/miniprogram-live/m2w/program/miniprogram/#!pages/${this.name}/${this.name}.html`;
+ },
+ qrcode() {
+ const { path } = this.$route;
+ const name = path.slice(path.lastIndexOf('/') + 1);
+ // new URL(): https://cn.vitejs.dev/guide/assets.html#new-url-url-import-meta-url
+ return new URL(`../public/assets/qrcode/${name}.png`, import.meta.url).href;
+ },
},
mounted() {
@@ -65,12 +72,10 @@ export default defineComponent({
const { tdDocContent, tdDocHeader, tdDocTabs } = this.$refs;
if (info.isComponent) {
- tdDocTabs.onchange = ({ detail: currentTab }) => this.tab = currentTab;
+ tdDocTabs.onchange = ({ detail: currentTab }) => (this.tab = currentTab);
tdDocHeader.componentName = info.componentName;
}
-
Prismjs.highlightAll();
-
tdDocHeader.spline = info.spline;
tdDocHeader.docInfo = { title: info.title, desc: info.description };
@@ -93,17 +98,17 @@ export default defineComponent({
text-align: center;
background-color: #fff;
border-radius: 6px 6px 0 0;
- border: 1px solid #DCDCDC;
-
+ border: 1px solid #dcdcdc;
+
&--gray {
background-color: #eee;
}
- :root[theme-mode="dark"] & img {
+ :root[theme-mode='dark'] & img {
filter: unset;
}
- div[name=DEMO] & + pre {
+ div[name='DEMO'] &+pre {
margin-top: 0;
border-top-left-radius: 0;
border-top-right-radius: 0;
diff --git a/site/plugin-tdoc/md-to-vue.ts b/site/plugin-tdoc/md-to-vue.ts
index ba533d345..21f1a2673 100644
--- a/site/plugin-tdoc/md-to-vue.ts
+++ b/site/plugin-tdoc/md-to-vue.ts
@@ -6,17 +6,17 @@ import matter from 'gray-matter';
// import testCoverage from '../test-coverage';
-const componentPath = path.join(__dirname, './component.vue');
+const componentPath = path.join(__dirname, './component.vue').replaceAll('\\', '/');
-const DEAULT_TABS = [
+const DEFAULT_TABS = [
{ tab: 'demo', name: '示例' },
{ tab: 'api', name: 'API' },
{ tab: 'design', name: '指南' },
];
-export default function mdToVue(options) {
+export default function mdToVue(options: any) {
const mdSegment = customRender(options);
- const { demoCodesImportsStr, demoCodesDefsStr } = options;
+ const { demoCodesImportsStr = '', demoCodesDefsStr } = options;
// let coverage = '';
// if (mdSegment.isComponent) {
@@ -49,12 +49,12 @@ function customRender({ source, file, md }: any) {
// md top data
const pageData = {
spline: '',
- toc: false,
+ toc: true,
title: '',
description: '',
isComponent: false,
tdDocHeader: true,
- tdDocTabs: DEAULT_TABS,
+ tdDocTabs: DEFAULT_TABS,
apiFlag: /#+\s*API\n/i,
docClass: '',
lastUpdated: Math.round(fs.statSync(file).mtimeMs),
@@ -62,15 +62,12 @@ function customRender({ source, file, md }: any) {
};
// md filename
- const reg = file.match(/src\/(\w+-?\w+)\/(\w+-?\w+)\.md/);
+ const reg = file.match(/src\/(\S*)(?=\/\S*.md)/);
const componentName = reg && reg[1];
// split md
let [demoMd = '', apiMd = ''] = content.split(pageData.apiFlag);
- // fix table | render error
- apiMd = apiMd.replace(/`[^`]+`/g, (str) => str.replace(/\|/g, '\\|'));
-
const mdSegment = {
...pageData,
componentName,
@@ -81,10 +78,16 @@ function customRender({ source, file, md }: any) {
};
if (pageData.isComponent) {
- mdSegment.demoMd = md.render.call(md, `${pageData.toc ? '[toc]\n' : ''}${demoMd.replace(//g, '')}`).html;
- mdSegment.apiMd = md.render.call(md, `${pageData.toc ? '[toc]\n' : ''}${apiMd.replace(//g, '')}`).html;
+ mdSegment.demoMd = md.render.call(md, `${demoMd.replace(//g, '')}`).html;
+ mdSegment.apiMd = md.render.call(
+ md,
+ `${pageData.toc ? '[toc]\n' : ''}${apiMd.replace(//g, '')}`,
+ ).html;
} else {
- mdSegment.docMd = md.render.call(md, `${pageData.toc ? '[toc]\n' : ''}${content.replace(//g, '')}`).html;
+ mdSegment.docMd = md.render.call(
+ md,
+ `${pageData.toc ? '[toc]\n' : ''}${content.replace(//g, '')}`,
+ ).html;
}
// 设计指南内容 不展示 design Tab 则不解析
diff --git a/site/plugin-tdoc/transforms.ts b/site/plugin-tdoc/transforms.ts
index 672c4748b..965a7f604 100644
--- a/site/plugin-tdoc/transforms.ts
+++ b/site/plugin-tdoc/transforms.ts
@@ -1,39 +1,56 @@
+import path from 'path';
+import fs from 'fs';
import mdToVue from './md-to-vue';
-let demoImports: Record
= {};
let demoCodesImports: Record = {};
-const compLists = ['badge', 'cell', 'empty',
-'checkbox', 'date-time-picker', 'input', 'picker', 'radio', 'rate', 'search', 'stepper', 'switch', 'textarea', 'upload',
-'indexes', 'navbar', 'tab-bar', 'tabs',
-'dialog', 'popup', 'swipe-cell']
-
export default {
before({ source, file, md }: any) {
- const reg = file.match(/src\/(\w+-?\w+)\/\w+-?\w+\.md/);
+ const resouceDir = path.dirname(file);
+ const reg = file.match(/src\/(\S*)(?=\/\S*.md)/);
const name = reg && reg[1];
- demoImports = {};
demoCodesImports = {};
// 增加渲染规则
- md.renderer.rules.html_block = function (tokens, idx) {
+ md.renderer.rules.html_block = function (tokens: string, idx: number) {
const { content } = tokens[idx];
- // const hit = compLists.indexOf(name as string) > -1;
-
if (content.startsWith('
- // ${content}
- // `
+ return '';
}
return content;
};
+ // 替换成对应 demo 文件
+ source = source.replace(/{{\s+(.+)\s+}}/g, (_: string, demoDirName: string) => {
+ const demoPath = path.resolve(resouceDir, `./_example/${demoDirName}`);
+ if (!fs.existsSync(demoPath)) {
+ console.log('\x1B[36m%s\x1B[0m', `${name} 组件需要实现 _example/${demoDirName} 示例!`);
+ return '\nDEMO (🚧建设中)...
';
+ }
+ const wxml = fs.readFileSync(path.resolve(demoPath, 'index.wxml'), { encoding: 'utf-8' });
+ const js = fs.readFileSync(path.resolve(demoPath, 'index.js'), { encoding: 'utf-8' });
+ const css = fs.readFileSync(path.resolve(demoPath, 'index.wxss'), { encoding: 'utf-8' });
+ const json = fs.readFileSync(path.resolve(demoPath, 'index.json'), { encoding: 'utf-8' });
+
+ return `
+
+ ${encodeURIComponent(wxml)}
+
+ ${encodeURIComponent(js)}
+
+ ${encodeURIComponent(css)}
+
+ ${encodeURIComponent(json)}
+`;
+ });
+
return source;
},
- render({ source, file, md }: { source: string, file: string, md: any }) {
- const demoCodesDefsStr = Object.keys(demoCodesImports).map((key) => demoCodesImports[key]).join(';\n');
+ render({ source, file, md }: { source: string; file: string; md: any }) {
+ const demoCodesDefsStr = Object.keys(demoCodesImports)
+ .map((key) => demoCodesImports[key])
+ .join(';\n');
const demoCodesInstallStr = Object.keys(demoCodesImports).join(',');
const sfc = mdToVue({
diff --git a/site/public/assets/qrcode/action-sheet.png b/site/public/assets/qrcode/action-sheet.png
new file mode 100644
index 000000000..998fea7c3
Binary files /dev/null and b/site/public/assets/qrcode/action-sheet.png differ
diff --git a/site/public/assets/qrcode/avatar.png b/site/public/assets/qrcode/avatar.png
new file mode 100644
index 000000000..84c2d5d9f
Binary files /dev/null and b/site/public/assets/qrcode/avatar.png differ
diff --git a/site/public/assets/qrcode/back-top.png b/site/public/assets/qrcode/back-top.png
new file mode 100644
index 000000000..b4dd5e043
Binary files /dev/null and b/site/public/assets/qrcode/back-top.png differ
diff --git a/site/public/assets/qrcode/badge.png b/site/public/assets/qrcode/badge.png
new file mode 100644
index 000000000..519bdc537
Binary files /dev/null and b/site/public/assets/qrcode/badge.png differ
diff --git a/site/public/assets/qrcode/button-group.png b/site/public/assets/qrcode/button-group.png
new file mode 100644
index 000000000..b68278188
Binary files /dev/null and b/site/public/assets/qrcode/button-group.png differ
diff --git a/site/public/assets/qrcode/button.png b/site/public/assets/qrcode/button.png
new file mode 100644
index 000000000..bc4dbb594
Binary files /dev/null and b/site/public/assets/qrcode/button.png differ
diff --git a/site/public/assets/qrcode/calendar.png b/site/public/assets/qrcode/calendar.png
new file mode 100644
index 000000000..1d919e833
Binary files /dev/null and b/site/public/assets/qrcode/calendar.png differ
diff --git a/site/public/assets/qrcode/cascader.png b/site/public/assets/qrcode/cascader.png
new file mode 100644
index 000000000..4ef4a1142
Binary files /dev/null and b/site/public/assets/qrcode/cascader.png differ
diff --git a/site/public/assets/qrcode/cell-group.png b/site/public/assets/qrcode/cell-group.png
new file mode 100644
index 000000000..653577428
Binary files /dev/null and b/site/public/assets/qrcode/cell-group.png differ
diff --git a/site/public/assets/qrcode/cell.png b/site/public/assets/qrcode/cell.png
new file mode 100644
index 000000000..7bce3d41d
Binary files /dev/null and b/site/public/assets/qrcode/cell.png differ
diff --git a/site/public/assets/qrcode/checkbox.png b/site/public/assets/qrcode/checkbox.png
new file mode 100644
index 000000000..bc706228a
Binary files /dev/null and b/site/public/assets/qrcode/checkbox.png differ
diff --git a/site/public/assets/qrcode/collapse.png b/site/public/assets/qrcode/collapse.png
new file mode 100644
index 000000000..3fdbd53c2
Binary files /dev/null and b/site/public/assets/qrcode/collapse.png differ
diff --git a/site/public/assets/qrcode/count-down.png b/site/public/assets/qrcode/count-down.png
new file mode 100644
index 000000000..11e217a15
Binary files /dev/null and b/site/public/assets/qrcode/count-down.png differ
diff --git a/site/public/assets/qrcode/date-time-picker.png b/site/public/assets/qrcode/date-time-picker.png
new file mode 100644
index 000000000..dfab60a50
Binary files /dev/null and b/site/public/assets/qrcode/date-time-picker.png differ
diff --git a/site/public/assets/qrcode/dialog.png b/site/public/assets/qrcode/dialog.png
new file mode 100644
index 000000000..36aef4cac
Binary files /dev/null and b/site/public/assets/qrcode/dialog.png differ
diff --git a/site/public/assets/qrcode/divider.png b/site/public/assets/qrcode/divider.png
new file mode 100644
index 000000000..7677004da
Binary files /dev/null and b/site/public/assets/qrcode/divider.png differ
diff --git a/site/public/assets/qrcode/drawer.png b/site/public/assets/qrcode/drawer.png
new file mode 100644
index 000000000..87059eebd
Binary files /dev/null and b/site/public/assets/qrcode/drawer.png differ
diff --git a/site/public/assets/qrcode/dropdown-menu.png b/site/public/assets/qrcode/dropdown-menu.png
new file mode 100644
index 000000000..8b93a5d94
Binary files /dev/null and b/site/public/assets/qrcode/dropdown-menu.png differ
diff --git a/site/public/assets/qrcode/empty-empty-page.png b/site/public/assets/qrcode/empty-empty-page.png
new file mode 100644
index 000000000..118121cff
Binary files /dev/null and b/site/public/assets/qrcode/empty-empty-page.png differ
diff --git a/site/public/assets/qrcode/empty.png b/site/public/assets/qrcode/empty.png
new file mode 100644
index 000000000..1d21190b2
Binary files /dev/null and b/site/public/assets/qrcode/empty.png differ
diff --git a/site/public/assets/qrcode/fab.png b/site/public/assets/qrcode/fab.png
new file mode 100644
index 000000000..f4a58a356
Binary files /dev/null and b/site/public/assets/qrcode/fab.png differ
diff --git a/site/public/assets/qrcode/footer.png b/site/public/assets/qrcode/footer.png
new file mode 100644
index 000000000..39cc86e5c
Binary files /dev/null and b/site/public/assets/qrcode/footer.png differ
diff --git a/site/public/assets/qrcode/grid.png b/site/public/assets/qrcode/grid.png
new file mode 100644
index 000000000..4f3936129
Binary files /dev/null and b/site/public/assets/qrcode/grid.png differ
diff --git a/site/public/assets/qrcode/gulp-error-index.png b/site/public/assets/qrcode/gulp-error-index.png
new file mode 100644
index 000000000..b025f1612
Binary files /dev/null and b/site/public/assets/qrcode/gulp-error-index.png differ
diff --git a/site/public/assets/qrcode/home-navigateFail.png b/site/public/assets/qrcode/home-navigateFail.png
new file mode 100644
index 000000000..7bbe7f6e6
Binary files /dev/null and b/site/public/assets/qrcode/home-navigateFail.png differ
diff --git a/site/public/assets/qrcode/home.png b/site/public/assets/qrcode/home.png
new file mode 100644
index 000000000..39af13bde
Binary files /dev/null and b/site/public/assets/qrcode/home.png differ
diff --git a/site/public/assets/qrcode/icon.png b/site/public/assets/qrcode/icon.png
new file mode 100644
index 000000000..9a6932ffa
Binary files /dev/null and b/site/public/assets/qrcode/icon.png differ
diff --git a/site/public/assets/qrcode/image-viewer.png b/site/public/assets/qrcode/image-viewer.png
new file mode 100644
index 000000000..9501675f5
Binary files /dev/null and b/site/public/assets/qrcode/image-viewer.png differ
diff --git a/site/public/assets/qrcode/image.png b/site/public/assets/qrcode/image.png
new file mode 100644
index 000000000..1fbf53bff
Binary files /dev/null and b/site/public/assets/qrcode/image.png differ
diff --git a/site/public/assets/qrcode/indexes-base-index.png b/site/public/assets/qrcode/indexes-base-index.png
new file mode 100644
index 000000000..d328d42b4
Binary files /dev/null and b/site/public/assets/qrcode/indexes-base-index.png differ
diff --git a/site/public/assets/qrcode/indexes-custom-index.png b/site/public/assets/qrcode/indexes-custom-index.png
new file mode 100644
index 000000000..3f06209f2
Binary files /dev/null and b/site/public/assets/qrcode/indexes-custom-index.png differ
diff --git a/site/public/assets/qrcode/indexes-display-index.png b/site/public/assets/qrcode/indexes-display-index.png
new file mode 100644
index 000000000..669736dcf
Binary files /dev/null and b/site/public/assets/qrcode/indexes-display-index.png differ
diff --git a/site/public/assets/qrcode/indexes.png b/site/public/assets/qrcode/indexes.png
new file mode 100644
index 000000000..5befff7a4
Binary files /dev/null and b/site/public/assets/qrcode/indexes.png differ
diff --git a/site/public/assets/qrcode/input.png b/site/public/assets/qrcode/input.png
new file mode 100644
index 000000000..5282cfc67
Binary files /dev/null and b/site/public/assets/qrcode/input.png differ
diff --git a/site/public/assets/qrcode/link.png b/site/public/assets/qrcode/link.png
new file mode 100644
index 000000000..a419168a2
Binary files /dev/null and b/site/public/assets/qrcode/link.png differ
diff --git a/site/public/assets/qrcode/loading-loadingProgress-index.png b/site/public/assets/qrcode/loading-loadingProgress-index.png
new file mode 100644
index 000000000..0546d1187
Binary files /dev/null and b/site/public/assets/qrcode/loading-loadingProgress-index.png differ
diff --git a/site/public/assets/qrcode/loading.png b/site/public/assets/qrcode/loading.png
new file mode 100644
index 000000000..fed00df37
Binary files /dev/null and b/site/public/assets/qrcode/loading.png differ
diff --git a/site/public/assets/qrcode/message.png b/site/public/assets/qrcode/message.png
new file mode 100644
index 000000000..23a96102b
Binary files /dev/null and b/site/public/assets/qrcode/message.png differ
diff --git a/site/public/assets/qrcode/navbar.png b/site/public/assets/qrcode/navbar.png
new file mode 100644
index 000000000..d38452727
Binary files /dev/null and b/site/public/assets/qrcode/navbar.png differ
diff --git a/site/public/assets/qrcode/notice-bar.png b/site/public/assets/qrcode/notice-bar.png
new file mode 100644
index 000000000..bd7438d74
Binary files /dev/null and b/site/public/assets/qrcode/notice-bar.png differ
diff --git a/site/public/assets/qrcode/overlay.png b/site/public/assets/qrcode/overlay.png
new file mode 100644
index 000000000..3d9b23fda
Binary files /dev/null and b/site/public/assets/qrcode/overlay.png differ
diff --git a/site/public/assets/qrcode/picker.png b/site/public/assets/qrcode/picker.png
new file mode 100644
index 000000000..630f37eb1
Binary files /dev/null and b/site/public/assets/qrcode/picker.png differ
diff --git a/site/public/assets/qrcode/popup.png b/site/public/assets/qrcode/popup.png
new file mode 100644
index 000000000..1ffbef043
Binary files /dev/null and b/site/public/assets/qrcode/popup.png differ
diff --git a/site/public/assets/qrcode/progress.png b/site/public/assets/qrcode/progress.png
new file mode 100644
index 000000000..d48bba6bc
Binary files /dev/null and b/site/public/assets/qrcode/progress.png differ
diff --git a/site/public/assets/qrcode/pull-down-refresh.png b/site/public/assets/qrcode/pull-down-refresh.png
new file mode 100644
index 000000000..d1e2c88f6
Binary files /dev/null and b/site/public/assets/qrcode/pull-down-refresh.png differ
diff --git a/site/public/assets/qrcode/radio.png b/site/public/assets/qrcode/radio.png
new file mode 100644
index 000000000..c5c8e8a08
Binary files /dev/null and b/site/public/assets/qrcode/radio.png differ
diff --git a/site/public/assets/qrcode/rate.png b/site/public/assets/qrcode/rate.png
new file mode 100644
index 000000000..a414eb041
Binary files /dev/null and b/site/public/assets/qrcode/rate.png differ
diff --git a/site/public/assets/qrcode/result-result-page.png b/site/public/assets/qrcode/result-result-page.png
new file mode 100644
index 000000000..78b79c65b
Binary files /dev/null and b/site/public/assets/qrcode/result-result-page.png differ
diff --git a/site/public/assets/qrcode/result.png b/site/public/assets/qrcode/result.png
new file mode 100644
index 000000000..e095a05c6
Binary files /dev/null and b/site/public/assets/qrcode/result.png differ
diff --git a/site/public/assets/qrcode/search.png b/site/public/assets/qrcode/search.png
new file mode 100644
index 000000000..435707797
Binary files /dev/null and b/site/public/assets/qrcode/search.png differ
diff --git a/site/public/assets/qrcode/side-bar-base-index.png b/site/public/assets/qrcode/side-bar-base-index.png
new file mode 100644
index 000000000..16d644cfc
Binary files /dev/null and b/site/public/assets/qrcode/side-bar-base-index.png differ
diff --git a/site/public/assets/qrcode/side-bar-custom-index.png b/site/public/assets/qrcode/side-bar-custom-index.png
new file mode 100644
index 000000000..50d0943bb
Binary files /dev/null and b/site/public/assets/qrcode/side-bar-custom-index.png differ
diff --git a/site/public/assets/qrcode/side-bar-switch-index.png b/site/public/assets/qrcode/side-bar-switch-index.png
new file mode 100644
index 000000000..8649dde74
Binary files /dev/null and b/site/public/assets/qrcode/side-bar-switch-index.png differ
diff --git a/site/public/assets/qrcode/side-bar.png b/site/public/assets/qrcode/side-bar.png
new file mode 100644
index 000000000..2a53187ff
Binary files /dev/null and b/site/public/assets/qrcode/side-bar.png differ
diff --git a/site/public/assets/qrcode/skeleton.png b/site/public/assets/qrcode/skeleton.png
new file mode 100644
index 000000000..1ef4dbd4b
Binary files /dev/null and b/site/public/assets/qrcode/skeleton.png differ
diff --git a/site/public/assets/qrcode/slider.png b/site/public/assets/qrcode/slider.png
new file mode 100644
index 000000000..04402aede
Binary files /dev/null and b/site/public/assets/qrcode/slider.png differ
diff --git a/site/public/assets/qrcode/stepper.png b/site/public/assets/qrcode/stepper.png
new file mode 100644
index 000000000..6bc5e7b0e
Binary files /dev/null and b/site/public/assets/qrcode/stepper.png differ
diff --git a/site/public/assets/qrcode/steps.png b/site/public/assets/qrcode/steps.png
new file mode 100644
index 000000000..519ebcbf5
Binary files /dev/null and b/site/public/assets/qrcode/steps.png differ
diff --git a/site/public/assets/qrcode/sticky.png b/site/public/assets/qrcode/sticky.png
new file mode 100644
index 000000000..594f69a33
Binary files /dev/null and b/site/public/assets/qrcode/sticky.png differ
diff --git a/site/public/assets/qrcode/swipe-cell.png b/site/public/assets/qrcode/swipe-cell.png
new file mode 100644
index 000000000..68e8fc3d7
Binary files /dev/null and b/site/public/assets/qrcode/swipe-cell.png differ
diff --git a/site/public/assets/qrcode/swiper.png b/site/public/assets/qrcode/swiper.png
new file mode 100644
index 000000000..309aab3c8
Binary files /dev/null and b/site/public/assets/qrcode/swiper.png differ
diff --git a/site/public/assets/qrcode/switch.png b/site/public/assets/qrcode/switch.png
new file mode 100644
index 000000000..bc86e847b
Binary files /dev/null and b/site/public/assets/qrcode/switch.png differ
diff --git a/site/public/assets/qrcode/tab-bar.png b/site/public/assets/qrcode/tab-bar.png
new file mode 100644
index 000000000..dc8bd4036
Binary files /dev/null and b/site/public/assets/qrcode/tab-bar.png differ
diff --git a/site/public/assets/qrcode/tabs.png b/site/public/assets/qrcode/tabs.png
new file mode 100644
index 000000000..462987b25
Binary files /dev/null and b/site/public/assets/qrcode/tabs.png differ
diff --git a/site/public/assets/qrcode/tag.png b/site/public/assets/qrcode/tag.png
new file mode 100644
index 000000000..811e34a7e
Binary files /dev/null and b/site/public/assets/qrcode/tag.png differ
diff --git a/site/public/assets/qrcode/textarea.png b/site/public/assets/qrcode/textarea.png
new file mode 100644
index 000000000..a2239f85e
Binary files /dev/null and b/site/public/assets/qrcode/textarea.png differ
diff --git a/site/public/assets/qrcode/toast.png b/site/public/assets/qrcode/toast.png
new file mode 100644
index 000000000..b8ee23706
Binary files /dev/null and b/site/public/assets/qrcode/toast.png differ
diff --git a/site/public/assets/qrcode/transition.png b/site/public/assets/qrcode/transition.png
new file mode 100644
index 000000000..631101171
Binary files /dev/null and b/site/public/assets/qrcode/transition.png differ
diff --git a/site/public/assets/qrcode/tree-select.png b/site/public/assets/qrcode/tree-select.png
new file mode 100644
index 000000000..4c6453d09
Binary files /dev/null and b/site/public/assets/qrcode/tree-select.png differ
diff --git a/site/public/assets/qrcode/upload.png b/site/public/assets/qrcode/upload.png
new file mode 100644
index 000000000..cca658ae5
Binary files /dev/null and b/site/public/assets/qrcode/upload.png differ
diff --git a/site/public/css-specific.png b/site/public/css-specific.png
new file mode 100644
index 000000000..f3fe2da91
Binary files /dev/null and b/site/public/css-specific.png differ
diff --git a/site/site.config.mjs b/site/site.config.mjs
index 3ae895a7b..a3caf8254 100644
--- a/site/site.config.mjs
+++ b/site/site.config.mjs
@@ -23,7 +23,7 @@ export default {
name: 'used',
meta: { docType: 'explain' },
path: '/miniprogram/used',
- component: () => import('@/../USED.md'),
+ component: () => import('@pages/used.vue'),
},
{
title: '更新日志',
@@ -32,6 +32,20 @@ export default {
path: '/miniprogram/changelog',
component: () => import('~/CHANGELOG.md'),
},
+ {
+ title: '样式覆盖',
+ name: 'custom-style',
+ meta: { docType: 'explain' },
+ path: '/miniprogram/custom-style',
+ component: () => import('@docs/custom-style.md'),
+ },
+ {
+ title: '自定义主题',
+ name: 'custom-theme',
+ meta: { docType: 'explain' },
+ path: '/miniprogram/custom-theme',
+ component: () => import('@docs/custom-theme.md'),
+ },
{
title: '组件概览',
name: 'overview',
@@ -73,12 +87,33 @@ export default {
path: '/miniprogram/components/icon',
component: () => import('@/icon/README.md'),
},
+ {
+ title: 'Layout 布局',
+ name: 'layout',
+ meta: { docType: 'base' },
+ path: '/miniprogram/components/col',
+ component: () => import('@/col/README.md'),
+ },
+ {
+ title: 'Link 链接',
+ name: 'link',
+ meta: { docType: 'base' },
+ path: '/miniprogram/components/link',
+ component: () => import('@/link/README.md'),
+ },
],
},
{
title: '导航',
type: 'component',
children: [
+ {
+ title: 'BackTop 返回顶部',
+ name: 'back-top',
+ meta: { docType: 'navigation' },
+ path: '/miniprogram/components/back-top',
+ component: () => import('@/back-top/README.md'),
+ },
{
title: 'Drawer 抽屉',
name: 'drawer',
@@ -86,13 +121,6 @@ export default {
path: '/miniprogram/components/drawer',
component: () => import('@/drawer/README.md'),
},
- // {
- // title: 'ImageViewer 图片预览',
- // name: 'image-viewer',
- // meta: { docType: 'navigation' },
- // path: '/miniprogram/components/image-viewer',
- // component: () => import('@/image-viewer/README.md'),
- // },
{
title: 'Indexes 索引',
name: 'indexes',
@@ -101,19 +129,19 @@ export default {
component: () => import('@/indexes/README.md'),
},
{
- title: 'Navbar 导航条',
+ title: 'Navbar 导航栏',
name: 'navbar',
meta: { docType: 'navigation' },
path: '/miniprogram/components/navbar',
component: () => import('@/navbar/README.md'),
},
- // {
- // title: 'SegmentedControl 分段器',
- // name: 'segmented-control',
- // meta: { docType: 'navigation' },
- // path: '/miniprogram/components/segmented-control',
- // component: () => import('@/segmented-control/README.md'),
- // },
+ {
+ title: 'SideBar 侧边栏',
+ name: 'sidebar',
+ meta: { docType: 'navigation' },
+ path: '/miniprogram/components/side-bar',
+ component: () => import('@/side-bar/README.md'),
+ },
{
title: 'Steps 步骤条',
name: 'steps',
@@ -142,7 +170,21 @@ export default {
type: 'component',
children: [
{
- title: 'CheckBox 复选框',
+ title: 'Calendar 日历',
+ name: 'calendar',
+ meta: { docType: 'form' },
+ path: '/miniprogram/components/calendar',
+ component: () => import('@/calendar/README.md'),
+ },
+ {
+ title: 'Cascader 级联选择器',
+ name: 'cascader',
+ meta: { docType: 'form' },
+ path: '/miniprogram/components/cascader',
+ component: () => import('@/cascader/README.md'),
+ },
+ {
+ title: 'CheckBox 多选框',
name: 'checkbox',
meta: { docType: 'form' },
path: '/miniprogram/components/checkbox',
@@ -219,7 +261,14 @@ export default {
component: () => import('@/textarea/README.md'),
},
{
- title: 'UpLoad 上传',
+ title: 'TreeSelect 树形选择',
+ name: 'treeSelect',
+ meta: { docType: 'form' },
+ path: '/miniprogram/components/tree-select',
+ component: () => import('@/tree-select/README.md'),
+ },
+ {
+ title: 'Upload 上传',
name: 'upload',
meta: { docType: 'form' },
path: '/miniprogram/components/upload',
@@ -245,7 +294,6 @@ export default {
path: '/miniprogram/components/badge',
component: () => import('@/badge/README.md'),
},
-
{
title: 'Cell 单元格',
name: 'cell',
@@ -267,13 +315,6 @@ export default {
path: '/miniprogram/components/count-down',
component: () => import('@/count-down/README.md'),
},
- {
- title: 'DropdownMenu 下拉菜单',
- name: 'dropdown-menu',
- meta: { docType: 'data' },
- path: '/miniprogram/components/dropdown-menu',
- component: () => import('@/dropdown-menu/README.md'),
- },
{
title: 'Empty 空状态',
name: 'empty',
@@ -288,6 +329,13 @@ export default {
path: '/miniprogram/components/footer',
component: () => import('@/footer/README.md'),
},
+ {
+ title: 'Image 图片',
+ name: 'image',
+ meta: { docType: 'data' },
+ path: '/miniprogram/components/image',
+ component: () => import('@/image/README.md'),
+ },
{
title: 'Grid 宫格',
name: 'grid',
@@ -296,11 +344,25 @@ export default {
component: () => import('@/grid/README.md'),
},
{
- title: 'Image 图片',
- name: 'image',
+ title: 'ImageViewer 图片预览',
+ name: 'image-viewer',
meta: { docType: 'data' },
- path: '/miniprogram/components/image',
- component: () => import('@/image/README.md'),
+ path: '/miniprogram/components/image-viewer',
+ component: () => import('@/image-viewer/README.md'),
+ },
+ {
+ title: 'Progress 进度条',
+ name: 'progress',
+ meta: { docType: 'message' },
+ path: '/miniprogram/components/progress',
+ component: () => import('@/progress/README.md'),
+ },
+ {
+ title: 'Result 结果',
+ name: 'result',
+ meta: { docType: 'data' },
+ path: '/miniprogram/components/result',
+ component: () => import('@/result/README.md'),
},
{
title: 'Skeleton 骨架屏',
@@ -310,9 +372,9 @@ export default {
component: () => import('@/skeleton/README.md'),
},
{
- title: 'Sticky 吸顶容器',
+ title: 'Sticky 吸顶',
name: 'sticky',
- meta: { docType: 'data' },
+ meta: { docType: 'navigation' },
path: '/miniprogram/components/sticky',
component: () => import('@/sticky/README.md'),
},
@@ -333,7 +395,7 @@ export default {
],
},
{
- title: '消息提醒',
+ title: '反馈',
type: 'component', // 组件文档
children: [
{
@@ -344,19 +406,19 @@ export default {
component: () => import('@/action-sheet/README.md'),
},
{
- title: 'BackTop 返回顶部',
- name: 'back-top',
- meta: { docType: 'navigation' },
- path: '/miniprogram/components/back-top',
- component: () => import('@/back-top/README.md'),
- },
- {
- title: 'Dialog 弹出框',
+ title: 'Dialog 对话框',
name: 'dialog',
meta: { docType: 'message' },
path: '/miniprogram/components/dialog',
component: () => import('@/dialog/README.md'),
},
+ {
+ title: 'DropdownMenu 下拉菜单',
+ name: 'dropdown-menu',
+ meta: { docType: 'navigation' },
+ path: '/miniprogram/components/dropdown-menu',
+ component: () => import('@/dropdown-menu/README.md'),
+ },
{
title: 'Loading 加载',
name: 'loading',
@@ -371,13 +433,20 @@ export default {
path: '/miniprogram/components/message',
component: () => import('@/message/README.md'),
},
- // {
- // title: 'NoticeBar 公告栏',
- // name: 'noticebar',
- // meta: { docType: 'message' },
- // path: '/miniprogram/components/noticebar',
- // component: () => import('@/noticebar/README.md'),
- // },
+ {
+ title: 'NoticeBar 公告栏',
+ name: 'noticebar',
+ meta: { docType: 'message' },
+ path: '/miniprogram/components/notice-bar',
+ component: () => import('@/notice-bar/README.md'),
+ },
+ {
+ title: 'Overlay 遮罩层',
+ name: 'overlay',
+ meta: { docType: 'message' },
+ path: '/miniprogram/components/overlay',
+ component: () => import('@/overlay/README.md'),
+ },
{
title: 'Popup 弹出层',
name: 'popup',
@@ -385,13 +454,6 @@ export default {
path: '/miniprogram/components/popup',
component: () => import('@/popup/README.md'),
},
- {
- title: 'Progress 进度条',
- name: 'progress',
- meta: { docType: 'message' },
- path: '/miniprogram/components/progress',
- component: () => import('@/progress/README.md'),
- },
{
title: 'PullDownRefresh 下拉刷新',
name: 'pullDownRefresh',
diff --git a/site/vite.config.ts b/site/vite.config.ts
index 83148d5a9..4e595f412 100644
--- a/site/vite.config.ts
+++ b/site/vite.config.ts
@@ -23,6 +23,7 @@ export default ({ mode }: any) => {
'@common': path.resolve(__dirname, '../common'),
'@components': path.resolve(__dirname, './components'),
'@docs': path.resolve(__dirname, './docs'),
+ '@pages': path.resolve(__dirname, './pages'),
},
},
server: {
diff --git a/src/.wechatide.ib.json b/src/.wechatide.ib.json
new file mode 100644
index 000000000..461d4e183
--- /dev/null
+++ b/src/.wechatide.ib.json
@@ -0,0 +1,3895 @@
+{
+ "key": "TDesign",
+ "label": "Tdesign",
+ "components": {
+ "t-action-sheet": {
+ "key": "t-action-sheet",
+ "label": "动作面板",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-actionsheet.png",
+ "properties": [
+ {
+ "key": "cancelText",
+ "type": ["String"],
+ "desc": "设置取消按钮的文本",
+ "label": ""
+ },
+ {
+ "key": "count",
+ "type": ["Number"],
+ "desc": "设置每页展示菜单的数量,仅当 type=grid 时有效",
+ "label": ""
+ },
+ {
+ "key": "items",
+ "type": ["Array"],
+ "desc": "菜单项",
+ "label": ""
+ },
+ {
+ "key": "showCancel",
+ "type": ["Boolean"],
+ "desc": "是否显示取消按钮",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "展示类型,列表和表格形式展示",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "显示与隐藏",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:cancel",
+ "desc": "点击取消按钮时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:close",
+ "desc": "关闭时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:selected",
+ "desc": "选择菜单项时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./action-sheet/action-sheet"
+ },
+ "t-avatar-group": {
+ "key": "t-avatar-group",
+ "label": "头像组",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-avatar.png",
+ "properties": [
+ {
+ "key": "cascading",
+ "type": ["String"],
+ "desc": "图片之间的层叠关系,可选值:左侧图片在上和右侧图片在上",
+ "label": ""
+ },
+ {
+ "key": "collapseAvatar",
+ "type": ["String"],
+ "desc": "头像数量超出时,会出现一个头像折叠元素。该元素内容可自定义。默认为 `+N`。示例:`+5`,`...`, `更多`",
+ "label": ""
+ },
+ {
+ "key": "max",
+ "type": ["Number"],
+ "desc": "能够同时显示的最多头像数量",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "尺寸,示例值:small/medium/large/24px/38px 等。优先级低于 Avatar.size",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-image", "t-class-content"],
+ "tpl": "",
+ "require": {
+ "t-avatar": "./avatar/avatar"
+ },
+ "path": "./avatar/avatar-group"
+ },
+ "t-avatar": {
+ "key": "t-avatar",
+ "label": "头像",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-avatar.png",
+ "properties": [
+ {
+ "key": "alt",
+ "type": ["String"],
+ "desc": "头像替换文本,仅当图片加载失败时有效",
+ "label": ""
+ },
+ {
+ "key": "badgeProps",
+ "type": ["Object"],
+ "desc": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
+ "label": ""
+ },
+ {
+ "key": "hideOnLoadFailed",
+ "type": ["Boolean"],
+ "desc": "加载失败时隐藏图片",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标",
+ "label": ""
+ },
+ {
+ "key": "image",
+ "type": ["String"],
+ "desc": "图片地址",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "形状",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "尺寸,示例值:small/medium/large/24px/38px 等,默认为 large",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "events": [
+ {
+ "key": "bind:error",
+ "desc": "图片加载失败时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./avatar/avatar"
+ },
+ "t-back-top": {
+ "key": "t-back-top",
+ "label": "回到顶部",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-backtop.png",
+ "properties": [
+ {
+ "key": "fixed",
+ "type": ["Boolean"],
+ "desc": "是否绝对定位固定到屏幕右下方",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标",
+ "label": ""
+ },
+ {
+ "key": "text",
+ "type": ["String"],
+ "desc": "文案",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "预设的样式类型",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-icon", "t-class-text"],
+ "events": [
+ {
+ "key": "bind:to-top",
+ "desc": "点击触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./back-top/back-top"
+ },
+ "t-badge": {
+ "key": "t-badge",
+ "label": "徽标数",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-badge.png",
+ "properties": [
+ {
+ "key": "color",
+ "type": ["String"],
+ "desc": "颜色",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "徽标内容,示例:`content='自定义内容'`。也可以使用默认插槽定义",
+ "label": ""
+ },
+ {
+ "key": "count",
+ "type": ["String", "Number"],
+ "desc": "徽标右上角内容。可以是数字,也可以是文字。如:'new'/3/99+。特殊:值为空表示使用插槽渲染",
+ "label": ""
+ },
+ {
+ "key": "dot",
+ "type": ["Boolean"],
+ "desc": "是否为红点",
+ "label": ""
+ },
+ {
+ "key": "maxCount",
+ "type": ["Number"],
+ "desc": "封顶的数字值",
+ "label": ""
+ },
+ {
+ "key": "offset",
+ "type": ["Array"],
+ "desc": "设置状态点的位置偏移,示例:[-10, 20] 或 ['10em', '8rem']",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "形状",
+ "label": ""
+ },
+ {
+ "key": "showZero",
+ "type": ["Boolean"],
+ "desc": "当数值为 0 时,是否展示徽标",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "尺寸",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-content", "t-class-count"],
+ "tpl": "",
+ "path": "./badge/badge"
+ },
+ "t-button": {
+ "key": "t-button",
+ "label": "按钮",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-button.png",
+ "properties": [
+ {
+ "key": "block",
+ "type": ["Boolean"],
+ "desc": "是否为块级元素",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "按钮内容",
+ "label": ""
+ },
+ {
+ "key": "customDataset",
+ "type": ["Object"],
+ "desc": "自定义 dataset,可通过 event.currentTarget.dataset.custom 获取",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用按钮",
+ "label": ""
+ },
+ {
+ "key": "ghost",
+ "type": ["Boolean"],
+ "desc": "是否为幽灵按钮(镂空按钮)",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标名称",
+ "label": ""
+ },
+ {
+ "key": "loading",
+ "type": ["Boolean"],
+ "desc": "是否显示为加载状态",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "按钮形状,有 4 种:长方形、正方形、圆角长方形、圆形",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "组件尺寸",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "组件风格,依次为品牌色、危险色",
+ "label": ""
+ },
+ {
+ "key": "type",
+ "type": ["String"],
+ "desc": "同小程序的 formType",
+ "label": ""
+ },
+ {
+ "key": "variant",
+ "type": ["String"],
+ "desc": "按钮形式,基础、线框、文字",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-icon"],
+ "events": [
+ {
+ "key": "bind:click",
+ "desc": "点击时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./button/button"
+ },
+ "t-cell-group": {
+ "key": "t-cell-group",
+ "label": "单元格组",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-cell.png",
+ "properties": [
+ {
+ "key": "bordered",
+ "type": ["Boolean"],
+ "desc": "是否显示组边框",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "单元格组标题",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "tpl": "",
+ "require": {
+ "t-cell": "./cell/cell"
+ },
+ "path": "./cell-group/cell-group"
+ },
+ "t-cell": {
+ "key": "t-cell",
+ "label": "单元格",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-cell.png",
+ "properties": [
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "内容的对齐方式,默认居中对齐",
+ "label": ""
+ },
+ {
+ "key": "arrow",
+ "type": ["Boolean"],
+ "desc": "是否显示右侧箭头",
+ "label": ""
+ },
+ {
+ "key": "bordered",
+ "type": ["Boolean"],
+ "desc": "是否显示下边框",
+ "label": ""
+ },
+ {
+ "key": "description",
+ "type": ["String"],
+ "desc": "下方内容描述",
+ "label": ""
+ },
+ {
+ "key": "hover",
+ "type": ["Boolean"],
+ "desc": "是否开启点击反馈",
+ "label": ""
+ },
+ {
+ "key": "image",
+ "type": ["String"],
+ "desc": "主图",
+ "label": ""
+ },
+ {
+ "key": "jumpType",
+ "type": ["String"],
+ "desc": "链接跳转类型",
+ "label": ""
+ },
+ {
+ "key": "leftIcon",
+ "type": ["String"],
+ "desc": "左侧图标,出现在单元格标题的左侧",
+ "label": ""
+ },
+ {
+ "key": "note",
+ "type": ["String"],
+ "desc": "和标题同行的说明文字",
+ "label": ""
+ },
+ {
+ "key": "required",
+ "type": ["Boolean"],
+ "desc": "是否显示表单必填星号",
+ "label": ""
+ },
+ {
+ "key": "rightIcon",
+ "type": ["String"],
+ "desc": "最右侧图标",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "标题",
+ "label": ""
+ },
+ {
+ "key": "url",
+ "type": ["String"],
+ "desc": "点击后跳转链接地址。如果值为空,则表示不需要跳转",
+ "label": ""
+ }
+ ],
+ "externalClasses": [
+ "t-class",
+ "t-class-title",
+ "t-class-note",
+ "t-class-description",
+ "t-class-thumb",
+ "t-class-hover",
+ "t-class-left",
+ "t-class-right"
+ ],
+ "events": [
+ {
+ "key": "bind:click",
+ "desc": "右侧内容",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./cell/cell"
+ },
+ "t-check-tag": {
+ "key": "t-check-tag",
+ "label": "可选标签",
+ "icon": "",
+ "properties": [
+ {
+ "key": "checked",
+ "type": ["Boolean"],
+ "desc": "标签选中的状态,默认风格(theme=default)才有选中态",
+ "label": ""
+ },
+ {
+ "key": "closable",
+ "type": ["Boolean"],
+ "desc": "标签是否可关闭",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String", "Number"],
+ "desc": "组件子元素",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "标签中的图标,可自定义图标呈现",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "标签类型,有三种:方形、圆角方形、标记型",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "标签尺寸",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "组件子元素",
+ "label": ""
+ },
+ {
+ "key": "bind:click",
+ "desc": "点击标签时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "check tag",
+ "path": "./check-tag/check-tag"
+ },
+ "t-checkbox-group": {
+ "key": "t-checkbox-group",
+ "label": "多选框组",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-checkbox.png",
+ "properties": [
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件",
+ "label": ""
+ },
+ {
+ "key": "max",
+ "type": ["Number"],
+ "desc": "支持最多选中的数量",
+ "label": ""
+ },
+ {
+ "key": "name",
+ "type": ["String"],
+ "desc": "统一设置内部复选框 HTML 属性",
+ "label": ""
+ },
+ {
+ "key": "options",
+ "type": ["Array"],
+ "desc": "以配置形式设置子元素。示例1:`['北京', '上海']` ,示例2: `[{ label: '全选', checkAll: true }, { label: '上海', value: 'shanghai' }]`。checkAll 值为 true 表示当前选项为「全选选项」",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["Array"],
+ "desc": "选中值",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "值变化时触发。`context.current` 表示当前变化的数据项,如果是全选则为空;`context.type` 表示引起选中数据变化的是选中或是取消选中,`context.option` 表示当前变化的数据项",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "require": {
+ "t-checkbox": "./checkbox/checkbox"
+ },
+ "path": "./checkbox-group/checkbox-group"
+ },
+ "t-checkbox": {
+ "key": "t-checkbox",
+ "label": "多选框",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-checkbox.png",
+ "properties": [
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "多选框和内容相对位置",
+ "label": ""
+ },
+ {
+ "key": "checkAll",
+ "type": ["Boolean"],
+ "desc": "用于标识是否为「全选选项」。单独使用无效,需在 CheckboxGroup 中使用",
+ "label": ""
+ },
+ {
+ "key": "checked",
+ "type": ["Boolean"],
+ "desc": "是否选中",
+ "label": ""
+ },
+ {
+ "key": "color",
+ "type": ["String"],
+ "desc": "多选框颜色",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "多选框内容",
+ "label": ""
+ },
+ {
+ "key": "contentDisabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件内容(content)触发选中",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["Array"],
+ "desc": "自定义选中图标和非选中图标。示例:[选中态图标地址,非选中态图标地址]",
+ "label": ""
+ },
+ {
+ "key": "indeterminate",
+ "type": ["Boolean"],
+ "desc": "是否为半选",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "主文案",
+ "label": ""
+ },
+ {
+ "key": "maxContentRow",
+ "type": ["Number"],
+ "desc": "内容最大行数限制",
+ "label": ""
+ },
+ {
+ "key": "maxLabelRow",
+ "type": ["Number"],
+ "desc": "主文案最大行数限制",
+ "label": ""
+ },
+ {
+ "key": "name",
+ "type": ["String"],
+ "desc": "HTML 元素原生属性",
+ "label": ""
+ },
+ {
+ "key": "readonly",
+ "type": ["Boolean"],
+ "desc": "只读状态",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "多选框的值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-icon", "t-class-label", "t-class-content", "t-class-border"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "值变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./checkbox/checkbox"
+ },
+ "t-collapse-panel": {
+ "key": "t-collapse-panel",
+ "label": "折叠面板",
+ "icon": "",
+ "properties": [
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "折叠面板内容",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "禁止当前面板展开,优先级大于 Collapse 的同名属性",
+ "label": ""
+ },
+ {
+ "key": "expandIcon",
+ "type": ["Boolean"],
+ "desc": "当前折叠面板展开图标,优先级大于 Collapse 的同名属性",
+ "label": ""
+ },
+ {
+ "key": "header",
+ "type": ["String"],
+ "desc": "面板头内容",
+ "label": ""
+ },
+ {
+ "key": "headerRightContent",
+ "type": ["String"],
+ "desc": "面板头的右侧区域,一般用于呈现面板操作",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "当前面板唯一标识,如果值为空则取当前面下标兜底作为唯一标识",
+ "label": ""
+ }
+ ],
+ "tpl": "此处可自定义内容",
+ "path": "./collapse/collapse-panel"
+ },
+ "t-collapse": {
+ "key": "t-collapse",
+ "label": "折叠",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-collapse.png",
+ "properties": [
+ {
+ "key": "defaultExpandAll",
+ "type": ["Boolean"],
+ "desc": "默认是否展开全部",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用面板展开/收起操作",
+ "label": ""
+ },
+ {
+ "key": "expandIcon",
+ "type": ["Boolean"],
+ "desc": "展开图标。值为 undefined 或 false 则不显示展开图标;值为 true 显示默认图标;值类型为函数,则表示完全自定义展开图标",
+ "label": ""
+ },
+ {
+ "key": "expandMutex",
+ "type": ["Boolean"],
+ "desc": "每个面板互斥展开,每次只展开一个面板",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["Array"],
+ "desc": "展开的面板集合",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "切换面板时触发,返回变化的值",
+ "label": ""
+ }
+ ],
+ "tpl": "此处可自定义内容",
+ "require": {
+ "t-collapse-panel": "./collapse/collapse-panel"
+ },
+ "path": "./collapse/collapse"
+ },
+ "t-date-time-picker": {
+ "key": "t-date-time-picker",
+ "label": "日期时间选择器",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-datetimepicker.png",
+ "properties": [
+ {
+ "key": "cancelBtn",
+ "type": ["String"],
+ "desc": "取消按钮文字",
+ "label": ""
+ },
+ {
+ "key": "confirmBtn",
+ "type": ["String"],
+ "desc": "确定按钮文字",
+ "label": ""
+ },
+ {
+ "key": "end",
+ "type": ["String", "Number"],
+ "desc": "选择器的结束时间",
+ "label": ""
+ },
+ {
+ "key": "footer",
+ "type": ["String"],
+ "desc": "底部内容",
+ "label": ""
+ },
+ {
+ "key": "format",
+ "type": ["String"],
+ "desc": "用于格式化日期,[详细文档](https://day.js.org/docs/en/display/format)",
+ "label": ""
+ },
+ {
+ "key": "header",
+ "type": ["Boolean"],
+ "desc": "头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 TNode 表示自定义头部内容",
+ "label": ""
+ },
+ {
+ "key": "mode",
+ "type": ["String", "Array"],
+ "desc": "选择器模式,用于表示可以选择到哪一个层级。【示例一】year 或者 ['year'] 表示纯日期选择器,只能选择到年份,只显示年份。【示例二】'hour' 或 ['hour'] 表示纯时间选择器,只能选择到小时维度。【示例三】['year', 'month', 'date', 'hour', 'minute'] 表示,日期和时间 混合选择器,可以选择到具体哪一分钟,显示全部时间:年/月/日/时/分",
+ "label": ""
+ },
+ {
+ "key": "showWeek",
+ "type": ["Boolean"],
+ "desc": "【开发中】是否在日期旁边显示周几(如周一,周二,周日等)",
+ "label": ""
+ },
+ {
+ "key": "start",
+ "type": ["String", "Number"],
+ "desc": "选择器的开始时间",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "标题",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "选中值",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "是否显示",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-confirm", "t-class-cancel", "t-class-title"],
+ "events": [
+ {
+ "key": "bind:cancel",
+ "desc": "取消按钮点击时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:change",
+ "desc": "选中值发生变化时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:column-change",
+ "desc": "每一列选中数据变化时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:confirm",
+ "desc": "确认按钮点击时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./date-time-picker/date-time-picker"
+ },
+ "t-dialog": {
+ "key": "t-dialog",
+ "label": "对话框",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dialog.png",
+ "properties": [
+ {
+ "key": "actions",
+ "type": ["Array"],
+ "desc": "操作栏",
+ "label": ""
+ },
+ {
+ "key": "buttonLayout",
+ "type": ["String"],
+ "desc": "多按钮排列方式",
+ "label": ""
+ },
+ {
+ "key": "cancelBtn",
+ "type": ["String", "Object"],
+ "desc": "取消按钮,可自定义。值为 null 则不显示取消按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制取消事件",
+ "label": ""
+ },
+ {
+ "key": "closeOnOverlayClick",
+ "type": ["Boolean"],
+ "desc": "点击蒙层时是否触发关闭事件",
+ "label": ""
+ },
+ {
+ "key": "confirmBtn",
+ "type": ["String", "Object"],
+ "desc": "确认按钮。值为 null 则不显示确认按钮。值类型为字符串,则表示自定义按钮文本,值类型为 Object 则表示透传 Button 组件属性。使用 TNode 自定义按钮时,需自行控制确认事件",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "内容",
+ "label": ""
+ },
+ {
+ "key": "preventScrollThrough",
+ "type": ["Boolean"],
+ "desc": "防止滚动穿透",
+ "label": ""
+ },
+ {
+ "key": "showInAttachedElement",
+ "type": ["Boolean"],
+ "desc": "【开发中】仅在挂载元素中显示抽屉,默认在浏览器可视区域显示。父元素需要有定位属性,如:position: relative",
+ "label": ""
+ },
+ {
+ "key": "showOverlay",
+ "type": ["Boolean"],
+ "desc": "是否显示遮罩层",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "标题",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "控制对话框是否显示",
+ "label": ""
+ },
+ {
+ "key": "zIndex",
+ "type": ["Number"],
+ "desc": "对话框层级,Web 侧样式默认为 2500,移动端和小程序样式默认为 1500",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-content", "t-class-confirm", "t-class-cancel"],
+ "events": [
+ {
+ "key": "bind:cancel",
+ "desc": "如果“取消”按钮存在,则点击“取消”按钮时触发,同时触发关闭事件",
+ "label": ""
+ },
+ {
+ "key": "bind:close",
+ "desc": "关闭事件,点击 取消按钮 或 点击蒙层 时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:overlay-click",
+ "desc": "如果蒙层存在,点击蒙层时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./dialog/dialog"
+ },
+ "t-divider": {
+ "key": "t-divider",
+ "label": "分割线",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-divider.png",
+ "properties": [
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "文本位置(仅在水平分割线有效)",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "子元素",
+ "label": ""
+ },
+ {
+ "key": "dashed",
+ "type": ["Boolean"],
+ "desc": "是否虚线(仅在水平分割线有效)",
+ "label": ""
+ },
+ {
+ "key": "layout",
+ "type": ["String"],
+ "desc": "分隔线类型有两种:水平和垂直",
+ "label": ""
+ },
+ {
+ "key": "lineColor",
+ "type": ["String"],
+ "desc": "分隔线颜色",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-line", "t-class-content"],
+ "tpl": "",
+ "path": "./divider/divider"
+ },
+ "t-drawer": {
+ "key": "t-drawer",
+ "label": "模态抽屉",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-drawer.png",
+ "properties": [
+ {
+ "key": "closeOnOverlayClick",
+ "type": ["Boolean"],
+ "desc": "点击蒙层时是否触发抽屉关闭事件",
+ "label": ""
+ },
+ {
+ "key": "destroyOnClose",
+ "type": ["Boolean"],
+ "desc": "抽屉关闭时是否销毁节点",
+ "label": ""
+ },
+ {
+ "key": "items",
+ "type": ["Array"],
+ "desc": "抽屉里的列表项",
+ "label": ""
+ },
+ {
+ "key": "placement",
+ "type": ["String"],
+ "desc": "抽屉方向",
+ "label": ""
+ },
+ {
+ "key": "showOverlay",
+ "type": ["Boolean"],
+ "desc": "是否显示遮罩层",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "组件是否可见",
+ "label": ""
+ },
+ {
+ "key": "zIndex",
+ "type": ["Number"],
+ "desc": "抽屉层级,样式默认为 1500",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:close",
+ "desc": "关闭事件,取消按钮点击时、关闭按钮点击时、点击蒙层时均会触发",
+ "label": ""
+ },
+ {
+ "key": "bind:item-click",
+ "desc": "点击抽屉里的列表项",
+ "label": ""
+ },
+ {
+ "key": "bind:overlay-click",
+ "desc": "如果蒙层存在,点击蒙层时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./drawer/drawer"
+ },
+ "t-dropdown-item": {
+ "key": "t-dropdown-item",
+ "label": "下拉菜单子项",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dropdownmenu.png",
+ "properties": [
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "标题",
+ "label": ""
+ },
+ {
+ "key": "multiple",
+ "type": ["Boolean"],
+ "desc": "是否多选",
+ "label": ""
+ },
+ {
+ "key": "options",
+ "type": ["Array"],
+ "desc": "选项数据",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./dropdown-menu/dropdown-item"
+ },
+ "t-dropdown-menu": {
+ "key": "t-dropdown-menu",
+ "label": "下拉菜单",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-dropdownmenu.png",
+ "properties": [
+ {
+ "key": "activeColor",
+ "type": ["String"],
+ "desc": "【讨论中】菜单标题和选项的选中态颜色",
+ "label": ""
+ },
+ {
+ "key": "closeOnClickOverlay",
+ "type": ["Boolean"],
+ "desc": "是否在点击遮罩层后关闭菜单",
+ "label": ""
+ },
+ {
+ "key": "duration",
+ "type": ["String", "Number"],
+ "desc": "动画时长",
+ "label": ""
+ },
+ {
+ "key": "showOverlay",
+ "type": ["Boolean"],
+ "desc": "是否显示遮罩层",
+ "label": ""
+ },
+ {
+ "key": "zIndex",
+ "type": ["Number"],
+ "desc": "菜单栏 z-index 层级",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "require": {
+ "t-dropdown-item": "./dropdown-menu/dropdown-item"
+ },
+ "path": "./dropdown-menu/dropdown-menu"
+ },
+ "t-empty": {
+ "key": "t-empty",
+ "label": "空状态",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-empty.png",
+ "properties": [
+ {
+ "key": "action",
+ "type": ["String"],
+ "desc": "操作按钮",
+ "label": ""
+ },
+ {
+ "key": "description",
+ "type": ["String"],
+ "desc": "描述文字",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标名称",
+ "label": ""
+ },
+ {
+ "key": "image",
+ "type": ["String"],
+ "desc": "图片地址",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-description", "t-class-image", "t-class-actions"],
+ "tpl": "",
+ "path": "./empty/empty"
+ },
+ "t-fab": {
+ "key": "t-fab",
+ "label": "悬浮按钮",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-fab.png",
+ "properties": [
+ {
+ "key": "buttonProps",
+ "type": ["Object"],
+ "desc": "透传至 Button 组件",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标",
+ "label": ""
+ },
+ {
+ "key": "style",
+ "type": ["String"],
+ "desc": "悬浮按钮的样式,常用于调整位置",
+ "label": ""
+ },
+ {
+ "key": "text",
+ "type": ["String"],
+ "desc": "文本内容",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:click",
+ "desc": "悬浮按钮点击事件",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./fab/fab"
+ },
+ "t-footer": {
+ "key": "t-footer",
+ "label": "布局-底部内容",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-footer.png",
+ "properties": [
+ {
+ "key": "copyright",
+ "type": ["String"],
+ "desc": "版权信息,type 为`text`生效",
+ "label": ""
+ },
+ {
+ "key": "logo",
+ "type": ["Object"],
+ "desc": "图标配置,type 为`logo`生效。`logo.icon` 表示图标链接地址,`logo.title` 表示标题文本,`logo.url` 表示链接跳转地址",
+ "label": ""
+ },
+ {
+ "key": "textLinkList",
+ "type": ["Array"],
+ "desc": "链接列表,type 为`text`生效。name 表示链接名称, url 表示链接 page 路径,目前只支持小程序内部跳转,openType 表示跳转方式",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "页脚展示类型",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./footer/footer"
+ },
+ "t-grid-item": {
+ "key": "t-grid-item",
+ "label": "宫格子项",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-grid.png",
+ "properties": [
+ {
+ "key": "badgeProps",
+ "type": ["Object"],
+ "desc": "头像右上角提示信息,继承 Badge 组件的全部特性。如:小红点,或者数字",
+ "label": ""
+ },
+ {
+ "key": "description",
+ "type": ["String"],
+ "desc": "文本以外的更多描述,辅助信息。可以通过 Props 传入文本,也可以自定义标题节点",
+ "label": ""
+ },
+ {
+ "key": "image",
+ "type": ["String"],
+ "desc": "图片,可以是图片地址,也可以自定义图片节点",
+ "label": ""
+ },
+ {
+ "key": "jumpType",
+ "type": ["String"],
+ "desc": "链接跳转类型",
+ "label": ""
+ },
+ {
+ "key": "layout",
+ "type": ["String"],
+ "desc": "内容布局方式",
+ "label": ""
+ },
+ {
+ "key": "text",
+ "type": ["String"],
+ "desc": "文本,可以通过 Props 传入文本,也可以自定义标题节点",
+ "label": ""
+ },
+ {
+ "key": "url",
+ "type": ["String"],
+ "desc": "点击后的跳转链接",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-image", "t-class-text", "t-class-description"],
+ "tpl": "",
+ "path": "./grid-item/grid-item"
+ },
+ "t-grid": {
+ "key": "t-grid",
+ "label": "栅格",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-grid.png",
+ "properties": [
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "内容对齐方式",
+ "label": ""
+ },
+ {
+ "key": "border",
+ "type": ["Boolean", "Object"],
+ "desc": "边框,默认不显示。值为 true 则显示默认边框,值类型为 object 则表示自定义边框样式",
+ "label": ""
+ },
+ {
+ "key": "column",
+ "type": ["Number"],
+ "desc": "每一行的列数量",
+ "label": ""
+ },
+ {
+ "key": "gutter",
+ "type": ["Number"],
+ "desc": "间隔大小",
+ "label": ""
+ },
+ {
+ "key": "hover",
+ "type": ["Boolean"],
+ "desc": "是否开启点击反馈",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "tpl": "",
+ "require": {
+ "t-grid-item": "./grid-item/grid-item"
+ },
+ "path": "./grid/grid"
+ },
+ "t-icon": {
+ "key": "t-icon",
+ "label": "图标",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-icon.png",
+ "properties": [
+ {
+ "key": "classPrefix",
+ "type": ["String"],
+ "desc": "自定义icon前缀",
+ "label": ""
+ },
+ {
+ "key": "color",
+ "type": ["String"],
+ "desc": "图标颜色",
+ "label": ""
+ },
+ {
+ "key": "style",
+ "type": ["String"],
+ "desc": "自定义样式",
+ "label": ""
+ },
+ {
+ "key": "name",
+ "type": ["String"],
+ "desc": "图标名称",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String", "Number"],
+ "desc": "图标名称",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./icon/icon"
+ },
+ "t-image": {
+ "key": "t-image",
+ "label": "图片",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-image.png",
+ "properties": [
+ {
+ "key": "error",
+ "type": ["String"],
+ "desc": "加载失败时显示的内容。值为 `default` 则表示使用默认加载失败风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `error`;值为其他则表示普通文本内容,如“加载失败”",
+ "label": ""
+ },
+ {
+ "key": "lazy",
+ "type": ["Boolean"],
+ "desc": "是否开启图片懒加载",
+ "label": ""
+ },
+ {
+ "key": "loading",
+ "type": ["String"],
+ "desc": "加载态内容。值为 `default` 则表示使用默认加载中风格;值为空或者 `slot` 表示使用插槽渲染,插槽名称为 `loading`;值为其他则表示普通文本内容,如“加载中”",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "图片圆角类型",
+ "label": ""
+ },
+ {
+ "key": "src",
+ "type": ["String"],
+ "desc": "图片链接",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-load"],
+ "events": [
+ {
+ "key": "bind:error",
+ "desc": "图片加载失败时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:load",
+ "desc": "图片加载完成时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./image/image"
+ },
+ "t-indexes": {
+ "key": "t-indexes",
+ "label": "索引",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-indexes.png",
+ "properties": [
+ {
+ "key": "height",
+ "type": ["Number"],
+ "desc": "列表高度,未设置默认占满设备高度",
+ "label": ""
+ },
+ {
+ "key": "list",
+ "type": ["Array"],
+ "desc": "索引列表的列表数据。每个元素包含三个子元素,index(string):索引值,例如1,2,3,...或A,B,C等;title(string): 索引标题,可不填将默认设为索引值;children(Array<{title: string}>): 子元素列表,title为子元素的展示文案。",
+ "label": ""
+ },
+ {
+ "key": "sticky",
+ "type": ["Boolean"],
+ "desc": "索引是否吸顶,默认为true",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:select",
+ "desc": "点击行元素时触发事件",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./indexes/indexes"
+ },
+ "t-input": {
+ "key": "t-input",
+ "label": "输入框",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-input.png",
+ "properties": [
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "文本内容位置,居左/居中/居右",
+ "label": ""
+ },
+ {
+ "key": "borderless",
+ "type": ["Boolean"],
+ "desc": "【讨论中】是否开启无边框模式",
+ "label": ""
+ },
+ {
+ "key": "clearable",
+ "type": ["Boolean"],
+ "desc": "是否可清空",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用输入框",
+ "label": ""
+ },
+ {
+ "key": "errorMessage",
+ "type": ["String"],
+ "desc": "错误提示文本,值为空不显示(废弃属性,如果需要,请更为使用 status 和 tips)",
+ "label": ""
+ },
+ {
+ "key": "format",
+ "type": ["String"],
+ "desc": "【开发中】指定输入框展示值的格式",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "左侧文本",
+ "label": ""
+ },
+ {
+ "key": "maxcharacter",
+ "type": ["Number"],
+ "desc": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度。`maxcharacter` 和 `maxlength` 二选一使用",
+ "label": ""
+ },
+ {
+ "key": "maxlength",
+ "type": ["Number"],
+ "desc": "用户最多可以输入的文本长度,一个中文等于一个计数长度。值小于等于 0 的时候,则表示不限制输入长度。`maxcharacter` 和 `maxlength` 二选一使用",
+ "label": ""
+ },
+ {
+ "key": "placeholder",
+ "type": ["String"],
+ "desc": "占位符",
+ "label": ""
+ },
+ {
+ "key": "prefixIcon",
+ "type": ["String"],
+ "desc": "组件前置图标,值为字符串则表示图标名称",
+ "label": ""
+ },
+ {
+ "key": "readonly",
+ "type": ["Boolean"],
+ "desc": "只读状态",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "输入框尺寸",
+ "label": ""
+ },
+ {
+ "key": "status",
+ "type": ["String"],
+ "desc": "输入框状态",
+ "label": ""
+ },
+ {
+ "key": "suffix",
+ "type": ["String"],
+ "desc": "后置图标前的后置内容",
+ "label": ""
+ },
+ {
+ "key": "suffixIcon",
+ "type": ["String"],
+ "desc": "后置文本内容,值为字符串则表示图标名称",
+ "label": ""
+ },
+ {
+ "key": "tips",
+ "type": ["String"],
+ "desc": "输入框下方提示文本,会根据不同的 `status` 呈现不同的样式",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "输入框的值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-input", "t-class-placeholder", "t-class-error-msg"],
+ "events": [
+ {
+ "key": "bind:blur",
+ "desc": "失去焦点时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:change",
+ "desc": "输入框值发生变化时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:clear",
+ "desc": "清空按钮点击时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:enter",
+ "desc": "回车键按下时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:focus",
+ "desc": "获得焦点时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./input/input"
+ },
+ "t-loading": {
+ "key": "t-loading",
+ "label": "加载中",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-loading.png",
+ "properties": [
+ {
+ "key": "delay",
+ "type": ["Number"],
+ "desc": "延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒",
+ "label": ""
+ },
+ {
+ "key": "duration",
+ "type": ["Number"],
+ "desc": "加载动画执行完成一次的时间,单位:毫秒",
+ "label": ""
+ },
+ {
+ "key": "indicator",
+ "type": ["Boolean"],
+ "desc": "是否显示加载指示符",
+ "label": ""
+ },
+ {
+ "key": "inheritColor",
+ "type": ["Boolean"],
+ "desc": "是否继承父元素颜色",
+ "label": ""
+ },
+ {
+ "key": "layout",
+ "type": ["String"],
+ "desc": "对齐方式",
+ "label": ""
+ },
+ {
+ "key": "loading",
+ "type": ["Boolean"],
+ "desc": "是否处于加载状态",
+ "label": ""
+ },
+ {
+ "key": "pause",
+ "type": ["Boolean"],
+ "desc": "是否暂停动画",
+ "label": ""
+ },
+ {
+ "key": "progress",
+ "type": ["Number"],
+ "desc": "加载进度",
+ "label": ""
+ },
+ {
+ "key": "reverse",
+ "type": ["Boolean"],
+ "desc": "加载动画是否反向",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "尺寸,示例:40rpx/20px",
+ "label": ""
+ },
+ {
+ "key": "text",
+ "type": ["String"],
+ "desc": "加载提示文案",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "加载组件类型",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-text", "t-class-indicator"],
+ "tpl": "",
+ "path": "./loading/loading"
+ },
+ "t-message": {
+ "key": "t-message",
+ "label": "全局提醒",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-message.png",
+ "properties": [
+ {
+ "key": "action",
+ "type": ["String"],
+ "desc": "操作",
+ "label": ""
+ },
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "文本对齐方式",
+ "label": ""
+ },
+ {
+ "key": "closeBtn",
+ "type": ["String", "Boolean"],
+ "desc": "关闭按钮,可以自定义。值为 true 显示默认关闭按钮,值为 false 不显示关闭按钮。值类型为 string 则直接显示值,如:“关闭”。也可以完全自定义按钮",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "用于自定义消息弹出内容",
+ "label": ""
+ },
+ {
+ "key": "duration",
+ "type": ["Number"],
+ "desc": "消息内置计时器,计时到达时会触发 duration-end 事件。单位:毫秒。值为 0 则表示没有计时器。",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String", "Boolean"],
+ "desc": "消息提醒前面的图标。值为 true 则根据 theme 显示对应的图标,值为 false 则不显示图标。值为 'info' 或 'bell' 则显示组件内置图标。也可以完全自定义图标节点",
+ "label": ""
+ },
+ {
+ "key": "marquee",
+ "type": ["Boolean", "Object"],
+ "desc": "跑马灯效果。speed 指速度控制;loop 指循环播放次数,值为 -1 表示循环播放,值为 0 表示不循环播放;delay 表示延迟多久开始播放",
+ "label": ""
+ },
+ {
+ "key": "offset",
+ "type": ["Array"],
+ "desc": "相对于 placement 的偏移量,示例:[-10, 20] 或 ['10rpx', '8rpx']",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "消息组件风格",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "是否显示,隐藏时默认销毁组件",
+ "label": ""
+ },
+ {
+ "key": "zIndex",
+ "type": ["Number"],
+ "desc": "元素层级,样式默认为 5000",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-content", "t-class-icon", "t-class-action", "t-class-close-btn"],
+ "events": [
+ {
+ "key": "bind:action-btn-click",
+ "desc": "当操作按钮存在时,用户点击操作按钮时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:close-btn-click",
+ "desc": "当关闭按钮存在时,用户点击关闭按钮触发",
+ "label": ""
+ },
+ {
+ "key": "bind:duration-end",
+ "desc": "计时结束后触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./message/message"
+ },
+ "t-navbar": {
+ "key": "t-navbar",
+ "label": "导航条",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-navbar.png",
+ "properties": [
+ {
+ "key": "animation",
+ "type": ["Boolean"],
+ "desc": "是否添加动画效果",
+ "label": ""
+ },
+ {
+ "key": "background",
+ "type": ["String"],
+ "desc": "背景",
+ "label": ""
+ },
+ {
+ "key": "delta",
+ "type": ["Number"],
+ "desc": "后退按钮后退层数,含义参考 [wx.navigateBack](https://developers.weixin.qq.com/miniprogram/dev/api/route/wx.navigateBack.html),特殊的,传入 0 不会发生执行 wx.navigateBack,只会触发一个 goback 事件供自行处理。",
+ "label": ""
+ },
+ {
+ "key": "fixed",
+ "type": ["Boolean"],
+ "desc": "是否固定在顶部",
+ "label": ""
+ },
+ {
+ "key": "homeIcon",
+ "type": ["String"],
+ "desc": "首页图标地址。值为 '' 或者 undefiend 则表示不显示返回图标,值为 'circle' 表示显示默认图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址",
+ "label": ""
+ },
+ {
+ "key": "leftIcon",
+ "type": ["String"],
+ "desc": "左侧图标地址,值为 '' 或者 undefiend 则表示不显示返回图标,值为 'arrow-left' 表示显示返回图标,值为 'slot' 表示使用插槽渲染,值为其他则表示图标地址",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "页面标题",
+ "label": ""
+ },
+ {
+ "key": "titleMaxLength",
+ "type": ["Number"],
+ "desc": "标题文字最大长度,超出的范围使用 `...` 表示",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "是否显示",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-title", "t-class-left-icon", "t-class-home-icon", "t-class-capsule"],
+ "events": [
+ {
+ "key": "bind:complete",
+ "desc": "navigateBack 执行完成后触发(失败或成功均会触发)",
+ "label": ""
+ },
+ {
+ "key": "bind:fail",
+ "desc": "navigateBack 执行失败后触发",
+ "label": ""
+ },
+ {
+ "key": "bind:go-back",
+ "desc": "delta 值为 0 时,点击返回,触发该事件",
+ "label": ""
+ },
+ {
+ "key": "bind:go-home",
+ "desc": "点击 Home 触发",
+ "label": ""
+ },
+ {
+ "key": "bind:success",
+ "desc": "navigateBack 执行成功后触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./navbar/navbar"
+ },
+ "t-picker-item": {
+ "key": "t-picker-item",
+ "label": "选择器子项",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-picker.png",
+ "properties": [
+ {
+ "key": "format",
+ "type": ["String"],
+ "desc": "格式化标签",
+ "label": ""
+ },
+ {
+ "key": "options",
+ "type": ["Array"],
+ "desc": "数据源",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./picker-item/picker-item"
+ },
+ "t-picker": {
+ "key": "t-picker",
+ "label": "选择器",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-picker.png",
+ "properties": [
+ {
+ "key": "cancelBtn",
+ "type": ["String", "Object"],
+ "desc": "取消按钮文字",
+ "label": ""
+ },
+ {
+ "key": "confirmBtn",
+ "type": ["String", "Object"],
+ "desc": "确定按钮文字",
+ "label": ""
+ },
+ {
+ "key": "footer",
+ "type": ["String"],
+ "desc": "底部内容",
+ "label": ""
+ },
+ {
+ "key": "header",
+ "type": ["Boolean"],
+ "desc": "头部内容。值为 true 显示空白头部,值为 false 不显示任何内容,值类型为 TNode 表示自定义头部内容",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "标题",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["Array"],
+ "desc": "选中值",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "是否显示",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:cancel",
+ "desc": "点击取消按钮时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:change",
+ "desc": "选中变化时候触发",
+ "label": ""
+ },
+ {
+ "key": "bind:pick",
+ "desc": "任何一列选中都会触发,不同的列参数不同。`context.column` 表示第几列变化,`context.index` 表示变化那一列的选中项下标",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "require": {
+ "t-picker-item": "./picker-item/picker-item"
+ },
+ "path": "./picker/picker"
+ },
+ "t-popup": {
+ "key": "t-popup",
+ "label": "气泡框",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-popup.png",
+ "properties": [
+ {
+ "key": "closeBtn",
+ "type": ["Boolean"],
+ "desc": "关闭按钮,值类型为 Boolean 时表示是否显示关闭按钮。也可以自定义关闭按钮",
+ "label": ""
+ },
+ {
+ "key": "closeOnOverlayClick",
+ "type": ["Boolean"],
+ "desc": "点击遮罩层是否关闭",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "浮层里面的内容",
+ "label": ""
+ },
+ {
+ "key": "placement",
+ "type": ["String"],
+ "desc": "浮层出现位置",
+ "label": ""
+ },
+ {
+ "key": "preventScrollThrough",
+ "type": ["Boolean"],
+ "desc": "防止滚动穿透",
+ "label": ""
+ },
+ {
+ "key": "showOverlay",
+ "type": ["Boolean"],
+ "desc": "是否显示遮罩层",
+ "label": ""
+ },
+ {
+ "key": "transitionProps",
+ "type": ["Object"],
+ "desc": "动画效果定义",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "是否显示浮层",
+ "label": ""
+ },
+ {
+ "key": "zIndex",
+ "type": ["Number"],
+ "desc": "组件层级,Web 侧样式默认为 5500,移动端和小程序样式默认为 1500",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-overlay", "t-class-content"],
+ "events": [
+ {
+ "key": "bind:visible-change",
+ "desc": "当浮层隐藏或显示时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./popup/popup"
+ },
+ "t-progress": {
+ "key": "t-progress",
+ "label": "进度条",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-progress.png",
+ "properties": [
+ {
+ "key": "color",
+ "type": ["String", "Object", "Array"],
+ "desc": "进度条颜色。示例:'#ED7B2F' 或 'orange' 或 `['#f00', '#0ff', '#f0f']` 或 `{ '0%': '#f00', '100%': '#0ff' }` 或 `{ from: '#000', to: '#000' }` 等",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String", "Boolean"],
+ "desc": "进度百分比,可自定义",
+ "label": ""
+ },
+ {
+ "key": "percentage",
+ "type": ["Number"],
+ "desc": "进度条百分比",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String", "Number"],
+ "desc": "进度条尺寸,示例:small/medium/large/240。small 值为 72; medium 值为 112;large 值为 160",
+ "label": ""
+ },
+ {
+ "key": "status",
+ "type": ["String"],
+ "desc": "进度条状态",
+ "label": ""
+ },
+ {
+ "key": "strokeWidth",
+ "type": ["String", "Number"],
+ "desc": "进度条线宽。宽度数值不能超过 size 的一半,否则不能输出环形进度",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "进度条风格。值为 line,标签(label)显示在进度条右侧;值为 plump,标签(label)显示在进度条里面;值为 circle,标签(label)显示在进度条正中间",
+ "label": ""
+ },
+ {
+ "key": "trackColor",
+ "type": ["String"],
+ "desc": "进度条未完成部分颜色",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./progress/progress"
+ },
+ "t-pull-down-refresh": {
+ "key": "t-pull-down-refresh",
+ "label": "下拉刷新",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-pulldownrefresh.png",
+ "properties": [
+ {
+ "key": "loadingBarHeight",
+ "type": ["String", "Number"],
+ "desc": "加载中下拉高度,如果值为数字则单位是:'px'",
+ "label": ""
+ },
+ {
+ "key": "loadingProps",
+ "type": ["Object"],
+ "desc": "加载loading样式",
+ "label": ""
+ },
+ {
+ "key": "loadingTexts",
+ "type": ["Array"],
+ "desc": "提示语,组件内部默认值为 ['下拉刷新', '松手刷新', '正在刷新', '刷新完成']",
+ "label": ""
+ },
+ {
+ "key": "maxBarHeight",
+ "type": ["String", "Number"],
+ "desc": "最大下拉高度,如果值为数字则单位是:'px'",
+ "label": ""
+ },
+ {
+ "key": "refreshTimeout",
+ "type": ["Number"],
+ "desc": "刷新超时时间",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["Boolean"],
+ "desc": "组件状态,值为 `true` 表示下拉状态,值为 `false` 表示收起状态",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-loading", "t-class-text", "t-class-indicator"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "下拉或收起时触发,用户手势往下滑动触发下拉状态,手势松开触发收起状态",
+ "label": ""
+ },
+ {
+ "key": "bind:refresh",
+ "desc": "结束下拉时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:timeout",
+ "desc": "刷新超时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "拖拽该区域演示 中间下拉刷新",
+ "path": "./pull-down-refresh/pull-down-refresh"
+ },
+ "t-radio-group": {
+ "key": "t-radio-group",
+ "label": "单选框组",
+ "icon": "",
+ "properties": [
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用全部子单选框",
+ "label": ""
+ },
+ {
+ "key": "name",
+ "type": ["String"],
+ "desc": "HTML 元素原生属性",
+ "label": ""
+ },
+ {
+ "key": "options",
+ "type": ["Array"],
+ "desc": "单选组件按钮形式。RadioOption 数据类型为 string 或 number 时,表示 label 和 value 值相同",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number", "Boolean"],
+ "desc": "选中的值",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "选中值发生变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "require": {
+ "t-radio": "./radio/radio"
+ },
+ "path": "./radio-group/radio-group"
+ },
+ "t-radio": {
+ "key": "t-radio",
+ "label": "单选框",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-radio.png",
+ "properties": [
+ {
+ "key": "align",
+ "type": ["String"],
+ "desc": "复选框和内容相对位置",
+ "label": ""
+ },
+ {
+ "key": "allowUncheck",
+ "type": ["Boolean"],
+ "desc": "是否允许取消选中",
+ "label": ""
+ },
+ {
+ "key": "checked",
+ "type": ["Boolean"],
+ "desc": "是否选中",
+ "label": ""
+ },
+ {
+ "key": "color",
+ "type": ["String"],
+ "desc": "单选按钮颜色",
+ "label": ""
+ },
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "单选内容",
+ "label": ""
+ },
+ {
+ "key": "contentDisabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件内容(content)触发选中",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否为禁用态",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String", "Array"],
+ "desc": "自定义选中图标和非选中图标。示例:[选中态图标,非选中态图标]。值为 fill-circle 表示图标为填充型图标,值为 stroke-line 表示图标为描边型图标",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "主文案",
+ "label": ""
+ },
+ {
+ "key": "maxContentRow",
+ "type": ["Number"],
+ "desc": "内容最大行数限制",
+ "label": ""
+ },
+ {
+ "key": "maxLabelRow",
+ "type": ["Number"],
+ "desc": "主文案最大行数限制",
+ "label": ""
+ },
+ {
+ "key": "name",
+ "type": ["String"],
+ "desc": "HTML 元素原生属性",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number", "Boolean"],
+ "desc": "单选按钮的值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-icon", "t-class-label", "t-class-content", "t-class-border"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "值变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./radio/radio"
+ },
+ "t-rate": {
+ "key": "t-rate",
+ "label": "评分",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-rate.png",
+ "properties": [
+ {
+ "key": "allowHalf",
+ "type": ["Boolean"],
+ "desc": "是否允许半选",
+ "label": ""
+ },
+ {
+ "key": "color",
+ "type": ["String", "Array"],
+ "desc": "评分图标的颜色,样式中默认为 #ED7B2F。一个值表示设置选中高亮的五角星颜色,示例:[选中颜色]。数组则表示分别设置 选中高亮的五角星颜色 和 未选中暗灰的五角星颜色,[选中颜色,未选中颜色]。示例:['#ED7B2F', '#E3E6EB']",
+ "label": ""
+ },
+ {
+ "key": "count",
+ "type": ["Number"],
+ "desc": "评分的数量",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用评分",
+ "label": ""
+ },
+ {
+ "key": "gap",
+ "type": ["Number"],
+ "desc": "评分图标的间距",
+ "label": ""
+ },
+ {
+ "key": "showText",
+ "type": ["Boolean"],
+ "desc": "是否显示对应的辅助文字",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "评分图标的大小,示例:`20`",
+ "label": ""
+ },
+ {
+ "key": "texts",
+ "type": ["Array"],
+ "desc": "评分等级对应的辅助文字。组件内置默认值为:['极差', '失望', '一般', '满意', '惊喜']。自定义值示例:['1分', '2分', '3分', '4分', '5分']",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["Number"],
+ "desc": "选择评分的值",
+ "label": ""
+ },
+ {
+ "key": "variant",
+ "type": ["String"],
+ "desc": "形状类型,有描边类型和填充类型两种",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "评分数改变时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./rate/rate"
+ },
+ "t-search": {
+ "key": "t-search",
+ "label": "搜索",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-search.png",
+ "properties": [
+ {
+ "key": "action",
+ "type": ["String"],
+ "desc": "自定义右侧操作按钮文字",
+ "label": ""
+ },
+ {
+ "key": "center",
+ "type": ["Boolean"],
+ "desc": "是否居中",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用",
+ "label": ""
+ },
+ {
+ "key": "focus",
+ "type": ["Boolean"],
+ "desc": "是否聚焦",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "左侧文本",
+ "label": ""
+ },
+ {
+ "key": "leftIcon",
+ "type": ["String"],
+ "desc": "左侧图标",
+ "label": ""
+ },
+ {
+ "key": "placeholder",
+ "type": ["String"],
+ "desc": "占位符",
+ "label": ""
+ },
+ {
+ "key": "rightIcon",
+ "type": ["String"],
+ "desc": "右侧图标",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "搜索框形状",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String"],
+ "desc": "值",
+ "label": ""
+ }
+ ],
+ "externalClasses": [
+ "t-class",
+ "t-class-input",
+ "t-class-input-container",
+ "t-class-cancel",
+ "t-class-left",
+ "t-class-right"
+ ],
+ "events": [
+ {
+ "key": "bind:action-click",
+ "desc": "点击右侧操作按钮文字时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:blur",
+ "desc": "失去焦点时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:change",
+ "desc": "值发生变化时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:clear",
+ "desc": "点击清除时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:focus",
+ "desc": "聚焦时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:submit",
+ "desc": "提交时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./search/search"
+ },
+ "t-skeleton": {
+ "key": "t-skeleton",
+ "label": "骨架屏",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-skeleton.png",
+ "properties": [
+ {
+ "key": "animation",
+ "type": ["String"],
+ "desc": "动画效果,有「渐变加载动画」和「闪烁加载动画」两种。值为 'none' 则表示没有动画",
+ "label": ""
+ },
+ {
+ "key": "delay",
+ "type": ["Number"],
+ "desc": "【开发中】延迟显示加载效果的时间,用于防止请求速度过快引起的加载闪烁,单位:毫秒",
+ "label": ""
+ },
+ {
+ "key": "loading",
+ "type": ["Boolean"],
+ "desc": "是否为加载状态,如果是则显示骨架图,如果不是则显示加载完成的内容",
+ "label": ""
+ },
+ {
+ "key": "rowCol",
+ "type": ["Array"],
+ "desc": "用于设置行列数量、宽度高度、间距等。【示例一】,`[1, 1, 2]` 表示输出三行骨架图,第一行一列,第二行一列,第三行两列。【示例二】,`[1, 1, { width: '100px' }]` 表示自定义第三行的宽度为 `100px`。【示例三】,`[1, 2, [{ width, height }, { width, height, marginLeft }]]` 表示第三行有两列,且自定义宽度、高度和间距",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "骨架图风格,有基础、头像组合等两大类",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-avatar", "t-class-image", "t-class-text"],
+ "tpl": "",
+ "path": "./skeleton/skeleton"
+ },
+ "t-slider": {
+ "key": "t-slider",
+ "label": "滑块",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-slider.png",
+ "properties": [
+ {
+ "key": "colors",
+ "type": ["Array"],
+ "desc": "颜色,[已选择, 未选择]",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件",
+ "label": ""
+ },
+ {
+ "key": "disabledColor",
+ "type": ["Array"],
+ "desc": "禁用状态滑动条的颜色,[已选, 未选]",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String", "Boolean"],
+ "desc": "滑块当前值文本。
值为 true 显示默认文案;值为 false 不显示滑块当前值文本;
值为 `${value}%` 则表示组件会根据占位符渲染文案;
值类型为函数时,参数 `value` 标识滑块值,参数 `position=start` 表示范围滑块的起始值,参数 `position=end` 表示范围滑块的终点值",
+ "label": ""
+ },
+ {
+ "key": "marks",
+ "type": ["Object", "Array"],
+ "desc": "刻度标记,示例:`[0, 10, 40, 200]` 或者 `{ 5: '5¥', 10: '10%' }`",
+ "label": ""
+ },
+ {
+ "key": "max",
+ "type": ["Number"],
+ "desc": "滑块范围最大值",
+ "label": ""
+ },
+ {
+ "key": "min",
+ "type": ["Number"],
+ "desc": "滑块范围最小值",
+ "label": ""
+ },
+ {
+ "key": "range",
+ "type": ["Boolean"],
+ "desc": "双游标滑块",
+ "label": ""
+ },
+ {
+ "key": "showExtremeValue",
+ "type": ["Boolean"],
+ "desc": "是否边界值",
+ "label": ""
+ },
+ {
+ "key": "step",
+ "type": ["Number"],
+ "desc": "步长",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["Number", "Array"],
+ "desc": "滑块值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-bar", "t-class-bar-active", "t-class-bar-disabled", "t-class-cursor"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "滑块值变化时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:dragend",
+ "desc": "结束拖动时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:dragstart",
+ "desc": "开始拖动时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./slider/slider"
+ },
+ "t-step-item": {
+ "key": "t-step-item",
+ "label": "步骤",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-steps.png",
+ "properties": [
+ {
+ "key": "content",
+ "type": ["String"],
+ "desc": "步骤描述",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标。传入 slot 代表使用插槽,其他字符串代表使用内置图标",
+ "label": ""
+ },
+ {
+ "key": "status",
+ "type": ["String"],
+ "desc": "当前步骤的状态",
+ "label": ""
+ },
+ {
+ "key": "subStepItems",
+ "type": ["Array"],
+ "desc": "子步骤条,仅支持 layout = 'vertical' 时",
+ "label": ""
+ },
+ {
+ "key": "title",
+ "type": ["String"],
+ "desc": "标题",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-content", "t-class-title", "t-class-description", "t-class-extra"],
+ "tpl": "",
+ "path": "./step-item/step-item"
+ },
+ "t-stepper": {
+ "key": "t-stepper",
+ "label": "步进器",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-stepper.png",
+ "properties": [
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "禁用全部操作",
+ "label": ""
+ },
+ {
+ "key": "disableInput",
+ "type": ["Boolean"],
+ "desc": "禁用输入框",
+ "label": ""
+ },
+ {
+ "key": "inputWidth",
+ "type": ["Number"],
+ "desc": "输入框宽度",
+ "label": ""
+ },
+ {
+ "key": "max",
+ "type": ["Number"],
+ "desc": "最大值",
+ "label": ""
+ },
+ {
+ "key": "min",
+ "type": ["Number"],
+ "desc": "最小值",
+ "label": ""
+ },
+ {
+ "key": "step",
+ "type": ["Number"],
+ "desc": "步长",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "组件风格",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-input", "t-class-add", "t-class-minus"],
+ "events": [
+ {
+ "key": "bind:blur",
+ "desc": "输入框失去焦点时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:change",
+ "desc": "数值发生变更时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:overlimit",
+ "desc": "数值超出限制时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./stepper/stepper"
+ },
+ "t-steps": {
+ "key": "t-steps",
+ "label": "步骤条",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-steps.png",
+ "properties": [
+ {
+ "key": "current",
+ "type": ["String", "Number"],
+ "desc": "当前步骤,即整个步骤条进度。默认根据步骤下标判断步骤的完成状态,当前步骤为进行中,当前步骤之前的步骤为已完成,当前步骤之后的步骤为未开始。如果每个步骤没有设置 value,current 值为步骤长度则表示所有步骤已完成。如果每个步骤设置了自定义 value,则 current = 'FINISH' 表示所有状态完成",
+ "label": ""
+ },
+ {
+ "key": "currentStatus",
+ "type": ["String"],
+ "desc": "用于控制 current 指向的步骤条的状态",
+ "label": ""
+ },
+ {
+ "key": "layout",
+ "type": ["String"],
+ "desc": "步骤条方向,有两种:横向和纵向",
+ "label": ""
+ },
+ {
+ "key": "readonly",
+ "type": ["Boolean"],
+ "desc": "只读状态",
+ "label": ""
+ },
+ {
+ "key": "separator",
+ "type": ["String"],
+ "desc": "步骤条分割符",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "步骤条风格",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "当前步骤发生变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "require": {
+ "t-step-item": "./step-item/step-item"
+ },
+ "path": "./steps/steps"
+ },
+ "t-sticky": {
+ "key": "t-sticky",
+ "label": "吸顶容器",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-sticky.png",
+ "properties": [
+ {
+ "key": "container",
+ "type": ["String"],
+ "desc": "函数返回容器对应的 NodesRef 节点,将对应节点指定为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置。",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件",
+ "label": ""
+ },
+ {
+ "key": "offsetTop",
+ "type": ["String", "Number"],
+ "desc": "吸顶时与顶部的距离,单位`px`",
+ "label": ""
+ },
+ {
+ "key": "zIndex",
+ "type": ["Number"],
+ "desc": "吸顶时的 z-index",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "events": [
+ {
+ "key": "bind:scroll",
+ "desc": "滚动时触发,scrollTop: 距离顶部位置,isFixed: 是否吸顶",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./sticky/sticky"
+ },
+ "t-swipe-cell": {
+ "key": "t-swipe-cell",
+ "label": "滑动操作",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-swipecell.png",
+ "properties": [
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用滑动",
+ "label": ""
+ },
+ {
+ "key": "expanded",
+ "type": ["String"],
+ "desc": "操作项是否呈现为打开态",
+ "label": ""
+ },
+ {
+ "key": "left",
+ "type": ["Array"],
+ "desc": "左侧滑动操作项。所有行为同 `right`",
+ "label": ""
+ },
+ {
+ "key": "right",
+ "type": ["Array"],
+ "desc": "右侧滑动操作项。有两种定义方式,一种是使用数组,二种是使用插槽。`right.text` 表示操作文本,`right.className` 表示操作项类名,`right.style` 表示操作项样式,`right.onClick` 表示点击操作项后执行的回调函数。示例:`[{ text: '删除', style: 'background-color: red', onClick: () => {} }]`",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:click",
+ "desc": "操作项点击时触发(插槽写法组件不触发,业务侧自定义内容和事件)",
+ "label": ""
+ }
+ ],
+ "tpl": "删除",
+ "require": {
+ "t-cell": "./cell/cell"
+ },
+ "path": "./swipe-cell/swipe-cell"
+ },
+ "t-swiper": {
+ "key": "t-swiper",
+ "label": "轮播",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-swiper.png",
+ "properties": [
+ {
+ "key": "animation",
+ "type": ["String"],
+ "desc": "轮播切换动画效果类型",
+ "label": ""
+ },
+ {
+ "key": "autoplay",
+ "type": ["Boolean"],
+ "desc": "是否自动播放",
+ "label": ""
+ },
+ {
+ "key": "current",
+ "type": ["Number"],
+ "desc": "当前轮播在哪一项(下标)",
+ "label": ""
+ },
+ {
+ "key": "direction",
+ "type": ["String"],
+ "desc": "轮播滑动方向,包括横向滑动和纵向滑动两个方向",
+ "label": ""
+ },
+ {
+ "key": "duration",
+ "type": ["Number"],
+ "desc": "滑动动画时长",
+ "label": ""
+ },
+ {
+ "key": "height",
+ "type": ["Number"],
+ "desc": "当使用垂直方向滚动时的高度",
+ "label": ""
+ },
+ {
+ "key": "interval",
+ "type": ["Number"],
+ "desc": "轮播间隔时间",
+ "label": ""
+ },
+ {
+ "key": "loop",
+ "type": ["Boolean"],
+ "desc": "是否循环播放",
+ "label": ""
+ },
+ {
+ "key": "navigation",
+ "type": ["Object"],
+ "desc": "导航器全部配置",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "轮播切换时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "require": {
+ "t-swiper-item": "./swiper/swiper-item"
+ },
+ "path": "./swiper/swiper"
+ },
+ "t-switch": {
+ "key": "t-switch",
+ "label": "开关",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-switch.png",
+ "properties": [
+ {
+ "key": "colors",
+ "type": ["Array"],
+ "desc": "自定义颜色,[打开时的颜色,关闭时的颜色]。组件默认颜色为 ['#0052d9', 'rgba(0, 0, 0, .26']。示例:[blue, gray]",
+ "label": ""
+ },
+ {
+ "key": "customValue",
+ "type": ["Array"],
+ "desc": "开关内容,[打开时的值,关闭时的值]。默认为 [true, false]。示例:[1, 0]",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用组件",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "开关的标签",
+ "label": ""
+ },
+ {
+ "key": "loading",
+ "type": ["Boolean"],
+ "desc": "是否处于加载中状态",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "开关尺寸",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number", "Boolean"],
+ "desc": "开关值",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "数据发生变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./switch/switch"
+ },
+ "t-tab-bar-item": {
+ "key": "t-tab-bar-item",
+ "label": "标签栏选项",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabbar.png",
+ "properties": [
+ {
+ "key": "badgeProps",
+ "type": ["Object"],
+ "desc": "图标右上角提示信息",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "图标名称",
+ "label": ""
+ },
+ {
+ "key": "subTabBar",
+ "type": ["Array"],
+ "desc": "二级菜单",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "标识符",
+ "label": ""
+ }
+ ],
+ "tpl": "{{item.label}}",
+ "path": "./tab-bar-item/tab-bar-item"
+ },
+ "t-tab-bar": {
+ "key": "t-tab-bar",
+ "label": "标签栏",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabbar.png",
+ "properties": [
+ {
+ "key": "bordered",
+ "type": ["Boolean"],
+ "desc": "是否显示外边框",
+ "label": ""
+ },
+ {
+ "key": "color",
+ "type": ["Array"],
+ "desc": "标签颜色设置。示例:[选中标签的颜色, 未选中的标签颜色]",
+ "label": ""
+ },
+ {
+ "key": "fixed",
+ "type": ["Boolean"],
+ "desc": "是否固定在底部",
+ "label": ""
+ },
+ {
+ "key": "safeAreaInsetBottom",
+ "type": ["Boolean"],
+ "desc": "是否为 iPhoneX 留出底部安全距离",
+ "label": ""
+ },
+ {
+ "key": "split",
+ "type": ["Boolean"],
+ "desc": "是否需要分割线",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number", "Array"],
+ "desc": "当前选中标签的索引",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "选中标签切换时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "{{item.label}}",
+ "require": {
+ "t-tab-bar-item": "./tab-bar-item/tab-bar-item"
+ },
+ "path": "./tab-bar/tab-bar"
+ },
+ "t-tab-panel": {
+ "key": "t-tab-panel",
+ "label": "选项卡面板",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabs.png",
+ "properties": [
+ {
+ "key": "destroyOnHide",
+ "type": ["Boolean"],
+ "desc": "选项卡内容隐藏时是否销毁",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用当前选项卡",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "选项卡名称",
+ "label": ""
+ },
+ {
+ "key": "panel",
+ "type": ["String"],
+ "desc": "用于自定义选项卡面板内容",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "选项卡的值,唯一标识",
+ "label": ""
+ }
+ ],
+ "tpl": "标签一内容",
+ "path": "./tab-panel/tab-panel"
+ },
+ "t-tabs": {
+ "key": "t-tabs",
+ "label": "选项卡",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tabs.png",
+ "properties": [
+ {
+ "key": "animation",
+ "type": ["Object"],
+ "desc": "动画效果设置。其中 duration 表示动画时长",
+ "label": ""
+ },
+ {
+ "key": "placement",
+ "type": ["String"],
+ "desc": "选项卡位置",
+ "label": ""
+ },
+ {
+ "key": "showBottomLine",
+ "type": ["Boolean"],
+ "desc": "是否展示底部激活线条",
+ "label": ""
+ },
+ {
+ "key": "stickyProps",
+ "type": ["Object"],
+ "desc": "是否支持吸顶",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String", "Number"],
+ "desc": "激活的选项卡值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-item", "t-class-active", "t-class-track"],
+ "events": [
+ {
+ "key": "bind:change",
+ "desc": "激活的选项卡发生变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "标签一内容标签二内容",
+ "require": {
+ "t-tab-panel": "./tab-panel/tab-panel"
+ },
+ "path": "./tabs/tabs"
+ },
+ "t-tag": {
+ "key": "t-tag",
+ "label": "标签",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-tag.png",
+ "properties": [
+ {
+ "key": "closable",
+ "type": ["Boolean"],
+ "desc": "标签是否可关闭",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "标签禁用态,失效标签不能触发事件。默认风格(theme=default)才有禁用态",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "标签中的图标,可自定义图标呈现",
+ "label": ""
+ },
+ {
+ "key": "maxWidth",
+ "type": ["String", "Number"],
+ "desc": "标签最大宽度,宽度超出后会出现省略号。示例:'50px' / 80",
+ "label": ""
+ },
+ {
+ "key": "shape",
+ "type": ["String"],
+ "desc": "标签类型,有三种:方形、圆角方形、标记型",
+ "label": ""
+ },
+ {
+ "key": "size",
+ "type": ["String"],
+ "desc": "标签尺寸",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "组件风格,用于描述组件不同的应用场景",
+ "label": ""
+ },
+ {
+ "key": "variant",
+ "type": ["String"],
+ "desc": "标签风格变体",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "events": [
+ {
+ "key": "bind:click",
+ "desc": "点击时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:close",
+ "desc": "如果关闭按钮存在,点击关闭按钮时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "重要",
+ "path": "./tag/tag"
+ },
+ "t-textarea": {
+ "key": "t-textarea",
+ "label": "文本输入框",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-textarea.png",
+ "properties": [
+ {
+ "key": "adjustPosition",
+ "type": ["Boolean"],
+ "desc": "键盘弹起时,是否自动上推页面",
+ "label": ""
+ },
+ {
+ "key": "autofocus",
+ "type": ["Boolean"],
+ "desc": "自动聚焦,拉起键盘",
+ "label": ""
+ },
+ {
+ "key": "autosize",
+ "type": ["Boolean"],
+ "desc": "是否自动增高,值为 autosize 时,style.height 不生效",
+ "label": ""
+ },
+ {
+ "key": "confirmHold",
+ "type": ["Boolean"],
+ "desc": "点击键盘右下角按钮时是否保持键盘不收起点",
+ "label": ""
+ },
+ {
+ "key": "confirmType",
+ "type": ["String"],
+ "desc": "设置键盘右下角按钮的文字,仅在 type='text'时生效",
+ "label": ""
+ },
+ {
+ "key": "disabled",
+ "type": ["Boolean"],
+ "desc": "是否禁用文本框",
+ "label": ""
+ },
+ {
+ "key": "focus",
+ "type": ["Boolean"],
+ "desc": "自动聚焦",
+ "label": ""
+ },
+ {
+ "key": "label",
+ "type": ["String"],
+ "desc": "左侧文本",
+ "label": ""
+ },
+ {
+ "key": "maxcharacter",
+ "type": ["Number"],
+ "desc": "用户最多可以输入的字符个数,一个中文汉字表示两个字符长度",
+ "label": ""
+ },
+ {
+ "key": "maxlength",
+ "type": ["Number"],
+ "desc": "用户最多可以输入的字符个数",
+ "label": ""
+ },
+ {
+ "key": "placeholder",
+ "type": ["String"],
+ "desc": "占位符",
+ "label": ""
+ },
+ {
+ "key": "value",
+ "type": ["String"],
+ "desc": "文本框值",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class", "t-class-textarea", "t-class-placeholder", "t-class-name"],
+ "events": [
+ {
+ "key": "bind:blur",
+ "desc": "失去焦点时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:change",
+ "desc": "输入内容变化时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:enter",
+ "desc": "点击完成时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:focus",
+ "desc": "获得焦点时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:line-change",
+ "desc": "行高发生变化时触发",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./textarea/textarea"
+ },
+ "t-toast": {
+ "key": "t-toast",
+ "label": "轻提示",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-toast.png",
+ "properties": [
+ {
+ "key": "direction",
+ "type": ["String"],
+ "desc": "图标排列方式",
+ "label": ""
+ },
+ {
+ "key": "duration",
+ "type": ["Number"],
+ "desc": "弹窗显示毫秒数",
+ "label": ""
+ },
+ {
+ "key": "icon",
+ "type": ["String"],
+ "desc": "自定义图标",
+ "label": ""
+ },
+ {
+ "key": "message",
+ "type": ["String"],
+ "desc": "弹窗显示文字",
+ "label": ""
+ },
+ {
+ "key": "overlayProps",
+ "type": ["Object"],
+ "desc": "遮罩层属性,透传至 Overlay",
+ "label": ""
+ },
+ {
+ "key": "placement",
+ "type": ["String"],
+ "desc": "弹窗展示位置",
+ "label": ""
+ },
+ {
+ "key": "preventScrollThrough",
+ "type": ["Boolean"],
+ "desc": "防止滚动穿透,即不允许点击和滚动",
+ "label": ""
+ },
+ {
+ "key": "showOverlay",
+ "type": ["Boolean"],
+ "desc": "是否显示遮罩层",
+ "label": ""
+ },
+ {
+ "key": "theme",
+ "type": ["String"],
+ "desc": "提示类型",
+ "label": ""
+ }
+ ],
+ "externalClasses": ["t-class"],
+ "tpl": "",
+ "path": "./toast/toast"
+ },
+ "t-transition": {
+ "key": "t-transition",
+ "label": "动画",
+ "icon": "",
+ "properties": [
+ {
+ "key": "appear",
+ "type": ["Boolean"],
+ "desc": "首次出现是否展示动画",
+ "label": ""
+ },
+ {
+ "key": "customClass",
+ "type": ["String"],
+ "desc": "自定义容器类名",
+ "label": ""
+ },
+ {
+ "key": "destoryOnClose",
+ "type": ["Boolean"],
+ "desc": "隐藏时是否销毁内容",
+ "label": ""
+ },
+ {
+ "key": "duration",
+ "type": ["Number"],
+ "desc": "指定过渡时间",
+ "label": ""
+ },
+ {
+ "key": "name",
+ "type": ["String"],
+ "desc": "过渡类名",
+ "label": ""
+ },
+ {
+ "key": "visible",
+ "type": ["Boolean"],
+ "desc": "是否显示",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./transition/transition"
+ },
+ "t-upload": {
+ "key": "t-upload",
+ "label": "上传",
+ "icon": "https://tdesign.gtimg.com/site/miniprogram-doc/doc-upload.png",
+ "properties": [
+ {
+ "key": "addContent",
+ "type": ["String"],
+ "desc": "添加按钮内容。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。",
+ "label": ""
+ },
+ {
+ "key": "allowUploadDuplicateFile",
+ "type": ["Boolean"],
+ "desc": "是否允许重复上传相同文件名的文件",
+ "label": ""
+ },
+ {
+ "key": "config",
+ "type": ["Object"],
+ "desc": "图片上传配置,视频上传配置,文件上传配置等,包含图片尺寸、图片来源、视频来源、视频拍摄最长时间等。更多细节查看小程序官网。[图片上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/image/wx.chooseImage.html)。[视频上传](https://developers.weixin.qq.com/miniprogram/dev/api/media/video/wx.chooseVideo.html)",
+ "label": ""
+ },
+ {
+ "key": "deleteBtn",
+ "type": ["String"],
+ "desc": "删除图标。值为空,使用默认图标渲染;值为 slot 则表示使用插槽渲染;其他值无效。",
+ "label": ""
+ },
+ {
+ "key": "fileListDisplay",
+ "type": ["String"],
+ "desc": "用于完全自定义文件列表内容",
+ "label": ""
+ },
+ {
+ "key": "files",
+ "type": ["Array"],
+ "desc": "已上传文件列表",
+ "label": ""
+ },
+ {
+ "key": "gridConfig",
+ "type": ["Object"],
+ "desc": "upload组件每行上传图片列数以及图片的宽度和高度",
+ "label": ""
+ },
+ {
+ "key": "gutter",
+ "type": ["Number"],
+ "desc": "预览窗格的 `gutter` 大小,单位 rpx",
+ "label": ""
+ },
+ {
+ "key": "imageProps",
+ "type": ["Object"],
+ "desc": "透传 Image 组件全部属性",
+ "label": ""
+ },
+ {
+ "key": "max",
+ "type": ["Number"],
+ "desc": "用于控制文件上传数量,值为 0 则不限制",
+ "label": ""
+ },
+ {
+ "key": "mediaType",
+ "type": ["Array"],
+ "desc": "支持上传的文件类型,图片或视频",
+ "label": ""
+ },
+ {
+ "key": "requestMethod",
+ "type": ["String"],
+ "desc": "自定义上传方法",
+ "label": ""
+ },
+ {
+ "key": "sizeLimit",
+ "type": ["Number", "Object"],
+ "desc": "图片文件大小限制,单位 KB。可选单位有:`'B' | 'KB' | 'MB' | 'GB'`。示例一:`1000`。示例二:`{ size: 2, unit: 'MB', message: '图片大小不超过 {sizeLimit} MB' }`",
+ "label": ""
+ }
+ ],
+ "events": [
+ {
+ "key": "bind:add",
+ "desc": "上传成功后触发,仅包含本次选择的照片;`url` 表示选定视频的临时文件路径 (本地路径)。`duration` 表示选定视频的时间长度。`size`选定视频的数据量大小。更多描述参考 wx.chooseMedia 小程序官网描述",
+ "label": ""
+ },
+ {
+ "key": "bind:complete",
+ "desc": "上传成功或失败后触发",
+ "label": ""
+ },
+ {
+ "key": "bind:fail",
+ "desc": "上传失败后触发",
+ "label": ""
+ },
+ {
+ "key": "bind:remove",
+ "desc": "移除文件时触发",
+ "label": ""
+ },
+ {
+ "key": "bind:select-change",
+ "desc": "选择文件或图片之后,上传之前,触发该事件。
`files` 表示之前已经上传完成的文件列表。
`currentSelectedFiles` 表示本次上传选中的文件列表",
+ "label": ""
+ },
+ {
+ "key": "bind:success",
+ "desc": "上传成功后触发,包含所有上传的文件;`url` 表示选定视频的临时文件路径 (本地路径)。`duration` 表示选定视频的时间长度。`size`选定视频的数据量大小。更多描述参考 wx.chooseMedia 小程序官网描述",
+ "label": ""
+ }
+ ],
+ "tpl": "",
+ "path": "./upload/upload"
+ }
+ },
+ "common": {
+ "properties": {},
+ "events": {}
+ },
+ "menu": [
+ {
+ "key": "menu-basic",
+ "label": "基础",
+ "submenu": [
+ {
+ "key": "subMenu-button",
+ "label": "Button 按钮",
+ "components": ["t-button"]
+ },
+ {
+ "key": "subMenu-divider",
+ "label": "Divider 分割线",
+ "components": ["t-divider"]
+ },
+ {
+ "key": "subMenu-fab",
+ "label": "Fab 悬浮按钮",
+ "components": ["t-fab"]
+ },
+ {
+ "key": "subMenu-icon",
+ "label": "Icon 图标",
+ "components": ["t-icon"]
+ }
+ ]
+ },
+ {
+ "key": "menu-nav",
+ "label": "导航",
+ "submenu": [
+ {
+ "key": "subMenu-drawer",
+ "label": "Drawer 抽屉",
+ "components": ["t-drawer"]
+ },
+ {
+ "key": "subMenu-indexes",
+ "label": "Indexes 索引",
+ "components": ["t-indexes"]
+ },
+ {
+ "key": "subMenu-navbar",
+ "label": "Navbar 导航条",
+ "components": ["t-navbar"]
+ },
+ {
+ "key": "subMenu-steps",
+ "label": "Steps 步骤条",
+ "components": ["t-steps"]
+ },
+ {
+ "key": "subMenu-tabbar",
+ "label": "TabBar 标签栏",
+ "components": ["t-tab-bar"]
+ },
+ {
+ "key": "subMenu-tabs",
+ "label": "Tabs 选项卡",
+ "components": ["t-tabs"]
+ }
+ ]
+ },
+ {
+ "key": "menu-input",
+ "label": "输入",
+ "submenu": [
+ {
+ "key": "subMenu-checkbox",
+ "label": "CheckBox 复选框",
+ "components": ["t-checkbox"]
+ },
+ {
+ "key": "subMenu-dateTimePicker",
+ "label": "DateTimePicker 时间选择器",
+ "components": ["t-date-time-picker"]
+ },
+ {
+ "key": "subMenu-input",
+ "label": "Input 输入框",
+ "components": ["t-input"]
+ },
+ {
+ "key": "subMenu-picker",
+ "label": "Picker 选择器",
+ "components": ["t-picker"]
+ },
+ {
+ "key": "subMenu-radio",
+ "label": "Radio 单选框",
+ "components": ["t-radio"]
+ },
+ {
+ "key": "subMenu-rate",
+ "label": "Rate 评分",
+ "components": ["t-rate"]
+ },
+ {
+ "key": "subMenu-search",
+ "label": "Search 搜索框",
+ "components": ["t-search"]
+ },
+ {
+ "key": "subMenu-slider",
+ "label": "Slider 滑动选择器",
+ "components": ["t-slider"]
+ },
+ {
+ "key": "subMenu-stepper",
+ "label": "Stepper 步进器",
+ "components": ["t-stepper"]
+ },
+ {
+ "key": "subMenu-switch",
+ "label": "Switch 开关",
+ "components": ["t-switch"]
+ },
+ {
+ "key": "subMenu-textarea",
+ "label": "Textarea 多行文本框",
+ "components": ["t-textarea"]
+ },
+ {
+ "key": "subMenu-upload",
+ "label": "UpLoad 上传",
+ "components": ["t-upload"]
+ }
+ ]
+ },
+ {
+ "key": "menu-data",
+ "label": "数据展示",
+ "submenu": [
+ {
+ "key": "subMenu-avatar",
+ "label": "Avatar 头像",
+ "components": ["t-avatar"]
+ },
+ {
+ "key": "subMenu-badge",
+ "label": "Badge 徽标",
+ "components": ["t-badge"]
+ },
+ {
+ "key": "subMenu-cell",
+ "label": "Cell 单元格",
+ "components": ["t-cell"]
+ },
+ {
+ "key": "subMenu-collapse",
+ "label": "Collapse 折叠面板",
+ "components": ["t-collapse"]
+ },
+ {
+ "key": "subMenu-dropdown-menu",
+ "label": "DropdownMenu 下拉菜单",
+ "components": ["t-dropdown-menu"]
+ },
+ {
+ "key": "subMenu-empty",
+ "label": "Empty 空状态",
+ "components": ["t-empty"]
+ },
+ {
+ "key": "subMenu-footer",
+ "label": "Footer 页脚",
+ "components": ["t-footer"]
+ },
+ {
+ "key": "subMenu-grid",
+ "label": "Grid 宫格",
+ "components": ["t-grid"]
+ },
+ {
+ "key": "subMenu-image",
+ "label": "Image 图片",
+ "components": ["t-image"]
+ },
+ {
+ "key": "subMenu-skeleton",
+ "label": "Skeleton 骨架屏",
+ "components": ["t-skeleton"]
+ },
+ {
+ "key": "subMenu-sticky",
+ "label": "Sticky 吸顶容器",
+ "components": ["t-sticky"]
+ },
+ {
+ "key": "subMenu-swiper",
+ "label": "Swiper 轮播图",
+ "components": ["t-swiper"]
+ },
+ {
+ "key": "subMenu-tag",
+ "label": "Tag 标签",
+ "components": ["t-tag"]
+ }
+ ]
+ },
+ {
+ "key": "menu-info",
+ "label": "消息提醒",
+ "submenu": [
+ {
+ "key": "subMenu-actionsheet",
+ "label": "ActionSheet 动作面板",
+ "components": ["t-action-sheet"]
+ },
+ {
+ "key": "subMenu-back-top",
+ "label": "BackTop 返回顶部",
+ "components": ["t-back-top"]
+ },
+ {
+ "key": "subMenu-dialog",
+ "label": "Dialog 弹出框",
+ "components": ["t-dialog"]
+ },
+ {
+ "key": "subMenu-loading",
+ "label": "Loading 加载",
+ "components": ["t-loading"]
+ },
+ {
+ "key": "subMenu-message",
+ "label": "Message 消息通知",
+ "components": ["t-message"]
+ },
+ {
+ "key": "subMenu-popup",
+ "label": "Popup 弹出层",
+ "components": ["t-popup"]
+ },
+ {
+ "key": "subMenu-progress",
+ "label": "Progress 进度条",
+ "components": ["t-progress"]
+ },
+ {
+ "key": "subMenu-pullDownRefresh",
+ "label": "PullDownRefresh 下拉刷新",
+ "components": ["t-pull-down-refresh"]
+ },
+ {
+ "key": "subMenu-swipeCell",
+ "label": "SwipeCell 滑动操作",
+ "components": ["t-swipe-cell"]
+ },
+ {
+ "key": "subMenu-toast",
+ "label": "Toast 轻提示",
+ "components": ["t-toast"]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/_common b/src/_common
new file mode 160000
index 000000000..eafebccb6
--- /dev/null
+++ b/src/_common
@@ -0,0 +1 @@
+Subproject commit eafebccb6b2e9515e79bf80ce9db0263d9896d24
diff --git a/src/action-sheet/README.en-US.md b/src/action-sheet/README.en-US.md
new file mode 100644
index 000000000..0c840670b
--- /dev/null
+++ b/src/action-sheet/README.en-US.md
@@ -0,0 +1,24 @@
+:: BASE_DOC ::
+
+## API
+### ActionSheet Props
+
+name | type | default | description | required
+-- | -- | -- | -- | --
+align | String | center | `0.29.0`。options:center/left | N
+cancel-text | String | - | \- | N
+count | Number | 8 | \- | N
+description | String | - | `0.29.0` | N
+items | Array | - | required。Typescript:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y
+show-cancel | Boolean | true | \- | N
+theme | String | list | options:list/grid | N
+visible | Boolean | false | required | Y
+default-visible | Boolean | undefined | required。uncontrolled property | Y
+
+### ActionSheet Events
+
+name | params | description
+-- | -- | --
+cancel | \- | \-
+close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
+selected | `(selected: ActionSheetItem \| string, index: number)` | \-
diff --git a/src/action-sheet/README.md b/src/action-sheet/README.md
index 83d9e232e..1ba2bab61 100644
--- a/src/action-sheet/README.md
+++ b/src/action-sheet/README.md
@@ -5,6 +5,15 @@ spline: data
isComponent: true
---
+


+
+
+
+ 该组件于 0.9.0 版本上线,请留意版本。
+
+
## 引入
全局引入,在 miniprogram 根目录下的`app.json`中配置,局部引入,在需要引入的页面或组件的`index.json`中配置。
@@ -17,28 +26,37 @@ isComponent: true
## 代码演示
-### 基础用法
+### 组件类型
-```html
-
-```
+列表型动作面板
-### 支持自定义
+{{ list }}
+
+宫格型动作面板
+
+{{ grid }}
+
+### 组件状态
+
+宫格型动作面板
+
+{{ status }}
+
+### 组件样式
+
+列表型对齐方式
+
+{{ align }}
-```html
-
- 我是自定义的内容
-
-```
### 支持指令调用
```javascript
-import ActionSheet from 'tdesign-miniprogram/action-sheet/index';
+import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';
// 指令调用不同于组件引用不需要传入visible
const basicListOption: ActionSheetShowOption = {
theme: ActionSheetTheme.List,
- selector: '#t-action-sheet-imperative',
+ selector: '#t-action-sheet',
items: [
{
label: '默认选项',
@@ -69,20 +87,21 @@ handler.close();
名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
-cancel-text | String | 取消 | 设置取消按钮的文本 | N
+align | String | center | `0.29.0`。水平对齐方式。可选项:center/left | N
+cancel-text | String | - | 设置取消按钮的文本 | N
count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有效 | N
-items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean; icon?: string; }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y
+description | String | - | `0.29.0`。动作面板描述文字 | N
+items | Array | - | 必需。菜单项。TS 类型:`Array` `interface ActionSheetItem {label: string; color?: string; disabled?: boolean }`。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts) | Y
show-cancel | Boolean | true | 是否显示取消按钮 | N
theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N
-visible | Boolean | null | 必需。显示与隐藏 | Y
-default-visible | Boolean | false | 必需。显示与隐藏。非受控属性 | Y
+visible | Boolean | false | 必需。显示与隐藏 | Y
+default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y
+external-classes | Array | - | 组件类名,用于设置组件外层元素类名。`['t-class', 't-class-content', 't-class-cancel']` | N
### ActionSheet Events
名称 | 参数 | 描述
-- | -- | --
-visible-change | `(visible: Boolean)` | 当浮层隐藏或显示时触发。
-cancel | - | 点击取消按钮时触发
-close | - | 关闭时触发
-selected | `(selected: ActionSheetItem | String, index: Number)` | 选择菜单项时触发
-
+cancel | \- | 点击取消按钮时触发
+close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。
`type TriggerSource = 'overlay' \| 'command' \| 'select' `
+selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单项时触发
diff --git a/src/action-sheet/__test__/__snapshots__/demo.test.js.snap b/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
new file mode 100644
index 000000000..c0548eabf
--- /dev/null
+++ b/src/action-sheet/__test__/__snapshots__/demo.test.js.snap
@@ -0,0 +1,100 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ActionSheet ActionSheet align demo works fine 1`] = `
+
+
+
+ 左对齐列表型
+
+
+`;
+
+exports[`ActionSheet ActionSheet grid demo works fine 1`] = `
+
+
+
+ 常规宫格型
+
+
+ 带翻页宫格型
+
+
+`;
+
+exports[`ActionSheet ActionSheet list demo works fine 1`] = `
+
+
+
+ 列表型
+
+
+ 带描述列表型
+
+
+ 带图标列表型
+
+
+`;
+
+exports[`ActionSheet ActionSheet status demo works fine 1`] = `
+
+
+
+ 列表型选项状态
+
+
+`;
diff --git a/src/action-sheet/__test__/__virtualHostSnapshot__/demo.test.js.snap b/src/action-sheet/__test__/__virtualHostSnapshot__/demo.test.js.snap
new file mode 100644
index 000000000..c0548eabf
--- /dev/null
+++ b/src/action-sheet/__test__/__virtualHostSnapshot__/demo.test.js.snap
@@ -0,0 +1,100 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`ActionSheet ActionSheet align demo works fine 1`] = `
+
+
+
+ 左对齐列表型
+
+
+`;
+
+exports[`ActionSheet ActionSheet grid demo works fine 1`] = `
+
+
+
+ 常规宫格型
+
+
+ 带翻页宫格型
+
+
+`;
+
+exports[`ActionSheet ActionSheet list demo works fine 1`] = `
+
+
+
+ 列表型
+
+
+ 带描述列表型
+
+
+ 带图标列表型
+
+
+`;
+
+exports[`ActionSheet ActionSheet status demo works fine 1`] = `
+
+
+
+ 列表型选项状态
+
+
+`;
diff --git a/src/action-sheet/__test__/demo.test.js b/src/action-sheet/__test__/demo.test.js
new file mode 100644
index 000000000..21b832fb1
--- /dev/null
+++ b/src/action-sheet/__test__/demo.test.js
@@ -0,0 +1,19 @@
+/**
+ * 该文件为由脚本 `npm run test:demo` 自动生成,如需修改,执行脚本命令即可。请勿手写直接修改,否则会被覆盖
+ */
+
+import simulate from 'miniprogram-simulate';
+import path from 'path';
+
+const mapper = ['align', 'grid', 'list', 'status'];
+
+describe('ActionSheet', () => {
+ mapper.forEach((demoName) => {
+ it(`ActionSheet ${demoName} demo works fine`, () => {
+ const id = load(path.resolve(__dirname, `../../action-sheet/_example/${demoName}/index`), demoName);
+ const container = simulate.render(id);
+ container.attach(document.createElement('parent-wrapper'));
+ expect(container.toJSON()).toMatchSnapshot();
+ });
+ });
+});
diff --git a/src/action-sheet/__test__/index.test.js b/src/action-sheet/__test__/index.test.js
new file mode 100644
index 000000000..fc9748c0a
--- /dev/null
+++ b/src/action-sheet/__test__/index.test.js
@@ -0,0 +1,306 @@
+import simulate from 'miniprogram-simulate';
+import path from 'path';
+import * as Util from '../../common/utils';
+import { show, close } from '../show';
+
+describe('action-sheet', () => {
+ const ActionSheetTheme = {
+ List: 'list',
+ Grid: 'grid',
+ };
+
+ const actionSheet = load(path.resolve(__dirname, `../action-sheet`), 't-action-sheet');
+
+ describe('props', () => {
+ it(`: style && customStyle`, async () => {
+ const id = simulate.load({
+ template: ``,
+ data: {
+ style: 'color: red',
+ customStyle: 'font-size: 9px',
+ },
+ usingComponents: {
+ 't-action-sheet': actionSheet,
+ },
+ });
+ const comp = simulate.render(id);
+ comp.attach(document.createElement('parent-wrapper'));
+
+ const $actionSheet = comp.querySelector('#t-action-sheet >>> .t-action-sheet');
+ // expect(comp.toJSON()).toMatchSnapshot();
+ if (VIRTUAL_HOST) {
+ expect(
+ $actionSheet.dom.getAttribute('style').includes(`${comp.data.style}; ${comp.data.customStyle}`),
+ ).toBeTruthy();
+ } else {
+ expect($actionSheet.dom.getAttribute('style').includes(`${comp.data.customStyle}`)).toBeTruthy();
+ }
+ });
+
+ it(': cancel-text', async () => {
+ const id = simulate.load({
+ template: ``,
+ data: {
+ cancelText: 'cancel',
+ },
+ usingComponents: {
+ 't-action-sheet': actionSheet,
+ },
+ });
+ const comp = simulate.render(id);
+ comp.attach(document.createElement('parent-wrapper'));
+ // expect(comp.toJSON()).toMatchSnapshot();
+ const $actionSheet = comp.querySelector('#t-action-sheet');
+ const $cancel = $actionSheet.querySelector('.t-action-sheet__cancel');
+ expect($cancel.dom.textContent.trim()).toBe($actionSheet.data.cancelText);
+ });
+
+ it(': theme & count', async () => {
+ let clickItemValue;
+ const handleSelected = jest.fn((selected) => {
+ clickItemValue = selected.detail;
+ });
+ const id = simulate.load({
+ template: ``,
+ data: {
+ theme: ActionSheetTheme.Grid,
+ count: 2,
+ items: [
+ {
+ label: '自定义选项',
+ color: '#0052D9',
+ },
+ {
+ label: '文字',
+ icon: 'image',
+ },
+ {
+ label: '失效选项',
+ disabled: true,
+ },
+ ],
+ },
+ methods: {
+ handleSelected,
+ },
+ usingComponents: {
+ 't-action-sheet': actionSheet,
+ },
+ });
+ const comp = simulate.render(id);
+ comp.attach(document.createElement('parent-wrapper'));
+ // expect(comp.toJSON()).toMatchSnapshot();
+ const $actionSheet = comp.querySelector('#t-action-sheet');
+ // 手动触发 onSwiperChange 函数
+ const mockData = { detail: { current: 1, source: 'touch' } };
+ $actionSheet.instance.onSwiperChange(mockData);
+ expect($actionSheet.instance.data.currentSwiperIndex).toBe(mockData.detail.current);
+
+ if (!VIRTUAL_HOST) {
+ const $gridItems = $actionSheet.querySelectorAll('.t-action-sheet__square');
+ expect($gridItems.length).toEqual(3);
+
+ // current = 1
+ const index = 2;
+ $gridItems[index].dispatchEvent('tap');
+ await simulate.sleep(10);
+ expect(handleSelected).toHaveBeenCalledTimes(1);
+ expect(clickItemValue.index).toEqual(index);
+ expect(clickItemValue.selected).toEqual(comp.instance.data.items[index]);
+ }
+ });
+ });
+
+ describe('events', () => {
+ it(': selected && cancel', async () => {
+ let clickItemValue;
+ const handleSelected = jest.fn((selected) => {
+ clickItemValue = selected.detail;
+ });
+ const handleCancel = jest.fn();
+ const id = simulate.load({
+ template: ``,
+ data: {
+ cancelText: 'cancel',
+ items: [
+ {
+ label: '自定义选项',
+ color: '#0052D9',
+ },
+ {
+ label: '失效选项',
+ disabled: true,
+ },
+ ],
+ },
+ methods: {
+ handleSelected,
+ handleCancel,
+ },
+ usingComponents: {
+ 't-action-sheet': actionSheet,
+ },
+ });
+ const comp = simulate.render(id);
+ comp.attach(document.createElement('parent-wrapper'));
+ // expect(comp.toJSON()).toMatchSnapshot();
+ const $actionSheet = comp.querySelector('#t-action-sheet');
+ const $cancel = $actionSheet.querySelector('.t-action-sheet__cancel');
+ const $items = $actionSheet.querySelectorAll('.t-action-sheet__list-item');
+
+ expect($cancel.dom.textContent.trim()).toBe($actionSheet.data.cancelText);
+ expect($items.length).toBe(comp.data.items.length);
+
+ const index = 1;
+ $items[index].dispatchEvent('tap');
+ await simulate.sleep();
+ expect(handleSelected).toHaveBeenCalledTimes(1);
+ expect(clickItemValue.index).toEqual(index);
+ expect(clickItemValue.selected).toEqual(comp.instance.data.items[index]);
+
+ expect($actionSheet.instance.data.visible).toEqual(true);
+ $cancel.dispatchEvent('tap');
+ await simulate.sleep();
+ expect(handleCancel).toHaveBeenCalledTimes(1);
+ });
+
+ it(': visible-change', async () => {
+ let visibleValue;
+ const handleVisibleChange = jest.fn((visible) => {
+ visibleValue = visible.detail.visible;
+ });
+ const id = simulate.load({
+ template: ``,
+ data: {
+ showCancel: false,
+ items: [
+ {
+ label: '自定义选项',
+ color: '#0052D9',
+ },
+ {
+ label: '失效选项',
+ disabled: true,
+ },
+ ],
+ },
+ methods: {
+ handleVisibleChange,
+ },
+ usingComponents: {
+ 't-action-sheet': actionSheet,
+ },
+ });
+ const comp = simulate.render(id);
+ comp.attach(document.createElement('parent-wrapper'));
+ // expect(comp.toJSON()).toMatchSnapshot();
+ const $actionSheet = comp.querySelector('#t-action-sheet');
+ const $cancel = $actionSheet.querySelector('t-action-sheet__cancel');
+ expect($cancel).toBeUndefined();
+
+ // 模拟点击遮罩层
+ if (!VIRTUAL_HOST) {
+ const $popupOverlay = comp.querySelector('#t-action-sheet >>> #popup-overlay');
+ $popupOverlay.dispatchEvent('tap');
+ await simulate.sleep(0);
+ expect(handleVisibleChange).toHaveBeenCalledTimes(1);
+ expect(visibleValue).toEqual(false);
+ }
+ });
+ });
+
+ describe('instance', () => {
+ it(': props', async () => {
+ let visibleValue;
+ const handleSelected = jest.fn();
+ const handleVisibleChange = jest.fn((e) => {
+ visibleValue = e.detail.visible;
+ });
+ const id = simulate.load({
+ template: ``,
+ methods: {
+ handleSelected,
+ handleVisibleChange,
+ },
+ usingComponents: {
+ 't-action-sheet': actionSheet,
+ },
+ });
+ const comp = simulate.render(id);
+ comp.attach(document.createElement('parent-wrapper'));
+ const $actionSheet = comp.querySelector('#t-action-sheet');
+
+ const mock = jest.spyOn(Util, 'getInstance');
+ // mock.mockImplementation(() => $actionSheet.instance);
+
+ mock.mockImplementationOnce(() => $actionSheet.instance);
+ mock.mockImplementationOnce(() => undefined);
+ mock.mockImplementationOnce(() => $actionSheet.instance);
+
+ mock.mockImplementationOnce(() => undefined);
+ mock.mockImplementationOnce(() => $actionSheet.instance);
+
+ // show
+ show({
+ selector: '#t-action-sheet',
+ context: $actionSheet.instance,
+ theme: 'grid',
+ items: [
+ {
+ label: '文字',
+ icon: 'image',
+ },
+ {
+ label: '文字',
+ icon: 'image',
+ },
+ ],
+ });
+ expect(handleVisibleChange).toHaveBeenCalledTimes(1);
+ expect(visibleValue).toBe(true);
+ // expect(comp.toJSON()).toMatchSnapshot();
+ // click overlay
+ if (!VIRTUAL_HOST) {
+ const $overlay = comp.querySelector('#t-action-sheet >>> #popup-overlay');
+ $overlay.dispatchEvent('tap');
+ await simulate.sleep();
+ expect(handleVisibleChange).toHaveBeenCalledTimes(2);
+ show();
+ show();
+ close();
+ // close
+ close({
+ selector: '#t-action-sheet',
+ context: $actionSheet.instance,
+ });
+ expect(handleVisibleChange).toHaveBeenCalledTimes(4);
+ expect(visibleValue).toBe(false);
+ }
+ });
+ });
+});
diff --git a/src/action-sheet/_example/action-sheet.json b/src/action-sheet/_example/action-sheet.json
new file mode 100644
index 000000000..8407e423c
--- /dev/null
+++ b/src/action-sheet/_example/action-sheet.json
@@ -0,0 +1,11 @@
+{
+ "navigationBarTitleText": "ActionSheet",
+ "navigationBarBackgroundColor": "#fff",
+ "usingComponents": {
+ "t-toast": "tdesign-miniprogram/toast/toast",
+ "list": "./list",
+ "status": "./status",
+ "grid": "./grid",
+ "align": "./align"
+ }
+}
diff --git a/src/action-sheet/_example/action-sheet.less b/src/action-sheet/_example/action-sheet.less
new file mode 100644
index 000000000..4bd49f1ef
--- /dev/null
+++ b/src/action-sheet/_example/action-sheet.less
@@ -0,0 +1,7 @@
+page {
+ background-color: #fff;
+
+ .t-button {
+ margin-top: 32rpx;
+ }
+}
diff --git a/example/pages/badge/badge.ts b/src/action-sheet/_example/action-sheet.ts
similarity index 100%
rename from example/pages/badge/badge.ts
rename to src/action-sheet/_example/action-sheet.ts
diff --git a/src/action-sheet/_example/action-sheet.wxml b/src/action-sheet/_example/action-sheet.wxml
new file mode 100644
index 000000000..d410aec79
--- /dev/null
+++ b/src/action-sheet/_example/action-sheet.wxml
@@ -0,0 +1,19 @@
+
+ ActionSheet 动作面板
+ 从底部弹出的模态框,提供和当前场景相关的操作动作,也支持提供信息输入和描述。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/action-sheet/_example/align/index.js b/src/action-sheet/_example/align/index.js
new file mode 100644
index 000000000..1262b48fb
--- /dev/null
+++ b/src/action-sheet/_example/align/index.js
@@ -0,0 +1,36 @@
+import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';
+
+Component({
+ methods: {
+ handleAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.List,
+ selector: '#t-action-sheet',
+ context: this,
+ align: 'left',
+ description: '动作面板描述文字',
+ items: [
+ {
+ label: '选项一',
+ icon: 'app',
+ },
+ {
+ label: '选项二',
+ icon: 'app',
+ },
+ {
+ label: '选项三',
+ icon: 'app',
+ },
+ {
+ label: '选项四',
+ icon: 'app',
+ },
+ ],
+ });
+ },
+ handleSelected(e) {
+ console.log(e.detail);
+ },
+ },
+});
diff --git a/src/action-sheet/_example/align/index.json b/src/action-sheet/_example/align/index.json
new file mode 100644
index 000000000..be6851153
--- /dev/null
+++ b/src/action-sheet/_example/align/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "t-button": "tdesign-miniprogram/button/button",
+ "t-action-sheet": "tdesign-miniprogram/action-sheet/action-sheet"
+ }
+}
diff --git a/src/action-sheet/_example/align/index.wxml b/src/action-sheet/_example/align/index.wxml
new file mode 100644
index 000000000..fbae88750
--- /dev/null
+++ b/src/action-sheet/_example/align/index.wxml
@@ -0,0 +1,3 @@
+
+
+左对齐列表型
diff --git a/example/pages/indexes/display.less b/src/action-sheet/_example/align/index.wxss
similarity index 100%
rename from example/pages/indexes/display.less
rename to src/action-sheet/_example/align/index.wxss
diff --git a/src/action-sheet/_example/grid/index.js b/src/action-sheet/_example/grid/index.js
new file mode 100644
index 000000000..8049b70ff
--- /dev/null
+++ b/src/action-sheet/_example/grid/index.js
@@ -0,0 +1,65 @@
+import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';
+
+const firstGrid = [
+ {
+ label: '微信',
+ image: 'https://tdesign.gtimg.com/miniprogram/logo/wechat.png',
+ },
+ {
+ label: '朋友圈',
+ image: 'https://tdesign.gtimg.com/miniprogram/logo/times.png',
+ },
+ {
+ label: 'QQ',
+ image: 'https://tdesign.gtimg.com/miniprogram/logo/qq.png',
+ },
+ {
+ label: '企业微信',
+ image: 'https://tdesign.gtimg.com/miniprogram/logo/wecom.png',
+ },
+ {
+ label: '收藏',
+ icon: 'star',
+ },
+ {
+ label: '刷新',
+ icon: 'refresh',
+ },
+ {
+ label: '下载',
+ icon: 'download',
+ },
+ {
+ label: '复制',
+ icon: 'queue',
+ },
+];
+
+Component({
+ methods: {
+ handleAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.Grid,
+ selector: '#t-action-sheet',
+ context: this,
+ items: firstGrid,
+ });
+ },
+ handleMultiAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.Grid,
+ selector: '#t-action-sheet',
+ context: this,
+ items: firstGrid.concat(
+ new Array(8).fill({
+ label: '标题文字',
+ icon: 'image',
+ }),
+ ),
+ });
+ },
+ handleSelected(e) {
+ console.log(e.detail);
+ },
+ },
+});
diff --git a/src/action-sheet/_example/grid/index.json b/src/action-sheet/_example/grid/index.json
new file mode 100644
index 000000000..be6851153
--- /dev/null
+++ b/src/action-sheet/_example/grid/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "t-button": "tdesign-miniprogram/button/button",
+ "t-action-sheet": "tdesign-miniprogram/action-sheet/action-sheet"
+ }
+}
diff --git a/src/action-sheet/_example/grid/index.wxml b/src/action-sheet/_example/grid/index.wxml
new file mode 100644
index 000000000..292ac9529
--- /dev/null
+++ b/src/action-sheet/_example/grid/index.wxml
@@ -0,0 +1,5 @@
+
+
+常规宫格型
+
+带翻页宫格型
diff --git a/example/pages/loading/loadingProgress/loadingProgress.less b/src/action-sheet/_example/grid/index.wxss
similarity index 100%
rename from example/pages/loading/loadingProgress/loadingProgress.less
rename to src/action-sheet/_example/grid/index.wxss
diff --git a/src/action-sheet/_example/list/index.js b/src/action-sheet/_example/list/index.js
new file mode 100644
index 000000000..90ce60d6e
--- /dev/null
+++ b/src/action-sheet/_example/list/index.js
@@ -0,0 +1,74 @@
+import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';
+
+Component({
+ methods: {
+ handleAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.List,
+ selector: '#t-action-sheet',
+ context: this,
+ items: [
+ {
+ label: '选项一',
+ },
+ {
+ label: '选项二',
+ },
+ {
+ label: '选项三',
+ },
+ {
+ label: '选项四',
+ },
+ ],
+ });
+ },
+ showDescAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.List,
+ selector: '#t-action-sheet',
+ context: this,
+ description: '动作面板描述文字',
+ items: [
+ {
+ label: '选项一',
+ },
+ {
+ label: '选项二',
+ },
+ {
+ label: '选项三',
+ },
+ ],
+ });
+ },
+ showIconAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.List,
+ selector: '#t-action-sheet',
+ context: this,
+ items: [
+ {
+ label: '选项一',
+ icon: 'app',
+ },
+ {
+ label: '选项二',
+ icon: 'app',
+ },
+ {
+ label: '选项三',
+ icon: 'app',
+ },
+ {
+ label: '选项四',
+ icon: 'app',
+ },
+ ],
+ });
+ },
+ handleSelected(e) {
+ console.log(e.detail);
+ },
+ },
+});
diff --git a/src/action-sheet/_example/list/index.json b/src/action-sheet/_example/list/index.json
new file mode 100644
index 000000000..be6851153
--- /dev/null
+++ b/src/action-sheet/_example/list/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "t-button": "tdesign-miniprogram/button/button",
+ "t-action-sheet": "tdesign-miniprogram/action-sheet/action-sheet"
+ }
+}
diff --git a/src/action-sheet/_example/list/index.wxml b/src/action-sheet/_example/list/index.wxml
new file mode 100644
index 000000000..fb32fcf8c
--- /dev/null
+++ b/src/action-sheet/_example/list/index.wxml
@@ -0,0 +1,7 @@
+
+
+列表型
+
+带描述列表型
+
+带图标列表型
diff --git a/qq/example/demos/radio/basic/basic.less b/src/action-sheet/_example/list/index.wxss
similarity index 100%
rename from qq/example/demos/radio/basic/basic.less
rename to src/action-sheet/_example/list/index.wxss
diff --git a/src/action-sheet/_example/status/index.js b/src/action-sheet/_example/status/index.js
new file mode 100644
index 000000000..ff47373c1
--- /dev/null
+++ b/src/action-sheet/_example/status/index.js
@@ -0,0 +1,37 @@
+import ActionSheet, { ActionSheetTheme } from 'tdesign-miniprogram/action-sheet/index';
+
+Component({
+ methods: {
+ handleAction() {
+ ActionSheet.show({
+ theme: ActionSheetTheme.List,
+ selector: '#t-action-sheet',
+ context: this,
+ items: [
+ {
+ label: '默认选项',
+ icon: 'app',
+ },
+ {
+ label: '自定义选项',
+ icon: 'app',
+ color: '#0052D9',
+ },
+ {
+ label: '失效选项',
+ disabled: true,
+ icon: 'app',
+ },
+ {
+ label: '警告选项',
+ color: '#e34d59',
+ icon: 'app',
+ },
+ ],
+ });
+ },
+ handleSelected(e) {
+ console.log(e.detail);
+ },
+ },
+});
diff --git a/src/action-sheet/_example/status/index.json b/src/action-sheet/_example/status/index.json
new file mode 100644
index 000000000..be6851153
--- /dev/null
+++ b/src/action-sheet/_example/status/index.json
@@ -0,0 +1,7 @@
+{
+ "component": true,
+ "usingComponents": {
+ "t-button": "tdesign-miniprogram/button/button",
+ "t-action-sheet": "tdesign-miniprogram/action-sheet/action-sheet"
+ }
+}
diff --git a/src/action-sheet/_example/status/index.wxml b/src/action-sheet/_example/status/index.wxml
new file mode 100644
index 000000000..482b0aa62
--- /dev/null
+++ b/src/action-sheet/_example/status/index.wxml
@@ -0,0 +1,3 @@
+
+
+列表型选项状态
diff --git a/qq/example/demos/radio/group/group.less b/src/action-sheet/_example/status/index.wxss
similarity index 100%
rename from qq/example/demos/radio/group/group.less
rename to src/action-sheet/_example/status/index.wxss
diff --git a/src/action-sheet/action-sheet.json b/src/action-sheet/action-sheet.json
index a52f66120..c1eb33ecb 100644
--- a/src/action-sheet/action-sheet.json
+++ b/src/action-sheet/action-sheet.json
@@ -3,10 +3,8 @@
"usingComponents": {
"t-icon": "../icon/icon",
"t-popup": "../popup/popup",
- "t-swiper": "../swiper/swiper",
- "t-swiper-item": "../swiper/swiper-item",
- "t-image": "../image/image",
"t-grid": "../grid/grid",
- "t-grid-item": "../grid/grid-item"
+ "t-grid-item": "../grid-item/grid-item",
+ "t-swiper-nav": "../swiper-nav/swiper-nav"
}
}
diff --git a/src/action-sheet/action-sheet.less b/src/action-sheet/action-sheet.less
index 2b104389c..1ba042768 100644
--- a/src/action-sheet/action-sheet.less
+++ b/src/action-sheet/action-sheet.less
@@ -1,19 +1,40 @@
@import '../common/style/index.less';
@action-sheet: ~'@{prefix}-action-sheet';
-@action-sheet-list-item-height: 96rpx;
-@action-sheet-gap-bg-color: #f3f3f3;
-@action-sheet-list-item-color--disabled: rgba(0, 0, 0, 0.26);
-@action-sheet-square-image-size: 72rpx;
-@action-sheet-square-image-padding: 10rpx;
+
+@action-sheet-list-item-height: var(--td-action-sheet-list-item-height, 112rpx);
+@action-sheet-list-item-disabled-color: var(--td-action-sheet-list-item-disabled-color, @font-gray-4);
+@action-sheet-border-color: var(--td-action-sheet-border-color, @gray-color-1);
+@action-sheet-color: var(--td-action-sheet-color, @font-gray-1);
+@action-sheet-border-radius: var(--td-action-sheet-border-radius, @radius-extra-large);
+@action-sheet-description-color: var(--td-action-sheet-description-color, @font-gray-3);
+@action-sheet-text-align: var(--td-action-sheet-text-align, center);
+@action-sheet-cancel-height: var(--td-action-sheet-cancel-height, 96rpx);
.@{action-sheet} {
- .flex-center {
+ &__content {
+ color: @action-sheet-color;
+ border-top-left-radius: @action-sheet-border-radius;
+ border-top-right-radius: @action-sheet-border-radius;
+ background-color: @bg-color-container;
+ overflow: hidden;
+
+ &--grid {
+ padding-top: 16rpx;
+ }
+
+ &:focus {
+ outline: 0;
+ }
+ }
+
+ .flex-center() {
display: flex;
align-items: center;
justify-content: center;
}
- .ellipsis {
+
+ .ellipsis() {
word-wrap: normal;
white-space: nowrap;
overflow: hidden;
@@ -21,28 +42,61 @@
}
&__grid {
- padding: 48rpx 0 16rpx 0;
- &-item {
- margin-bottom: 32rpx;
+ padding-bottom: 16rpx;
+
+ &--swiper {
+ padding-bottom: 48rpx;
}
}
- &__list {
- background-color: @bg-color-block;
- border-bottom: 1rpx solid #f6f6f6;
- &:last-child {
- border-bottom: none;
+ &__description {
+ color: @action-sheet-description-color;
+ line-height: 44rpx;
+ font-size: 28rpx;
+ text-align: @action-sheet-text-align;
+ padding: 24rpx 32rpx;
+
+ &:focus {
+ outline: 0;
+ }
+ .border(bottom, @action-sheet-border-color);
+
+ &--left {
+ text-align: left;
+
+ &::after {
+ left: 32rpx;
+ }
}
+ }
+
+ &__list {
&-item {
- height: @action-sheet-list-item-height;
.flex-center();
- &.@{prefix}-is-disabled {
- color: @action-sheet-list-item-color--disabled;
+ .border(bottom, @action-sheet-border-color);
+ height: @action-sheet-list-item-height;
+ padding: 0 32rpx;
+
+ &:focus {
+ outline: 0;
+ }
+ &--left {
+ justify-content: start;
+
+ &::after {
+ left: 32rpx;
+ }
}
+
+ &--disabled {
+ color: @action-sheet-list-item-disabled-color;
+ }
+
&-text {
font-size: @font-size-m;
.ellipsis();
}
+
&-icon {
margin-right: 16rpx;
}
@@ -50,47 +104,29 @@
}
&__swiper-wrap {
+ margin-top: 8rpx;
position: relative;
- background-color: @bg-color-block;
- }
-
- &__square {
- height: 148rpx;
- margin-bottom: 32rpx;
- &-image {
- width: @action-sheet-square-image-size;
- height: @action-sheet-square-image-size;
- padding: @action-sheet-square-image-padding;
- image {
- width: @action-sheet-square-image-size;
- height: @action-sheet-square-image-size;
- }
- }
- &-text {
- width: 100%;
- margin-top: 10rpx;
- font-size: 28rpx;
- color: rgba(0, 0, 0, 0.9);
- text-align: center;
- .ellipsis();
- }
}
&__footer {
- background-color: @bg-color-block;
+ background-color: @bg-color-container;
}
+
&__gap-list {
height: 16rpx;
- background-color: @action-sheet-gap-bg-color;
+ background-color: @action-sheet-border-color;
}
+
&__gap-grid {
height: 1rpx;
- background-color: @action-sheet-gap-bg-color;
+ background-color: @action-sheet-border-color;
}
+
&__cancel {
.flex-center();
- height: @action-sheet-list-item-height;
+ height: @action-sheet-cancel-height;
}
+
&__dots {
position: absolute;
left: 50%;
@@ -111,8 +147,4 @@
}
}
}
- &__safe {
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- }
}
diff --git a/src/action-sheet/action-sheet.ts b/src/action-sheet/action-sheet.ts
index 55c219f46..43ebd5548 100644
--- a/src/action-sheet/action-sheet.ts
+++ b/src/action-sheet/action-sheet.ts
@@ -1,7 +1,7 @@
import { chunk } from '../common/utils';
import { SuperComponent, wxComponent } from '../common/src/index';
import config from '../common/config';
-import { ActionSheetTheme, show } from './index';
+import { ActionSheetTheme, show } from './show';
import props from './props';
const { prefix } = config;
@@ -11,7 +11,7 @@ const name = `${prefix}-action-sheet`;
export default class ActionSheet extends SuperComponent {
static show = show;
- externalClasses = [`${prefix}-class`];
+ externalClasses = [`${prefix}-class`, `${prefix}-class-content`, `${prefix}-class-cancel`];
properties = {
...props,
@@ -33,6 +33,7 @@ export default class ActionSheet extends SuperComponent {
ready() {
this.memoInitialData();
+ this.splitGridThemeActions();
}
methods = {
@@ -53,15 +54,17 @@ export default class ActionSheet extends SuperComponent {
},
/** 指令调用显示 */
- show() {
+ show(options) {
+ this.setData({
+ ...this.initialData,
+ ...options,
+ visible: true,
+ });
this.splitGridThemeActions();
+ this.autoClose = true;
this._trigger('visible-change', { visible: true });
},
- resetData(cb: () => void) {
- this.setData({ ...this.initialData }, cb);
- },
-
memoInitialData() {
this.initialData = {
...this.properties,
@@ -71,24 +74,31 @@ export default class ActionSheet extends SuperComponent {
/** 指令调用隐藏 */
close() {
+ this.triggerEvent('close', { trigger: 'command' });
this._trigger('visible-change', { visible: false });
},
/** 默认点击遮罩关闭 */
onPopupVisibleChange({ detail }) {
if (!detail.visible) {
+ this.triggerEvent('close', { trigger: 'overlay' });
this._trigger('visible-change', { visible: false });
}
+ if (this.autoClose) {
+ this.setData({ visible: false });
+ this.autoClose = false;
+ }
},
onSelect(event: WechatMiniprogram.TouchEvent) {
- const { currentSwiperIndex, items, gridThemeItems, count } = this.data;
+ const { currentSwiperIndex, items, gridThemeItems, count, theme } = this.data;
const { index } = event.currentTarget.dataset;
- const isSwiperMode = items.length > count;
+ const isSwiperMode = theme === ActionSheetTheme.Grid;
const item = isSwiperMode ? gridThemeItems[currentSwiperIndex][index] : items[index];
const realIndex = isSwiperMode ? index + currentSwiperIndex * count : index;
if (item) {
this.triggerEvent('selected', { selected: item, index: realIndex });
+ this.triggerEvent('close', { trigger: 'select' });
this._trigger('visible-change', { visible: false });
}
},
diff --git a/src/action-sheet/action-sheet.wxml b/src/action-sheet/action-sheet.wxml
index 774aff7f2..9be95bc6a 100644
--- a/src/action-sheet/action-sheet.wxml
+++ b/src/action-sheet/action-sheet.wxml
@@ -1,27 +1,38 @@
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+ {{description}}
+
+
+
+
+
+
+
-
+
-