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",
"dependencies": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.4.0",
"@vant/icons": "^1.5.0",
"@vant/lazyload": "^1.0.2",
"@vant/popperjs": "^1.0.2",
"@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';"
export function replaceCssImportExt(code: string) {
return code.replace(IMPORT_STYLE_RE, str =>
return code.replace(IMPORT_STYLE_RE, (str) =>
str.replace(`.${CSS_LANG}`, '.css')
);
}

View File

@ -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;
@ -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);
});

View File

@ -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

View File

@ -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 = {};

View File

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

View File

@ -10,6 +10,7 @@ module.exports = {
'plus',
'minus',
'fail',
'circle',
],
outline: [
// has corresponding filled icon
@ -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',
@ -109,12 +112,12 @@ module.exports = {
'search',
'points',
'edit',
'delete',
'qr',
'qr-invalid',
'closed-eye',
'down',
'scan',
'revoke',
'free-postage',
'certificate',
'logistics',
@ -124,7 +127,6 @@ module.exports = {
'exchange',
'upgrade',
'ellipsis',
'circle',
'description',
'records',
'sign',
@ -214,6 +216,8 @@ module.exports = {
'new-arrival',
'goods-collect',
'eye',
'delete',
'font',
// without corresponding outline icon
'alipay',
'wechat',
@ -241,5 +245,6 @@ module.exports = {
'wap-nav',
'enlarge',
'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-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 {
@ -299,6 +299,10 @@
content: '\F043';
}
.van-icon-delete-o::before {
content: '\F0E9';
}
.van-icon-delete::before {
content: '\F044';
}
@ -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';
}
@ -735,6 +747,10 @@
content: '\F0AD';
}
.van-icon-revoke::before {
content: '\F0ED';
}
.van-icon-scan::before {
content: '\F0AE';
}
@ -823,6 +839,10 @@
content: '\F0C2';
}
.van-icon-sort::before {
content: '\F0EA';
}
.van-icon-star-o::before {
content: '\F0C3';
}

View File

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

522
yarn.lock

File diff suppressed because it is too large Load Diff