cb-biz-ui 1.6.5 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:placeholder="imagePlaceholder"
|
|
10
10
|
backgroundColor="#f9f9f9"
|
|
11
11
|
:mode="imageMode"
|
|
12
|
-
:src="
|
|
12
|
+
:src="goodsImage"
|
|
13
13
|
sizeType="previewImage"
|
|
14
14
|
></ui-lazyload-img>
|
|
15
15
|
<!-- <view
|
|
@@ -249,6 +249,19 @@ const errStatusText = computed(() => {
|
|
|
249
249
|
}
|
|
250
250
|
return '';
|
|
251
251
|
});
|
|
252
|
+
const goodsImage = computed(() => {
|
|
253
|
+
if (props?.entity?.image?.includes('static.tanshuapi.com')) {
|
|
254
|
+
return urlConversion(props?.entity?.image || '');
|
|
255
|
+
}
|
|
256
|
+
return props?.entity?.image || '';
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
function urlConversion(path) {
|
|
260
|
+
let reg =
|
|
261
|
+
/^(https?:\/\/)([0-9a-z.]+)(:[0-9]+)?([/0-9a-z.]+)?(\?[0-9a-z&=]+)?(#[0-9-a-z]+)?/i;
|
|
262
|
+
path = path.replace(reg, 'https://$2$3$4$5$6');
|
|
263
|
+
return path;
|
|
264
|
+
}
|
|
252
265
|
|
|
253
266
|
const state = reactive({
|
|
254
267
|
windowWidth: 375,
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
<script setup lang="ts">
|
|
39
39
|
import { reactive, watch } from 'vue';
|
|
40
40
|
|
|
41
|
-
type
|
|
41
|
+
type typeStatus = 'asc' | 'desc';
|
|
42
|
+
|
|
42
43
|
const props = withDefaults(
|
|
43
44
|
defineProps<{
|
|
44
45
|
borderActivedColor?: string;
|
|
@@ -46,6 +47,7 @@ const props = withDefaults(
|
|
|
46
47
|
scale?: number;
|
|
47
48
|
width?: string;
|
|
48
49
|
margin?: string;
|
|
50
|
+
type?: typeStatus;
|
|
49
51
|
}>(),
|
|
50
52
|
{
|
|
51
53
|
borderActivedColor: 'rgb(58, 138, 251);',
|
|
@@ -55,7 +57,7 @@ const props = withDefaults(
|
|
|
55
57
|
}
|
|
56
58
|
);
|
|
57
59
|
const emit = defineEmits<{
|
|
58
|
-
(e: 'change', type:
|
|
60
|
+
(e: 'change', type: typeStatus): void;
|
|
59
61
|
}>();
|
|
60
62
|
|
|
61
63
|
const state = reactive({
|