Commit 27c9b9ff authored by yyh's avatar yyh

代码格式化

parent bd9538ae
......@@ -20,19 +20,12 @@
</template>
<script lang="ts">
import { Component, Prop, Vue, Emit } from 'vue-property-decorator';
import { Collapse, CollapseItem, Field, Button, NavBar, SwipeCell, Popup, Uploader, Picker } from 'vant';
import { Field, Popup } from 'vant';
import { TEMPLATETYPE } from '@/const/enum';
@Component({
components: {
[Collapse.name]: Collapse,
[CollapseItem.name]: CollapseItem,
[Field.name]: Field,
[Button.name]: Button,
[NavBar.name]: NavBar,
[SwipeCell.name]: SwipeCell,
[Popup.name]: Popup,
[Uploader.name]: Uploader,
[Picker.name]: Picker,
},
})
export default class AddFolder extends Vue {
......
......@@ -4,16 +4,29 @@
title="选择字段类型"
left-arrow
@click-left="onClickLeft"></van-nav-bar>
<div v-for="(item, index) in data" :key="index" class="item" @click="activeName = item.type">
<div
v-for="(item, index) in data"
:key="index"
class="item"
@click="activeName = item.type">
<div class="item-inner">
<div class="title"> {{item.title}}</div>
<div class="desc">{{item.desc}}</div>
<common-svg name="zidingyimoban-duigou" class="active" v-show="activeName === item.type"></common-svg>
</div>
<div v-if="activeName === 5 && item.type === 5" style="background:rgba(246,249,255,1);margin:0 -17px;">
<van-swipe-cell v-for="(option,index) in options" :key="index" ref="swipeCell" :stop-propagation="true">
<div
v-if="activeName === 5 && item.type === 5"
style="background:rgba(246,249,255,1);margin:0 -17px;">
<van-swipe-cell
v-for="(option,index) in options"
:key="index"
ref="swipeCell"
:stop-propagation="true">
<div style="display:flex;flex-direction:row;align-items:center;">
<common-svg name="zidingyimoban-shanchu" @click.native.stop="openSwipeCellRight(index)" style="margin:17px;"></common-svg>
<common-svg
name="zidingyimoban-shanchu"
@click.native.stop="openSwipeCellRight(index)"
style="margin:17px;"></common-svg>
<van-field v-model="options[index]" label="" placeholder="输入选项名称"></van-field>
</div>
<template #right>
......@@ -24,7 +37,6 @@
</div>
</div>
<div class="btn-group"><van-button block color="#5D7BF6" type="primary" @click="confirmWordType">确定</van-button></div>
</div>
</template>
<script lang="ts">
......
......@@ -18,7 +18,12 @@
<label for="thumb" class="file-input">
<common-svg name="tianjia" style="margin-right:10px;"></common-svg>
<span>{{imgUrl ? '已上传': '添加模板封面'}}</span>
<van-image :src="imgUrl" v-if="imgUrl" height="24px" width="33px" fit="contain"></van-image>
<van-image
:src="imgUrl"
v-if="imgUrl"
height="24px"
width="33px"
fit="contain"></van-image>
<common-svg name="jinru"></common-svg>
</label>
<div class="btn-group">
......
......@@ -6,7 +6,10 @@
:style="{height: '100%'}"
class="base-info select-template">
<div class="preview">
<template-detail :detailInformation="proof" class="detail" style="padding:0 17px;"></template-detail>
<template-detail
:detailInformation="proof"
class="detail"
style="padding:0 17px;"></template-detail>
<div class="btn-group">
<div role="button" class="cancel" @click="cancel">取消</div>
<div role="button" class="confirm" @click="employ">使用</div>
......
......@@ -6,7 +6,7 @@
:style="{height: '80%'}"
class="base-info select-template">
<div style="position:relative;margin-bottom:26px;" class="header">
<div > <div v-show="!showDetailb" @click="goBack"><common-svg name="fanhui2" ></common-svg> 返回</div></div>
<div><div v-show="!showDetailb" @click="goBack"><common-svg name="fanhui2" ></common-svg> 返回</div></div>
<span>选择模版</span>
<common-svg
@click.native="cancel"
......@@ -47,7 +47,11 @@
<div class="addFolder" @click="addFolder">+添加文件夹</div>
<van-tabs v-model="active" >
<van-tab title="系统模板">
<div v-for="(folder,index) in systemFolderList" :key="index" class="item" @click="selectFolder(folder)">
<div
v-for="(folder,index) in systemFolderList"
:key="index"
class="item"
@click="selectFolder(folder)">
<van-image
class="thumb"
:src="folder.folder_simg_url"
......@@ -59,7 +63,11 @@
</div>
</van-tab>
<van-tab title="我的模板">
<div v-for="(folder,index) in userFolderList" :key="index" class="item" @click="selectFolder(folder)">
<div
v-for="(folder,index) in userFolderList"
:key="index"
class="item"
@click="selectFolder(folder)">
<van-image
class="thumb"
:src="folder.folder_simg_url"
......@@ -78,9 +86,18 @@
<router-link to="addTemplate" tag="p" style="color:#3F79FE;">+添加模板</router-link>
</header>
<van-radio-group v-model="radio" class="template-list">
<van-radio :name="template.id" v-for="(template, index) in currentFolder.detail" :key="index" @click="selectTemplate(template.id)">
<van-radio
:name="template.id"
v-for="(template, index) in currentFolder.detail"
:key="index"
@click="selectTemplate(template.id)">
<div>
<van-image round :src="template.s_image_url" width="50px" height="50px" fit="contain"></van-image>
<van-image
round
:src="template.s_image_url"
width="50px"
height="50px"
fit="contain"></van-image>
<div>{{template.name}}</div>
</div>
<template #icon="props">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment