<!--packageE/title/title.wxml-->
<wxs module="util">
  var inOf = function(val, str) { if (val) {return val.indexOf(str) }};
  module.exports.inOf = inOf;
</wxs>
<veiw class="component-wrapper" style="padding-top: {{datas.padding_top}}px; padding-bottom: {{datas.padding_bottom}}px; padding-left: {{datas.padding_left}}px; padding-right: {{datas.padding_right}}px; background-color: {{datas.preview_color.color}}; background-image: url({{datas.preview_color.isColor == 2? datas.preview_color.image: ''}}); background-size: 100% auto; bakcground-position: center;">
  <view wx:if="{{datas.show_title}}" style="font-weight: {{util.inOf(datas.text_style,'1') > -1 ? 'bold':''}}; font-style: {{util.inOf(datas.text_style,'2') > -1 ? 'italic':''}}; text-align: {{datas.text_align}}; font-size: {{datas.text_size}}px; color: {{datas.text_color}};">{{ datas.title || '标题' }}</view>

  <view wx:if="{{datas.show_second_title}}" style="font-weight: {{util.inOf(datas.second_text_style,'1') > -1 ? 'bold':''}}; font-style: {{util.inOf(datas.second_text_style,'2') > -1 ? 'italic':'' }}; text-align: {{datas.second_text_align}}; font-size: {{datas.second_text_size}}px; color: {{datas.second_text_color}};">{{ datas.second_title || '副标题' }}</view>
</veiw>
