Element Ul快速入门

【Element UI详细介绍】 Element UI 是一个基于 Vue 2.0 的桌面端组件库,主要用于构建快速、简洁的用户界面,Element UI 提供一套丰富的组件和工具,能够帮助开发者快速构建高质量的 Vue 应用,它由饿了么前端团队开发,并且开放源代码。提供的组件具有统一的风格和用法,使得开发者能够快速上手并构建页面。,在生产环境中使用时,务必要测试所有的用例,并关注官方的更新和通知。:虽然是为桌面端优化的,但是许多组件在响应式布局上表现良好。有着详尽的文档和活跃的社区,可以方便地解答开发中的问题。 阅读详情

Element Ul快速入门


Element Ul是基于Vue的一套桌面端组件库,提前封装好的Ul模板,方便开发者快速搭建一个网站前端界面

官网:https://element.eleme.cn/

1.Element Ul安装


在插件中,点击添加插件 搜索element

安装成功,界面如下所示

如果安装成功,会看到如下界面

2.Icon图标的使用


<i class="el-icon-edit"></i>

<i class="el-icon-delete"></i>

<i class="el-icon-phone"></i>

3.Button按钮


是Element Ul 提供的一组常用的操作按钮组件,直接使用封装好的el-button,比如

<el-button>按钮</el-button>

基于el-button,按钮,可以使用type、plain、round、circle属性对按钮进行修饰。

type:设置按钮的样式

<el-button>默认按钮</el-button>

<el-button type="primary">主要按钮</el-button>

<el-button type="success">成功按钮</el-button>

<el-button type="info">信息按钮</el-button>

<el-button type="warning">警告按钮</el-button>

<el-button type="danger">危险按钮</el-button>

plain 可以减弱按钮的背景颜色效果

<el-button type="primary" plain>主要按钮</el-button>

round 可以给按钮设置圆角

<el-button type="primary" round>主要按钮</el-button>

circle 将按钮设置为圆形

<el-button type="primary" icon="el-icon-edit" circle></el-button>

disabled设置按钮的可以状态

<el-button type="primary" icon="el-icon-edit " circle disabled></el-button>

loading属性可以给按钮设置"加载中"的效果

<template>

<div>

<el-button type="primary" icon="el-icon-edit " circle @click="test()" :loading=loading></el-button>

</div>

</template>

<script>

export default {

name: "test",

methods:{

test(){

// alert("11111");

this.loading = true;

setTimeout(()=>{

this.loading = false;

},3000)

}

},

data(){

return{

loading:false

}

}

}

</script>

​

<style scoped>

​

</style>

size属性可以设置按钮的大小,medium,small,mini

<el-button type="primary" size="medium">主要按钮</el-button>

4.Link超链接


文字超链接,使用 el-link标签来实现

<el-link href="https://www.baidu.com" target="_blank">baidu</el-link>

target="_blank 可以让页面在新的窗口打开

disabled 设置超链接不可用

underline设置下划线

:underline="false" 来去掉超链接的下划线

icon给文字超链接设置图标

<el-linkhref="https://www.baidu.com"icon="el-icon-phone-outline":underline="false" target="_blank">baidu</el-link>

5.Radio单选框


使用el-radio标签即可,通过v-model进行对象数据的绑定,label表示该单选框的值,文本直接写入到标签内部即可

<template>

<el-radiov-model="radio"label="1">选项1</el-radio>

<el-radiov-model="radio"label="2">选项2</el-radio>

</template>

​

<script>

exportdefault {

data () {

return {

radio: '1'

};

}

}

</script>

change绑定切换事件

<el-radio v-model="radio" label="2" @change="change">选项1</el-radio>

<el-radio v-model="radio" label="2" @change="change">选项2</el-radio>

methods:{

change(){

console.log('当前radio的值: '+this.radio);

}

}

6.Checkbox多选框的使用


<template>

<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox>

<div style="margin: 15px 0;"></div>

<el-checkbox-group v-model="checkedCities" @change="handleCheckedCitiesChange">

<el-checkbox v-for="city in cities" :label="city" :key="city">{{city}}</el-checkbox>

</el-checkbox-group>

</template>

<script>

const cityOptions = ['上海', '北京', '广州', '深圳'];

export default {

data() {

return {

checkAll: false,

checkedCities: ['上海', '北京'],

cities: cityOptions,

isIndeterminate: true

};

},

methods: {

handleCheckAllChange(val) {

this.checkedCities = val ? cityOptions : [];

this.isIndeterminate = false;

},

handleCheckedCitiesChange(value) {

let checkedCount = value.length;

this.checkAll = checkedCount === this.cities.length;

this.isIndeterminate = checkedCount > 0 && checkedCount < this.cities.length;

}

}

};

</script>

7.input输入框


<el-input v-model="input" placeholder="请输入内容"></el-input>

<el-button type="success" @click="click">成功按钮</el-button>

methods:{

click(){

this.input="hello"

}

}

data(){

return{

input:''

}

}

通过size属性修改输入框的尺寸,large/medium / small / mini,size修改的是输入框的高度

<el-input v-model="input" size="mini" placeholder="请输入内容"></el-input>

