Commit 35ba8602 authored by “yiyousong”'s avatar “yiyousong”

perf:修改应用主题图片预览

parent b109a3ea
...@@ -75,11 +75,6 @@ ...@@ -75,11 +75,6 @@
:addVisile.sync="addVisile" :addVisile.sync="addVisile"
@addSuccess="getCategoryList" @addSuccess="getCategoryList"
></AddTheme> ></AddTheme>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</div> </div>
</template> </template>
...@@ -88,7 +83,6 @@ import { getCategoryList, deleteCategory } from "@/services/market"; ...@@ -88,7 +83,6 @@ import { getCategoryList, deleteCategory } from "@/services/market";
import AddTheme from "../modal/AddTheme"; import AddTheme from "../modal/AddTheme";
import local from "@/utils/local"; import local from "@/utils/local";
import { pageSizeOptions } from "@/config/pageConfig.js"; import { pageSizeOptions } from "@/config/pageConfig.js";
import PrevieModal from "@/components/PrevieModal.vue";
const columns = [ const columns = [
{ {
title: "序号", title: "序号",
...@@ -135,15 +129,12 @@ const columns = [ ...@@ -135,15 +129,12 @@ const columns = [
export default { export default {
components: { components: {
AddTheme, AddTheme,
PrevieModal,
}, },
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
columns, columns,
previewData: {}, // 预览
previewVisible: false,
siteId: local.getLocal("siteId"), siteId: local.getLocal("siteId"),
tableData: [], // 表格数据 tableData: [], // 表格数据
loading: false, loading: false,
...@@ -254,11 +245,9 @@ export default { ...@@ -254,11 +245,9 @@ export default {
}, },
// 预览封面 // 预览封面
handlePreview(url) { handlePreview(url) {
this.previewData = { this.$viewerApi({
type: "img", images: [url],
url: url, });
};
this.previewVisible = true;
}, },
}, },
}; };
......
...@@ -46,11 +46,6 @@ ...@@ -46,11 +46,6 @@
<a-input-number v-model="form.sort" :min="1" /> <a-input-number v-model="form.sort" :min="1" />
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<!-- 预览 -->
<PrevieModal
:previewData="previewData"
:previewVisible.sync="previewVisible"
></PrevieModal>
</a-modal> </a-modal>
</div> </div>
</template> </template>
...@@ -58,7 +53,6 @@ ...@@ -58,7 +53,6 @@
<script> <script>
import { saveCategory } from "@/services/market"; import { saveCategory } from "@/services/market";
import local from "@/utils/local"; import local from "@/utils/local";
import PrevieModal from "@/components/PrevieModal.vue";
export default { export default {
props: { props: {
addVisile: { addVisile: {
...@@ -71,17 +65,13 @@ export default { ...@@ -71,17 +65,13 @@ export default {
default: "新增分类", default: "新增分类",
}, },
}, },
components: { components: {},
PrevieModal,
},
data() { data() {
return { return {
accept: "image/jpeg,image/png", accept: "image/jpeg,image/png",
api: process.env.VUE_APP_API_BASE_URL + "/", api: process.env.VUE_APP_API_BASE_URL + "/",
api2: process.env.VUE_APP_API_IMG_URL, api2: process.env.VUE_APP_API_IMG_URL,
fileList: [], fileList: [],
previewData: {}, // 预览
previewVisible: false,
form: { form: {
siteId: local.getLocal("siteId"), // 站点id siteId: local.getLocal("siteId"), // 站点id
siteName: local.getLocal("siteName"), // 站点名称 siteName: local.getLocal("siteName"), // 站点名称
...@@ -184,11 +174,9 @@ export default { ...@@ -184,11 +174,9 @@ export default {
}, },
// 预览 // 预览
handlePreview(info) { handlePreview(info) {
this.previewData = { this.$viewerApi({
type: "img", images: [info.url],
url: info.url, });
};
this.previewVisible = true;
}, },
// 重置 // 重置
handleReset() { handleReset() {
......
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