123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <cm-construct v-bind:data="data[index]" class="component-title">
- <!-- 预览 -->
- <template slot="preview">
- <div class="preview-box" v-bind:style="{textAlign: nc.alignStyle, backgroundColor : nc.backgroundColor, margin : nc.marginTop + 'px 15px 0'}">
- <!-- 图一 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-if="nc.style == 1">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, padding: '0 7px' }">{{ nc.title }}</span>
- <span class="line-left" v-bind:style="{ background: nc.textColor }"></span>
- <span class="line-right" v-bind:style="{ background: nc.textColor }"></span>
- </div>
- </div>
- <!-- 图二 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 2">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px' }">{{ nc.title }}</span>
- </div>
- <div v-bind:class="'text-title-con'+ nc.style">
- <span class="inner-line" v-bind:style="{ background: nc.textColor }"></span>
- <span class="line-triangle" v-bind:style="{ borderColor: nc.textColor, opacity: nc.textColor ? 1 : 0 }"></span>
- </div>
- </div>
- <!-- 图三 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 3">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px' }">{{ nc.title }}</span>
- </div>
- <div v-bind:class="'text-title-con'+ nc.style">
- <span class="inner-line" v-bind:style="{ background: nc.textColor }"></span>
- <span class="line-short" v-bind:style="{ background: nc.textColor, opacity: nc.textColor ? 1 : 0 }"></span>
- </div>
- </div>
- <!-- 图四 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 4">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px' }">{{ nc.title }}</span>
- </div>
- <div class="text-title-line">
- <span class="line-left" v-bind:style="{ background: nc.textColor }"></span>
- <span class="line-center" v-bind:style="{ borderColor: nc.textColor, opacity: nc.textColor ? 1 : 0 }"></span>
- <span class="line-right" v-bind:style="{ background: nc.textColor }"></span>
- </div>
- </div>
- <!-- 图五 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 5">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-block" v-bind:style="{ borderColor: nc.textColor, opacity: nc.textColor ? 1 : 0 }">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px', borderColor: nc.textColor }">{{ nc.title }}</span>
- <span class="line-left" v-bind:style="{ background: nc.textColor }"></span>
- <span class="line-right" v-bind:style="{ background: nc.textColor }"></span>
- </span>
- </div>
- </div>
- <!-- 图六 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 6">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-outer" v-bind:style="{ borderColor: nc.textColor }">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px', borderColor: nc.textColor, background: '#fff' }">{{ nc.title }}</span>
- <span class="text-title-con-2" v-bind:style="{ borderColor: nc.textColor, opacity: nc.textColor ? 1 : 0 }"></span>
- </span>
- </div>
- </div>
- <!-- 图七 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 7">
- <div class="text-title-box" v-show="nc.title">
- <span class="text-title-outer" v-bind:style="{ borderColor: nc.textColor }">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : '#fff', paddingBottom: 3+'px', borderColor: nc.textColor, background: nc.textColor, opacity: nc.textColor ? 1 : 0 }">{{ nc.title }}</span>
- <span class="text-title-con-2" v-bind:style="{ borderColor: nc.textColor, opacity: nc.textColor ? 1 : 0 }"></span>
- </span>
- </div>
- </div>
- <!-- 图八 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 8" >
- <div class="text-title-box" v-show="nc.title" v-bind:style="{ textAlign: 'left'}">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px' }">{{ nc.title }}</span>
- <span class="line-left" v-bind:style="{ height: (nc.fontSize*1 + 2) + 'px', background: nc.textColor}"></span>
- </div>
- </div>
- <!-- 图九 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 9" >
- <div class="text-title-box" v-show="nc.title">
- <div class="left"></div>
- <div class="center">
- <div><img src="{$resourceurl}/text/img/style9-1.png" /></div>
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px', fontWeight: nc.fontWeight }">{{ nc.title }}</span>
- <div><img src="{$resourceurl}/text/img/style9-2.png" /></div>
- </div>
- <div v-show="nc.isShowMore == 1" class="more" v-bind:style="{ color: nc.btnColor, opacity: nc.btnColor ? 1 : 0 }">{{nc.moreText}} <i class="iconfont iconyoujiantou"></i></div>
- </div>
- <div class="text-subTitle-box" v-show="nc.subTitle">
- <p v-show="nc.subTitle" v-bind:style="{ fontSize : nc.fontSizeSub + 'px', color: nc.colorSub, opacity: nc.colorSub ? 1 : 0 }">{{ nc.subTitle }}</p>
- </div>
- </div>
- <!-- 图十 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 10" >
- <div class="text-title-box" v-show="nc.title">
- <div class="left"></div>
- <div class="center">
- <div><img src="{$resourceurl}/text/img/style10-1.png" /></div>
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px', fontWeight: nc.fontWeight }">{{ nc.title }}</span>
- <div><img src="{$resourceurl}/text/img/style10-2.png" /></div>
- <img src="{$resourceurl}/text/img/style10-3.png" />
- </div>
- <div v-show="nc.isShowMore == 1" class="more" v-bind:style="{ color: nc.btnColor, opacity: nc.btnColor ? 1 : 0 }">{{nc.moreText}} <i class="iconfont iconyoujiantou"></i></div>
- </div>
- <div class="text-subTitle-box" v-show="nc.subTitle">
- <p v-show="nc.subTitle" v-bind:style="{ fontSize : nc.fontSizeSub + 'px', color: nc.colorSub, opacity: nc.colorSub ? 1 : 0 }">{{ nc.subTitle }}</p>
- </div>
- </div>
- <!-- 图十一 -->
- <div class="text-title" v-bind:class="'text-title-'+ nc.style" v-else-if="nc.style == 11" >
- <div class="text-title-box" v-show="nc.title">
- <div class="left">
- <span class="text-title-con" v-bind:style="{ fontSize : nc.fontSize + 'px', color : nc.textColor, opacity: nc.textColor ? 1 : 0, paddingBottom: 3+'px', fontWeight: nc.fontWeight }">{{ nc.title }}</span>
- <div class="text-subTitle-box" v-show="nc.subTitle">
- <p v-show="nc.subTitle" v-bind:style="{ fontSize : nc.fontSizeSub + 'px', color: nc.colorSub, opacity: nc.colorSub ? 1 : 0 }">{{ nc.subTitle }}</p>
- </div>
- </div>
- <div v-show="nc.isShowMore == 1" class="more" v-bind:style="{ color: nc.btnColor, opacity: nc.btnColor ? 1 : 0 }"><span>{{nc.moreText}}</span> <i class="iconfont iconyoujiantou"></i></div>
- <img class="left-img" src="{$resourceurl}/text/img/style11-1.png" />
- <img class="right-img" src="{$resourceurl}/text/img/style11-2.png" />
- </div>
- </div>
- </div>
- </template>
- <!-- 编辑 -->
- <template slot="edit">
- <template v-if="nc.lazyLoad">
- <!-- <text-style></text-style> -->
- </template>
-
- <!-- <h3 class="template-title">文本名</h3>
- <div class="layui-form-item ns-padding-left">
- <input type="text" v-model="nc.title" v-bind:id="'title_'+index" placeholder="请输入文本" class="layui-input">
- </div> -->
- <div class="layui-form-item">
- <label class="layui-form-label sm">文本名称</label>
- <div class="layui-input-block">
- <input type="text" v-model="nc.title" v-bind:id="'title_'+index" placeholder="请输入文本" class="layui-input">
- </div>
- </div>
- <sel-link v-bind:data="{ field : nc.link }"></sel-link>
-
- <div class="template-edit-title">
- <h3>文字显示样式</h3>
- <i class="layui-icon layui-icon-down" onclick="closeBox(this)"></i>
- </div>
-
- <div class="template-edit-wrap">
- <!-- <font-size v-bind:data="{ value : nc.fontSize }"></font-size> -->
- <!-- <slide v-bind:data="{ field : 'fontSize', label : '文字大小', max: 30, min: 12 }"></slide> -->
- <!-- <text-align></text-align> -->
- <template v-if="nc.lazyLoad">
- <text-font-size v-bind:data="{ field : 'fontSize', label : '文字大小', max: 16 }"></text-font-size>
- <color v-bind:data="{ field : 'textColor', 'label' : '文本颜色', 'defaultcolor': '#333333' }"></color>
- <font-weight v-show="nc.sub == 1"></font-weight>
- <!-- <text-align-style></text-align-style> -->
- </template>
- </div>
-
- <!-- <hr v-show="nc.sub == 1" /> -->
-
-
- <!-- <hr v-show="nc.sub == 1" /> -->
-
- <!-- 副文本 -->
- <div v-show="nc.sub == 1">
- <div class="template-edit-title">
- <h3>副标题</h3>
- <i class="layui-icon layui-icon-down" onclick="closeBox(this)"></i>
- </div>
-
- <div class="template-edit-wrap">
- <div class="layui-form-item">
- <label class="layui-form-label sm">标题文字</label>
- <div class="layui-input-block">
- <input type="text" v-model="nc.subTitle" v-bind:id="'subTitle_'+index" placeholder="请输入标题文字" class="layui-input">
- </div>
- </div>
- <!-- <font-size v-bind:data="{ field : 'fontSizeSub', 'label' : '文字大小' }"></font-size> -->
- <template v-if="nc.lazyLoad">
- <text-font-size v-bind:data="{ field : 'fontSizeSub', label : '文字大小', max: 14 }"></text-font-size>
- </template>
- <!-- <slide v-bind:data="{ field : 'fontSize', label : '文字大小', max: 30, min: 12 }"></slide> -->
- <color v-bind:data="{ field : 'colorSub', 'label' : '文字颜色', 'defaultcolor': '#999' }"></color>
- </div>
- </div>
-
- <!-- <hr v-show="nc.sub == 1" /> -->
-
- <!-- “更多”按钮设置 -->
- <div v-show="nc.sub == 1">
- <div class="template-edit-title">
- <h3>“更多”按钮设置</h3>
- <i class="layui-icon layui-icon-down" onclick="closeBox(this)"></i>
- </div>
-
- <div class="template-edit-wrap">
- <template v-if="nc.lazyLoad">
- <text-more-btn></text-more-btn>
- </template>
- <div class="layui-form-item">
- <label class="layui-form-label sm">按钮文字</label>
- <div class="layui-input-block">
- <input type="text" v-model="nc.moreText" v-bind:id="'moreText'+index" placeholder="查看更多 >" class="layui-input">
- </div>
- </div>
- <color v-bind:data="{ field : 'btnColor', 'label' : '文字颜色', 'defaultcolor': '#999' }"></color>
- <nc-link v-bind:data="{ field : nc.moreLink }"></nc-link>
- </div>
- </div>
-
- <div class="template-edit-title">
- <h3>其他设置</h3>
- <i class="layui-icon layui-icon-down" onclick="closeBox(this)"></i>
- </div>
-
- <div class="template-edit-wrap">
- <color v-bind:data="{ field : 'backgroundColor', 'label' : '背景颜色' }"></color>
- <template v-if="nc.lazyLoad">
- <text-empty></text-empty>
- </template>
- </div>
-
- <!-- 弹框 -->
- <div class="style-list-box">
- <div class="style-list layui-form">
- <div class="style-list-con">
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 1}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板一</span>
- <img src="{$resourceurl}/text/img/style1.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 2}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板二</span>
- <img src="{$resourceurl}/text/img/style2.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 3}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板三</span>
- <img src="{$resourceurl}/text/img/style3.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 4}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板四</span>
- <img src="{$resourceurl}/text/img/style4.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 5}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板五</span>
- <img src="{$resourceurl}/text/img/style5.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 6}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板六</span>
- <img src="{$resourceurl}/text/img/style6.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 7}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板七</span>
- <img src="{$resourceurl}/text/img/style7.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 8}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="0" />
- <span class="layui-hide">模板八</span>
- <img src="{$resourceurl}/text/img/style8.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 9}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="1" />
- <span class="layui-hide">模板九</span>
- <img src="{$resourceurl}/text/img/style9.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 10}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="1" />
- <span class="layui-hide">模板十</span>
- <img src="{$resourceurl}/text/img/style10.png" />
- </div>
-
- <div class="style-li" v-bind:class="{'selected ns-border-color': nc.style == 11}">
- <input type="hidden" v-bind:class="'style-li-'+ nc.style" value="1" />
- <span class="layui-hide">模板十一</span>
- <img src="{$resourceurl}/text/img/style11.png" />
- </div>
- </div>
-
- <input type="hidden" name="style">
- <input type="hidden" name="sub" />
- <input type="hidden" name="style_name" />
- </div>
- </div>
- </template>
-
- <!-- 资源 -->
- <template slot="resource">
- <js>
- var textResourcePath = "{$resourceurl}";
- </js>
- <css src="{$resourceurl}/text/css/style.css"></css>
- <js src="{$resourceurl}/text/js/style.js"></js>
- </template>
- </cm-construct>
|