|
|
@@ -14,13 +14,13 @@
|
|
|
<text class="unit">¥</text><text>{{ info.price }}</text>
|
|
|
</view>
|
|
|
<view class="open-bx">
|
|
|
- <i class="iconfont iconjian" @click="delEvent" v-if="bigCount > 0 || smallCount > 0"></i>
|
|
|
+ <i class="iconfont iconjian" :class="delAnimationData?'animation':''" @click="delEvent" v-if="bigCount > 0 || smallCount > 0"></i>
|
|
|
<text class="num" @click="customNum" v-if="bigCount > 0 || smallCount > 0">
|
|
|
<text v-if="bigCount > 0 || smallCount > 0">{{ `${bigCount}` }}</text>
|
|
|
<text v-if="smallCount > 0">/</text>
|
|
|
<text v-if="smallCount > 0">{{ `${smallCount}` }}</text>
|
|
|
</text>
|
|
|
- <i class="iconfont iconzeng" @click="addEvent"></i>
|
|
|
+ <i class="iconfont iconzeng" :class="addAnimationData?'animation':''" @click="addEvent"></i>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -30,11 +30,13 @@
|
|
|
<script>
|
|
|
import { COMMODITY_TYPE } from "@/utils/declare";
|
|
|
import AppImg from "@/components/app-img";
|
|
|
+import animationMins from "@/mixins/animation";
|
|
|
export default {
|
|
|
name: "Commodity",
|
|
|
components: {
|
|
|
AppImg
|
|
|
},
|
|
|
+ mixins: [animationMins],
|
|
|
props: {
|
|
|
info: {
|
|
|
required: true,
|
|
|
@@ -68,6 +70,7 @@ export default {
|
|
|
created() {},
|
|
|
methods: {
|
|
|
addEvent() {
|
|
|
+ this.animationFun('add');
|
|
|
let params = {
|
|
|
...this.info,
|
|
|
bigCount: this.bigCount,
|
|
|
@@ -76,6 +79,7 @@ export default {
|
|
|
this.$emit("add", this.info,params);
|
|
|
},
|
|
|
delEvent() {
|
|
|
+ this.animationFun('del');
|
|
|
this.$emit("del", this.info);
|
|
|
},
|
|
|
|