|
@@ -1,8 +1,6 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view class="nut-sku-header">
|
|
<view class="nut-sku-header">
|
|
|
- <!-- <img :src="goods.imagePath" /> -->
|
|
|
|
|
- <image class="nut-sku-header-img" :src="goods.imagePath" v-if="ENV != ENV_TYPE.WEB" />
|
|
|
|
|
- <img class="nut-sku-header-img" :src="goods.imagePath" v-else />
|
|
|
|
|
|
|
+ <img :src="goods.imagePath" />
|
|
|
|
|
|
|
|
<view class="nut-sku-header-right">
|
|
<view class="nut-sku-header-right">
|
|
|
<template v-if="getSlots('sku-header-price')">
|
|
<template v-if="getSlots('sku-header-price')">
|
|
@@ -23,7 +21,6 @@
|
|
|
import { reactive, toRefs, onMounted } from 'vue';
|
|
import { reactive, toRefs, onMounted } from 'vue';
|
|
|
import { createComponent } from '@/packages/utils/create';
|
|
import { createComponent } from '@/packages/utils/create';
|
|
|
const { componentName, create, translate } = createComponent('sku-header');
|
|
const { componentName, create, translate } = createComponent('sku-header');
|
|
|
-import Taro from '@tarojs/taro';
|
|
|
|
|
|
|
|
|
|
export default create({
|
|
export default create({
|
|
|
props: {
|
|
props: {
|
|
@@ -37,15 +34,9 @@ export default create({
|
|
|
setup(props: any, { emit, slots }) {
|
|
setup(props: any, { emit, slots }) {
|
|
|
const getSlots = (name: string) => slots[name];
|
|
const getSlots = (name: string) => slots[name];
|
|
|
|
|
|
|
|
- const state = reactive({
|
|
|
|
|
- ENV: Taro.getEnv(),
|
|
|
|
|
- ENV_TYPE: Taro.ENV_TYPE
|
|
|
|
|
- });
|
|
|
|
|
-
|
|
|
|
|
return {
|
|
return {
|
|
|
getSlots,
|
|
getSlots,
|
|
|
- translate,
|
|
|
|
|
- ...toRefs(state)
|
|
|
|
|
|
|
+ translate
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|