<template>
|
<div>
|
<Card>
|
<!-- 搜索表单 -->
|
<Form
|
ref="searchForm"
|
@keydown.enter.native="handleSearch"
|
:model="searchForm"
|
inline
|
:label-width="80"
|
class="search-form"
|
>
|
<FormItem label="奖品名" prop="prizeName">
|
<Input
|
type="text"
|
v-model="searchForm.prizeName"
|
placeholder="请输入奖品名"
|
clearable
|
@on-clear="handleSearch"
|
@on-change="handleSearch"
|
style="width: 180px"
|
/>
|
</FormItem>
|
<FormItem label="奖品类型" prop="prizeType">
|
<Select
|
v-model="searchForm.prizeType"
|
placeholder="请选择奖品类型"
|
style="width: 180px"
|
clearable
|
@on-clear="handleSearch"
|
@on-change="handleSearch"
|
>
|
<Option
|
v-for="item in typeSelect"
|
:value="item.value"
|
:key="item.id"
|
>
|
{{ item.label }}
|
</Option>
|
</Select>
|
</FormItem>
|
|
<Button
|
@click="handleSearch"
|
type="primary"
|
icon="ios-search"
|
class="search-btn"
|
>搜索</Button>
|
<Button
|
@click="resetSearch"
|
icon="md-refresh"
|
style="margin-left: 8px"
|
>重置</Button>
|
</Form>
|
|
<!-- 操作按钮 -->
|
<Row class="operation">
|
<Button @click="openAdd" type="primary" icon="md-add">新增奖品</Button>
|
</Row>
|
|
<!-- 奖品表格 -->
|
<Table
|
:loading="loading"
|
border
|
:columns="columns"
|
:data="prizeList"
|
ref="table"
|
class="prize-table"
|
>
|
<template slot-scope="{ row }" slot="prizeCoverUrl">
|
<img
|
:src="row.prizeCoverUrl"
|
alt="奖品封面"
|
class="thumbnail"
|
@click="previewImage(row.prizeCoverUrl)"
|
>
|
</template>
|
<!-- 操作按钮插槽 -->
|
<template slot-scope="{ row }" slot="action">
|
<div class="action-btns">
|
<Button
|
type="info"
|
size="small"
|
@click="detail(row)"
|
>详情</Button>
|
<Button
|
type="info"
|
size="small"
|
@click="openEdit(row)"
|
>编辑</Button>
|
<Button
|
type="error"
|
size="small"
|
@click="delById(row)"
|
>删除</Button>
|
|
</div>
|
</template>
|
</Table>
|
|
<!-- 分页 -->
|
<Row type="flex" justify="end" class="page-footer">
|
<Page
|
:current="searchForm.pageNumber"
|
:total="total"
|
:page-size="searchForm.pageSize"
|
@on-change="changePage"
|
@on-page-size-change="changePageSize"
|
:page-size-opts="[10, 20, 50]"
|
size="small"
|
show-total
|
show-elevator
|
show-sizer
|
></Page>
|
</Row>
|
|
<!-- 奖品编辑/新增模态框 -->
|
<Modal
|
v-model="modelShow"
|
:title="modelTitle"
|
@on-cancel="modelClose"
|
width="1200"
|
:mask-closable="false"
|
>
|
<Form ref="form" :model="prizeFrom" :label-width="100" :rules="rules">
|
<Row :gutter="16">
|
<Col span ="12">
|
<FormItem label="奖品类型" prop="prizeType">
|
<Select
|
v-model="prizeFrom.prizeType"
|
placeholder="请选择奖品类型"
|
style="width: 180px"
|
clearable
|
>
|
<Option
|
v-for="item in typeSelect"
|
:value="item.value"
|
:key="item.id"
|
>
|
{{ item.label }}
|
</Option>
|
</Select>
|
</FormItem>
|
</Col>
|
<Col span ="24">
|
<!-- <div >-->
|
<FormItem label="已选优惠劵" prop="couponId" v-if="prizeFrom.prizeType === 'coupon'" style="margin-bottom: 20px">
|
<Input :disabled="true" style="width: 30%;margin-bottom: 20px" v-model="showCoupon" placeholder="请点击选择表格内优惠劵"></Input>
|
<Table
|
:loading="couponLoading"
|
border
|
:columns="couponColumns"
|
:data="couponData"
|
ref="table"
|
@on-current-change="handleRowClick"
|
highlight-row
|
></Table>
|
<Row type="flex" justify="center" class="mt_10">
|
<Page
|
:current="couponSearchForm.pageNumber"
|
:total="couponTotal"
|
:page-size="couponSearchForm.pageSize"
|
@on-change="couponChangePage"
|
@on-page-size-change="couponChangePageSize"
|
:page-size-opts="[10, 20, 50]"
|
size="small"
|
show-total
|
show-elevator
|
show-sizer
|
></Page>
|
</Row>
|
</FormItem>
|
<!-- </div>-->
|
</Col>
|
<Col span="24">
|
<FormItem label="奖品名称" prop="prizeName">
|
<Input
|
v-model="prizeFrom.prizeName"
|
placeholder="请输入奖品名称"
|
clearable
|
style="width: 180px"
|
/>
|
</FormItem>
|
</Col>
|
<Col span="12">
|
<FormItem label="奖品内容" prop="prizeContent" :label-width="100">
|
<Input v-model="prizeFrom.prizeContent"
|
style="width: 300px" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="请输入"></Input>
|
</FormItem>
|
</Col>
|
<Col span="12">
|
<FormItem label="奖品描述" prop="prizeDes" :label-width="100">
|
<Input v-model="prizeFrom.prizeDes"
|
style="width: 300px" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="请输入"></Input>
|
</FormItem>
|
</Col>
|
<Col span="24">
|
<FormItem label="奖品封面:" prop="prizeCover">
|
<Upload
|
v-if="!coverTempUrl"
|
:before-upload="(file) => handleBeforeUpload(file, 'cover')"
|
:format="['jpg','jpeg','png','gif']"
|
:max-size="20480"
|
action=""
|
accept="image/*"
|
>
|
<Button icon="ios-cloud-upload-outline" >上传封面文件</Button>
|
</Upload>
|
<div v-else class="upload-file-info">
|
<img :src="coverTempUrl" alt="奖品封面" class="preview-image-limit">
|
<Button type="text" @click="handleRemove('cover')">删除</Button>
|
</div>
|
|
</FormItem>
|
</Col>
|
<Col span="24">
|
<FormItem label="奖品图片:" prop="prizeImg">
|
|
<Upload
|
v-if="!imgTempUrl"
|
:before-upload="(file) => handleBeforeUpload(file, 'content')"
|
:format="['jpg','jpeg','png','gif']"
|
:max-size="20480"
|
action=""
|
accept="image/*"
|
>
|
<Button icon="ios-cloud-upload-outline" >上传图片</Button>
|
</Upload>
|
<div v-if="imgTempUrl" class="upload-file-info">
|
<img :src="imgTempUrl" alt="奖品图片" class="preview-image-limit">
|
<Button type="text" @click="handleRemove('content')">删除</Button>
|
</div>
|
|
<!-- 基于elementUi的上传组件 el-upload end-->
|
</FormItem>
|
</Col>
|
|
|
|
</Row>
|
</Form>
|
|
<div slot="footer">
|
<Button @click="modelClose">取消</Button>
|
<Button type="primary" :loading="submitLoading" @click="saveOrUpdate">提交</Button>
|
</div>
|
</Modal>
|
<!-- 图片预览模态框 -->
|
<Modal v-model="previewVisible" title="图片预览" footer-hide>
|
<img :src="previewImageUrl" class="preview-image">
|
</Modal>
|
|
<!-- 详情-->
|
<Modal
|
v-model="infoModalShow"
|
title="奖品详情"
|
@on-cancel="infoModelClose"
|
width="800"
|
:mask-closable="false"
|
>
|
<div class="detail-container">
|
<Row :gutter="16">
|
<Col span="12">
|
<div class="detail-item">
|
<label>奖品名称:</label>
|
<span>{{ detailData.prizeName }}</span>
|
</div>
|
</Col>
|
<Col span="12">
|
<div class="detail-item">
|
<label>奖品类型:</label>
|
<span>
|
{{replaceText(detailData.prizeType)}}</span>
|
</div>
|
</Col>
|
<Col span="12">
|
<div class="detail-item">
|
<label>奖品内容:</label>
|
<span>{{ detailData.prizeContent}}</span>
|
</div>
|
</Col>
|
<Col span="12">
|
<div class="detail-item">
|
<label>奖品描述:</label>
|
<span>{{ detailData.prizeDes}}</span>
|
</div>
|
</Col>
|
|
<Col span="24">
|
<div class="detail-item">
|
<label>奖品封面:</label>
|
<div v-if="detailData.prizeCoverUrl" class="detail-image">
|
<img
|
:src="detailData.prizeCoverUrl" alt="奖品封面"
|
class="preview-image-limit"
|
>
|
</div>
|
<span v-else>-</span>
|
</div>
|
</Col>
|
<Col span="24">
|
<div class="detail-item">
|
<label>奖品图片:</label>
|
<div v-if="detailData.prizeImgUrl" class="detail-image">
|
<img :src="detailData.prizeImgUrl" alt="奖品图片" class="preview-image-limit">
|
</div>
|
<span v-else>-</span>
|
</div>
|
</Col>
|
|
</Row>
|
</div>
|
|
</Modal>
|
|
|
</Card>
|
</div>
|
</template>
|
|
<script>
|
import {
|
getPage,
|
detail,
|
edit,
|
add,
|
del,
|
canUpDatePrizeDraw
|
} from '@/api/prize.js'
|
import {delByKey, uploadFileByLmk} from "../../api/common";
|
import {promotionsScopeTypeRender, promotionsStatusRender} from "../../utils/promotions";
|
import {getPlatformCouponList} from "../../api/promotion";
|
|
export default {
|
name: "prize",
|
watch: {
|
'prizeFrom.prizeType'(newVal) {
|
if (newVal === 'coupon') {
|
this.getCouponDataList(); // 加载优惠券列表
|
} else {
|
this.prizeFrom.couponId = ''; // 清空已选的优惠券
|
}
|
}
|
},
|
data() {
|
return {
|
infoModalShow:false,
|
detailData: {},
|
showCoupon:'',
|
coverTempUrl:null,
|
imgTempUrl:null,
|
// 图片预览
|
previewVisible: false,
|
previewImageUrl: '',
|
|
//优惠劵
|
selectedRowId:'',
|
couponTotal:0,
|
couponData:[],
|
couponLoading:false,
|
couponColumns: [
|
// 表头
|
{
|
title: "优惠券名称",
|
key: "couponName",
|
width: 180,
|
tooltip: true,
|
},
|
{
|
title: "面额/折扣",
|
key: "price",
|
width: 150,
|
render: (h, params) => {
|
if (params.row.price) {
|
return h("priceColorScheme", {props:{value:params.row.price,color:this.$mainColor}} );
|
|
} else {
|
return h("div", params.row.couponDiscount + "折");
|
}
|
},
|
},
|
|
{
|
title: "获取方式",
|
width: 120,
|
key: "getType",
|
render: (h, params) => {
|
if (params.row.getType === "FREE") {
|
return h("Tag", { props: { color: "red" } }, "免费获取");
|
} else if (params.row.getType === "ACTIVITY") {
|
return h("Tag", { props: { color: "volcano" } }, "活动获取");
|
} else if (params.row.getType === "INSIDE") {
|
return h("Tag", { props: { color: "lime" } }, "内购");
|
} else if (params.row.getType === "IGAME") {
|
return h("Tag", { props: { color: "lime" } }, "游戏人生");
|
} else {
|
return h("Tag", { props: { color: "purple" } }, "未知");
|
}
|
},
|
},
|
{
|
title: "优惠券类型",
|
key: "couponType",
|
width: 150,
|
render: (h, params) => {
|
let text = "";
|
if (params.row.couponType === "DISCOUNT") {
|
return h("Tag", { props: { color: "blue" } }, "打折");
|
} else if (params.row.couponType === "PRICE") {
|
return h("Tag", { props: { color: "geekblue" } }, "减免现金");
|
} else {
|
return h("Tag", { props: { color: "purple" } }, "未知");
|
}
|
},
|
},
|
{
|
title: "品类描述",
|
key: "scopeType",
|
width: 120,
|
render: (h, params) => {
|
return promotionsScopeTypeRender(h, params);
|
},
|
},
|
{
|
title: "活动时间",
|
render: (h, params) => {
|
if (
|
params?.row?.getType === "ACTIVITY" &&
|
params?.row?.rangeDayType === "DYNAMICTIME"
|
) {
|
return h("div", "长期有效");
|
} else if (params?.row?.startTime && params?.row?.endTime) {
|
return h("div", {
|
domProps: {
|
innerHTML:
|
params.row.startTime + "<br/>" + params.row.endTime,
|
},
|
});
|
}
|
},
|
},
|
{
|
title: "状态",
|
width: 100,
|
key: "promotionStatus",
|
align: "center",
|
fixed: "right",
|
render: (h, params) => {
|
return promotionsStatusRender(h, params);
|
},
|
},
|
],
|
|
typeSelect:[
|
{
|
id:1,
|
value:'coupon',
|
label:'优惠劵'
|
}
|
],
|
modelShow:false,
|
modelTitle:'',
|
rules: {
|
couponId:[{
|
required: true,
|
}],
|
prizeName:[
|
{ required: true, message: '请输入奖品名称', trigger: 'blur' },
|
{ max: 50, message: '长度不能超过50个字符', trigger: 'blur' }
|
],
|
prizeType: [
|
{ required: true, message: '请选择奖品类型', trigger: 'change' },
|
],
|
prizeContent: [
|
{ required: true, message: '请输入奖品内容', trigger: 'blur' },
|
{ max: 100, message: '长度不能超过100个字符', trigger: 'blur' }
|
],
|
prizeDes: [
|
{ required: true, message: '请输入奖品描述', trigger: 'blur' },
|
{ max: 100, message: '长度不能超过100个字符', trigger: 'blur' }
|
],
|
prizeCover: [
|
{required: true, message: '请选择奖品封面', trigger: 'blur'}
|
],
|
prizeImg: [
|
{required: true, message: '请选择奖品图片', trigger: 'blur'}
|
],
|
},
|
|
prizeFrom:{
|
id:'',
|
prizeName:'',
|
prizeType:'',
|
couponId:'',
|
prizeContent:'',
|
prizeCover:'',
|
prizeDes:'',
|
prizeImg:'',
|
},
|
loading:false,
|
|
columns:[
|
{
|
title: '奖品封面',
|
key: 'prizeCoverUrl',
|
slot:'prizeCoverUrl',
|
align: 'center',
|
minWidth: 100,
|
},
|
{
|
title: '奖品名称',
|
key: 'prizeName',
|
minWidth: 100,
|
},
|
{
|
title: '奖品类型',
|
key: 'prizeType',
|
minWidth: 100,
|
render: (h, params) => {
|
if (params.row.prizeType === "coupon") {
|
return h("Tag", {props: {color: "red"}}, "优惠券");
|
} else {
|
return h("Tag", {props: {color: "purple"}}, "未知");
|
}
|
}
|
},
|
{
|
title: '奖品内容',
|
key: 'prizeContent',
|
minWidth: 100,
|
},
|
{
|
title: '奖品描述',
|
key: 'prizeDes',
|
minWidth: 100,
|
},
|
{
|
title:'操作',
|
slot: 'action',
|
width: 200,
|
align:'center',
|
fixed:'right'
|
}
|
],
|
prizeList:[],
|
total:0,
|
searchForm:{
|
prizeName:'',
|
prizeType:'',
|
pageSize:10,
|
pageNumber:1,
|
},
|
couponSearchForm: {
|
// 搜索框初始化对象
|
pageNumber: 1, // 当前页数
|
pageSize: 10, // 页面大小
|
sort: "create_time", // 默认排序字段
|
order: "desc", // 默认排序方式
|
getType: "", // 默认排序方式
|
promotionStatus:"START",
|
},
|
|
submitLoading:false,
|
prizeCover:null,
|
prizeImg:null,
|
}
|
},
|
// 在组件创建前注册
|
beforeCreate() {
|
|
},
|
mounted() {
|
this.init();
|
},
|
methods: {
|
replaceText(text) {
|
if (text === "coupon") {
|
return "优惠券";
|
}
|
return text; // 如果不是目标词,返回原文本
|
},
|
// 预览图片
|
previewImage(url) {
|
this.previewImageUrl = url
|
this.previewVisible = true
|
},
|
// 处理行点击事件
|
handleRowClick(currentRow ,oldCurrentRow){
|
this.prizeFrom.couponId = currentRow.id;
|
this.showCoupon = currentRow.couponName;
|
console.log(this.prizeFrom.couponId)
|
},
|
getCouponDataList() {
|
// 获取数据
|
this.couponLoading = true;
|
getPlatformCouponList(this.couponSearchForm).then((res) => {
|
this.couponLoading = false;
|
if (res.success) {
|
this.couponData = res.result.records;
|
this.couponTotal = res.result.total;
|
}
|
});
|
this.couponTotal = this.couponData.length;
|
this.couponLoading = false;
|
},
|
|
resetSearch(){
|
this.$refs.searchForm.resetFields()
|
this.searchForm.pageNumber = 1
|
this.getPage()
|
},
|
handleBeforeUpload(file,type) {
|
if("content" === type){
|
this.prizeImg = file;
|
this.imgTempUrl = URL.createObjectURL(file);
|
return false;
|
}else if ("cover" === type){
|
this.prizeCover = file;
|
this.coverTempUrl = URL.createObjectURL(file);
|
return false;
|
}
|
|
},
|
|
async uploadFileByLmk(){
|
if (this.prizeImg){
|
this.submitLoading = true
|
const formData = new FormData()
|
formData.append('file', this.prizeImg)
|
await uploadFileByLmk(formData).then(res => {
|
this.submitLoading = false
|
if (res.code === 200) {
|
this.prizeFrom.prizeImg = res.data.fileKey;
|
// this.$Message.success('上传成功')
|
}else{
|
// this.$Message.error(res.msg)
|
}
|
}).catch(() => {
|
this.submitLoading = false
|
})
|
}
|
if (this.prizeCover){
|
this.submitLoading = true
|
const formData = new FormData()
|
formData.append('file', this.prizeCover)
|
|
await uploadFileByLmk(formData).then(res => {
|
this.submitLoading = false
|
if (res.code === 200) {
|
this.prizeFrom.prizeCover = res.data.fileKey
|
// this.$Message.success('上传成功')
|
}else{
|
// this.$Message.error(res.msg)
|
}
|
}).catch(() => {
|
this.submitLoading = false
|
})
|
}
|
},
|
|
// 删除文件
|
handleRemove(type) {
|
if ('content' === type){
|
this.prizeImg = null;
|
this.imgTempUrl = null;
|
|
}else if ('cover' === type){
|
this.prizeCover = null;
|
this.coverTempUrl = null;
|
}
|
},
|
|
async saveOrUpdate(){
|
await this.uploadFileByLmk();
|
if (this.prizeFrom.prizeType === 'coupon') {
|
if (this.prizeFrom.couponId === null || this.prizeFrom.couponId === ''){
|
this.$Message.error("请选择表格中优惠卷")
|
return;
|
}
|
}
|
this.$refs.form.validate(valid => {
|
if (valid) {
|
this.submitLoading = true
|
const api = this.prizeFrom.id ? edit : add
|
api(this.prizeFrom).then(res => {
|
this.submitLoading = false
|
if (res.code === 200) {
|
this.$Message.success(res.msg)
|
this.modelShow = false;
|
this.getPage()
|
}else{
|
this.$Message.error(res.msg)
|
}
|
}).catch(() => {
|
this.submitLoading = false
|
})
|
}
|
})
|
},
|
modelClose(){
|
this.modelShow = false
|
this.submitLoading = false
|
this.showCoupon = '';
|
|
},
|
getPage(){
|
this.loading = true;
|
getPage(this.searchForm).then(res =>{
|
this.loading = false;
|
if (res.code === 200){
|
this.prizeList = res.data;
|
this.total = res.total
|
}else {
|
this.$Message.error(res.msg)
|
}
|
})
|
},
|
detail(row){
|
this.infoModalShow = true;
|
this.detailData = {...row};
|
},
|
infoModelClose(){
|
this.infoModalShow = false;
|
},
|
openEdit(row){
|
this.$refs.form.resetFields();
|
//重置id
|
//需要判断是否可以编辑
|
canUpDatePrizeDraw(row.id).then(res =>{
|
if (res.code === 200){
|
if (res.state){
|
console.log(res.data)
|
this.modelShow = true;
|
this.modelTitle = "编辑奖品";
|
this.prizeFrom ={
|
id:row.id,
|
prizeName: row.prizeName,
|
prizeType: row.prizeType,
|
couponId: row.couponId,
|
prizeContent: row.prizeContent,
|
prizeCover: row.prizeCover,
|
prizeDes: row.prizeDes,
|
prizeImg: row.prizeImg,
|
}
|
this.coverTempUrl = row.prizeCoverUrl;
|
this.imgTempUrl = row.prizeImgUrl;
|
this.showCoupon = res.data.couponName;
|
|
}else {
|
this.$Message.error("该奖品在抽奖活动中无法编辑!")
|
}
|
|
}
|
})
|
|
|
},
|
|
handleSearch(){
|
this.getPage()
|
},
|
openAdd(){
|
this.$refs.form.resetFields()
|
//重置id
|
this.prizeFrom.id = null;
|
|
this.modelShow = true;
|
this.modelTitle = "新增奖品";
|
//清除表单状态.
|
this.coverTempUrl = null;
|
this.prizeCover=null;
|
this.prizeImg = null;
|
this.imgTempUrl = null;
|
this.showCoupon = null;
|
},
|
async delById(row){
|
let status = false
|
await canUpDatePrizeDraw(row.id).then(res => {
|
|
if (res.code === 200) {
|
status = res.state;
|
|
}
|
});
|
if (status){
|
await del(row.id).then(res=>{
|
if (res.code === 200){
|
this.$Message.success(res.msg)
|
}else {
|
this.$Message.error(res.msg)
|
}
|
this.getPage()
|
})
|
}else {
|
this.$Message.error("该奖品在抽奖活动中无法删除!")
|
}
|
|
},
|
// 获取富文本编辑器的内容
|
// 初始化数据
|
init() {
|
this.getPage()
|
},
|
changePage(){
|
this.searchForm.pageNumber = 1
|
this.searchForm.pageSize = pageSize
|
this.getPage()
|
},
|
changePageSize(){
|
this.searchForm.pageNumber = page
|
this.getPage()
|
},
|
couponChangePage(v) {
|
// 改变页码
|
this.couponSearchForm.pageNumber = v;
|
this.getCouponDataList();
|
},
|
couponChangePageSize(v) {
|
// 改变页数
|
this.couponSearchForm.pageNumber = 1;
|
this.couponSearchForm.pageSize = v;
|
this.getCouponDataList();
|
},
|
},
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.detail-container {
|
padding: 16px;
|
}
|
|
.detail-item {
|
margin-bottom: 16px;
|
line-height: 1.5;
|
}
|
|
.detail-item label {
|
display: inline-block;
|
width: 120px;
|
font-weight: bold;
|
color: #515a6e;
|
vertical-align: top;
|
}
|
|
.detail-item span {
|
display: inline-block;
|
max-width: calc(100% - 120px);
|
}
|
|
.detail-image {
|
display: inline-block;
|
margin-top: 8px;
|
border: 1px dashed #dcdee2;
|
padding: 4px;
|
border-radius: 4px;
|
background: #f8f8f9;
|
}
|
.search-form {
|
padding: 16px;
|
background: #f8f8f9;
|
border-radius: 4px;
|
margin-bottom: 16px;
|
|
.ivu-form-item {
|
margin-bottom: 16px;
|
margin-right: 16px;
|
}
|
|
.search-btn {
|
margin-left: 8px;
|
}
|
}
|
.operation {
|
margin-bottom: 16px;
|
|
.ivu-btn {
|
margin-right: 8px;
|
}
|
}
|
/* 选中行样式 */
|
.selected-row {
|
background-color: #e6f7ff; /* 浅蓝色背景 */
|
border-left: 3px solid #1890ff; /* 左侧蓝色边框 */
|
}
|
|
/* 选中行hover样式(可选) */
|
.selected-row:hover {
|
background-color: #d1eaff !important;
|
}
|
|
|
.preview-image{
|
width: 200px;
|
height: auto;
|
object-fit: contain
|
}
|
.preview-image {
|
max-width: 100%;
|
max-height: 70vh;
|
object-fit: contain;
|
border-radius: 4px;
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
display: block;
|
margin: 0 auto;
|
}
|
.preview-image-limit{
|
max-width: 100%;
|
max-height: 200px;
|
object-fit: contain;
|
border-radius: 4px;
|
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
display: block;
|
}
|
.prize-table {
|
.thumbnail {
|
max-width: 100%;
|
max-height: 100px;
|
object-fit: contain;
|
cursor: pointer;
|
transition: all 0.3s;
|
|
&:hover {
|
transform: scale(1.05);
|
box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
|
}
|
}
|
|
.action-btns {
|
display: flex;
|
flex-wrap: wrap;
|
justify-content: center;
|
|
.ivu-btn {
|
margin: 4px;
|
font-size: 12px;
|
padding: 2px 6px;
|
min-width: 60px;
|
}
|
}
|
}
|
</style>
|