修改宽度可以在外出嵌套一个div,通过修改div的宽度来实现输入框宽度的修改

<div style="width: 200px">

<el-input v-model="input" size="mini" placeholder="请输入内容"></el-input>

</div>

show-password 属性设置可以切换显示隐藏的密码框

通过 prefix-icon 和 suffix-icon 属性在 input 组件首部和尾部增加显示图标

<el-inputv-model="input"show-passwordprefix-icon="el-icon-phone"suffix-icon="el-icon-remove"placeholder="请输入内容"></el-input>

maxlength、minlength限制输入框的字符长度

show-word-limit //显示输入了几个字符,一共能输入几个字符

<el-inputv-model="input"maxlength="6"show-word-limit placeholder="请输入内容"></el-input>

8. Select下拉框


使用el-select/el-option 标签进行操作,v-model进行数据绑定,label进行文本的展示,value是当前选项的值

v-model的值为当前被选中的el-option的 value 属性值

disabled 表示禁止使用

change 下拉框进行修改之后会自动触发该事件(该事件加在el-select中)

​

<el-selectv-model="value"placeholder="请选择"@change="change1">

<el-option

v-for="item in options"

:key="item.value"

:label="item.label"

:value="item.value"

:disabled="item.disabled">

/el-option>

</el-select>

​

<script>

exportdefault {

methods:{

change1(){

console.log('当前选择的是:'+this.value)

}

}

data() {

return {

options: [{

value: '选项1',

label: '黄金糕',

disabled:true

}, {

value: '选项2',

label: '双皮奶'

}, {

value: '选项3',

label: '蚵仔煎',

disabled:true

}, {

value: '选项4',

label: '龙须面'

}, {

value: '选项5',

label: '北京烤鸭'

}],

value: ''

}

}

}

</script>

9.Switch开关


switch组件表示两种相互对立状态之间的切换,开发,el-switch标签完成,v-model进行数据绑定,Boolean表示开/关的状态,active-color属性与inactive-color属性来设置开关的背景色。

active-text属性与inactive-text属性来设置开关的文字描述。

change事件进行开/关操作时触发该方法

<el-switch

v-model="value"

active-color="#13ce66"//打开的颜色

inactive-color="#ff4949"//关闭的颜色

active-text="按月付费"//设置打开的文本

inactive-text="按年付费"

@change="change1">

</el-switch>

<script>

