Vue前端练习

news2024/10/6 16:02:52

此练习项目只涉及前端,主要是vue和ElementUI框架的使用。(ElementUI官网:Element - The world's most popular Vue UI framework)

一、环境准备

  1. 安装idea

  2. 安装Node.js 一键式安装(不需要做任何配置) npm -v(也可用node多版本管理工具nvm进行管理和下载)

  3. 修改npm镜像源 npm config set registry https://registry.npmmirror.com

  4. 获取镜像源地址 npm config get registry

  5. 安装VUE Cli脚手架 npm install -g @vue/cli

  6. 验证Vue Cli安装是否成功 vue -V

     7.创建Vue Cli工程项目

        创建一个Vue-Workspace文件夹,用来存放vue项目。在此文件内,打开命令行。

      使用 vue create 命令即可创建VUE CLI工程,命令格式是:

vue create 工程名称

配置工作及如何在idea中打开,请参考以下教程 :

Vue-Cli(脚手架)安装及如何创建Vue-Cli项目-保姆级别教程,手把手教会你-CSDN博客

      8.工程结构

      8.1 App.vue:此vue文件是访问工程根路径时自动显示的组件(* .vue)

      8.2 views文件夹:以后开发的所有的页面(*.vue)基本上都是保存在此文件夹下

      8.3 router/index.js:路由配置文件,在里面配置客户端请求xxx地址时由xxx.vue页面显示

      8.4 main.js:工程的主JS文件,引入各个框架的代码写在此文件下

      8.5 package.json:修改端口号,修改框架版本在此配置文件中操作

      8.6 public文件夹:图片资源文件保存在此文件夹下

     9.引入ElementUI框架

       9.1终止vue启动,并执行npm install --save element-ui

       9.2在main.js中引入

             import ElementUI from 'element-ui';

             import 'element-ui/lib/theme-chalk/index.css';

             Vue.use(ElementUI);

main.js代码:

import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

二、具体实现及代码

项目结构如下:

index.js

import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    children:[
      {
        path: '/reg',
        component: ()=>import('../views/RegView.vue')
      },
      {
        path: '/login',
        component: ()=>import('../views/LoginView.vue')
      },
      {
        path: '/index',
        component: ()=>import('../views/IndexView.vue')
      },
      {
        path: '/detail',
        component: ()=>import('../views/DetailView.vue')
      }
    ]
  }

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router

App.vue

<template>
    <div id="app">
        <router-view/>
    </div>
</template>

<style>
body {
    background-color: rgb(241, 242, 243);
}

</style>

HomeView.vue

