forked from opentiny/tiny-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: page tree supports dragging (opentiny#948)
* feat: add layer line to node tree * feat: draggable tree * feat: save immediately after dragging * add hover style(demo) * feat: add lock, home icons * fx routing path issues * move updateTreeData to the finally block * fix generateTemplate execution error * fix default value incorrect in create new folder form
- Loading branch information
Showing
9 changed files
with
289 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<template> | ||
<span v-for="i in level - 1" :key="i" class="gap"> | ||
<svg v-if="lineData[i]" width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> | ||
<line x1="8" y1="0" x2="8" y2="12" stroke="#EBEBEB" stroke-width="1" /> | ||
<line v-if="(lineData[i] & 1) === 1" x1="8" y1="12" x2="20" y2="12" stroke="#EBEBEB" stroke-width="1" /> | ||
<line v-if="((lineData[i] >> 1) & 1) === 1" x1="8" y1="12" x2="8" y2="24" stroke="#EBEBEB" stroke-width="1" /> | ||
</svg> | ||
</span> | ||
</template> | ||
|
||
<script setup> | ||
import { defineProps } from 'vue' | ||
defineProps({ | ||
level: { | ||
type: Number, | ||
required: true | ||
}, | ||
lineData: { | ||
type: Object, | ||
required: true | ||
} | ||
}) | ||
</script> | ||
|
||
<style scoped> | ||
.gap { | ||
width: 24px; | ||
height: 24px; | ||
} | ||
</style> |
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.