exportdefault {

data() {

return {

value: true

}

},

methods:{

change1(){

console.log('当前开关的状态是:'+this.value)

},

};

</script>

10.Upload上传文件


10.1前端

使用el-upload组件完成,action属性为后端请求的接口

<el-upload

class="upload-demo"

drag

action="http://localhost:8082/excel/import"

multiple>

<i class="el-icon-upload"></i>

<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>

<div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过500kb</div>

</el-upload>

10.2后端

springboot +easyExcel完成Excel数据的解析

1.pom.xml导入easyExcel相关依赖

<dependency>

<groupId>com.alibaba</groupId>

<artifactId>easyexcel</artifactId>

<version>2.2.6</version>

</dependency>

2.创建一个类,用来映射Excel文件

ExcelVo

packagecom.example.upload.vo;

​

importcom.alibaba.excel.annotation.ExcelProperty;

importlombok.Data;

​

@Data

publicclassExcelVo {

@ExcelProperty("标号")

privateIntegerid;

@ExcelProperty("姓名")

privateStringname;

@ExcelProperty("性别")

privateStringgender;

@ExcelProperty("年龄")

privateStringage;

@ExcelProperty("班级")

privateStringclasses;

}

​

ExcelService

package com.example.upload.service;

import com.example.upload.vo.ExcelVo;

import java.io.InputStream;

import java.util.List;

public interface ExcelService {

public List<ExcelVo> list(InputStream inputStream);

}

ExcelServiceimpl

package com.example.upload.service.impl;

import com.alibaba.excel.EasyExcel;

import com.alibaba.excel.context.AnalysisContext;

import com.alibaba.excel.event.AnalysisEventListener;

import com.example.upload.service.ExcelService;

import com.example.upload.vo.ExcelVo;

import java.io.InputStream;

import java.util.ArrayList;

import java.util.List;

public class ExcelServiceimpl implements ExcelService {

@Override

public List<ExcelVo> list(InputStream inputStream) {

List<ExcelVo> list = new ArrayList<>();

EasyExcel.read(inputStream)

.head(ExcelVo.class)

.sheet()

.registerReadListener(new AnalysisEventListener<ExcelVo>() {

@Override

public void invoke(ExcelVo excelVo, AnalysisContext analysisContext) {

list.add(excelVo);

}

@Override

public void doAfterAllAnalysed(AnalysisContext analysisContext) {

System.out.println("数据解析完成");

}

}).doRead();

return list;

}

}

ExcelController

package com.example.upload.controller;

import com.example.upload.service.ExcelService;

import com.example.upload.vo.ExcelVo;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.PostMapping;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;

import org.springframework.web.bind.annotation.RestController;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

import java.util.List;

@RestController

@RequestMapping("/excel")

public class ExcelController {

@Autowired

private ExcelService excelService;

@PostMapping("/import")

public String importData(@RequestParam("file")MultipartFile file){

try {

List<ExcelVo> list = excelService.list(file.getInputStream());

for (ExcelVo excelVo:list){

System.out.println(excelVo);

}

} catch (IOException e) {

return "false";

}

return "success";

}

}

需要解决跨域问题

CorsConfig

package com.example.upload.config;

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.Configuration;

import org.springframework.web.servlet.config.annotation.CorsRegistry;

import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration

public class CorsConfig implements WebMvcConfigurer {

@Bean

public WebMvcConfigurer corsConfigurer() {

return new WebMvcConfigurer() {

@Override

public void addCorsMappings(CorsRegistry registry) {

registry.addMapping("/**")

.allowCredentials(false)

.allowedMethods("POST", "GET", "PUT", "OPTIONS", "DELETE")

.allowedOrigins("*");

}

};

}

}

示例:

11.Form表单


Form组件,每一个表单域由一个el-form-item组件构成的,表单域中可以放置各种类型的表单控件,input、select、CheckBox、radio、switch,表单域的的值直接跟Vue对象进行绑定

11.1基本使用

<el-formref="form":model="form"label-width="80px">

<el-form-itemlabel="活动名称">

<el-inputv-model="form.name"></el-input>

</el-form-item>

<el-form-itemlabel="活动区域">

<el-selectv-model="form.region"placeholder="请选择活动区域">

<el-optionlabel="区域一"value="shanghai"></el-option>

<el-optionlabel="区域二"value="beijing"></el-option>

</el-select>

</el-form-item>

<el-form-itemlabel="活动时间">

<el-col:span="11">

<el-date-pickertype="date"placeholder="选择日期"v-model="form.date1"style="width: 100%;"></el-date-picker>

</el-col>

<el-colclass="line":span="2">-</el-col>

<el-col:span="11">

<el-time-pickerplaceholder="选择时间"v-model="form.date2"style="width: 100%;"></el-time-picker>

</el-col>

</el-form-item>

<el-form-itemlabel="即时配送">

<el-switchv-model="form.delivery"></el-switch>

</el-form-item>

<el-form-itemlabel="活动性质">

<el-checkbox-groupv-model="form.type">

<el-checkboxlabel="美食/餐厅线上活动"name="type"></el-checkbox>

<el-checkboxlabel="地推活动"name="type"></el-checkbox>

<el-checkboxlabel="线下主题活动"name="type"></el-checkbox>

<el-checkboxlabel="单纯品牌曝光"name="type"></el-checkbox>

</el-checkbox-group>

</el-form-item>

<el-form-itemlabel="特殊资源">

<el-radio-groupv-model="form.resource">

<el-radiolabel="线上品牌商赞助"></el-radio>

<el-radiolabel="线下场地免费"></el-radio>

</el-radio-group>

</el-form-item>

<el-form-itemlabel="活动形式">

<el-inputtype="textarea"v-model="form.desc"></el-input>

</el-form-item>

<el-form-item>

<el-buttontype="primary"@click="onSubmit">立即创建</el-button>

<el-button>取消</el-button>

</el-form-item>

</el-form>

<script>

exportdefault {

data() {

return {

form: {

name: '',

region: '',

date1: '',

date2: '',

delivery: false,

type: [],

resource: '',

desc: ''

}

}

},

methods: {

onSubmit() {

console.log(this.form);

}

}

}

</script>

11.2数据效验

Form 组件提供了表单验证的功能,只需要通过 rules 属性传入约定的验证规则,并将 Form-Item 的 prop 属性设置为需校验的字段名即可。

<template>

<div>

​

<el-formref="form":model="form":rules="rules" label-width="80px">

<el-form-itemlabel="活动名称"prop="name">

<el-inputv-model="form.name"></el-input>

</el-form-item>

<el-form-itemlabel="活动区域" prop="region">

<el-selectv-model="form.region"placeholder="请选择活动区域">

<el-optionlabel="区域一"value="shanghai"></el-option>

<el-optionlabel="区域二"value="beijing"></el-option>

</el-select>

</el-form-item>

<el-form-itemlabel="活动时间">

<el-col:span="11">

<el-date-pickertype="date"placeholder="选择日期"v-model="form.date1"style="width: 100%;"></el-date-picker>

</el-col>

<el-colclass="line":span="2">-</el-col>

<el-col:span="11">

<el-time-pickerplaceholder="选择时间"v-model="form.date2"style="width: 100%;"></el-time-picker>

</el-col>

</el-form-item>

<el-form-item>

<el-buttontype="primary" @click="submitForm('form')">立即创建</el-button>

<el-button>取消</el-button>

</el-form-item>

</el-form>

</div>

​

</template>

​

<script>

​

exportdefault {

name: "test",

methods: {

submitForm(formName) {

this.$refs[formName].validate((valid) => {

if (valid) {

alert('submit!');

} else {

console.log('error submit!!');

returnfalse;

}

});

}

​

},

data() {

return {

form: {

name: '',

region: '',

date1: '',

date2: ''

},

rules: {

name: [

{ required: true, message: '请输入活动名称', trigger: 'blur' },

{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }

],

region: [

{ required: true, message: '请选择活动区域', trigger: 'change' }

],

date1: [

{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }

],

date2: [

{ type: 'date', required: true, message: '请选择时间', trigger: 'change' }

],

​

}

​

}

​

}

}

</script>

​

<stylescoped>

​

</style>

11.3自定义数据效验(邮箱效验)

邮箱效验的正则表达式

const mailReg = /^([a-zA-Z0-9-])+@([a-zA-Z0-9-])+(.[a-zA-Z0-9_-])+/

<template>

<divstyle="width: 500px">

​

<el-formref="form":model="form":rules="rules" label-width="80px">

<el-form-itemlabel="邮箱"prop="email">

<el-inputv-model="form.email"></el-input>

</el-form-item>

​

​

<el-form-item>

<el-buttontype="primary" @click="submitForm('form')">立即创建</el-button>

<el-button>取消</el-button>

</el-form-item>

</el-form>

</div>

​

</template>

​

<script>

​

exportdefault {

name: "test",

methods: {

submitForm(formName) {

this.$refs[formName].validate((valid) => {

if (valid) {

//alert('submit!');

alert(this.form.email)

} else {

//console.log('error submit!!');

alert("error submit")

returnfalse;

}

});

}

​

},

data() {

varcheckEmail= (rule,value,callback)=>{

//const mailReg = /^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$/

constmailReg=/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/

if (!value){

returncallback(newError('邮箱不能为空'))

}

setTimeout(()=>{

if (mailReg.test(value)){

callback()

}else{

callback(newError('请输入正确的邮箱格式'))

}

},100)

}

return {

form: {

email: '',

​

},

rules: {

email: [

{ required: true,validator:checkEmail , trigger: 'blur' },

​

]

​

}

​

}

​

}

}

</script>

​

<stylescoped>

​

</style>

11.4数字类型效验

数字类型的验证需要在 v-model 处加上 .number 的修饰符,这是 Vue 自身提供的用于将绑定值转化为 number 类型的修饰符。

<template>

<divstyle="width: 500px">

​

<el-formref="form":model="form":rules="rules" label-width="80px">

<el-form-itemlabel="年龄"prop="age"

:rules="[

{ required: true, message: '年龄不能为空', },

{ type:'number', message: '年龄必须为数字值', trigger: 'blur' }

]">

