本文最后更新于347 天前,其中的信息可能已经过时,如有错误请发送邮件到1986413837@qq.com
1.encodeURIComponent参数消毒

2.picker我爱你…… 啊啊啊啊啊啊宝宝你是个香香软软的小蛋糕啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊
微信小程序原生组件 直接满足需求 我与uni-ui周旋久 宁做我

有时间看看能不能再改造一下改成更满足需求的

3.foldStates管理折叠状态

这里的第几期及其下面的内容是遍历出来的 所以要动态添加折叠状态
使用对象即可
const foldStates = ref({})
const toggleFold = (index) => {
foldStates.value[index] = !foldStates.value[index]
}
模版中使用
<view class="phase" v-for="(item, index) in keyWordList" :key="index">
<view class="phase_title" @click="toggleFold(index)">
第{{ getChineseNumber(index)}}期
<view class="bottom_arrow" :class="{ 'rotate-arrow': foldStates[index] }"></view>
</view>
<view class="phase_main" :class="{ 'show': foldStates[index] }">
<view class="phase_item" v-for="(keyword, keywordIndex) in item" :key="keywordIndex">
<view class="item_name">{{ keywordIndex + 1 }}.{{ keyword }}</view>
</view>
</view>
</view>
foldStates 是一个用来管理每个阶段(phase)的展开和折叠状态的对象
虽然没有显式地设置 foldStates[1] 的状态,但它的默认值是 undefined,这在 JavaScript 中会被视为 false
这段时间深刻感受到Object Map Array…..灵活使用的强大力量
4.picker-view + uni-popup 可以几乎最大程度贴近需求了

但是细节处还没搞好 太烦躁了……