lvgl 使用demo

news/2024/11/16 21:23:05/文章来源:https://www.cnblogs.com/RYSBlog/p/18375728

实现效果

 

 代码

    #define OBJ_PARENT_WIDTH 970#define OBJ_PARENT_HEIGH 446#define OBJ_BTN_WIDTH 150#define OBJ_BTN_HEIGH 50#define OBJ_BTN_POS_X 120#define OBJ_BTN_POS_Y 40#define OBJ_ITEM_WIDTH 420#define OBJ_ITEM_HEIGH 50 #define OBJ_TABLE_HEIGH 60 #define OBJ_ITEM_STEP 60 #define OBJ_COLOR_BG_MAIN 0xfff2f2f2#define OBJ_COLOR_FONT_DEFAULT 0xFF2E2E2E#define OBJ_COLOR_FONT_BLUE 0xFF3B90F4#define OBJ_COLOR_FONT_GRAY 0xFFB3B3B3lv_obj_t* obj_p = lv_obj_create(appObjUiParent);lv_obj_center(obj_p);lv_obj_set_size(obj_p,OBJ_PARENT_WIDTH,OBJ_PARENT_HEIGH);lv_obj_set_style_border_width(obj_p,0,LV_STATE_DEFAULT);lv_obj_set_style_bg_color(obj_p,lv_color_hex(OBJ_COLOR_BG_MAIN),LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_p,0,LV_STATE_DEFAULT);lv_obj_set_style_text_font(obj_p, &lv_font_montserrat_24, LV_STATE_DEFAULT); //设置字体大小
    lv_obj_set_style_text_color(obj_p,lv_color_hex(OBJ_COLOR_FONT_DEFAULT),LV_STATE_DEFAULT);// 创建两个obj 左右各一个,使用btn按钮作为基座,上面label左右对齐lv_obj_t * obj_left_face = lv_obj_create(obj_p);lv_obj_align(obj_left_face,LV_ALIGN_LEFT_MID,0,0);lv_obj_set_size(obj_left_face, OBJ_PARENT_WIDTH/2, OBJ_PARENT_HEIGH);// lv_obj_set_style_bg_color(obj_left_face,lv_color_hex(0xfff2f200),LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(obj_left_face,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_set_style_border_width(obj_left_face,0,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_left_face,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_left_face,0,LV_STATE_DEFAULT);// 摄像头if(1){// canvas#define CAMERA_SHOW_WIDTH 240#define CAMERA_SHOW_HEIGH 240static unsigned char bufCameraBigCanvas[CAMERA_SHOW_WIDTH*CAMERA_SHOW_HEIGH*4];lv_obj_t* appObj_canvas_p=lv_obj_create(obj_left_face);lv_obj_set_size(appObj_canvas_p,CAMERA_SHOW_WIDTH+50, CAMERA_SHOW_HEIGH+50);lv_obj_set_style_bg_opa(appObj_canvas_p,LV_OPA_0,LV_STATE_DEFAULT);lv_obj_set_style_border_width(appObj_canvas_p,0,LV_STATE_DEFAULT);lv_obj_set_style_radius(appObj_canvas_p,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(appObj_canvas_p,0,LV_STATE_DEFAULT);lv_obj_align(appObj_canvas_p, LV_ALIGN_TOP_MID, 0, 0);// CANVASlv_obj_t* appObjCamera = lv_canvas_create(appObj_canvas_p);//lv_scr_act()lv_obj_align(appObjCamera, LV_ALIGN_CENTER, 0, 0);lv_obj_set_size(appObjCamera,CAMERA_SHOW_WIDTH, CAMERA_SHOW_HEIGH);lv_obj_set_style_radius(appObjCamera,CAMERA_SHOW_WIDTH/2,LV_STATE_DEFAULT);lv_obj_set_style_border_color(appObjCamera,lv_color_hex(0xffffffff),LV_STATE_DEFAULT);lv_obj_set_style_border_width(appObjCamera,0,LV_STATE_DEFAULT);lv_canvas_set_buffer(appObjCamera, bufCameraBigCanvas, CAMERA_SHOW_WIDTH, CAMERA_SHOW_HEIGH, LV_IMG_CF_TRUE_COLOR_ALPHA);mydebug;// lv_canvas_copy_buf(appObjCamera,bufCameraBigCanvas,0,0,CAMERA_SHOW_WIDTH, CAMERA_SHOW_HEIGH);mydebug;// lv_obj_invalidate(appObjCamera);// 主动触发重绘指令
