|
@@ -201,15 +201,18 @@ export default function Component(props: {
|
|
|
// </View>
|
|
// </View>
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- var svg2 = `<svg xmlns="http://www.w3.org/2000/svg" width="${list.length * 10 - 8}" height="50">`;
|
|
|
|
|
- for (var i = 0; i < list.length; i++) {
|
|
|
|
|
- var obj = list[i];
|
|
|
|
|
- svg2 += `<line x1="${i * 10}" y1="0" x2="${i * 10}" y2="${obj.showBig ? rpxToPx(28) : obj.showMiddle ? rpxToPx(24) : rpxToPx(16)}" stroke="${props.themeColor}" stroke-width="2"/>`
|
|
|
|
|
- if (obj.showBig) {
|
|
|
|
|
- svg2 += `<text x="${i * 10}" y="${rpxToPx(30 + 36)}" text-anchor="middle" fill="white" font-size="${rpxToPx(36)}">${obj.value}</text>`
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- svg2 += `</svg>`
|
|
|
|
|
|
|
+ // var svg2 = `<svg xmlns="http://www.w3.org/2000/svg" width="${list.length * 10 - 8}" height="50">`;
|
|
|
|
|
+ // for (var i = 0; i < list.length; i++) {
|
|
|
|
|
+ // var obj = list[i];
|
|
|
|
|
+ // svg2 += `<line x1="${i * 10}" y1="0" x2="${i * 10}" y2="${obj.showBig ? rpxToPx(28) : obj.showMiddle ? rpxToPx(24) : rpxToPx(16)}" stroke="${props.themeColor}" stroke-width="2"/>`
|
|
|
|
|
+ // if (obj.showBig) {
|
|
|
|
|
+ // svg2 += `<text x="${i * 10}" y="${rpxToPx(30 + 36)}" text-anchor="middle" fill="white" font-size="${rpxToPx(36)}">${obj.value}</text>`
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // svg2 += `</svg>`
|
|
|
|
|
+
|
|
|
|
|
+ // console.log(svg2)
|
|
|
|
|
+ // debugger
|
|
|
|
|
|
|
|
return <View className="slidng">
|
|
return <View className="slidng">
|
|
|
<View className="number_bg" style={{ opacity: enableText ? 1 : 0.4 }}>
|
|
<View className="number_bg" style={{ opacity: enableText ? 1 : 0.4 }}>
|
|
@@ -238,7 +241,7 @@ export default function Component(props: {
|
|
|
<View className="scrollContent">
|
|
<View className="scrollContent">
|
|
|
<View className="scrollPadding" style={{ width: rpxToPx(372) }} />
|
|
<View className="scrollPadding" style={{ width: rpxToPx(372) }} />
|
|
|
<View className="content">
|
|
<View className="content">
|
|
|
- {/* {
|
|
|
|
|
|
|
+ {
|
|
|
list.map((item, index) => {
|
|
list.map((item, index) => {
|
|
|
return <View className={(item as any).showBig ? 'slidng_item_big' : (item as any).showMiddle ? 'slidng_item_middle' : 'slidng_item'}
|
|
return <View className={(item as any).showBig ? 'slidng_item_big' : (item as any).showMiddle ? 'slidng_item_middle' : 'slidng_item'}
|
|
|
style={{ width: 2, marginRight: list.length - 1 == index ? 0 : 8, backgroundColor: props.themeColor, zIndex: 0 }} key={index}>
|
|
style={{ width: 2, marginRight: list.length - 1 == index ? 0 : 8, backgroundColor: props.themeColor, zIndex: 0 }} key={index}>
|
|
@@ -247,10 +250,10 @@ export default function Component(props: {
|
|
|
}
|
|
}
|
|
|
</View>
|
|
</View>
|
|
|
})
|
|
})
|
|
|
- } */}
|
|
|
|
|
- <View style={{ width: list.length * 10 - 8, height: 200 }}>
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ {/* <View style={{ width: list.length * 10 - 8, height: 200 }}>
|
|
|
<mysvg src={svg2} />
|
|
<mysvg src={svg2} />
|
|
|
- </View>
|
|
|
|
|
|
|
+ </View> */}
|
|
|
</View>
|
|
</View>
|
|
|
<View className="scrollPadding" />
|
|
<View className="scrollPadding" />
|
|
|
|
|
|