草庐IT

Material-UI

全部标签

javascript - 在选择的 jquery ui 选项卡上获取选项卡文本

我正在使用jqueryui标签我可以在“加载”(ajax)事件中获取所选选项卡的索引$('#tabs').tabs({load:function(e,ui){if($('#tabs').tabs('option','selected')==0){}}});现在我想获取标签名称例如...ProfileShouts我想在单击第一个选项卡时检索文本配置文件或单击第二个选项卡时大喊。谢谢 最佳答案 您可以使用uiargument传入,具体是ui.tab获取anchor元素,像这样:vartext=$(ui.tab).text();我没有要加

javascript - three.js 改变 Material 的纹理

我正在three.js中的网格上设置纹理,当它加载时它看起来也是我想要的:texture=THREE.ImageUtils.loadTexture("textures/hash.png");texture.needsUpdate=true;uniforms={color:{type:"c",value:newTHREE.Color(0xffffff)},texture:{type:"t",value:texture},},vertexShader="varyingvec2vUv;voidmain(){vUv=uv;gl_Position=projectionMatrix*modelVi

javascript - jQuery UI DatePicker 在第二次调用时挂起

我正在创建一个在对话框中使用jQueryDatepicker和Timepicker的ASP.NETMVC3应用程序。代码很简单,只是本地化:$(document).ready(function(){$('.datepicker').datepicker({dateFormat:"dd/mm/yy",monthNames:['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],dayNames:['Domingo',

javascript - AngularJS/UI Bootstrap - 删除时淡出警报

我将Angular与UIBootstrap一起使用.我创建了自定义指令,将广播警报推送到绑定(bind)到View的警报数组(呈现为Bootstrap警报)。在一定的超时后,警报将从数组中删除(并因此从View中删除)。这是代码:angular.module('myApp').directive('alerts',function($timeout){return{restrict:'E',templateUrl:'views/alerts.html',scope:true,/*sharescopebetweenalertsdirectives*/link:function(scope

javascript - jQuery UI sortable 在排序时触发 css3 动画

我有一些sortables,它们通过一个类定义了CSS3关键帧动画。排序时,我注意到在thisFiddle.中看到的奇怪行为.slideLeft{animation-name:slideLeft;-webkit-animation-name:slideLeft;animation-duration:1s;-webkit-animation-duration:1s;animation-timing-function:ease-in-out;-webkit-animation-timing-function:ease-in-out;visibility:visible!important;

javascript - React + 语义-UI : Using Forms inside UI MODAL

在没有React的普通旧语义UI中,我已经能够毫无问题地将表单放入模态框内。使用Semantic-UI+React版本,我能够在模态内显示表单,但它并没有像我期望的那样工作。例如,模态显示后,模态内的表单也显示出来。如果我开始在输入字段中输入,则会显示此错误:Error:InvariantViolation:findComponentRoot(...,.1.1.1.0.4.0.0.1):Unabletofindelement.ThisprobablymeanstheDOMwasunexpectedlymutated(e.g.,bythebrowser),usuallyduetoforg

javascript - 语义 ui 的 `gulp build` 给出错误 'ENOENT: no such file or directory'

版本:gulp@3.9.1我已经通过npminstall安装了semantic-ui并在交互式设置过程中给出了默认设置。但是当我从/semantic文件夹执行gulpbuild时,我收到以下错误:[20:52:27]Starting'build'...BuildingSemantic[20:52:27]Starting'build-javascript'...BuildingJavascript[20:52:27]Starting'build-css'...BuildingCSS[20:52:27]Starting'build-assets'...Buildingassets[20:5

javascript - 如何测试 Angular Material 对话框?

我有一个我正在尝试测试的自定义对话框组件类。特别是我的关闭功能是这个close():void{this.dialogRef.close();}dialogRef被注入(inject)到类构造函数中,如下所示constructor(publicdialogRef:MatDialogRef,@Inject(MAT_DIALOG_DATA)publicdata:any){}所以我的问题是,如何在我的规范测试文件中模拟dialogRef并测试其关闭功能?我的项目使用Angular5和AngularMaterial5。 最佳答案 假设您要询问

javascript - 未捕获的类型错误 : Cannot read property 'injection' of undefined

关闭。这个问题需要debuggingdetails.它目前不接受答案。编辑问题以包含desiredbehavior,aspecificproblemorerror,andtheshortestcodenecessarytoreproducetheproblem.这将有助于其他人回答问题。关闭4年前。Improvethisquestion升级到16.x后出现以下错误UncaughtTypeError:Cannotreadproperty'injection'ofundefinedatinjectTapEventPlugin(injectTapEventPlugin.js:23)ateva

javascript - 传递给回调函数的 "ui"对象的 jQuery UI 对象类型?

在jQueryUI中,传递给许多事件方法的回调函数的“ui”对象的类型/内容是什么,我该如何使用它?例如,“selectable”演示,事件“selected”传递了两个参数。“事件”和“用户界面”。我正在尝试按如下方式使用它:$("#selectable").selectable({selected:function(event,ui){$(ui).find("input").attr('checked',true);}});(这里是html:)但它不起作用。我究竟做错了什么?我假设ui参数设置为代表所选“li”的对象,但是当我尝试使用它时,情况似乎并非如此......Example