<template>
    <div class="home">
        <el-container>
            <!--页面头部-->
            <el-header height="80px" style="background-color: white">
                <div style="width: 1200px;margin: 0 auto">
                    <el-row :gutter="20">
                        <el-col :span="6">
                            <img src="/imgs/icon.png" width="200">
                        </el-col>
                        <el-col :span="10">
                            <el-menu mode="horizontal" active-text-color="orange">
                                <el-menu-item index="1">首页</el-menu-item>
                                <el-menu-item index="2">食谱</el-menu-item>
                                <el-menu-item index="3">视频</el-menu-item>
                                <el-menu-item index="4">资讯</el-menu-item>
                            </el-menu>
                            <div class="line"></div>
                        </el-col>
                        <el-col :span="6">
                            <el-input placeholder="请输入搜索的关键字" style="position: relative;top: 20px">
                                <el-button slot="append" icon="el-icon-search"></el-button>
                            </el-input>
                        </el-col>
                        <el-col :span="2">
                            <el-popover
                                    placement="top-start"
                                    title="欢迎来到烘焙坊!"
                                    width="200"
                                    trigger="hover">
                                <i slot="reference" class="el-icon-user"
                                   style="font-size: 30px;position: relative;top: 20px"></i>
                                <el-button type="info" @click="reg()">注册</el-button>
                                <el-button type="warning" @click="login()">登录</el-button>
                            </el-popover>
                        </el-col>
                    </el-row>
                </div>
            </el-header>
            <el-main id="el-main">
                <router-view/>
            </el-main>
            <!--页面页脚-->
            <el-footer style="height:280px;background-color: black;padding: 50px">
                <div style="width: 1200px;color:#666;text-align:center;margin: 0 auto">
                    <el-row>
                        <el-col :span="8">
                            <img src="/imgs/icon.png" width="200">
                            <p>教程灵感就看烘焙坊</p>
                            <p>烘焙行业网络社区平台</p>
                            <p>全国百城上千个职位等你来</p>
                        </el-col>
                        <el-col :span="8">
                            <el-row id="footer_center">
                                <el-col :span="8">
                                    <h3>关于我们</h3>
                                    <p>烘焙学院</p>
                                    <p>烘焙食谱</p>
                                    <p>分类信息</p>
                                    <p>招聘信息</p>
                                    <p>社区交流</p>
                                </el-col>
                                <el-col :span="8">
                                    <h3>服务与支持</h3>
                                    <p>联系我们</p>
                                    <p>广告投放</p>
                                    <p>用户协议</p>
                                    <p>友情链接</p>
                                    <p>在线反馈</p>
                                    <p>我发投稿</p>
                                </el-col>
                                <el-col :span="8">
                                    <h3>底部导航</h3>
                                    <p>Archiver</p>
                                    <p>手机版</p>
                                    <p>小黑屋</p>
                                </el-col>
                            </el-row>
                        </el-col>
                        <el-col :span="8">
                            <p style="font-size: 60px;margin: 0"><span style="color: orange">烘焙</span>坊</p>
                            <p>烘焙行业网络社区平台</p>
                        </el-col>
                    </el-row>
                </div>
            </el-footer>
        </el-container>
    </div>
</template>

<script>

export default {
    name: 'HomeView',
    methods: {
        reg() {
            /*location.href='/reg'   /!*这种跳转方法是页面整体刷新,影响页面的加载速度*!/*/
            /*脚手架开发中使用这种跳转方式*/
            if (this.$route.path !== '/reg') {
                this.$router.push('/reg');
            }
        },
        login() {
            /*location.href='/login'*/
            if (this.$route.path !== '/login') {
                this.$router.push('/login');
            }
        }
    },
}
</script>

<style>
#footer_center p {
    margin: 0;
}

#footer_center h3 {
    color: white;
}

#el-main {
    margin: 0;
    padding: 0;
}
</style>

IndexView.vue

