hbuilder添加代码块

工具-》代码块设置=》vue设置

  "uListMedia": {
        "body": [
            "<view class=\"uni-list\">",
                 "\t<view class=\"uni-list-cell\" hover-class=\"uni-list-cell-hover\" v-for=\"(item,index) in list\" :key=\"index\">",
                      "\t\t<view class=\"uni-media-list\">",
                          "\t\t\t<image class=\"uni-media-list-logo\" :src=\"item.img\"></image>",
                          "\t\t\t<view class=\"uni-media-list-body\">",
                              "\t\t\t\t<view class=\"uni-media-list-text-top\">{{item.title}}</view>",
                              "\t\t\t\t<view class=\"uni-media-list-text-bottom uni-ellipsis\">{{item.content}}</view>",
                          "\t\t\t</view>",
                      "\t\t</view>",
                 "\t</view>",
             "</view>"
        ],
        "prefix": "ulistmedia",
        "project": "uni-app",
        "scope": "source.vue.html"
}

2.复制hello的common文件夹到当前项目下
3.在app.vue 引入

@import './common/uni.css';
image.png
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

友情链接更多精彩内容