Commit 5b6c9dde authored by rockyl's avatar rockyl

提交一波

parent 9be049cf
......@@ -31,6 +31,7 @@
<style scoped>
.picker {
flex: 1;
float: right;
margin-top: 4px;
}
......
......@@ -59,6 +59,7 @@
}
.picker {
flex: 1;
float: right;
}
</style>
......@@ -8,9 +8,12 @@
v-model="popoverVisible"
:disabled="!editable"
>
<el-radio-group v-model="editValue.type" size="mini" @change="onChange" :disabled="!editable">
<el-radio-button v-for="(item, key) in dataTypes" :label="key" :key="key">{{item}}</el-radio-button>
</el-radio-group>
<div>
<el-radio-group v-model="editValue.type" size="mini" @change="onChange" :disabled="!editable">
<el-radio-button v-for="(item, key) in dataTypes" :label="key" :key="key">{{item}}</el-radio-button>
</el-radio-group>
<el-button circle plain type="danger" icon="el-icon-close" class="micro" style="margin-left: 5px;" @click="popoverVisible=false"/>
</div>
<el-input clearable slot="reference" :value="editValue.value" @input="onInput" @change="onChange"
:readonly="!editable"
:placeholder="defaultValue"/>
......
<template>
<div style="display: flex;flex: 1;">
<el-popover
placement="top"
placement="bottom"
popper-class="node-select-popover"
class="node-select-container"
trigger="manual"
width="400"
height="500"
v-model="popoverVisible"
@after-enter="onPopoverShow"
>
<div>
<el-input v-model="filterText" prefix-icon="el-icon-search" size="mini" clearable/>
......@@ -16,8 +18,10 @@
v-if="popoverVisible"
:data="behavior_views"
:props="defaultProps"
:expand-on-click-node="false"
:expand-on-click-node="true"
:default-expanded-keys="expandedKeys"
draggable
node-key="uuid"
highlight-current
:default-expand-all="true"
@node-click="handleNodeClick"
......@@ -32,8 +36,8 @@
<div class="bottom-bar">
<div></div>
<div>
<el-button @click="onCancel" plain>Cancel</el-button>
<el-button @click="onConfirm" type="primary">Confirm</el-button>
<el-button @click="onCancel" plain>{{$t('Cancel')}}</el-button>
<el-button @click="onConfirm" type="primary">{{$t('Confirm')}}</el-button>
</div>
</div>
</div>
......@@ -41,7 +45,7 @@
:readonly="!editable">
<template slot="prepend">
<el-tooltip effect="dark" :content="nodePath" placement="top" :open-delay="500" :disabled="!nodePath">
<el-button>{{nodeScheme}}</el-button>
<span>{{nodeScheme}}</span>
</el-tooltip>
</template>
</el-input>
......@@ -74,6 +78,7 @@
label: 'name'
},
nodePath: '',
expandedKeys: [],
}
},
watch: {
......@@ -121,7 +126,12 @@
}
},
filterNodeMethod(value, data) {
return data.name.toLowerCase().includes(value.toLowerCase());
if(value.startsWith(':uuid|')){
let targetUUID = value.replace(':uuid|', '');
return data.uuid === targetUUID;
}else{
return data.name.toLowerCase().includes(value.toLowerCase());
}
},
onInput(v, oldValue) {
if (v !== this.value) {
......@@ -133,6 +143,7 @@
},
onClickEdit() {
this.popoverVisible = !this.popoverVisible;
},
onClickClean() {
this.nodePath = '';
......@@ -150,6 +161,16 @@
handleNodeClick(data, node) {
this.selectedNodeUUID = data.uuid;
},
onPopoverShow(){
let uuid = this.editValue;
if(uuid){
this.filterText = ':uuid|' + uuid;
this.updateFilter();
this.$refs.tree.setCurrentKey(uuid);
this.expandedKeys = [uuid];
this.selectedNodeUUID = uuid;
}
},
},
}
</script>
......
<template>
<div>
<div class="vector2-input">
<span class="field-label">x</span>
<el-input-number :disabled="!editable" :value="editValue.x" @input="v=>onInput(v, 'x')" controls-position="right"
<el-input-number style="flex: 1;" :disabled="!editable" v-model="editValue.x" @change="v=>onInput(v, 'x')" controls-position="right"
:placeholder="defaultValue.x"></el-input-number>
<span class="field-label">y</span>
<el-input-number :disabled="!editable" :value="editValue.y" @input="v=>onInput(v, 'y')" controls-position="right"
<el-input-number style="flex: 1;" :disabled="!editable" v-model="editValue.y" @change="v=>onInput(v, 'y')" controls-position="right"
:placeholder="defaultValue.y"></el-input-number>
</div>
</template>
......@@ -20,19 +20,19 @@
props: ['value', 'container', 'property', 'propertyName', 'editable'],
data() {
return {
editValue: {},
//editValue: {},
}
},
watch: {
value(v) {
let editValue = v === undefined ? this.property.default : v;
this.editValue = parseVector2(editValue);
//let editValue = v === undefined ? this.property.default : v;
//this.editValue = parseVector2(editValue);
}
},
computed: {
/*editValue() {
return this.value === undefined ? this.property.default : this.value;
},*/
editValue() {
return this.value === undefined ? this.defaultValue : parseVector2(this.value);
},
defaultValue() {
let value = this.property.default;
let placeholder = {};
......
......@@ -245,6 +245,7 @@
"pack": {
"label": "打包",
"sub": {
"pack-debug-mode": "调试打包",
"pack-manager": "打包管理"
}
},
......
......@@ -834,11 +834,11 @@ export const projectStore = {
return failedList;
},
async packProject({state, dispatch}, params) {
let debug = false;
let debug = params.debug;
let packedAssets;
if (!debug) {
//if (!debug) {
packedAssets = await packAssets(state.data.assets);
}
//}
const packResult = await projectApi.pack(state.id, debug, packedAssets);
console.log(packResult);
......
......@@ -93,10 +93,11 @@ $dock-pin-width: 9px;
&.hover, &:hover {
stroke: $--color-primary;
stroke-dasharray: 5, 1;
}
&.contact {
stroke: $--color-primary;
}
}
&.contact {
stroke: $--color-primary;
}
}
.node {
......@@ -284,7 +285,6 @@ $dock-pin-width: 9px;
flex-direction: column;
.wrapper {
padding: 5px;
flex: 1;
......@@ -305,19 +305,20 @@ $dock-pin-width: 9px;
}
}
.inside-code{
.inside-code {
flex: 1;
height: 0;
border-top: 1px solid $--border-color-base;
.scrollbar {
height: 100%;
.code-body{
.code-body {
tab-size: 1.5em;
width: 100%;
margin: 0;
font-size: 12px;
white-space:pre-wrap;
white-space: pre-wrap;
}
}
}
......@@ -397,7 +398,7 @@ $dock-pin-width: 9px;
}
}
.property-name-popover{
.property-name-popover {
p {
margin: 0;
//text-overflow: ellipsis;
......@@ -417,7 +418,7 @@ $dock-pin-width: 9px;
}
}
.props-editor{
.props-editor {
.linked {
display: block;
height: 26px;
......@@ -458,30 +459,37 @@ $dock-pin-width: 9px;
color: $--color-text-secondary;
}
}
.field-label{
.field-label {
padding: 0 5px;
color: $--color-text-secondary;
}
}
.source-input{
.source-input {
flex: 1;
}
.vector2-input {
flex: 1;
display: flex;
width: 0;
}
.node-select-container {
flex: 1;
}
}
.source-input-popover{
.wrapper{
.source-input-popover {
.wrapper {
display: flex;
flex-direction: column;
align-items: center;
}
}
.enum-input-comment{
.enum-input-comment {
float: right;
color: $--color-text-secondary;
}
......@@ -17,6 +17,7 @@
margin-bottom: 1px;
padding: 5px 10px;
font-size: 13px;
justify-content: space-between;
.menu {
flex: 1;
......
......@@ -118,7 +118,7 @@
.el-form-item__content {
display: flex;
justify-content: flex-end;
//justify-content: flex-end;
.el-input-number--mini {
flex: 1;
......
......@@ -234,6 +234,9 @@
case 'pack':
await this.pack();
break;
case 'pack-debug-mode':
await this.pack(true);
break;
case 'pack-manager':
this.$refs.packManagerDialog.show();
break;
......@@ -274,7 +277,7 @@
break;
}
},
async pack() {
async pack(debug) {
let cancel;
cancel = await this.saveProject(false);
if (cancel) {
......@@ -286,6 +289,7 @@
});
try {
await this.packProject({
debug: debug || false,
remark: this.lastSaveRemark,
});
this.$message({
......
......@@ -97,7 +97,8 @@
this.$refs.assetsShow.show(asset);
},
onItemClick(asset) {
this.selectAssetItem(asset);
this.updateAssetSize(asset.url);
this.currentItem = asset;
},
deleteAll() {
this.$confirm(this.$t('Are you sure to delete all assets'), this.$t('Alert'), {
......
<template>
<div class="tool-bar">
<sample-menu :data="menu" @click-menu="clickMenu"/>
<div style="flex: 1"></div>
<div class="right-part">
<span>
[{{project.name}}]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment