Compare commits

...

7 Commits

Author SHA1 Message Date
neverland
b73dc9cf4f
docs(Tabs): add sticky offset-top tip (#9506) 2021-09-17 20:52:35 +08:00
neverland
826d4ab332
fix(Collapse): wrapperRef may be undefined (#9505) 2021-09-17 20:50:14 +08:00
neverland
ce2a64012d
fix(Radio): icon ref may be undefined (#9503) 2021-09-17 19:41:44 +08:00
chenjiahan
8d0f120dde release: @vant/area-data@1.1.3 2021-09-17 16:40:19 +08:00
Zabo
6021700c27
fix: 更新海南省三沙市地区数据信息 (#9493)
Co-authored-by: 单龙龙 <shanlonglong@yufu.cn>
2021-09-17 16:36:40 +08:00
dependabot[bot]
3d9fe192c9
build(deps): bump prettier from 2.4.0 to 2.4.1 (#9495)
Bumps [prettier](https://github.com/prettier/prettier) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.4.0...2.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-17 16:32:33 +08:00
dependabot[bot]
de8725b1ec
build(deps): bump vite from 2.5.7 to 2.5.8 (#9496)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.5.7 to 2.5.8.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v2.5.8/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.5.8/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-17 16:32:22 +08:00
7 changed files with 21 additions and 18 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@vant/area-data",
"version": "1.1.1",
"version": "1.1.3",
"description": "Vant 省市区数据",
"main": "lib/index.js",
"publishConfig": {

View File

@ -2543,9 +2543,8 @@ export const areaList = {
460203: '吉阳区',
460204: '天涯区',
460205: '崖州区',
460321: '西沙群岛',
460322: '南沙群岛',
460323: '中沙群岛的岛礁及其海域',
460321: '西沙区',
460322: '南沙区',
460401: '那大镇',
460402: '和庆镇',
460403: '南丰镇',

View File

@ -76,13 +76,13 @@
"ora": "^5.4.1",
"postcss": "^8.3.6",
"postcss-load-config": "^3.1.0",
"prettier": "^2.4.0",
"prettier": "^2.4.1",
"release-it": "^14.11.5",
"stylelint": "^13.13.1",
"transliteration": "^2.2.0",
"ts-jest": "^27.0.5",
"typescript": "^4.4.3",
"vite": "^2.5.7",
"vite": "^2.5.8",
"vite-plugin-html": "^2.1.0",
"vite-plugin-md": "^0.11.0",
"vue-router": "^4.0.0",

View File

@ -71,7 +71,7 @@ export default defineComponent({
const onClick = (event: MouseEvent) => {
const { target } = event;
const icon = iconRef.value;
const iconClicked = icon === target || icon!.contains(target as Node);
const iconClicked = icon === target || icon?.contains(target as Node);
if (!disabled.value && (iconClicked || !props.labelDisabled)) {
emit('toggle');

View File

@ -91,7 +91,9 @@ export default defineComponent({
// use double raf to ensure animation can start
doubleRaf(() => {
wrapperRef.value!.style.height = value ? contentHeight : '0';
if (wrapperRef.value) {
wrapperRef.value.style.height = value ? contentHeight : '0';
}
});
} else {
onTransitionEnd();

View File

@ -141,6 +141,8 @@ export default {
</van-tabs>
```
> Tips: 如果页面顶部有其他内容,可以通过 offset-top 属性设置吸顶时与顶部的距离。
### 自定义标签
通过 `title` 插槽可以自定义标签内容。
@ -246,11 +248,11 @@ export default {
| animated | 是否开启切换标签内容时的转场动画 | _boolean_ | `false` |
| border | 是否显示标签栏外边框,仅在 `type="line"` 时有效 | _boolean_ | `false` |
| ellipsis | 是否省略过长的标题文字 | _boolean_ | `true` |
| sticky | 是否使用粘性定位布局 | _boolean_ | `false` |
| sticky | 是否使用粘性布局 | _boolean_ | `false` |
| swipeable | 是否开启手势左右滑动切换 | _boolean_ | `false` |
| lazy-render | 是否开启延迟渲染(首次切换到标签时才触发内容渲染) | _boolean_ | `true` |
| scrollspy | 是否开启滚动导航 | _boolean_ | `false` |
| offset-top | 粘性定位布局下与顶部的最小距离,支持 `px` `vw` `vh` `rem` 单位,默认 `px` | _number \| string_ | `0` |
| offset-top | 粘性布局下吸顶时与顶部的距离,支持 `px` `vw` `vh` `rem` 单位,默认 `px` | _number \| string_ | `0` |
| swipe-threshold | 滚动阈值,标签数量超过阈值且总宽度超过标签栏宽度时开始横向滚动 | _number \| string_ | `5` |
| title-active-color | 标题选中态颜色 | _string_ | - |
| title-inactive-color | 标题默认态颜色 | _string_ | - |

View File

@ -6533,10 +6533,10 @@ prepend-http@^2.0.0:
resolved "https://registry.nlark.com/prepend-http/download/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
prettier@^2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.0.tgz#85bdfe0f70c3e777cf13a4ffff39713ca6f64cba"
integrity sha512-DsEPLY1dE5HF3BxCRBmD4uYZ+5DCbvatnolqTqcxEgKVZnL2kUfyu7b8pPQ5+hTBkdhU9SLUmK0/pHb07RE4WQ==
prettier@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c"
integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA==
pretty-format@^27.0.0, pretty-format@^27.1.0:
version "27.1.0"
@ -7977,10 +7977,10 @@ vite-plugin-md@^0.11.0:
gray-matter "^4.0.3"
markdown-it "^12.2.0"
vite@^2.5.7:
version "2.5.7"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.5.7.tgz#e495be9d8bcbf9d30c7141efdccacde746ee0125"
integrity sha512-hyUoWmRPhjN1aI+ZSBqDINKdIq7aokHE2ZXiztOg4YlmtpeQtMwMeyxv6X9YxHZmvGzg/js/eATM9Z1nwyakxg==
vite@^2.5.8:
version "2.5.8"
resolved "https://registry.yarnpkg.com/vite/-/vite-2.5.8.tgz#e2da21540411e91cb1c4a62e133c652a787cf116"
integrity sha512-2GRsLrmMsFI0u31WTtkGbKvEIJO4I9qDltma3QiyDJEk14IzjM35OCElAFHFs2VlL7h2qX5AdHbwfEhnmwhQgw==
dependencies:
esbuild "^0.12.17"
postcss "^8.3.6"