lv_obj_t* appObj_p2=lv_obj_create(appObj_canvas_p);lv_obj_set_size(appObj_p2,CAMERA_SHOW_WIDTH+4, CAMERA_SHOW_HEIGH+4);lv_obj_set_style_border_width(appObj_p2,4,LV_STATE_DEFAULT);lv_obj_set_style_radius(appObj_p2,CAMERA_SHOW_WIDTH/2+2,LV_STATE_DEFAULT);lv_obj_set_style_border_color(appObj_p2,lv_color_hex(0xffffffff),LV_STATE_DEFAULT);lv_obj_set_style_bg_opa(appObj_p2,LV_OPA_0,LV_STATE_DEFAULT);lv_obj_align(appObj_p2, LV_ALIGN_CENTER, 0, 0);}// 弹窗,按钮if(1){// 中间弹窗 // xxx:录入中,录入成功,录入超时,录入失败  ---:--lv_obj_t* obj_left_face_state=lv_label_create(obj_left_face);lv_obj_align(obj_left_face_state, LV_ALIGN_TOP_MID, 0, 290);lv_label_set_text(obj_left_face_state,"---:--");lv_obj_set_style_text_color(obj_left_face_state,lv_color_hex(OBJ_COLOR_FONT_GRAY),LV_STATE_DEFAULT);// 左侧按钮lv_obj_t* obj_left_face_btn_l=lv_btn_create(obj_left_face);lv_obj_set_size(obj_left_face_btn_l,OBJ_BTN_WIDTH,OBJ_BTN_HEIGH);lv_obj_t* obj_left_face_btn_l_text=lv_label_create(obj_left_face_btn_l);lv_obj_center(obj_left_face_btn_l_text);lv_label_set_text(obj_left_face_btn_l_text,"btn1");lv_obj_align(obj_left_face_btn_l, LV_ALIGN_BOTTOM_MID, -OBJ_BTN_POS_X, -OBJ_BTN_POS_Y);// 右侧按钮lv_obj_t* obj_left_face_btn_r=lv_btn_create(obj_left_face);lv_obj_set_size(obj_left_face_btn_r,OBJ_BTN_WIDTH,OBJ_BTN_HEIGH);lv_obj_t* obj_left_face_btn_r_text=lv_label_create(obj_left_face_btn_r);lv_obj_center(obj_left_face_btn_r_text);lv_label_set_text(obj_left_face_btn_r_text,"btn2");lv_obj_align(obj_left_face_btn_r, LV_ALIGN_BOTTOM_MID, OBJ_BTN_POS_X, -OBJ_BTN_POS_Y);// 下划线 新增记录if(1){lv_obj_t* obj_left=lv_label_create(obj_left_face);lv_obj_align(obj_left,LV_ALIGN_BOTTOM_MID,0,-5);lv_label_set_text(obj_left,"new record");// lv_obj_set_style_text_decor(obj_left,LV_TEXT_DECOR_UNDERLINE,LV_STATE_DEFAULT);// 文字下划线lv_obj_set_style_text_font(obj_left, &lv_font_montserrat_20, LV_STATE_DEFAULT); //设置字体大小
            lv_obj_set_style_text_color(obj_left,lv_color_hex(OBJ_COLOR_FONT_DEFAULT),LV_STATE_DEFAULT);lv_obj_t * obj_left_1 = lv_btn_create(obj_left_face);lv_obj_set_size(obj_left_1, OBJ_BTN_WIDTH, 30);lv_obj_align(obj_left_1,LV_ALIGN_BOTTOM_MID,0,-5);lv_obj_set_style_bg_opa(obj_left_1,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_set_style_border_width(obj_left_1,2,LV_STATE_DEFAULT);lv_obj_set_style_border_color(obj_left_1,lv_color_hex(0xFFD9D9D9),LV_STATE_DEFAULT);lv_obj_set_style_border_side(obj_left_1,LV_BORDER_SIDE_BOTTOM,LV_STATE_DEFAULT);//边框lv_obj_set_style_pad_all(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_radius(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_shadow_ofs_x(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_shadow_ofs_y(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_shadow_width(obj_left_1,0,LV_STATE_DEFAULT);}}//lv_obj_add_flag(obj_left_face,LV_OBJ_FLAG_HIDDEN);
lv_obj_t * obj_left_info = lv_obj_create(obj_p);lv_obj_align(obj_left_info,LV_ALIGN_LEFT_MID,0,0);lv_obj_set_size(obj_left_info, OBJ_PARENT_WIDTH/2, OBJ_PARENT_HEIGH);lv_obj_set_style_bg_opa(obj_left_info,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_set_style_border_width(obj_left_info,0,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_left_info,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_left_info,0,LV_STATE_DEFAULT);if(1){// 姓名lv_obj_t* obj_left_0=lv_label_create(obj_left_info);lv_obj_align(obj_left_0, LV_ALIGN_TOP_MID, 0, 12);lv_obj_set_style_text_font(obj_left_0, &lv_font_montserrat_28, LV_STATE_DEFAULT); //设置字体大小lv_label_set_text(obj_left_0,"namexxx");lv_obj_set_style_text_color(obj_left_0,lv_color_hex(OBJ_COLOR_FONT_BLUE),LV_STATE_DEFAULT);char* info[]={"tel","18531231298","id","411325199505050578","driver date","2050-05-05","auth date","2050-05-05"};// telfor(int i=0;i<4;i++){lv_obj_t * obj_left_1 = lv_obj_create(obj_left_info);lv_obj_set_size(obj_left_1, OBJ_ITEM_WIDTH, OBJ_ITEM_HEIGH);lv_obj_align(obj_left_1,LV_ALIGN_TOP_MID,0,OBJ_ITEM_STEP*(i+1));lv_obj_set_style_bg_color(obj_left_1,lv_color_hex(0xFFD9D9D9),LV_STATE_DEFAULT);lv_obj_set_style_border_width(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_t* obj_left=lv_label_create(obj_left_1);lv_obj_align(obj_left, LV_ALIGN_LEFT_MID, 10, 0);lv_label_set_text(obj_left,info[2*i+0]);lv_obj_t* obj_right=lv_label_create(obj_left_1);lv_obj_align(obj_right, LV_ALIGN_RIGHT_MID, -10, 0);lv_obj_set_style_text_font(obj_right, &lv_font_montserrat_20, LV_STATE_DEFAULT); //设置字体大小
            lv_obj_set_style_text_color(obj_right,lv_color_hex(OBJ_COLOR_FONT_GRAY),LV_STATE_DEFAULT);lv_label_set_text(obj_right,info[2*i+1]);}// 左侧按钮lv_obj_t* obj_left_face_btn_l=lv_btn_create(obj_left_info);lv_obj_set_size(obj_left_face_btn_l,OBJ_BTN_WIDTH,OBJ_BTN_HEIGH);lv_obj_t* obj_left_face_btn_l_text=lv_label_create(obj_left_face_btn_l);lv_obj_center(obj_left_face_btn_l_text);lv_label_set_text(obj_left_face_btn_l_text,"btn3");lv_obj_align(obj_left_face_btn_l, LV_ALIGN_BOTTOM_MID, -OBJ_BTN_POS_X, -OBJ_BTN_POS_Y);// 右侧按钮lv_obj_t* obj_left_face_btn_r=lv_btn_create(obj_left_info);lv_obj_set_size(obj_left_face_btn_r,OBJ_BTN_WIDTH,OBJ_BTN_HEIGH);lv_obj_t* obj_left_face_btn_r_text=lv_label_create(obj_left_face_btn_r);lv_obj_center(obj_left_face_btn_r_text);lv_label_set_text(obj_left_face_btn_r_text,"btn4");lv_obj_align(obj_left_face_btn_r, LV_ALIGN_BOTTOM_MID, OBJ_BTN_POS_X, -OBJ_BTN_POS_Y);lv_obj_add_event_cb(obj_left_face_btn_r, my_cb_text_handle, LV_EVENT_CLICKED,obj_left_info);}lv_obj_t * obj_right = lv_obj_create(obj_p);lv_obj_set_size(obj_right, OBJ_PARENT_WIDTH/2, OBJ_PARENT_HEIGH);// lv_obj_set_style_bg_color(obj_right,lv_color_hex(0xff00f2f2),LV_STATE_DEFAULT);
    lv_obj_set_style_bg_opa(obj_right,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_align(obj_right,LV_ALIGN_RIGHT_MID,0,0);lv_obj_set_style_border_width(obj_right,0,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_right,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_right,0,LV_STATE_DEFAULT);if(1){lv_obj_t * obj_left_1 = lv_obj_create(obj_right);lv_obj_set_size(obj_left_1, OBJ_PARENT_WIDTH/2-10, OBJ_TABLE_HEIGH);lv_obj_align(obj_left_1,LV_ALIGN_TOP_LEFT,0,0);lv_obj_set_style_bg_opa(obj_left_1,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_set_style_border_width(obj_left_1,1,LV_STATE_DEFAULT);lv_obj_set_style_border_color(obj_left_1,lv_color_hex(0xFFD9D9D9),LV_STATE_DEFAULT);lv_obj_set_style_border_side(obj_left_1,LV_BORDER_SIDE_LEFT|LV_BORDER_SIDE_BOTTOM,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_radius(obj_left_1,1,LV_STATE_DEFAULT);lv_obj_t* obj_left_0=lv_label_create(obj_left_1);lv_obj_align(obj_left_0, LV_ALIGN_CENTER, 0, 0);lv_obj_set_style_text_font(obj_left_0, &lv_font_montserrat_28, LV_STATE_DEFAULT); //设置字体大小lv_label_set_text(obj_left_0,"record");lv_obj_set_style_text_color(obj_left_0,lv_color_hex(OBJ_COLOR_FONT_BLUE),LV_STATE_DEFAULT);lv_obj_t * obj_list = lv_obj_create(obj_right);lv_obj_set_size(obj_list, OBJ_PARENT_WIDTH/2, OBJ_PARENT_HEIGH-OBJ_TABLE_HEIGH);lv_obj_set_style_bg_opa(obj_list,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_align(obj_list,LV_ALIGN_TOP_LEFT,0,OBJ_ITEM_STEP);lv_obj_set_style_border_width(obj_list,0,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_list,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_list,0,LV_STATE_DEFAULT);// 渐变色static lv_style_t style;lv_style_init(&style);lv_style_set_radius(&style, 0);lv_style_set_bg_opa(&style, LV_OPA_80);lv_style_set_bg_color(&style, lv_color_hex(0xFFD9D9D9));lv_style_set_bg_grad_color(&style, lv_color_hex(OBJ_COLOR_BG_MAIN));lv_style_set_bg_grad_dir(&style, LV_GRAD_DIR_HOR);lv_style_set_bg_main_stop(&style, 0);//样式起点lv_style_set_bg_grad_stop(&style, 150);//样式结束位置static lv_style_t style_scroll;//滚动条颜色设置lv_style_init(&style_scroll);lv_style_set_bg_color(&style_scroll, lv_color_hex(OBJ_COLOR_FONT_BLUE));lv_style_set_width(&style_scroll,6);lv_obj_scroll_to_y(obj_list,OBJ_ITEM_STEP*20,LV_ANIM_OFF); //滑动到底部lv_obj_add_style(obj_list, &style_scroll, LV_PART_SCROLLBAR);//设置滚动条样式char* info[]={"namexx","18531231298"};lv_group_t * group=lv_group_create();for(int i=0;i<20;i++){lv_obj_t * obj_left_1 = lv_btn_create(obj_list);lv_group_add_obj(group,obj_left_1);lv_group_focus_obj(obj_left_1);lv_obj_set_size(obj_left_1, OBJ_PARENT_WIDTH/2-10, OBJ_TABLE_HEIGH);lv_obj_align(obj_left_1,LV_ALIGN_TOP_LEFT,0,OBJ_ITEM_STEP*(i));lv_obj_set_style_bg_opa(obj_left_1,LV_OPA_TRANSP,LV_STATE_DEFAULT);lv_obj_set_style_border_width(obj_left_1,1,LV_STATE_DEFAULT);lv_obj_set_style_border_color(obj_left_1,lv_color_hex(0xFFD9D9D9),LV_STATE_DEFAULT);lv_obj_set_style_border_side(obj_left_1,LV_BORDER_SIDE_LEFT|LV_BORDER_SIDE_BOTTOM,LV_STATE_DEFAULT);lv_obj_set_style_pad_all(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_outline_width(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_radius(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_shadow_ofs_x(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_shadow_ofs_y(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_shadow_width(obj_left_1,0,LV_STATE_DEFAULT);lv_obj_set_style_border_color(obj_left_1,lv_color_hex(OBJ_COLOR_FONT_BLUE),LV_STATE_FOCUSED);lv_obj_set_style_border_width(obj_left_1,3,LV_STATE_FOCUSED);lv_obj_set_style_border_side(obj_left_1,LV_BORDER_SIDE_LEFT,LV_STATE_FOCUSED);lv_obj_set_style_shadow_ofs_x(obj_left_1,-1,LV_STATE_FOCUSED);lv_obj_set_style_shadow_ofs_y(obj_left_1,1,LV_STATE_FOCUSED);lv_obj_set_style_shadow_width(obj_left_1,1,LV_STATE_FOCUSED);lv_obj_add_style(obj_left_1, &style, LV_STATE_FOCUSED); //为对象增加 样式
lv_obj_t* obj_left=lv_label_create(obj_left_1);lv_obj_align(obj_left, LV_ALIGN_LEFT_MID, 10, 0);lv_label_set_text(obj_left,info[0]);lv_obj_set_style_text_color(obj_left,lv_color_hex(OBJ_COLOR_FONT_DEFAULT),LV_STATE_DEFAULT);lv_obj_set_style_text_color(obj_left,lv_color_hex(OBJ_COLOR_FONT_BLUE),LV_STATE_FOCUSED);// 聚集焦点
            lv_obj_add_event_cb(obj_left_1, my_cb_text_handle, LV_EVENT_FOCUSED,obj_left);lv_obj_add_event_cb(obj_left_1, my_cb_text_handle, LV_EVENT_DEFOCUSED,obj_left);lv_obj_t* obj_right=lv_label_create(obj_left_1);lv_obj_align(obj_right, LV_ALIGN_RIGHT_MID, -10, 0);lv_obj_set_style_text_font(obj_right, &lv_font_montserrat_20, LV_STATE_DEFAULT); //设置字体大小
            lv_obj_set_style_text_color(obj_right,lv_color_hex(OBJ_COLOR_FONT_GRAY),LV_STATE_DEFAULT);lv_label_set_text(obj_right,info[1]);}}

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/786023.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

php读取access数据库

这个代码测试的老的access数据库,使用的php版本是5.4,php7.4的测试不通过 测试的文件: 链接:https://pan.quark.cn/s/c4cfef0bc484 提取码:N9mF 1.引入 com_dotnet 扩展,下载phpstudy,切换版本为php5.4,然后php.ini中加入extension=php_com_dotnet.dll2.复制下面代码<?ph…

conv1D,conv2D,和conv3D

torch.nn.Conv1d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode=zeros, device=None, dtype=None)

wqs 二分学习笔记

蒟蒻的第一篇学习笔记qwq wqs二分用于解决此类问题 n个物品,从中选恰好m个,最大化收益。而且你发现,如果没有选m个的限制,这道题是非常好做的。 使用前提 1、恰好选k个,至多至少不行 2、答案满足凸性 什么是凸性? 设选i个物品时的收益为fi 如果把它画成函数,那么它长这样…

使用 reloadNuxtApp 强制刷新 Nuxt 应用

title: 使用 reloadNuxtApp 强制刷新 Nuxt 应用 date: 2024/8/22 updated: 2024/8/22 author: cmdragon excerpt: reloadNuxtApp 是一个强大的工具,用于在 Nuxt 3 应用中强制刷新页面。通过不同的选项,你可以控制刷新行为、指定路径、保存状态等。 categories:前端开发tags:…

[Ynoi2016] 掉进兔子洞

题目链接 : [Ynoi2016] 掉进兔子洞 好不容易争取来的三天没有模拟赛,不打Ynoi打什么。 先从莫队+bitset的板板开始,第一个自己打出来的Ynoi捏。 一个套路,就是将每个数离散化后的值变成小于等于它的数的个数,然后就可以用bitset记录出现次数了。 具体的操作就是,假如一个数…

还有程序员不会玩黑神话悟空?是我太菜了

我承认是我天真了,本来计划周二晚上公开直播新项目教学的,但是发现黑神话悟空这游戏的热度火的有点过头了啊!所以临时决定把新项目直播移到周四晚上 8 点。直播打游戏!大家好,我是程序员鱼皮。我承认是我天真了,本来计划周二晚上公开直播新项目教学的,但是发现黑神话悟空…

Git GUI与命令全能操作,转载

Git 命令基本操作 Git GUI全能基本操作 看 https://blog.csdn.net/chehec2010/article/details/89950964gui 目录 1、版本库初始化 gitpractise文件夹就变成了Git可以管理的仓库,目录下多了一个.git文件夹,此目录是Git用于管理版本库的,不要擅自改动里面的文件,这样会破坏…

spring boot简单运用ollama大模型(windows版本)

1、下载模型(windows为例)打开官方网站https://ollama.com/download/windows。打开exe文件,打开命令行工具,直接运行ollama run 要下载的模型(右上角的models能找到你想要的,例子以llama3.1展示,spring ai暂时非全支持,支持模型步骤2列出)运行完后直接是这样显示至此,…

048、Vue3+TypeScript基础,页面通讯之子页面调用父页面的事件

01、main.js代码如下:// 引入createApp用于创建Vue实例 import {createApp} from vue // 引入App.vue根组件 import App from ./App.vueconst app = createApp(App);// App.vue的根元素id为app app.mount(#app)02、App.vue代码如下:<template><div class="app&…

YOLOv5实战记录 Gradio搭建Web GUI

转自:https://blog.csdn.net/EmileJiao/article/details/137448176最终的:import torch import gradio as grmodel=torch.hub.load("./","custom",path="runs/train/exp2/weights/best.pt",source="local")title="基于Gradio的YO…

火山引擎VeDI实验平台助推企业量化决策能力升级

DataTester技术团队基于并行化的Leiden算法,快速处理亿级用户的复杂社交网络,完成基于社交圈的聚类分流。 更多技术交流、求职机会,欢迎关注字节跳动数据平台微信公众号,回复【1】进入官方交流群 量化决策,正成为企业在数智化浪潮中掌握方向的必备之舵。通过“拍脑袋”式的…

基础组件:文本及样式

一、Text Text 用于显示简单样式文本,它包含一些控制文本显示样式的一些属性,一个简单的例子如下: Text("Hello world",textAlign: TextAlign.left, );Text("Hello world! Im Jack. "*4,maxLines: 1,overflow: TextOverflow.ellipsis, );Text("Hel…