修改表单构建
parent
1edf058137
commit
1935956fe1
@ -0,0 +1,53 @@
|
|||||||
|
<template>
|
||||||
|
<div class="hw-input" @click.stop="inputClick"
|
||||||
|
:style="`background-color: ${(selectUuid === options.uuid) ? '#0001':'#0000'};border-color: ${(selectUuid === options.uuid) ? '#00afff':'#0000'}`">
|
||||||
|
<tool v-if="selectUuid === options.uuid" :options="options" />
|
||||||
|
<div>
|
||||||
|
<el-table :data="tableData" style="width: 100%">
|
||||||
|
<el-table-column :prop="i" :label="options.thTdMap[i]" v-for="i in Object.keys(options.thTdMap)">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.$index }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import tool from './tool.vue';
|
||||||
|
import { inject } from 'vue';
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'hw-table'
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
options: Object
|
||||||
|
});
|
||||||
|
const { options } = toRefs(props);
|
||||||
|
const getOptions = inject('getOptions');
|
||||||
|
const tableData = ref(Array(5).fill({}));
|
||||||
|
|
||||||
|
const selectUuid = inject('selectUuid');
|
||||||
|
const getSelectUuid = inject('getSelectUuid');
|
||||||
|
const inputClick = () => {
|
||||||
|
getOptions(options.value);
|
||||||
|
getSelectUuid(options.value.uuid);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
.hw-input {
|
||||||
|
margin: 2px;
|
||||||
|
border: 1px solid #0000;
|
||||||
|
position: relative;
|
||||||
|
padding: 12px 2px 2px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #0001;
|
||||||
|
border: 1px solid #00afff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-table :data="globalFormData.pageVariable[options.dataKey]" style="width: 100%">
|
||||||
|
<el-table-column :prop="i" :label="options.thTdMap[i]" v-for="i in Object.keys(options.thTdMap)" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'hw-table-view'
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
options: Object
|
||||||
|
});
|
||||||
|
|
||||||
|
const { options } = toRefs(props);
|
||||||
|
const globalFormData = inject('globalFormData');
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue