473669799@qq.com
473669799@qq.com
  • 发布:2020-12-17 18:31
  • 更新:2021-01-22 18:00
  • 阅读:826

uni-app 引入了阿里图标的js文件,运行到小程序后就报错,Cannot read property 'getElementsByTagName' of undefined

分类:uni-app
<template>  
    <view>  
        <view class="list_content">  
            <view class="list_content_div">  
                <view class="list_content_divList" v-for="(item,index) in briefingList" :key="index" @tap="openUrl(item.url)">  
                    <svg class="icon svg-icon list_content_icon" aria-hidden="true">  
                       <use :xlink:href="item.icon"></use>  
                     </svg>  
                    <!-- <image class="submit-arrow" src="../../static/img/emergencyDrill/arrow.png" /> -->  
                    <text>{{item.name}}</text>  
                </view>  
            </view>  
        </view>  
    </view>  
</template>  

<script>  
    import * as iconfont from '@/static/css/icon-font/iconfont.js';  
    export default {  
        data() {  
            return {  
                briefingList: [  
                    {  
                        name:"班前计划",  
                        icon:"#iconbanqianjihua",  
                        url:"beforePlan"  
                    },  
                    {  
                        name:"班组建设",  
                        icon:"#iconbanzujianshe"  
                    }  
                ],  
            };  
        },  
        onLoad() {  
        },  
        methods: {  

        }  
    }  
</script>  

<style lang="scss">  
</style>  
2020-12-17 18:31 负责人:无 分享
已邀请:
473669799@qq.com

473669799@qq.com (作者) - 程序猿小白

已解决

  • seafwg

    请问一下大佬怎么解决的

    2021-01-14 10:22

473669799@qq.com

473669799@qq.com (作者) - 程序猿小白

473669799@qq.com

473669799@qq.com (作者) - 程序猿小白

有大佬知道吗

473669799@qq.com

473669799@qq.com (作者) - 程序猿小白

报错在引入的这个js文件夹中

896082287@qq.com

896082287@qq.com

怎么解决的?

1258107260@qq.com

1258107260@qq.com - life

不删除js 文件如何解决?

1258107260@qq.com

1258107260@qq.com - life

追着qq问到的

亲测有效 https://blog.csdn.net/qq_42540989/article/details/111356678

要回复问题请先登录注册