empty master

This commit is contained in:
梁灏 2019-08-27 09:37:17 +08:00
parent 92c1162255
commit 67d534df27
276 changed files with 0 additions and 28368 deletions

View file

@ -1,47 +0,0 @@
/**
* String format template
* - Inspired:
* https://github.com/Matt-Esch/string-template/index.js
*/
const RE_NARGS = /(%|)\{([0-9a-zA-Z_]+)\}/g;
export default function(Vue) {
const { hasOwn } = Vue.util;
/**
* template
*
* @param {String} string
* @param {Array} ...args
* @return {String}
*/
function template(string, ...args) {
if (args.length === 1 && typeof args[0] === 'object') {
args = args[0];
}
if (!args || !args.hasOwnProperty) {
args = {};
}
return string.replace(RE_NARGS, (match, prefix, i, index) => {
let result;
if (string[index - 1] === '{' &&
string[index + match.length] === '}') {
return i;
} else {
result = hasOwn(args, i) ? args[i] : null;
if (result === null || result === undefined) {
return '';
}
return result;
}
});
}
return template;
}

View file

@ -1,50 +0,0 @@
// https://github.com/ElemeFE/element/blob/dev/src/locale/index.js
import defaultLang from './lang/zh-CN';
import Vue from 'vue';
import deepmerge from 'deepmerge';
import Format from './format';
const format = Format(Vue);
let lang = defaultLang;
let merged = false;
let i18nHandler = function() {
const vuei18n = Object.getPrototypeOf(this || Vue).$t;
if (typeof vuei18n === 'function') {
if (!merged) {
merged = true;
Vue.locale(
Vue.config.lang,
deepmerge(lang, Vue.locale(Vue.config.lang) || {}, { clone: true })
);
}
return vuei18n.apply(this, arguments);
}
};
export const t = function(path, options) {
let value = i18nHandler.apply(this, arguments);
if (value !== null && value !== undefined) return value;
const array = path.split('.');
let current = lang;
for (let i = 0, j = array.length; i < j; i++) {
const property = array[i];
value = current[property];
if (i === j - 1) return format(value, options);
if (!value) return '';
current = value;
}
return '';
};
export const use = function(l) {
lang = l || lang;
};
export const i18n = function(fn) {
i18nHandler = fn || i18nHandler;
};
export default { use, t, i18n };

View file

@ -1,95 +0,0 @@
export default {
i: {
select: {
placeholder: 'Select',
noMatch: 'No matching data'
},
table: {
noDataText: 'No Data',
noFilteredDataText: 'No filter data',
confirmFilter: 'Confirm',
resetFilter: 'Reset',
clearFilter: 'All'
},
datepicker: {
selectDate: 'Select date',
selectTime: 'Select time',
startTime: 'Start Time',
endTime: 'End Time',
clear: 'Clear',
ok: 'OK',
month: '',
month1: 'January',
month2: 'February',
month3: 'March',
month4: 'April',
month5: 'May',
month6: 'June',
month7: 'July',
month8: 'August',
month9: 'September',
month10: 'October',
month11: 'November',
month12: 'December',
year: '',
weeks: {
sun: 'Sun',
mon: 'Mon',
tue: 'Tue',
wed: 'Wed',
thu: 'Thu',
fri: 'Fri',
sat: 'Sat'
},
months: {
m1: 'Jan',
m2: 'Feb',
m3: 'Mar',
m4: 'Apr',
m5: 'May',
m6: 'Jun',
m7: 'Jul',
m8: 'Aug',
m9: 'Sep',
m10: 'Oct',
m11: 'Nov',
m12: 'Dec'
}
},
transfer: {
titles: {
source: 'Source',
target: 'Target'
},
filterPlaceholder: 'Search here',
notFoundText: 'Not Found'
},
modal: {
okText: 'OK',
cancelText: 'Cancel'
},
poptip: {
okText: 'OK',
cancelText: 'Cancel'
},
page: {
prev: 'Previous Page',
next: 'Next Page',
total: 'Total',
item: 'item',
items: 'items',
prev5: 'Previous 5 Pages',
next5: 'Next 5 Pages',
page: '/page',
goto: 'Goto',
p: ''
},
rate: {
star: 'Star',
stars: 'Stars'
},
tree: {
emptyText: 'No Data'
}
}
};

