|
|
@@ -1,10 +1,9 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button v-if="title.length === 0" type="primary" text @click="detail"
|
|
|
- >查看</el-button
|
|
|
- >
|
|
|
- <div v-else @click="detail">
|
|
|
- <slot name="title"></slot>
|
|
|
+ <div @click="detail">
|
|
|
+ <slot name="title">
|
|
|
+ <el-button type="primary" text @click="detail">查看</el-button>
|
|
|
+ </slot>
|
|
|
</div>
|
|
|
<el-image-viewer
|
|
|
v-if="showImage"
|
|
|
@@ -93,7 +92,7 @@ export default {
|
|
|
},
|
|
|
detail() {
|
|
|
console.log(Number(this.id, 10))
|
|
|
- if (Number(this.id, 10) === 'NaN') {
|
|
|
+ if (Number(this.id, 10).toString() === 'NaN') {
|
|
|
this.$api.resource.fileDetail(this.id).then(res => {
|
|
|
if (res.code === 200) {
|
|
|
this.data = res.data
|