Closed paper closed 1 year ago
current属性好像也没用 怎么解决的呢
没有复现的,如还有问题可以提供一下 demo。
export default class App extends React.Component {
render () {
return (
<Swiper
className='test-h'
indicatorColor='#999'
indicatorActiveColor='#333'
vertical
circular
indicatorDots
current={2}
>
<SwiperItem>
<View className='demo-text-1'>1</View>
</SwiperItem>
<SwiperItem>
<View className='demo-text-2'>2</View>
</SwiperItem>
<SwiperItem>
<View className='demo-text-3'>3</View>
</SwiperItem>
</Swiper>
)
}
}
如题。
环境: "dependencies": { "@babel/runtime": "^7.7.7", "@tarojs/components": "3.6.8", "@tarojs/helper": "3.6.8", "@tarojs/plugin-framework-react": "3.6.8", "@tarojs/plugin-http": "^3.6.8", "@tarojs/plugin-platform-alipay": "3.6.8", "@tarojs/plugin-platform-h5": "3.6.8", "@tarojs/plugin-platform-jd": "3.6.8", "@tarojs/plugin-platform-kwai": "^6.0.0", "@tarojs/plugin-platform-qq": "3.6.8", "@tarojs/plugin-platform-swan": "3.6.8", "@tarojs/plugin-platform-tt": "3.6.8", "@tarojs/plugin-platform-weapp": "3.6.8", "@tarojs/react": "3.6.8", "@tarojs/runtime": "3.6.8", "@tarojs/shared": "3.6.8", "@tarojs/taro": "3.6.8", "axios": "^1.4.0", "react": "^18.0.0", "react-dom": "^18.0.0" }, "devDependencies": { "@babel/core": "^7.8.0", "@commitlint/cli": "^17.6.6", "@commitlint/config-conventional": "^17.6.6", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", "@tarojs/cli": "3.6.8", "@tarojs/plugin-mock": "0.0.9", "@tarojs/taro-loader": "3.6.8", "@tarojs/webpack5-runner": "3.6.8", "@types/node": "^18.15.11", "@types/react": "^18.0.0", "@types/webpack-env": "^1.13.6", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", "babel-preset-taro": "3.6.8", "eslint": "^8.12.0", "eslint-config-taro": "3.6.8", "eslint-plugin-import": "^2.12.0", "eslint-plugin-react": "^7.8.2", "eslint-plugin-react-hooks": "^4.2.0", "husky": "^8.0.3", "lint-staged": "^13.2.3", "postcss": "^8.4.18", "react-refresh": "^0.11.0", "sass": "^1.54.4", "stylelint": "^15.10.1", "stylelint-config-standard": "^34.0.0", "stylelint-config-standard-scss": "^10.0.0", "ts-node": "^10.9.1", "typescript": "^4.1.0", "webpack": "^5.78.0" },
node:v16.16.0
把 vertical 设置为 true ,Swiper 组件还是横行滑动。