|
@@ -16,13 +16,25 @@
|
|
|
@search-reset="resetChange"
|
|
|
@size-change="dataList"
|
|
|
@current-change="dataList"
|
|
|
- />
|
|
|
+ >
|
|
|
+ <template #imgUrl-form="scope">
|
|
|
+ <single-upload v-model="form.imgUrl" />
|
|
|
+ </template>
|
|
|
+ <template #imgUrl="{ row }">
|
|
|
+ <el-button link type="primary" @click.stop="imgUrlClick(row)">{{
|
|
|
+ row.imgUrl
|
|
|
+ }}</el-button>
|
|
|
+ </template>
|
|
|
+ </avue-crud>
|
|
|
<CommonTable
|
|
|
ref="commonTableRef"
|
|
|
:tableTitle="tableTitle"
|
|
|
:tableType="commonTableType"
|
|
|
@selected-sure="onSelectedFinish"
|
|
|
/>
|
|
|
+ <el-dialog v-model="dialogVisible">
|
|
|
+ <img w-full :src="previewImgUrl" alt="Preview Image" />
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup>
|
|
@@ -30,6 +42,7 @@ import { ref, getCurrentInstance } from "vue";
|
|
|
import { useCrud } from "@/hooks/userCrud";
|
|
|
import { getTableConfig } from "./configs";
|
|
|
import { saveCompoents } from "@/api/craft/process/index";
|
|
|
+import SingleUpload from "@/components/Upload/SingleUpload.vue";
|
|
|
|
|
|
const props = defineProps({
|
|
|
tableTitle: {
|
|
@@ -92,6 +105,13 @@ const onSelectedFinish = (itemValue) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const previewImgUrl = ref("");
|
|
|
+const dialogVisible = ref(false);
|
|
|
+const imgUrlClick = (itemValue) => {
|
|
|
+ previewImgUrl.value = itemValue.imgUrl;
|
|
|
+ dialogVisible.value = true;
|
|
|
+};
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
url.value = tableConfig[props.tableType].url;
|
|
|
option.value = Object.assign(option.value, {
|