View file

@ -1,95 +0,0 @@
export default {
i: {
select: {
placeholder: '请选择',
noMatch: '无匹配数据'
},
table: {
noDataText: '暂无数据',
noFilteredDataText: '暂无筛选结果',
confirmFilter: '筛选',
resetFilter: '重置',
clearFilter: '全部'
},
datepicker: {
selectDate: '选择日期',
selectTime: '选择时间',
startTime: '开始时间',
endTime: '结束时间',
clear: '清空',
ok: '确定',
month: '月',
month1: '1 月',
month2: '2 月',
month3: '3 月',
month4: '4 月',
month5: '5 月',
month6: '6 月',
month7: '7 月',
month8: '8 月',
month9: '9 月',
month10: '10 月',
month11: '11 月',
month12: '12 月',
year: '年',
weeks: {
sun: '日',
mon: '一',
tue: '二',
wed: '三',
thu: '四',
fri: '五',
sat: '六'
},
months: {
m1: '1月',
m2: '2月',
m3: '3月',
m4: '4月',
m5: '5月',
m6: '6月',
m7: '7月',
m8: '8月',
m9: '9月',
m10: '10月',
m11: '11月',
m12: '12月'
}
},
transfer: {
titles: {
source: '源列表',
target: '目的列表'
},
filterPlaceholder: '请输入搜索内容',
notFoundText: '列表为空'
},
modal: {
okText: '确定',
cancelText: '取消'
},
poptip: {
okText: '确定',
cancelText: '取消'
},
page: {
prev: '上一页',
next: '下一页',
total: '共',
item: '条',
items: '条',
prev5: '向前 5 页',
next5: '向后 5 页',
page: '条/页',
goto: '跳至',
p: '页'
},
rate: {
star: '星',
stars: '星'
},
tree: {
emptyText: '暂无数据'
}
}
};

View file

@ -1,95 +0,0 @@
export default {
i: {
select: {
placeholder: '請選擇',
noMatch: '無匹配數據'
},
table: {
noDataText: '暫無數據',
noFilteredDataText: '暫無篩選結果',
confirmFilter: '篩選',
resetFilter: '重置',
clearFilter: '全部'
},
datepicker: {
selectDate: '選擇日期',
selectTime: '選擇時間',
startTime: '開始時間',
endTime: '結束時間',
clear: '清空',
ok: '確定',
month: '月',
month1: '1 月',
month2: '2 月',
month3: '3 月',
month4: '4 月',
month5: '5 月',
month6: '6 月',
month7: '7 月',
month8: '8 月',
month9: '9 月',
month10: '10 月',
month11: '11 月',
month12: '12 月',
year: '年',
weeks: {
sun: '日',
mon: '一',
tue: '二',
wed: '三',
thu: '四',
fri: '五',
sat: '六'
},
months: {
m1: '1月',
m2: '2月',
m3: '3月',
m4: '4月',
m5: '5月',
m6: '6月',
m7: '7月',
m8: '8月',
m9: '9月',
m10: '10月',
m11: '11月',
m12: '12月'
}
},
transfer: {
titles: {
source: '源列表',
target: '目的列表'
},
filterPlaceholder: '請輸入搜索內容',
notFoundText: '列表爲空'
},
modal: {
okText: '確定',
cancelText: '取消'
},
poptip: {
okText: '確定',
cancelText: '取消'
},
page: {
prev: '上壹頁',
next: '下壹頁',
total: '共',
item: '條',
items: '條',
prev5: '向前 5 頁',
next5: '向後 5 頁',
page: '條/頁',
goto: '跳至',
p: '頁'
},
rate: {
star: '星',
stars: '星'
},
tree: {
emptyText: '暫無數據'
}
}
};