|
@@ -208,6 +208,46 @@
|
|
<label>画面URL</label>
|
|
<label>画面URL</label>
|
|
<t-input v-model="a.params" placeholder="窗口画面URL" />
|
|
<t-input v-model="a.params" placeholder="窗口画面URL" />
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="form-item mt-8">
|
|
|
|
+ <label>弹框位置</label>
|
|
|
|
+ <t-input
|
|
|
|
+ class="ml-4"
|
|
|
|
+ label="X"
|
|
|
|
+ placeholder="X"
|
|
|
|
+ v-model.number="a.extend.x"
|
|
|
|
+ style="width: 80px"
|
|
|
|
+ :format="decimalPlaces"
|
|
|
|
+ />
|
|
|
|
+ <t-input
|
|
|
|
+ class="ml-4"
|
|
|
|
+ label="Y"
|
|
|
|
+ placeholder="Y"
|
|
|
|
+ v-model.number="a.extend.y"
|
|
|
|
+ style="width: 80px"
|
|
|
|
+ :format="decimalPlaces"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="form-item mt-8">
|
|
|
|
+ <label>弹框大小</label>
|
|
|
|
+ <t-input
|
|
|
|
+ class="ml-4"
|
|
|
|
+ label="W"
|
|
|
|
+ v-model.number="a.extend.width"
|
|
|
|
+ placeholder="宽"
|
|
|
|
+ min="1"
|
|
|
|
+ style="width: 80px"
|
|
|
|
+ :format="decimalPlaces"
|
|
|
|
+ />
|
|
|
|
+ <t-input
|
|
|
|
+ class="ml-4"
|
|
|
|
+ label="H"
|
|
|
|
+ placeholder="高"
|
|
|
|
+ v-model.number="a.extend.height"
|
|
|
|
+ min="1"
|
|
|
|
+ style="width: 80px"
|
|
|
|
+ :format="decimalPlaces"
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="a.action == 7">
|
|
<template v-else-if="a.action == 7">
|
|
<div class="form-item mt-8">
|
|
<div class="form-item mt-8">
|
|
@@ -484,6 +524,13 @@ onBeforeMount(() => {
|
|
if (!data.actions) {
|
|
if (!data.actions) {
|
|
data.actions = [];
|
|
data.actions = [];
|
|
}
|
|
}
|
|
|
|
+ data.actions.forEach((action: any) => {
|
|
|
|
+ if(action.action === 14){
|
|
|
|
+ if(!action.extend){
|
|
|
|
+ action.extend = {};
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
|
|
penTree.value = getPenTree();
|
|
penTree.value = getPenTree();
|
|
iframeTree.value = getIframeTree();
|
|
iframeTree.value = getIframeTree();
|
|
@@ -520,6 +567,11 @@ const onChangeAction = (action: any) => {
|
|
action.value = '';
|
|
action.value = '';
|
|
action.targetType = 'id';
|
|
action.targetType = 'id';
|
|
break;
|
|
break;
|
|
|
|
+ case 14:
|
|
|
|
+ if(!action.extend){
|
|
|
|
+ action.extend = {};
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
case 15:
|
|
case 15:
|
|
action.network = {type: 'publish',protocol: 'mqtt', options: {}};
|
|
action.network = {type: 'publish',protocol: 'mqtt', options: {}};
|
|
action.params = '';
|
|
action.params = '';
|
|
@@ -675,6 +727,13 @@ const codeChange = (e:any,a:any)=>{
|
|
a.fn = null;
|
|
a.fn = null;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const decimalPlaces = (val: number) => {
|
|
|
|
+ if (!val) {
|
|
|
|
+ return undefined;
|
|
|
|
+ }
|
|
|
|
+ return Math.round(+val * 100) / 100;
|
|
|
|
+};
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<style lang="postcss" scoped>
|
|
<style lang="postcss" scoped>
|
|
.props {
|
|
.props {
|