Yii2禁用字段(Yii2 disable field)
在yii2中,我有两个字段(Text1和Text2)。 如果第一个字段(Text1)不为null,我想禁用第二个字段(Text2)。 我认为这可以用javascript完成,但我真的不知道。 有谁能够帮助我?
In yii2 I have two fields (Text1 and Text2). I want to disable the second field (Text2) if the first field (Text1) is not null. I think this can be done with javascript but I dont't really know. Can anybody help me?
原文:https://stackoverflow.com/questions/47328704
更新时间:2022-10-11 17:10
最满意答案
如上所述,NSGod将
int index
更改为NSUInteger index
解决了这个问题As mentioned above by NSGod, changing
int index
toNSUInteger index
solved the problem
相关问答
更多-
我自己开始使用IKImageBrowserView,之前我没有注意到这一点,但实际上我尝试了它并且看到了与我自己的应用程序相同的行为。 看起来IKImageBrowserView上有一个名为_shouldProcessLongTasks的私有方法。 我尝试重写它只返回NO,这似乎阻止了视图中尚未显示的图像的预加载行为(至少在Snow Leopard下,必须在Leopard下测试以查看行为是否相同) 。 看起来像一个风险相当低的私有API使用,因为如果方法发生变化,它就不再被调用了。 当您在此处向Apple提 ...
-
编辑: 根据ItemAnimator文档 : 此类定义了对适配器进行更改时在项目上进行的动画。 因此,除非您将您的项目逐个添加到RecyclerView并在每次迭代时刷新视图,我不认为ItemAnimator是您需要的解决方案。 以下是使用CustomAdapter显示RecyclerView项目时如何动画化 public class CustomAdapter extends RecyclerView.Adapter
{ private Cont ... -
我认为通过使用带DoubleAnimation的TranslateTransform来实现这一点是最简单的。 您可以使用DoubleAnimation随时间更改X和Y值,以提供在屏幕外移动的外观。 DoubleAnimation doubleAnimation = new DoubleAnimation(); itemToAnimate.RenderTransform = (Transform)new TranslateTransform(); 然后当我必须设定目标时 Storyboard ...
-
ListView移动项目(ListView moving items)[2023-05-22]
尝试这个: ////// Move the given item to the given index in the given group /// ///The item and group must belong to the same ListView public void MoveToGroup(ListViewItem lvi, ListViewGroup group, int indexInGroup) { ... -
它应该是transition而不是animation 。 $('.items').on('click', e => { $(e.currentTarget).find('div').css('transform', 'translateX(-100px)') }) #carousel { height: 25vh; width: 25vw; position: absolute; top: 0; left: 0; bottom: 0; right: 0; ...
-
好吧,我不确定这是否正是你想要的,但这里有一个基于你的代码的jsFiddle随机动画div的位置和不透明度。 我根据上面的评论做了更正。 更新:我已根据您的评论更新了小提琴。 我做了什么: 在movimiento函数中,我们首先必须计算当前位置,以便...... ...我们可以用它来计算新坐标的中途位置 在中间点添加一个额外的动画,以便我们可以从不透明度0动画到1。 将缓动设置为线性,因此两个动画都是相同的速度。 如果要为整个动画应用缓动值,则要复杂得多。 更新2:对不起,我在计算中途点时犯了一个错误。 固 ...
-
似乎jQuery动画遇到了相对定位项目的问题,删除了相对位置和使用的边距,现在似乎工作。 Seems jQuery animate runs into issues with relatively positioned items, removed relative position and used margin and it seems to work now.
-
这个怎么样: public override void OnBindViewHolder(RecyclerView.ViewHolder holder, int position) { myHolder = holder as MyView; if (position > mCurrentPosition) { Handler h = new Handler(); int currentAnim = Android.Resource.Animation ...
-
如上所述,NSGod将int index更改为NSUInteger index解决了这个问题 As mentioned above by NSGod, changing int index to NSUInteger index solved the problem
-
IKImageBrowserView:如何显示每个项目的工具提示?(IKImageBrowserView: how to display tooltip for every item?)[2022-08-10]
IKImageBrowserView是一个NSView,因此您可以使用以下函数添加工具提示矩形: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSView_Class/Reference/NSView.html#//apple_ref/doc/uid/20000014-SW47 对于我的实现,我将图像浏览器放在一个不调整大小的scrollview中,所以我只需要在使用 ...