dongxu7408 2019-04-18 19:01
浏览 106

更改语法ul,li,span

Focus please where start tag

    <ul class="checkbox-list checkbox-list--custom">
        <li class="test container container--sm" n:foreach="$answers as $key => $answer">
            <input type="checkbox" disabled n:attr="checked => $isChecked($key)">
            <span n:class="$isCorrect($key) ? 'text-success', $isIncorrect($key) ? 'test1'">
                {$answer->getAnswerText()}
            </span>
        </li>
    </ul>

I would like move content inside span element to li element

This is current status This is required status

  • 写回答

1条回答 默认 最新

  • drxdn40242 2019-04-19 15:53
    关注

    As the error message tells you, you cannot currently mix class and n:class attributes in a single element. However, you can move the classes from the class attribute to n:class and that should work:

    <ul class="checkbox-list checkbox-list--custom">
        <li n:foreach="$answers as $key => $answer" n:class="test, container, container--sm, $isCorrect($key) ? text-success, $isIncorrect($key) ? test1">
            <input type="checkbox" disabled n:attr="checked => $isChecked($key)">
            {$answer->getAnswerText()}
        </li>
    </ul>
    

    It also should not be necessary to quote the classes in n:class attribute.

    评论

报告相同问题?

悬赏问题

  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类
  • ¥15 微带串馈天线阵列每个阵元宽度计算
  • ¥15 keil的map文件中Image component sizes各项意思