请求处理代理

商品管理
商品分类
用户管理
桌台
代客下单
进销存
交班
预定座位
充值管理
存酒管理
This commit is contained in:
2024-09-03 11:30:27 +08:00
parent e4835d0d27
commit da5f7ca916
348 changed files with 47437 additions and 186 deletions

View File

@@ -0,0 +1,92 @@
<template>
<view class="my-radio u-font-28 u-flex color-333" @tap.stop="changeVal" >
<view class="circle u-flex u-row-center" :style="computedStyle()" :class="{active:modelValue,square:shape==='square'}">
<uni-icons type="checkmarkempty" v-if="modelValue" :size="size-4" color="#fff"></uni-icons>
</view>
<view class="u-m-l-12">
{{text}}
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
import color from '@/commons/color.js'
const props = defineProps({
disabled:{
type: [Boolean],
default: false
},
borderColor:{
type: String,
default: '#707070',
},
size: {
//单位px
type: Number,
default: 14,
},
// v-modal
modelValue: {
type: [Number,Boolean],
default: false,
},
shape:{
//circle square
type: String,
default: 'circle',
},
text: {
type: String,
default: ''
}
})
function computedStyle() {
return `
width:${props.size}px;
height:${props.size}px;
border-color:${props.borderColor};
border-color:${props.modelValue?color.ColorMain:props.borderColor};
`
}
const emits = defineEmits(['update:modelValue', 'change'])
function changeVal() {
if(props.disabled){
return
}
let currentVal=props.modelValue
let type=typeof currentVal
if(type==='number'){
currentVal=currentVal===0?1:0
}
if(type==='boolean'){
currentVal=!currentVal
}
emits('update:modelValue', currentVal)
emits('change', currentVal)
}
</script>
<style lang="scss" scoped>
.my-radio {
.circle {
background: #FFFFFF;
&.active {
background-color: $my-main-color;
border-color: $my-main-color;
}
border: 1px solid #707070;
border-radius: 50%;
overflow: hidden;
&.square{
border-radius: 8rpx;
}
}
}
</style>