-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
18 changed files
with
344 additions
and
35 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
Empty file.
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,6 @@ | ||
@forward 'element-plus/theme-chalk/src/dark/var.scss' with ( | ||
$bg-color: ( | ||
'page': #0a0a0a, | ||
'overlay': #1d1e1f | ||
) | ||
); |
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,26 @@ | ||
$-colors: ( | ||
'primary': ( | ||
'base': #14b8a6 | ||
), | ||
// 'success': ( | ||
// 'base': #67c23a | ||
// ), | ||
// 'warning': ( | ||
// 'base': #e6a23c | ||
// ), | ||
// 'danger': ( | ||
// 'base': #f56c6c | ||
// ), | ||
// 'error': ( | ||
// 'base': #f56c6c | ||
// ), | ||
// 'info': ( | ||
// 'base': #909399 | ||
// ) | ||
); | ||
|
||
@forward 'element-plus/theme-chalk/src/common/var.scss' with ( | ||
$colors: $-colors | ||
); | ||
|
||
// @use './dark.scss'; |
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,140 @@ | ||
<template> | ||
<div class=""> | ||
<el-tree class="tree" :props="defaultProps" @node-click="handleNodeClick" lazy :load="handlerLoad" :indent="24" | ||
highlight-current> | ||
<template #default="{ node, data }"> | ||
<div v-if="node.level === 1" class="flex-1 flex items-center justify-between text-base"> | ||
<div class="flex items-center" @click="handlerClick(node, data)"> | ||
<i class="block i-ri-apps-line mr-2"></i> | ||
{{ data.name }} | ||
</div> | ||
<div> | ||
<i class="block i-ri-refresh-line"></i> | ||
</div> | ||
</div> | ||
<div v-if="node.level === 2" class="flex items-center justify-between text-sm"> | ||
<div class="flex items-center" @click="handlerClick(node, data)"> | ||
<i class="block i-ri-file-list-line mr-2"></i> | ||
{{ data.name }} | ||
</div> | ||
</div> | ||
</template> | ||
</el-tree> | ||
<!-- {{ appStore.list }} --> | ||
</div> | ||
</template> | ||
<script setup> | ||
const appStore = useAppStore() | ||
const collectionStore = useCollectionStore() | ||
const defaultProps = { | ||
label: 'name', | ||
isLeaf: 'leaf', | ||
'node-icon': (data, a, b) => { | ||
console.log(1, data, a, b) | ||
}, | ||
class: 'tree-item' | ||
} | ||
const handleNodeClick = (data) => { | ||
console.log(data) | ||
} | ||
const handlerLoad = (node, resolve) => { | ||
if (node.level === 0) { | ||
appStore.fetch() | ||
.then(res => { | ||
console.log('app fetch', res) | ||
resolve(res.data) | ||
}) | ||
} else if (node.level === 1) { | ||
const appid = node.data.appid | ||
collectionStore.fetch(appid) | ||
.then(res => { | ||
res.data.map((item) => { | ||
item.leaf = true | ||
}) | ||
resolve(res.data) | ||
}) | ||
} else { | ||
resolve([]) | ||
} | ||
} | ||
const handlerClick = (node, data) => { | ||
console.log('node', node) | ||
console.log('data', data) | ||
} | ||
// data.value = [ | ||
// { | ||
// label: 'Level one 1', | ||
// children: [ | ||
// { | ||
// label: 'Level two 1-1', | ||
// children: [ | ||
// { | ||
// label: 'Level three 1-1-1', | ||
// }, | ||
// ], | ||
// }, | ||
// ], | ||
// }, | ||
// { | ||
// label: 'Level one 2', | ||
// children: [ | ||
// { | ||
// label: 'Level two 2-1', | ||
// children: [ | ||
// { | ||
// label: 'Level three 2-1-1', | ||
// }, | ||
// ], | ||
// }, | ||
// { | ||
// label: 'Level two 2-2', | ||
// children: [ | ||
// { | ||
// label: 'Level three 2-2-1', | ||
// }, | ||
// ], | ||
// }, | ||
// ], | ||
// }, | ||
// { | ||
// label: 'Level one 3', | ||
// children: [ | ||
// { | ||
// label: 'Level two 3-1', | ||
// children: [ | ||
// { | ||
// label: 'Level three 3-1-1', | ||
// }, | ||
// ], | ||
// }, | ||
// { | ||
// label: 'Level two 3-2', | ||
// children: [ | ||
// { | ||
// label: 'Level three 3-2-1', | ||
// }, | ||
// ], | ||
// }, | ||
// ], | ||
// }, | ||
// ] | ||
</script> | ||
<style scoped lang="scss"> | ||
.tree { | ||
@apply select-none; | ||
::v-deep { | ||
.tree-item { | ||
// @apply text-base; | ||
.el-tree-node__content { | ||
@apply py-1; | ||
} | ||
} | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<p v-for="i in x"> | ||
<span v-for="j in y" class="whitespace-nowrap" @click="handler"> | ||
{{ i }} | {{ j }} | ||
</span> | ||
</p> | ||
</template> | ||
<script setup> | ||
const x = ref(100) | ||
const y = ref(100) | ||
const handler = () => { | ||
x.value = parseInt(Math.random() * 100) | ||
y.value = parseInt(Math.random() * 100) | ||
} | ||
</script> |
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,24 @@ | ||
<!-- | ||
* @Author: NMTuan | ||
* @Email: NMTuan@qq.com | ||
* @Date: 2023-07-12 14:54:31 | ||
* @LastEditTime: 2023-07-12 16:26:16 | ||
* @LastEditors: NMTuan | ||
* @Description: | ||
* @FilePath: \laf_curd\components\scrollBox.vue | ||
--> | ||
<template> | ||
<simplebar class="h-full outline-none"> | ||
<slot></slot> | ||
</simplebar> | ||
</template> | ||
<script setup> | ||
import simplebar from 'simplebar-vue' | ||
</script> | ||
<style lang="scss" scoped> | ||
::v-deep { | ||
.simplebar-content-wrapper { | ||
@apply outline-none; | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<template> | ||
<div class="bg-white"> | ||
<slot></slot> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!-- | ||
* @Author: NMTuan | ||
* @Email: NMTuan@qq.com | ||
* @Date: 2023-07-12 10:50:52 | ||
* @LastEditTime: 2023-07-12 17:32:36 | ||
* @LastEditors: NMTuan | ||
* @Description: | ||
* @FilePath: \laf_curd\pages\manager.vue | ||
--> | ||
<template> | ||
<NuxtLayout name="manager"> | ||
<div class="flex h-screen overflow-hidden"> | ||
<div class="flex flex-col w-280px flex-shrink-0 bg-gray-200"> | ||
<div class="flex-shrink-0">logo</div> | ||
<div class="flex-1 overflow-hidden"> | ||
<ScrollBox> | ||
<ManagerSide></ManagerSide> | ||
</ScrollBox> | ||
</div> | ||
</div> | ||
<div class="flex-1"> | ||
<div class="flex flex-col h-full"> | ||
<div class="flex-shrink-0">header</div> | ||
<div class="flex-1 overflow-hidden"> | ||
<ScrollBox> | ||
</ScrollBox> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</NuxtLayout> | ||
</template> |
Oops, something went wrong.