Skip to content

Commit

Permalink
Merge branch '2.x' into feature/add-single-upload-image-style-2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
yangjinda committed Dec 21, 2020
2 parents e5e3161 + 5452701 commit 27ea9c2
Show file tree
Hide file tree
Showing 70 changed files with 1,357 additions and 204 deletions.
9 changes: 9 additions & 0 deletions docs/markdown/changelog.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ Vant follows [Semantic Versioning 2.0.0](https://semver.org/lang/zh-CN/).

## Details

### [v2.11.3](https://github.com/youzan/vant/compare/v2.11.2...v2.11.3)

`2020-12-18`

**Feature**

- Sku: add disable-soldout-sku prop [#7759](https://github.com/youzan/vant/issues/7759)
- Icon: add delete-o、sort、font、font-o、revoke icon [#7760](https://github.com/youzan/vant/issues/7760)

### [v2.11.2](https://github.com/youzan/vant/compare/v2.11.1...v2.11.2)

`2020-12-10`
Expand Down
9 changes: 9 additions & 0 deletions docs/markdown/changelog.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ Vant 遵循 [Semver](https://semver.org/lang/zh-CN/) 语义化版本规范。

## 更新内容

### [v2.11.3](https://github.com/youzan/vant/compare/v2.11.2...v2.11.3)

`2020-12-18`

**Feature**

- Sku: 新增 disable-soldout-sku 属性 [#7759](https://github.com/youzan/vant/issues/7759)
- Icon: 新增 delete-o、sort、font、font-o、revoke 图标 [#7760](https://github.com/youzan/vant/issues/7760)

### [v2.11.2](https://github.com/youzan/vant/compare/v2.11.1...v2.11.2)

`2020-12-10`
Expand Down
2 changes: 2 additions & 0 deletions docs/markdown/contribution.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

```bash
# 克隆仓库
# 默认为 dev 分支,包含 Vant 3.x 的代码
# 如果需要在 Vant 2.x 上进行更改,请基于 2.x 分支进行开发
git clone git@github.com:youzan/vant.git

# 安装依赖
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vant",
"version": "2.11.2",
"version": "2.11.3",
"description": "Mobile UI Components built on Vue",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down Expand Up @@ -54,7 +54,7 @@
"license": "MIT",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "1.4.0",
"@vant/icons": "1.5.0",
"@vant/popperjs": "^1.0.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
Expand All @@ -64,7 +64,7 @@
},
"devDependencies": {
"@vant/cli": "^2.7.0",
"prettier": "^2.0.4",
"prettier": "2.1.0",
"vue": "^2.6.12",
"vue-template-compiler": "^2.6.12"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vant-cli/site/desktop/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default {
langConfigs() {
const { locales = {} } = config.site;
return Object.keys(locales).map(key => ({
return Object.keys(locales).map((key) => ({
lang: key,
label: locales[key].langLabel || '',
}));
Expand Down
2 changes: 1 addition & 1 deletion packages/vant-cli/site/desktop/components/Header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export default {
},
anotherLang() {
const items = this.langConfigs.filter(item => item.lang !== this.lang);
const items = this.langConfigs.filter((item) => item.lang !== this.lang);
if (items.length) {
return items[0];
}
Expand Down
9 changes: 5 additions & 4 deletions packages/vant-cli/src/common/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ import { existsSync } from 'fs-extra';
import { join, dirname, isAbsolute } from 'path';

function findRootDir(dir: string): string {
if (dir === '/') {
return '/';
if (existsSync(join(dir, 'vant.config.js'))) {
return dir;
}

if (existsSync(join(dir, 'vant.config.js'))) {
const parentDir = dirname(dir);
if (dir === parentDir) {
return dir;
}

return findRootDir(dirname(dir));
return findRootDir(parentDir);
}

// Colors
Expand Down
2 changes: 1 addition & 1 deletion packages/vant-cli/src/common/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const IMPORT_STYLE_RE = /import\s+?(?:(?:".*?")|(?:'.*?'))[\s]*?(?:;|$|)/g;

// "import 'a.less';" => "import 'a.css';"
export function replaceCssImportExt(code: string) {
return code.replace(IMPORT_STYLE_RE, str =>
return code.replace(IMPORT_STYLE_RE, (str) =>
str.replace(`.${CSS_LANG}`, '.css')
);
}
6 changes: 3 additions & 3 deletions packages/vant-cli/src/compiler/get-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ export function getDeps(filePath: string) {
const code = readFileSync(filePath, 'utf-8');
const imports = matchImports(code);
const paths = imports
.map(item => getPathByImport(item, filePath))
.filter(item => !!item) as string[];
.map((item) => getPathByImport(item, filePath))
.filter((item) => !!item) as string[];

depsMap[filePath] = paths;

Expand All @@ -76,7 +76,7 @@ export function getDeps(filePath: string) {
export function replaceScriptImportExt(code: string, from: string, to: string) {
const importLines = matchImports(code);

importLines.forEach(importLine => {
importLines.forEach((importLine) => {
const result = importLine.replace(from, to);
code = code.replace(importLine, result);
});
Expand Down
8 changes: 8 additions & 0 deletions packages/vant-icons/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## Changelog

## 1.5.0

- add sort icon
- add font icon
- add font-o icon
- add revoke icon
- add delete-o icon

## 1.4.0

- add encode-woff2.less
Expand Down
Binary file modified packages/vant-icons/assets/icons.sketch
Binary file not shown.
5 changes: 5 additions & 0 deletions packages/vant-icons/build/codepoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,11 @@ const map = {
F0E6: 'back-top',
F0E7: 'share-o',
F0E8: 'minus',
F0E9: 'delete-o',
F0EA: 'sort',
F0EB: 'font',
F0EC: 'font-o',
F0ED: 'revoke',
};

const reversedMap = {};
Expand Down
2 changes: 1 addition & 1 deletion packages/vant-icons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vant/icons",
"version": "1.4.0",
"version": "1.5.0",
"description": "vant icons",
"main": "./src/config.js",
"files": [
Expand Down
9 changes: 7 additions & 2 deletions packages/vant-icons/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module.exports = {
'plus',
'minus',
'fail',
'circle',
],
outline: [
// has corresponding filled icon
Expand Down Expand Up @@ -79,6 +80,8 @@ module.exports = {
'new-arrival-o',
'goods-collect-o',
'eye-o',
'delete-o',
'font-o',
// without corresponding filled icon
'balance-o',
'refund-o',
Expand Down Expand Up @@ -109,12 +112,12 @@ module.exports = {
'search',
'points',
'edit',
'delete',
'qr',
'qr-invalid',
'closed-eye',
'down',
'scan',
'revoke',
'free-postage',
'certificate',
'logistics',
Expand All @@ -124,7 +127,6 @@ module.exports = {
'exchange',
'upgrade',
'ellipsis',
'circle',
'description',
'records',
'sign',
Expand Down Expand Up @@ -214,6 +216,8 @@ module.exports = {
'new-arrival',
'goods-collect',
'eye',
'delete',
'font',
// without corresponding outline icon
'alipay',
'wechat',
Expand Down Expand Up @@ -241,5 +245,6 @@ module.exports = {
'wap-nav',
'enlarge',
'photo-fail',
'sort',
],
};
26 changes: 23 additions & 3 deletions packages/vant-icons/src/encode-woff2.less

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/vant-icons/src/encode.less

Large diffs are not rendered by default.

26 changes: 23 additions & 3 deletions packages/vant-icons/src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
font-family: 'vant-icon';
font-style: normal;
font-display: auto;
src: url('https://img.yzcdn.cn/vant/vant-icon-96970a.woff2') format('woff2'),
url('https://img.yzcdn.cn/vant/vant-icon-96970a.woff') format('woff'),
url('https://img.yzcdn.cn/vant/vant-icon-96970a.ttf') format('truetype');
src: url('https://img.yzcdn.cn/vant/vant-icon-84f687.woff2') format('woff2'),
url('https://img.yzcdn.cn/vant/vant-icon-84f687.woff') format('woff'),
url('https://img.yzcdn.cn/vant/vant-icon-84f687.ttf') format('truetype');
}

.van-icon {
Expand Down Expand Up @@ -299,6 +299,10 @@
content: '\F043';
}

.van-icon-delete-o::before {
content: '\F0E9';
}

.van-icon-delete::before {
content: '\F044';
}
Expand Down Expand Up @@ -403,6 +407,14 @@
content: '\F05C';
}

.van-icon-font-o::before {
content: '\F0EC';
}

.van-icon-font::before {
content: '\F0EB';
}

.van-icon-free-postage::before {
content: '\F05D';
}
Expand Down Expand Up @@ -735,6 +747,10 @@
content: '\F0AD';
}

.van-icon-revoke::before {
content: '\F0ED';
}

.van-icon-scan::before {
content: '\F0AE';
}
Expand Down Expand Up @@ -823,6 +839,10 @@
content: '\F0C2';
}

.van-icon-sort::before {
content: '\F0EA';
}

.van-icon-star-o::before {
content: '\F0C3';
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vant-markdown-vetur/src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function readLine(input: string) {
function splitTableLine(line: string) {
line = line.replace('\\|', 'JOIN');

const items = line.split('|').map(item => item.trim().replace('JOIN', '|'));
const items = line.split('|').map((item) => item.trim().replace('JOIN', '|'));

// remove pipe character on both sides
items.pop();
Expand Down
2 changes: 2 additions & 0 deletions src/calendar/README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ export default {
};
```

> Tips: 默认情况下,日期区间的起止时间不能为同一天,可以通过设置 allow-same-day 属性来允许选择同一天。
### 快捷选择

`show-confirm` 设置为 `false` 可以隐藏确认按钮,这种情况下选择完成后会立即触发 `confirm` 事件。
Expand Down

0 comments on commit 27ea9c2

Please sign in to comment.