<template>
    <div style="width: 1200px;margin: 10px auto">
        <!-- 轮播图 -->
        <el-carousel height="350px">
            <el-carousel-item>
                <img src="/imgs/banner1.jpg">
            </el-carousel-item>
            <el-carousel-item>
                <img src="/imgs/banner2.jpg">
            </el-carousel-item>
            <el-carousel-item>
                <img src="/imgs/banner3.jpg">
            </el-carousel-item>
        </el-carousel>

        <!-- 烘焙食谱导航条-->
        <el-row style="background-color: white">
            <el-col :span="3">
                <p style="font-size: 28px;margin: 15px">烘焙食谱</p>
            </el-col>
            <el-col :span="21">
                <el-menu mode="horizontal" active-text-color="orange" default-active="1">
                    <el-menu-item index="1">
                        全部
                    </el-menu-item>
                    <el-menu-item index="2">
                        面包
                    </el-menu-item>
                    <el-menu-item index="3">
                        零食
                    </el-menu-item>
                    <el-menu-item index="4">
                        家常菜
                    </el-menu-item>
                </el-menu>
            </el-col>
        </el-row>

        <!--烘焙食谱列表-->
        <el-row :gutter="20">
            <el-col :span="6" v-for="item in recipeArr" style="margin: 10px 0">
                <el-card>
                    <a href="javascript:void(0)">
                        <img :src="item.imgUrl" width="100%" height="145">
                        <p style="height: 40px;">{{ item.title }}</p>
                    </a>
                    <el-row>
                        <el-col :span="4">
                            <el-avatar :src="item.userImgUrl" size="small"></el-avatar>
                        </el-col>
                        <el-col :span="10">
                            {{ item.nickName }}
                        </el-col>
                        <el-col :span="10">
                            <span style="float: right;font-size: 12px;color: #666">{{ item.categoryName }}</span>
                        </el-col>
                    </el-row>
                </el-card>
            </el-col>
        </el-row>

        <!--点击加载更多-->
        <div style="text-align: center">
            <el-button>点击加载更多</el-button>
        </div>

        <!-- 烘焙视频导航条-->
        <el-row style="background-color: white">
            <el-col :span="3">
                <p style="font-size: 28px;margin: 15px">烘焙视频</p>
            </el-col>
            <el-col :span="21">
                <el-menu mode="horizontal" active-text-color="orange" default-active="1">
                    <el-menu-item index="1">
                        面包教学
                    </el-menu-item>
                    <el-menu-item index="2">
                        零食鉴赏
                    </el-menu-item>
                    <el-menu-item index="3">
                        家常菜教程
                    </el-menu-item>
                </el-menu>
            </el-col>
        </el-row>

        <!--烘焙视频列表-->
        <el-row :gutter="20">
            <el-col :span="6" v-for="item in recipeArr" style="margin: 10px 0">
                <el-card>
                    <a href="javascript:void(0)">
                        <img :src="item.imgUrl" width="100%" height="145">
                        <p style="height: 40px;">{{ item.title }}</p>
                    </a>
                    <el-row>
                        <el-col :span="4">
                            <el-avatar :src="item.userImgUrl" size="small"></el-avatar>
                        </el-col>
                        <el-col :span="10">
                            {{ item.nickName }}
                        </el-col>
                        <el-col :span="10">
                            <span style="float: right;font-size: 12px;color: #666">{{ item.categoryName }}</span>
                        </el-col>
                    </el-row>
                </el-card>
            </el-col>
        </el-row>

        <!--点击加载更多-->
        <div style="text-align: center">
            <el-button>点击加载更多视频</el-button>
        </div>

        <!-- 行业资讯导航条-->
        <el-row style="background-color: white">
            <el-col :span="3">
                <p style="font-size: 28px;margin: 15px">行业资讯</p>
            </el-col>
            <el-col :span="21">
                <el-menu mode="horizontal" active-text-color="orange" default-active="1">
                    <el-menu-item index="1">
                        全部
                    </el-menu-item>
                    <el-menu-item index="2">
                        美食资讯
                    </el-menu-item>
                    <el-menu-item index="3">
                        店家资讯
                    </el-menu-item>
                </el-menu>
            </el-col>
        </el-row>

        <!--行业资讯列表-->
        <el-row :gutter="20">
            <el-col :span="6" v-for="item in recipeArr" style="margin: 10px 0">
                <el-card>
                    <a href="javascript:void(0)">
                        <img :src="item.imgUrl" width="100%" height="145">
                        <p style="height: 40px;">{{ item.title }}</p>
                    </a>
                    <el-row>
                        <el-col :span="4">
                            <el-avatar :src="item.userImgUrl" size="small"></el-avatar>
                        </el-col>
                        <el-col :span="10">
                            {{ item.nickName }}
                        </el-col>
                        <el-col :span="10">
                            <span style="float: right;font-size: 12px;color: #666">{{ item.categoryName }}</span>
                        </el-col>
                    </el-row>
                </el-card>
            </el-col>
        </el-row>

        <!--点击加载更多-->
        <div style="text-align: center">
            <el-button>点击加载更多资讯</el-button>
        </div>



    </div>
</template>