<el-inputv-model.number="form.age"></el-input>

</el-form-item>

​

<el-form-item>

<el-buttontype="primary" @click="submitForm('form')">立即创建</el-button>

<el-button>取消</el-button>

</el-form-item>

</el-form>

</div>

​

</template>

​

<script>

​

exportdefault {

name: "test",

methods: {

submitForm(formName) {

this.$refs[formName].validate((valid) => {

if (valid) {

alert(this.form.age)

} else {

alert("error submit")

returnfalse;

}

});

}

​

},

data() {

return {

form: {

age: '',

}

}

}

}

</script>

<stylescoped>

</style>

12.CRUD小案例


1.数据库

2.后端

1.在pom.xml添加mybatis plus相关依赖

<dependency>

<groupId>com.baomidou</groupId>

<artifactId>mybatis-plus-boot-starter</artifactId>

<version>3.4.3</version>

</dependency>

<dependency>

<groupId>com.baomidou</groupId>

<artifactId>mybatis-plus-generator</artifactId>

<version>3.3.2</version>

</dependency>

<dependency>

<groupId>org.apache.velocity</groupId>

<artifactId>velocity</artifactId>

<version>1.7</version>

</dependency>

2.application.properties

spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

spring.datasource.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai

spring.datasource.username=root

spring.datasource.password=123456

在启动类(Application)中指定mapper的位置

@MapperScan("com.example.upload.mapper")

3.LianxiController

packagecom.example.upload.controller;

​

​

importcom.example.upload.entity.Lianxi;

importcom.example.upload.service.LianxiService;

importorg.springframework.beans.factory.annotation.Autowired;

importorg.springframework.web.bind.annotation.*;

​

importorg.springframework.stereotype.Controller;

​

importjava.util.List;

​

/**

* <p>

* 前端控制器

* </p>

*

* @author southwind

* @since 2023-01-03

*/

@RestController

@RequestMapping("/lianxi")

publicclassLianxiController {

​

@Autowired

privateLianxiServicelianxiService;

​

@GetMapping("/list")

publicList<Lianxi>list(){

returnthis.lianxiService.list();

}

/*

一般来讲的话是以两种方式为主,分别为Post和Get,这两种方式都是向一个url传参,而Get方式体现到了地址栏里,Post方式则将内容放在了 body 里面。

@PathParam 和 @PathVariable 注解是用于从 request 中接收请求的,两个都可以接收参数,关键点不同的是@PathParam 是从 request 里面拿取值,

而 @PathVariable 是从一个url模板里面来填充(绑定 URL 占位符到功能处理方法的参数上,主要实现RESTFULL风格的请求),也就是从地址栏中取值(以键值对形式)。

@PathVariable

它是以“/”方式来获取参数值。

*/

@GetMapping("/findById/{id}")

publicLianxifindById(@PathVariable("id") Integerid){

returnthis.lianxiService.getById(id);

}

​

@DeleteMapping("/delete/{id}")

publicbooleandelete(@PathVariable("id") Integerid){

returnthis.lianxiService.removeById(id);

}

​

//RequestBody是把json格式字符串串 ,转换为java类型的

@PostMapping("/add")

publicbooleanadd(@RequestBodyLianxilianxi){

return this.lianxiService.save(lianxi);

}

​

@PutMapping("/update")

publicbooleanupdate(@RequestBodyLianxilianxi){

return this.lianxiService.updateById(lianxi);

}

}

