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
小程序:将 wx.request 封装为 promise
classRequest{constructor(parms){this.withBaseURL=parms.withBaseURLthis.baseURL=parms.baseURL}get(url,data){
returnthis
.request
神無月拾
·
2023-08-05 07:41
Vue绑定拼接变量用法
forData(`item${type}`)}}exportdefault{data(){return{type:0,item0:[],item1:[],};},methods:{forData(val){
returnthis
WebCsDn_TDCode
·
2023-08-05 02:51
vue.js
javascript
前端
怎样修改vue中的computed计算属性的值
使用完后记得将结果returndata(){return{options:[{a:1}]}}computed{//写法一:函数形式的简写:objArr(){
returnthis
.options;}//写法二
Min_Fox
·
2023-08-04 02:37
vue
uniapp自定义弹窗之随时更换弹窗背景的实现
{title}}{{content}}{{cancelText}}{{confirmText}}-->exportdefault{name:"show-modal",computed:{show(){
returnthis
一粒程序米
·
2023-08-03 05:36
uni-app
vue.js
javascript
前端
自定义弹窗
2018-09-17
计算属性:用来处理复杂的逻辑操作computed:{revmsg:function(){
returnthis
.msg.split(‘’).trverse().join(‘===’)}}}}
_z王箭
·
2023-08-03 01:12
去除两边的空格 --正则
varstr="sdfa";String.prototype.iTrim=function(){//去除两边的空白
returnthis
.replace(/(^\s*)|(\s*$)/g,"");}alert
飞王爷
·
2023-08-02 16:49
JSONOBject的fluentPut(key,value)方法:可链式设置元素
一个示例说明源码并不难懂:publicJSONObjectfluentPut(Stringkey,Objectvalue){map.put(key,value);
returnthis
;}
超级大超越
·
2023-08-01 22:30
Java
kotlin语法糖
lambda拥有第一个参数的上下文环境返回最后一行with的方式和apply还有let不一样是方法不是扩展感觉是apply和let的组合体applyfunT.apply(f:T.()->Unit):T{f();
returnthis
A邱凌
·
2023-07-30 21:53
vue中使用Promise.all发送多个请求
描述:要求两个请求同时有返回结果时再进行相关处理方法一:getPromise1(){
returnthis
.
吃葡萄不吐葡萄皮嘻嘻
·
2023-07-29 22:01
vue
前端开发
vue
关于延迟初始化
publicclassDelayInitializationWithSingleThread{privatestaticObjectfoo;publicstaticObjectgetInstance(){if(foo==null)this.foo=newObject();
returnthis
Lcap
·
2023-07-29 20:12
JavaScript设计模式——原型模式
functionperson(name){this.name=name;}person.prototype.getName=function(){
returnthis
.name;}functionstudent
前端御书房
·
2023-07-29 17:44
JavaScript设计模式
设计模式
javascript
前端
原型模式
element树形表格 多选和单选(多选时把子节点一起勾上)
selectChange(selection,row){this.unique(selection,'id')//如果selection中存在row代表是选中,否则是取消选中if(selection.find(val=>{
returnthis
.getDat
小菜鸟码住
·
2023-07-29 16:02
javascript
前端
vue.js
css3的animation制作围绕椭圆轨道旋转,近大远小的动画
css3的animation制作围绕椭圆轨道旋转,近大远小的动画布局中间旋转的两个轨道四个方形旋转布局{/**/}{/**/}{titles}{arr&&arr.map((v,i)=>{
returnthis
.openSecondPage
PairsNightRain
·
2023-07-29 09:09
笔记
css3
javascript
react.js
前端
StringBuffer与StringBuilder的底层实现
publicStringBuilderappend(CharSequences,intstart,intend){super.append(s,start,end);
returnthis
;}publicAbstractStringBu
littlenewus
·
2023-07-29 01:30
vue项目中 处理身份证号**
没有使用过滤器//data中定义数据data(){return{id:'462310240234023434'}}//计算属性中处理data数据computed:{replaceStatusId(){
returnthis
.id.replace
脱了壳的小乌龟
·
2023-07-28 16:52
vue
原生js方法小记
demo记录方法,方便自己查询原生js方法小记String和Array方法替换所有//追加replaceAll方法String.prototype.replaceAll=function(s1,s2){
returnthis
.replace
月蚀~
·
2023-07-28 14:23
FrontEnd
javascript
watch以及computed
computedcomputed:{total:function(){
returnthis
.first+this.second}},computed监控定义的变量,不在data中声明,就可以在页面上直接展示结果
Light_shallow
·
2023-07-28 06:22
axios的同步请求及Promise与Async/Await
Test(){
returnthis
.axios({url:'/test.json',method:'get'}).then((res)=>{console.log('这是Test方法')})}步骤二调用
lankerxd
·
2023-07-28 01:12
Fontend-前端
vue
ajax
计算属性
').reverse().join('+++')}}{{app}}newVue({el:".itany",data:{mes:'Vuehello'},computed:{app:function(){
returnthis
.mes.split
我真的是易晓辉
·
2023-07-27 04:12
C#仿热血江湖
目录1GClass1031.1method_21.2method_71.3method_8GClass03method_2publicstringmethod_2(){
returnthis
.string
weixin_42132177
·
2023-07-26 18:19
C++仿游戏热血江湖
c#
ZZULIOJ 1184: 平面点排序(二)(结构体专题),Java
=a.x)
returnthis
.x-a.x;re
WA_自动机
·
2023-07-26 14:35
#
Java刷题
java
开发语言
【无标题】
{{item.title}}exportdefault{data(){return{};},computed:{list(){
returnthis
.
quanmeiren
·
2023-07-26 09:28
javascript
前端
开发语言
js继承的6种方式
操作也很简单,将子类的原型指向父类的实例对象即可functionFather(){this.value=true}Father.prototype.getFatherValue=function(){
returnthis
.value
淡莣一苆~
·
2023-07-26 08:54
JS相关方法
js
设计模式
面试
Java面向对象
接口:publicStringgetName(){
returnthis
.name;}publicvoidsetName(Stringname){this.na
zhanlongsiqu
·
2023-07-26 01:51
java
开发语言
学习
JavaScript类:(一)定义
constPerson=function(name,age){this.name=name;this.age=age;}Person.prototype={getUserName:function(){
returnthis
.name
fanren
·
2023-07-25 22:31
js ==运算规则
'zhangsan',valueOf(){return100;}};letb=100;console.log(a==b);//trueleta={value:1,valueOf:function(){
returnthis
.value
_Rookie._
·
2023-07-25 12:49
javascript
前端
开发语言
2019-03-13
,computed:{//计算属性的getterreversedMessage:function(){//`this`指向vm实例
returnthis
.message.spli
诅咒猎豹
·
2023-07-23 02:46
【Java】Java核心类 之 JavaBean
例如:publicclassPerson{privateStringname;privateintage;publicStringgetName(){
returnthis
.name;}publicvoidsetName
iHero
·
2023-07-21 16:04
Java
学习
java
开发语言
计算属性 总价
Title加货总价:{{zong}}newVue({el:'#app',data:{pa1:{pq:8,rty:3},pa2:{pq:3,rty:5}},computed:{zong:function(){
returnthis
.pa1
王诺岚
·
2023-07-21 12:28
JS 对象劫持
Object.prototype.valueOf在通过字面量访问一个对象obj时是默认得到的是obj.valueOfvara={b:1,valueOf(){
returnthis
.b++}}if(a==1&
木安小学生
·
2023-07-21 02:15
用JS实现队列的结构
Queue.prototype.enqueue=function(element){this.items.push(element)}//3.从队列中删除前端元素Queue.prototype.dequeue=function(){
returnthis
.items.shift
空empty空
·
2023-07-20 23:14
vue Element ui 实现倒计时
data数据部分data(){return{content:'发送短信',totalTime:10,canClick:false}}3.script部分sendMsg(){if(this.canClick)
returnthis
.canClick
Song_Estelle
·
2023-07-20 22:05
vue
前端
vue
一个比较复杂的js题目
functionFoo(){getName=function(){alert(1);};
returnthis
;}Foo.getName=function(){alert(2);};Foo.prototype.getName
tsunamiGG
·
2023-07-20 20:51
Promise-Polyfill源码解析(3)
因此,catch方法也应该定义在Promise的原型链上,我们来看其实现:Promise.prototype['catch']=function(onRejected){
returnthis
.then(
xshinei
·
2023-07-20 10:13
VUE学习六监视属性
constvm=newVue({el:'#root',data:{isHot:true,},computed:{info(){
returnthis
.isHot?'炎
lamwolf
·
2023-07-20 03:07
vue.js
学习
javascript
Invalid prop: type check failed for prop ““. Expected Number | String, got Array
父组件向子组件传值:props:{author_avatar_size:{type:[String,Number],default:"large",}},computed:{author_avatar_size(){
returnthis
.author_avatar_size
白瑕
·
2023-07-19 08:26
Vue.js
前端
vue.js
ES5继承的六种方式
functionSuperType(){this.property=true;}SuperType.prototype.getSuperValue=function(){
returnthis
.property
cixing
·
2023-07-18 13:14
Vue学习随堂记录
totalPrice}}newVue({el:"#app",data:{xyjPrice:99.98,shzPrice:98.00,xyjNum:1,shzNum:1},computed:{totalPrice(){
returnthis
.xyjPrice
雾喔
·
2023-07-18 10:01
前端
vue.js
前端
javascript
jest踩坑汇总
value:{store:{}asRecord,setItem(key:string,value:string){this.store[key]=value;},getItem(key:string){
returnthis
sjslln
·
2023-07-18 08:18
angular
开发语言
vue计算属性的getter和setter以及set方法的使用
fullName}}varvm=newVue({el:"#app",data:{firstName:"Denny",lastName:"Zhang"},computed:{fullName:function(){
returnthis
.firstName
nzdnllm
·
2023-07-17 15:48
element-ui upload上传组件踩坑之——fileList
==200){
returnthis
.$message.error(res.msg);}this.form={...th
泡杯感冒灵
·
2023-07-17 15:09
Vuex监听
$store.state.xxx.一、Vuex数据监听//1.在computed中把数据返回computed:{test(){
returnthis
.$s
静止呀
·
2023-07-17 12:34
Vue
vue.js
JS面向对象之常见创建对象的几种方式
1.使用对象字面量创建对象key-valuevarcat={name:'tom',info:this.name+':1212',getName:function(){
returnthis
.name;}}
Avicli
·
2023-07-16 22:16
函数
对象
面向对象
声明式服务调用Feign
queryItemByIdFallbackMethod")publicItemqueryItemById(Longid){StringserviceId="xushu-microservice-item";
returnthis
.restTemplate.getForO
放开那个BUG
·
2023-07-16 21:36
Java的this关键字和Builder模式
publicclassAge{//年龄intnumber=10;//生日Agebirthday(){sing();//等同于this.sing();number++;//等同于this.number++;
returnthis
小虎哥的技术博客
·
2023-07-16 12:01
二叉树遍历方法——前、中、后序遍历(java)
publicTreeNodeleft;publicTreeNoderight;publicTreeNode(charval){this.val=val;}@OverridepublicStringtoString(){
returnthis
.val
loss_rose777
·
2023-07-15 12:26
算法
TypeScript——类
classPerson{name:string;age:number;constructor(name:string,age:number){this.name=name;this.age=age;}print(){
returnthis
.name
_____西班木有蛀牙
·
2023-07-14 06:47
Vue学习笔记11
加A加BA--{{AddToA}}B--{{AddToB}}computed:{AddToA(){console.log("A++");
returnthis
.a+this.age;},AddToB
wing2464
·
2023-06-24 00:19
jq中为什么可以连续调用方法,连续点点点的形式
.html('haha').css('color','blue').show()这些方法类似于functiontoSing(){this.sing=function(){alert('sing');}
returnthis
竹小星
·
2023-06-23 17:50
四周搞定《JavaScript 高级程序设计》 - 读书笔记(Day 09)
functionSuperType(){this.property=true;}SuperType.prototype.getSuperValue=function(){
returnthis
.property
显卡84du
·
2023-06-22 05:18
上一页
4
5
6
7
8
9
10
11
下一页
按字母分类:
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
其他