-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99dc9ec
commit e00c1e8
Showing
55 changed files
with
1,019 additions
and
281 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
const host = 'http://192.168.31.181:8000' | ||
const host = 'http://192.168.31.181:8001' | ||
export default { | ||
obj: `${host}/Everright-api/lowCode/obj` | ||
obj: `${host}/Everright-api/lowCode/obj`, | ||
uploadFile: `${host}/Everright-api/lowCode/uploads` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script setup> | ||
import { ref, onMounted, reactive } from 'vue' | ||
import { useRoute } from 'vue-router' | ||
import hooks from '@ER/hooks' | ||
import { EverrightPreview } from '@ER/formEditor' | ||
import uri from '@ER-examples/uri.js' | ||
const route = useRoute() | ||
const loading = ref(true) | ||
const lang = ref('en') | ||
const EReditorRef = ref(null) | ||
const state = reactive({ | ||
name: '' | ||
}) | ||
window.lang = lang | ||
const getObjData = async () => { | ||
try { | ||
const { | ||
data: { | ||
content, | ||
name | ||
} | ||
} = await hooks.useFetch(`${uri.obj}/${route.params.objid}`, { | ||
method: 'get' | ||
}) | ||
state.name = name | ||
EReditorRef.value.setData(content) | ||
} finally { | ||
loading.value = false | ||
} | ||
} | ||
const handleListener = async ({ type, data }) => { | ||
console.log(type) | ||
if (type === 'getJson') { | ||
// console.log(data) | ||
// return false | ||
loading.value = true | ||
try { | ||
const postData = { | ||
name: state.name, | ||
content: data | ||
} | ||
await hooks.useFetch(`${uri.obj}/${route.params.objid}`, { | ||
method: 'put', | ||
data: postData | ||
}) | ||
} finally { | ||
loading.value = false | ||
} | ||
} | ||
} | ||
onMounted(() => { | ||
getObjData() | ||
}) | ||
</script> | ||
<template> | ||
<EverrightPreview | ||
:lang="lang" | ||
@listener="handleListener" | ||
v-loading="loading" | ||
ref="EReditorRef"/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.