Commit 5ca11651 authored by rockyl's avatar rockyl

相对布局的属性打开,但设计时不用生效

parent 83819722
......@@ -9,4 +9,6 @@
4. 增加circle类型,属性同rect
5. 属性中增加alias为别名,用来呈现中文别名(`{alias: '文本', type: 'string', default: '你好'}`)
6. 属性中枚举的类型,type改为enum,增加以enum为名字的字符串存放枚举项(`{alias: '类型', type: 'enum', enum: ['rotate', 'jump', 'breath'], default: 'rotate'}`)
7. 编辑区需要能设置尺寸,默认`750*1334`,增加缩放功能,缩放可由按钮或者滚轮控制
\ No newline at end of file
7. 编辑区需要能设置尺寸,默认`750*1334`,增加缩放功能,缩放可由按钮或者滚轮控制
8. 增加删除脚本功能
9. 增加删除行为功能
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>zeroing-editor</title>
</head>
<body>
<noscript>
<strong>We're sorry but zeroing-editor doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>zeroing-editor</title>
</head>
<body>
<noscript>
<strong>We're sorry but zeroing-editor doesn't work properly without JavaScript enabled. Please enable it to
continue.</strong>
</noscript>
<script>
window.__data = {
token: 'eyJhbGciOiJIUzI1NiJ9.5Y2e6b6Z5Lqt.2fNMm0oJt0l0ZzsSYwo4ie8Bs7yLU9EmS2mtrmLPktY',
};
</script>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
......@@ -6,7 +6,7 @@ import {API_HOST} from "../config";
import cookie from "cookie";
import {stringify} from "querystringify";
const user_cookie = cookie.parse(document.cookie).user_cookie;
const user_cookie = window.__data.token || cookie.parse(document.cookie).user_cookie;
class ApiError extends Error {
constructor(name, code, message) {
......@@ -33,7 +33,7 @@ export async function fetchApi(uri, {params, method = 'get', contentType = 'json
const options = {
method,
headers: {
authorization: user_cookie,
authorization: 'Bearer ' + user_cookie,
},
};
if (params) {
......
......@@ -2,8 +2,8 @@
* Created by rockyl on 2019-09-19.
*/
export const API_HOST = 'http://beacon.duibadev.com.cn';
//export const API_HOST = 'http://10.10.95.74:7777';
//export const API_HOST = 'http://beacon.duibadev.com.cn';
export const API_HOST = 'http://10.10.95.74:7777';
//export const API_HOST = 'http://localhost:3002';
export const UPLOAD_FILE_URL = API_HOST + '/api/uploadFile';
......
......@@ -41,6 +41,8 @@
"Custom": "Custom",
"Entry": "Entry",
"Packing": "Packing",
"Type": "Type",
"Group": "Group",
"Open in new tab": "Open in new tab",
"Pack project successfully": "Pack project successfully",
"Pack project failed": "Pack project failed",
......
......@@ -17,8 +17,11 @@ $dock-pin-width: 9px;
}
.process-tree {
display: flex;
flex-direction: column;
.scrollbar {
height: 100%;
flex: 1;
.process-tree-node {
flex: 1;
......
......@@ -13,26 +13,26 @@ export default {
type: 'inputNumber',
value: 0,
},
// left: {
// title: '左边距',
// type: 'inputNumber',
// value: undefined,
// },
// right: {
// title: '右边距',
// type: 'inputNumber',
// value: undefined,
// },
// top: {
// title: '上边距',
// type: 'inputNumber',
// value: undefined,
// },
// bottom: {
// title: '下边距',
// type: 'inputNumber',
// value: undefined,
// },
left: {
title: '左边距',
type: 'inputNumber',
value: undefined,
},
right: {
title: '右边距',
type: 'inputNumber',
value: undefined,
},
top: {
title: '上边距',
type: 'inputNumber',
value: undefined,
},
bottom: {
title: '下边距',
type: 'inputNumber',
value: undefined,
},
width: {
title: '宽度',
type: 'inputNumber',
......@@ -43,18 +43,18 @@ export default {
type: 'inputNumber',
value: 1
},
// horizonCenter: {
// title: '水平偏移',
// type: 'inputNumber',
// value: undefined,
// desc: '相对于父元素中心点的水平偏移,0为正中心'
// },
// verticalCenter: {
// title: '垂直偏移',
// type: 'inputNumber',
// value: undefined,
// desc: '相对于父元素中心点的垂直偏移,0为正中心'
// },
horizonCenter: {
title: '水平偏移',
type: 'inputNumber',
value: undefined,
desc: '相对于父元素中心点的水平偏移,0为正中心'
},
verticalCenter: {
title: '垂直偏移',
type: 'inputNumber',
value: undefined,
desc: '相对于父元素中心点的垂直偏移,0为正中心'
},
rotation: {
title: '旋转',
type: 'inputNumber',
......
......@@ -4,7 +4,7 @@
<split-panes class="pane-container" @resized="onPanesReSized(0, $event)">
<split-panes splitpanes-min="40" :splitpanes-size="getSize(0, 0)" horizontal @resized="onPanesReSized(1, $event)">
<split-panes splitpanes-min="20" :splitpanes-size="getSize(1, 0)" @resized="onPanesReSized(2, $event)">
<views splitpanes-min="30" :splitpanes-size="getSize(2, 0)"></views>
<views splitpanes-min="20" :splitpanes-size="getSize(2, 0)"></views>
<playground splitpanes-min="20" :splitpanes-size="getSize(2, 1)"></playground>
</split-panes>
<assets splitpanes-min="20" :splitpanes-size="getSize(1, 1)"></assets>
......@@ -176,7 +176,9 @@
}).then(() => {
}).catch(() => {
window.open(tplUrl, 'blank');
setTimeout(()=>{
window.open(tplUrl, 'blank');
}, 500);
});
}catch (e) {
this.$message({
......
......@@ -54,7 +54,7 @@ export default {
showBehaviorEditor(evn, key) {
this.currentEvent = key;
this.behaviors = evn.behaviors || [];
this.$refs.behaviorEditorDialog.show(this.behaviors, key);
this.$refs.behaviorEditorDialog.show(this.behaviors, this.activeComponent.name + '_' + key);
},
/**
* 当前选中组件发生变化时,更新eventsObj的数据
......
......@@ -14,6 +14,12 @@
<el-form-item prop="desc" label="Desc">
<el-input v-model="meta.desc" :placeholder="$t('Description')" :readonly="!editable"/>
</el-form-item>
<el-form-item prop="type" label="Type">
<el-input v-model="meta.type" :placeholder="$t('Type')" :readonly="!editable"/>
</el-form-item>
<el-form-item prop="group" label="Group">
<el-input v-model="meta.group" :placeholder="$t('Group')" :readonly="!editable"/>
</el-form-item>
<el-form-item label="Props">
<el-link :underline="false" @click="onClickEditProps" :disabled="!editable">
<template v-if="Object.keys(meta.props).length">
......@@ -35,7 +41,13 @@
</div>
<div slot="footer" class="dialog-footer">
<div class="button-bar">
<el-button size="mini" plain @click="printMeta">PrintMeta</el-button>
<el-button-group style="margin-right: 20px;">
<el-button size="mini" plain @click="copyMeta">CopyMeta</el-button>
<el-popover>
<div ref="pasteBoard" @paste="onPaste">Click and Ctrl+V</div>
<el-button size="mini" slot="reference" plain @click="pasteMeta">PasteMeta</el-button>
</el-popover>
</el-button-group>
<el-button size="mini" plain @click="cancel">Cancel</el-button>
<el-button size="mini" plain @click="save">Save</el-button>
</div>
......@@ -47,6 +59,7 @@
<script>
import ElFormItem from "./editors/form-item";
import PropsEditorDialog from "./PropsEditorDialog";
import copy from 'copy-to-clipboard'
export default {
name: "MetaEditorDialog",
......@@ -69,7 +82,7 @@
},
computed: {
editable() {
return this.meta && this.meta.type !== 'builtin';
return this.meta;// && this.meta.type !== 'builtin';
},
props() {
return Object.keys(this.meta.props).join(',')
......@@ -103,8 +116,25 @@
cancel() {
this.visible = false;
},
printMeta() {
console.log(JSON.stringify(this.meta));
copyMeta() {
copy(JSON.stringify(this.meta));
},
pasteMeta() {
//setTimeout(this.focusPasteBoard, 1000, this);
},
onPaste(e) {
let metaStr = e.clipboardData.getData("Text");
if(metaStr){
try {
let meta = JSON.parse(metaStr);
this.meta = meta;
}catch (e) {
}
}
},
focusPasteBoard(){
this.$refs.pasteBoard.focus();
},
}
}
......
module.exports = {
publicPath: '',
pluginOptions: {
i18n: {
locale: 'en',
......@@ -7,4 +8,4 @@ module.exports = {
enableInSFC: true
}
}
}
};
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