This commit is contained in:
home孙 2025-03-11 14:55:18 +08:00
parent 7e93a49705
commit 0a561f167e
26 changed files with 112 additions and 95 deletions

2
node_modules/uview-ui/LICENSE generated vendored
View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 www.uviewui.com
Copyright (c) 2023 www.uviewui.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -113,7 +113,7 @@
style.right = this.offset[1] + 'rpx';
style.transform = "translateY(0) translateX(0)";
}
// miniscal()
// miniscale()
if(this.size == 'mini') {
style.transform = style.transform + " scale(0.8)";
}

View File

@ -23,7 +23,7 @@
<image
:src="thumb"
class="u-card__head--left__thumb"
mode="aspectfull"
mode="aspectFill"
v-if="thumb"
:style="{
height: thumbWidth + 'rpx',

View File

@ -172,6 +172,8 @@
},
//
open(index) {
// popup使
if (this.contentHeight < 1) this.getContentHeight()
//
// this.highlightIndex = 9999;
//

View File

@ -18,7 +18,7 @@
class="u-image__loading"
:style="{
borderRadius: shape == 'circle' ? '50%' : $u.addUnit(borderRadius),
backgroundColor: this.bgColor
backgroundColor: bgColor
}"
>
<slot v-if="$slots.loading" name="loading" />

View File

@ -28,6 +28,7 @@
:selection-start="uSelectionStart"
:cursor-spacing="getCursorSpacing"
:show-confirm-bar="showConfirmbar"
:adjust-position="adjustPosition"
@input="handleInput"
@blur="handleBlur"
@focus="onFocus"
@ -250,7 +251,7 @@ export default {
},
getStyle() {
let style = {};
// typeinputtextare
// typeinputtextarea
style.minHeight = this.height ? this.height + 'rpx' : this.type == 'textarea' ?
this.textareaHeight + 'rpx' : this.inputHeight + 'rpx';
style = Object.assign(style, this.customStyle);

View File

@ -10,9 +10,9 @@
striped && stripedActive ? 'u-striped-active' : ''
]" class="u-active" :style="[progressStyle]">
<slot v-if="$slots.default || $slots.$default" />
<block v-else-if="showPercent">
<template v-else-if="showPercent">
{{percent + '%'}}
</block>
</template>
</view>
</view>
</template>

View File

@ -73,7 +73,7 @@
height: 20px;
display: inline-block;
vertical-align: middle;
-webkit-animation: a 1s steps(12) infinite;
-webkit-animation: u-flower 1s steps(12) infinite;
animation: u-flower 1s steps(12) infinite;
background: transparent url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=) no-repeat;
background-size: 100%;

View File

