fix(Icon): medal typo (#5242)

This commit is contained in:
neverland 2019-12-11 11:24:54 +08:00 committed by GitHub
parent 95148ebda0
commit 6af96aa580
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 79 additions and 61 deletions

View File

@ -54,7 +54,7 @@
"license": "MIT",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "1.1.15",
"@vant/icons": "1.2.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
},

View File

@ -1,6 +1,6 @@
{
"name": "@vant/icons",
"version": "1.1.15",
"version": "1.2.0",
"description": "vant icons",
"main": "./src/config.js",
"files": [
@ -12,18 +12,26 @@
"scripts": {
"export": "node ./build/export.js",
"build": "npm run export && gulp --gulpfile ./build/build-iconfont.js",
"release": "npm run build && npm publish"
"release": "npm run build && release-it"
},
"license": "MIT",
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-icons",
"devDependencies": {
"fast-glob": "^3.0.0",
"fs-extra": "^8.0.1",
"fast-glob": "^3.1.1",
"fs-extra": "^8.1.0",
"gulp": "^4.0.2",
"gulp-iconfont": "^10.0.3",
"gulp-iconfont-css": "^3.0.0",
"md5-file": "^4.0.0",
"shelljs": "^0.8.3",
"svgo": "^1.2.2"
"svgo": "1.2.2"
},
"release-it": {
"git": {
"tag": false,
"commitMessage": "chore: release @vant/icons ${version}",
"addUntrackedFiles": true,
"requireCleanWorkingDir": false
}
}
}

View File

@ -65,7 +65,7 @@ module.exports = {
'photo-o',
'gift-card-o',
'expand-o',
'medel-o',
'medal-o',
'good-job-o',
'manager-o',
'label-o',
@ -199,7 +199,7 @@ module.exports = {
'photo',
'gift-card',
'expand',
'medel',
'medal',
'good-job',
'manager',
'label',

File diff suppressed because one or more lines are too long

View File

@ -4,9 +4,9 @@
font-family: 'vant-icon';
font-style: normal;
font-display: auto;
src: url('https://img.yzcdn.cn/vant/vant-icon-0bc654.woff2') format('woff2'),
url('https://img.yzcdn.cn/vant/vant-icon-0bc654.woff') format('woff'),
url('https://img.yzcdn.cn/vant/vant-icon-0bc654.ttf') format('truetype');
src: url('https://img.yzcdn.cn/vant/vant-icon-d3825a.woff2') format('woff2'),
url('https://img.yzcdn.cn/vant/vant-icon-d3825a.woff') format('woff'),
url('https://img.yzcdn.cn/vant/vant-icon-d3825a.ttf') format('truetype');
}
.van-icon {
@ -546,11 +546,11 @@
content: "\F082";
}
.van-icon-medel-o:before {
.van-icon-medal-o:before {
content: "\F083";
}
.van-icon-medel:before {
.van-icon-medal:before {
content: "\F084";
}

View File

@ -2,25 +2,25 @@
# yarn lockfile v1
"@nodelib/fs.scandir@2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.0.1.tgz#120ff490365eb7a86b7f883af216382963c8436f"
integrity sha512-p2mECeAoBC1G3PfTt65jKoNAd926rJTPg7RgsW7jR42Y1y/vrDkBcd9cvCKAUWB5aSaI3rBoYRE4qLw5sHjKeg==
"@nodelib/fs.scandir@2.1.3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==
dependencies:
"@nodelib/fs.stat" "2.0.1"
"@nodelib/fs.stat" "2.0.3"
run-parallel "^1.1.9"
"@nodelib/fs.stat@2.0.1", "@nodelib/fs.stat@^2.0.0":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.1.tgz#814f71b1167390cfcb6a6b3d9cdeb0951a192c14"
integrity sha512-+RqhBlLn6YRBGOIoVYthsG0J9dfpO79eJyN7BYBkZJtfqrBwf2KK+rD/M/yjZR6WBmIhAgOV7S60eCgaSWtbFw==
"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3"
integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==
"@nodelib/fs.walk@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.1.1.tgz#62b9f903397ad32b14b88de30674e6350b0f35ed"
integrity sha512-MmjNq20/nGuDyc4PUSpTiiu5Hg9Q9VfQR78CGf2Yquhws9SCm+XDdxYa1niRqeVHW9nP8DQSX+tlM8bLUNsUGA==
"@nodelib/fs.walk@^1.2.3":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976"
integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==
dependencies:
"@nodelib/fs.scandir" "2.0.1"
"@nodelib/fs.scandir" "2.1.3"
fastq "^1.6.0"
"@types/q@^1.5.1":
@ -1010,16 +1010,15 @@ fast-deep-equal@^2.0.1:
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
fast-glob@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.0.0.tgz#719bc921f2c37322affd3b6fbfcfbb135e7fc198"
integrity sha512-zyUoA7qfL6sIWD7FYyleqjsOZ4BbpILPrGVKM3inQV4lJ71kOqFHNX7G95PX4iVMojol01LXJ6gQW/usDLNqnQ==
fast-glob@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82"
integrity sha512-nTCREpBY8w8r+boyFYAx21iL6faSsQynliPHM4Uf56SbkyohCNxpVPEH9xrF5TXKy+IsjkPUHDKiUkzBVRXn9g==
dependencies:
"@nodelib/fs.stat" "^2.0.0"
"@nodelib/fs.walk" "^1.1.0"
glob-parent "^5.0.0"
is-glob "^4.0.0"
merge2 "^1.2.3"
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.0"
merge2 "^1.3.0"
micromatch "^4.0.2"
fast-json-stable-stringify@^2.0.0:
@ -1141,12 +1140,12 @@ fragment-cache@^0.2.1:
dependencies:
map-cache "^0.2.2"
fs-extra@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.0.1.tgz#90294081f978b1f182f347a440a209154344285b"
integrity sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A==
fs-extra@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
dependencies:
graceful-fs "^4.1.2"
graceful-fs "^4.2.0"
jsonfile "^4.0.0"
universalify "^0.1.0"
@ -1227,10 +1226,10 @@ glob-parent@^3.1.0:
is-glob "^3.1.0"
path-dirname "^1.0.0"
glob-parent@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954"
integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==
glob-parent@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
dependencies:
is-glob "^4.0.1"
@ -1306,6 +1305,11 @@ graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==
graceful-fs@^4.2.0:
version "4.2.3"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
gulp-cli@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/gulp-cli/-/gulp-cli-2.2.0.tgz#5533126eeb7fe415a7e3e84a297d334d5cf70ebc"
@ -2116,10 +2120,10 @@ mdn-data@~1.1.0:
resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01"
integrity sha512-FSYbp3lyKjyj3E7fMl6rYvUdX0FBXaluGqlFoYESWQlyUTq8R+wp0rkFxoYFqZlHCvsUXGjyJmLQSnXToYhOSA==
merge2@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5"
integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA==
merge2@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81"
integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==
microbuffer@^1.0.0:
version "1.0.0"
@ -3280,7 +3284,7 @@ svgicons2svgfont@^9.0.3:
svg-pathdata "^5.0.0"
transformation-matrix-js "^2.7.1"
svgo@^1.2.2:
svgo@1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-1.2.2.tgz#0253d34eccf2aed4ad4f283e11ee75198f9d7316"
integrity sha512-rAfulcwp2D9jjdGu+0CuqlrAUin6bBWrpoqXWwKDZZZJfXcUXQSxLJOFJCQCSA0x0pP2U0TxSlJu2ROq5Bq6qA==

View File

@ -10,7 +10,7 @@ import { DefaultSlots } from '../utils/types';
export type IconProps = {
dot?: boolean;
tag: keyof HTMLElementTagNameMap | string;
name: string;
name?: string;
size?: string | number;
color?: string;
info?: string | number;
@ -27,17 +27,23 @@ function isImage(name?: string): boolean {
return name ? name.indexOf('/') !== -1 : false;
}
// compatible with legacy usage, should be removed in next major version
function correctName(name?: string) {
return name === 'medel' ? 'medal' : name;
}
function Icon(
h: CreateElement,
props: IconProps,
slots: DefaultSlots,
ctx: RenderContext<IconProps>
) {
const imageIcon = isImage(props.name);
const name = correctName(props.name);
const imageIcon = isImage(name);
return (
<props.tag
class={[props.classPrefix, imageIcon ? '' : `${props.classPrefix}-${props.name}`]}
class={[props.classPrefix, imageIcon ? '' : `${props.classPrefix}-${name}`]}
style={{
color: props.color,
fontSize: addUnit(props.size)
@ -46,7 +52,7 @@ function Icon(
>
{slots.default && slots.default()}
{imageIcon && (
<Image class={bem('image')} fit="contain" src={props.name} showLoading={false} />
<Image class={bem('image')} fit="contain" src={name} showLoading={false} />
)}
<Info dot={props.dot} info={props.info} />
</props.tag>

View File

@ -99,7 +99,7 @@ function TreeSelect(
emit(ctx, 'update:active-id', newActiveId);
emit(ctx, 'click-item', item);
// compatible for old usage, should be removed in next major version
// compatible with legacy usage, should be removed in next major version
emit(ctx, 'itemclick', item);
}
}}
@ -120,7 +120,7 @@ function TreeSelect(
onChange={(index: number) => {
emit(ctx, 'update:main-active-index', index);
emit(ctx, 'click-nav', index);
// compatible for old usage, should be removed in next major version
// compatible with legacy usage, should be removed in next major version
emit(ctx, 'navclick', index);
}}
>

View File

@ -1423,10 +1423,10 @@
eslint-plugin-import "^2.18.2"
eslint-plugin-vue "^5.2.3"
"@vant/icons@1.1.15":
version "1.1.15"
resolved "https://registry.yarnpkg.com/@vant/icons/-/icons-1.1.15.tgz#53c51ace21e9992bfeeb2e1ad9094fbf6506d116"
integrity sha512-96tbJotfofrKpOrUGWKkiGLJsCFc0OX5pikWLW5yarD+EMhi0zCrQSDb95xGrp/HETAFm+nSTQu2e1zGsWN/7A==
"@vant/icons@1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@vant/icons/-/icons-1.2.0.tgz#ed31f367185704fa2ef9b437a0c8d3ee5e4f5f58"
integrity sha512-japcEMXv5BWyWNwjL52WX9pdMWB2wrZtvF0p0CwhbKJyoz/WxuvHVsNjzbeCtkBlofa+0txfJTt22qyz5BABaA==
"@vant/markdown-loader@^2.3.0":
version "2.3.0"