You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
apply-assistant-v3/components/panel/formItem.vue

153 lines
3.8 KiB
Vue

6 months ago
<template>
<view class="g-components-item">
3 months ago
<view class="m-set g_bg_f g_radius_8 u-skeleton ">
6 months ago
<view
class="item g_flex_row_start"
v-for="(item, index) in list"
:key="index"
:hover-class="item.type == 'slot' ? 'none' : 'g_bg_e'"
@click="handleClickItem(item, index)"
:style="{
'padding-top': (item.pColumn ? item.pColumn : 19) + 'px',
'padding-bottom': (item.pColumn ? item.pColumn : 19) + 'px',
'padding-left': (item.pRow ? item.pRow : 10) + 'px',
'padding-right': (item.pRow ? item.pRow : 10) + 'px',
}"
>
3 months ago
<view class="g_pl_10 g_pr_10 g_flex_column_center ">
<view class="g_flex_1 g_flex_row_start flex_center u-skeleton-fillet" :class="item.require ? 'labelRequire' : ''">
<view
class="t-icon g_h_22 g_w_22 g_pl_7 g_mr_5"
style="width: 22px; height: 22px; background-repeat: no-repeat"
:style="{
width: item.icon == 'icon-wodetuandui' ? '24px' : '22px',
height: item.icon == 'icon-wodetuandui' ? '24px' : '22px',
}"
v-if="item.icon && item.itype != 'icon'"
:class="'t-' + item.icon"
6 months ago
></view>
3 months ago
<view class="g_flex_c g_h_22 g_w_22 g_mr_5" v-if="item.icon && item.itype == 'icon'">
<i
class="iconfont"
:class="item.icon"
5 months ago
:style="{
3 months ago
'font-size': '24px',
5 months ago
}"
></i>
</view>
3 months ago
<view class="g_flex_column_center g_c_3 g_fs_16 ">{{ item.label }}</view>
6 months ago
</view>
</view>
3 months ago
<view class="g_flex_1 g_flex_column_center u-skeleton-fillet">
6 months ago
<view class="g_flex_row_end">
5 months ago
<view class="g_flex_row_end flex_center">
6 months ago
<!-- 通用类型 -->
3 months ago
<view class="g_fs_16 g_ell_1 g_lh_1_2 g_c_8" style="max-width: 45vw" :class="item.fontColor" v-if="item.result">{{ item.result }}</view>
6 months ago
<!-- 迷你二维码 -->
<view class="g_flex_rowRight_columnCenter" v-if="item.tip == 'code'">
<i class="iconfont icon-a-erweimabeifen2 g_fs_21 g_c_c" style="font-size: 21px"></i>
</view>
<!-- 头像类 -->
<view class="g_flex_rowRight_columnCenter" v-if="item.tip == 'avatar'">
3 months ago
<img :src="item.value" alt="" class="g_w_48 g_h_48" style="border-radius: 13px" />
6 months ago
</view>
<!-- 右箭头 -->
5 months ago
<view class="g_flex_column_center flex_center" v-if="item.type != 'slot'">
6 months ago
<i class="iconfont icon-gengduo11 g_c_c"></i>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
3 months ago
<u-skeleton :loading="loading" :animation="true" bgColor="#fff"></u-skeleton>
6 months ago
</template>
<script>
/* item
* 示例我的页面中的设置展示UI
*/
export default {
data() {
return {
localBaseImg: "",
};
},
props: {
list: {
type: Array,
default: () => {
return [];
},
},
3 months ago
loading: {
type: Boolean,
default: false,
}
6 months ago
},
created() {
this.localBaseImg = this.G.store().localBaseImg;
},
methods: {
// 当前行
handleClickItem($item, $index) {
this.$emit("clickItem", {
item: $item,
index: $index,
});
},
},
};
</script>
<style lang="scss">
.g-components-item {
.m-set {
width: calc(100% - 40rpx);
margin: 0 auto;
.item {
3 months ago
position: relative;
6 months ago
// border-bottom: 1rpx solid #eee;
3 months ago
&:after {
content: "";
6 months ago
position: absolute;
3 months ago
bottom: 0;
left: 16px;
6 months ago
border-bottom: 1rpx solid #eee;
height: 1rpx solid #eee;
width: calc(100vw - 52px);
}
&:last-child {
border-bottom: none;
3 months ago
&:after {
content: none;
6 months ago
}
}
}
.labelRequire {
&::afrer {
content: "*";
color: #ff4400;
margin-top: 8px;
margin-right: 2px;
}
}
}
.btn-text {
.btn-con {
border-left: 1rpx solid #eee;
padding: 0 0 0 16px;
background-color: transparent;
border-radius: 0;
height: 40rpx;
line-height: 40rpx;
}
}
}
</style>