<script>
export default {
    name: "IndexView",
    data() {
        return {
            recipeArr: [
                {
                    "id": 27,
                    "title": "家常面包",
                    "imgUrl": "imgs/a.jpg",
                    "categoryName": "面包",
                    "nickName": "汤姆",
                    "userImgUrl": "imgs/head.jpg"
                },
                {
                    "id": 18,
                    "title": "爆浆抹茶甜甜圈面包,自带幸福感的小甜甜",
                    "imgUrl": "imgs/b.jpg",
                    "categoryName": "家常菜",
                    "nickName": "汤姆",
                    "userImgUrl": "imgs/head.jpg"
                },
                {
                    "id": 17,
                    "title": "心形火龙果椰蓉面包,任谁都抗拒不了",
                    "imgUrl": "imgs/c.jpg",
                    "categoryName": "小食",
                    "nickName": "汤姆",
                    "userImgUrl": "imgs/head.jpg"
                },
                {
                    "id": 16,
                    "title": "蔓越莓绿豆糕,味道还不错值得一试!",
                    "imgUrl": "imgs/d.jpg",
                    "categoryName": "面包",
                    "nickName": "汤姆",
                    "userImgUrl": "imgs/head.jpg"
                },
            ]
        }
    }
}
</script>

<style scoped>
a {
    text-decoration: none;
    color: #11192d;
}

</style>

LoginView.vue

<template>
    <div id="main_div">
        <el-card style="width: 500px;height: 300px;margin: 50px auto">
            <el-form label-width="80px" style="margin-top: 50px;width: 430px">
                <el-form-item label="用户名">
                    <el-input placeholder="请输入用户名" v-model="user.username"></el-input>
                </el-form-item>
                <el-form-item label="密码">
                    <el-input type="password" placeholder="请输入密码" v-model="user.password"></el-input>
                </el-form-item>

                <el-form-item style="text-align: center;">
                    <el-button type="primary" style="position: relative;right: 30px">登录</el-button>
                </el-form-item>
            </el-form>
        </el-card>
    </div>
</template>

<script>
export default {
    name: "LoginView",
    data() {
        return {
            user: {
                username: "",
                password: ""
            }
        };
    }
}
</script>

<style scoped>

#main_div {
    height: 500px;
    background-image: url('/public/imgs/loginbg.gif');
    background-position: center; /*设置背景图居中*/
    background-size: cover; /*设置为封面*/
    overflow: hidden; /*解决粘连问题*/
}

</style>

RegView.vue

<template>
    <div style="width: 1200px;margin: 20px auto">
        <el-row :gutter="20">
            <el-col :span="12">
                <el-card>
                    <img src="/imgs/reg.png" width="100%">
                </el-card>
            </el-col>
            <el-col :span="12">
                <el-form  label-width="80px" style="margin-top: 50px">
                    <el-form-item>
                        <h1 style="font-size: 25px">立即注册 <a href="/login"
                                        style="font-size: 15px;color:#0aa1ed;text-decoration:none;float: right">已有账号?现在登录</a>
                        </h1>
                    </el-form-item>

                    <el-form-item label="用户名">
                        <el-input placeholder="请输入用户名"></el-input>
                    </el-form-item>
                    <el-form-item label="密码">
                        <el-input type="password" placeholder="请输入密码"></el-input>
                    </el-form-item>
                    <el-form-item label="昵称">
                        <el-input placeholder="请输入昵称"></el-input>
                    </el-form-item>

                    <el-form-item style="text-align: center;">
                        <el-button type="primary">注册</el-button>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>
    </div>
</template>

<script>
export default {
    name: "RegView"
}
</script>

<style scoped>

</style>

DetailView.vue

