<template>
	<view class="quick-action2">
		<view class="quick-action2_li" v-for="(item,index) in widget" :key="index">
			<view class="quick-action2_li-box" :style="{borderColor: item.bgColor + ';'}" @click="to(item.link.url)">
				<view class="quick-action2_li-box-icon" :style="{backgroundColor: item.bgColor + ';'}">
					<x-icon style="height: 20px;line-height: 20px;" :name="item.icon.name" size="20" color="#ffffff"></x-icon>
				</view>
				<view class="quick-action2_li-box_t">
				   <text class="quick-action2_li-box_t-p1">{{item.link.name}}</text>
				   <text class="quick-action2_li-box_t-p2">{{item.prompt}}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import mixin from '@/service/mixins'
	export default {
		mixins: [mixin],
		props:{
			widget:{}
		}
	}
</script>

<style lang="scss">
.quick-action2{
	display: flex;
	flex-wrap: wrap;
	padding: 10rpx;
	&_li{
		width: 365rpx;
		padding: 10rpx;
		box-sizing: border-box;
		&-box{
			border-style: solid;
			border-width: 1rpx;
			display: flex;
			align-items: center;
			padding: 15rpx;
			border-radius: 6rpx;
			&-icon{
				width: 80rpx;
				height: 80rpx;
				display: flex;
				align-items: center;
				justify-content: center;
				border-radius: 6rpx;
			}
			&_t{
				padding-left: 15rpx;
				width: 240rpx;
				&-p1{
					width: 225rpx;
					@include styleFont(#575962, 30rpx);
					@include onlyLineEllipsis;
				}
				&-p2{
					margin-top: 5rpx;
					width: 225rpx;
					@include styleFont(#c0c4cc, 24rpx);
					@include onlyLineEllipsis;
				}
			}
		}
	}
}
</style>