​

​

3.前端

1.安装axios插件
2.首页数据加载

<template>

<el-table

:data="tableData"

border

style="width: 650px">

<el-table-column

fixed

prop="bookid"

label="编号"

width="130">

</el-table-column>

<el-table-column

prop="name"

label="书名"

width="170">

</el-table-column>

<el-table-column

prop="price"

label="价格"

width="120">

</el-table-column>

<el-table-column

fixed="right"

label="操作"

width="180">

<templateslot-scope="scope">

<el-button

size="mini"

@click="handleEdit(scope.$index, scope.row)">编辑</el-button>

<el-button

size="mini"

type="danger"

@click="handleDelete(scope.$index, scope.row)">删除</el-button>

</template>

</el-table-column>

</el-table>

</template>

​

<script>

exportdefault {

name: "Index",

created() {

let _this=this;

axios.get('http://localhost:9000/lianxi/list').then(function (resp) {

//alert(resp.data[0].name);

// console.log(resp.data)

_this.tableData=resp.data;

})

},

methods:{

handleClick(row) {

console.log(row);

}

},

data() {

return {

tableData: []

}

}

​

}

</script>

​

<stylescoped>

​

</style>

3.删除数据

<template>

<el-table

:data="tableData"

border

style="width: 650px">

<el-table-column

fixed

prop="bookid"

label="编号"

width="130">

</el-table-column>

<el-table-column

prop="name"

label="书名"

width="170">

</el-table-column>

<el-table-column

prop="price"

label="价格"

width="120">

</el-table-column>

<el-table-column

fixed="right"

label="操作"

width="180">

<templateslot-scope="scope">

<el-button

size="mini"

@click="handleEdit(scope.row)">编辑</el-button>

<!-- scope.row 指一行的数据-->

<el-button

size="mini"

type="danger"

@click="handleDelete(scope.row)">删除</el-button>

</template>

</el-table-column>

</el-table>

</template>

​

<script>

exportdefault {

name: "Index",

created() {

let _this=this;

axios.get('http://localhost:9000/lianxi/list').then(function (resp) {

//alert(resp.data[0].name);

// console.log(resp.data)

_this.tableData=resp.data;

})

},

methods:{

handleDelete(row) {

let _this=this;

//console.log(row.name);

this.$confirm('是否确定删除《'+row.name+'》?', '提示', {

confirmButtonText: '确定',

cancelButtonText: '取消',

type: 'warning'

}).then(() => {

axios.delete('http://localhost:9000/lianxi/delete/'+row.bookid).then(function (resp) {

if (resp.data){

_this.$alert('《'+row.name+'》 删除成功', '提示', {

confirmButtonText: '确定',

callback: action=> {

//重新加载一下页面

location.reload();

}

});

}

})

}).catch(() => {

/* this.$message({

type: 'info',

message: '已取消删除'

});*/

});

}

},

data() {

return {

tableData: []

}

}

​

}

</script>

​

<stylescoped>

​

</style>

4.修改数据

index.vue

<template>

<el-table

:data="tableData"

border

style="width: 650px">

<el-table-column

fixed

prop="bookid"

label="编号"

width="130">

</el-table-column>

<el-table-column

prop="name"

label="书名"

width="170">

</el-table-column>

<el-table-column

prop="price"

label="价格"

width="120">

</el-table-column>

<el-table-column

fixed="right"

label="操作"

width="180">

<templateslot-scope="scope">

<el-button

size="mini"

@click="handleEdit(scope.row)">编辑</el-button>

<!-- scope.row 指一行的数据-->

<el-button

size="mini"

type="danger"

@click="handleDelete(scope.row)">删除</el-button>

</template>

</el-table-column>

</el-table>

</template>

​

<script>

exportdefault {

name: "Index",

created() {

let _this=this;

axios.get('http://localhost:9000/lianxi/list').then(function (resp) {

//alert(resp.data[0].name);

// console.log(resp.data)

_this.tableData=resp.data;

})

},

methods:{

handleEdit(row){

//把id传给update页面

this.$router.push('/update?id='+row.bookid)

},

handleDelete(row) {

let _this=this;

//console.log(row.name);

this.$confirm('是否确定删除《'+row.name+'》?', '提示', {

confirmButtonText: '确定',

cancelButtonText: '取消',

type: 'warning'

}).then(() => {

axios.delete('http://localhost:9000/lianxi/delete/'+row.bookid).then(function (resp) {

if (resp.data){

_this.$alert('《'+row.name+'》 删除成功', '提示', {

confirmButtonText: '确定',

callback: action=> {

//重新加载一下页面

location.reload();

}

});

}

})

}).catch(() => {

/* this.$message({

type: 'info',

message: '已取消删除'

});*/

});

}

},

data() {

return {

tableData: []

}

}

​

}

