mirror of
https://github.com/sahadev/vue-component-creater-ui.git
synced 2025-06-30 13:32:44 +08:00
调整UI
This commit is contained in:
parent
afb6a0c84f
commit
23ba2c6596
@ -1,30 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="top-tools-bar">
|
<div class="top-tools-bar">
|
||||||
|
|
||||||
<div class="edit">
|
<el-row :gutter="20">
|
||||||
<el-tooltip class="item" effect="dark" content="ctrl + z" placement="bottom-start">
|
<el-col :span="3">
|
||||||
<el-link type="primary" @click="$emit('undo')">撤销(Undo)</el-link>
|
<div class="edit">
|
||||||
</el-tooltip>
|
<el-tooltip class="item" effect="dark" content="ctrl + z" placement="bottom-start">
|
||||||
<el-link type="primary" @click="$emit('redo')">重做(Redo)</el-link>
|
<el-link type="primary" @click="$emit('undo')" style="margin-right: 3px;">Undo</el-link>
|
||||||
</div>
|
</el-tooltip>
|
||||||
|
<el-link type="primary" @click="$emit('redo')">Redo</el-link>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<el-link type="primary" @click="onPreviewModeChange">{{previewMode ? 'Desktop' : 'Mobile'}}
|
||||||
|
Mode</el-link>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div style="display:inline-block;">
|
||||||
|
<el-link type="primary" @click="onEditModeChange">{{editMode ? 'View' : 'Edit'}}
|
||||||
|
Mode</el-link>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-link type="primary" @click="$emit('structureVisible')">Inspect Components
|
||||||
|
Structure</el-link>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<div style="display:inline-block;">
|
|
||||||
<span>View Mode: </span>
|
|
||||||
<el-switch v-model="previewMode" active-color="#13ce66" inactive-color="#13ce66"
|
|
||||||
active-icon-class="el-icon-mobile" inactive-icon-class="el-icon-monitor" name="预览模式"
|
|
||||||
@change="$emit('onPreviewModeChange', $event)">
|
|
||||||
</el-switch>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div style="display:inline-block;">
|
|
||||||
<span>Edit Mode: </span>
|
|
||||||
<el-switch v-model="editMode" active-color="#13ce66" name="编辑模式" @change="$emit('onEditModeChange', $event)">
|
|
||||||
</el-switch>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<el-link :underline="false" style="margin-left: 10px;" @click="$emit('structureVisible')"><img
|
|
||||||
style="width: 20px;vertical-align: bottom;margin-right:5px;" :src="iconTreeStructure">Inspect Components
|
|
||||||
Structure</el-link>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -36,7 +37,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
previewMode: false,
|
previewMode: false,
|
||||||
editMode: true,
|
editMode: true,
|
||||||
iconTreeStructure: ("https://static.imonkey.xueersi.com/download/vcc-resource/icon/tree-structure.png"),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {},
|
watch: {},
|
||||||
@ -57,6 +57,16 @@ export default {
|
|||||||
logout() {
|
logout() {
|
||||||
window.ssoLogin.logout()
|
window.ssoLogin.logout()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onPreviewModeChange() {
|
||||||
|
this.previewMode = !this.previewMode;
|
||||||
|
this.$emit('onPreviewModeChange', this.previewMode);
|
||||||
|
},
|
||||||
|
|
||||||
|
onEditModeChange() {
|
||||||
|
this.editMode = !this.editMode;
|
||||||
|
this.$emit('onEditModeChange', this.editMode);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
fillter: {},
|
fillter: {},
|
||||||
};
|
};
|
||||||
|
@ -364,6 +364,13 @@ export default {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
|
.icon-s {
|
||||||
|
font-size: 14px;
|
||||||
|
color: #000;
|
||||||
|
margin: 0 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.in-element {
|
.in-element {
|
||||||
outline: 2px solid #4dba87 !important;
|
outline: 2px solid #4dba87 !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<vue-nestable v-model="treeData" @change="onLevelChange">
|
<vue-nestable v-model="treeData" @change="onLevelChange">
|
||||||
<template slot-scope="{ item }">
|
<template slot-scope="{ item }">
|
||||||
<vue-nestable-handle :item="item">
|
<vue-nestable-handle :item="item">
|
||||||
拖
|
<i class="el-icon-rank icon-s"></i>
|
||||||
</vue-nestable-handle>
|
</vue-nestable-handle>
|
||||||
|
|
||||||
<span @click="onNodeClick(item)">{{ item.text }}</span>
|
<span @click="onNodeClick(item)">{{ item.text }}</span>
|
||||||
|
@ -274,12 +274,13 @@ nav {
|
|||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #4dba87;
|
color: #4dba87;
|
||||||
transform: rotate(-90deg);
|
transform: rotate(-90deg) translateY(29px);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 11px;
|
|
||||||
left: 0;
|
left: 0;
|
||||||
transform-origin: -2% 10%;
|
height: 80px;
|
||||||
|
line-height: 80px;
|
||||||
|
transform-origin: 0% 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle {
|
.subtitle {
|
||||||
@ -290,7 +291,6 @@ nav {
|
|||||||
|
|
||||||
.bottom-toolbar {
|
.bottom-toolbar {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
position: relative;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
padding: 20px 0;
|
padding: 20px 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user