This commit is contained in:
2024-09-10 10:49:08 +08:00
parent b5fd06b800
commit dd4f5938da
6391 changed files with 722800 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
import { defineMixin } from '../libs/vue'
import defProps from '../libs/config/props.js'
import test from '../libs/function/test';
export const props = defineMixin({
props: {
// 头像图片路径(不能为相对路径)
src: {
type: String,
default: () => defProps.avatar.src
},
// 头像形状circle-圆形square-方形
shape: {
type: String,
default: () => defProps.avatar.shape
},
// 头像尺寸
size: {
type: [String, Number],
default: () => defProps.avatar.size
},
// 裁剪模式
mode: {
type: String,
default: () => defProps.avatar.mode
},
// 显示的文字
text: {
type: String,
default: () => defProps.avatar.text
},
// 背景色
bgColor: {
type: String,
default: () => defProps.avatar.bgColor
},
// 文字颜色
color: {
type: String,
default: () => defProps.avatar.color
},
// 文字大小
fontSize: {
type: [String, Number],
default: () => defProps.avatar.fontSize
},
// 显示的图标
icon: {
type: String,
default: () => defProps.avatar.icon
},
// 显示小程序头像只对百度微信QQ小程序有效
mpAvatar: {
type: Boolean,
default: () => defProps.avatar.mpAvatar
},
// 是否使用随机背景色
randomBgColor: {
type: Boolean,
default: () => defProps.avatar.randomBgColor
},
// 加载失败的默认头像(组件有内置默认图片)
defaultUrl: {
type: String,
default: () => defProps.avatar.defaultUrl
},
// 如果配置了randomBgColor为true且配置了此值则从默认的背景色数组中取出对应索引的颜色值取值0-19之间
colorIndex: {
type: [String, Number],
// 校验参数规则索引在0-19之间
validator(n) {
return test.range(n, [0, 19]) || n === ''
},
default: () => defProps.avatar.colorIndex
},
// 组件标识符
name: {
type: String,
default: () => defProps.avatar.name
}
}
})

View File

@@ -0,0 +1,44 @@
import { defineMixin } from '../libs/vue'
import defProps from '../libs/config/props.js'
export const props = defineMixin({
props: {
// 标题
title: {
type: [String, Number],
default: () => defProps.stepsItem.title
},
color:{
type: [String],
default:'#318AFE'
},
titleColor:{
type: [String],
default:'#318AFE'
},
descColor:{
type: [String],
default:'#318AFE'
},
// 描述文本
desc: {
type: [String, Number],
default: () => defProps.stepsItem.desc
},
// 图标大小
iconSize: {
type: [String, Number],
default: () => defProps.stepsItem.iconSize
},
// 当前步骤是否处于失败状态
error: {
type: Boolean,
default: () => defProps.stepsItem.error
},
// 自定义样式
itemStyle: {
type: [Object],
default: {}
},
}
})

View File

@@ -0,0 +1,41 @@
import { defineMixin } from '../libs/vue'
import defProps from '../libs/config/props.js'
export const props = defineMixin({
props: {
// 排列方向
direction: {
type: String,
default: () => defProps.steps.direction
},
// 设置第几个步骤
current: {
type: [String, Number],
default: () => defProps.steps.current
},
// 激活状态颜色
activeColor: {
type: String,
default: () => defProps.steps.activeColor
},
// 未激活状态颜色
inactiveColor: {
type: String,
default: () => defProps.steps.inactiveColor
},
// 激活状态的图标
activeIcon: {
type: String,
default: () => defProps.steps.activeIcon
},
// 未激活状态图标
inactiveIcon: {
type: String,
default: () => defProps.steps.inactiveIcon
},
// 是否显示点类型
dot: {
type: Boolean,
default: () => defProps.steps.dot
}
}
})

View File

@@ -0,0 +1,42 @@
import { defineMixin } from '../libs/vue'
import defProps from '../libs/config/props.js'
export const props = defineMixin({
props: {
// 吸顶容器到顶部某个距离的时候进行吸顶在H5平台NavigationBar为44px
offsetTop: {
type: [String, Number],
default: () => defProps.sticky.offsetTop
},
// 自定义导航栏的高度
customNavHeight: {
type: [String, Number],
// #ifdef H5
// H5端的导航栏属于“自定义”导航栏的范畴因为它是非原生的与普通元素一致
default: 44,
// #endif
// #ifndef H5
default: () => defProps.sticky.customNavHeight
// #endif
},
// 是否开启吸顶功能
disabled: {
type: Boolean,
default: () => defProps.sticky.disabled
},
// 吸顶区域的背景颜色
bgColor: {
type: String,
default: () => defProps.sticky.bgColor
},
// z-index值
zIndex: {
type: [String, Number],
default: () => defProps.sticky.zIndex
},
// 列表中的索引值
index: {
type: [String, Number],
default: () => defProps.sticky.index
}
}
})