-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2cadc9
commit 1a0619d
Showing
8 changed files
with
170 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ func NewApp() *App { | |
go func() { | ||
a.文件监视.E开始() | ||
}() | ||
|
||
return a | ||
} | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
GoEasyDesigner/frontend/public/自定义组件/TimeProgressBar/TimeProgressBar.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
export default { | ||
top: "0", | ||
left: "0", | ||
width: "200", | ||
height: "30", | ||
noPlace: true, | ||
|
||
visible: true, | ||
disable: false, | ||
size: "custom", | ||
zIndex: 0, | ||
min: 0, | ||
max: 100, | ||
step: 1, | ||
n: 0, | ||
} |
41 changes: 41 additions & 0 deletions
41
GoEasyDesigner/frontend/public/自定义组件/TimeProgressBar/TimeProgressBar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<template> | ||
<el-slider | ||
:style="item.size=='custom'" | ||
style="width: 80%;margin:0px 20px" | ||
v-model="item.n" | ||
:size="item.size=='custom' ?'':item.size" | ||
:min="item.min" | ||
:max="item.max" | ||
:step="item.step" | ||
:format-tooltip="formatTooltip" | ||
/> | ||
<el-button>abv</el-button> | ||
|
||
</template> | ||
|
||
<script setup> | ||
import {defineEmits, defineProps} from "vue"; | ||
const {item} = defineProps(['item']) | ||
console.log("自定义组件数据", item); | ||
const emits = defineEmits(["CustomEvent"]); | ||
console.log("自定义组件事件", emits); | ||
// secondsToClockTime converts seconds to clock time in the format HH:mm:ss. | ||
function secondsToClockTime(secs) { | ||
let hours = Math.floor(secs / 3600); | ||
secs %= 3600; | ||
let minutes = Math.floor(secs / 60); | ||
secs %= 60; | ||
let str = `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`; | ||
return str; | ||
} | ||
function formatTooltip(index){ | ||
return secondsToClockTime(index) | ||
} | ||
</script> |
77 changes: 77 additions & 0 deletions
77
GoEasyDesigner/frontend/public/自定义组件/TimeProgressBar/TimeProgressBarAttr.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<template> | ||
<div class="属性表格"> | ||
<el-form | ||
label-position="left" | ||
label-width="100px" | ||
style="max-width: 460px" | ||
> | ||
<component is="common-properties" :item="item"/> | ||
|
||
<el-form-item label="n"> | ||
<el-input-number v-model="props.item.n"/> | ||
</el-form-item> | ||
<el-form-item label="min"> | ||
<el-input-number v-model="props.item.min"/> | ||
</el-form-item> | ||
<el-form-item label="max"> | ||
<el-input-number v-model="props.item.max"/> | ||
</el-form-item> | ||
<el-form-item label="step"> | ||
<el-input-number v-model="props.item.step"/> | ||
</el-form-item> | ||
<el-form-item label="size"> | ||
<el-select v-model="props.item.size" style="width: 100%"> | ||
<el-option | ||
v-for="(item, index) in sizeOptions" | ||
:key="item" | ||
:label="item.label" | ||
:value="item.value" | ||
/> | ||
</el-select> | ||
</el-form-item> | ||
|
||
|
||
</el-form> | ||
</div> | ||
|
||
<component is="common-event-component" :item="props.item" :eventName="eventName"/> | ||
|
||
</template> | ||
<script setup> | ||
import {ref, defineProps, defineEmits, onMounted} from "vue"; | ||
const emits = defineEmits(["添加事件被选择"]); // 声明接受的事件 | ||
const props = defineProps(['item']); | ||
let sizeOptions = ref([ | ||
{"label": "自定义", "value": "custom"}, | ||
{"label": "默认", "value": "default"}, | ||
{"label": "大号", "value": "large"}, | ||
{"label": "小号", "value": "small"}, | ||
]); | ||
let eventName = ref([ | ||
{"label": "被单击", "value": "click"}, | ||
{"label": "鼠标左键被按下", "value": "mousedown"}, | ||
{"label": "鼠标左键被放开", "value": "mouseup"}, | ||
{"label": "被双击", "value": "dblclick"}, | ||
{"label": "鼠标右键被按下", "value": "contextmenu"}, | ||
{"label": "鼠标位置被移动", "value": "mousemove"}, | ||
{"label": "获得焦点", "value": "focus"}, | ||
{"label": "失去焦点", "value": "blur"}, | ||
{"label": "按下某键", "value": "keydown"}, | ||
{"label": "放开某键", "value": "keyup"}, | ||
{"label": "滚轮被滚动", "value": "mousewheel"} | ||
]) | ||
onMounted(() => { | ||
if (localStorage.getItem("locale") === "English") { | ||
sizeOptions.value.forEach((item) => { | ||
item.label = item.value; | ||
}); | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 22 additions & 19 deletions
41
GoEasyDesigner/frontend/src/components/boxs/el/ProgressBar/ProgressBar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
<template> | ||
<el-slider | ||
:style="item.size=='custom' ? getItemStyle(item):''" | ||
style="width: 80%;margin:0px 20px" | ||
v-model="item.n" | ||
:size="item.size=='custom' ?'':item.size" | ||
:min="item.min" | ||
:max="item.max" | ||
:step="item.step" | ||
/> | ||
<el-slider | ||
:style="item.size=='custom' ? getItemStyle(item):''" | ||
style="width: 80%;margin:0px 20px" | ||
v-model="item.n" | ||
:size="item.size=='custom' ?'':item.size" | ||
:min="item.min" | ||
:max="item.max" | ||
:step="item.step" | ||
:format-tooltip="formatTooltip" | ||
/> | ||
|
||
</template> | ||
|
||
<script> | ||
<script setup> | ||
import {getItemStyle} from "@/public"; | ||
export default { | ||
methods: {getItemStyle}, | ||
props: { | ||
item: { | ||
type: Object, | ||
default: '', | ||
} | ||
}, | ||
import {defineEmits, defineProps} from "vue"; | ||
const {item} = defineProps(['item']) | ||
console.log("自定义组件数据", item); | ||
const emits = defineEmits(["CustomEvent"]); | ||
console.log("自定义组件事件", emits); | ||
function formatTooltip(index){ | ||
return index | ||
} | ||
</script> | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters