|
|
@@ -104,7 +104,6 @@
|
|
|
:label="item.label"
|
|
|
:name="item.path"
|
|
|
:data-item="JSON.stringify(item)"
|
|
|
- @click="paneClick(item)"
|
|
|
>
|
|
|
<template #label>
|
|
|
<div class="tab_pane" @click="paneClick(item)">
|
|
|
@@ -115,6 +114,18 @@
|
|
|
alt=""
|
|
|
/>
|
|
|
</div>
|
|
|
+ <!-- <router-link
|
|
|
+ :key="item"
|
|
|
+ :data-path="item.path"
|
|
|
+ :to="{
|
|
|
+ path: item.path,
|
|
|
+ query: item.row,
|
|
|
+ }"
|
|
|
+ @click="paneClick(item)"
|
|
|
+ class="tags-view-item"
|
|
|
+ >
|
|
|
+ {{item.label}}
|
|
|
+ </router-link> -->
|
|
|
</template>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -356,7 +367,8 @@ const menuList = reactive({
|
|
|
});
|
|
|
const clickPath = (index, items) => {
|
|
|
items = toRaw(items);
|
|
|
- // console.log("items", items);
|
|
|
+ // toFileData.value = null
|
|
|
+ console.log("clickPathitems", items);
|
|
|
// editableTabs.value = arr;
|
|
|
const arr = toRaw(editableTabs.value);
|
|
|
if (!arr.some((item) => item.label == items.label)) {
|
|
|
@@ -364,6 +376,7 @@ const clickPath = (index, items) => {
|
|
|
//需要jSON去转 否则页面无变化 离谱得很
|
|
|
editableTabs.value = JSON.parse(JSON.stringify(editableTabs.value));
|
|
|
} else {
|
|
|
+ toFileData.value = null;
|
|
|
clickTab(items.path);
|
|
|
}
|
|
|
editableTabsValue.value = items.path;
|
|
|
@@ -372,7 +385,7 @@ const clickPath = (index, items) => {
|
|
|
const clickTab = (item) => {
|
|
|
// console.log("item", toRaw(item));
|
|
|
setTimeout(() => {
|
|
|
- console.log('toFileData.value',toFileData.value);
|
|
|
+ console.log("toFileData.value", toFileData.value);
|
|
|
if (toFileData.value) {
|
|
|
router.push({
|
|
|
path: toFileData.value.path,
|
|
|
@@ -394,7 +407,7 @@ const clickTab = (item) => {
|
|
|
const data = JSON.parse(toRaw(item));
|
|
|
console.log("data", data);
|
|
|
router.push({
|
|
|
- path: "/fileEdit"+data.docId,
|
|
|
+ path: "/fileEdit" + data.docId,
|
|
|
query: {
|
|
|
clickRowId: data.docId,
|
|
|
// copyRow: JSON.stringify(data),
|
|
|
@@ -422,6 +435,10 @@ const addTab = (data) => {
|
|
|
console.log("addTab", data);
|
|
|
const arr = toRaw(editableTabs.value);
|
|
|
if (!arr.some((item) => item.label == data.fileName)) {
|
|
|
+ // editableTabs.value.push({
|
|
|
+ // label: data.fileName,
|
|
|
+ // path: JSON.stringify(data),
|
|
|
+ // });
|
|
|
editableTabs.value.push({
|
|
|
label: data.fileName,
|
|
|
path: JSON.stringify(data),
|