<template>
    <el-row gutter="20">
        <el-col span="18">
            <el-card>
                <h2 style="color: orange;text-align: center">
                    枣泥花式面包,好吃到爆!
                </h2>
                <p style="font-size: 12px;color: #666;text-align: center">
                    作者:汤姆 | 发布时间:2023/5/26 11:12:30 | 阅读次数:1
                </p>
                <el-divider></el-divider>
                <el-card style="font-size: 12px">
                    <b style="color: #409EFF">摘要:</b>
                    之前做了枣泥馅,配上花式面包,好吃到爆。 枣泥花式面包的用料 肉松面包面团
                </el-card>
                <p style="height: 500px">文章内容</p>

            </el-card>
            <!--评论相关开始-->
            <el-card>
                <p>发一条友善的评论</p>
                <el-divider></el-divider>
                <el-row gutter="20">
                    <el-col span="20">
                        <el-input type="textarea" placeholder="说点儿啥..."></el-input>
                    </el-col>
                    <el-col span="2">
                        <el-button>发布</el-button>
                    </el-col>
                </el-row>
                <!--评论列表开始-->
                <el-row style="margin: 5px 0">
                    <el-col span="2">
                        <el-avatar src="imgs/head.jpg"></el-avatar>
                    </el-col>
                    <el-col span="20">
                        <span style="color: orange;font-weight: bold">汤姆:</span>
                        <p style="margin:5px 0">开起来很好吃!</p>
                        <span style="color: #666;font-size: 12px">2023/5/26 15:52:30</span>
                    </el-col>
                </el-row>
                <el-row style="margin: 5px 0">
                    <el-col span="2">
                        <el-avatar src="imgs/head.jpg"></el-avatar>
                    </el-col>
                    <el-col span="20">
                        <span style="color: orange;font-weight: bold">汤姆:</span>
                        <p style="margin:5px 0">开起来很好吃!</p>
                        <span style="color: #666;font-size: 12px">2023/5/26 15:52:30</span>
                    </el-col>
                </el-row>
                <el-row style="margin: 5px 0">
                    <el-col span="2">
                        <el-avatar src="imgs/head.jpg"></el-avatar>
                    </el-col>
                    <el-col span="20">
                        <span style="color: orange;font-weight: bold">汤姆:</span>
                        <p style="margin:5px 0">开起来很好吃!</p>
                        <span style="color: #666;font-size: 12px">2023/5/26 15:52:30</span>
                    </el-col>
                </el-row>
                <!--评论列表结束-->
            </el-card>
            <!--评论相关结束-->

        </el-col>
        <el-col span="6">
            <el-card class="right-card" style="height: 240px;text-align: center;">
                <div style="background-image: url('/imgs/avarbg.jpg');
                                    height: 90px"></div>
                <div style="position: relative;top: -45px">
                    <img src="imgs/head.jpg"
                         style="border-radius: 90px;border: 5px solid white;
                                        width: 90px;height: 90px">
                    <p style="font-size: 20px;margin: 0;
                                      font-weight: bold">汤姆</p>
                    <i class="el-icon-edit">本文作者</i><br>
                    <i class="el-icon-time">2023/5/26 16:43:30</i>
                </div>

            </el-card>
            <!--作者其它文章开始-->
            <el-card style="margin:10px 0">
                <h3>作者其它文章</h3>
                <el-divider></el-divider>
                <!--文章列表开始-->
                <el-row gutter="10" v-for="item in 4">
                    <el-col span="10">
                        <img src="imgs/a.jpg" width="100%" height="70px">
                    </el-col>
                    <el-col span="14">
                        <p style="margin: 0;height: 50px">枣泥面包好吃到爆!</p>
                        <i class="el-icon-time" style="color: #666">2023/6/30</i>
                    </el-col>
                </el-row>
                <!--文章列表结束-->
            </el-card>

            <!--作者其它文章结束-->
            <!--热门文章开始-->
            <el-card style="margin:10px 0">
                <h3>热门文章</h3>
                <el-divider></el-divider>
                <!--文章列表开始-->
                <el-row gutter="10" v-for="item in 4">
                    <el-col span="10">
                        <img src="imgs/a.jpg" width="100%" height="70px">
                    </el-col>
                    <el-col span="14">
                        <p style="margin: 0;height: 50px">枣泥面包好吃到爆!</p>
                        <i class="el-icon-time" style="color: #666">2023/6/30</i>
                    </el-col>
                </el-row>
                <!--文章列表结束-->
            </el-card>

            <!--热门文章结束-->
        </el-col>
    </el-row>