</script>

<stylescoped>

</style>

update.vue

<template>

<el-formref="form":model="form":rules="rules" label-width="80px">

<el-form-itemlabel="编号"prop="bookid"

:rules="[

{ required: true, message: '编号不能为空', },

{ type:'number', message: '编号不能为数字' }

]">

<el-inputv-model.number="form.bookid"readonly></el-input>

</el-form-item>

<el-form-itemlabel="书名"prop="name">

<el-inputv-model="form.name"></el-input>

</el-form-item>

<el-form-itemlabel="价格"prop="price"

:rules="[

{ required: true, message: '价格不能为空', },

{ type:'number', message: '价格不能为数字' }

]">

<el-inputv-model.number="form.price"></el-input>

</el-form-item>

​

<el-form-item>

<el-buttontype="primary" @click="submitForm('form')">立即修改</el-button>

<el-button>取消</el-button>

</el-form-item>

</el-form>

</template>

​

<script>

exportdefault {

name: "Update",

created() {

let_this=this;

//this.$route.query.id可以用来接收点击编辑传过来的id

axios.get('http://localhost:9000/lianxi/findById/'+this.$route.query.id).then(function (resp){

// console.log(resp.data);

_this.form=resp.data;

})

},

data(){

return {

form: {

bookid: '',

name: '',

price: ''

​

},

rules: {

name: [

{ required: true,message:'请输入图书名称' , trigger: 'blur' },

{min:3,max:20,message: '长度在3 到20 个字符',trigger: 'blur' }

]

​

}

}

},

methods:{

submitForm(formName) {

let_this=this;

this.$refs[formName].validate((valid) => {

if (valid) {

//console.log(this.form);

axios.put('http://localhost:9000/lianxi/update',this.form).then(function (resp) {

if (resp.data){

_this.$alert('《'+_this.form.name+'》 修改成功', '提示', {

confirmButtonText: '确定',

callback: action=> {

_this.$router.push('/index')

}

});

}

})

} else {

alert("error submit")

returnfalse;

}

});

}

}

}

</script>

<stylescoped>

</style>

5.添加数据

<template>

<el-formref="form":model="form":rules="rules" label-width="80px">

<el-form-itemlabel="编号"prop="bookid"

:rules="[

{ required: true, message: '编号不能为空', },

{ type:'number', message: '编号不能为数字' }

]">

<el-inputv-model.number="form.bookid"></el-input>

</el-form-item>

<el-form-itemlabel="书名"prop="name">

<el-inputv-model="form.name"></el-input>

</el-form-item>

<el-form-itemlabel="价格"prop="price"

:rules="[

{ required: true, message: '价格不能为空', },

{ type:'number', message: '价格不能为数字' }

]">

<el-inputv-model.number="form.price"></el-input>

</el-form-item>

​

<el-form-item>

<el-buttontype="primary" @click="submitForm('form')">添加</el-button>

<el-button>取消</el-button>

</el-form-item>

</el-form>

</template>

​

<script>

exportdefault {

name: "Add",

data(){

return {

form: {

bookid: '',

name: '',

price: ''

​

},

rules: {

name: [

{ required: true,message:'请输入图书名称' , trigger: 'blur' },

{min:3,max:20,message: '长度在3 到20 个字符',trigger: 'blur' }

]

​

}

}

},

methods:{

submitForm(formName) {

let_this=this;

this.$refs[formName].validate((valid) => {

if (valid) {

//console.log(this.form);

axios.post('http://localhost:9000/lianxi/add',this.form).then(function (resp) {

if (resp.data){

_this.$alert('《'+_this.form.name+'》 添加成功', '提示', {

confirmButtonText: '确定',

callback: action=> {

_this.$router.push('/index')

}

});

}

})

} else {

alert("error submit")

returnfalse;

}

});

}

}

}

</script>

<stylescoped>

</style>

