mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 14:10:27 +08:00
合并
This commit is contained in:
parent
a54c42d2c7
commit
f8a6adadf5
1453
build/cool/temp/eps.d.ts
vendored
1453
build/cool/temp/eps.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -1 +1 @@
|
|||||||
[["/admin/base/comm",[["post","/personUpdate",""],["get","/uploadMode",""],["get","/permmenu",""],["get","/person",""],["post","/upload",""],["post","/logout",""],["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/base/open",[["get","/refreshToken",""],["get","/captcha",""],["post","/login",""],["get","/html",""],["get","/eps",""],["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/base/sys/department",[["post","/delete",""],["post","/update",""],["post","/order",""],["post","/list",""],["post","/add",""],["","/page",""],["","/info",""]]],["/admin/base/sys/log",[["post","/setKeep",""],["get","/getKeep",""],["post","/clear",""],["post","/page",""],["","/list",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/base/sys/menu",[["post","/delete",""],["post","/update",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/base/sys/param",[["post","/delete",""],["post","/update",""],["get","/html",""],["get","/info",""],["post","/page",""],["post","/add",""],["","/list",""]]],["/admin/base/sys/role",[["post","/delete",""],["post","/update",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/base/sys/user",[["post","/delete",""],["post","/update",""],["post","/move",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/demo/goods",[["post","/delete",""],["post","/update",""],["get","/info",""],["post","/page",""],["post","/list",""],["post","/add",""]]],["/admin/dict/info",[["post","/delete",""],["post","/update",""],["post","/data",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/dict/type",[["post","/delete",""],["post","/update",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/space/info",[["post","/delete",""],["post","/update",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/space/type",[["post","/delete",""],["post","/update",""],["get","/info",""],["post","/list",""],["post","/page",""],["post","/add",""]]],["/admin/task/info",[["post","/delete",""],["post","/update",""],["post","/start",""],["post","/once",""],["post","/stop",""],["get","/info",""],["post","/page",""],["get","/log",""],["post","/add",""],["","/list",""]]],["/chat/message",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/chat/session",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/test",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]]]
|
[["/admin/base/comm",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/personUpdate",""],["","/uploadMode",""],["","/permmenu",""],["","/logout",""]]],["/admin/base/open",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/refreshToken",""],["","/captcha",""],["","/login",""],["","/html",""],["","/eps",""]]],["/admin/base/sys/department",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/order",""]]],["/admin/base/sys/log",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/setKeep",""],["","/getKeep",""],["","/clear",""]]],["/admin/base/sys/menu",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/base/sys/param",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/html",""]]],["/admin/base/sys/role",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/base/sys/user",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/move",""]]],["/admin/demo/goods",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/dict/info",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/data",""]]],["/admin/dict/type",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/space/info",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/space/type",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/admin/task/info",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""],["","/start",""],["","/once",""],["","/stop",""],["","/log",""]]],["/chat/message",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/chat/session",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]],["/test",[["","/list",""],["","/page",""],["","/info",""],["","/update",""],["","/delete",""],["","/add",""]]]]
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "front-next",
|
"name": "front-next",
|
||||||
"version": "5.7.1",
|
"version": "5.7.2",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --host",
|
"dev": "vite --host",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
|
@ -66,7 +66,7 @@ router.append = function (data) {
|
|||||||
d.meta.iframeUrl = url;
|
d.meta.iframeUrl = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
d.component = () => import(`/$/base/views/iframe/index.vue`);
|
d.component = () => import(`/$/base/views/frame.vue`);
|
||||||
} else {
|
} else {
|
||||||
d.component = files["/src/" + url.replace("cool/", "")];
|
d.component = files["/src/" + url.replace("cool/", "")];
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,9 @@
|
|||||||
import { Codemirror } from "vue-codemirror";
|
import { Codemirror } from "vue-codemirror";
|
||||||
import { javascript } from "@codemirror/lang-javascript";
|
import { javascript } from "@codemirror/lang-javascript";
|
||||||
import { oneDark } from "@codemirror/theme-one-dark";
|
import { oneDark } from "@codemirror/theme-one-dark";
|
||||||
import { ref, watch } from "vue";
|
import { onMounted, ref, watch, computed } from "vue";
|
||||||
import { useDark } from "@vueuse/core";
|
import { useDark } from "@vueuse/core";
|
||||||
|
import { isNumber } from "lodash";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
modelValue: {
|
modelValue: {
|
||||||
@ -30,7 +31,7 @@ const props = defineProps({
|
|||||||
default: "请输入"
|
default: "请输入"
|
||||||
},
|
},
|
||||||
height: {
|
height: {
|
||||||
type: String,
|
type: [String, Number],
|
||||||
default: "400px"
|
default: "400px"
|
||||||
},
|
},
|
||||||
fontSize: {
|
fontSize: {
|
||||||
@ -44,8 +45,11 @@ const emit = defineEmits(["update:modelValue", "change"]);
|
|||||||
// 是否暗黑模式
|
// 是否暗黑模式
|
||||||
const isDark = ref(useDark());
|
const isDark = ref(useDark());
|
||||||
|
|
||||||
|
// 高度
|
||||||
|
const height = computed(() => (isNumber(props.height) ? `${props.height}px` : props.height));
|
||||||
|
|
||||||
// 插件
|
// 插件
|
||||||
const extensions: any[] = [javascript(), isDark.value && oneDark];
|
const extensions = ref();
|
||||||
|
|
||||||
// 内容
|
// 内容
|
||||||
const content = ref("");
|
const content = ref("");
|
||||||
@ -56,6 +60,7 @@ function onChange(value: string) {
|
|||||||
emit("change", value);
|
emit("change", value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 监听值
|
||||||
watch(
|
watch(
|
||||||
() => props.modelValue,
|
() => props.modelValue,
|
||||||
(val) => {
|
(val) => {
|
||||||
@ -65,6 +70,10 @@ watch(
|
|||||||
immediate: true
|
immediate: true
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
extensions.value = [javascript(), isDark.value && oneDark];
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
42
src/modules/base/views/frame.vue
Normal file
42
src/modules/base/views/frame.vue
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<div v-loading="loading" class="page-iframe" element-loading-text="拼命加载中">
|
||||||
|
<iframe :src="url" frameborder="0" :ref="setRefs('iframe')"></iframe>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, watch, onMounted } from "vue";
|
||||||
|
import { useCool } from "/@/cool";
|
||||||
|
|
||||||
|
const loading = ref(false);
|
||||||
|
const url = ref();
|
||||||
|
|
||||||
|
const { route, refs, setRefs } = useCool();
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route,
|
||||||
|
(val) => {
|
||||||
|
url.value = val.meta?.iframeUrl;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
loading.value = true;
|
||||||
|
|
||||||
|
refs.value.iframe.onload = () => {
|
||||||
|
loading.value = false;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.page-iframe {
|
||||||
|
iframe {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,43 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-loading="loading" class="page-iframe" element-loading-text="拼命加载中">
|
|
||||||
<iframe :src="url" frameborder="0"></iframe>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: false,
|
|
||||||
url: ""
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
watch: {
|
|
||||||
$route: {
|
|
||||||
handler({ meta }) {
|
|
||||||
this.url = meta.iframeUrl;
|
|
||||||
},
|
|
||||||
immediate: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
mounted() {
|
|
||||||
const iframe = this.$el.querySelector("iframe");
|
|
||||||
this.loading = true;
|
|
||||||
|
|
||||||
iframe.onload = () => {
|
|
||||||
this.loading = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.page-iframe {
|
|
||||||
iframe {
|
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -78,7 +78,7 @@
|
|||||||
<!-- 新增、编辑 -->
|
<!-- 新增、编辑 -->
|
||||||
<cl-upsert ref="Upsert">
|
<cl-upsert ref="Upsert">
|
||||||
<template #slot-parentId="{ scope }">
|
<template #slot-parentId="{ scope }">
|
||||||
<menu-select :type="scope.type" />
|
<menu-select v-model="scope.parentId" :type="scope.type" />
|
||||||
</template>
|
</template>
|
||||||
</cl-upsert>
|
</cl-upsert>
|
||||||
</cl-crud>
|
</cl-crud>
|
||||||
|
Loading…
Reference in New Issue
Block a user