</template>

<script>
export default {
    name: "DetailView"
}
</script>

<style scoped>

</style>

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

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

封装stater时配置导入配置类提示功能

提示功能如下 使用注解导入配置属性时添加依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-configuration-processor</artifactId><optional>true</optional></dependency>

前端初学java二(类、多态、接口、内部类、泛型)

目录 类 种类 Javabean类 测试类 工具类 类的初始化 构照函数 新建对象的内存图 static 继承 This Super 虚方法表 Override 修饰符权限 构造代码块 静态代码块 多态 前提 优点 缺点 示例 抽象方法 抽象类 接口 implements 继承 内部类 成员内部类…

windows@无密码的本地用户账户相关问题@仅用用户名免密登录远程桌面登录和控制@无密码用户访问共享文件夹以及挂载问题

文章目录 abstract此用户无法登录账户被禁用问题访问共享文件夹时带上凭据错误案例和解决 两类登录方式控制台登录与远程登录的区别为什么限制空密码账户只允许控制台登录相关安全策略如何修改该策略注意事项 启用允许被免密登录功能使用空密码进行远程桌面连接设置远程桌面链接…

巴图制自动化Profinet协议转Modbus协议模块连接PLC和电表通信

1、免编写Modbus轮询程序实现PLC与电表通信的方法 在智能化时代&#xff0c;工业自动控制中的PLC和电表之间的通信是一个常见的需求。传统上&#xff0c;为了使PLC与电表通信&#xff0c;通常需要编写Modbus查询程序来读取和控制数据。然而&#xff0c;使用 巴图制自动化Prof…

Vue项目打包上线

Nginx 是一个高性能的开源HTTP和反向代理服务器&#xff0c;也是一个IMAP/POP3/SMTP代理服务器。它在设计上旨在处理高并发的请求&#xff0c;是一个轻量级、高效能的Web服务器和反向代理服务器&#xff0c;广泛用于提供静态资源、负载均衡、反向代理等功能。 1、下载nginx 2、…

创建kobject

1、kobject介绍 kobject的全称是kernel object&#xff0c;即内核对象。每一个kobject都会对应系统/sys/下的一个目录。 2、相关结构体和api介绍 2.1 struct kobject // include/linux/kobject.h 2.2 kobject_create_and_add kobject_create_and_addkobject_createkobj…

卷积层里的填充和步幅

一、定义 1、对于卷积&#xff0c;我们另一个超参数是核的大小&#xff0c;通常使用的卷积核是33或者55&#xff0c;很少用偶数核 2、填充是为了让输出不变或者变大&#xff0c;是为了在输入不太大&#xff0c;又能使模型足够深的情况下使用 3、填充&#xff1a;在输入周围添…

Vite: 插件流水线之核心编译能力

概述 Vite 在开发阶段实现了一个按需加载的服务器&#xff0c;每一个文件请求进来都会经历一系列的编译流程&#xff0c;然后 Vite 会将编译结果响应给浏览器。在生产环境下&#xff0c;Vite 同样会执行一系列编译过程&#xff0c;将编译结果交给 Rollup 进行模块打包这一系列…

【Docker安装】OpenEuler系统下部署Docker环境

【Docker安装】OpenEuler系统下部署Docker环境 前言一、本次实践介绍1.1 本次实践规划1.2 本次实践简介二、检查本地环境2.1 检查操作系统版本2.2 检查内核版本2.3 检查yum仓库三、卸载Docker四、部署Docker环境4.1 配置yum仓库4.2 检查可用yum仓库4.3 安装Docker4.4 检查Docke…

Pointnet++改进即插即用系列:全网首发GLSA聚合和表示全局和局部空间特征|即插即用,提升特征提取模块性能

简介:1.该教程提供大量的首发改进的方式,降低上手难度,多种结构改进,助力寻找创新点!2.本篇文章对Pointnet++特征提取模块进行改进,加入GLSA,提升性能。3.专栏持续更新,紧随最新的研究内容。 目录 1.理论介绍 2.修改步骤 2.1 步骤一 2.2 步骤二 2.3 步骤三 1.理论介…