@ -21,7 +21,7 @@
></view>
<view v-if="mode === 'middleLine' && charArrLength <= index" :class="[breathe && charArrLength == index ? 'u-breathe' : '', charArrLength === index ? 'u-middle-line-active' : '']"
class="u-middle-line" :style="{height: bold ? '4px' : '2px', background: charArrLength === index ? activeColor : inactiveColor}"></view>
<view v-if="mode === 'bottomLine'" :class="[breathe && charArrLength == index ? 'u-breathe' : '', charArrLength === index ? 'u-buttom-line-active' : '']"
<view v-if="mode === 'bottomLine'" :class="[breathe && charArrLength == index ? 'u-breathe' : '', charArrLength === index ? 'u-bottom-line-active' : '']"
class="u-bottom-line" :style="{height: bold ? '4px' : '2px', background: charArrLength === index ? activeColor : inactiveColor}"></view>
<block v-if="!dotFill"> {{ charArr[index] ? charArr[index] : ''}}</block>
<block v-else>
@ -294,7 +294,7 @@
transform: translate(-50%, -50%);
}
.u-buttom-line-active {
.u-bottom-line-active {
background: $u-type-primary;
}

View File

@ -44,7 +44,7 @@
* @property {Boolean} show-title 是否显示标题默认true
* @property {Boolean} async-close 是否异步关闭只对确定按钮有效默认false
* @property {Boolean} show-confirm-button 是否显示确认按钮默认true
* @property {Stringr | Number} negative-top modal往上偏移的值
* @property {String | Number} negative-top modal往上偏移的值
* @property {Boolean} show-cancel-button 是否显示取消按钮默认false
* @property {Boolean} mask-close-able 是否允许点击遮罩关闭modal默认false
* @property {String} confirm-text 确认按钮的文字内容默认"确认"

View File

@ -68,8 +68,8 @@
* @property {String Number} font-size 字体大小单位rpx默认28
* @property {Boolean} is-circular mode为horizontal时指明是否水平衔接滚动默认true
* @property {String} play-state 播放状态play - 播放paused - 暂停默认play
* @property {String Nubmer} border-radius 通知栏圆角默认为0
* @property {String Nubmer} padding 内边距字符串与普通的内边距css写法一直默认"18rpx 24rpx"
* @property {String Number} border-radius 通知栏圆角默认为0
* @property {String Number} padding 内边距字符串与普通的内边距css写法一直默认"18rpx 24rpx"
* @property {Boolean} no-list-hidden 列表为空时是否显示组件默认false
* @property {Boolean} disable-touch 是否禁止通过手动滑动切换通知只有mode = vertical或者mode = horizontal且is-circular = false时有效默认true
* @event {Function} click 点击通告文字触发只有mode = vertical或者mode = horizontal且is-circular = false时有效

View File

@ -7,7 +7,7 @@
<script>
import Emitter from '../../libs/util/emitter.js';
/**
* radioRroup 单选框父组件
* radioGroup 单选框父组件
* @description 单选框用于有一个选择用户只能选择其中一个的场景搭配u-radio使用
* @tutorial https://www.uviewui.com/components/radio.html
* @property {Boolean} disabled 是否禁用所有radio默认false

View File

@ -94,7 +94,7 @@
this.parent.children.push(this);
},
computed: {
// u-raios-group
// u-radio-group
elDisabled() {
return this.disabled !== '' ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
},

View File

@ -268,7 +268,7 @@ export default {
label: tmp ? tmp[this.labelName] : null
};
//
if(tmp && tmp.extra) data.extra = tmp.extra;
if(tmp && tmp.extra !== undefined) data.extra = tmp.extra;
this.selectValue.push(data)
}
},

View File

@ -213,7 +213,6 @@ export default {
.u-slider {
position: relative;
border-radius: 999px;
border-radius: 999px;
background-color: #ebedf0;
}
@ -231,7 +230,6 @@ export default {
position: relative;
border-radius: inherit;
transition: width 0.2s;
transition: width 0.2s;
background-color: #1989fa;
}

View File

@ -4,7 +4,7 @@
background: bgColor
}">
<scroll-view scroll-x class="u-scroll-view" :scroll-left="scrollLeft" scroll-with-animation :style="{ zIndex: zIndex + 1 }">
<view class="u-tabs-scroll-box" :class="{'u-tabs-scorll-flex': !isScroll}">
<view class="u-tabs-scroll-box" :class="{'u-tabs-scroll-flex': !isScroll}">
<view class="u-tabs-item" :style="[tabItemStyle(index)]"
v-for="(item, index) in getTabs" :key="index" :class="[preId + index]" @tap="emit(index)">
<u-badge :count="item[count] || item['count'] || 0" :offset="offset" size="mini"></u-badge>
@ -428,12 +428,12 @@
position: relative;
}
.u-tabs-scorll-flex {
.u-tabs-scroll-flex {
@include vue-flex;
justify-content: space-between;
}
.u-tabs-scorll-flex .u-tabs-item {
.u-tabs-scroll-flex .u-tabs-item {
flex: 1;
}

View File

@ -5,7 +5,7 @@
<!-- $u.getRect()对组件根节点无效因为写了.in(this)故这里获取内层接点尺寸 -->
<view>
<scroll-view scroll-x class="u-scroll-view" :scroll-left="scrollLeft" scroll-with-animation>
<view class="u-scroll-box" :id="id" :class="{'u-tabs-scorll-flex': !isScroll}">
<view class="u-scroll-box" :id="id" :class="{'u-tabs-scroll-flex': !isScroll}">
<view class="u-tab-item u-line-1" :id="'u-tab-item-' + index" v-for="(item, index) in list" :key="index" @tap="clickTab(index)"
:style="[tabItemStyle(index)]">
<u-badge :count="item[count] || item['count'] || 0" :offset="offset" size="mini"></u-badge>
@ -362,7 +362,7 @@
bottom: 0;
}
.u-tabs-scorll-flex {
.u-tabs-scroll-flex {
@include vue-flex;
justify-content: space-between;
}

View File

@ -48,7 +48,7 @@
},
computed: {
iconName() {
// nonetypeerror|warning|succes|info
// nonetypeerror|warning|success|info
if (['error', 'warning', 'success', 'info'].indexOf(this.tmpConfig.type) >= 0 && this.tmpConfig.icon) {
let icon = this.$u.type2icon(this.tmpConfig.type);
return icon;

View File

@ -1,5 +1,5 @@
// 此版本发布于2022-04-19
let version = '1.8.6';
// 此版本发布于2023-03-27
let version = '1.8.8';
export default {
v: version,

View File

@ -1,23 +1,35 @@
// 判断arr是否为一个数组返回一个bool值
function isArray (arr) {
return Object.prototype.toString.call(arr) === '[object Array]';
function isArray(arr) {
return Object.prototype.toString.call(arr) === '[object Array]';
}
// 深度克隆
function deepClone (obj) {
// 对常见的“非”值,直接返回原来值
if([null, undefined, NaN, false].includes(obj)) return obj;
if(typeof obj !== "object" && typeof obj !== 'function') {
//原始类型直接返回
return obj;
}
var o = isArray(obj) ? [] : {};
for(let i in obj) {
if(obj.hasOwnProperty(i)){
o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
}
}
return o;
function deepClone(obj, cache = new WeakMap()) {
if (obj === null || typeof obj !== 'object') return obj;
if (cache.has(obj)) return cache.get(obj);
let clone;
if (obj instanceof Date) {
clone = new Date(obj.getTime());
} else if (obj instanceof RegExp) {
clone = new RegExp(obj);
} else if (obj instanceof Map) {
clone = new Map(Array.from(obj, ([key, value]) => [key, deepClone(value, cache)]));
} else if (obj instanceof Set) {
clone = new Set(Array.from(obj, value => deepClone(value, cache)));
} else if (Array.isArray(obj)) {
clone = obj.map(value => deepClone(value, cache));
} else if (Object.prototype.toString.call(obj) === '[object Object]') {
clone = Object.create(Object.getPrototypeOf(obj));
cache.set(obj, clone);
for (const [key, value] of Object.entries(obj)) {
clone[key] = deepClone(value, cache);
}
} else {
clone = Object.assign({}, obj);
}
cache.set(obj, clone);
return clone;
}
export default deepClone;

View File

@ -3,28 +3,27 @@ import deepClone from "./deepClone";
// JS对象深度合并
function deepMerge(target = {}, source = {}) {
target = deepClone(target);
if (typeof target !== 'object' || typeof source !== 'object') return false;
for (var prop in source) {
if (typeof target !== 'object' || target === null || typeof source !== 'object' || source === null) return target;
const merged = Array.isArray(target) ? target.slice() : Object.assign({}, target);
for (const prop in source) {
if (!source.hasOwnProperty(prop)) continue;
if (prop in target) {
if (typeof target[prop] !== 'object') {
target[prop] = source[prop];
} else {
if (typeof source[prop] !== 'object') {
target[prop] = source[prop];
} else {
if (target[prop].concat && source[prop].concat) {
target[prop] = target[prop].concat(source[prop]);
} else {
target[prop] = deepMerge(target[prop], source[prop]);
}
}
}
const sourceValue = source[prop];
const targetValue = merged[prop];
if (sourceValue instanceof Date) {
merged[prop] = new Date(sourceValue);
} else if (sourceValue instanceof RegExp) {
merged[prop] = new RegExp(sourceValue);
} else if (sourceValue instanceof Map) {
merged[prop] = new Map(sourceValue);
} else if (sourceValue instanceof Set) {
merged[prop] = new Set(sourceValue);
} else if (typeof sourceValue === 'object' && sourceValue !== null) {
merged[prop] = deepMerge(targetValue, sourceValue);
} else {
target[prop] = source[prop];
merged[prop] = sourceValue;
}
}
return target;
return merged;
}
export default deepMerge;

View File

@ -54,12 +54,12 @@ class Router {
mergeConfig.url = this.mixinParam(options, params)
mergeConfig.type = 'navigateTo'
} else {
mergeConfig = uni.$u.deepClone(options, this.config)
mergeConfig = uni.$u.deepMerge(this.config, options)
// 否则正常使用mergeConfig中的url和params进行拼接
mergeConfig.url = this.mixinParam(options.url, options.params)
}
if(params.intercept) {
if (params.intercept) {
this.config.intercept = params.intercept
}
// params参数也带给拦截器

26
node_modules/uview-ui/package.json generated vendored
View File

@ -1,28 +1,28 @@
{
"_from": "uview-ui@1.8.6",
"_id": "uview-ui@1.8.6",
"_from": "uview-ui@1.8.8",
"_id": "uview-ui@1.8.8",
"_inBundle": false,
"_integrity": "sha512-R93WU6htCP2Fpw668ABpF7Y8UqIx66pUKGAwBYLDkbnIldyKWkjtfJzqjFm22tF41ty6FVB+82L+gIL775c5LQ==",
"_integrity": "sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg==",
"_location": "/uview-ui",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "uview-ui@1.8.6",
"raw": "uview-ui@1.8.8",
"name": "uview-ui",
"escapedName": "uview-ui",
"rawSpec": "1.8.6",
"rawSpec": "1.8.8",
"saveSpec": null,
"fetchSpec": "1.8.6"
"fetchSpec": "1.8.8"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.6.tgz",
"_shasum": "1a2e7b508937f37d7c1bfd8b67e6a3e3e73300d0",
"_spec": "uview-ui@1.8.6",
"_where": "C:\\Users\\PC\\Desktop\\2023-2-13\\云上温室\\wszhyWx",
"_resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.8.tgz",
"_shasum": "2db41f5b5d59452eb2a17e4aa0b684a004ed0265",
"_spec": "uview-ui@1.8.8",
"_where": "G:\\项目\\云上温室大屏\\wszhyWx-wechat",
"author": {
"name": "uView"
},
@ -30,8 +30,8 @@
"deprecated": false,
"description": "uView UI是uni-app生态优秀的UI框架全面的组件和便捷的工具会让您信手拈来如鱼得水",
"devDependencies": {
"node-sass": "^4.14.0",
"sass-loader": "^8.0.2"
"sass": "1.26.2",
"sass-loader": "8.0.2"
},
"keywords": [
"uview",
@ -63,5 +63,5 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.8.6"
"version": "1.8.8"
}

18
package-lock.json generated
View File

@ -97,7 +97,7 @@
},
"asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
"dev": true
},
@ -267,7 +267,7 @@
},
"combined-stream": {
"version": "1.0.8",
"resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
"dev": true,
"requires": {
@ -328,7 +328,7 @@
},
"delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
"dev": true
},
@ -388,9 +388,9 @@
"dev": true
},
"ezuikit-js": {
"version": "7.7.9-beta1",
"resolved": "https://registry.npmmirror.com/ezuikit-js/-/ezuikit-js-7.7.9-beta1.tgz",
"integrity": "sha512-4+wEjGaeJ8cuLgrGqRGS9+JFdNPcp+CksUTe9uMEWAkLoPW9JJUzXGTdX3Lqih/iWqomgo3sEkDA+riKGXgGZw=="
"version": "7.7.10",
"resolved": "https://registry.npmjs.org/ezuikit-js/-/ezuikit-js-7.7.10.tgz",
"integrity": "sha512-mpySnXY3F4LzW0R262IZIFBfp3fpDNVaB5UBAeO/IhofZii+2UD0p5Oc/2BrPfjADmcZnGCMOvJ92hlUMkk5EQ=="
},
"fast-deep-equal": {
"version": "3.1.3",
@ -1586,9 +1586,9 @@
"dev": true
},
"uview-ui": {
"version": "1.8.6",
"resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.6.tgz",
"integrity": "sha512-R93WU6htCP2Fpw668ABpF7Y8UqIx66pUKGAwBYLDkbnIldyKWkjtfJzqjFm22tF41ty6FVB+82L+gIL775c5LQ=="
"version": "1.8.8",
"resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.8.tgz",
"integrity": "sha512-Osal3yzXiHor0In9OPTZuXTaqTbDglMZ9RGK/MPYDoQQs+y0hrBCUD0Xp5T70C8i2lLu2X6Z11zJhmsQWMR7Jg=="
},
"validate-npm-package-license": {
"version": "3.0.4",

View File

@ -29,7 +29,7 @@
]
},
"dependencies": {
"ezuikit-js": "^7.7.9-beta1",
"uview-ui": "^1.8.6"
"ezuikit-js": "^7.7.10",
"uview-ui": "^1.8.8"
}
}

View File

@ -32,8 +32,13 @@
key:'userid',
success:function(res){
that.userid = res.data
if(that.cameraSerialNumber&&that.cameraChannelNumber){
that.src = `https://portal.lihe-control.com/#/videoLive?cameraSerialNumber=${that.cameraSerialNumber}&token=${that.token}&userid=${that.userid}&cameraChannelNumber=${that.cameraChannelNumber}`
}else{
that.src =""
}
// that.src = `https://portal.lihe-control.com/#/irrigateSet?id=${that.id}&token=${that.token}&userid=${that.userid}&deviceId=${that.deviceId}`
that.src = `https://portal.lihe-control.com/#/videoLive?cameraSerialNumber=${that.cameraSerialNumber}&token=${that.token}&userid=${that.userid}&cameraChannelNumber=${that.cameraChannelNumber}`
console.log(that.src,11);
}
})