|
@@ -59,7 +59,7 @@
|
|
/> -->
|
|
/> -->
|
|
<!-- <LayersIcon class="hover" @click="save(SaveType.Save, 'v.component', true,1)"/> -->
|
|
<!-- <LayersIcon class="hover" @click="save(SaveType.Save, 'v.component', true,1)"/> -->
|
|
<i
|
|
<i
|
|
- class="l-icon l-zujian hover"
|
|
|
|
|
|
+ class="l-icon l-zujian"
|
|
@click="save(SaveType.Save, 'v.component', true,1)"
|
|
@click="save(SaveType.Save, 'v.component', true,1)"
|
|
>
|
|
>
|
|
</i>
|
|
</i>
|
|
@@ -71,7 +71,8 @@
|
|
@click="oneFormat"
|
|
@click="oneFormat"
|
|
@dblclick="alwaysFormat"
|
|
@dblclick="alwaysFormat"
|
|
:style="{
|
|
:style="{
|
|
- color: one || always ? ' #1677ff' : '',
|
|
|
|
|
|
+ background: one || always ? '#4583ff' : '',
|
|
|
|
+ color: one || always ?( theme==='light'?'#fff':''):''
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
<svg
|
|
<svg
|
|
@@ -142,7 +143,8 @@
|
|
@click="oneDraw"
|
|
@click="oneDraw"
|
|
@dblclick="alwaysDraw"
|
|
@dblclick="alwaysDraw"
|
|
:style="{
|
|
:style="{
|
|
- color: oneD || alwaysD ? ' #1677ff' : '',
|
|
|
|
|
|
+ background: oneD || alwaysD ? '#4583ff' : '',
|
|
|
|
+ color: oneD || alwaysD ?( theme==='light'?'#fff':''):''
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
<svg
|
|
<svg
|
|
@@ -291,7 +293,7 @@
|
|
</t-tooltip>
|
|
</t-tooltip>
|
|
<t-divider style="margin: 15px 4px" layout="vertical" />
|
|
<t-divider style="margin: 15px 4px" layout="vertical" />
|
|
<t-tooltip :content="isLock ? '浏览模式' : '编辑模式'" placement="bottom">
|
|
<t-tooltip :content="isLock ? '浏览模式' : '编辑模式'" placement="bottom">
|
|
- <a>
|
|
|
|
|
|
+ <a class="a-1">
|
|
<svg
|
|
<svg
|
|
v-if="isLock"
|
|
v-if="isLock"
|
|
class="l-icon"
|
|
class="l-icon"
|
|
@@ -306,14 +308,16 @@
|
|
</a>
|
|
</a>
|
|
</t-tooltip>
|
|
</t-tooltip>
|
|
<t-tooltip content="运行(预览)" placement="bottom">
|
|
<t-tooltip content="运行(预览)" placement="bottom">
|
|
- <a @click="preview">
|
|
|
|
|
|
+ <a class="a-1" @click="preview">
|
|
<caret-right-icon />
|
|
<caret-right-icon />
|
|
<!-- <t-icon name="caret-right" /> -->
|
|
<!-- <t-icon name="caret-right" /> -->
|
|
</a>
|
|
</a>
|
|
</t-tooltip>
|
|
</t-tooltip>
|
|
<t-tooltip content="分享" placement="bottom">
|
|
<t-tooltip content="分享" placement="bottom">
|
|
- <a @click="share">
|
|
|
|
- <share-icon :class="{ primary: shared }" />
|
|
|
|
|
|
+ <a @click="share" :class="{ 'share-primary': shared }" :style="{
|
|
|
|
+ color: shared?(theme==='light'?'#fff':''):''
|
|
|
|
+ }">
|
|
|
|
+ <share-icon />
|
|
<!-- <t-icon name="share" :class="{ primary: shared }" /> -->
|
|
<!-- <t-icon name="share" :class="{ primary: shared }" /> -->
|
|
</a>
|
|
</a>
|
|
</t-tooltip>
|
|
</t-tooltip>
|
|
@@ -410,7 +414,7 @@
|
|
@click="onSelectNetWork(item)"
|
|
@click="onSelectNetWork(item)"
|
|
>
|
|
>
|
|
<div style="font-size: 14px">{{ item.name }}</div>
|
|
<div style="font-size: 14px">{{ item.name }}</div>
|
|
- <div class="desc">{{ item.url || item.data.url }}</div>
|
|
|
|
|
|
+ <div class="desc">{{ item.url }}</div>
|
|
<span class="del" @click.stop="onDelNetWork(item, i)">
|
|
<span class="del" @click.stop="onDelNetWork(item, i)">
|
|
<delete-icon />
|
|
<delete-icon />
|
|
<!-- <t-icon name="delete" /> -->
|
|
<!-- <t-icon name="delete" /> -->
|
|
@@ -697,7 +701,7 @@
|
|
@click="refreshSubdomain"
|
|
@click="refreshSubdomain"
|
|
/> -->
|
|
/> -->
|
|
</t-tooltip>
|
|
</t-tooltip>
|
|
- <div class="mt-4 ml-16">v.le5le.com</div>
|
|
|
|
|
|
+ <div class="mt-4 ml-16">{{`v${rootDomain}`}}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="form-item mt-24">
|
|
<div class="form-item mt-24">
|
|
@@ -750,7 +754,7 @@
|
|
<div>
|
|
<div>
|
|
在域名服务商的DNS控制台设置好对应的CNAME,值为乐吾乐域名。
|
|
在域名服务商的DNS控制台设置好对应的CNAME,值为乐吾乐域名。
|
|
<a
|
|
<a
|
|
- href="https://doc.le5le.com/document/126505408"
|
|
|
|
|
|
+ :href="`https://doc${rootDomain}/document/126505408`"
|
|
target="_blank"
|
|
target="_blank"
|
|
>
|
|
>
|
|
更多帮助
|
|
更多帮助
|
|
@@ -789,7 +793,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
-import { onMounted, onUnmounted, watch, ref, reactive, toRaw } from 'vue';
|
|
|
|
|
|
+import { onMounted, onUnmounted, watch, ref, reactive, toRaw, computed } from 'vue';
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
import { useRouter, useRoute } from 'vue-router';
|
|
import {
|
|
import {
|
|
Meta2d,
|
|
Meta2d,
|
|
@@ -822,9 +826,10 @@ import {
|
|
onScaleWindow,
|
|
onScaleWindow,
|
|
useDot,
|
|
useDot,
|
|
autoSaveAS,
|
|
autoSaveAS,
|
|
|
|
+
|
|
} from '@/services/common';
|
|
} from '@/services/common';
|
|
import { useSelection } from '@/services/selections';
|
|
import { useSelection } from '@/services/selections';
|
|
-import { defaultFormat, fromArrows, toArrows } from '@/services/defaults';
|
|
|
|
|
|
+import { defaultFormat, fromArrows, toArrows, rootDomain } from '@/services/defaults';
|
|
import { checkData, localStorageName, Meta2dBackData } from '@/services/utils';
|
|
import { checkData, localStorageName, Meta2dBackData } from '@/services/utils';
|
|
import { debounce } from '@/services/debouce';
|
|
import { debounce } from '@/services/debouce';
|
|
import { s8 } from '@/services/random';
|
|
import { s8 } from '@/services/random';
|
|
@@ -834,7 +839,7 @@ import ContextMenu from './ContextMenu.vue';
|
|
import Network from './Network.vue';
|
|
import Network from './Network.vue';
|
|
import Dataset from './Dataset.vue';
|
|
import Dataset from './Dataset.vue';
|
|
import ChargeCloudPublish from './ChargeCloudPublish.vue';
|
|
import ChargeCloudPublish from './ChargeCloudPublish.vue';
|
|
-import { AddIcon,SaveIcon, RootListIcon,SlashIcon, RefreshIcon, ServerIcon, CaretRightIcon, ShareIcon, QrcodeIcon, CloudIcon, DeleteIcon, SearchIcon, RollbackIcon, LaptopIcon, StopCircleIcon , PlayCircleIcon, PlayCircleStrokeIcon, LayersIcon } from 'tdesign-icons-vue-next';
|
|
|
|
|
|
+import { AddIcon,SaveIcon, RootListIcon,SlashIcon, RefreshIcon, ServerIcon, CaretRightIcon, ShareIcon, QrcodeIcon, CloudIcon, DeleteIcon, SearchIcon, RollbackIcon, LaptopIcon, StopCircleIcon , PlayCircleIcon, PlayCircleStrokeIcon, LayersIcon, FullscreenExitIcon } from 'tdesign-icons-vue-next';
|
|
import {transformData} from '@/services/utils';
|
|
import {transformData} from '@/services/utils';
|
|
|
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -846,7 +851,16 @@ const { select } = useSelection();
|
|
const meta2dOptions: Options = {
|
|
const meta2dOptions: Options = {
|
|
cdn,
|
|
cdn,
|
|
rule: true,
|
|
rule: true,
|
|
|
|
+ ruleColor:'#222E47',
|
|
background: '#1e2430',
|
|
background: '#1e2430',
|
|
|
|
+ ruleOptions:{
|
|
|
|
+ background:'#121924',
|
|
|
|
+ underline:true,
|
|
|
|
+ baseline:'bottom',
|
|
|
|
+ textTop:6,
|
|
|
|
+ textLeft:-24,
|
|
|
|
+ textColor:'#6E7B91'
|
|
|
|
+ },
|
|
x: 32,
|
|
x: 32,
|
|
y: 32,
|
|
y: 32,
|
|
width: 1920,
|
|
width: 1920,
|
|
@@ -906,13 +920,6 @@ const watcher = watch(
|
|
//TODO 打开图纸
|
|
//TODO 打开图纸
|
|
const open = async (flag: boolean = false) => {
|
|
const open = async (flag: boolean = false) => {
|
|
if (route.query.token) {
|
|
if (route.query.token) {
|
|
- //删除t域名登陆问题
|
|
|
|
- deleteCookie('token', {
|
|
|
|
- path: '/',
|
|
|
|
- domain: 't.le5le.com',
|
|
|
|
- });
|
|
|
|
- // localStorage.setItem('token', route.query.token + '');
|
|
|
|
- // setCookie('token', route.query.token + '');
|
|
|
|
setCookie('token', route.query.token + '', {
|
|
setCookie('token', route.query.token + '', {
|
|
path: '/',
|
|
path: '/',
|
|
domain: getDomain(),
|
|
domain: getDomain(),
|
|
@@ -955,7 +962,7 @@ const open = async (flag: boolean = false) => {
|
|
shared.value = ret.shared;
|
|
shared.value = ret.shared;
|
|
|
|
|
|
const qr: any = await QRCode.toDataURL(
|
|
const qr: any = await QRCode.toDataURL(
|
|
- `https://view2d.le5le.com/?id=${route.query.id + '&tag=v'}`
|
|
|
|
|
|
+ `https://view2d${rootDomain}/?id=${route.query.id + '&tag=v'}`
|
|
);
|
|
);
|
|
qrcode.url = qr;
|
|
qrcode.url = qr;
|
|
}
|
|
}
|
|
@@ -1242,8 +1249,8 @@ const preview = async () => {
|
|
// @ts-ignore
|
|
// @ts-ignore
|
|
const data: Meta2dBackData = meta2d.data();
|
|
const data: Meta2dBackData = meta2d.data();
|
|
checkData(data);
|
|
checkData(data);
|
|
- if (dot && user && data.id) {
|
|
|
|
- // 有 id ,是修改后保存
|
|
|
|
|
|
+ if (dot && user && data.id&&data.ownerId=== user.id) {
|
|
|
|
+ // 有 id ,是修改后保存 是自己的图纸
|
|
await save(SaveType.Save);
|
|
await save(SaveType.Save);
|
|
}
|
|
}
|
|
if (!data.id) {
|
|
if (!data.id) {
|
|
@@ -1717,6 +1724,11 @@ const share = async () => {
|
|
id:route.query.id,
|
|
id:route.query.id,
|
|
shared: !shared.value,
|
|
shared: !shared.value,
|
|
});
|
|
});
|
|
|
|
+ if(shared.value){
|
|
|
|
+ MessagePlugin.success('取消分享成功!');
|
|
|
|
+ }else{
|
|
|
|
+ MessagePlugin.success('分享成功!');
|
|
|
|
+ }
|
|
if (ret) {
|
|
if (ret) {
|
|
shared.value = ret.shared;
|
|
shared.value = ret.shared;
|
|
}
|
|
}
|
|
@@ -1795,9 +1807,9 @@ const onChangeSubdomain = async () => {
|
|
|
|
|
|
if (
|
|
if (
|
|
!publishDialog.data.domain ||
|
|
!publishDialog.data.domain ||
|
|
- publishDialog.data.domain.indexOf('.v.le5le.com') >= 0
|
|
|
|
|
|
+ publishDialog.data.domain.indexOf(`.v${rootDomain}`) >= 0
|
|
) {
|
|
) {
|
|
- publishDialog.data.domain = publishDialog.data.subDomain + '.v.le5le.com';
|
|
|
|
|
|
+ publishDialog.data.domain = publishDialog.data.subDomain + `.v${rootDomain}`;
|
|
}
|
|
}
|
|
|
|
|
|
makePublishQrcode();
|
|
makePublishQrcode();
|
|
@@ -1813,7 +1825,7 @@ const onPublish = async () => {
|
|
}
|
|
}
|
|
|
|
|
|
if (!publishDialog.data.domain) {
|
|
if (!publishDialog.data.domain) {
|
|
- publishDialog.data.domain = publishDialog.data.subDomain + '.v.le5le.com';
|
|
|
|
|
|
+ publishDialog.data.domain = publishDialog.data.subDomain + `.v${rootDomain}`;
|
|
}
|
|
}
|
|
if(!route.query.id) {
|
|
if(!route.query.id) {
|
|
MessagePlugin.warning('请选择将要发布的方案');
|
|
MessagePlugin.warning('请选择将要发布的方案');
|
|
@@ -1854,6 +1866,11 @@ const onSuccessChargeCloud = () => {
|
|
publishChargeDialog.show = false;
|
|
publishChargeDialog.show = false;
|
|
onShowPublish();
|
|
onShowPublish();
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+const theme = computed(() => {
|
|
|
|
+ return localStorage.getItem('theme') || 'dark';
|
|
|
|
+});
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<style lang="postcss" scoped>
|
|
<style lang="postcss" scoped>
|
|
.meta2d {
|
|
.meta2d {
|
|
@@ -1872,34 +1889,59 @@ const onSuccessChargeCloud = () => {
|
|
z-index: 2;
|
|
z-index: 2;
|
|
overflow-x: scroll;
|
|
overflow-x: scroll;
|
|
overflow-y: hidden;
|
|
overflow-y: hidden;
|
|
|
|
+ border-bottom: 1px solid var(--color-background-editor);
|
|
a {
|
|
a {
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
- height: 100%;
|
|
|
|
- padding: 0 10px;
|
|
|
|
|
|
+ /* height: 100%; */
|
|
|
|
+ padding: 6px;
|
|
|
|
+ margin: 4px;
|
|
|
|
+ border-radius: 4px;
|
|
color: var(--color);
|
|
color: var(--color);
|
|
text-decoration: none;
|
|
text-decoration: none;
|
|
-
|
|
|
|
- .l-icon {
|
|
|
|
|
|
+ &:hover{
|
|
|
|
+ background-color: var(--color-background-views-hover);
|
|
|
|
+ color: var(--color) !important;
|
|
|
|
+ }
|
|
|
|
+ /* .l-icon {
|
|
width: 16px;
|
|
width: 16px;
|
|
height: 16px;
|
|
height: 16px;
|
|
- }
|
|
|
|
|
|
+ } */
|
|
|
|
|
|
- &:hover {
|
|
|
|
|
|
+ /* &:hover {
|
|
color: var(--color-primary);
|
|
color: var(--color-primary);
|
|
|
|
+ } */
|
|
|
|
+ svg{
|
|
|
|
+ width: 18px ;
|
|
|
|
+ height: 18px;
|
|
|
|
+ &:hover{
|
|
|
|
+ color: var(--color) !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ }
|
|
|
|
+ .a-1{
|
|
|
|
+ svg{
|
|
|
|
+ width: 20px;
|
|
|
|
+ height: 20px ;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.t-icon {
|
|
.t-icon {
|
|
- font-size: 16px;
|
|
|
|
|
|
+ font-size: 18px;
|
|
}
|
|
}
|
|
.l-icon {
|
|
.l-icon {
|
|
- font-size: 18px;
|
|
|
|
|
|
+ font-size: 21px;
|
|
|
|
+ width: 21px ;
|
|
|
|
+ height: 21px ;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .share-primary{
|
|
|
|
+ background-color: var(--color-primary);
|
|
|
|
+ }
|
|
#meta2d {
|
|
#meta2d {
|
|
- border-top: 1px solid var(--color-background-input);
|
|
|
|
|
|
+ /* border-top: 1px solid var(--color-background-input); */
|
|
height: calc(100vh - 81px);
|
|
height: calc(100vh - 81px);
|
|
/* height: calc(100% - 40px); */
|
|
/* height: calc(100% - 40px); */
|
|
/* height: 100%; */
|
|
/* height: 100%; */
|