网站快速成型工具-Element UI Element UIElement UI1 什么是Element UI????2 搭建环境2.1 创建vue项目2.2 安装 element-ui组件2.3 Element UI 引入3 布局3.1 布局3.2 reset.css3.3 满屏填充4 导航条4.1 需求4.2 导航条4.3 路由4.4 页面刷新导航选中问题5 表格:查询列表5.1 测试页面5.2 基本表格5.3 表格修饰5.4 多选![在这里插入图片描述](https://img-blog.csdnimg.cn/87a16b32f4a447e 阅读详情

相关推荐

VUE远程下载功能,动态赋值路径URL(el-link的使用)

之前我们学过下载功能, 我们下载使用 <el-link :download="downloadname" :href="downloadUrl2" id="moban2" class="downloadBtn2" type="primary"> <el-button id="dibu_download" type="primary" @click="pullLog()" plain >拉取</el-button> </el-link>

测试领域专家,多领域测试技术、管理、工具都略懂,略懂一二 1万+

Element-Ul快速入门

* 修改主题颜色 */Element-UI 是一个功能强大、易于使用的Vue组件库,它可以帮助开发者快速构建出美观且功能丰富的Web应用。通过本篇快速入门指南,你应该已经掌握了Element-UI的基本使用方法,包括安装、引入、使用基础和高级组件,以及如何进行主题定制和国际化。随着你对Element-UI的深入使用,你会发现它的强大之处不仅在于丰富的组件,还在于它的灵活性和易扩展性。希望本文能够帮助你高效地使用Element-UI,构建出更加出色的Vue应用。

小透明的博客 1009

element -ul 日期选择器(日期格式化,默认值)

需求:实现如下效果 1.默认展示最近三个月, 2.不能选择今天之后的日期,即不能选未来的时间 3.带快捷选项,并且快捷选项的【全部时间】开始时间为某个指定的时间如(2010年8月1日) element-ul 可以很容易实现第二,第三条需求。但是默认数据那个,要自己写。还有选全部时间,从指定日期开始,也废了我一番功夫研究。 所以,最终将研究成果整理出来。方便下次遇到同样的问题能快速解决,提升个人的开发效率。也方便其他小伙伴有同样困惑,可以快速寻得解决方案。 解决过程及代码解析 涉及2个文件(

吴小花的博客 5136

Vue框架Element UI安装环境搭建

Element-Ul是饿了么前端团队推出的一款基于Vue.js 2.0 的桌面端UI框架,一套为开发者、设计师和产品经理准备的基于 Vue 2.0 的桌面端组件库,手机端有对应框架是Mint UI 。 中文文档:http://element-cn.eleme.io/#/zh-CN github地址:https://github.com/ElemeFE/element 1:安装node 端开发框架和环境都是需要 Node.js ,先安装node.js开发环境,vue的运行是要依赖于node的npm的管理工具

前端视听 1万+

Halcon: 获取仿射矩形-rectangle2的四个顶点、四条边的中点

Halcon 工业应用实用教程中的一个例子: * CenterY : 仿射矩形中心y * CenterX: 仿射矩形中心x * Phi: 仿射矩形角度 * Len1: 仿射矩形宽的一半 * Len2: 仿射矩形高的一半 * CornerY: 仿射矩形端点y * CornerX: 仿射矩形端点x * LineCenterY: 仿射矩形边中点y * LineCenterx: 仿射矩形边中点x * 矩...

ruotianxia的博客 8576

ECC椭圆曲线加解密原理详解(配图)

椭圆曲线加解密原理详解 本文主要参照:ECC椭圆曲线详解(有具体实例)[1] 前言: 椭圆曲线(ECC)加密原理跟RSA加解密原理比起来,可真是晦涩难懂。拜读了大神Kalafinaian文章“ECC椭圆曲线详解(有具体实例)”,终于看到了参透的曙光。 由于原文中有微小的瑕疵,也为了便于阅读起来更加流畅,我重新整理了一下这篇文章。 为什么使用椭圆曲线加密算法? RSA的解决分解整数问题需要亚指数...

Mark的博客 7万+

Element-Ul快速入门:打造美观实用的Web界面

本文将介绍Element-Ul的基本概念和用法,以及如何在项目中使用Element-Ul快速搭建Web界面。Element-Ul是一款基于Vue.js的UI组件库,具有丰富的组件和灵活的布局方式。了解Element-Ul的基本概念和用法对于开发者来说具有重要意义。掌握Element-Ul的使用可以帮助我们更高效地搭建美观实用的Web界面。

你若盛开,清风自来 1619

Codex 赋能UI自动化测试

✅ 零编码门槛:业务人员也能直接上手✅ 无需复杂配置:跳过部署陷阱,分钟级启用✅ 无权限风险:沙箱隔离 + 操作审计,安全可控✅ 精准匹配 UI 自动化需求:生成代码与执行操作一体化本文我使用CRM系统分类管理功能进行测试演示,手把手教你从测试用例编写,到上传Codex、自动执行浏览器操作,每一步都有细节,看完直接复刻到工作中。

十二测试录 473

Element-Ul和ant-design-vue了解

Element-Ul是饿了么前端团队推出的一款基于Vue.js 2.0 的桌面端UI框架,手机端有对应框架是Mint UI 。 开发环境 1.安装webpack npm install -g webpack 2.安装vue-cli vue-cli是什么? vue-cli 是vue.js的脚手架,用于自动生成vue.js模板工程的。 使用步骤: 安装vue-cli: npm install -g vue-cli 使用vue-cli构建项目 vue init webpack project-name //创建

csdn740490977的博客 1120

PCL 法向量夹角剔除错误匹配点对【2026最新版】

实现了一种简单的基于对应点法线角度的对应关系去除方法。博客长期更新,本文最新更新时间为:2026年5月24日。

点云侠的博客 41万+

AutoSAR MemMap模块概述及配置参数详解

这个模块是干啥的?它是用来配置Memory Mapping and Compiler Abstraction module。

4509

快速搞懂Element Ul组件的安装及使用

本文介绍了Element Ul组件的安装和使用方法,以及常见组件的简单示例。通过npm或yarn安装Element Ul,并在项目中引入和注册,然后可以轻松使用Element Ul提供的丰富组件,如按钮、表单、布局等,构建现代化、美观的用户界面。详细示例展示了按钮、表单和布局等几种常用组件的基本用法,帮助开发者快速上手,并提供了结语鼓励深入学习和探索Element Ul的更多功能。

q_913246828的博客 743

RKNN 端侧部署必看:YOLOv11 Pose 姿态估计模型转换与性能优化实战

随着人工智能技术在边缘计算领域的快速发展,姿态估计作为计算机视觉的重要分支,在智能监控、人机交互、体感游戏等场景中展现出巨大的应用潜力。本文深入研究了YOLOv11 Pose模型在Rockchip RKNN平台上的部署方案,从理论基础、模型转换、平台优化到实际部署进行了全面阐述。通过详细的技术分析和实验验证,证明了RKNN平台能够有效提升YOLOv11 Pose的推理性能,在RK3588硬件平台上实现了高达100 FPS的实时姿态检测,为边缘计算场景下的姿态估计应用提供了高效的解决方案。

m0_71589036的博客 185

探索element-ul的神奇功能:从克隆到滑动,让你的网页更加动态!

Element-Ul是饿了么前端团队推出的一款基于Vue.js 2.0的桌面端UI框架,手机端有对应框架是Mint UI。Element UI是一个基于Vue.js的组件库,它提供了丰富的UI组件和工具,可以帮助开发者快速构建现代化的Web应用程序。通过引入element-ui的js和css文件,你可以在你的项目中使用element-ui的组件和样式。

2301_77478553的博客 734

在windows系统上使用codex出现应用程序无法正常启动(0xc0000022)的解决方案

本文主要介绍了在windows系统上使用codex出现应用程序无法正常启动(0xc0000022)的解决方案,希望能对使用codex的同学们有所帮助。 文章目录 1. 问题描述 2. 原因分析 3. 解决方案

weixin_43178406的博客 10万+

【FPGA教程案例96】控制案例1——基于FPGA的自适应PID控制器verilog实现

首先,我们复习下课程传统的PID控制器,往往存在调整速度较慢,超调过大等缺点。为了解决这个问题,在实际的PID应用中,需要实时的调整PID的控制参数,以达到加快PID控制速度,降低超调等目标。目前,自适应PID控制器,一般有误差反馈调整,模糊控制器调整,神经网络调整。其中模糊控制器调整,神经网络调整较为复杂,在入门案例中不做介绍,在本课程中,我们将实现相对略微简单点的基于误差反馈调整的自适应PID控制器。

FPGA/MATLAB学习教程/源码/项目合作开发 6207

element-ul基本使用

element-ul

qq_60587956的博客 1451

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Element-UI安装使用教程

是什么 Element-Ul是饿了么前端团队推出的一款基于Vue.js 2.0 的桌面端UI框架,手机端有对应框架是Mint UI 官方介绍:Element-Ul是一个网站快速成型工具,一套为开发者,设计师和产品经理准备的基于Vue 2.0的桌面端组件库 安装 方法一 npm安装 进入你已经创建好的Vue项目,然后输入下面命令 npm i element-ui -S 注意:如果安装进程一直没变在,像停在某个界面,可以试试更换成淘宝的源,输入下面 npm config set registry http

Sparks550的博客 1513

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

selenium获得ul标签下的多个li标签并存进列表

偶尔学了爬虫

是光の谢宣骞博客 1万+

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

Element Ul组件库的介绍安装使用

介绍:::在前端开发中, UI 组件库是提高开发效率和优化用户体验的重要工具之一。Element UI 是一套基于 Vue . js 的组件库,提供了丰富的 UI 组件和交互效果,能够快速搭建出现代化的 Web 应用程序。

这是一个程序员的思考空间 583

在线教育项目03-1_element-ui、axios、node.js学习

# 一、axios是什么 1. axios是独立的项目,不是vue里面的一部分,使用axios经常和vue一起使用,实现ajax操作。 2. 使用axios应用场景 ![在这里插入图片描述](https://img-blog.csdnimg.cn/4272decd0b2547549d3e533429d2eb0b.png) **使用案例:** **1.引入vue.js、axios.js两个文件** 2.编写axios代码 - 创建json文件,创建数 - 使用axios发送请求,请求文件得到

qsw1364941774的博客 322

Element学习使用

目录 引入: 测试使用 快速布局: el-tabs标签页组件 el-table组件制作表格 el-button 按钮组件 常用商品区域布局 商品分类布局 下拉框 ...

weixin_30764137的博客 303

Selenium 4 API 迁移指南:从 find_element_by_id 到 find_element(By.ID) 的完整解决方案

在 Web 自动化测试中,元素定位是核心基础。Selenium 作为主流的自动化测试框架,其定位机制经历了从分散方法到统一策略模式的演进。新版 Selenium 4 引入了 `find_element(By.XXX, value)` 这一通用方法,取代了旧版的 `find_element_by_id`、`find_element_by_name` 等独立方法。这一变革遵循了策略模式的设计理念,将定位策略(如 ID、XPath、CSS Selector)与查找执行解耦,提升了代码的可读性、可维护性和可扩展性。

aome1470的博客 479
上一篇: javascript基础&实战
下一篇: SpringBoot+vue练手项目---博客系统
爲誰心殇h
博客等级 码龄7年 4粉丝 12原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值