小编Kev*_*ton的帖子

在Shopify液体模板中使用vue.js

这应该是简单的,但尽管搜索我无法找到任何解决方案.如何在液体文件中使用vue模板标签?由于Vue和liquid都使用相同的花括号,我无法渲染任何视图数据:

<img src="{{ product.featured_image }}" />
Run Code Online (Sandbox Code Playgroud)

结果是:

<img src>
Run Code Online (Sandbox Code Playgroud)

我的父视图组件中有36个产品.

当我尝试使用自定义分隔符时:

new Vue({
  delimiters: ['@{{', '}}'],
Run Code Online (Sandbox Code Playgroud)

它不会用Vue解析:

  获取https://inkkas.com/collections/@ 404(未找到)

更新:我能够使用v-bind访问Vue数据:但我仍然需要能够使用分隔符.

liquid shopify vue.js

9
推荐指数
1
解决办法
3229
查看次数

Laravel将不相关的数据传递到寄存器视图

我需要使用内置的auth将数据从不相关的模型传递到寄存器视图。实现这一目标的最干净的方法是什么?

这是Auth控制器中的内容:

public function __construct(Guard $auth, Registrar $registrar)
{
    $this->auth = $auth;
    $this->registrar = $registrar;

    $this->middleware('guest', ['except' => 'getLogout']);
}
Run Code Online (Sandbox Code Playgroud)

php laravel

1
推荐指数
2
解决办法
2466
查看次数

jQuery Datatables大数据集Uncaught TypeError:无法读取未定义的属性'mData'

所以我在一个大的行集上得到一个控制台错误,我正在用PHP从数据库迭代.我正在用metronic主题初始化它.如你所见,我有我的thead和tbody.

我怀疑问题可能与输出的大小有关,可能需要使用其他方法,任何指导意见

<table id="sample_1" class="table table-striped table-bordered table-hover">
    <thead>
          <tr>
            <th class="table-checkbox">
              <input type="checkbox" class="group-checkable" data-set="#sample_1 .checkboxes"/>
            </th>
            <th>Name</th>
            <th>Source</th>
            <th>Email</th>
            <th>Customer</th>
            <th>Created</th>
            <th>Login</th>
            <th>Active</th>
            <th>Role</th>
            <th>Incentive</th>
            <th>View</th>
            <th>Switch</th>
            <th>Email</th>
          </tr>        
        </thead>
      <tbody>

      <?php
        $users=user::get_all($filter);
        if($users){
          foreach($users as $row){
            $customer=user::get_cutomer_name_by_source_id($row['source_id']);
            ?>
            <tr class='odd gradeX'>
              <td><input type='checkbox' class='checkboxes' value='1'/></td>
              <td><?php echo $row['first_name']." ".$row['last_name']; ?></td>
              <td><?php echo $row['source_id']; ?></td>
              <td><?php echo $row['email']; ?></td>
              <td><?php echo $customer; ?></td>
              <td><?php echo date("m/d/Y", strtotime($row["created"])); ?></td>
              <td><?php if($row['login']!=NULL){echo date("m/d/Y",$row['login']);} ?></td>
              <td><?php if($row['active']==1){echo "Yes";}else{echo "No";} ?></td>
              <td><?php …
Run Code Online (Sandbox Code Playgroud)

jquery datatables metronic

1
推荐指数
1
解决办法
1万
查看次数

标签 统计

datatables ×1

jquery ×1

laravel ×1

liquid ×1

metronic ×1

php ×1

shopify ×1

vue.js ×1