Skip to content

Commit

Permalink
feat:新增组件模板
Browse files Browse the repository at this point in the history
  • Loading branch information
jack12312846 committed Sep 10, 2021
1 parent 0b55fa8 commit dfb4681
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 0 deletions.
63 changes: 63 additions & 0 deletions learn-x6/src/components/Contextmenu/index.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<template>
<div class="contextmenu" :style="contextmenuStyle">
<a-card>
<a-card-grid class="grid" @click="up">
上移一层
</a-card-grid>
<a-card-grid class="grid" @click="down">
下移一层
</a-card-grid>
<a-card-grid class="grid" @click="setData">
数据设置
</a-card-grid>
</a-card>
</div>
</template>

<script>
export default {
name: "index",
props: {
contextmenuStyle: {
type: Object,
default: null
}
},
data() {
return {
}
},
methods: {
up(e) {
e.stopPropagation();
e.preventDefault();
},
down(e) {
e.stopPropagation();
e.preventDefault();
},
setData(e) {
e.stopPropagation();
e.preventDefault();
}
}
};
</script>

<style scoped lang="less">
.contextmenu {
position: fixed;
left: -99999px;
width: 150px;
box-shadow: 3px 3px 10px 0 rgba(0, 0, 0, 0.15) !important;
.grid {
width: 100%;
padding: 8px 8px 8px 20px;
cursor: pointer;
}
}
</style>
23 changes: 23 additions & 0 deletions learn-x6/src/components/Editor/MonacoEditor.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<template>
<a-modal v-model="editorVisible" title="Basic Modal">
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</a-modal>
</template>

<script>
export default {
name: "MonacoEditor",
props: {
editorVisible: {
type: Boolean,
default: false
}
}
};
</script>

<style scoped>
</style>

0 comments on commit dfb4681

Please sign in to comment.