Skip to content

Commit

Permalink
1.1.13 (#2206)
Browse files Browse the repository at this point in the history
* fix(loading): resolve style error (#1873)

* fix(loading): resolve style error

* test: update unit test

* feat: empty的文案添加换行 (#1870)

* fix(button): 修复[button] type="submit"时,disabled未生效 (#1878)

* fix(button): 修复[button] type="submit"时,disabled未生效

修复[button] type="submit"时,disabled未生效

* fix(button): 修复[button] type="submit"时,disabled未生效

修复[button] type="submit"时,disabled未生效

* test: update snap

---------

Co-authored-by: zjianzzhang <zjianzzhang@tencent.com>

* style(row): row垂直居中样式 (#1866)

添加row的flex布局,垂直居中

* fix(progress): 安卓机朗读异常 & 动态朗读 (#1354)

* fix: 安卓机朗读异常

* fix: fix code

* fix: 安卓不发音

* fix: fix code

* fix: wip 优化中

* fix: 优化

* chore: update snap

* fix: fix code

* fix: fix code

* fix: 错误使用iOS变量

* fix(补充注释): 补充注释

* fix: 优化

* test: update snap

* fix: 补充注释

* fix: 优化部分注释, remove code

* fix: 优化注释

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* feature/swiper aria v2 (#1598)

* feat(swiper): support aria

* feat(swiper): support custom ariaLabel

* feat(swiper): image name

* chore(swiper): update snap

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* docs: update custom theme

* fix(radio): resolve style (#1889)

* feat: 支持分割线组件的线条使用变量控制属性 (#1890)

* fix(action-sheet): resolve ts error of show method (#1907)

* fix(grid): 修复column>=4个时,--td-grid-item-image-width和--td-grid-item-text-font-size是无效的 (#1903)

* chore: update _common (#1902)

* feat: 支持radio的内容字体大小使用变量。 (#1895)

* feat: 支持radio的内容字体大小使用变量。

* style: 修改css变量名称

* Bitjian fix/radio icon size (#1909)

* fix: 修复--td-radio-icon-size对未选中的图标未生效

* fix: fix radio 未选择的图标未生效

* fix(radio): support css variables to change circle icon size

---------

Co-authored-by: bitjian <1183048003@qq.com>

* chore: publish v1.1.2 (#1910)

* chore: publish v1.1.2

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(rate): 评分组件支持无障碍滑动 (#1574)

* fix(rate): 评分组件支持滑动无障碍操作(#1050)

* fix(rate): 评分组件样式问题修复.(#1050)

* fix(rate): 评分组件单测问题.(#1050)

* fix(rate): 抽象样式, 冗余代码.(#1050)

* fix(rate): 删除冗余节点.(#1050)

* fix(rate): 优化读取.(#1050)

* fix(rate): 新增额外的读取.(#1050)

* fix(rate): 修复警告旁白导致的滑动卡顿.(#1050)

* fix(rate): sr-only注释(#1050)

* fix(rate): update test snapshots. (#1050)

* build: remove preview workflow tentatively

* fix(upload): resolve max (#1914)

* fix(navbar): resolve capsule zindex (#1920)

* chore: update site

* fix(button): 修复variant=outline等状态下loading不展示 (#1922)

* fix(button): 修复variant=outline等状态下loading不展示

* fix(button): loading inheritColor 字段错误

* fix(navbar): resolve vertical align (#1926)

* fix(navbar): resolve vertical align

* test(navbar): update snapshot

* fix(dropdown-menu): support multiple column radio (#1927)

* fix(Link): resolve disabled problem (#1928)

* fix(calendar): resolve error (#1930)

* fix(calendar): resolve error

* fix(calendar): make observer robust

* fix(tabs): resolve content overflow (#1931)

* fix(tabs): resolve content overflow

* test(tabs): update snapshot

* chore: update issue template

* fix(Input): resolve vertical layout style error (#1934)

* feat(collapse): add header-left-icon property (#1933)

* feat(tabs): add middle slot (#1936)

* chore: publish v1.1.3 (#1937)

* chore: publish v1.1.3

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(slider): enable dragstart and dragend event (#1940)

* fix(image-viewer): add using-custom-navation property (#1944)

* feat(Swiper): update api docs (#1945)

* feat(Swiper): update api docs

* Update CHANGELOG.md

* fix(picker): enable to using falsy value (#1948)

* fix(toast): auto hide when page is hide (#1947)

* feat(swiper): add image-load event (#1949)

* feat(swiper): add image-load event

* fix: resolve fallback value

* test: update snapshot

* chore: publish v1.1.4 (#1950)

* chore: publish v1.1.4

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs(picker): enrich api detail (#1956)

* fix(tabs): resolve track position (#1958)

* feat(pulldown-refresh): add some properties from scroll-view (#1959)

* feat(pulldown-refresh): add some properties from scroll-view

* refactor(pulldown-refresh): using px to calculate

* feat(loading): support indicator slot

* test: update snapshot

* fix(pulldown-refresh): resolve value (#1960)

* feat(datetime-picker): support steps property (#1961)

* feat(steps): add sequence property (#1962)

* feat(dropdown-menu): add css variable for border width (#1967)

* feat(Stepper): allow input to be empty (#1971)

* fix(calendar): enable scroll into view when use-popup is false (#1969)

* chore(image-viewer): update demo (#1968)

* chore(image-viewer): update demo

* chore(image-viewer): update demo

* fix(action-sheet): enable close when click cancel

* chore: recover demo

* chore: publish v1.1.5 (#1975)

* chore: publish v1.1.5

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* docs(badge): update api

* fix(navbar): Fix invalid fixed attribute of Navbar component (#1982)

* feat(Icon): update icon from 0.1.2 to 0.1.4 (#1979)

* feat(Icon): update iconform 0.1.2 to 0.1.4

* test: update snapshots

* chore: update _common

* Feat/picker-zindex (#1985)

* feat: picker添加层级控制

* refactor: 修改popupProps的处理逻辑

* refactor: fix template error

* fix: picker compile error

* fix(DropdownMenu): auto scroll to current (#1788) (#1981)

* fix(DropdownMenu): auto scroll to current (#1788)

* fix(DropdownMenu): resolve auto scroll wrong height (#1788)

* fix(DropdownMenu): auto multi scroll to current (#1788)

* feat: 添加支持date-picker的蒙层属性透 (#1991)

* feat(Slider): the step attribute supports decimals (#1990)

* feat(Slider): the step attribute supports decimals

* fix(slider): resolve emit same value

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* chore: publish v1.1.5-beta

* fix(pulldown-refresh): resolve refresh event

* fix: 修复variant动态修改无效

* feat(Grid): enrich demo (#1993)

* feat(Input): resolve label content wraps (#1994)

* docs(Steps): remove invalid attributes (#1995)

* fix(pulldown-refresh): resolve refresh event (#1998)

* fix(pulldown-refresh): resolve refresh event

* fix(pulldown-refresh): resolve change event

* fix: fix [下拉菜单] 单选选项行高不一致 #1980 (#1992)

* feat: action-sheet支持层级 (#2002)

* fix: 修复多余 row 的样式导致 col 不换行问题 (#1996)

* fix: 修复row样式问题

fix #1964, fix #1851

* fix: 修复多余 row 的样式导致 col 不换行问题

"fix #1964", "fix #1851"

---------

Co-authored-by: pingwu <pingwu@tencent.com>

* fix(dialog): display of cancel and confirm button when calling a command. (#1986)

* fix(dialog): Display problem of cancel and confirm button when calling a command.

* revert(dialog): Revert changes to ` dialog.wxml`

* fix(dialog): Button issue when invoking commands.

---------

Co-authored-by: yuchumian <yuchumian@163.com>

* fix(calendar): enable calendar type (#2003)

* chore: publish v1.1.6 (#2004)

* chore: publish v1.1.6

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore(ActionSheet): prohibit exporting components at index (#2008)

* feat: action-sheet支持cancel的颜色变量 (#2007)

* fix(sticky): resolve width (#2012)

* fix(side-bar-item): fix prefix and suffix style anomalies (#2011)

* fix(tabbar): resolve width when virtual-host not available (#2013)

* chore: publish v1.1.6-beta

* build: update npm publish

* fix(action-sheet): resolve invalid syntax

* fix(Icon): rename some icons (#2020)

* fix(Icon): rename some icons

* test: update snapshots

* chore: publish v1.1.7 (#2031)

* chore: publish v1.1.7

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(Textarea): support max/min height (#2035)

* feat(Textarea): support max/min height

* test: update snapshots

* fix: rename proposal to transform and display installation dependencies (#2046)

* fix(DropdownMenu): resolved the basic library cannot be used under version 2.19.2 (#2043)

* fix(DropdownMenu): resolved the basic library cannot be used under version 2.19.2

* test: update snapshots

* fix(Sticky): resolved width problem (#2047)

* fix(Sticky): resolved width problem

* fix(sticky): recover classname

---------

Co-authored-by: leejimqiu <leejimqiu@gmail.com>

* fix(navbar): polish bg support (#2049)

* fix(drawer): resolve word misspelling (#2039)

* fix(drawer): item-click parameter error

* fix(drawer): item-click parameter error

* fix(drawer): item-click parameter error

* fix(image): enable dynamic dimension (#2050)

* chore: publish v1.1.8 (#2051)

* chore: publish v1.1.8

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(indexes): 索引导航无法选中问题 (#2036)

* fix(indexes): 异步数据未重新计算高度

* docs(indexes): 增加async文档说明

* fix(indexes): 通过indexList null判断是否异步数据

* fix(indexes): 修改indexList type类型

* feat(switch): prevent click when the switch component props loading is true (#2061)

* feat(checkbox): 自定义图标增加半选中态 (#2056)

* feat(Search): support cursor-spacing attr (#2065)

* feat(Search): support cursor-spacing attr

* test: update snapshots

* fix(Switch): resolved loading state style (#2074)

* fix(Icon): resolved icon naming error (#2076)

* fix(tree-select): enable keys property (#2085)

* fix(radio-group): fix abnormal display of radio group selection status (#2082)

* fix(radio-group): fix abnormal display of radio group selection status

* fix(radio-group): fix abnormal display of radio group selection status

* docs(slider): add faq part

* fix(CellGroup): resolved borderen invalid (#2089)

* chore: publish v1.1.9 (#2091)

* chore: publish v1.1.9

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* feat(notice-bar): add interval property when direction='vertical'

* test(notice-bar): add interval property when direction='vertical'

* fix(Grid): resolved align='laft' valid (#2110)

* fix(Fab): resolved hover-class invalid (#2093)

* fix(upload): fix abnormal image display (#2098)

* feat(tabs): add split property (#2113)

* fix(slider): fix abnormal calculation of slider mark (#2114)

* fix(Input): resolve value=0 is valid when type is number (#2108)

* fix(slider): enable async render (#2115)

* fix: add type check before call pagescroll (#2116)

* build: remove issue assign logic

* fix(action-sheet): do not trigger close event when disabled (#2117)

* fix(stepper): trigger change when value changed (#2118)

* chore: publish v1.1.10 (#2119)

* chore: publish v1.1.10

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* fix(tabs): fix style anomalies caused by too many tabs items (#2123)

* fix(picker): fix default value is invalid (#2126)

* feat(checkbox-group): add borderless property (#2124)

* feat(checkbox-group): add borderless property

* test(checkbox-group): add borderless property

* fix(Stepper): resolved precision problem (#2130)

* fix(radio): fix vertical align (#2135)

* fix(checkbox): resolve align when icon size changed (#2136)

* docs(checkbox): update (#2137)

* docs(checkbox): update

* fix(checkbox): resolve priority of disabled property

* fix(search): catch tap event when trigger clear (#2139)

* fix(search): catch tap event when triiger clear

* test(search): update snapshot

* docs: update used page

* fix(divider): replace external class (#2140)

* fix(divider): replace external class

* test: update snapshot

* feat(radio): enable allow-uncheck (#2141)

* feat(radio): enable allow-uncheck

* feat(radio-group): add allowUncheck for RadioOption

* test(radio-group): add allowUncheck for RadioOption

* feat(radio-group): update change value

* fix(toast): resolve repeated event triggering (#2146)

* feat(dropdown-item): add close event (#2147)

* fix: resolve console warnings (#2149)

* Update README.md (#2150)

* fix(popup): update width when placement is bottom (#2152)

* chore: publish v1.1.11 (#2153)

* chore: publish v1.1.11

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* test: remove snapshot for virtual-host (#2161)

* test: remove snapshot for virtual-host

* test: update config

* test: update config

* fix(*): resolve console warn (#2164)

* fix: 修复rate组件选中没有生效 (#2158)

* fix: 修复rate组件选中没有生效

修复rate组件选中没有生效

* fix: 导致父组件tap失效

* fix(rate): uncatch event (#2168)

* feat(pull-down-refresh): 增加show-scrollbar参数 (#2163)

* docs(pulldown-refresh): add show-scrollbar property

* fix(picker): observe value (#2169)

* fix(tabs): enable scroll smoothly (#2170)

* fix(tree-select): enable value with empty array (#2173)

* chore: publish v1.1.12 (#2175)

* chore: publish v1.1.12

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* chore: add css variables content for api docs (#2182)

* fix: resolved some spelling mistake

* chore: add css variables content for api docs

* docs: add external-class content (#2186)

* docs(Button): add external-class contnet

* docs(Grid): add external-class contnet

* docs(Divider): add external-class content

* feat(action-sheet): support the show-overlay property (#2194)

* fix(toast): fix type error in the close method of toast (#2191)

* fix: action ci script security

* fix: resolved some spelling mistake (#2197)

* fix: resolved some spelling mistake

* fix(StepItem): remove useless css

* Fix/20230715 wrong label (#2195)

* fix(slider, message): 修复message nowrap classPrefix 失效 & slider 组件标签大括号异常

message nowrap 属性中的 classPrefix 被当做字符串处理,导致无法正常使用。slider 组件中多出来了一对闭合大括号,导致无法正常匹配

* fix(message 组件): marquee 还原

变量还原

* fix(message): 多余中括号移除

多余中括号移除

---------

Co-authored-by: gao.ghf <gao.ghf@alibaba-inc.com>

* docs(action-sheet): enable show-overlay (#2196)

* fix(picker): column index is always zero (#2188)

* docs: add external-class content (#2200)

* chore: publish v1.1.13 (#2205)

* chore: publish v1.1.13

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Cyrus <liuxingran97@qq.com>
Co-authored-by: favouredddd <40692560+favouredddd@users.noreply.github.com>
Co-authored-by: 孜孜 <1183048003@qq.com>
Co-authored-by: zjianzzhang <zjianzzhang@tencent.com>
Co-authored-by: tomcat-hz <59186135+tomcat-hz@users.noreply.github.com>
Co-authored-by: 龙风 <455947455@qq.com>
Co-authored-by: zhangpaopao <zhangpaopao0609@gmail.com>
Co-authored-by: Guan9 <mllz79@163.com>
Co-authored-by: Y <anly_yaw@163.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: byqbai <byq1213@qq.com>
Co-authored-by: betavs <34408516+betavs@users.noreply.github.com>
Co-authored-by: jarmywang <awangjianjun9@gmail.com>
Co-authored-by: jurrychen <534747442@qq.com>
Co-authored-by: pingwu <58472278+wuping97@users.noreply.github.com>
Co-authored-by: pingwu <pingwu@tencent.com>
Co-authored-by: yuchumian <26185330+yuchumian@users.noreply.github.com>
Co-authored-by: yuchumian <yuchumian@163.com>
Co-authored-by: ElanYoung <39727435+ElanYoung@users.noreply.github.com>
Co-authored-by: betavs <392368711@qq.com>
Co-authored-by: Antzy <mozbano@163.com>
Co-authored-by: xiaosansiji <xiaosansiji@gmail.com>
Co-authored-by: Hwaphon <969489625@qq.com>
Co-authored-by: gao.ghf <gao.ghf@alibaba-inc.com>
Co-authored-by: ccccpj <ccccpj@outlook.com>
  • Loading branch information
1 parent 224f614 commit 6ce8faf
Show file tree
Hide file tree
Showing 161 changed files with 2,518 additions and 815 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ jobs:
ref: ${{ steps.comment.outputs.branch }}
- run: echo '${{ github.event.comment.body }}'
- name: Commit and push if needed
env:
BODY: ${{ github.event.comment.body }}
run: |
txt=$(cat CHANGELOG.md)
body='${{ github.event.comment.body }}'
echo "${txt%%##*}${body}${txt##*---}" > CHANGELOG.md
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]"
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ toc: false
docClass: timeline
---

## 🌈 1.1.13 `2023-07-18`
### 🚀 Features
- `ActionSheet`: 新增 show-overlay 属性 @betavs ([#2194](https://github.com/Tencent/tdesign-miniprogram/pull/2194))
### 🐞 Bug Fixes
- `Toast`: 修复close方法类型声明错误 @betavs ([#2191](https://github.com/Tencent/tdesign-miniprogram/pull/2191))
- `Message`: 修复 `__text-nowrap` 类名前缀错误的问题 @hwaphon ([#2195](https://github.com/Tencent/tdesign-miniprogram/pull/2195))
- `Slider`: 移除错误的 wxml @hwaphon ([#2195](https://github.com/Tencent/tdesign-miniprogram/pull/2195))
- `DateTimePicker`: 修复动态传入 mode 时无法正确渲染的问题 @betavs ([#2188](https://github.com/Tencent/tdesign-miniprogram/pull/2188))

### 🚧 Others
- `docs`: 在 API 模块展示所有的 CSS Variables @anlyyao ([#2182](https://github.com/Tencent/tdesign-miniprogram/pull/2182))
- `docs`: 将外部样式类的内容独立展示 @ccccpj ([#2200](https://github.com/Tencent/tdesign-miniprogram/pull/2200))
- 修复一些示例/文档中的拼写错误 @anlyyao ([#2197](https://github.com/Tencent/tdesign-miniprogram/pull/2197))


## 🌈 1.1.12 `2023-07-11`
### 🚀 Features
- `PullDownRefresh`: 增加 show-scrollbar 属性 @lolhezihehe ([#2163](https://github.com/Tencent/tdesign-miniprogram/pull/2163))
Expand Down Expand Up @@ -425,7 +440,7 @@ docClass: timeline
- `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))
- `Cell`: 新增 CSS Variables 用于控制高度 @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))

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ npm start
此时会同时启动 `dist``example` 的构建服务,对应的开发路径与构建路径分别为:

- `src` -> `miniprogram_dist`
- `src/*/_exmaple` -> `example` -> `_example`
- `src/*/_example` -> `example` -> `_example`

使用微信开发者工具导入项目 `_example` 文件夹

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tdesign-miniprogram",
"purename": "tdesign",
"version": "1.1.12",
"version": "1.1.13",
"description": "tdesign-miniprogram",
"title": "tdesign-ßminiprogram",
"main": "miniprogram_dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion script/generate-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function updateVersion() {
rl.on('line', (input) => {
let newVersion = '';
if (!input) {
newVersion = pkg.version.replace(/(\d+\.\d+\.)(\d+)/, (verion, $1, $2) => $1 + (Number($2) + 1));
newVersion = pkg.version.replace(/(\d+\.\d+\.)(\d+)/, (version, $1, $2) => $1 + (Number($2) + 1));
} else if (!VERSION_REG.test(input)) {
console.log('\x1B[31m%s\x1B[0m', '\n⚡ 不要搞事年轻人,请输入正确版本号格式!\n');
rl.prompt();
Expand Down
69 changes: 69 additions & 0 deletions script/generate-css-vars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
const fs = require('fs');
const path = require('path');

const combine = {
avatar: ['avatar-group', 'avatar'],
cell: ['cell-group', 'cell'],
collapse: ['collapse', 'collapse-panel'],
'dropdown-menu': ['dropdown-menu', 'dropdown-item'],
tag: ['tag', 'check-tag'],
checkbox: ['checkbox-group', 'checkbox'],
indexes: ['indexes', 'indexes-anchor'],
picker: ['picker', 'picker-item'],
radio: ['radio-group', 'radio'],
'side-bar': ['side-bar', 'side-bar-item'],
steps: ['steps', 'step-item'],
swiper: ['swiper', 'swiper-nav'],
tabs: ['tabs', 'tab-panel'],
'tab-bar': ['tab-bar', 'tab-bar-item'],
grid: ['grid', 'grid-item'],
};

function resolveCwd(...args) {
args.unshift(process.cwd());
return path.join(...args);
}

const COMPONENT_NAME = process.argv[process.argv.indexOf('--NAME') + 1]; // 在 --NAME 后面

// eslint-disable-next-line
const matchReg = /(?<=var).*?(?=\;)/g;

// 使用 v2 文件夹下 _var.less 文件
const lessPath = [];
if (combine[COMPONENT_NAME]) {
combine[COMPONENT_NAME].forEach((item) => {
lessPath.push(resolveCwd(`src/${item}/${item}.less`));
});
} else {
lessPath.push(resolveCwd(`src/${COMPONENT_NAME}/${COMPONENT_NAME}.less`));
}

// 追加到文件
const cssVariableHeadContent = `\n\n### CSS 变量\n组件提供了下列 CSS 变量,可用于自定义样式。\n名称 | 默认值 | 描述 \n-- | -- | --\n`;
const cssVariableHeadContentEn = `\n\n### CSS Variables\nThe component provides the following CSS variables, which can be used to customize styles.\nName | Default Value | Description \n-- | -- | --\n`;

fs.appendFileSync(resolveCwd(`src/${COMPONENT_NAME}/README.md`), cssVariableHeadContent);
fs.appendFileSync(resolveCwd(`src/${COMPONENT_NAME}/README.en-US.md`), cssVariableHeadContentEn);

// 读取 less 文件内容
lessPath.forEach((item) => {
if (fs.existsSync(item)) {
fs.readFile(item, 'utf8', (err, file) => {
if (err) {
console.log('please execute npm run update:css first!', err);
return;
}
const list = file.match(matchReg)?.sort();
let cssVariableBodyContent = '';
list?.forEach((item) => {
cssVariableBodyContent += `${item.slice(1, item.indexOf(','))} | ${item.slice(
item.indexOf(',') + 2,
item.length - 1,
)} | - \n`;
});
fs.appendFileSync(resolveCwd(`src/${COMPONENT_NAME}/README.md`), cssVariableBodyContent);
fs.appendFileSync(resolveCwd(`src/${COMPONENT_NAME}/README.en-US.md`), cssVariableBodyContent);
});
}
});
8 changes: 4 additions & 4 deletions script/prerender.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ function initPageList() {
});
});

console.log(pageList)
console.log(pageList);

return pageList;
}

async function initPreviewServer() {
const previewServer = await preview({
preview: { port: 9999, open: false },
build: { outDir: './_site' }
build: { outDir: './_site' },
});

previewServer.printUrls();
Expand All @@ -41,7 +41,7 @@ async function initPreviewServer() {
fs.mkdirSync(spiderPath);
} catch {}

for (let url of pageList) {
for (const url of pageList) {
const [, pathName] = url.split(prefix);
const filePath = `${spiderPath}${pathName || '/index'}.html`;

Expand All @@ -54,7 +54,7 @@ async function initPreviewServer() {
fs.mkdirSync(path.dirname(filePath));
} catch {}

console.log('\x1b[32m', `writting ${url}... \n`);
console.log('\x1b[32m', `writing ${url}... \n`);
fs.writeFileSync(filePath, html);
}

Expand Down
2 changes: 1 addition & 1 deletion script/test/transform.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 由于开启 vritualHost=true 之后,selectComponent 无法获取,暂时在单测关闭 virtualHost
// 由于开启 virtualHost=true 之后,selectComponent 无法获取,暂时在单测关闭 virtualHost
const path = require('path');
const babelJest = require('babel-jest');

Expand Down
2 changes: 1 addition & 1 deletion site/docs/custom-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ page {
}
```

> 目前仅有部分组件支持自定义主题,支持的组件在其文档有陈列对应的 CSS Varialbes,可以访问 [tab-bar-item.less](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/tab-bar-item/tab-bar-item.less)
> 目前仅有部分组件支持自定义主题,支持的组件在其文档有陈列对应的 CSS Variables,可以访问 [tab-bar-item.less](https://github.com/Tencent/tdesign-miniprogram/blob/develop/src/tab-bar-item/tab-bar-item.less)
4 changes: 2 additions & 2 deletions site/plugin-tdoc/transforms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let demoCodesImports: Record<string, string> = {};

export default {
before({ source, file, md }: any) {
const resouceDir = path.dirname(file);
const resourceDir = path.dirname(file);
const reg = file.match(/src\/(\S*)(?=\/\S*.md)/);
const name = reg && reg[1];
demoCodesImports = {};
Expand All @@ -23,7 +23,7 @@ export default {

// 替换成对应 demo 文件
source = source.replace(/{{\s+(.+)\s+}}/g, (_: string, demoDirName: string) => {
const demoPath = path.resolve(resouceDir, `./_example/${demoDirName}`);
const demoPath = path.resolve(resourceDir, `./_example/${demoDirName}`);
if (!fs.existsSync(demoPath)) {
console.log('\x1B[36m%s\x1B[0m', `${name} 组件需要实现 _example/${demoDirName} 示例!`);
return '\n<h3>DEMO (🚧建设中)...</h3>';
Expand Down
16 changes: 16 additions & 0 deletions src/action-sheet/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ count | Number | 8 | \- | N
description | String | - | `0.29.0` | N
items | Array | - | required。Typescript:`Array<string \| ActionSheetItem>` `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
show-overlay | Boolean | true | \- | N
theme | String | list | options:list/grid | N
visible | Boolean | false | required | Y
default-visible | Boolean | undefined | required。uncontrolled property | Y
Expand All @@ -22,3 +23,18 @@ name | params | description
cancel | \- | \-
close | `(trigger: TriggerSource)` | [see more ts definition](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。<br/>`type TriggerSource = 'overlay' \| 'command' \| 'select' `<br/>
selected | `(selected: ActionSheetItem \| string, index: number)` | \-


### CSS Variables
The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description
-- | -- | --
--td-action-sheet-border-color | @gray-color-1 | -
--td-action-sheet-border-radius | @radius-extra-large | -
--td-action-sheet-cancel-color | @font-gray-1 | -
--td-action-sheet-cancel-height | 96rpx | -
--td-action-sheet-color | @font-gray-1 | -
--td-action-sheet-description-color | @font-gray-3 | -
--td-action-sheet-list-item-disabled-color | @font-gray-4 | -
--td-action-sheet-list-item-height | 112rpx | -
--td-action-sheet-text-align | center | -
23 changes: 22 additions & 1 deletion src/action-sheet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,10 @@ count | Number | 8 | 设置每页展示菜单的数量,仅当 type=grid 时有
description | String | - | `0.29.0`。动作面板描述文字 | N
items | Array | - | 必需。菜单项。TS 类型:`Array<string \| ActionSheetItem>` `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
show-overlay | Boolean | true | 是否显示遮罩层 | N
theme | String | list | 展示类型,列表和表格形式展示。可选项:list/grid | N
visible | Boolean | false | 必需。显示与隐藏 | Y
default-visible | Boolean | undefined | 必需。显示与隐藏。非受控属性 | Y
external-classes | Array | - | 组件类名,用于设置组件外层元素类名。`['t-class', 't-class-content', 't-class-cancel']` | N

### ActionSheet Events

Expand All @@ -105,3 +105,24 @@ external-classes | Array | - | 组件类名,用于设置组件外层元素类
cancel | \- | 点击取消按钮时触发
close | `(trigger: TriggerSource)` | 关闭时触发。[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/tree/develop/src/action-sheet/type.ts)。<br/>`type TriggerSource = 'overlay' \| 'command' \| 'select' `<br/>
selected | `(selected: ActionSheetItem \| string, index: number)` | 选择菜单项时触发

### ActionSheet 外部样式类
类名 | 说明
-- | --
t-class | 根节点样式类
t-class-content | 内容样式类
t-class-cancel | 取消样式类

### CSS 变量
组件提供了下列 CSS 变量,可用于自定义样式。
名称 | 默认值 | 描述
-- | -- | --
--td-action-sheet-border-color | @gray-color-1 | -
--td-action-sheet-border-radius | @radius-extra-large | -
--td-action-sheet-cancel-color | @font-gray-1 | -
--td-action-sheet-cancel-height | 96rpx | -
--td-action-sheet-color | @font-gray-1 | -
--td-action-sheet-description-color | @font-gray-3 | -
--td-action-sheet-list-item-disabled-color | @font-gray-4 | -
--td-action-sheet-list-item-height | 112rpx | -
--td-action-sheet-text-align | center | -
1 change: 1 addition & 0 deletions src/action-sheet/action-sheet.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
visible="{{visible}}"
placement="bottom"
bind:visible-change="onPopupVisibleChange"
show-overlay="{{showOverlay}}"
z-index="{{ popupProps.zIndex || defaultPopUpzIndex }}"
overlay-props="{{ popupProps.overlayProps || defaultPopUpProps }}"
>
Expand Down
5 changes: 5 additions & 0 deletions src/action-sheet/props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ const props: TdActionSheetProps = {
type: Boolean,
value: false,
},
/** 是否显示遮罩层 */
showOverlay: {
type: Boolean,
value: true,
},
/** popupProps透传 */
popupProps: {
type: Object,
Expand Down
9 changes: 9 additions & 0 deletions src/action-sheet/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ export interface TdActionSheetProps {
type: BooleanConstructor;
value?: boolean;
};
/**
* 是否显示遮罩层
* @default true
*/
showOverlay: {
type: BooleanConstructor;
value?: boolean;
};
/** popupProps透传 */
popupProps: {
type: ObjectConstructor;
value?: object;
Expand Down
27 changes: 27 additions & 0 deletions src/avatar/README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,30 @@ collapse-avatar | String / Slot | - | \- | N
external-classes | Array | - | `['t-class', 't-class-image', 't-class-content']` | N
max | Number | - | \- | N
size | String | medium | size | N


### CSS Variables
The component provides the following CSS variables, which can be used to customize styles.
Name | Default Value | Description
-- | -- | --
--td-avatar-group-margin-left-large | -8px | -
--td-avatar-group-margin-left-medium | -6px | -
--td-avatar-group-margin-left-small | -4px | -
--td-avatar-bg-color | @brand-color-light-active | -
--td-avatar-border-color | #fff | -
--td-avatar-border-width-large | 8rpx | -
--td-avatar-border-width-medium | 6rpx | -
--td-avatar-border-width-small | 4rpx | -
--td-avatar-circle-border-radius | @radius-circle | -
--td-avatar-content-color | @brand-color | -
--td-avatar-icon-large-font-size | 64rpx | -
--td-avatar-icon-medium-font-size | 48rpx | -
--td-avatar-icon-small-font-size | 40rpx | -
--td-avatar-large-width | 128rpx | -
--td-avatar-margin-left | 0 | -
--td-avatar-medium-width | 96rpx | -
--td-avatar-round-border-radius | @radius-default | -
--td-avatar-small-width | 80rpx | -
--td-avatar-text-large-font-size | 16px | -
--td-avatar-text-medium-font-size | @font-size-base | -
--td-avatar-text-small-font-size | @font-size-s | -
Loading

0 comments on commit 6ce8faf

Please sign in to comment.