| | |
| | | import WaterfallCol from '@/uni_modules/helang-waterfall/components/waterfall/waterfall-col'; |
| | | import WaterfallItem from '@/uni_modules/helang-waterfall/components/waterfall/waterfall-item'; |
| | | |
| | | |
| | | export default { |
| | | components: { |
| | | Waterfall, |
| | |
| | | console.log("theme", uni.getStorageSync('theme')) |
| | | const theme = uni.getStorageSync('theme') || 'light' |
| | | this.theme = theme |
| | | |
| | | this.$refs.helangWaterfall.render(this.items, true); |
| | | }, |
| | | onShow() { |
| | | this.$nextTick(() => { |
| | | this.$refs.helangWaterfall?.render(this.items, true); |
| | | }); |
| | | }, |
| | | onUnload() { |
| | | if (this.$refs.helangWaterfall?.clear) { |
| | | this.$refs.helangWaterfall.clear(); |
| | | } |
| | | }, |
| | | methods: { |
| | | onSearch(value) { |
| | | debugger; |
| | | uni.showToast({ |
| | | title: `搜索:${value}`, |
| | | icon: 'none' |
| | |
| | | |
| | | }, |
| | | onRenderHeight({ colIndex, height, reportHeightTimeChange }) { |
| | | console.log("height:", height) |
| | | this.$refs.helangWaterfall.reportHeight({ |
| | | colIndex, |
| | | height, |
| | | reportHeightTimeChange |
| | | }) |
| | | }, |
| | | |
| | | } |
| | | } |
| | | </script> |