运维锅总浅析云原生DevOps工具

本文从Tekton与Kubevela、Jenkins、GitLab CI的区别与联系对常见的云原生DevOps工具进行对比分析&#xff0c;最后给出DevOps工具选型思路。希望对您有所帮助&#xff01; 一、DevOps简介 DevOps是一种结合了软件开发&#xff08;Development&#xff09;和IT运维&#xff08…

CesiumJS【Basic】- #057 绘制纹理填充多边形(Primitive方式)

文章目录 绘制纹理填充多边形(Primitive方式)1 目标2 代码2.1 main.ts绘制纹理填充多边形(Primitive方式) 1 目标 使用Primitive方式绘制绘制纹理填充多边形 2 代码 2.1 main.ts import * as Cesium from cesium;const viewer = new Cesium.Viewer

普元EOS学习笔记-低开实现图书的增删改查

前言 在前一篇《普元EOS学习笔记-创建精简应用》中&#xff0c;我已经创建了EOS精简应用。 我之前说过&#xff0c;EOS精简应用就是自己创建的EOS精简版&#xff0c;该项目中&#xff0c;开发者可以进行低代码开发&#xff0c;也可以进行高代码开发。 本文我就记录一下自己在…

Halcon支持向量机

一 支持向量机 1 支持向量机介绍&#xff1a; 支持向量机(Support Vector Machine&#xff0c;SVM)是Corinna Cortes和Vapnik于1995年首先提出的&#xff0c;它在解决小样本、非线性及高维模式识别表现出许多特有的优势。 2 支持向量机原理: 在n维空间中找到一个分类超平面…

配置Uptime Kuma固定前缀

在做ICT集成项目时&#xff0c;遇到需要对现网接口进行拨测的需求。搜索后尝试使用开源的Uptime Kuma组件完成现网接口拨测。 但该项目有个问题就是默认不支持配置固定前缀&#xff0c;这对现网进行请求转发会造成较大的影响。通过查看该项目的github后找到了问题的解决方案。S…

【C语言】指针经典例题

题1&#xff1a; #include <stdio.h>int main() {int a[5] { 1, 2, 3, 4, 5 };int* ptr (int*)(&a 1);printf("%d,%d", *(a 1), *(ptr - 1));return 0; } //程序的结果是什么&#xff1f; 解答如下&#xff1a; 题2&#xff1a; #include <std…

echarts-wordcloud:打造个性化词云库

前言 在当今信息爆炸的时代&#xff0c;如何从海量的文本数据中提取有用的信息成为了一项重要的任务。词云作为一种直观、易于理解的数据可视化方式&#xff0c;被广泛应用于文本分析和可视化领域。本文将介绍一种基于 echarts-wordcloud 实现的词云库&#xff0c;通过其丰富的…

嵌入式C语言中指针与链表的关系详解

假定给你一块非常小的内存,这块内存只有8字节,这里也没有高级语言,没有操作系统,你操作的数据单位是单个字节,你该怎样读写这块内存呢? 注意这里的限定,再读一遍,没有高级语言,没有操作系统,在这样的限制之下,你必须直面内存读写的本质。 这个本质是什么呢? 本质…

Java同步包装器

通过 Collections.synchronizedList() 方法将一个普通的 ArrayList 包装成了线程安全的 List&#xff1a; import java.util.*;public class SynchronizedWrapperExample {public static void main(String[] args) {// 创建一个非线程安全的 ArrayListList<String> list…

Redis理解【精细】【快速上手】

目录 1. 了解3V和3高 2.什么是redis 3. redis可以做什么 4. Windows安装 5. 使用redis客户端操作redis 5.1 redis基本命令 5.1.1 切换数据库 5.1.2 查看当前数据库的大小 5.1.3 查看当前数据库所有的key ​​​​​​​ 5.1.4 清空当前数据库所有key 5.1.5 清空所…