diff --git a/src/uni_modules/uview-plus/components/up-button/up-button.uvue b/src/uni_modules/uview-plus/components/up-button/up-button.uvue index bb4aaa54d..4c38b3a04 100644 --- a/src/uni_modules/uview-plus/components/up-button/up-button.uvue +++ b/src/uni_modules/uview-plus/components/up-button/up-button.uvue @@ -27,7 +27,7 @@ @@ -62,7 +63,7 @@ import { mpMixin } from '../../libs/mixin/mpMixin'; import { mixin } from '../../libs/mixin/mixin'; import { propsButton } from "./props"; import config from '../../libs/config/config'; -import { addStyle } from '../../libs/function/index'; +import { addStyle, addUnit } from '../../libs/function/index'; import { throttle } from '../../libs/function/throttle'; /** * button 按钮 @@ -130,7 +131,7 @@ export default { ["hairline", this.hairline], ] ); - console.log(ret) + // console.log(ret) } else { // 由于nvue的原因,在有color参数时,不需要传入type,否则会生成type相关的类型,影响最终的样式 ret = this.bem( @@ -157,14 +158,14 @@ export default { } return "rgb(200, 200, 200)"; }, - iconColorCom(): any { + iconColorCom(): String { // 如果是镂空状态,设置了color就用color值,否则使用主题颜色, // up-icon的color能接受一个主题颜色的值 if (this.iconColor != '') return this.iconColor; if (this.plain) { return this.color != '' ? this.color : this.type; } else { - return this.type === "info" ? "#000000" : "#ffffff"; + return ""; } }, baseColor(): any { @@ -176,7 +177,7 @@ export default { style.color = this.plain ? this.color : "white"; if (!this.plain) { // 非镂空,背景色使用自定义的颜色 - style["background-color"] = this.color; + style["backgroundColor"] = this.color; } if (this.color.indexOf("gradient") !== -1) { // 如果自定义的颜色为渐变色,不显示边框,以及通过backgroundImage设置渐变色 @@ -205,7 +206,7 @@ export default { if (this.type === "info") { style['color'] = "#323233"; } - console.debug(this.color) + // console.debug(this.color) if (this.color != '') { style['color'] = this.plain ? this.color : "white"; } @@ -214,17 +215,20 @@ export default { }, // 字体大小 textSize(): String { - let fontSize = '14'; - if (this.size === "large") fontSize = '16'; - if (this.size === "normal") fontSize = '14'; - if (this.size === "small") fontSize = '12'; - if (this.size === "mini") fontSize = '10'; + let fontSize = '14px'; + if (this.size === "large") fontSize = '16px'; + if (this.size === "normal") fontSize = '14px'; + if (this.size === "small") fontSize = '12px'; + if (this.size === "mini") fontSize = '10px'; return fontSize; }, }, emits: ['click', 'getphonenumber', 'getuserinfo', 'error', 'opensetting', 'launchapp'], methods: { + addUnit(val: any): any { + return addUnit(val) + }, addStyle(val: any): any { return addStyle(val) }, @@ -260,8 +264,6 @@ export default { diff --git a/src/uni_modules/uview-plus/components/up-button/vue.scss b/src/uni_modules/uview-plus/components/up-button/vue.scss index 41f8b080e..3927074c1 100644 --- a/src/uni_modules/uview-plus/components/up-button/vue.scss +++ b/src/uni_modules/uview-plus/components/up-button/vue.scss @@ -64,7 +64,7 @@ $up-button-plain-up-button-warning-color:$up-error; color:$up-button-plain-up-button-info-color; } } - + &--plain { &.up-button--success { color:$up-button-plain-up-button-success-color; diff --git a/src/uni_modules/uview-plus/components/up-cell-group/up-cell-group.uvue b/src/uni_modules/uview-plus/components/up-cell-group/up-cell-group.uvue index a2db6f190..351254e40 100644 --- a/src/uni_modules/uview-plus/components/up-cell-group/up-cell-group.uvue +++ b/src/uni_modules/uview-plus/components/up-cell-group/up-cell-group.uvue @@ -49,7 +49,6 @@ $up-cell-group-title-color: $up-main-color !default; .up-cell-group { - flex: 1; &__title { padding: $up-cell-group-title-padding; diff --git a/src/uni_modules/uview-plus/components/up-cell/props.uts b/src/uni_modules/uview-plus/components/up-cell/props.uts index fe55256aa..d236c8f57 100644 --- a/src/uni_modules/uview-plus/components/up-cell/props.uts +++ b/src/uni_modules/uview-plus/components/up-cell/props.uts @@ -1,107 +1,108 @@ import { defineMixin } from '../../libs/vue.uts' import defProps from '../../libs/config/props.uts' +let crtProp = defProps['cell'] as UTSJSONObject export const propsCell = defineMixin({ props: { // 标题 title: { type: String, - default: defProps.getString('cell.title') + default: crtProp['title'] }, // 标题下方的描述信息 label: { type: String, - default: defProps.getString('cell.label') + default: crtProp['label'] }, // 右侧的内容 value: { type: String, - default: defProps.getString('cell.value') + default: crtProp['value'] }, // 左侧图标名称,或者图片链接(本地文件建议使用绝对地址) icon: { type: String, - default: defProps.getString('cell.icon') + default: crtProp['icon'] }, // 是否禁用cell disabled: { type: Boolean, - default: defProps.getBoolean('cell.disabled') + default: crtProp['disabled'] }, // 是否显示下边框 border: { type: Boolean, - default: defProps.getBoolean('cell.border') + default: crtProp['border'] }, // 内容是否垂直居中(主要是针对右侧的value部分) center: { type: Boolean, - default: defProps.getBoolean('cell.center') + default: crtProp['center'] }, // 点击后跳转的URL地址 url: { type: String, - default: defProps.getString('cell.url') + default: crtProp['url'] }, // 链接跳转的方式,内部使用的是uView封装的route方法,可能会进行拦截操作 linkType: { type: String, - default: defProps.getString('cell.linkType') + default: crtProp['linkType'] }, // 是否开启点击反馈(表现为点击时加上灰色背景) clickable: { type: Boolean, - default: defProps.getBoolean('cell.clickable') + default: crtProp['clickable'] }, // 是否展示右侧箭头并开启点击反馈 isLink: { type: Boolean, - default: defProps.getBoolean('cell.isLink') + default: crtProp['isLink'] }, // 是否显示表单状态下的必填星号(此组件可能会内嵌入input组件) required: { type: Boolean, - default: defProps.getBoolean('cell.required') + default: crtProp['required'] }, // 右侧的图标箭头 rightIcon: { type: String, - default: defProps.getString('cell.rightIcon') + default: crtProp['rightIcon'] }, // 右侧箭头的方向,可选值为:left,up,down arrowDirection: { type: String, - default: defProps.getString('cell.arrowDirection') + default: crtProp['arrowDirection'] }, // 左侧图标样式 iconStyle: { type: Object, - default: defProps.getAny('cell.iconStyle') + default: crtProp['iconStyle'] }, // 右侧箭头图标的样式 rightIconStyle: { type: Object, - default: defProps.getAny('cell.rightIconStyle') + default: crtProp['rightIconStyle'] }, // 标题的样式 titleStyle: { type: Object, - default: defProps.getAny('cell.titleStyle') + default: crtProp['titleStyle'] }, // 单位元的大小,可选值为large size: { type: String, - default: defProps.getString('cell.size') + default: crtProp['size'] }, // 点击cell是否阻止事件传播 stop: { type: Boolean, - default: defProps.getBoolean('cell.stop') + default: crtProp['stop'] }, // 标识符,cell被点击时返回 name: { type: String, - default: defProps.getString('cell.name') + default: crtProp['name'] } } }) diff --git a/src/uni_modules/uview-plus/components/up-cell/up-cell.uvue b/src/uni_modules/uview-plus/components/up-cell/up-cell.uvue index 9d717bb3a..3141bef3a 100644 --- a/src/uni_modules/uview-plus/components/up-cell/up-cell.uvue +++ b/src/uni_modules/uview-plus/components/up-cell/up-cell.uvue @@ -11,16 +11,16 @@ + :size="size === 'large' ? '22px' : '18px'"> - + - - {{ title }} - + + {{ title }} + @@ -40,7 +40,7 @@ + :size="size === 'large' ? '18px' : '16px'"> + * @example */ export default { name: 'up-icon', @@ -106,7 +106,7 @@ } // 非主题色值时,才当作颜色值 let types = config.getArray('type') - console.log('###', types) + // console.log('###', types) // if (this.color != '' && types.includes(this.color)) { // style['color'] = this.color // } diff --git a/src/uni_modules/uview-plus/components/up-image/props.uts b/src/uni_modules/uview-plus/components/up-image/props.uts index 458f8856f..18414cf16 100644 --- a/src/uni_modules/uview-plus/components/up-image/props.uts +++ b/src/uni_modules/uview-plus/components/up-image/props.uts @@ -1,87 +1,88 @@ import { defineMixin } from '../../libs/vue' -import defProps from '../../libs/config/props' +import defProps from '../../libs/config/props' +let crtProp = defProps['image'] as UTSJSONObject export const propsImage = defineMixin({ props: { // 图片地址 src: { type: String, - default: defProps.getString('image.src') + default: crtProp['src'] }, // 裁剪模式 mode: { type: String, - default: defProps.getString('image.mode') + default: crtProp['mode'] }, // 宽度,单位任意 width: { type: [String], - default: defProps.getString('image.width') + default: crtProp['width'] }, // 高度,单位任意 height: { type: [String], - default: defProps.getString('image.height') + default: crtProp['height'] }, // 图片形状,circle-圆形,square-方形 shape: { type: String, - default: defProps.getString('image.shape') + default: crtProp['shape'] }, // 圆角,单位任意 radius: { type: [String], - default: defProps.getString('image.radius') + default: crtProp['radius'] }, // 是否懒加载,微信小程序、App、百度小程序、字节跳动小程序 lazyLoad: { type: Boolean, - default: defProps.getBoolean('image.lazyLoad') + default: crtProp['lazyLoad'] }, // 开启长按图片显示识别微信小程序码菜单 showMenuByLongpress: { type: Boolean, - default: defProps.getBoolean('image.showMenuByLongpress') + default: crtProp['showMenuByLongpress'] }, // 加载中的图标,或者小图片 loadingIcon: { type: String, - default: defProps.getString('image.loadingIcon') + default: crtProp['loadingIcon'] }, // 加载失败的图标,或者小图片 errorIcon: { type: String, - default: defProps.getString('image.errorIcon') + default: crtProp['errorIcon'] }, // 是否显示加载中的图标或者自定义的slot showLoading: { type: Boolean, - default: defProps.getBoolean('image.showLoading') + default: crtProp['showLoading'] }, // 是否显示加载错误的图标或者自定义的slot showError: { type: Boolean, - default: defProps.getBoolean('image.showError') + default: crtProp['showError'] }, // 是否需要淡入效果 fade: { type: Boolean, - default: defProps.getBoolean('image.fade') + default: crtProp['fade'] }, // 只支持网络资源,只对微信小程序有效 webp: { type: Boolean, - default: defProps.getBoolean('image.webp') + default: crtProp['webp'] }, // 过渡时间,单位ms duration: { type: [Number], - default: defProps.getNumber('image.duration') + default: crtProp['duration'] }, // 背景颜色,用于深色页面加载图片时,为了和背景色融合 bgColor: { type: String, - default: defProps.getString('image.bgColor') + default: crtProp['bgColor'] } } }) diff --git a/src/uni_modules/uview-plus/components/up-line/props.uts b/src/uni_modules/uview-plus/components/up-line/props.uts index 03eca5e12..bc9297cf9 100644 --- a/src/uni_modules/uview-plus/components/up-line/props.uts +++ b/src/uni_modules/uview-plus/components/up-line/props.uts @@ -1,36 +1,37 @@ import { defineMixin } from '../../libs/vue.uts' import defProps from '../../libs/config/props.uts' +let crtProp = defProps['line'] as UTSJSONObject export const propsLine = defineMixin({ props: { color: { type: String, - default: defProps.getString('line.color') + default: crtProp['color'] }, // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等 length: { type: [String, Number], - default: defProps.getString('line.length') + default: crtProp['length'] }, // 线条方向,col-竖向,row-横向 direction: { type: String, - default: defProps.getString('line.direction') + default: crtProp['direction'] }, // 是否显示细边框 hairline: { type: Boolean, - default: defProps.getBoolean('line.hairline') + default: crtProp['hairline'] }, // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px" margin: { type: String, - default: defProps.getString('line.margin') + default: crtProp['margin'] }, // 是否虚线,true-虚线,false-实线 dashed: { type: Boolean, - default: defProps.getBoolean('line.dashed') + default: crtProp['dashed'] } } }) diff --git a/src/uni_modules/uview-plus/components/up-loading-icon/loadingIcon.uts b/src/uni_modules/uview-plus/components/up-loading-icon/loadingIcon.uts index a474d8f89..24bff788e 100644 --- a/src/uni_modules/uview-plus/components/up-loading-icon/loadingIcon.uts +++ b/src/uni_modules/uview-plus/components/up-loading-icon/loadingIcon.uts @@ -8,13 +8,14 @@ * @FilePath : /u-view2.0/uview-ui/libs/config/props/loadingIcon.js */ import config from '../../libs/config/config.uts' +// let color = config['color'] as UTSJSONObject export default { // loading-icon加载中图标组件 loadingIcon: { show: true, - color: config.getString('color.u-tips-color'), - textColor: config.getString('color.u-tips-color'), + color: config.getString('color.up-tips-color'), + textColor: config.getString('color.up-tips-color'), vertical: false, mode: 'spinner', size: '24', diff --git a/src/uni_modules/uview-plus/components/up-loading-icon/props.uts b/src/uni_modules/uview-plus/components/up-loading-icon/props.uts index bd75e8793..518dda207 100644 --- a/src/uni_modules/uview-plus/components/up-loading-icon/props.uts +++ b/src/uni_modules/uview-plus/components/up-loading-icon/props.uts @@ -1,62 +1,64 @@ -import { defineMixin } from '../../libs/vue.uts' -import defProps from '../../libs/config/props.uts' +import { defineMixin } from '../../libs/vue.uts' +// import defProps from '../../libs/config/props.uts' +import defProps from './loadingIcon.uts' +let crtProp = defProps['loadingIcon'] as UTSJSONObject export const propsLoadicon = defineMixin({ props: { // 是否显示组件 show: { type: Boolean, - default: defProps.getBoolean('loadingIcon.show') + default: crtProp['show'] }, // 颜色 color: { type: String, - default: defProps.getString('loadingIcon.color') + default: crtProp['color'] }, // 提示文字颜色 textColor: { type: String, - default: defProps.getString('loadingIcon.textColor') + default: crtProp['textColor'] }, // 文字和图标是否垂直排列 vertical: { type: Boolean, - default: defProps.getBoolean('loadingIcon.vertical') + default: crtProp['vertical'] }, // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形 mode: { type: String, - default: defProps.getString('loadingIcon.mode') + default: crtProp['mode'] }, // 图标大小,单位默认px size: { type: [String], - default: defProps.getString('loadingIcon.size') + default: crtProp['size'] }, // 文字大小 textSize: { type: [String], - default: defProps.getString('loadingIcon.textSize') + default: crtProp['textSize'] }, // 文字内容 text: { type: [String], - default: defProps.getString('loadingIcon.text') + default: crtProp['text'] }, // 动画模式 timingFunction: { type: String, - default: defProps.getString('loadingIcon.timingFunction') + default: crtProp['timingFunction'] }, // 动画执行周期时间 duration: { type: [Number], - default: defProps.getNumber('loadingIcon.duration') + default: crtProp['duration'] }, // mode=circle时的暗边颜色 inactiveColor: { type: String, - default: defProps.getString('loadingIcon.inactiveColor') + default: crtProp['inactiveColor'] } } }) diff --git a/src/uni_modules/uview-plus/components/up-loading-icon/up-loading-icon.uvue b/src/uni_modules/uview-plus/components/up-loading-icon/up-loading-icon.uvue index 95f749973..aa59e08ab 100644 --- a/src/uni_modules/uview-plus/components/up-loading-icon/up-loading-icon.uvue +++ b/src/uni_modules/uview-plus/components/up-loading-icon/up-loading-icon.uvue @@ -21,14 +21,14 @@ 'animation-timing-function': mode === 'semicircle' || mode === 'circle' ? timingFunction : '' }" > - + - + { - const startRGB = hexToRgb(startColor, false) as Array // 转换为rgb数组模式 - console.log(startRGB) - // const startR = startRGB[0] - // const startG = startRGB[1] - // const startB = startRGB[2] - - // const endRGB = hexToRgb(endColor, false) - // const endR = endRGB[0] - // const endG = endRGB[1] - // const endB = endRGB[2] - - // const sR = (endR - startR) / step // 总差值 - // const sG = (endG - startG) / step - // const sB = (endB - startB) / step - const colorArr: Array = [] - // for (let i = 0; i < step; i++) { - // // 计算每一步的hex值 - // let sr: string = JSON.stringify(Math.round((sR * i + startR))) - // let sg: string = JSON.stringify(Math.round((sG * i + startG))) - // let sb: string = JSON.stringify(Math.round((sB * i + startB))) - // let hex = rgbToHex(`rgb(${sr},${sg},${sb})`) - // // 确保第一个颜色值为startColor的值 - // if (i === 0) hex = rgbToHex(startColor) - // // 确保最后一个颜色值为endColor的值 - // if (i === step - 1) hex = rgbToHex(endColor) - // colorArr.push(hex) - // } - return colorArr + endColor = 'rgb(255, 255, 255)', step = 10): Array { + // console.log('startColor', startColor) + let startColorRgb = hexToRgb(startColor, false); + let startRGB: number[] = []; + if (startColorRgb instanceof Array) { + startRGB = startColorRgb as number[] // 转换为rgb数组模式 + const startR:number = startRGB[0] + const startG:number = startRGB[1] + const startB:number = startRGB[2] + + const endRGB:number[]= hexToRgb(endColor, false) as number[] + const endR:number = endRGB[0] + const endG:number = endRGB[1] + const endB:number = endRGB[2] + + const sR = (endR - startR) / step // 总差值 + const sG = (endG - startG) / step + const sB = (endB - startB) / step + + const colorArr: Array = [] + for (let i = 0; i < step; i++) { + // 计算每一步的hex值 + let sr: string = JSON.stringify(Math.round((sR * i + startR))) + let sg: string = JSON.stringify(Math.round((sG * i + startG))) + let sb: string = JSON.stringify(Math.round((sB * i + startB))) + let hex = rgbToHex(`rgb(${sr},${sg},${sb})`) + // 确保第一个颜色值为startColor的值 + if (i === 0) hex = rgbToHex(startColor) + // 确保最后一个颜色值为endColor的值 + if (i === step - 1) hex = rgbToHex(endColor) + colorArr.push(hex) + } + return colorArr + } + return [] } // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式) export function hexToRgb(sColor: string, str = true): any { const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ sColor = sColor.toLowerCase() - if (sColor != '' && sColor != null && reg.test(sColor)) { + if (sColor != '' && sColor != null && reg.test(sColor) + ) { + // 16进制转换为rgb数组 if (sColor.length === 4) { let sColorNew = '#' for (let i = 1; i < 4; i += 1) { @@ -49,11 +57,14 @@ export function hexToRgb(sColor: string, str = true): any { sColor = sColorNew } // 处理六位的颜色值 - const sColorChange: Array = [] - for (let i = 1; i < 7; i += 2) { + const sColorChange: number[] = [] + for (let i = 1; i < 7; i += 2) { + // console.log('###',sColor.slice(i, i + 2), '###') + // console.log(parseInt(`0x${sColor.slice(i, i + 2)}`)) sColorChange.push(parseInt(`0x${sColor.slice(i, i + 2)}`)) } - if (str == false) { + if (str == false) { + // console.log('strtrue', sColorChange) return sColorChange } let sc0 = JSON.stringify(sColorChange[0]) @@ -61,25 +72,28 @@ export function hexToRgb(sColor: string, str = true): any { let sc2 = JSON.stringify(sColorChange[2]) return `rgb(${sc0},${sc1},${sc2})` } - // if (/^(rgb|RGB)/.test(sColor)) { - // const arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',') - // return arr.map((val) => { - // return (val) - // }) - // } + // rgb字符串转换为rgb数组 + if (/^(rgb|RGB)/.test(sColor)) { + const arr: string[] = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',') + let arrNumber: number[] = [] + arr.forEach(val => { + arrNumber.push(parseInt(val)) + }) + return arrNumber + } return sColor } -// // 将rgb表示方式转换为hex表示方式 -export function rgbToHex(rgb): string { +// 将rgb表示方式转换为hex表示方式 +export function rgbToHex(rgb: string): string { const _this = rgb const reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/ if (/^(rgb|RGB)/.test(_this)) { - const aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',') + const aColor: string[] = _this.replace(/(?:\(|\)|rgb|RGB)*/g, '').split(',') let strHex = '#' for (let i = 0; i < aColor.length; i++) { - let hex = Number(aColor[i]).toString(16) - hex = String(hex).length == 1 ? `${0}${hex}` : hex // 保证每个rgb的值为2位 + let hex = parseInt(aColor[i]).toString(16) + hex = (hex).length == 1 ? `${0}${hex}` : hex // 保证每个rgb的值为2位 if (hex === '0') { hex += hex } @@ -89,20 +103,19 @@ export function rgbToHex(rgb): string { strHex = _this } return strHex - } if (reg.test(_this)) { - const aNum = _this.replace(/#/, '').split('') - if (aNum.length === 6) { - return _this - } if (aNum.length === 3) { - let numHex = '#' - for (let i = 0; i < aNum.length; i += 1) { - numHex += (aNum[i] + aNum[i]) - } - return numHex - } - } else { - return _this - } + } else if (reg.test(_this)) { + // const aNum = _this.replace(/#/, '').split('') + // if (aNum.length === 6) { + // return _this + // } if (aNum.length === 3) { + // let numHex = '#' + // for (let i = 0; i < aNum.length; i += 1) { + // numHex += (aNum[i] + aNum[i]) + // } + // return numHex + // } + } + return _this } // /** diff --git a/uni-app-x/App.uvue b/uni-app-x/App.uvue index 1bdeb3fb9..d9e6e4c96 100644 --- a/uni-app-x/App.uvue +++ b/uni-app-x/App.uvue @@ -36,7 +36,7 @@ } - diff --git a/uni-app-x/pages/componentsA/checkbox/checkbox.nvue b/uni-app-x/pages/componentsA/checkbox/checkbox.nvue index 3a06ef81d..29c1cfd71 100644 --- a/uni-app-x/pages/componentsA/checkbox/checkbox.nvue +++ b/uni-app-x/pages/componentsA/checkbox/checkbox.nvue @@ -5,20 +5,20 @@ 苹果、香蕉和橙子哪个最甜? - - - - + + @@ -27,21 +27,21 @@ 中国四大名著是? - - - - + + @@ -50,12 +50,12 @@ 下面什么东西不能吃? - - - - + + @@ -73,21 +73,21 @@ 北宋四大家是谁? - - - - + + @@ -96,21 +96,21 @@ 哪个颜色最好看? - - - - + + @@ -119,19 +119,19 @@ 什么东西不能飞? - - - - + + @@ -140,22 +140,22 @@ 什么东西不能吃? - - - - + + diff --git a/uni-app-x/pages/componentsA/divider/divider.nvue b/uni-app-x/pages/componentsA/divider/divider.nvue index 7a2311237..93999eb71 100644 --- a/uni-app-x/pages/componentsA/divider/divider.nvue +++ b/uni-app-x/pages/componentsA/divider/divider.nvue @@ -3,62 +3,62 @@ 基本案例 - + 是否虚线 - + > 是否细线 - + > 是否以点代替文字 - + > 文本内容靠左 - + > 文本内容靠右 - + > 自定义文本颜色 - + > diff --git a/uni-app-x/pages/componentsA/empty/empty.nvue b/uni-app-x/pages/componentsA/empty/empty.nvue index 9871033ad..496f54234 100644 --- a/uni-app-x/pages/componentsA/empty/empty.nvue +++ b/uni-app-x/pages/componentsA/empty/empty.nvue @@ -3,21 +3,21 @@ 演示效果 - - - - + +
- - +
diff --git a/uni-app-x/pages/componentsA/gap/gap.nvue b/uni-app-x/pages/componentsA/gap/gap.nvue index de78b6558..020d1b0a0 100644 --- a/uni-app-x/pages/componentsA/gap/gap.nvue +++ b/uni-app-x/pages/componentsA/gap/gap.nvue @@ -3,29 +3,29 @@ 基本案列 - + 自定义颜色 - + 自定义高度 - + 自定义上下边距 - + > diff --git a/uni-app-x/pages/componentsA/grid/grid.nvue b/uni-app-x/pages/componentsA/grid/grid.nvue index 7af295bf4..68e2ea9d3 100644 --- a/uni-app-x/pages/componentsA/grid/grid.nvue +++ b/uni-app-x/pages/componentsA/grid/grid.nvue @@ -3,65 +3,65 @@ 基本案例 - - - + > {{baseListItem.title}} - - + + 显示边框 - - + - + > {{listItem.title}} - - + + 绑定点击事件&自定义列数 - - - + > {{listItem.title}} - - + + @@ -72,57 +72,57 @@ class="swiper" > - - + - + > {{ '宫格' + (index + 1) }} - - + + - - + - + > {{ '宫格' + (index + 1) }} - - + + - - + - + > {{ "宫格" + (index + 1) }} - - + + - + @@ -172,7 +172,7 @@ } }, methods: { - click(name) { + click(name) { console.log(name) this.$refs.uToastRef.success(`点击了第${name}个`) } diff --git a/uni-app-x/pages/componentsA/icon/icon.uvue b/uni-app-x/pages/componentsA/icon/icon.uvue index fec655e57..711f2b1cd 100644 --- a/uni-app-x/pages/componentsA/icon/icon.uvue +++ b/uni-app-x/pages/componentsA/icon/icon.uvue @@ -1,6 +1,6 @@ - @@ -218,8 +218,8 @@ }, myAsyncChange(e) { this.asyncChange = false - uni.showLoading({ - title: '正在加载' + uni.showLoading({ + title: '正在加载' }) setTimeout(() => { uni.hideLoading() diff --git a/uni-app-x/pages/componentsB/parse/parse.nvue b/uni-app-x/pages/componentsB/parse/parse.nvue index c627607fb..04c6dd7fa 100644 --- a/uni-app-x/pages/componentsB/parse/parse.nvue +++ b/uni-app-x/pages/componentsB/parse/parse.nvue @@ -1,6 +1,6 @@ diff --git a/uni-app-x/pages/componentsB/progress/progress.nvue b/uni-app-x/pages/componentsB/progress/progress.nvue index b0c90dbcb..a1a7a0014 100644 --- a/uni-app-x/pages/componentsB/progress/progress.nvue +++ b/uni-app-x/pages/componentsB/progress/progress.nvue @@ -3,42 +3,42 @@ 基础功能 - - + + 不显示百分比 - - + 自定义高度 - - + 自定义颜色 - - + 自定义样式(不支持安卓环境的nvue) - {{percentage4}}% - + 手动加减 - - + 减少 diff --git a/uni-app-x/pages/componentsB/search/search.nvue b/uni-app-x/pages/componentsB/search/search.nvue index 6f2be9618..f4089ef1f 100644 --- a/uni-app-x/pages/componentsB/search/search.nvue +++ b/uni-app-x/pages/componentsB/search/search.nvue @@ -4,11 +4,11 @@ 基础功能 - + > @@ -16,10 +16,10 @@ 设置初始值 - + > {{value2}} @@ -28,20 +28,20 @@ 搜索框形状 - + > - + > @@ -49,7 +49,7 @@ 右侧控件 - + @@ -57,53 +57,53 @@ 禁用输入框 - - - - - - 点击左侧图标 - - - - - + > + + + + + 点击左侧图标 + + + + + 搜索框内容水平对齐 - + > - + > - + > @@ -111,61 +111,61 @@ 自定义 - + > - + > - + > - + > - - + - - + - + @@ -187,7 +187,7 @@ value11: '', value12: '', value13: '', - value14: '', + value14: '', value15: '' } }, @@ -199,9 +199,9 @@ methods: { change(e) { console.log(e); - }, - clickIcon() { - uni.$u.toast('点击了左侧图标') + }, + clickIcon() { + uni.$u.toast('点击了左侧图标') } } } diff --git a/uni-app-x/pages/componentsB/slider/slider.nvue b/uni-app-x/pages/componentsB/slider/slider.nvue index 65461d731..4abf9eb91 100644 --- a/uni-app-x/pages/componentsB/slider/slider.nvue +++ b/uni-app-x/pages/componentsB/slider/slider.nvue @@ -3,39 +3,39 @@ 基本案例 - + > 自定义范围(0—50) - + > 指定步长(每次步进5) - + > 自定义样式 - + > diff --git a/uni-app-x/pages/componentsB/switch/switch.nvue b/uni-app-x/pages/componentsB/switch/switch.nvue index df34c80af..16af31363 100644 --- a/uni-app-x/pages/componentsB/switch/switch.nvue +++ b/uni-app-x/pages/componentsB/switch/switch.nvue @@ -4,14 +4,14 @@ 基础功能 - + > {{value1}} - + {{value2}} @@ -20,16 +20,16 @@ 加载中 - + > - + > @@ -37,16 +37,16 @@ 禁用状态 - + > - + > @@ -54,16 +54,16 @@ 自定义尺寸 - + > - + > @@ -71,18 +71,18 @@ 自定义颜色 - + > - + > @@ -90,20 +90,20 @@ 自定义样式 - + > - + > @@ -111,11 +111,11 @@ 异步控制 - + > diff --git a/uni-app-x/pages/componentsB/tabbar/tabbar.nvue b/uni-app-x/pages/componentsB/tabbar/tabbar.nvue index afdf9084a..584736c80 100644 --- a/uni-app-x/pages/componentsB/tabbar/tabbar.nvue +++ b/uni-app-x/pages/componentsB/tabbar/tabbar.nvue @@ -2,98 +2,98 @@ 基础功能 - - - - - - + > + + + + + 显示徽标 - - - + - + - + - + > + 匹配标签的名称 - - - + - + - + - + > + 自定义图标/颜色 - - - diff --git a/uni-app-x/pages/componentsB/tag/tag.nvue b/uni-app-x/pages/componentsB/tag/tag.nvue index 9d81f27a0..85f70f410 100644 --- a/uni-app-x/pages/componentsB/tag/tag.nvue +++ b/uni-app-x/pages/componentsB/tag/tag.nvue @@ -4,13 +4,13 @@ 基础功能 - - + @@ -18,29 +18,29 @@ 自定义主题 - - + + - - + - - + - - + @@ -48,20 +48,20 @@ 圆形标签 - - + - - + @@ -69,35 +69,35 @@ 镂空标签 - - + - - + - - + - - + @@ -105,39 +105,39 @@ 镂空带背景色 - - + - - + - - + - - + @@ -145,28 +145,28 @@ 自定义尺寸 - - + - - + - - + @@ -174,27 +174,27 @@ 可关闭标签 - - + - - + - - + @@ -211,31 +211,31 @@ 带图片和图标 - - + - - + - - + @@ -247,14 +247,14 @@ v-for="(item, index) in radios" :key="index" > - - + @@ -266,14 +266,14 @@ v-for="(item, index) in checkboxs" :key="index" > - - + diff --git a/uni-app-x/pages/componentsB/toast/toast.nvue b/uni-app-x/pages/componentsB/toast/toast.nvue index 1d8be8a0c..fe1b46f66 100644 --- a/uni-app-x/pages/componentsB/toast/toast.nvue +++ b/uni-app-x/pages/componentsB/toast/toast.nvue @@ -1,12 +1,12 @@ @@ -54,7 +54,7 @@ type: 'warning', position: "top", title: '位置偏移上方', - message: "望帝春心托杜鹃", + message: "望帝春心托杜鹃", iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/top.png' }, { @@ -79,11 +79,11 @@ return 'https://cdn.uviewui.com/uview/example/' + path + '.png'; } }, - }, + }, methods: { showToast(params) { this.$refs.uToast.show({ - ...params, + ...params, complete() { params.url && uni.navigateTo({ url: params.url diff --git a/uni-app-x/pages/componentsB/upload/upload.nvue b/uni-app-x/pages/componentsB/upload/upload.nvue index 82f619d74..68280c2e5 100644 --- a/uni-app-x/pages/componentsB/upload/upload.nvue +++ b/uni-app-x/pages/componentsB/upload/upload.nvue @@ -4,14 +4,14 @@ 基础用法 - + > @@ -19,7 +19,7 @@ 上传视频 - + > @@ -35,7 +35,7 @@ 文件预览 - + > @@ -51,14 +51,14 @@ 隐藏上传按钮 - + > @@ -66,14 +66,14 @@ 限制上传数量 - + > @@ -81,7 +81,7 @@ 自定义上传样式 - - + diff --git a/uni-app-x/pages/componentsC/album/album.nvue b/uni-app-x/pages/componentsC/album/album.nvue index 3cc858b34..c55f148f2 100644 --- a/uni-app-x/pages/componentsC/album/album.nvue +++ b/uni-app-x/pages/componentsC/album/album.nvue @@ -12,20 +12,20 @@ > - - + - + + > @@ -42,17 +42,17 @@ > - - + - + > + @@ -69,28 +69,28 @@ > - + > - + > - + > @@ -107,22 +107,22 @@ > - - + - + + > @@ -139,22 +139,22 @@ > - - + - + + > diff --git a/uni-app-x/pages/componentsC/avatar/avatar.nvue b/uni-app-x/pages/componentsC/avatar/avatar.nvue index b16f69a73..003be00db 100644 --- a/uni-app-x/pages/componentsC/avatar/avatar.nvue +++ b/uni-app-x/pages/componentsC/avatar/avatar.nvue @@ -3,24 +3,24 @@ 基础演示 - + 头像形状 - + > - + > @@ -28,22 +28,22 @@ 头像尺寸 - + > - + > - + > @@ -51,16 +51,16 @@ 图标头像 - + > - + > @@ -68,40 +68,40 @@ 文字头像(自动背景色) - + > - + > - + > - + > 图片加载失败(显示默认头像) - + @@ -109,10 +109,10 @@ 小程序开放能力 - + > @@ -120,18 +120,18 @@ 头像组 - + > - + > diff --git a/uni-app-x/pages/componentsC/calendar/calendar.nvue b/uni-app-x/pages/componentsC/calendar/calendar.nvue index a6faf43b7..43beea157 100644 --- a/uni-app-x/pages/componentsC/calendar/calendar.nvue +++ b/uni-app-x/pages/componentsC/calendar/calendar.nvue @@ -1,14 +1,14 @@ diff --git a/uni-app-x/pages/componentsC/tooltip/tooltip.vue b/uni-app-x/pages/componentsC/tooltip/tooltip.vue index 9b2aa5170..43e7e863c 100644 --- a/uni-app-x/pages/componentsC/tooltip/tooltip.vue +++ b/uni-app-x/pages/componentsC/tooltip/tooltip.vue @@ -3,48 +3,48 @@ 基础使用 - + 下方显示 - + > 扩展按钮 - + > 自动调整位置 - + > 高亮选中文本背景色 - + > @@ -66,11 +66,11 @@ }, onLoad() { - }, - methods: { - click(index) { - console.log('index', index); - } + }, + methods: { + click(index) { + console.log('index', index); + } } } diff --git a/uni-app-x/pages/example/components.uvue b/uni-app-x/pages/example/components.uvue index 5608f4ccf..417437484 100644 --- a/uni-app-x/pages/example/components.uvue +++ b/uni-app-x/pages/example/components.uvue @@ -1,15 +1,15 @@ -