Skip to content

Commit

Permalink
国际化
Browse files Browse the repository at this point in the history
  • Loading branch information
duolabmeng6 committed Nov 3, 2023
1 parent bf3f38a commit 210b1c4
Show file tree
Hide file tree
Showing 30 changed files with 71 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
left: "440",
width: "240",
height: "80",
禁止放置: true,
no_place: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "440",
width: "350",
height: "350",
禁止放置: true,
no_place: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
2 changes: 1 addition & 1 deletion GoEasyDesigner/frontend/src/action/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ appAction.新建 = function () {
"width": "500",
"height": "400",
"background": "rgba(0, 0, 0, 0.05)",
"禁止放置": false,
"noPlace": false,
"禁止拖动": true,
"禁止": false,
"可视": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function 拖拽进入(event, v) {
var img = new Image();
img.src = tempCanvas.toDataURL();
event.dataTransfer.setDragImage(img, 0, 0);
if (v.禁止放置) {
if (v.noPlace) {
event.stopPropagation();
return
}
Expand All @@ -183,7 +183,7 @@ function 拖拽离开(event, v) {
async function 拖拽放下(event, v) {
console.log("拖拽放下", v)
if (v.禁止放置) {
if (v.noPlace) {
return
}
Expand Down
14 changes: 7 additions & 7 deletions GoEasyDesigner/frontend/src/components/boxs/el/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ export default {
left: "0",
width: "76",
height: "40",
禁止放置: true,
按钮类型: "default",
可视: true,
禁止: false,
尺寸: "custom",
层级: 0,
标题: "按钮",
noPlace: true,
buttonType: "default",
visible: true,
disable: false,
size: "custom",
zIndex: 0,
text: "Button",
}
15 changes: 8 additions & 7 deletions GoEasyDesigner/frontend/src/components/boxs/el/Button/Button.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<template>
<el-button
:style="item.尺寸=='custom' ? getItemStyle(item):''"
v-show="item.可视"
v-bind:disabled="item.禁用"
:type="item.按钮类型"
:size="item.尺寸=='custom' ?'':item.尺寸"

>{{ item.标题 }}</el-button>
:style="item.size=='custom' ? getItemStyle(item):''"
v-show="item.visible"
v-bind:disabled="item.disable"
:type="item.buttonType"
:size="item.size=='custom' ?'':item.size"
>{{ item.text }}</el-button>
</template>



<script>
import {getItemStyle} from "@/public";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@
label-width="100px"
style="max-width: 460px"
>
<component is="公用属性" :item="item"/>
<component is="common-properties" :item="item"/>

<el-form-item label="标题">
<el-input v-model="props.item.标题"/>
<el-form-item label="Text">
<el-input v-model="props.item.text"/>
</el-form-item>
<el-form-item label="按钮类型">
<el-select v-model="props.item.按钮类型" style="width: 100%">
<el-form-item label="Button Type">
<el-select v-model="props.item.buttonType" style="width: 100%">
<el-option
v-for="(item, index) in 按钮类型选项"
:key="item"
v-for="(item, index) in buttonTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="尺寸">
<el-select v-model="props.item.尺寸" style="width: 100%">
<el-form-item label="Size">
<el-select v-model="props.item.size" style="width: 100%">
<el-option
v-for="(item, index) in 尺寸选项"
:key="item"
v-for="(item, index) in sizeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
Expand All @@ -33,16 +33,15 @@
</el-form>
</div>


<component is="公用事件组件" :item="props.item" :事件名称="事件名称"/>
<component is="common-event-component" :item="props.item" :event-name="eventName"/>

</template>
<script setup>
import {ref, defineProps, defineEmits, onMounted} from "vue";
const emits = defineEmits(["添加事件被选择"]); // 声明接受的事件
const props = defineProps(['item']);
let 按钮类型选项 = ref([
let buttonTypeOptions = ref([
{"label": "默认", "value": "default"},
{"label": "主要", "value": "primary"},
{"label": "成功", "value": "success"},
Expand All @@ -51,15 +50,15 @@ let 按钮类型选项 = ref([
{"label": "危险", "value": "danger"},
]);
let 尺寸选项 = ref([
let sizeOptions = ref([
{"label": "自定义", "value": "custom"},
{"label": "默认", "value": "default"},
{"label": "大号", "value": "large"},
{"label": "小号", "value": "small"},
]);
let 事件名称 = ref([
let eventName = ref([
{"label": "被单击", "value": "click"},
{"label": "鼠标左键被按下", "value": "mousedown"},
{"label": "鼠标左键被放开", "value": "mouseup"},
Expand All @@ -81,10 +80,10 @@ onMounted(() => {
if (localStorage.getItem("locale") === "English") {
console.log("英语");
按钮类型选项.value.forEach((item) => {
buttonTypeOptions.value.forEach((item) => {
item.label = item.value;
});
尺寸选项.value.forEach((item) => {
sizeOptions.value.forEach((item) => {
item.label = item.value;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "0",
width: "250",
height: "80",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
width: "300",
height: "200",
现行选中项: "0",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand All @@ -26,7 +26,7 @@ export default {
height: "100%",
// background: "#fff",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand All @@ -45,7 +45,7 @@ export default {
height: "100%",
// background: "red",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand All @@ -66,7 +66,7 @@ export default {
height: "100%",
// background: "green",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand All @@ -86,7 +86,7 @@ export default {
height: "100%",
// background: "green",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default {
禁止放置: false,
noPlace: false,
可视: true,
禁止: false,
top: "0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
height: "32",
right: "0",
bottom: "inherit",
禁止放置: true,
noPlace: true,
visible: true,
disable: false,
zIndex: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
label-width="100px"
style="max-width: 460px"
>
<component is="td公用属性" :item="item"/>
<component is="common-properties" :item="item"/>

</el-form>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
left: "440",
width: "300",
height: "300",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
width: "300",
height: "200",
现行选中项: "0",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand All @@ -24,7 +24,7 @@ export default {
height: "100%",
// background: "#fff",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand All @@ -42,7 +42,7 @@ export default {
height: "100%",
// background: "#fff",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand All @@ -60,7 +60,7 @@ export default {
height: "100%",
// background: "#fff",
position: "relative",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "0",
width: "120",
height: "40",
禁止放置: true,
noPlace: true,

可视: true,
禁止: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "440",
width: "600",
height: "100",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "0",
width: "200",
height: "30",
禁止放置: true,
noPlace: true,

可视: true,
禁止: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "0",
width: "250",
height: "80",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "0",
width: "50",
height: "40",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
left: "440",
width: "300",
height: "200",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand Down
6 changes: 3 additions & 3 deletions GoEasyDesigner/frontend/src/components/boxs/el/Tabs/Tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default {
width: "300",
height: "300",
现行选中项: "0",
禁止放置: true,
noPlace: true,
可视: true,
禁止: false,
层级: 0,
Expand All @@ -22,7 +22,7 @@ export default {
left: "0",
width: "100%",
height: "100%",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand All @@ -38,7 +38,7 @@ export default {
left: "0",
width: "100%",
height: "100%",
禁止放置: false,
noPlace: false,
禁止拖动: true,
可视: true,
禁止: false,
Expand Down
Loading

0 comments on commit 210b1c4

Please sign in to comment.