chore: 添加缺失的静态资源文件
添加多个前端界面所需的图片、字体、音频等静态资源文件,包括: - 管理员后台的图标、背景图、组件图片 - 移动端页面的商品图片、用户中心图片、活动图标 - 第三方库的示例图片和字体文件 - 浏览器兼容性配置文件 - 图标字体文件(eot、ttf、woff、woff2格式) 这些资源是前端界面正常显示所必需的,之前可能因版本控制忽略或遗漏而缺失。
This commit is contained in:
124
view/uniapp/components/BaseMoney.vue
Normal file
124
view/uniapp/components/BaseMoney.vue
Normal file
@@ -0,0 +1,124 @@
|
||||
<template>
|
||||
<view :class="{ line: line, weight: weight }"
|
||||
:style="{color:color, fontFamily: SemiBold ? 'SemiBold' : 'Regular'}"
|
||||
class="base-money">
|
||||
<text v-show="preFix" class="preFix" :style="{'font-size': preFixSize + 'rpx','color':textColor}">{{preFix}}</text>
|
||||
<text class="symbol" :style="{'font-size': symbolSize +'rpx'}">¥</text><text class="integer"
|
||||
:style="{'font-size': integerSize +'rpx'}">{{ integer }}</text>
|
||||
<text v-if="digits && showDigits" class="decimal"
|
||||
:style="{'font-size': decimalSize +'rpx'}">.{{ decimal }}</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'BaseMoney',
|
||||
props: {
|
||||
// 小数位数,为0则不显示
|
||||
digits: {
|
||||
type: Number,
|
||||
default: 2
|
||||
},
|
||||
money: {
|
||||
type: String | Number,
|
||||
default: ""
|
||||
},
|
||||
// 删除线
|
||||
line: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 粗体
|
||||
weight: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
color:{
|
||||
type: String,
|
||||
default: 'var(--view-theme)'
|
||||
},
|
||||
textColor:{
|
||||
type: String,
|
||||
default: '#999'
|
||||
},
|
||||
symbolSize: {
|
||||
type: String,
|
||||
default: '20'
|
||||
},
|
||||
integerSize: {
|
||||
type: String,
|
||||
default: '26'
|
||||
},
|
||||
decimalSize: {
|
||||
type: String,
|
||||
default: '24'
|
||||
},
|
||||
inline: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
preFix:{
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
preFixSize:{
|
||||
type: String,
|
||||
default: '24'
|
||||
},
|
||||
SemiBold:{
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isCoupon:{
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
integer: 0,
|
||||
decimal: 0,
|
||||
showDigits:false
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
money: {
|
||||
handler(newValue, oldValue) {
|
||||
let value = Number(newValue).toFixed(this.digits);
|
||||
value = value.split('.');
|
||||
this.integer = value[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
|
||||
if (value[1]) {
|
||||
this.decimal = value[1];
|
||||
if((this.isCoupon && this.decimal != '00') || !this.isCoupon) {
|
||||
this.showDigits = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.base-money {
|
||||
display: inline-block;
|
||||
&.line {
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
&.weight {
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.preFix{
|
||||
font-weight: 500 !important;
|
||||
font-family: PingFang SC-Medium, PingFang SC !important;
|
||||
}
|
||||
.SemiBold{
|
||||
font-family:'SemiBold';
|
||||
}
|
||||
.Regular{
|
||||
font-family:'Regular';
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user