1. <script>
    2. var str = "剧情,犯罪,月黑风高"
    3. var arr = str.split(",")
    4. console.log(arr)
    5. var res = []
    6. arr.forEach(name=>{
    7. console.log(name)
    8. res.push({
    9. name
    10. })
    11. })
    12. console.log(res)