code stringlengths 1 1.05M | repo_name stringlengths 6 83 | path stringlengths 3 242 | language stringclasses 222
values | license stringclasses 20
values | size int64 1 1.05M |
|---|---|---|---|---|---|
import {getTransferedObjectUUID} from './classUtils';
const name = 'WebGLFrameBuffer';
function uuid(id) {
return getTransferedObjectUUID(name, id);
}
export default class WebGLFramebuffer {
className = name;
constructor(id) {
this.id = id;
}
static uuid = uuid;
uuid() {
re... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Framebuffer.js | JavaScript | unknown | 347 |
export default {
"DEPTH_BUFFER_BIT": 256,
"STENCIL_BUFFER_BIT": 1024,
"COLOR_BUFFER_BIT": 16384,
"POINTS": 0,
"LINES": 1,
"LINE_LOOP": 2,
"LINE_STRIP": 3,
"TRIANGLES": 4,
"TRIANGLE_STRIP": 5,
"TRIANGLE_FAN": 6,
"ZERO": 0,
"ONE": 1,
"SRC_COLOR": 768,
"ONE_MINUS_SRC... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/GLenum.js | JavaScript | unknown | 8,637 |
let i = 1;
const GLmethod = {};
GLmethod.activeTexture = i++; //1
GLmethod.attachShader = i++;
GLmethod.bindAttribLocation = i++;
GLmethod.bindBuffer = i++;
GLmethod.bindFramebuffer = i++;
GLmethod.bindRenderbuffer = i++;
GLmethod.bindTexture = i++;
GLmethod.blendColor = i++;
GLmethod.blendEquation = i++;
GLm... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/GLmethod.js | JavaScript | unknown | 4,497 |
const GLtype = {};
[
"GLbitfield",
"GLboolean",
"GLbyte",
"GLclampf",
"GLenum",
"GLfloat",
"GLint",
"GLintptr",
"GLsizei",
"GLsizeiptr",
"GLshort",
"GLubyte",
"GLuint",
"GLushort"
].sort().map((typeName, i) => GLtype[typeName] = 1 >> (i + 1));
export default... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/GLtype.js | JavaScript | unknown | 332 |
import {getTransferedObjectUUID} from './classUtils';
const name = 'WebGLProgram';
function uuid(id) {
return getTransferedObjectUUID(name, id);
}
export default class WebGLProgram {
className = name;
constructor(id) {
this.id = id;
}
static uuid = uuid;
uuid() {
return uui... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Program.js | JavaScript | unknown | 339 |
import {getTransferedObjectUUID} from './classUtils';
const name = 'WebGLRenderBuffer';
function uuid(id) {
return getTransferedObjectUUID(name, id);
}
export default class WebGLRenderbuffer {
className = name;
constructor(id) {
this.id = id;
}
static uuid = uuid;
uuid() {
... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Renderbuffer.js | JavaScript | unknown | 349 |
import GLenum from './GLenum';
import ActiveInfo from './ActiveInfo';
import Buffer from './Buffer';
import Framebuffer from './Framebuffer';
import Renderbuffer from './Renderbuffer';
import Texture from './Texture';
import Program from './Program';
import Shader from './Shader';
import ShaderPrecisionFormat from './S... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/RenderingContext.js | JavaScript | unknown | 36,749 |
import {getTransferedObjectUUID} from './classUtils';
const name = 'WebGLShader';
function uuid(id) {
return getTransferedObjectUUID(name, id);
}
export default class WebGLShader {
className = name;
constructor(id, type) {
this.id = id;
this.type = type;
}
static uuid = uuid;
... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Shader.js | JavaScript | unknown | 369 |
export default class WebGLShaderPrecisionFormat {
className = 'WebGLShaderPrecisionFormat';
constructor({
rangeMin, rangeMax, precision
}) {
this.rangeMin = rangeMin;
this.rangeMax = rangeMax;
this.precision = precision;
}
} | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/ShaderPrecisionFormat.js | JavaScript | unknown | 273 |
import {getTransferedObjectUUID} from './classUtils';
const name = 'WebGLTexture';
function uuid(id) {
return getTransferedObjectUUID(name, id);
}
export default class WebGLTexture {
className = name;
constructor(id, type) {
this.id = id;
this.type = type;
}
static uuid = uuid;
... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/Texture.js | JavaScript | unknown | 371 |
import {getTransferedObjectUUID} from './classUtils';
const name = 'WebGLUniformLocation';
function uuid(id) {
return getTransferedObjectUUID(name, id);
}
export default class WebGLUniformLocation {
className = name;
constructor(id, type) {
this.id = id;
this.type = type;
}
stat... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/UniformLocation.js | JavaScript | unknown | 387 |
export function getTransferedObjectUUID(name, id) {
return `${name.toLowerCase()}-${id}`;
} | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/context-webgl/classUtils.js | JavaScript | unknown | 95 |
import GCanvas from './env/canvas';
import GImage from './env/image';
import GWebGLRenderingContext from './context-webgl/RenderingContext';
import GContext2D from './context-2d/RenderingContext';
import GBridgeWeex from './bridge/bridge-weex';
export let Image = GImage;
export let WeexBridge = GBridgeWeex;
export... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/gcanvas/index.js | JavaScript | unknown | 1,280 |
export default {
props: {
//二维码内容
value: {
type: [String, Number]
},
//选项
options: {
type: Object,
default: () => {
return {};
}
},
//二维码大小
size: {
type: [String, Number],
default: 200
},
//导出的文件类型
fileType: {
type: String,
default: 'png'
},
//是否初始化组件后就开始生成
start... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/props.js | JavaScript | unknown | 1,896 |
function Queue() {
let waitingQueue = this.waitingQueue = [];
let isRunning = this.isRunning = false; // 记录是否有未完成的任务
function execute(task, resolve, reject) {
task()
.then((data) => {
resolve(data);
})
.catch((e) => {
reject(e);
})
.finally(() => {
// 等待任... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/queue.js | JavaScript | unknown | 1,248 |
<template>
<view class="uqrcode"
:class="{ 'uqrcode-hide': hide }"
:style="{ width: `${templateOptions.width}px`, height: `${templateOptions.height}px` }">
<view class="uqrcode-canvas-wrapper">
<!-- 画布 -->
<!-- #ifndef APP-NVUE -->
<canvas class="uqrcode-canvas"
:id="canvasId"
:canvas-id="canvas... | 2301_77169380/AppruanjianApk | uni_modules/uv-qrcode/components/uv-qrcode/uv-qrcode.vue | Vue | unknown | 39,149 |
export default {
props: {
// radio的名称
name: {
type: [String, Number, Boolean],
default: ''
},
// 形状,square为方形,circle为圆型
shape: {
type: String,
default: ''
},
// 是否禁用
disabled: {
type: [String, Boolean],
default: ''
},
// 是否禁止点击提示语选中单选框
labelDisabled: {
type: [String, Boolean]... | 2301_77169380/AppruanjianApk | uni_modules/uv-radio/components/uv-radio/props.js | JavaScript | unknown | 1,247 |
<template>
<view
class="uv-radio"
@tap.stop="wrapperClickHandler"
:style="[radioStyle]"
:class="[`uv-radio-label--${parentData.iconPlacement}`, parentData.borderBottom && parentData.placement === 'column' && 'uv-border-bottom']"
>
<view
class="uv-radio__icon-wrap"
@tap.stop="iconClickHandler"
... | 2301_77169380/AppruanjianApk | uni_modules/uv-radio/components/uv-radio/uv-radio.vue | Vue | unknown | 12,064 |
export default {
props: {
// 绑定的值
value: {
type: [String, Number, Boolean],
default: ''
},
modelValue: {
type: [String, Number, Boolean],
default: ''
},
// 是否禁用全部radio
disabled: {
type: Boolean,
default: false
},
// 形状,circle-圆形,square-方形
shape: {
type: String,
default: 'cir... | 2301_77169380/AppruanjianApk | uni_modules/uv-radio/components/uv-radio-group/props.js | JavaScript | unknown | 1,656 |
<template>
<view
class="uv-radio-group"
:class="bemClass"
:style="[$uv.addStyle(this.customStyle)]"
>
<slot></slot>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
import props from... | 2301_77169380/AppruanjianApk | uni_modules/uv-radio/components/uv-radio-group/uv-radio-group.vue | Vue | unknown | 4,292 |
export default {
props: {
value: {
type: [String, Number],
default: 0
},
modelValue: {
type: [String, Number],
default: 0
},
// 要显示的星星数量
count: {
type: [String, Number],
default: 5
},
// 是否不可选中
disabled: {
type: Boolean,
default: false
},
// 是否只读
readonly: {
type: Boo... | 2301_77169380/AppruanjianApk | uni_modules/uv-rate/components/uv-rate/props.js | JavaScript | unknown | 1,240 |
<template>
<view
class="uv-rate"
:id="elId"
ref="uv-rate"
:style="[$uv.addStyle(customStyle)]"
>
<view class="uv-rate__content"
@touchmove.stop="touchMove"
@touchend.stop="touchEnd">
<view class="uv-rate__content__item"
v-for="(item, index) in Number(count)"
:key="index"
:class="[elCla... | 2301_77169380/AppruanjianApk | uni_modules/uv-rate/components/uv-rate/uv-rate.vue | Vue | unknown | 9,319 |
export default {
props: {
// 默认的显示占位高度
showHeight: {
type: [String, Number],
default: 400
},
// 展开后是否显示"收起"按钮
toggle: {
type: Boolean,
default: false
},
// 关闭时的提示文字
closeText: {
type: String,
default: '展开阅读全文'
},
// 展开时的提示文字
openText: {
type: String,
default: '收起'
},
/... | 2301_77169380/AppruanjianApk | uni_modules/uv-read-more/components/uv-read-more/props.js | JavaScript | unknown | 1,444 |
<template>
<view class="uv-read-more">
<view
class="uv-read-more__content"
:style="{
height: isLongContent && status === 'close' ? $uv.addUnit(showHeight) : $uv.addUnit(contentHeight,'px'),
textIndent: textIndent
}"
>
<view
class="uv-read-more__content__inner"
ref="uv-read-m... | 2301_77169380/AppruanjianApk | uni_modules/uv-read-more/components/uv-read-more/uv-read-more.vue | Vue | unknown | 4,772 |
export default {
props: {
// 占父容器宽度的多少等分,总分为12份
span: {
type: [String, Number],
default: 12
},
// 指定栅格左侧的间隔数(总12栏)
offset: {
type: [String, Number],
default: 0
},
// 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
justify: ... | 2301_77169380/AppruanjianApk | uni_modules/uv-row/components/uv-col/props.js | JavaScript | unknown | 692 |
<template>
<view
class="uv-col"
ref="uv-col"
:class="[
'uv-col-' + span
]"
:style="[colStyle]"
@tap="clickHandler"
>
<slot></slot>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin... | 2301_77169380/AppruanjianApk | uni_modules/uv-row/components/uv-col/uv-col.vue | Vue | unknown | 4,313 |
export default {
props: {
// 给col添加间距,左右边距各占一半
gutter: {
type: [String, Number],
default: 0
},
// 水平排列方式,可选值为`start`(或`flex-start`)、`end`(或`flex-end`)、`center`、`around`(或`space-around`)、`between`(或`space-between`)
justify: {
type: String,
default: 'start'
},
// 垂直对齐方式,可选值为top、center、bottom
... | 2301_77169380/AppruanjianApk | uni_modules/uv-row/components/uv-row/props.js | JavaScript | unknown | 493 |
<template>
<view
class="uv-row"
ref="uv-row"
:style="[rowStyle]"
@tap="clickHandler"
>
<slot />
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
// #ifdef APP-NVUE
const dom = u... | 2301_77169380/AppruanjianApk | uni_modules/uv-row/components/uv-row/uv-row.vue | Vue | unknown | 2,956 |
<template>
<view
class="uv-safe-bottom"
:style="[style]"
:class="[!isNvue && 'uv-safe-area-inset-bottom']"
>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
/**
* SafeBottom 底部安全区
* @des... | 2301_77169380/AppruanjianApk | uni_modules/uv-safe-bottom/components/uv-safe-bottom/uv-safe-bottom.vue | Vue | unknown | 1,801 |
// 引入bindingx,此库类似于微信小程序wxs,目的是让js运行在视图层,减少视图层和逻辑层的通信折损
const BindingX = uni.requireNativePlugin('bindingx')
export default {
methods: {
// 此处不写注释,请自行体会
nvueScrollHandler(e) {
if (this.indicator) {
const anchor = this.$refs['uv-scroll-list__scroll-view'].ref
const element = this.$refs['uv-scroll-list__i... | 2301_77169380/AppruanjianApk | uni_modules/uv-scroll-list/components/uv-scroll-list/nvue.js | JavaScript | unknown | 1,072 |
export default {
props: {
// 指示器的整体宽度
indicatorWidth: {
type: [String, Number],
default: 50
},
// 滑块的宽度
indicatorBarWidth: {
type: [String, Number],
default: 20
},
// 是否显示面板指示器
indicator: {
type: Boolean,
default: true
},
// 指示器非激活颜色
indicatorColor: {
type: String,
default... | 2301_77169380/AppruanjianApk | uni_modules/uv-scroll-list/components/uv-scroll-list/props.js | JavaScript | unknown | 666 |
<template>
<view
class="uv-scroll-list"
ref="uv-scroll-list"
>
<!-- #ifdef APP-NVUE -->
<!-- nvue使用bindingX实现,以得到更好的性能 -->
<scroller
class="uv-scroll-list__scroll-view"
ref="uv-scroll-list__scroll-view"
scroll-direction="horizontal"
:show-scrollbar="false"
:offset-accuracy="1"
@scroll="nvu... | 2301_77169380/AppruanjianApk | uni_modules/uv-scroll-list/components/uv-scroll-list/uv-scroll-list.vue | Vue | unknown | 6,662 |
export default {
props: {
value: {
type: [String, Number],
default: ''
},
modelValue: {
type: [String, Number],
default: ''
},
// 搜索框形状,round-圆形,square-方形
shape: {
type: String,
default: 'round'
},
// 搜索框背景色,默认值#f2f2f2
bgColor: {
type: String,
default: '#f2f2f2'
},
// 占位提示... | 2301_77169380/AppruanjianApk | uni_modules/uv-search/components/uv-search/props.js | JavaScript | unknown | 2,564 |
<template>
<view
class="uv-search"
@tap="clickHandler"
:style="[{
margin: margin,
}, $uv.addStyle(customStyle)]"
>
<view
class="uv-search__content"
:style="[{
backgroundColor: bgColor,
borderRadius: shape == 'round' ? '100px' : '4px',
borderColor: borderColor,
},$uv.addStyle(box... | 2301_77169380/AppruanjianApk | uni_modules/uv-search/components/uv-search/uv-search.vue | Vue | unknown | 10,399 |
export default {
props: {
// 是否展示骨架组件
loading: {
type: Boolean,
default: true
},
// 是否开启动画效果
animate: {
type: Boolean,
default: true
},
// 段落占位图行数
rows: {
type: [String, Number],
default: 0
},
// 段落占位图的宽度
rowsWidth: {
type: [String, Number, Array],
default: '100%'
},
/... | 2301_77169380/AppruanjianApk | uni_modules/uv-skeleton/components/uv-skeleton/props.js | JavaScript | unknown | 1,179 |
<template>
<view class="uv-skeleton">
<view
class="uv-skeleton__wrapper"
ref="uv-skeleton__wrapper"
v-if="loading"
style="display: flex; flex-direction: row;"
>
<view
class="uv-skeleton__wrapper__avatar"
v-if="avatar"
:class="[`uv-skeleton__wrapper__avatar--${avatarShap... | 2301_77169380/AppruanjianApk | uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.vue | Vue | unknown | 7,656 |
<template>
<view class="uv-skeleton">
<view v-if="loading">
<view v-for="(item, index) in elements" :key="index">
<!-- 横向并列布局 -->
<view class="uv-skeleton__group" :style="[style(item)]" v-if="item.type=='flex'">
<view v-for="(item2,index2) in item.children" :class="[item2.clas]" :style="[style(item2)... | 2301_77169380/AppruanjianApk | uni_modules/uv-skeletons/components/uv-skeletons/uv-skeletons.vue | Vue | unknown | 6,473 |
export default {
props: {
value: {
type: [Number, String],
default: 0
},
modelValue: {
type: [Number, String],
default: 0
},
// 最小可选值
min: {
type: [Number, String],
default: 0
},
// 最大可选值
max: {
type: [Number, String],
default: 100
},
// 步长,取值必须大于 0,并且可被(max - min)整除
ste... | 2301_77169380/AppruanjianApk | uni_modules/uv-slider/components/uv-slider/props.js | JavaScript | unknown | 1,026 |
<template>
<view
class="uv-slider"
:style="[$uv.addStyle(customStyle)]"
>
<slider
:min="min"
:max="max"
:step="step"
:value="sliderValue"
:activeColor="activeColor"
:backgroundColor="backgroundColor"
:blockSize="$uv.getPx(blockSize)"
:blockColor="blockColor"
:showValue="showValue"
... | 2301_77169380/AppruanjianApk | uni_modules/uv-slider/components/uv-slider/uv-slider.vue | Vue | unknown | 1,291 |
export default {
props: {
bgColor: {
type: String,
default: 'transparent'
}
}
}
| 2301_77169380/AppruanjianApk | uni_modules/uv-status-bar/components/uv-status-bar/props.js | JavaScript | unknown | 128 |
<template>
<view
:style="[style]"
class="uv-status-bar"
>
<slot />
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
import props from './props.js';
/**
* StatbusBar 状态栏占位
* @descri... | 2301_77169380/AppruanjianApk | uni_modules/uv-status-bar/components/uv-status-bar/uv-status-bar.vue | Vue | unknown | 1,570 |
export default {
props: {
// 排列方向
direction: {
type: String,
default: 'row'
},
// 设置第几个步骤
current: {
type: [String, Number],
default: 0
},
// 激活状态颜色
activeColor: {
type: String,
default: '#3c9cff'
},
// 未激活状态颜色
inactiveColor: {
type: String,
default: '#969799'
},
// 激活... | 2301_77169380/AppruanjianApk | uni_modules/uv-steps/components/uv-steps/props.js | JavaScript | unknown | 631 |
<template>
<view
:class="['uv-steps',`uv-steps--${direction}`]"
:style="[$uv.addStyle(customStyle)]"
>
<slot></slot>
</view>
</template>
<script>
import { func } from '@/uni_modules/uv-ui-tools/libs/function/test.js'
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '... | 2301_77169380/AppruanjianApk | uni_modules/uv-steps/components/uv-steps/uv-steps.vue | Vue | unknown | 2,379 |
export default {
props: {
// 标题
title: {
type: [String, Number],
default: ''
},
// 描述文本
desc: {
type: [String, Number],
default: ''
},
// 图标大小
iconSize: {
type: [String, Number],
default: 17
},
// 当前步骤是否处于失败状态
error: {
type: Boolean,
default: false
},
...uni.$uv?.props... | 2301_77169380/AppruanjianApk | uni_modules/uv-steps/components/uv-steps-item/props.js | JavaScript | unknown | 380 |
<template>
<view
class="uv-steps-item"
ref="uv-steps-item"
:class="[`uv-steps-item--${parentData.direction}`]"
:style="[$uv.addStyle(customStyle)]"
>
<view
class="uv-steps-item__line"
v-if="index + 1 < childLength"
:class="[`uv-steps-item__line--${parentData.direction}`]"
:style="[lineSty... | 2301_77169380/AppruanjianApk | uni_modules/uv-steps/components/uv-steps-item/uv-steps-item.vue | Vue | unknown | 7,953 |
export default {
props: {
// 吸顶容器到顶部某个距离的时候,进行吸顶,在H5平台,NavigationBar为44px
offsetTop: {
type: [String, Number],
default: 0
},
// 自定义导航栏的高度
customNavHeight: {
type: [String, Number],
// #ifdef H5
// H5端的导航栏属于“自定义”导航栏的范畴,因为它是非原生的,与普通元素一致
default: 44,
// #endif
// #ifndef H5
default: 0... | 2301_77169380/AppruanjianApk | uni_modules/uv-sticky/components/uv-sticky/props.js | JavaScript | unknown | 848 |
<template>
<view
class="uv-sticky"
:id="elId"
:style="[style]"
>
<view
:style="[stickyContent]"
class="uv-sticky__content"
>
<slot />
</view>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mi... | 2301_77169380/AppruanjianApk | uni_modules/uv-sticky/components/uv-sticky/uv-sticky.vue | Vue | unknown | 7,250 |
export default {
props: {
// tab的数据
list: {
type: Array,
default: () => []
},
// 当前活动的tab的index
current: {
type: [String, Number],
default: 0
},
// 激活的颜色
activeColor: {
type: String,
default: '#3c9cff'
},
// 未激活的颜色
inactiveColor: {
type: String,
default: '#303133'
},
/... | 2301_77169380/AppruanjianApk | uni_modules/uv-subsection/components/uv-subsection/props.js | JavaScript | unknown | 959 |
<template>
<view
class="uv-subsection"
ref="uv-subsection"
:class="[`uv-subsection--${mode}`]"
:style="[$uv.addStyle(customStyle), wrapperStyle]">
<view
class="uv-subsection__bar"
ref="uv-subsection__bar"
:style="[barStyle]"
:class="[
mode === 'button' && 'uv-subsection--button__bar',
... | 2301_77169380/AppruanjianApk | uni_modules/uv-subsection/components/uv-subsection/uv-subsection.vue | Vue | unknown | 8,228 |
export default {
props: {
// 是否自动关闭其他swipe按钮组
autoClose: {
type: Boolean,
default: true
},
...uni.$uv?.props?.swipeAction
}
} | 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action/props.js | JavaScript | unknown | 163 |
<template>
<view class="uv-swipe-action">
<slot></slot>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/uv-ui-tools/libs/mixin/mpMixin.js'
import mixin from '@/uni_modules/uv-ui-tools/libs/mixin/mixin.js'
import props from './props.js';
/**
* SwipeAction 滑动单元格
* @description 该组件一般用于左滑唤出操作菜... | 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action/uv-swipe-action.vue | Vue | unknown | 2,154 |
// nvue操作dom的库,用于获取dom的尺寸信息
const dom = uni.requireNativePlugin('dom')
// nvue中用于操作元素动画的库,类似于uni.animation,只不过uni.animation不能用于nvue
const animation = uni.requireNativePlugin('animation')
import { sleep } from '@/uni_modules/uv-ui-tools/libs/function/index.js'
export default {
data() {
return {
/... | 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action-item/nvue - backup.js | JavaScript | unknown | 11,903 |
// nvue操作dom的库,用于获取dom的尺寸信息
const dom = uni.requireNativePlugin('dom');
const bindingX = uni.requireNativePlugin('bindingx');
const animation = uni.requireNativePlugin('animation');
import { getDuration, getPx } from '@/uni_modules/uv-ui-tools/libs/function/index.js'
export default {
data() {
return {
// 所有按钮的总宽度... | 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action-item/nvue.js | JavaScript | unknown | 5,651 |
export default {
props: {
// 控制打开或者关闭
show: {
type: Boolean,
default: false
},
// 标识符,如果是v-for,可用index索引值
name: {
type: [String, Number],
default: ''
},
// 是否禁用
disabled: {
type: Boolean,
default: false
},
// 是否自动关闭其他swipe按钮组
autoClose: {
type: Boolean,
default: true
},
... | 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action-item/props.js | JavaScript | unknown | 739 |
<template>
<view class="uv-swipe-action-item" ref="uv-swipe-action-item">
<view class="uv-swipe-action-item__right">
<slot name="button">
<view v-for="(item,index) in options" :key="index" class="uv-swipe-action-item__right__button"
:ref="`uv-swipe-action-item__right__button-${index}`" :style="[{
a... | 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action-item/uv-swipe-action-item.vue | Vue | unknown | 6,388 |
export default {
methods: {
// 关闭时执行
closeHandler() {
this.status = 'close'
},
setState(status) {
this.status = status
},
closeOther() {
// 尝试关闭其他打开的单元格
this.parent && this.parent.closeOther(this)
}
}
}
| 2301_77169380/AppruanjianApk | uni_modules/uv-swipe-action/components/uv-swipe-action-item/wxs.js | JavaScript | unknown | 349 |
export default {
props: {
// 列表数组,元素可为字符串,如为对象可通过keyName指定目标属性名
list: {
type: Array,
default: () => []
},
// 是否显示面板指示器
indicator: {
type: Boolean,
default: false
},
// 指示器非激活颜色
indicatorActiveColor: {
type: String,
default: '#fff'
},
// 指示器的激活颜色
indicatorInactiveColor: {
type... | 2301_77169380/AppruanjianApk | uni_modules/uv-swiper/components/uv-swiper/props.js | JavaScript | unknown | 2,961 |
<template>
<view
class="uv-swiper"
:style="{
backgroundColor: bgColor,
height: $uv.addUnit(height),
borderRadius: $uv.addUnit(radius)
}"
>
<view
class="uv-swiper__loading"
v-if="loading"
>
<uv-loading-icon mode="circle"></uv-loading-icon>
</view>
<swiper
v-else
class="uv-swiper__... | 2301_77169380/AppruanjianApk | uni_modules/uv-swiper/components/uv-swiper/uv-swiper.vue | Vue | unknown | 8,937 |
export default {
props: {
// 轮播的长度
length: {
type: [String, Number],
default: 0
},
// 当前处于活动状态的轮播的索引
current: {
type: [String, Number],
default: 0
},
// 指示器非激活颜色
indicatorActiveColor: {
type: String,
default: ''
},
// 指示器的激活颜色
indicatorInactiveColor: {
type: String,
defaul... | 2301_77169380/AppruanjianApk | uni_modules/uv-swiper/components/uv-swiper-indicator/props.js | JavaScript | unknown | 546 |
<template>
<view class="uv-swiper-indicator">
<view
class="uv-swiper-indicator__wrapper"
v-if="indicatorMode === 'line'"
:class="[`uv-swiper-indicator__wrapper--${indicatorMode}`]"
:style="{
width: $uv.addUnit(lineWidth * length),
backgroundColor: indicatorInactiveColor
}"
>
<view
cla... | 2301_77169380/AppruanjianApk | uni_modules/uv-swiper/components/uv-swiper-indicator/uv-swiper-indicator.vue | Vue | unknown | 2,835 |
export default {
props: {
value: {
type: [Boolean, String, Number],
default: false
},
modelValue: {
type: [Boolean, String, Number],
default: false
},
// 是否为加载中状态
loading: {
type: Boolean,
default: false
},
// 是否为禁用装填
disabled: {
type: Boolean,
default: false
},
// 开关尺寸,单位... | 2301_77169380/AppruanjianApk | uni_modules/uv-switch/components/uv-switch/props.js | JavaScript | unknown | 1,061 |
<template>
<view
class="uv-switch"
:class="[disabled && 'uv-switch--disabled']"
:style="[switchStyle, $uv.addStyle(customStyle)]"
@tap="clickHandler"
>
<view
class="uv-switch__bg"
:style="[bgStyle]"
>
</view>
<view
class="uv-switch__node"
:class="[innerValue && 'uv-switch__node--on... | 2301_77169380/AppruanjianApk | uni_modules/uv-switch/components/uv-switch/uv-switch.vue | Vue | unknown | 6,826 |
export default {
props: {
// 当前匹配项的name
value: {
type: [String, Number, null],
default: null
},
// 是否为iPhoneX留出底部安全距离
safeAreaInsetBottom: {
type: Boolean,
default: true
},
// 是否显示上方边框
border: {
type: Boolean,
default: true
},
// 元素层级z-index
zIndex: {
type: [String, Number],
... | 2301_77169380/AppruanjianApk | uni_modules/uv-tabbar/components/uv-tabbar/props.js | JavaScript | unknown | 904 |
<template>
<view class="uv-tabbar">
<view
class="uv-tabbar__content"
ref="uv-tabbar__content"
@touchmove.stop.prevent="noop"
:class="[border && 'uv-border-top', fixed && 'uv-tabbar--fixed']"
:style="[tabbarStyle]"
>
<view class="uv-tabbar__content__item-wrapper">
<slot />
</... | 2301_77169380/AppruanjianApk | uni_modules/uv-tabbar/components/uv-tabbar/uv-tabbar.vue | Vue | unknown | 4,327 |
export default {
props: {
// item标签的名称,作为与uv-tabbar的value参数匹配的标识符
name: {
type: [String, Number, null],
default: null
},
// uv-ui内置图标或者绝对路径的图片
icon: {
icon: String,
default: ''
},
// 图标大小,默认uv-tabbar的iconSize=20
iconSize: {
type: [String, Number],
default: ''
},
// 右上角的角标提示信息
ba... | 2301_77169380/AppruanjianApk | uni_modules/uv-tabbar/components/uv-tabbar-item/props.js | JavaScript | unknown | 852 |
<template>
<view
class="uv-tabbar-item"
:style="[$uv.addStyle(customStyle)]"
@tap="clickHandler"
>
<view class="uv-tabbar-item__icon">
<uv-icon
v-if="icon"
:name="icon"
:color="isActive? parentData.activeColor : parentData.inactiveColor"
:size="iconSize? iconSize: paren... | 2301_77169380/AppruanjianApk | uni_modules/uv-tabbar/components/uv-tabbar-item/uv-tabbar-item.vue | Vue | unknown | 4,271 |
export default {
props: {
// 滑块的移动过渡时间,单位ms
duration: {
type: Number,
default: 300
},
// tabs标签数组
list: {
type: Array,
default: () => []
},
// 滑块颜色
lineColor: {
type: String,
default: '#3c9cff'
},
// 菜单选择中时的样式
activeStyle: {
type: [String, Object],
default: () => ({
co... | 2301_77169380/AppruanjianApk | uni_modules/uv-tabs/components/uv-tabs/props.js | JavaScript | unknown | 1,230 |
<template>
<view class="uv-tabs" :style="[$uv.addStyle(customStyle)]">
<view class="uv-tabs__wrapper">
<slot name="left" />
<view class="uv-tabs__wrapper__scroll-view-wrapper">
<scroll-view
:scroll-x="scrollable"
:scroll-left="scrollLeft"
scroll-with-animation
class="uv-tabs__wrapper__s... | 2301_77169380/AppruanjianApk | uni_modules/uv-tabs/components/uv-tabs/uv-tabs.vue | Vue | unknown | 12,989 |
export default {
props: {
// 标签类型info、primary、success、warning、error
type: {
type: String,
default: 'primary'
},
// 不可用
disabled: {
type: [Boolean, String],
default: false
},
// 标签的大小,large,medium,mini
size: {
type: String,
default: 'medium'
},
// tag的形状,circle(两边半圆形), square(方形,带圆... | 2301_77169380/AppruanjianApk | uni_modules/uv-tags/components/uv-tags/props.js | JavaScript | unknown | 1,853 |
<template>
<uv-transition
mode="fade"
:show="show"
:cell-child="cellChild"
>
<view class="uv-tags-wrapper">
<view
class="uv-tags"
:class="[`uv-tags--${shape}`, !plain && `uv-tags--${type}`, plain && `uv-tags--${type}--plain`, `uv-tags--${size}`,`uv-tags--${size}--${closePlace}`, plain && plainFill ... | 2301_77169380/AppruanjianApk | uni_modules/uv-tags/components/uv-tags/uv-tags.vue | Vue | unknown | 8,547 |
export default {
props: {
// 主题颜色
type: {
type: String,
default: ''
},
// 是否显示
show: {
type: Boolean,
default: true
},
// 显示的值
text: {
type: [String, Number],
default: ''
},
// 前置图标
prefixIcon: {
type: String,
default: ''
},
// 后置图标
suffixIcon: {
type: String,
... | 2301_77169380/AppruanjianApk | uni_modules/uv-text/components/uv-text/props.js | JavaScript | unknown | 2,060 |
<template>
<view
class="uv-text"
:class="[]"
v-if="show"
:style="{
margin: margin,
justifyContent: align === 'left' ? 'flex-start' : align === 'center' ? 'center' : 'flex-end'
}"
@tap="clickHandler"
>
<text
:class="['uv-text__price', type && `uv-text... | 2301_77169380/AppruanjianApk | uni_modules/uv-text/components/uv-text/uv-text.vue | Vue | unknown | 7,023 |
import { func, date, url } from '@/uni_modules/uv-ui-tools/libs/function/test.js'
import { error, timeFormat, priceFormat } from '@/uni_modules/uv-ui-tools/libs/function/index.js'
export default {
computed: {
// 经处理后需要显示的值
value() {
const {
text,
mode,
... | 2301_77169380/AppruanjianApk | uni_modules/uv-text/components/uv-text/value.js | JavaScript | unknown | 4,023 |
export default {
props: {
value: {
type: [String, Number],
default: ''
},
modelValue: {
type: [String, Number],
default: ''
},
// 输入框为空时占位符
placeholder: {
type: [String, Number],
default: ''
},
// 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
placeholderClass: {
type: S... | 2301_77169380/AppruanjianApk | uni_modules/uv-textarea/components/uv-textarea/props.js | JavaScript | unknown | 3,111 |
<template>
<view class="uv-textarea"
:class="textareaClass"
:style="[textareaStyle]">
<textarea class="uv-textarea__field"
:value="innerValue"
:style="[
{height: autoHeight ? 'auto' :$uv.addUnit(height)},
$uv.addStyle(textStyle)
]"
:placeholder="placeholder"
:placeholder-style="$uv.addStyl... | 2301_77169380/AppruanjianApk | uni_modules/uv-textarea/components/uv-textarea/uv-textarea.vue | Vue | unknown | 9,026 |
<template>
<view class="uv-toast">
<uv-overlay :show="isShow && tmpConfig.overlay" :custom-style="overlayStyle"></uv-overlay>
<uv-transition :show="isShow" mode="fade" :custom-style="aniStyle">
<view
class="uv-toast__content"
ref="uvToastContent"
:style="[contentStyle]"
:class="['uv-type-' + tmp... | 2301_77169380/AppruanjianApk | uni_modules/uv-toast/components/uv-toast/uv-toast.vue | Vue | unknown | 10,782 |
export default {
props: {
// 是否展示工具条
show: {
type: Boolean,
default: true
},
// 是否显示下边框
showBorder: {
type: Boolean,
default: false
},
// 取消按钮的文字
cancelText: {
type: String,
default: '取消'
},
// 确认按钮的文字
confirmText: {
type: String,
default: '确认'
},
// 取消按钮的颜色
cancelCo... | 2301_77169380/AppruanjianApk | uni_modules/uv-toolbar/components/uv-toolbar/props.js | JavaScript | unknown | 637 |
<template>
<view
:class="['uv-toolbar',{'uv-border-bottom':showBorder}]"
@touchmove.stop.prevent="noop"
v-if="show"
>
<view
class="uv-toolbar__cancel__wrapper"
hover-class="uv-hover-class"
>
<text
class="uv-toolbar__wrapper__cancel"
@tap="cancel"
:style="{
color: cancelColor
}"... | 2301_77169380/AppruanjianApk | uni_modules/uv-toolbar/components/uv-toolbar/uv-toolbar.vue | Vue | unknown | 2,608 |
export default {
props: {
// 需要显示的提示文字
text: {
type: [String, Number],
default: ''
},
// 点击复制按钮时,复制的文本,为空则使用text值
copyText: {
type: [String, Number],
default: ''
},
// 文本大小
size: {
type: [String, Number],
default: 14
},
// 字体颜色
color: {
type: String,
default: '#606266'
}... | 2301_77169380/AppruanjianApk | uni_modules/uv-tooltip/components/uv-tooltip/props.js | JavaScript | unknown | 1,121 |
<template>
<view
class="uv-tooltip"
:style="[$uv.addStyle(customStyle)]"
>
<uv-overlay
:show="showTooltip && tooltipTop !== -10000 && overlay && timeout>0"
customStyle="backgroundColor: rgba(0, 0, 0, 0)"
@click="overlayClickHandler"
></uv-overlay>
<view class="uv-tooltip__wrapper">
<template v-i... | 2301_77169380/AppruanjianApk | uni_modules/uv-tooltip/components/uv-tooltip/uv-tooltip.vue | Vue | unknown | 10,552 |
// const defaultOption = {
// duration: 300,
// timingFunction: 'linear',
// delay: 0,
// transformOrigin: '50% 50% 0'
// }
// #ifdef APP-NVUE
const nvueAnimation = uni.requireNativePlugin('animation')
// #endif
class MPAnimation {
constructor(options, _this) {
this.options = options
// 在iOS10+QQ小程序平台下,传给原生的对象... | 2301_77169380/AppruanjianApk | uni_modules/uv-transition/components/uv-transition/createAnimation.js | JavaScript | unknown | 3,281 |
export default {
props: {
// 是否展示组件
show: {
type: Boolean,
default: false
},
// 使用的动画模式
mode: {
type: [Array, String, null],
default() {
return 'fade'
}
},
// 动画的执行时间,单位ms
duration: {
type: [String, Number],
default: 300
},
// 使用的动画过渡函数
timingFunction: {
type: String,
... | 2301_77169380/AppruanjianApk | uni_modules/uv-transition/components/uv-transition/props.js | JavaScript | unknown | 502 |
<template>
<!-- #ifndef APP-NVUE -->
<view
v-if="isShow"
ref="ani"
:animation="animationData"
:class="customClass"
:style="transformStyles"
@click="onClick">
<slot></slot>
</view>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<view
v-if="isShow"
ref="ani"
:animation="animationData"
... | 2301_77169380/AppruanjianApk | uni_modules/uv-transition/components/uv-transition/uv-transition.vue | Vue | unknown | 7,874 |
<template>
<view>占位组件,请勿使用;如需下载示例项目,请使用【下载插件并导入HBuilderX】或【使用 HBuilderX 导入示例项目】或【下载示例项目ZIP】</view>
</template>
<script>
</script>
<style>
</style>
| 2301_77169380/AppruanjianApk | uni_modules/uv-ui/components/uv-ui/uv-ui.vue | Vue | unknown | 250 |
<template>
</template>
<script>
</script>
<style>
</style>
| 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/components/uv-ui-tools/uv-ui-tools.vue | Vue | unknown | 59 |
// 全局挂载引入http相关请求拦截插件
import Request from './libs/luch-request'
// 引入全局mixin
import mixin from './libs/mixin/mixin.js'
// 小程序特有的mixin
import mpMixin from './libs/mixin/mpMixin.js'
// #ifdef MP
import mpShare from './libs/mixin/mpShare.js'
// #endif
// 路由封装
import route from './libs/util/route.js'
// 公共工具函数
import * a... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/index.js | JavaScript | unknown | 2,287 |
// 引入公共基础类
@import "./libs/css/common.scss";
// 非nvue的样式
/* #ifndef APP-NVUE */
@import "./libs/css/vue.scss";
/* #endif */ | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/index.scss | SCSS | unknown | 146 |
// 此版本发布于2024-01-20
const version = '1.1.20'
// 开发环境才提示,生产环境不会提示
if (process.env.NODE_ENV === 'development') {
console.log(`\n %c uvui V${version} https://www.uvui.cn/ \n\n`, 'color: #ffffff; background: #3c9cff; padding:5px 0; border-radius: 5px;');
}
export default {
v: version,
version,
// 主题名称
ty... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/config/config.js | JavaScript | unknown | 1,031 |
$uv-main-color: #303133 !default;
$uv-content-color: #606266 !default;
$uv-tips-color: #909193 !default;
$uv-light-color: #c0c4cc !default;
$uv-border-color: #dadbde !default;
$uv-bg-color: #f3f4f6 !default;
$uv-disabled-color: #c8c9cc !default;
$uv-primary: #3c9cff !default;
$uv-primary-dark: #398ade !default;
$uv-pr... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/css/color.scss | SCSS | unknown | 942 |
// 超出行数,自动显示行尾省略号,最多5行
// 来自uvui的温馨提示:当您在控制台看到此报错,说明需要在App.vue的style标签加上【lang="scss"】
@for $i from 1 through 5 {
.uv-line-#{$i} {
/* #ifdef APP-NVUE */
// nvue下,可以直接使用lines属性,这是weex特有样式
lines: $i;
text-overflow: ellipsis;
overflow: hidden;
flex: 1;
/* #endif */
/* #ifndef APP-NVUE */
// vue下,单行和多行显示... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/css/common.scss | SCSS | unknown | 2,560 |
@mixin flex($direction: row) {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: $direction;
}
/* #ifndef APP-NVUE */
// 由于uvui是基于nvue环境进行开发的,此环境中普通元素默认为flex-direction: column;
// 所以在非nvue中,需要对元素进行重置为flex-direction: column; 否则可能会表现异常
$uvui-nvue-style: true !default;
@if $uvui-nvue-style == true {
... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/css/components.scss | SCSS | unknown | 620 |
// 超出行数,自动显示行尾省略号,最多5行
// 来自uvui的温馨提示:当您在控制台看到此报错,说明需要在App.vue的style标签加上【lang="scss"】
@if variable-exists(show-lines) {
@for $i from 1 through 5 {
.uv-line-#{$i} {
/* #ifdef APP-NVUE */
// nvue下,可以直接使用lines属性,这是weex特有样式
lines: $i;
text-overflow: ellipsis;
overflow: hidden;
flex: 1;
/* #endif */
... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/css/variable.scss | SCSS | unknown | 3,077 |
// 历遍生成4个方向的底部安全区
@each $d in top, right, bottom, left {
.uv-safe-area-inset-#{$d} {
padding-#{$d}: 0;
padding-#{$d}: constant(safe-area-inset-#{$d});
padding-#{$d}: env(safe-area-inset-#{$d});
}
}
//提升H5端uni.toast()的层级,避免被uvui的modal等遮盖
/* #ifdef H5 */
uni-toast {
z-index: 10090;
}
uni-toast .uni-toast... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/css/vue.scss | SCSS | unknown | 863 |
/**
* 求两个颜色之间的渐变值
* @param {string} startColor 开始的颜色
* @param {string} endColor 结束的颜色
* @param {number} step 颜色等分的份额
* */
function colorGradient(startColor = 'rgb(0, 0, 0)', endColor = 'rgb(255, 255, 255)', step = 10) {
const startRGB = hexToRgb(startColor, false) // 转换为rgb数组模式
const startR = startRGB[0]
... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/colorGradient.js | JavaScript | unknown | 4,407 |
let timeout = null
/**
* 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
*
* @param {Function} func 要执行的回调函数
* @param {Number} wait 延时的时间
* @param {Boolean} immediate 是否立即执行
* @return null
*/
function debounce(func, wait = 500, immediate = false) {
// 清除定时器
if (timeout !== null) clearTimeout(timeout)
// 立即执行,此类情... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/debounce.js | JavaScript | unknown | 940 |
let _boundaryCheckingState = true; // 是否进行越界检查的全局开关
/**
* 把错误的数据转正
* @private
* @example strip(0.09999999999999998)=0.1
*/
function strip(num, precision = 15) {
return +parseFloat(Number(num).toPrecision(precision));
}
/**
* Return digits length of a number
* @private
* @param {*number} num Input number
*/
... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/digit.js | JavaScript | unknown | 3,841 |
import { number, empty } from './test.js'
import { round } from './digit.js'
/**
* @description 如果value小于min,取min;如果value大于max,取max
* @param {number} min
* @param {number} max
* @param {number} value
*/
function range(min = 0, max = 0, value = 0) {
return Math.max(min, Math.min(max, Number(value)))
}
/**
* @des... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/index.js | JavaScript | unknown | 22,441 |
/**
* 注意:
* 此部分内容,在vue-cli模式下,需要在vue.config.js加入如下内容才有效:
* module.exports = {
* transpileDependencies: ['uview-v2']
* }
*/
let platform = 'none'
// #ifdef VUE3
platform = 'vue3'
// #endif
// #ifdef VUE2
platform = 'vue2'
// #endif
// #ifdef APP-PLUS
platform = 'plus'
// #endif
// #ifdef APP-NVUE
platform... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/platform.js | JavaScript | unknown | 1,075 |
/**
* 验证电子邮箱格式
*/
function email(value) {
return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value)
}
/**
* 验证手机格式
*/
function mobile(value) {
return /^1([3589]\d|4[5-9]|6[1-2,4-7]|7[0-8])\d{8}$/.test(value)
}
/**
* 验证URL格式
*/
function url(value) {
return /^((https... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/test.js | JavaScript | unknown | 5,882 |
let timer; let
flag
/**
* 节流原理:在一定时间内,只能触发一次
*
* @param {Function} func 要执行的回调函数
* @param {Number} wait 延时的时间
* @param {Boolean} immediate 是否立即执行
* @return null
*/
function throttle(func, wait = 500, immediate = true) {
if (immediate) {
if (!flag) {
flag = true
// 如果是立即执行,... | 2301_77169380/AppruanjianApk | uni_modules/uv-ui-tools/libs/function/throttle.js | JavaScript | unknown | 871 |