在我的sass代码中,我有内联注释,我希望在崇高的文本中删除它们.是否可以永久删除所有评论内容?
@function emCalc($values) {
$emValues: '';
$max: length($values); //Get the total number of parameters passed
@for $i from 1 through $max {
$value: (nth($values, $i)); //Take the individual parameter
$value: $value / ($value * 0 + 1); //Doing this gets you one unit (1px)
$value: $value / $em-base * 1em; //Divide the px value by emBase and return the value as em
$emValues: #{$emValues + $value}; //Append to array
@if $i < $max {
$emValues: #{$emValues + " "}; //Adding …Run Code Online (Sandbox Code Playgroud) 每次选择模板中的复选框时,我都想在聚合物元素中添加一个类或更改聚合物元素的属性.
由于我的元素使用了label for属性,因此我在标记中实例化元素时绑定了复选框的ID
<label for="{{uniqueid}}" on-tap="{{toggle}}" />
<input type="checkbox" id="{{uniqueid}}" class="select" checked="{{checker}}">
<img src="{{image}}" alt="" class="prod-img">
<div class="grid-details">
<span>{{designer}}</span>
<span>{{product}}</span>
<span>{{currency}} {{price}}</span>
<span>Shipped from {{info}}</span>
</div>
</label>
Run Code Online (Sandbox Code Playgroud)
然后我会像这样调用元素
<gmselect-element uniqueid="four" image="http://i.imgur.com/fkq1QKq.jpg" designer="CUCARELIQUIA" product="Castellano Suede Bag Redder" info="Gijon, Spain" price="650" currency="$"></gmselect-element>
Run Code Online (Sandbox Code Playgroud)
我的切换功能如下所示
toggle: function() {
this.$.grid.setAttribute("class", "grid true");
this.setAttribute("selected", "true");
}
Run Code Online (Sandbox Code Playgroud)
但是,我不想在此处将其设置为true,而是要检查复选框的checked属性的值.由于ID不是静态的,我无法使用$功能获取元素.我也不知道如何逃避胡子中绑定的数据以在方法中获取其值.
我有一个如下的迁移
$table->increments('id');
$table->integer('order_num');
$table->timestamps();
Run Code Online (Sandbox Code Playgroud)
主键应该是id和order_num的组合.如果我把下面的代码,它说我正在尝试添加2个主键(因为增量也是主键).有没有办法告诉雄辩,我正试图将两者结合在一起
$table->primary(['course_id', 'order_num']);
Run Code Online (Sandbox Code Playgroud)