diff --git a/src/utils/index.ts b/src/utils/index.ts index 44bb588..348f7a9 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -39,3 +39,11 @@ export function isExternal(path: string) { const isExternal = /^(https?:|http?:|mailto:|tel:)/.test(path); return isExternal; } + +export function toJson(d:any){ + try { + return JSON.parse(d); + } catch (e) { + return {}; + } +} \ No newline at end of file diff --git a/src/views/manage/calculate/edit.vue b/src/views/manage/calculate/edit.vue index d7696d2..cf1cc19 100644 --- a/src/views/manage/calculate/edit.vue +++ b/src/views/manage/calculate/edit.vue @@ -3,78 +3,41 @@
-