mirror of https://github.com/nocodb/nocodb
Wing-Kam Wong
2 years ago
71 changed files with 1377 additions and 1079 deletions
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,11 @@
|
||||
<script setup lang="ts"> |
||||
const { appInfo } = useGlobal() |
||||
</script> |
||||
|
||||
<template> |
||||
<AccountUserManagement v-if="$route.params.page === 'users'" /> |
||||
<AccountToken v-else-if="$route.params.page === 'tokens'" /> |
||||
<AccountAppStore v-else-if="$route.params.page === 'apps'" /> |
||||
<AccountAppStore v-else-if="$route.params.page === 'apps' && !appInfo.isCloud" /> |
||||
<AccountLicense v-else-if="$route.params.page === 'license'" /> |
||||
<span v-else></span> |
||||
</template> |
||||
|
@ -1,67 +0,0 @@
|
||||
export default function jsepTreeToFormula(node) { |
||||
if (node.type === 'BinaryExpression' || node.type === 'LogicalExpression') { |
||||
return ( |
||||
'(' + |
||||
jsepTreeToFormula(node.left) + |
||||
' ' + |
||||
node.operator + |
||||
' ' + |
||||
jsepTreeToFormula(node.right) + |
||||
')' |
||||
); |
||||
} |
||||
|
||||
if (node.type === 'UnaryExpression') { |
||||
return node.operator + jsepTreeToFormula(node.argument); |
||||
} |
||||
|
||||
if (node.type === 'MemberExpression') { |
||||
return ( |
||||
jsepTreeToFormula(node.object) + |
||||
'[' + |
||||
jsepTreeToFormula(node.property) + |
||||
']' |
||||
); |
||||
} |
||||
|
||||
if (node.type === 'Identifier') { |
||||
return node.name; |
||||
} |
||||
|
||||
if (node.type === 'Literal') { |
||||
if (typeof node.value === 'string') { |
||||
return '"' + node.value + '"'; |
||||
} |
||||
|
||||
return '' + node.value; |
||||
} |
||||
|
||||
if (node.type === 'CallExpression') { |
||||
return ( |
||||
jsepTreeToFormula(node.callee) + |
||||
'(' + |
||||
node.arguments.map(jsepTreeToFormula).join(', ') + |
||||
')' |
||||
); |
||||
} |
||||
|
||||
if (node.type === 'ArrayExpression') { |
||||
return '[' + node.elements.map(jsepTreeToFormula).join(', ') + ']'; |
||||
} |
||||
|
||||
if (node.type === 'Compound') { |
||||
return node.body.map((e) => jsepTreeToFormula(e)).join(' '); |
||||
} |
||||
|
||||
if (node.type === 'ConditionalExpression') { |
||||
return ( |
||||
jsepTreeToFormula(node.test) + |
||||
' ? ' + |
||||
jsepTreeToFormula(node.consequent) + |
||||
' : ' + |
||||
jsepTreeToFormula(node.alternate) |
||||
); |
||||
} |
||||
|
||||
return ''; |
||||
} |
Loading…
Reference in new issue