E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
returnthis
通过原型链实现数组内置方法[JavaScript_013]
function(){for(vari=0;i=0;i--){output.push(this[i]);}for(vari=0;i
returnthis.length
六亲不认的步伐
·
2023-04-18 02:12
【vue】Vue 开发技巧:
exportdefault{methods:{getParamsId(){
returnthis
.$route.params.id}}}在组件中使用$route会导致与其相应路
Sun Peng
·
2023-04-17 12:57
Vue框架
vue.js
前端
javascript
Java泛型: extends XXXX> 中的? 和 extends 的理解和使用实例
privateTx;//表示X坐标privateTy;//表示Y坐标publicvoidsetX(Tx){this.x=x;}publicvoidsetY(Ty){this.y=y;}publicTgetX(){
returnthis
.x
请叫我大师兄_
·
2023-04-17 02:38
java
Java泛型高级
Java泛型基础
Java泛型中extends
001-005-使用意图传递数据
创建一个继承Application的类publicclassMyApp:extendsApplication{publicStringname;//全局变量publicStringgetName(){
returnthis
.name
TimerYJ
·
2023-04-16 19:31
VUE Computed限制input只能输入数字
user_id:''}},//监听属性类似于data概念computed:{_user_id:{set:function(value){this.user_id=value},get:function(){
returnthis
.user_id.rep
宇落星辰_30ba
·
2023-04-16 13:57
原型链实现js的replaceAll
RegExp.prototype.isPrototypeOf(reallyDo)){
returnthis
.replace(newRegExp(reallyDo,(ignoreCase?"
Luck程_2ca6
·
2023-04-16 05:54
js setter & getter
javascript的中的setter和getter可以实现:当获取对象的属性值时可以触发get方法当为对象的属性赋值时可以触发set方法主要有如下4种实现方式:对象初始化时定义varobj={a:1,getb(){
returnthis
.a
炒鸡大馒头
·
2023-04-16 03:57
2021-10-21
this.item=[]Stack.prototype.push=function(element){this.items.push(items)}Stack.prototype.pop=function(){
returnthis
.items.pop
weixin_43572907
·
2023-04-15 11:34
javascript
前端
vue.js
JS面试题解析 考察:js执行顺序,变量提升,作用域,this 指向,继承等
functionFoo(){getName=function(){console.log(1)};
returnthis
}Foo.getName=()=>console.log(2);Foo.prototype.getName
s_apy
·
2023-04-14 07:33
Java中的Object类-hashcode()和equals()方法
关于equals()方法:Object类中对equals()方法的默认的实现方式是:
returnthis
==obj那就是说,只有this和obj引用同一个对象,才会返回true。
codingBen
·
2023-04-14 06:13
对比 vue2 vue3 中响应式地获取 vuex 状态
中的状态仅需要在计算属性中返回即可参考:VuexVuex-组合式API一、计算变量vue2和vue3选项式API假设使用vuex定义了一个状态isPhone,并通过Getter暴露出来单个状态:computed:{isPhone(){
returnthis
ymzhaoUSTB
·
2023-04-14 06:05
vue.js
vuex
Vue中computed与watch何时使用
computed:{bookmark(){//这里用了es6书写方法
returnthis
.$store.sta
Annie_070c
·
2023-04-14 05:19
八个一看就觉得很棒的Vue开发技巧分享
exportdefault{methods:{getParamsId(){
returnthis
.$route.params.id}}}在组件中使用$route会导致与其相应路
·
2023-04-14 01:37
你不知道的ES5和ES6继承
ES6还没有发布的时候,js定义类是以函数的形式,例如functionTestFather(){this.aa='aa';}TestFather.prototype.getAA=function(){
returnthis
.aa
目标_ff90
·
2023-04-13 15:53
vue——计算属性、侦听器的使用
fullName}}varvm=newVue({el:'#app',data:{firstName:'Tom',lastName:'cat'},computed:{fullName:function(){
returnthis
.firstName
weixin_43246812
·
2023-04-13 13:09
vue
computed
watch
侦听器
计算属性
日期格式化等方法
{/***获取今天日期*@param{String}type返回类型例如:yyyy-mm-ddhh:mm:ss*@returns日期*/getToday(type){letnow=newDate();
returnthis
.timeFormat
yimi珊
·
2023-04-12 14:46
9.7 如何在Java中进行静态类型检查?
classA{Ame(){
returnthis
;}publ
明翼
·
2023-04-12 03:46
Java学习笔记(十):面向对象基础
classclassPerson{privateStringname;privateintage;publicStringgetName(){
returnthis
.name;}publicvoidsetName
似锦少年Jory
·
2023-04-12 01:07
Proxy的Receiver的使用
看下列代码constobj={_name:"Han",getname(){
returnthis
._name},setname(newVal){this.
远方0905
·
2023-04-11 23:13
JavaScript
javascript
前端
开发语言
obj的ES6的get&set方法以及数据劫持
1.Document/*es给对象提供了set和get方法可以对对象再进行操作*/letobj={_name:'zhangsan',getname(){console.log('即将获取');
returnthis
GGYY丶
·
2023-04-11 22:10
mybatis-plus的saveBatch
IService.saveBatchpublicinterfaceIService{defaultbooleansaveBatch(CollectionentityList){//
returnthis
.saveBatch
JAVA道人
·
2023-04-11 04:20
#
mybatis
mybatis
Vue---day05---过滤排序
就可以用计算属性来进行操作{{i}}varvm=newVue({htel:"#app",data:{nums:[1,2,3,4,5,6]},computed:{nextnums:function(){
returnthis
.nums.filter
qq_42079011
·
2023-04-10 04:15
Vue
vue
Computed property was assigned to but it has no setter问题解决
computed中定义了某个属性,只有一个return额,而你在其他地方又对这个属性赋值了就会报这个,比如这样mounted(){this.submit()},computed:{setName(){
returnthis
.form.name
jieyucx
·
2023-04-09 19:11
vue的那些事
javascript
开发语言
vue.js
java语言入门 (三)继承与多态 (2)
packagea;//下面这个是父类publicclassHello{publicstaticinta=5;publicHello(inta){this.a=a;}publicStringtoString(){
returnthis
.a
你可拉倒吧
·
2023-04-09 14:38
final
继承
多态
手写 Promise 所有方法实现
Promise.prototype.catchPromise.prototype.catch=function(onRejected){
returnthis
.then(null,onRejected)}
superYuee
·
2023-04-09 02:31
es6的Class类3种私有方法实现
_ccc(b);}//私有方法_ccc(b){
returnthis
.data=b;}}二、私有方法移出模块模块内部的方法对外都是可见的,内部使用b.call(this,b),这样b实际上是当前模型classa
ldz_miantiao
·
2023-04-08 11:47
JavaScript学习
es6Class类
js私有方法
如何在ES6的class上实现私有属性
_privateProperty='私有属性';}getPrivateProperty(){
returnthis
.
webRambler
·
2023-04-08 11:08
前端
ES6
面试
es6
前端
fastjson转换json时,碰到的那些首字母大小写转换的坑!
坑0x01全大写的键名这种情况在api定义里面很常见,如下:privateStringTEST="1";publicStringgetTEST(){
returnthis
.TEST}在fastjson转换后
King斌
·
2023-04-07 17:07
this指向总结
所接受的执行空间剪头函数:指向上一级不重要的定时器指向window事件绑定指向元素本身一道腾讯笔试题varx=20;vara={x:15,fn:function(){varx=30;returnfunction(){
returnthis
.x
简默丶XS
·
2023-04-07 16:00
vue零散记录之computed
computed计算需求:监听到图片尺寸发生变化,修改外部div的宽高,且px需要转化为remcomputed:{//图片宽度图片高度=px转化rempxImgWhrem:function(){
returnthis
.imgWh
路小雨的雨web
·
2023-04-07 09:51
vue
随笔
vue
javascript
Vue实现图片loading
loading素材//自定义封装子组件exportdefault{name:'imgComp',props:{src:{type:String,required:false,default:()=>{
returnthis
.url
毛三仙
·
2023-04-07 02:12
组件封装
vue.js
前端
elementui
html
jQuery Validate 自定义校验
判断整数value是否等于0jQuery.validator.addMethod("isIntEqZero",function(value,element){value=parseInt(value);
returnthis
.optional
水恋清荷
·
2023-04-06 18:10
javaScript基础面试题 ---this指向+原型的考题
functionFoo(){getName=function(){console.log(1)}
returnthis
;}Foo.getName=function(){console.log(2)}Foo.prototype.getName
尘世冒险家
·
2023-04-06 16:32
前端JS面试题
javascript
前端
开发语言
vue-admin-template配置快捷导航(标签导航栏)
1、添加标签@/layout/components/AppMain.vue添加:exportdefault{name:'AppMain',computed:{cachedViews(){
returnthis
丿安之若素
·
2023-04-06 14:12
new Object 和 Object.create()的区别?
方式创建的对象的隐式原型(__proto__)都会指向Object的显示原型上(也就是Object.prototype)//对象字面量constobj1={a:10,b:20,sum:function(){
returnthis
.a
泡杯感冒灵
·
2023-04-06 02:42
JavaScript 优雅的 循环数组 移位函数
Array.prototype.循环=function循环(参_循环次数){ if(this.length==0)
returnthis
; 参_循环次数=(参_循环次数||1)%this.length
CodeRecycle
·
2023-04-05 23:43
javascript
前端
开发语言
JavaScript 优雅的 列表数组 乱序函数
局_数组对象:局_数组对象.fill([]).推理(function(){
returnthis
.创建.apply(this,局_参数列表.slic
CodeRecycle
·
2023-04-05 23:43
javascript
开发语言
ecmascript
JavaScript 优雅的 列表数组 乱序测试
局_数组对象:局_数组对象.fill([]).推理(function(i){
returnthis
[i].创建.apply(this[i],局_参数
CodeRecycle
·
2023-04-05 23:43
javascript
数组倒叙
数组倒叙代码{{arr1}}{{arr2}}exportdefault{data(){return{num:1,arr1:[1,2,3,4,5],};},computed:{arr2:function(){
returnthis
.arr1
sunflower_07
·
2023-04-05 23:30
分页组件封装
di_totalData}}条记录跳转javascript部分:exportdefault{name:'divuePagination',computed:{di_current:function(){
returnthis
.current
王老鸭的古古事
·
2023-04-05 22:19
2019-07-16 Vuex异步请求数据,在组件中获取store中state的方法
此时应该想起来computed,没错,这个渲染进页面没有毛病,代码如下:computed:{loginState:function(){
returnthis
.
追寻1989
·
2023-04-05 19:48
input file上传图片转成base64
效果图上传图片.jpghtml+上传logojsdata(){return{addedPreviewFile:'',}},computed:{preview(){
returnthis
.addedPreviewFile
w_小伍
·
2023-04-04 08:03
结合源码,谈谈v-for和v-if谁的优先级高?应该如何正确使用避免性能问题?
constapp=newVue({el:'#demo',data(){return{children:[{title:'foo'},{title:'bar'}]}},computed:{isFolder(){
returnthis
.child
林不羁吖
·
2023-04-03 23:43
[前端基础]一道前端小题的简单分析
有这样一道前端小题,问输出什么:functionFoo(){getName=function(){console.log(1);};
returnthis
;}Foo.getName=function(){
捡了幸福的猪
·
2023-04-03 17:29
用变量同时控制div的class和数据
//scriptdata(){return{...showMore:false}},computed:{showTag(){if(this.showMore){
returnthis
.data}else{
kayleeWei
·
2023-04-03 07:46
大陆手机号校验
this.leaseTimeList.length)
returnthis
.$toast('商品已失效,请重新选择');if(!this
来杯西瓜汁吧
·
2023-04-03 03:27
前端
vue
javascript
2018-09-15 数组常用的十种API
把字符串分割为字符串数组reverse()颠倒数组中元素顺序{{count}}newVue({el:'#itany',data:{mes:'hellovue'},computed:{count:function(){
returnthis
.mes.split
其实_dnhl
·
2023-04-03 01:18
TypeScript 中使用 getter 和 setter的方法
classDeveloper{private_language='';private_tasks:string[]=[];getlanguage(){
returnthis
.
·
2023-04-02 11:00
TypeScript&&Vue使用总结
1.计算属性//计算属性--是否有学校被选中gethasSelected(){
returnthis
.selectedSchoolIds.length>0;}2.监视@Watch("visibleModal
二营长家的张大炮
·
2023-04-01 13:59
TypeScript 中如何使用 getter 和 setter
classDeveloper{private_language='';private_tasks:string[]=[];getlanguage(){
returnthis
.
迹忆客
·
2023-04-01 11:07
TypeScript
编程
typescript
前端
上一页
6
7
8
9
10
11
12
13
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他