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
【vue】子组件取不到父组件的值
可能原因:1、子组件没有name属性,父组件匹配不到2、属性命名格式不对//父组件computed:{activeKEY(){
returnthis
.currentTab+1},},//子组件props:
IrisLong
·
2023-03-31 14:00
Java——泛型与通配符的详解
,其可将代码适用于多种数据类型为何不能用ObjectclassMyArray{publicObject[]array=newObject[10];publicObjectgetPos(intpos){
returnthis
.array
Xiao8830
·
2023-03-30 20:15
java
java
javascript
开发语言
new Object和Object.create的区别
一、newObject()和{}{}等同于newobject(),原形object.prototypeletobj1={a:10,b:20,sum(){
returnthis
.a+this.b}}//原形
素明诚
·
2023-03-29 16:48
JS数据结构与算法之队列(基于数组)
向队列尾部添加元素Queue.prototype.enQueue=ele=>{this.items.push(ele)}//移除并返回队列第一个元素Queue.prototype.deQueue=()=>{
returnthis
.items.shift
要此
·
2023-03-29 10:06
内网图片域名替换
//src_replace.jsObject.defineProperty(Image.prototype,"src",{configurable:true,get:function(){
returnthis
学无止境吧
·
2023-03-29 08:09
CocosCreator中,基本代码模板GameSys
EventTarget}from'cc';exportclassGameSys{privatestatic_instance:GameSys;publicstaticgetinstance():GameSys{
returnthis
全新的饭
·
2023-03-28 09:06
kotlin回调函数作为参数block: T.() -> Unit和block: () -> Unit的区别
1.T.()->Unit作为参数//回调函数里this作用域是类型T的实例publicinlinefunT.extFunc(block:T.()->Unit):T{block()
returnthis
}2
galaxy_zheng
·
2023-03-28 05:06
微信小程序请求封装
_header){
returnthis
.requestAll(url,
haisonLIN
·
2023-03-28 01:00
只读属性的实现
constdataDef={}dataDef.get=function(){
returnthis
.
茂茂爱吃鱼
·
2023-03-27 20:55
vue阅读笔记
你可能已经注意到我们可以通过在表达式中调用方法来达到同样的效果:Reversedmessage:"{{reversedMessage()}}"//在组件中methods:{reversedMessage:function(){
returnthis
.message.split
Masami_9e88
·
2023-03-27 17:31
watch computed 监听
Reversedmessage:"{{reversedMessage()}}"Reversedmessage:"{{reversedMessage}}"//计算属性computed:{reversedMessage(){
returnthis
.message.split
努力学习的小瑶
·
2023-03-27 17:38
实现一个简单的js队列
constructor(){this.isPadding=false;this.queueList=[];}push(fn){this.queueList.push(fn);this.run()}size(){
returnthis
.queueList.length
阿尔法_狗
·
2023-03-27 17:40
20230325----重返学习-计算符优先级-实例对象与类的属性专用名词-修改this指向-Set类型-类数组转数组-事件委托-轮播图
轮播图计算符优先级newXXX()----18newXXX----17XXX.XXX—18成员访问阿里巴巴面试题functionFoo(){getName=function(){console.log(1);};
returnthis
方朝端
·
2023-03-26 22:59
重返学习
学习
javascript
前端
JS常用继承方式
colorthis.type=["cat","dog"]console.log("AnimalClass")//看下这个构造函数执行了几次}Animal.prototype.getColor=function(){
returnthis
.color
coder952755
·
2023-03-25 20:15
element-ui日期组件设置日期选择范围
pickerOptions:{disabledDate:(time)=>{
returnthis
.dealDisabledDate(time)}}然后在methods中写禁用日期的相关逻辑,下方逻辑为选择
丶Pal
·
2023-03-25 15:16
2020-06-03 (Vue-class-Component 源码分析)
class写法,是对当前类的封装(个人理解)首先看2.0js的写法constApp=Vue.extent({data(){return{'hello':'hello'}},computed:{world(){
returnthis
.hello
法西斯qwq
·
2023-03-24 20:01
计算属性和侦听器
,计算属性只有绑定的普通属性,发生变化时,才会调用计算属性,也可以有setter方法,可以用来更新其他普通属性例:computed:{fullName:{//getterget:function(){
returnthis
.firstName
嘿嘿_信我者得永生
·
2023-03-24 11:07
JavaScript中this的所有指向
简单调用functionfn1(){
returnthis
}functionfn2(){"usestrict"return
pengANDpeng
·
2023-03-24 09:22
vue:数据响应式
vue对data做了什么优先声明this.nimage.pnggettersetterletobj1={姓:"迪",名:"丽热巴",姓名(){
returnthis
.姓+this.名;},age:18};
饥人谷_小霾
·
2023-03-24 05:52
3.Mobx-computed属性
.定义get计算属性3.在makeAutoObserverable方法中标记//在store定义一个原始数据listlist=[1,2,3,4,5,6]//定义计算属性getfilterList(){
returnthis
.list.filter
一本正经胡说八道熊
·
2023-03-23 21:55
Mobx
javascript
蓝桥杯web-31期楼赛题解(更新中)
filteredList(){//TODO:请补充代码
returnthis
.postList.filter(item=>(item.title.search(this.search)!
技术原力
·
2023-03-23 17:12
Web学习
蓝桥杯
前端
jquery
javascript
vscode
vue 图片预览
(index){this.current=indexthis.wxReady(index)},wxSwiper(index){letnewImgs=this.newImgs.map((item)=>{
returnthis
.host
ismyshellyiqi
·
2023-03-22 19:25
ES6 类class
下面是通过传统的方式创建和使用对象的案列:functionMatHandle(x,y){this.x=xthis.y=y}MatHandle.prototype.add=function(){
returnthis
.x
JimmyAnn
·
2023-03-22 14:05
uni-app入门-实战教程-二十三-计算属性
(time/60)+'小时':time+'分钟'}}/*计算属性-开始*/computed:{Time(){
returnthis
.time>60?
Magic_小灰灰
·
2023-03-21 09:37
js 设置属性setter,getter的姿势
_sex=sex;},getsex(){
returnthis
._sex;}};Object.defineProperty(o,'name',{set:function(name){this.
红叶1942
·
2023-03-20 12:29
js中的new做了什么?
functionPerson(){this.name=name;this.age=age;this.sex=sexthis.sayName=function(){
returnthis
.name;};}varperson
蘑菇下的木头
·
2023-03-19 07:08
总结JavaScript几种继承的方式及优缺点
.原型继承原型继承是比较常见一种继承方式functionParent(){this.name='parent'this.action=function(){console.log(this.name)
returnthis
.name
阿畅_
·
2023-03-18 12:07
23、扩展方法
2.定于扩展方法Personl类的定义publicclassPerson{publicstringname;publicoverridestringToString(){
returnthis
.name;
Peuimporte
·
2023-03-18 07:57
vue computed与watch实战
form:null},mounted(){axios.get('xxxx').then(res=>this.form=res)//这个时候的form就是非空了},computed:{newForm(){
returnthis
.form.a
斑翅果蝇
·
2023-03-17 06:21
2019-08-22
与watch比较,常用于监听多个data变量实时改变一个computed变量//基本类型的计算data(){return{price:5,number:15};},computed:{count(){
returnthis
.price
丿聆风丶
·
2023-03-16 02:23
react-native中ref用法
用法一importLoadingfrom'react-native-loading-w';//viewrender(){return(testloading);}getLoading(){
returnthis
.refs
喜剧收尾_XWX
·
2023-03-15 10:53
Javascript原型链和继承
原型链图实例化的对象拥有独立的一套属性和方法,举例如下:functionPerson(name){this.name=name;this.getName=function(){
returnthis
.name
东方支柱
·
2023-03-15 08:24
小程序跨页面数据同步
name){returnnull;}
returnthis
.data[name];}setData(params={}){for(letiinparams){this.data[i]=params[i];
loewe0202
·
2023-03-14 07:19
一道全面考察 JS 基础的一道题
functionFoo(){getName=function(){console.log(1)}
returnthis
}Foo.getName=function(){console.log(2)}Foo.prototype.getName
阿畅_
·
2023-03-14 02:42
实现一个简易的MVVM框架
$options.data;observe(data)for(letkeyindata){Object.defineProperty(this,key,{enumberable:true,get(){
returnthis
守望星空l
·
2023-03-13 07:15
Vue(20-30)
Document今天天气very{{showWeather}}点击切换天气tryonetrynewVue({el:'#root',data:{isHot:true},computed:{showWeather(){
returnthis
.isHot
南方以南_
·
2023-03-12 20:52
Vue
vue.js
前端
javascript
javascript设计模式2
_pool=[];}//创建对象create(obj){
returnthis
._pool
jay_zhou
·
2023-03-12 15:41
初识ES6 class类
functionPoint(x,y){this.x=x;this.y=y}Point.prototype.toString=function(){
returnthis
.x+this.y;}varp=newPoint
一个钱端
·
2023-03-12 14:58
2018-09-17
vue计算属性html代码:{{msg}}{{erm}}js:newVue({el:".itany",data:{msg:"hellovue"},computed:{erm:function(){
returnthis
.msg.split
你昵称已被使用了
·
2023-03-11 21:12
4-Vue计算属性和侦听器
,},computed:{reverseMessage(){//this指向vm实例
returnthis
.message.split('').reverse().join('');}}
波克比
·
2023-03-11 18:08
成长(15/2000)——面试题合集12
3.继承单一letParent=function(){this.name=['dq']//地址,如果是dq是值}Parent.prototype.getName=function(){
returnthis
.name
Kiki_Q
·
2023-03-11 11:08
优雅的轮询
API.EXCHANGE_RESULT,{key:key});returnres.data.id;}catch(err){if(err.code=="9302"){//排队awaitsleep(1500);
returnthis
.resultFun
爱代码的派派星
·
2023-03-10 21:21
Spring @Cacheable注解 && 事务@Transactional 在同一个类中的方法调用不生效
注解在对象内部调用不会生效代码示例:ProductServiceImpl.javapublicListgetProductList(CommonRequestreqest){//@Cacheable失效,不会走缓存的
returnthis
.findProductInfoList
weixin_30726161
·
2023-03-10 17:06
java
[复习]二分搜索树(中)
node.rightChild){returnnode;}
returnthis
.findBestRight(node.rightChild);}_remove=(node,e)=>{if(!
吴敬悦
·
2023-03-10 14:47
解决message频繁触发的问题
解决antdmessage频繁触发的问题if(document.getElementsByClassName('el-message').length>0)
returnthis
.
哈0
·
2023-03-10 03:52
Vuex-State、Getter、Mutation、Action
$store.state.xxxexportdefault{computed:{count(){
returnthis
.$store.state.count}}}2、辅助函数ma
混吃等死小前端
·
2023-03-09 17:50
js经典面试题01
functionFoo(){getName=function(){console.log(1);};
returnthis
;}Foo.getName=function(){console.log(2);}
小姜先森o0O
·
2023-03-09 16:42
Angular的FormArray和模态框结合使用实例详解
//封装获取modelListgetmodelList(){
returnthis
.formGroup.get('modelList')asFormArray}constructor(
·
2023-02-27 18:59
js 观察者模式
this.instance){this.instance=newEventManagers();}
returnthis
.instance;}constructor(){this._ev
Jey
·
2023-02-19 07:59
js 观察者模式
RabbitMQ队列也使用了这种模式//主题,接收状态变化,触发每个观察者classSubject{constructor(){this.state=0this.observers=[]}getState(){
returnthis
.state
事在人为s
·
2023-02-17 06:11
上一页
7
8
9
10
11
12
13
14
下一页
按字母分类:
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
其他