From 4eb4742799f0f4ca6a4fe2024eb59355d3120372 Mon Sep 17 00:00:00 2001 From: huangjinming Date: Thu, 19 Jan 2023 10:21:49 +0800 Subject: [PATCH] fix --- .postcssrc.js | 38 +++++++++---------- src/components/market/TheSellDialog.vue | 8 ---- src/components/mobile/main/ChipList.vue | 39 +++++++++++++------- src/components/mobile/main/HeroList.vue | 15 ++++++-- src/components/mobile/main/MessageBox.vue | 3 -- src/components/mobile/main/PieceList.vue | 12 ++++-- src/components/mobile/main/TheSellDialog.vue | 3 -- src/components/mobile/main/WeaponFilter.vue | 5 +-- src/components/mobile/main/WeaponList.vue | 19 +++++++--- src/components/mobile/main/WeaponSellTop.vue | 2 - 10 files changed, 79 insertions(+), 65 deletions(-) diff --git a/.postcssrc.js b/.postcssrc.js index 43d1ea8..ae3cdf5 100644 --- a/.postcssrc.js +++ b/.postcssrc.js @@ -1,22 +1,22 @@ - // module.exports = { - // plugins: { - // autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit-,-moz-等等 - // "postcss-px-to-viewport": { - // unitToConvert: "px", // 要转化的单位 - // viewportWidth: 1080, // UI设计稿的宽度 - // unitPrecision: 6, // 转换后的精度,即小数点位数 - // propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换 - // viewportUnit: "vw", // 指定需要转换成的视窗单位,默认vw - // fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位,默认vw - // selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名, - // minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换 - // mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false - // replace: true, // 是否转换后直接更换属性值 - // exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配 - // landscape: false // 是否处理横屏情况 - // }, + module.exports = { + plugins: { + autoprefixer: {}, // 用来给不同的浏览器自动添加相应前缀,如-webkit-,-moz-等等 + "postcss-px-to-viewport": { + unitToConvert: "px", // 要转化的单位 + viewportWidth: 1080, // UI设计稿的宽度 + unitPrecision: 6, // 转换后的精度,即小数点位数 + propList: ["*"], // 指定转换的css属性的单位,*代表全部css属性的单位都进行转换 + viewportUnit: "vw", // 指定需要转换成的视窗单位,默认vw + fontViewportUnit: "vw", // 指定字体需要转换成的视窗单位,默认vw + selectorBlackList: ["wrap"], // 指定不转换为视窗单位的类名, + minPixelValue: 1, // 默认值1,小于或等于1px则不进行转换 + mediaQuery: true, // 是否在媒体查询的css代码中也进行转换,默认false + replace: true, // 是否转换后直接更换属性值 + exclude: [/\/src\/views\/desktop\//], // 设置忽略文件,用正则做目录名匹配 + landscape: false // 是否处理横屏情况 + }, - // } - // }; + } + }; diff --git a/src/components/market/TheSellDialog.vue b/src/components/market/TheSellDialog.vue index 72d35fd..12a58e9 100644 --- a/src/components/market/TheSellDialog.vue +++ b/src/components/market/TheSellDialog.vue @@ -159,13 +159,6 @@ export default { closeTip() { this.$emit("handPutHide"); }, - async handMessage() { - this.$message({ - message: "You just copied accountId", - type: "success", - duration: 5 * 1000, - }); - }, async handConfirm() { this.$refs.deptForm.validate(async (valid) => { if (valid) { @@ -316,7 +309,6 @@ export default { background: "rgba(0, 0, 0, 0.8)", }); }, - hideLoading() { this.loadingInstance?.close(); }, diff --git a/src/components/mobile/main/ChipList.vue b/src/components/mobile/main/ChipList.vue index 0a7fae2..e9c1345 100644 --- a/src/components/mobile/main/ChipList.vue +++ b/src/components/mobile/main/ChipList.vue @@ -6,7 +6,7 @@ @click="showTip(chip)" :key="i" > -
+
{{ chip.detail.chip_name }}
-
- -
-
{{ formatPriceShow(chip.s_price,18) }}
+
+ +
+
+ {{ formatPriceShow(chip.s_price, 18) }} +
sell
@@ -47,7 +49,7 @@
-
{{ formatPriceShow(chip.s_price,18) }}
+
{{ formatPriceShow(chip.s_price, 18) }}
@@ -68,22 +70,24 @@ - +
@@ -91,11 +95,11 @@ import ChipModal from "./ChipModal.vue"; import TheSellDialog from "./TheSellDialog.vue"; import TheBuyDialog from "./TheBuyDialog.vue"; -import MessageBox from './MessageBox.vue' +import MessageBox from "./MessageBox.vue"; import { formatPrice } from "@/utils/chain.util"; export default { - props: ["nftList", "isType",'currencyTypeList'], - components: { MessageBox,ChipModal, TheSellDialog, TheBuyDialog }, + props: ["nftList", "isType", "currencyTypeList"], + components: { MessageBox, ChipModal, TheSellDialog, TheBuyDialog }, data() { return { isShow: false, @@ -109,7 +113,7 @@ export default { this.dialogVisible = false; console.log("ChipDialoghide"); }, - formatPriceShow(price, decimals, fixed = 2) { + formatPriceShow(price, decimals, fixed = 2) { return formatPrice(price, decimals, fixed); }, chipDialog() { @@ -122,6 +126,13 @@ export default { console.log("chegn"); }); }, + handMessageHide() { + this.$nextTick(() => { + this.$nextTick(() => { + this.$refs.message.close(); + }); + }); + }, showTip(data) { this.isShow = true; this.$nextTick(() => { diff --git a/src/components/mobile/main/HeroList.vue b/src/components/mobile/main/HeroList.vue index f84be5c..967885f 100644 --- a/src/components/mobile/main/HeroList.vue +++ b/src/components/mobile/main/HeroList.vue @@ -6,7 +6,7 @@ @click="showTip(hero)" :key="i" > -
+
@@ -46,6 +48,7 @@ :isBuy="isBuy" ref="buydialog" @handMessage="handMessage" + @handMessageHide="handMessageHide" @handBuyShow="handBuyShow" @handBuyHide="handBuyHide" > @@ -100,7 +103,6 @@ export default { }, handleClick(data) { this.Visiable = true; - }, closeTip() { this.isShow = false; @@ -108,7 +110,6 @@ export default { handPutShow(data) { this.isPiecePut = true; this.$nextTick(() => { - this.$refs.selldialog.init(data); }); }, @@ -118,7 +119,6 @@ export default { handBuyShow(data) { this.isBuy = true; this.$nextTick(() => { - this.$refs.buydialog.init(data); }); }, @@ -131,6 +131,13 @@ export default { console.log("chegn"); }); }, + handMessageHide() { + this.$nextTick(() => { + this.$nextTick(() => { + this.$refs.message.close(); + }); + }); + }, }, }; diff --git a/src/components/mobile/main/MessageBox.vue b/src/components/mobile/main/MessageBox.vue index bf70fd1..b9a34e0 100644 --- a/src/components/mobile/main/MessageBox.vue +++ b/src/components/mobile/main/MessageBox.vue @@ -34,14 +34,11 @@ export default { }, methods: { closeTip() { - // 分发自定义事件(事件名: closeTip) - // this.$emit("closeTip"); this.dialogVisible = false; }, open(type) { this.dialogVisible = true; this.msgType = type; - console.log("type", type, this.dialogVisible); }, handMessage() {}, }, diff --git a/src/components/mobile/main/PieceList.vue b/src/components/mobile/main/PieceList.vue index 348904d..d6089e7 100644 --- a/src/components/mobile/main/PieceList.vue +++ b/src/components/mobile/main/PieceList.vue @@ -75,6 +75,7 @@ :currencyTypeList="currencyTypeList" ref="selldialog" @handMessage="handMessage" + @handMessageHide="handMessageHide" @handPutShow="handPutShow" @handPutHide="handPutHide" > @@ -83,6 +84,7 @@ :isBuy="isBuy" ref="buydialog" @handMessage="handMessage" + @handMessageHide="handMessageHide" @handBuyShow="handBuyShow" @handBuyHide="handBuyHide" > @@ -111,19 +113,23 @@ export default { methods: { chipDialoghide() { this.dialogVisible = false; - console.log("ChipDialoghide"); }, formatPriceShow(price, decimals, fixed = 2) { return formatPrice(price, decimals, fixed); }, chipDialog() { this.dialogVisible = true; - console.log("ChipDialog"); }, handMessage() { this.$nextTick(() => { this.$refs.message.open(1); - console.log("chegn"); + }); + }, + handMessageHide() { + this.$nextTick(() => { + this.$nextTick(() => { + this.$refs.message.close(); + }); }); }, showTip(data) { diff --git a/src/components/mobile/main/TheSellDialog.vue b/src/components/mobile/main/TheSellDialog.vue index 53b32e2..1aee273 100644 --- a/src/components/mobile/main/TheSellDialog.vue +++ b/src/components/mobile/main/TheSellDialog.vue @@ -158,15 +158,12 @@ export default { }, methods: { closeTip() { - // 分发自定义事件(事件名: closeTip) - // this.$emit("closeTip"); this.detailVisible = false; this.shell.price ='' }, init(data) { this.detailVisible = true; this.piece = data; - // console.log(data, "dfgdg"); }, handReduce() { if (this.cunout > 1) { diff --git a/src/components/mobile/main/WeaponFilter.vue b/src/components/mobile/main/WeaponFilter.vue index 3ee638b..d99baab 100644 --- a/src/components/mobile/main/WeaponFilter.vue +++ b/src/components/mobile/main/WeaponFilter.vue @@ -89,13 +89,10 @@ export default { value: 0, }; }, - mounted() { - // document.getElementsByClassName("el-slider__button")[0].childNodes[0].nodeValue = "跳转"; - }, + methods: { searchClear() { this.hero = ""; - // this.$emit('searchClear') }, priceFilter() { this.priceMin = ""; diff --git a/src/components/mobile/main/WeaponList.vue b/src/components/mobile/main/WeaponList.vue index e7ff9f5..7220ece 100644 --- a/src/components/mobile/main/WeaponList.vue +++ b/src/components/mobile/main/WeaponList.vue @@ -6,7 +6,7 @@ @click="showTip(weapon)" :key="i" > -
+
@@ -45,11 +46,12 @@ :type="type" :isBuy="isBuy" ref="buydialog" - @handMessage="handMessage" + @handMessage="handMessage" + @handMessageHide="handMessageHide" @handBuyShow="handBuyShow" @handBuyHide="handBuyHide" > - +
@@ -58,7 +60,7 @@ import WeaponModal from "./WeaponModal.vue"; import WeaponItem from "./WeaponItem.vue"; import TheSellDialog from "./TheSellDialog.vue"; import TheBuyDialog from "./TheBuyDialog.vue"; -import MessageBox from './MessageBox.vue' +import MessageBox from "./MessageBox.vue"; export default { props: ["nftList", "isType", "currencyTypeList"], components: { @@ -98,6 +100,13 @@ export default { this.$refs.message.open(1); }); }, + handMessageHide() { + this.$nextTick(() => { + this.$nextTick(() => { + this.$refs.message.close(); + }); + }); + }, handPutHide() { this.isPiecePut = false; }, diff --git a/src/components/mobile/main/WeaponSellTop.vue b/src/components/mobile/main/WeaponSellTop.vue index 21813f5..526e22f 100644 --- a/src/components/mobile/main/WeaponSellTop.vue +++ b/src/components/mobile/main/WeaponSellTop.vue @@ -86,8 +86,6 @@ formatPriceShow(price, decimals, fixed = 2) { padding-bottom: 11px; .item-top { width: 100%; - // display: flex; - // justify-content: space-between; .piece-weapon-left { width: 395px; height: 183px;