Commit facac2a8 by 郁子恒

优化界面样式,实现下拉列表失去焦点收起

parent a24ec526
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
</el-button> </el-button>
</div> </div>
</div> </div>
<div style="display: flex;align-items: flex-start;justify-content: space-between;width: 460px;"> <div style="display: flex;align-items: flex-start;justify-content: space-between;width: 460px;height: 36px;">
<!-- 动作标签 --> <!-- 动作标签 -->
<div style="margin-bottom: 5px;margin-right: 1px;white-space: wrap;display: flex;width: 88%;"> <div style="margin-bottom: 5px;margin-right: 1px;white-space: wrap;display: flex;width: 88%;">
<draggable v-model="currentAction.actions" chosenClass="chosen" forceFallback="true" group="people" animation="1000" @start="onStart" @end="onEnd"> <draggable v-model="currentAction.actions" chosenClass="chosen" forceFallback="true" group="people" animation="1000" @start="onStart" @end="onEnd">
......
<template> <template>
<div class="collectionTable"> <div class="collectionTable">
<div style="display: flex;height: 40px;margin-left: 15px;text-align: left;align-items: center;justify-content: flex-start;"> <div style="display: flex;height: 40px;padding-left: 15px;text-align: left;align-items: center;justify-content: flex-start;">
<el-button style="width: 60px;height: 30px;" size="mini" class="button-new-tag" @click="selectElement" v-if="isSelectTable">选择元素</el-button> <el-button style="width: 60px;height: 30px;" size="mini" class="button-new-tag" @click="selectElement" v-if="isSelectTable">选择元素</el-button>
<el-button style="width: 60px;height: 30px;" size="mini" class="button-new-tag" @click="columnBack" v-else>返回</el-button> <el-button style="width: 60px;height: 30px;" size="mini" class="button-new-tag" @click="columnBack" v-else>返回</el-button>
<span style="margin-left: 80px;font-size: 15px;" v-if="isSelectTable">表名:</span> <div style="display: flex;">
<span style="margin-left: 45px;font-size: 15px;" v-if="isSelectTable">表名:</span>
<vxe-input style="margin-left: 10px;" v-if="isSelectTable" v-model="tableName" placeholder="请填写表名" size="mini"></vxe-input> <vxe-input style="margin-left: 10px;" v-if="isSelectTable" v-model="tableName" placeholder="请填写表名" size="mini"></vxe-input>
</div> </div>
<el-button style="padding-right: 15px;" size="small" class="button-new-tag" @click="getTable">获取表格信息</el-button>
</div>
<!-- 全部表格信息 --> <!-- 全部表格信息 -->
<div style="overflow: auto;" :style="{ width: widthResize + 'px' }"> <div style="overflow: auto;height: 290px;" :style="{ width: widthResize + 'px' }">
<vxe-table :data="SelectTableData" ref="xTableColumn" border class="mytable-scrollbar" height="250" v-if="isSelectTable" auto-resize style="margin-bottom: 5px;"> <vxe-table :data="SelectTableData" ref="xTableColumn" border class="mytable-scrollbar" height="250" v-if="isSelectTable" auto-resize style="margin-bottom: 5px;">
<vxe-column field="" title="列名" min-width="150"> <vxe-column field="" title="列名" min-width="150">
<template v-slot="{ row }"> <template v-slot="{ row }">
...@@ -46,7 +49,7 @@ ...@@ -46,7 +49,7 @@
<vxe-table-column show-overflow="ellipsis" v-for="(config, index) in tableColumn" :key="index" v-bind="config"></vxe-table-column> <vxe-table-column show-overflow="ellipsis" v-for="(config, index) in tableColumn" :key="index" v-bind="config"></vxe-table-column>
</vxe-table> </vxe-table>
</div> </div>
<el-button size="small" class="button-new-tag" @click="getTable" style="position: absolute;bottom: 10px;right: 15px;">获取表格信息</el-button>
</div> </div>
</template> </template>
...@@ -87,7 +90,6 @@ export default { ...@@ -87,7 +90,6 @@ export default {
watch: {}, watch: {},
computed: {}, computed: {},
methods: { methods: {
getTable () { getTable () {
let _this = this let _this = this
_this.table = new table() _this.table = new table()
......
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
<el-input v-model="actionConfig.Target.Timeout"></el-input> <el-input v-model="actionConfig.Target.Timeout"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 提交按钮 -->
<div style="width: 100%; text-align: right;">
<el-button size="small" class="button-new-tag" @click="submit" style="margin-right: 5px;">提交信息</el-button>
</div>
</div> </div>
</template> </template>
...@@ -61,17 +57,19 @@ export default { ...@@ -61,17 +57,19 @@ export default {
// 在组件销毁前移除事件监听器 // 在组件销毁前移除事件监听器
document.removeEventListener('contextmenu', this.contextMenuHandler); document.removeEventListener('contextmenu', this.contextMenuHandler);
}, },
watch: {}, watch: {
computed: {}, actionConfig: {
methods: { handler (newVal) {
// 提交表单信息
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
this.activedAction.Target = this.actionConfig.Target; this.activedAction.Target = this.actionConfig.Target;
this.activedAction.Attributes = this.actionConfig.Attributes; this.activedAction.Attributes = this.actionConfig.Attributes;
this.$emit('dataChanged', this.activedAction); this.$emit('dataChanged', this.activedAction);
console.log(this.activedAction)
}, },
deep: true
}
},
computed: {},
methods: {
// 获取页面元素方法 // 获取页面元素方法
contextMenuHandler (event) { contextMenuHandler (event) {
event.preventDefault(); // 阻止默认的右击菜单 event.preventDefault(); // 阻止默认的右击菜单
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
<el-input v-model="actionConfig.Target.Timeout"></el-input> <el-input v-model="actionConfig.Target.Timeout"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 提交按钮 -->
<el-button size="small" class="button-new-tag" @click="submit" style="position: absolute;bottom: 10px;right: 15px;">提交信息</el-button>
</div> </div>
</template> </template>
...@@ -53,17 +51,18 @@ export default { ...@@ -53,17 +51,18 @@ export default {
// 在组件销毁前移除事件监听器 // 在组件销毁前移除事件监听器
document.removeEventListener('contextmenu', this.contextMenuHandler); document.removeEventListener('contextmenu', this.contextMenuHandler);
}, },
watch: {}, watch: {
computed: {}, actionConfig: {
methods: { handler (newVal) {
// 提交表单信息
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
this.activedAction.Target = this.actionConfig.Target; this.activedAction.Target = this.actionConfig.Target;
this.$emit('dataChanged', this.activedAction); this.$emit('dataChanged', this.activedAction);
console.log(this.activedAction)
}, },
deep: true
}
},
computed: {},
methods: {
// 获取页面元素方法 // 获取页面元素方法
contextMenuHandler (event) { contextMenuHandler (event) {
event.preventDefault(); // 阻止默认的右击菜单 event.preventDefault(); // 阻止默认的右击菜单
......
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
<el-input v-model="actionConfig.Target.Timeout"></el-input> <el-input v-model="actionConfig.Target.Timeout"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 提交按钮 -->
<div style="width: 100%; text-align: right;">
<el-button size="small" class="button-new-tag" @click="submit" style="margin-right: 5px;">提交信息</el-button>
</div>
</div> </div>
</template> </template>
...@@ -44,8 +40,6 @@ export default { ...@@ -44,8 +40,6 @@ export default {
}, },
"InputValue": "",//输入的内容 "InputValue": "",//输入的内容
"Script": null, "Script": null,
"Name": this.actionName,
"Alias": this.actionType
}, },
selectDisabled: true // 控制选择按钮的禁用状态 selectDisabled: true // 控制选择按钮的禁用状态
} }
...@@ -60,18 +54,20 @@ export default { ...@@ -60,18 +54,20 @@ export default {
} }
}, },
mounted () { }, mounted () { },
watch: {}, watch: {
computed: {}, actionConfig: {
methods: { handler (newVal) {
// 提交表单信息
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
this.activedAction.Target = this.actionConfig.Target; this.activedAction.Target = this.actionConfig.Target;
this.activedAction.InputValue = this.actionConfig.InputValue; this.activedAction.InputValue = this.actionConfig.InputValue;
this.activedAction.Script = this.actionConfig.Script;
this.$emit('dataChanged', this.activedAction); this.$emit('dataChanged', this.activedAction);
console.log(this.activedAction)
}, },
deep: true
}
},
computed: {},
methods: {
// 获取页面元素方法 // 获取页面元素方法
contextMenuHandler (event) { contextMenuHandler (event) {
event.preventDefault(); // 阻止默认的右击菜单 event.preventDefault(); // 阻止默认的右击菜单
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
<el-input type="textarea" :rows="3" v-model="actionConfig.Script"></el-input> <el-input type="textarea" :rows="3" v-model="actionConfig.Script"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 提交按钮 -->
<el-button size="small" class="button-new-tag" @click="submit" style="position: absolute;bottom: 10px;right: 15px;">提交信息</el-button>
</div> </div>
</template> </template>
...@@ -18,7 +16,6 @@ export default { ...@@ -18,7 +16,6 @@ export default {
props: ['activedAction'], props: ['activedAction'],
data () { data () {
return { return {
elementInfos: {}, // 存储当前选中元素的信息
actionConfig: { actionConfig: {
"Script": "", "Script": "",
}, },
...@@ -31,17 +28,18 @@ export default { ...@@ -31,17 +28,18 @@ export default {
} }
}, },
mounted () { }, mounted () { },
watch: {}, watch: {
computed: {}, actionConfig: {
methods: { handler (newVal) {
// 提交表单信息
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
this.activedAction.Script = this.actionConfig.Script; this.activedAction.Script = this.actionConfig.Script;
this.$emit('dataChanged', this.activedAction); this.$emit('dataChanged', this.activedAction);
console.log(this.activedAction)
}, },
deep: true
}
}, },
computed: {},
methods: {},
}; };
</script> </script>
......
...@@ -14,8 +14,6 @@ ...@@ -14,8 +14,6 @@
<!-- 获取当前页面地址的按钮 --> <!-- 获取当前页面地址的按钮 -->
<el-button size="small" class="button-new-tag" @click="getCurrentPageUrl" style="margin-left: 15px;">获取当前页面地址</el-button> <el-button size="small" class="button-new-tag" @click="getCurrentPageUrl" style="margin-left: 15px;">获取当前页面地址</el-button>
</div> </div>
<!-- 提交信息的按钮 -->
<el-button size="small" class="button-new-tag" @click="submit" style="position: absolute;bottom: 10px;right: 15px;">提交信息</el-button>
</div> </div>
</template> </template>
<script> <script>
...@@ -38,16 +36,18 @@ export default { ...@@ -38,16 +36,18 @@ export default {
} }
}, },
mounted () { }, mounted () { },
watch: {}, watch: {
computed: {}, actionConfig: {
methods: { handler (newVal) {
// 提交表单信息的方法
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
this.activedAction.Url = this.actionConfig.Url; this.activedAction.Url = this.actionConfig.Url;
this.$emit('dataChanged', this.activedAction); this.$emit('dataChanged', this.activedAction);
console.log(this.activedAction)
}, },
deep: true
}
},
computed: {},
methods: {
// 获取当前页面地址的方法 // 获取当前页面地址的方法
getCurrentPageUrl (event) { getCurrentPageUrl (event) {
// 使用window.location.href获取当前页面地址 // 使用window.location.href获取当前页面地址
......
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
<el-input v-model="actionConfig.PauseMilliseconds"></el-input> <el-input v-model="actionConfig.PauseMilliseconds"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- 提交按钮 -->
<div style="width: 100%; text-align: right;">
<el-button size="small" class="button-new-tag" @click="submit" style="margin-right:15px;">提交信息</el-button>
</div>
</div> </div>
</template> </template>
...@@ -33,17 +29,18 @@ export default { ...@@ -33,17 +29,18 @@ export default {
} }
}, },
mounted () { }, mounted () { },
watch: {}, watch: {
computed: {}, actionConfig: {
methods: { handler (newVal) {
// 提交表单信息
submit () {
console.log(this.actionConfig);
// 防止父级改变,子级未改变重新赋值
this.activedAction.PauseMilliseconds = this.actionConfig.PauseMilliseconds; this.activedAction.PauseMilliseconds = this.actionConfig.PauseMilliseconds;
this.$emit('dataChanged', this.activedAction); this.$emit('dataChanged', this.activedAction);
console.log(this.activedAction)
}, },
deep: true
}
}, },
computed: {},
methods: {},
}; };
</script> </script>
......
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