骏飞影业微信小程序API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

26 lines
1.4 KiB

<div class="row dd_input_group no-gutters {$form[type].extra_class|default=''}" id="form_group_{$form[type].name}">
<label class="col-3 col-sm-2 col-md-2 col-lg-2 col-xl-1 dd_input_l col-form-label {notempty name="form[type].required"}is-required{/notempty}" for="{$form[type].name}">{$form[type].title|htmlspecialchars}</label>
<div class="col-9 col-sm-9 col-md-9 col-lg-8 col-xl-7">
<textarea id="{$form[type].name}" name="{$form[type].name}" {$form[type].extra_attr|raw}>{$form[type].value}</textarea>
</div>
{notempty name="form[type].tips"}
<div class="col-12 offset-sm-2 offset-md-2 offset-lg-0 offset-xl-0 col-sm-10 col-md-10 col-lg-2 col-xl-4 dd_ts">
<small class="text-muted">
<i class="fa fa-info-circle"></i> {$form[type].tips|raw}
</small>
</div>
{/notempty}
</div>
<script>
$(function () {
// CodeMirror
var codeEditor = CodeMirror.fromTextArea(document.getElementById("{$form[type].name}"), {
mode: "{$form[type].mode}", // 编辑器语言
theme: "{$form[type].theme}", // 编辑器主题
lineNumbers: true, // 显示行号
showCursorWhenSelecting: true, // 文本选中时显示光标
lineWrapping: true, // 代码折叠
});
codeEditor.setSize('auto',"{$form[type].height}px");
})
</script>