摘要: 委托顾名思义,即使将方法交给它,然后它去执行,定义的时候要注意委托返回值要和方法的返回值一致,参数类型和个数也要一致,现在直接上代码 using System; delegate void getNum(int a,int b);//定义委托返回值为空,两个参数类型int namespace del 阅读全文
posted @ 2021-07-28 09:53 月长生 阅读(36) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; namespace 泛型的基本使用练习 { class Program { static void Main(string[] args) { //泛型练习1 var a = "aa";var b = " 阅读全文
posted @ 2021-07-27 18:03 月长生 阅读(20) 评论(0) 推荐(0)
摘要: using System; using System.Reflection; namespace _1_反射 { class Program { static void Main(string[] args) { Type t = typeof(Ss); foreach (object item i 阅读全文
posted @ 2021-07-27 17:50 月长生 阅读(22) 评论(0) 推荐(0)
摘要: VUE组件简单实例 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <div> <bt></bt> <bt></bt> </div> </div> <script src="https://cd 阅读全文
posted @ 2021-07-12 17:06 月长生 阅读(38) 评论(0) 推荐(0)
摘要: Vue增删改查简易实例 <!DOCTYPE html> <html> <head> <title> </title> <style type="text/css"> .ulStyle{ list-style-type: none; margin: 10px 30px; } .divStyle{ wi 阅读全文
posted @ 2021-07-12 15:20 月长生 阅读(84) 评论(0) 推荐(0)
摘要: 挂载: beforeCreate created beforeMount mounted:el挂载到实例上时运行 更新: beforeUpdate updated 销毁: beforeDestory destoryed 各自出现的时机如下列代码所示:在log中查看 <!DOCTYPE html> < 阅读全文
posted @ 2021-07-12 10:21 月长生 阅读(62) 评论(0) 推荐(0)
摘要: 过滤器实例:转换首字母大写 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <input type="text" name="" v-model="uname"> <div>{{uname | 阅读全文
posted @ 2021-07-12 09:47 月长生 阅读(43) 评论(0) 推荐(0)
摘要: 计算属性是为了让页面显示更加简洁,基于data数据进行处理的方法,以下为实例 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <input type="text" name="" v-model 阅读全文
posted @ 2021-07-11 21:30 月长生 阅读(37) 评论(0) 推荐(0)
摘要: 获取焦点简单实例,用Vue.directive(ps:指令)定义,命名不要是关键字,用v-加自定义指令名称调用,而内部用钩子函数inserted来实现 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app 阅读全文
posted @ 2021-07-11 21:02 月长生 阅读(76) 评论(0) 推荐(0)
摘要: Vue的v-model.number顾名思义,即是将绑定的参数中的字符串强制转换为int类型 而v-model.trim是将参数的前后空格删除 v-model.lazy:v-model的绑定是实时响应,lazy则是在输入完成后,焦点离开v-model绑定的控件后响应,相当于change事件 以下是实 阅读全文
posted @ 2021-07-09 09:51 月长生 阅读(93) 评论(0) 推荐(0)