第一次提交

This commit is contained in:
gxwebsoft
2023-08-04 13:32:43 +08:00
commit c02e8be49b
1151 changed files with 200453 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
<template>
<div>
<a-input-group compact>
<a-input
disabled
style="width: calc(100% - 32px)"
v-model:value="value"
:placeholder="placeholder"
/>
<a-button @click="openEdit">
<template #icon><BulbOutlined class="ele-text-warning" /></template>
</a-button>
</a-input-group>
<!-- 选择弹窗 -->
<SelectData
v-model:visible="showEdit"
:data="current"
:title="placeholder"
:customer-type="customerType"
@done="onChange"
/>
</div>
</template>
<script lang="ts" setup>
import { BulbOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import SelectData from './components/select-data.vue';
import { TowerModel } from '@/api/tower/model/model';
const props = withDefaults(
defineProps<{
value?: any;
customerType?: string;
placeholder?: string;
index?: number;
}>(),
{
placeholder: '请选择数据'
}
);
const emit = defineEmits<{
(e: 'done', TowerModel): void;
(e: 'clear'): void;
(e: 'multiple', any): void;
}>();
// 是否显示编辑弹窗
const showEdit = ref(false);
// 当前编辑数据
const current = ref<TowerModel | null>(null);
/* 打开编辑弹窗 */
const openEdit = (row?: TowerModel) => {
current.value = row ?? null;
showEdit.value = true;
};
const onChange = (row) => {
// 第几行
row.index = Number(props.index);
emit('done', row);
};
</script>