diff --git a/src/renderers/Carousel.tsx b/src/renderers/Carousel.tsx index 4e3eeaa2..acc61912 100644 --- a/src/renderers/Carousel.tsx +++ b/src/renderers/Carousel.tsx @@ -38,6 +38,15 @@ const defaultSchema = { type: 'tpl', tpl: ` <% if (data.hasOwnProperty('image')) { %> +
+ <% if (data.hasOwnProperty('title')) { %> +
<%= data.title %>
+ <% } if (data.hasOwnProperty('description')) { %> +
<%= data.description %>
+ <% } %> + <% } else if (data.hasOwnProperty('html')) { %> + <%= data.html %>" + <% } else if (data.hasOwnProperty('image')) { %>
<% if (data.title) { %>
<%= data.title %>
@@ -45,17 +54,8 @@ const defaultSchema = {
<%= data.description %>
<% } %> <% } else if (data.hasOwnProperty('html')) { %> - <%= data.html %>" - <% } else if (data.image) { %> -
- <% if (data.title) { %> -
<%= data.title %>
- <% } if (data.description) { %> -
<%= data.description %>
- <% } %> - <% } else if (data.html) { %> <%= data.html %> - <% } else if (data.item) { %> + <% } else if (data.hasOwnproperty('item')) { %> <%= data.item %> <% } else { %> <%= '未找到渲染数据' %>