feat: map初始化

This commit is contained in:
chenjinsong
2021-06-24 17:59:51 +08:00
parent 0defa0799d
commit c8a5baf85f
7 changed files with 179 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
import { ElMessageBox } from 'element-plus'
import i18n from '@/i18n'
import _ from 'lodash'
export const tableSort = {
// 是否需要排序
@@ -376,3 +377,11 @@ export function calculateTextWidth (text, fontSize = 14) {
html.innerText = text
return html.offsetWidth
}
/* url占位符处理 */
export function replaceUrlPlaceholder (url, params) {
_.forIn(params, (value, key) => {
url = url.replace('{{' + key + '}}', value)
})
return url
}