Merge branch '2.x' into dev

This commit is contained in:
chenjiahan 2020-12-17 19:28:01 +08:00
commit b201088172
13 changed files with 407 additions and 356 deletions

View File

@ -57,7 +57,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@babel/runtime": "7.x", "@babel/runtime": "7.x",
"@vant/icons": "^1.4.0", "@vant/icons": "^1.5.0",
"@vant/lazyload": "^1.0.2", "@vant/lazyload": "^1.0.2",
"@vant/popperjs": "^1.0.2", "@vant/popperjs": "^1.0.2",
"@vant/use": "^1.0.0" "@vant/use": "^1.0.0"

View File

@ -39,7 +39,7 @@ const IMPORT_STYLE_RE = /import\s+?(?:(?:".*?")|(?:'.*?'))[\s]*?(?:;|$|)/g;
// "import 'a.less';" => "import 'a.css';" // "import 'a.less';" => "import 'a.css';"
export function replaceCssImportExt(code: string) { export function replaceCssImportExt(code: string) {
return code.replace(IMPORT_STYLE_RE, str => return code.replace(IMPORT_STYLE_RE, (str) =>
str.replace(`.${CSS_LANG}`, '.css') str.replace(`.${CSS_LANG}`, '.css')
); );
} }

View File

@ -62,8 +62,8 @@ export function getDeps(filePath: string) {
const code = readFileSync(filePath, 'utf-8'); const code = readFileSync(filePath, 'utf-8');
const imports = matchImports(code); const imports = matchImports(code);
const paths = imports const paths = imports
.map(item => getPathByImport(item, filePath)) .map((item) => getPathByImport(item, filePath))
.filter(item => !!item) as string[]; .filter((item) => !!item) as string[];
depsMap[filePath] = paths; depsMap[filePath] = paths;
@ -76,7 +76,7 @@ export function getDeps(filePath: string) {
export function replaceScriptImportExt(code: string, from: string, to: string) { export function replaceScriptImportExt(code: string, from: string, to: string) {
const importLines = matchImports(code); const importLines = matchImports(code);
importLines.forEach(importLine => { importLines.forEach((importLine) => {
const result = importLine.replace(from, to); const result = importLine.replace(from, to);
code = code.replace(importLine, result); code = code.replace(importLine, result);
}); });

View File

@ -1,5 +1,13 @@
## Changelog ## Changelog
## 1.5.0
- add sort icon
- add font icon
- add font-o icon
- add revoke icon
- add delete-o icon
## 1.4.0 ## 1.4.0
- add encode-woff2.less - add encode-woff2.less

View File

@ -233,6 +233,11 @@ const map = {
F0E6: 'back-top', F0E6: 'back-top',
F0E7: 'share-o', F0E7: 'share-o',
F0E8: 'minus', F0E8: 'minus',
F0E9: 'delete-o',
F0EA: 'sort',
F0EB: 'font',
F0EC: 'font-o',
F0ED: 'revoke',
}; };
const reversedMap = {}; const reversedMap = {};

View File

@ -1,6 +1,6 @@
{ {
"name": "@vant/icons", "name": "@vant/icons",
"version": "1.4.0", "version": "1.5.0",
"description": "vant icons", "description": "vant icons",
"main": "./src/config.js", "main": "./src/config.js",
"files": [ "files": [

View File

@ -10,6 +10,7 @@ module.exports = {
'plus', 'plus',
'minus', 'minus',
'fail', 'fail',
'circle',
], ],
outline: [ outline: [
// has corresponding filled icon // has corresponding filled icon
@ -79,6 +80,8 @@ module.exports = {
'new-arrival-o', 'new-arrival-o',
'goods-collect-o', 'goods-collect-o',
'eye-o', 'eye-o',
'delete-o',
'font-o',
// without corresponding filled icon // without corresponding filled icon
'balance-o', 'balance-o',
'refund-o', 'refund-o',
@ -109,12 +112,12 @@ module.exports = {
'search', 'search',
'points', 'points',
'edit', 'edit',
'delete',
'qr', 'qr',
'qr-invalid', 'qr-invalid',
'closed-eye', 'closed-eye',
'down', 'down',
'scan', 'scan',
'revoke',
'free-postage', 'free-postage',
'certificate', 'certificate',
'logistics', 'logistics',
@ -124,7 +127,6 @@ module.exports = {
'exchange', 'exchange',
'upgrade', 'upgrade',
'ellipsis', 'ellipsis',
'circle',
'description', 'description',
'records', 'records',
'sign', 'sign',
@ -214,6 +216,8 @@ module.exports = {
'new-arrival', 'new-arrival',
'goods-collect', 'goods-collect',
'eye', 'eye',
'delete',
'font',
// without corresponding outline icon // without corresponding outline icon
'alipay', 'alipay',
'wechat', 'wechat',
@ -241,5 +245,6 @@ module.exports = {
'wap-nav', 'wap-nav',
'enlarge', 'enlarge',
'photo-fail', 'photo-fail',
'sort',
], ],
}; };

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -5,9 +5,9 @@
font-family: 'vant-icon'; font-family: 'vant-icon';
font-style: normal; font-style: normal;
font-display: auto; font-display: auto;
src: url('https://img.yzcdn.cn/vant/vant-icon-96970a.woff2') format('woff2'), src: url('https://img.yzcdn.cn/vant/vant-icon-84f687.woff2') format('woff2'),
url('https://img.yzcdn.cn/vant/vant-icon-96970a.woff') format('woff'), url('https://img.yzcdn.cn/vant/vant-icon-84f687.woff') format('woff'),
url('https://img.yzcdn.cn/vant/vant-icon-96970a.ttf') format('truetype'); url('https://img.yzcdn.cn/vant/vant-icon-84f687.ttf') format('truetype');
} }
.van-icon { .van-icon {
@ -299,6 +299,10 @@
content: '\F043'; content: '\F043';
} }
.van-icon-delete-o::before {
content: '\F0E9';
}
.van-icon-delete::before { .van-icon-delete::before {
content: '\F044'; content: '\F044';
} }
@ -403,6 +407,14 @@
content: '\F05C'; content: '\F05C';
} }
.van-icon-font-o::before {
content: '\F0EC';
}
.van-icon-font::before {
content: '\F0EB';
}
.van-icon-free-postage::before { .van-icon-free-postage::before {
content: '\F05D'; content: '\F05D';
} }
@ -735,6 +747,10 @@
content: '\F0AD'; content: '\F0AD';
} }
.van-icon-revoke::before {
content: '\F0ED';
}
.van-icon-scan::before { .van-icon-scan::before {
content: '\F0AE'; content: '\F0AE';
} }
@ -823,6 +839,10 @@
content: '\F0C2'; content: '\F0C2';
} }
.van-icon-sort::before {
content: '\F0EA';
}
.van-icon-star-o::before { .van-icon-star-o::before {
content: '\F0C3'; content: '\F0C3';
} }

View File

@ -1,78 +1,77 @@
export default { export default {
name: 'Navn', name: 'Navn',
tel: 'Telefon', tel: 'Telefon',
save: 'Lagre', save: 'Lagre',
confirm: 'Bekreft', confirm: 'Bekreft',
cancel: 'Avbryt', cancel: 'Avbryt',
delete: 'Slett', delete: 'Slett',
complete: 'Fullfør', complete: 'Fullfør',
loading: 'Laster...', loading: 'Laster...',
telEmpty: 'Vennligst fyll inn telefonnummer', telEmpty: 'Vennligst fyll inn telefonnummer',
nameEmpty: 'Vennligst fyll inn navn', nameEmpty: 'Vennligst fyll inn navn',
nameInvalid: 'Ugyldig navn', nameInvalid: 'Ugyldig navn',
confirmDelete: 'Er du sikker på at du vil slette?', confirmDelete: 'Er du sikker på at du vil slette?',
telInvalid: 'Ugyldig telefonnummer', telInvalid: 'Ugyldig telefonnummer',
vanCalendar: { vanCalendar: {
end: 'Slutt', end: 'Slutt',
start: 'Start', start: 'Start',
title: 'Kalendar', title: 'Kalendar',
startEnd: 'Start/Slutt', startEnd: 'Start/Slutt',
weekdays: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'], weekdays: ['Søn', 'Man', 'Tir', 'Ons', 'Tor', 'Fre', 'Lør'],
monthTitle: (year: number, month: number) => `${year}/${month}`, monthTitle: (year: number, month: number) => `${year}/${month}`,
rangePrompt: (maxRange: number) => `Maks. ${maxRange} dager`, rangePrompt: (maxRange: number) => `Maks. ${maxRange} dager`,
}, },
vanContactCard: { vanContactCard: {
addText: 'Legg til kontakt info', addText: 'Legg til kontakt info',
}, },
vanContactList: { vanContactList: {
addText: 'Legg til ny kontakt', addText: 'Legg til ny kontakt',
}, },
vanPagination: { vanPagination: {
prev: 'Forrige', prev: 'Forrige',
next: 'Neste', next: 'Neste',
}, },
vanPullRefresh: { vanPullRefresh: {
pulling: 'Dra for oppdatering...', pulling: 'Dra for oppdatering...',
loosing: 'Mist for oppdatering...', loosing: 'Mist for oppdatering...',
}, },
vanSubmitBar: { vanSubmitBar: {
label: 'Totalt', label: 'Totalt',
}, },
vanCoupon: { vanCoupon: {
unlimited: 'Uendelig', unlimited: 'Uendelig',
discount: (discount: number) => `${discount * 10}% avslag`, discount: (discount: number) => `${discount * 10}% avslag`,
condition: (condition: number) => `Minst ${condition}`, condition: (condition: number) => `Minst ${condition}`,
}, },
vanCouponCell: { vanCouponCell: {
title: 'Kupong', title: 'Kupong',
tips: 'Ingen kuponger', tips: 'Ingen kuponger',
count: (count: number) => `Du har ${count} kuponger`, count: (count: number) => `Du har ${count} kuponger`,
}, },
vanCouponList: { vanCouponList: {
empty: 'Ingen kuponger', empty: 'Ingen kuponger',
exchange: 'Bytte', exchange: 'Bytte',
close: 'Lukk', close: 'Lukk',
enable: 'Tilgjengelig', enable: 'Tilgjengelig',
disabled: 'Utilgjengelig', disabled: 'Utilgjengelig',
placeholder: 'Kupong kode', placeholder: 'Kupong kode',
}, },
vanAddressEdit: { vanAddressEdit: {
area: 'Område', area: 'Område',
postal: 'Postkode', postal: 'Postkode',
areaEmpty: 'Vennligst fyll inn område', areaEmpty: 'Vennligst fyll inn område',
addressEmpty: 'Addresse kan ikke være tomt', addressEmpty: 'Addresse kan ikke være tomt',
postalEmpty: 'Feil postkode', postalEmpty: 'Feil postkode',
defaultAddress: 'Sett som standard adresse', defaultAddress: 'Sett som standard adresse',
telPlaceholder: 'Telefon', telPlaceholder: 'Telefon',
namePlaceholder: 'Navn', namePlaceholder: 'Navn',
areaPlaceholder: 'Område', areaPlaceholder: 'Område',
}, },
vanAddressEditDetail: { vanAddressEditDetail: {
label: 'Adresse', label: 'Adresse',
placeholder: 'Adresse', placeholder: 'Adresse',
}, },
vanAddressList: { vanAddressList: {
add: 'Legg til ny adresse', add: 'Legg til ny adresse',
}, },
}; };

522
yarn.lock

File diff suppressed because it is too large Load Diff