diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..ee27dec3 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +open_collective: lin-ui diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 00000000..c7100717 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,27 @@ +--- +name: "Bug Report 🐛" +about: 这里只能提交 Bug,提交其他无关信息会被关闭 +title: '' +labels: Bug +assignees: '' + +--- + + + +**设备型号:** + +**LinUI 版本:** + +**微信小程序基础库版本:** + +**问题描述及重现步骤:** + +**相关截图**: diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 176b9dcd..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**LinUI版本(必填):** - -**设备(必填):** - -**基础库版本(必填):** - -**UI问题,请附上截图** - -**重现步骤,必要时请提供代码片段链接** - diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..2ef55789 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +blank_issues_enabled: true + +contact_links: + - name: 使用问题 🗨️ + url: https://github.com/TaleLin/lin-ui/discussions + about: 关于使用组件过程中的疑问请发布到这里 + - name: 文档错误 📚 + url: https://github.com/TaleLin/lin-ui-doc/issues/new + about: 关于文档相关的错误请提交到这里 diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..e44a01a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,24 @@ +--- +name: "Feature Request 🚀" +about: 这里只能提交 Feature 请求,提交其他无关信息会被关闭 +title: '' +labels: Feature +assignees: '' + +--- + + + +**Feature 名称:** + +**简要描述:** + +**使用场景:** + +**其他组件库或类似功能的截图:** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 5de023da..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**描述你希望的支持的新功能?** - -**你期望的 API 是怎样的?** diff --git a/build/index.js b/build/index.js index b147e957..4352910a 100644 --- a/build/index.js +++ b/build/index.js @@ -16,7 +16,7 @@ const { const path = require('path'); const componentData = require('./until'); -const result = `{common/*,behaviors,utils,${componentData()}}`; +const result = `{common/*,core/*,behaviors,utils,${componentData()}}`; const isCustom = (result !== '{common/*,behaviors,utils,}'); const distPath = path.resolve(__dirname, '../dist'); diff --git a/commitlint.config.js b/commitlint.config.js index 3da94586..d1c6c8f0 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -72,7 +72,9 @@ module.exports = { 'CapsuleBar', 'Circle', 'ImageClipper', - 'TabBar' + 'TabBar', + 'DynamicBuild', + 'Calendar' ] ] } diff --git a/dist/action-sheet/index.js b/dist/action-sheet/index.js deleted file mode 100644 index 03b9d598..00000000 --- a/dist/action-sheet/index.js +++ /dev/null @@ -1 +0,0 @@ -import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";Component({behaviors:[zIndex,hover],externalClasses:["l-class-title","l-class-item","l-class-cancel","l-title-class","l-item-class","l-cancel-class"],properties:{locked:Boolean,showCancel:Boolean,show:Boolean,itemList:Array,cancelText:{type:String,value:"取消"},title:String,zIndex:{type:Number,value:777},openApi:{type:Boolean,value:!0}},data:{success:"",fail:"",isIphoneX:!1},attached(){this.data.openApi&&this.initActionSheet(),this.initUIAdapter()},pageLifetimes:{show(){this.data.openApi&&this.initActionSheet()}},methods:{initUIAdapter(){wx.getSystemInfo({success:e=>{this.setData({isIphoneX:"iPhone X"===e.model})}})},initActionSheet(){wx.lin=wx.lin||{},wx.lin.showActionSheet=(e={})=>{const{itemList:t=[],success:s=null,fail:i=null,title:a="",locked:l=!1,cancelText:n="取消",showCancel:c=!1}=e;return this.setData({itemList:t.slice(0,10),success:s,fail:i,title:a,locked:l,cancelText:n,showCancel:c,show:!0}),this}},handleClickItem(e){const{success:t}=this.data;t&&t({...e.currentTarget.dataset}),this.triggerEvent("linitemtap",{...e.currentTarget.dataset},{bubbles:!0,composed:!0}),this._hideActionSheet()},_showActionSheet(){this.setData({show:!0})},_hideActionSheet(){this.setData({show:!1})},handleClickCancel(){const{fail:e}=this.data;e&&e({errMsg:"showactionsheet:fail cancel"}),this.triggerEvent("lincancel",{errMsg:"showactionsheet:fail cancel"},{bubbles:!0,composed:!0}),this._hideActionSheet()},handleClickPopUp(){this.data.locked||this.handleClickCancel()}}}); \ No newline at end of file diff --git a/dist/action-sheet/index.json b/dist/action-sheet/index.json deleted file mode 100644 index f301e159..00000000 --- a/dist/action-sheet/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index","l-popup":"../popup/index","l-button":"../button/index"} } \ No newline at end of file diff --git a/dist/action-sheet/index.wxml b/dist/action-sheet/index.wxml deleted file mode 100644 index b6cd7996..00000000 --- a/dist/action-sheet/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - - - {{ title }} - - - - - - - {{ item.name }} - - - - - - {{ cancelText }} - - - - diff --git a/dist/action-sheet/index.wxss b/dist/action-sheet/index.wxss deleted file mode 100644 index be530956..00000000 --- a/dist/action-sheet/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-action-sheet{background:#f7f7f7}.l-item-button{height:88rpx;line-height:88rpx;text-align:center;background:#fff;border-bottom:2rpx solid #f3f3f3;font-size:28rpx;color:#45526b;display:flex;align-items:center;justify-content:center;width:100%;overflow:hidden}.l-cancel{margin-top:12rpx}.l-cancel-x .l-item-button{padding-bottom:44rpx}.l-image-button>.l-button-text{margin-left:20rpx}.list-hover{opacity:.8} \ No newline at end of file diff --git a/dist/album/index.js b/dist/album/index.js deleted file mode 100644 index f5f5b05b..00000000 --- a/dist/album/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({externalClasses:["l-class","l-single-image-class","l-multi-image-class"],properties:{urls:{type:Array},preview:{type:Boolean,value:!0},gapRow:{type:Number,value:10},gapColumn:{type:Number,value:10},singleSize:{type:Number,value:360},multipleSize:{type:Number,value:158},singleMode:{type:String,value:"aspectFit"},multipleMode:{type:String,value:"aspectFill"},key:{type:String,value:"url"},maxNumber:{type:Number,value:9},customRowNumber:{type:Boolean,value:!1},everyRowNumber:{type:Number,value:3},previewFullImage:{type:Boolean,value:!0}},data:{newType:!0,shortSideValue:0,row:0,colum:0,showUrls:[],isLong:!1},lifetimes:{attached(){let e=[];if(this.data.urls.length>this.data.maxNumber?(e=this.data.urls.slice(0,this.data.maxNumber),this.setData({isLong:!0}),console.warn("图片数量超过maxNumber指定数量")):e=this.data.urls,this.setData({showUrls:e}),!this.data.customRowNumber){let e=this.data.showUrls.length;e>1&&e<5?this.setData({everyRowNumber:2}):this.setData({everyRowNumber:3})}this.preview()}},observers:{urls:function(){this.preview()}},methods:{judgeType(){const e=this.data.urls;return 0===e.length||"object"==typeof e[0]},horizontalOrVertical:function(e){wx.getImageInfo({src:e,success:e=>{const t=e.width>=e.height?e.width:e.height,a=e.width>=e.height?e.height:e.width;this.setData({horizontalScreen:e.width>=e.height,shortSideValue:a*this.data.singleSize/t})}})},preview:function(){const e=this.judgeType();this.setData({newType:e});const t=this.data.urls,a=this.data.key;1===t.length&&this.horizontalOrVertical(e?t[0][a]:t[0])},onPreviewTap(e){const t=e.currentTarget.id;let a;a=this.data.previewFullImage?this.data.urls:this.data.showUrls;let s="",i=[];const l=this.data.newType,r=this.data.key;if(l){s=a[t][r];for(let e=0;e - - - - - - - +{{urls.length-maxNumber}} - - - - diff --git a/dist/album/index.wxs b/dist/album/index.wxs deleted file mode 100644 index b41eda00..00000000 --- a/dist/album/index.wxs +++ /dev/null @@ -1,79 +0,0 @@ -var containerStyle = function (urls, multipleSize, gapRow, gapColumn) { - if (urls.length === 2 || urls.length === 4) { - return 'width:' + (2 * multipleSize + gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);' - } else { - return 'width:' + (3 * multipleSize + 2 * gapRow) + 'rpx; grid-row-gap:' + gapColumn + 'rpx; grid-column-gap:' + gapRow + 'rpx;grid-template-columns:repeat(auto-fit, ' + multipleSize + 'rpx);' - } - -} - -var blockClass = function (urls, horizontalScreen) { - if (urls.length === 1) { - if (horizontalScreen) { - return 'l-single-image-class' - } else { - return 'vertical l-single-image-class' - } - } else { - return 'l-multi-image-class' - } -} - -var blockStyle = function (urls, horizontalScreen, shortSideValue, singleSize, multipleSize) { - if (urls.length === 1) { - if (horizontalScreen) { - return 'height:' + shortSideValue + 'rpx;width:' + singleSize + 'rpx;' - } else { - return 'width:' + shortSideValue + 'rpx;height:' + singleSize + 'rpx;' - } - } else { - return 'height:' + multipleSize + 'rpx;width:' + multipleSize + 'rpx;' - } -} - -var gridStyle = function (gapRow, gapColumn, multipleSize, everyRowNumber) { - return 'display:inline-grid;grid-template-columns: repeat(' + everyRowNumber + ',' + multipleSize + 'rpx);grid-row-gap:' + gapRow + 'rpx;grid-column-gap:' + gapColumn + 'rpx;' -} - -var dimBack = function (isLong, index, maxNumber, previewFullImage) { - if (previewFullImage) { - if (isLong) { - if (index == maxNumber - 1) { - return 'dimback' - } - } - } - return '' -} - -var dim = function (isLong, index, maxNumber, previewFullImage) { - if (previewFullImage) { - if (isLong) { - if (index == maxNumber - 1) { - return 'dim' - } - } - } - return '' -} - -var image = function (isLong, index, maxNumber, previewFullImage) { - if (previewFullImage) { - if (isLong) { - if (index == maxNumber - 1) { - return true - } - } - } - return false -} - -module.exports = { - containerStyle: containerStyle, - blockClass: blockClass, - blockStyle: blockStyle, - gridStyle: gridStyle, - dimBack: dimBack, - dim: dim, - image: image, -} diff --git a/dist/album/index.wxss b/dist/album/index.wxss deleted file mode 100644 index 73f94e0d..00000000 --- a/dist/album/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.container{display:grid}.vertical{height:360rpx}.parent{display:inline-grid;grid-template-columns:repeat(auto-fill)}.child{box-sizing:border-box;background-color:#fff;flex:0 0 44%;height:100px;border:1px solid red;margin-top:4%;margin-left:2%;margin-right:2%}.dimback{background:#000}.dim{opacity:.6}.imageContainer{position:relative}.imageContainer:last-child>.text{color:#fff;font-weight:700;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:larger} \ No newline at end of file diff --git a/dist/arc-popup/index.js b/dist/arc-popup/index.js deleted file mode 100644 index 86ad0520..00000000 --- a/dist/arc-popup/index.js +++ /dev/null @@ -1 +0,0 @@ -import validator from"../behaviors/validator";import zIndex from"../behaviors/zIndex";const detail=!0,option={bubbles:!0,composed:!0};Component({behaviors:[zIndex,validator],externalClasses:["l-class","l-panel-class","l-bg-class","l-header-class"],options:{multipleSlots:!0},properties:{show:{type:Boolean,value:!1},maxHeight:{type:Number,value:600},minHeight:{type:Number,value:200},arcRadius:{type:Number,value:18},transition:{type:Boolean,value:!0},locked:{type:Boolean,value:!1},opacity:{type:Number,value:.4},direction:{type:String,options:["top","bottom"],value:"bottom"},headerFixed:{type:Boolean,value:!0}},data:{_arcRadiusTop:12,_ardRadiusBottom:18,arcStyle:""},observers:{show:function(t){t?(this.triggerEvent("linshow",!0,option),this.getArcPopupStyle()):this.triggerEvent("linclose",!0,option)},arcRadius:function(t){"top"===this.properties.direction?this.data._arcRadiusTop=t:this.data._ardRadiusBottom=t,this.getArcPopupStyle()}},pageLifetimes:{show(){this._init()}},methods:{_init(){wx.lin=wx.lin||{},wx.lin.showArcPopup=t=>{const{zIndex:o=99,tranistion:e=!0,direction:i="bottom",locked:a=!1}={...t};this.setData({zIndex:o,tranistion:e,direction:i,locked:a,show:!0})},wx.lin.hideArcPopup=()=>{this.setData({show:!1})}},getArcPopupStyle(){const t=this.properties.direction,o=this.data._arcRadiusTop,e=this.data._ardRadiusBottom,i=`\n border-bottom-left-radius:${"top"===t?o:0}rpx;\n border-bottom-right-radius:${"top"===t?o:0}rpx;\n border-top-left-radius:${"bottom"===t?e:0}rpx;\n border-top-right-radius:${"bottom"===t?e:0}rpx;\n max-height:${this.properties.maxHeight}rpx;\n min-height:${this.properties.minHeight}rpx;\n `;this.setData({arcStyle:i})},onArcPopupTap(){this.data.locked||this.properties.show&&this.setData({show:!1})}},ready(){this.getArcPopupStyle()}}); \ No newline at end of file diff --git a/dist/arc-popup/index.json b/dist/arc-popup/index.json deleted file mode 100644 index 11a6eb11..00000000 --- a/dist/arc-popup/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-popup":"../popup/index"}} \ No newline at end of file diff --git a/dist/arc-popup/index.wxml b/dist/arc-popup/index.wxml deleted file mode 100644 index 6fe07631..00000000 --- a/dist/arc-popup/index.wxml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/dist/arc-popup/index.wxss b/dist/arc-popup/index.wxss deleted file mode 100644 index e30086a0..00000000 --- a/dist/arc-popup/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.container-arc-popup{width:100%}.arc-popup{overflow:hidden;width:100%;background:#fff}.content-arc-popup{padding:30rpx;box-sizing:border-box}.header-popup{width:100%;z-index:999}.header-popup.fixed{position:sticky;top:0;background-color:#fff} \ No newline at end of file diff --git a/dist/avatar/index.js b/dist/avatar/index.js deleted file mode 100644 index afe8b943..00000000 --- a/dist/avatar/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({externalClasses:["l-class","l-class-text","l-text-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},text:String,src:String,openData:{type:Array,observer:"_initOpenData"},shape:{type:String,value:"circle"},mode:{type:String,value:"scaleToFill"},size:{type:Number,value:120},placement:{type:String,value:"right"}},data:{_isHaveUserNickName:!1,_isHaveUserAvatarUrl:!1,_iconSize:"",_iconColor:"#ffffff"},methods:{_initOpenData:function(e){this._isHaveUserAvatarUrl(e),this._isHaveUserNickName(e)},_isHaveUserAvatarUrl:function(e){this.setData({_isHaveUserAvatarUrl:-1!==e.indexOf("userAvatarUrl")})},_isHaveUserNickName:function(e){this.setData({_isHaveUserNickName:-1!==e.indexOf("userNickName")})},tapAvatar:function(e){this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})}}}); \ No newline at end of file diff --git a/dist/avatar/index.json b/dist/avatar/index.json deleted file mode 100644 index a1fa4d66..00000000 --- a/dist/avatar/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index"} } \ No newline at end of file diff --git a/dist/avatar/index.wxml b/dist/avatar/index.wxml deleted file mode 100644 index e6bd29d4..00000000 --- a/dist/avatar/index.wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - {{text}} - - diff --git a/dist/avatar/index.wxss b/dist/avatar/index.wxss deleted file mode 100644 index 3458284b..00000000 --- a/dist/avatar/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-avatar{display:inline-flex;justify-content:center;align-items:center}.l-avatar-image{flex:1;display:inline-flex;justify-content:center;align-items:center;background:#ccc;overflow:hidden}.l-avatar-text{display:inline-block;height:max-content;width:max-content;font-size:28rpx;color:#45526b;line-height:40px}.open-data{width:100%;height:100%}.l-avatar-text .l-avatar-text-text,.l-avatar-text .open-data{font-size:inherit;color:inherit;line-height:inherit}.l-square{border-radius:8rpx}.l-circle{border-radius:50%}.l-placement-left,.l-placement-right{align-items:center;justify-content:center}.l-placement-left{margin-right:24rpx;flex-direction:row-reverse}.l-placement-left .l-avatar-text{margin-right:24rpx}.l-placement-right{flex-direction:row}.l-placement-right .l-avatar-text{margin-left:24rpx}.l-placement-top{flex-direction:column-reverse}.l-placement-top .l-avatar-text{margin-bottom:12rpx}.l-placement-bottom{flex-direction:column}.l-placement-bottom .l-avatar-text{margin-top:12rpx} \ No newline at end of file diff --git a/dist/badge/index.js b/dist/badge/index.js deleted file mode 100644 index 37964a96..00000000 --- a/dist/badge/index.js +++ /dev/null @@ -1 +0,0 @@ -import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-class-self","l-self-class"],behaviors:[validator],properties:{dot:{type:Boolean,value:!1},shape:{type:String,value:"horn",options:["horn","circle"]},value:{type:String,value:"0"},mode:{type:String,value:"number",options:["number","text"]},maxCount:{type:Number,value:99},numberType:{type:String,value:"overflow",options:["overflow","limit","ellipsis"]},show:{type:Boolean,value:!0}},data:{finalCount:0},observers:{value:function(){this.finalCount()}},methods:{finalCount(){isNaN(Number(this.data.value))||"text"===this.data.mode?this.setData({finalCount:this.data.value}):this.switchType()},switchType(){switch(this.data.numberType){case"overflow":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?this.data.maxCount+"+":this.data.value});break;case"ellipsis":this.setData({finalCount:Number(this.data.value)>Number(this.data.maxCount)?"...":this.data.value});break;case"limit":this.setData({finalCount:Number(this.data.value)>999?Number(this.data.value)>=9999?Math.floor(this.data.value/1e4*100)/100+"w":Math.floor(this.data.value/1e3*100)/100+"k":this.data.value});break;default:this.setData({finalCount:Number(this.data.value)})}},handleTap(){this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})}}}); \ No newline at end of file diff --git a/dist/badge/index.json b/dist/badge/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/badge/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/badge/index.wxml b/dist/badge/index.wxml deleted file mode 100644 index 1e687872..00000000 --- a/dist/badge/index.wxml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - {{finalCount}} - - diff --git a/dist/badge/index.wxss b/dist/badge/index.wxss deleted file mode 100644 index 5d1021d6..00000000 --- a/dist/badge/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-badge{position:relative;display:inline-block;line-height:1;vertical-align:middle}.l-badge-content{max-width:650rpx;left:70%;background-color:#ff474b;color:#fff;position:absolute;font-size:20rpx;display:inline-block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-align:center;box-sizing:border-box;z-index:10;letter-spacing:.5rpx}.l-badge-content-horn{height:28rpx;min-width:54rpx;padding:0 8rpx;border-radius:14rpx 14rpx 14rpx 0rpx;line-height:28rpx;top:-10rpx}.l-badge-content-circle{height:32rpx;min-width:32rpx;padding:0 10rpx;border-radius:16rpx;line-height:32rpx;top:-10rpx}.l-badge-dot{height:16rpx;width:16rpx;transform:translateX(50%);border-radius:50%;background-color:#ff474b;position:absolute;top:-4rpx;right:0rpx} \ No newline at end of file diff --git a/dist/button/index.js b/dist/button/index.js deleted file mode 100644 index ec788348..00000000 --- a/dist/button/index.js +++ /dev/null @@ -1 +0,0 @@ -import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-label-class","l-hover-class","l-img-class","l-icon-class"],behaviors:[validator],properties:{name:{type:String,value:"lin"},type:{type:String,value:"default",options:["warning","success","error","default"]},plain:Boolean,size:{type:String,value:"medium",options:["medium","large","mini","long"]},shape:{type:String,value:"circle",options:["square","circle","semicircle"]},disabled:{type:Boolean,value:!1},special:{type:Boolean,value:!1},loading:{type:Boolean,value:!1},width:Number,height:Number,icon:String,image:String,bgColor:String,iconColor:String,iconSize:String,openType:String,appParameter:String,lang:String,hoverStopPropagation:Boolean,hoverStartTime:{type:Number,value:20},hoverStayTime:{type:Number,value:70},sessionFrom:{type:String,value:""},sendMessageTitle:String,sendMessagePath:String,sendMessageImg:String,showMessageCard:Boolean,formType:String,disabledHover:{type:Boolean,value:!1}},methods:{handleTap(){if(this.data.disabled||this.data.loading)return!1;this.triggerEvent("lintap",{},{bubbles:!0,composed:!0})},openTypeEvent(e){this.triggerEvent(e.type,e.detail,{})}}}); \ No newline at end of file diff --git a/dist/button/index.json b/dist/button/index.json deleted file mode 100644 index e11651a3..00000000 --- a/dist/button/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index"}} \ No newline at end of file diff --git a/dist/button/index.wxml b/dist/button/index.wxml deleted file mode 100644 index 27c9b93c..00000000 --- a/dist/button/index.wxml +++ /dev/null @@ -1,16 +0,0 @@ - - diff --git a/dist/button/index.wxss b/dist/button/index.wxss deleted file mode 100644 index 21cfe7df..00000000 --- a/dist/button/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.btn-hover::before{opacity:.15;position:absolute;top:50%;left:50%;width:100%;height:100%;border:inherit;border-radius:inherit;transform:translate(-50%,-50%);content:' ';background-color:#333;border-color:#333}.special-container{display:flex}.l-btn{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;font-size:28rpx;position:relative;color:#fff;padding:0 12rpx;box-sizing:border-box}.l-btn-img-mini{width:30rpx;height:30rpx}.l-btn-img-medium{width:36rpx;height:36rpx}.l-btn-img-large{height:44rpx;width:44rpx}.l-btn-long{border-radius:0;height:88rpx;width:100%}.l-btn-medium{height:72rpx;min-width:180rpx}.l-btn-large{height:88rpx;min-width:710rpx}.l-btn-mini{height:60rpx;min-width:140rpx;font-size:24rpx}.l-btn-default{background-color:#3963bc}.l-btn-success{background-color:#34bfa3}.l-btn-warning{background-color:#ffe57f;color:#333}.l-btn-error{background-color:#f4516c}.l-btn-square{border-radius:0}.l-btn-semicircle{border-radius:40rpx}.l-btn-large.l-btn-semicircle{border-radius:48rpx}.l-btn-mini.l-btn-semicircle{border-radius:30rpx}.l-btn-circle{border-radius:8rpx}.l-btn-large.l-btn-circle{border-radius:9.6rpx}.l-btn-mini.l-btn-circle{border-radius:6rpx}.l-btn-plain{background-color:#fff;color:#3963bc;border:2rpx solid #3963bc}.l-btn-success.l-btn-plain{background-color:#fff;color:#34bfa3;border:2rpx solid #34bfa3}.l-btn-error.l-btn-plain{background-color:#fff;color:#f4516c;border:2rpx solid #f4516c}.l-btn-warning.l-btn-plain{background-color:#fff;color:#ffe57f;border:2rpx solid #ffe57f}.l-btn-loading{opacity:.6;display:inline-block;vertical-align:middle;width:24rpx;height:24rpx;background:0 0;border-radius:50%;border:4rpx solid #fff;border-color:#fff #fff #fff transparent;animation:btn-spin .6s linear;animation-iteration-count:infinite}.l-btn-loading-default{border:4rpx solid #3963bc;border-color:#3963bc #3963bc #3963bc transparent}.l-btn-loading-success{border:4rpx solid #34bfa3;border-color:#34bfa3 #34bfa3 #34bfa3 transparent}.l-btn-loading-error{border:4rpx solid #f4516c;border-color:#f4516c #f4516c #f4516c transparent}.l-btn-loading-warning{border:4rpx solid #ffe57f;border-color:#ffe57f #ffe57f #ffe57f transparent}.l-btn-disabled{opacity:.8}.icon{display:flex!important}.margin-mini{margin-right:10rpx}.margin-medium{margin-right:18rpx}.margin-large{margin-right:24rpx}.margin-long{margin-right:24rpx}@keyframes btn-spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}} \ No newline at end of file diff --git a/dist/capsule-bar/icons/capsule-left-black.png b/dist/capsule-bar/icons/capsule-left-black.png deleted file mode 100644 index fa4ad584..00000000 Binary files a/dist/capsule-bar/icons/capsule-left-black.png and /dev/null differ diff --git a/dist/capsule-bar/icons/capsule-left-white.png b/dist/capsule-bar/icons/capsule-left-white.png deleted file mode 100644 index ec455b3b..00000000 Binary files a/dist/capsule-bar/icons/capsule-left-white.png and /dev/null differ diff --git a/dist/capsule-bar/icons/capsule-right-black.png b/dist/capsule-bar/icons/capsule-right-black.png deleted file mode 100644 index 8da48620..00000000 Binary files a/dist/capsule-bar/icons/capsule-right-black.png and /dev/null differ diff --git a/dist/capsule-bar/icons/capsule-right-white.png b/dist/capsule-bar/icons/capsule-right-white.png deleted file mode 100644 index fc6496b1..00000000 Binary files a/dist/capsule-bar/icons/capsule-right-white.png and /dev/null differ diff --git a/dist/capsule-bar/index.js b/dist/capsule-bar/index.js deleted file mode 100644 index d5a5c225..00000000 --- a/dist/capsule-bar/index.js +++ /dev/null @@ -1 +0,0 @@ -import deviceUtil from"../utils/device-util";import validator from"../behaviors/validator";import eventUtil from"../core/utils/event-util";Component({options:{multipleSlots:!0},behaviors:[validator],externalClasses:["l-title-class"],properties:{bgColor:{type:String,value:"white"},statusBarColor:{type:String,value:"transparent"},titleBarColor:{type:String,value:"transparent"},titleColor:{type:String,value:"black"},capsuleColor:{type:String,value:"black",options:["white","black"]},disableBack:{type:Boolean,value:!1},disableHome:{type:Boolean,value:!1},hiddenCapsule:{type:Boolean,value:!1},homePage:{type:String,value:""},title:{type:String,value:""},hasPadding:{type:Boolean,value:!0},hiddenTitle:{type:Boolean,value:!1}},data:{titleBarHeight:deviceUtil.getTitleBarHeight(),statusBarHeight:deviceUtil.getStatusBarHeight(),capsuleButtonInfo:null},lifetimes:{ready:function(){this.setData({capsuleButtonInfo:this.getCapsuleButtonInfo()})}},methods:{getCapsuleButtonInfo(){const t=wx.getSystemInfoSync().screenWidth,e=wx.getMenuButtonBoundingClientRect();return e.left=t-e.right,e.right=e.left+e.width,e},onTapLeftButton(){eventUtil.emit(this,"linlefttap"),this.data.disableBack||wx.navigateBack()},onLongPressLeftButton(){eventUtil.emit(this,"linleftlongpress")},async onTapRightButton(){eventUtil.emit(this,"linrighttap");const t=this.data.homePage;this.data.disableHome||wx.switchTab({url:t,fail(){wx.navigateTo({url:t})}})},onLongPressRightButton(){eventUtil.emit(this,"linrightlongpress")}}}); \ No newline at end of file diff --git a/dist/capsule-bar/index.json b/dist/capsule-bar/index.json deleted file mode 100644 index a8456c1f..00000000 --- a/dist/capsule-bar/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true} \ No newline at end of file diff --git a/dist/capsule-bar/index.wxml b/dist/capsule-bar/index.wxml deleted file mode 100644 index d7fcbb6a..00000000 --- a/dist/capsule-bar/index.wxml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - {{title}} - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/capsule-bar/index.wxss b/dist/capsule-bar/index.wxss deleted file mode 100644 index 9f7da5cb..00000000 --- a/dist/capsule-bar/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.container{position:relative}.container .capsule-bar{width:100%;position:fixed;display:flex;flex-direction:column;top:0;left:0;z-index:999}.container .capsule-bar .status-bar{width:100%}.container .capsule-bar .title-bar{width:100%;display:flex;align-items:center;justify-content:center;margin-top:-4rpx;padding-top:4rpx;box-sizing:border-box}.container .capsule-bar .title-bar .title{font-size:36rpx;font-weight:700}.container .capsule-bar .capsule-button{border-radius:99999px;display:flex;align-items:center;border:1px solid rgba(0,0,0,.1);position:fixed}.container .capsule-bar .capsule-button .icon-wrapper-hover-black{background-color:rgba(0,0,0,.36)}.container .capsule-bar .capsule-button .icon-wrapper-hover-white{background-color:rgba(255,255,255,.339)}.container .capsule-bar .capsule-button .icon-wrapper{display:flex;justify-content:center;align-items:center}.container .capsule-bar .capsule-button .icon-wrapper .icon-left{display:block;width:20rpx;height:34rpx}.container .capsule-bar .capsule-button .icon-wrapper .icon-right{display:block;width:38rpx;height:34rpx}.container .capsule-bar .capsule-button .line{height:18px;width:1px;line-height:1;background-color:rgba(255,255,255,.25)}.container .content-container{width:100%;position:absolute;left:0} \ No newline at end of file diff --git a/dist/card/index.js b/dist/card/index.js deleted file mode 100644 index f6b45b00..00000000 --- a/dist/card/index.js +++ /dev/null @@ -1 +0,0 @@ -import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-img-class","l-title-class"],options:{multipleSlots:!0},behaviors:[validator],properties:{image:String,title:String,describe:String,plaintext:Boolean,full:Boolean,position:{type:String,value:"left",options:["left","right"]},type:{type:String,value:"primary",options:["primary","avatar","cover"]},imageMode:{type:String,value:"scaleToFill"}},data:{},methods:{}}); \ No newline at end of file diff --git a/dist/card/index.json b/dist/card/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/card/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/card/index.wxml b/dist/card/index.wxml deleted file mode 100644 index 7a3be033..00000000 --- a/dist/card/index.wxml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {{title}} - - - - - - - - - {{title}} - {{describe}} - - - - - - - \ No newline at end of file diff --git a/dist/card/index.wxss b/dist/card/index.wxss deleted file mode 100644 index f4f948a6..00000000 --- a/dist/card/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.card-container{margin:0 auto;padding:30rpx;box-sizing:border-box;background:#fff;display:flex}.card-container-full{width:100%}.card-container-unfull{width:92%;box-shadow:0 4rpx 20rpx 0 rgba(212,217,223,.5);border-radius:4px}.card-container-primary-left{flex-direction:row}.card-container-primary-right{flex-direction:row-reverse}.card-container-avatar{flex-direction:column}.card-container-cover{flex-direction:column}.cover-img-full{width:100%;height:260rpx}.cover-img-unfull{width:100%;height:260rpx}.card-img-primary{height:240rpx;width:240rpx;overflow:hidden}.card-img-primary-left{margin-right:40rpx}.card-img-primary-right{margin-left:40rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-img-avatar{height:60rpx;width:60rpx;border-radius:50%;margin-right:30rpx}.card-content{position:relative;display:flex;flex-direction:column;flex:1}.card-title{overflow:hidden;text-overflow:ellipsis;color:#333}.card-title-primary{font-size:32rpx;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.card-title-avatar{font-size:28rpx}.card-title-cover{font-size:30rpx;margin-top:10rpx}.card-title-avatar{font-size:28rpx}.card-avatar-top{display:flex;flex-direction:row;height:100rpx;align-items:center;justify-content:space-between}.card-avatar-left{display:flex;flex-direction:row;align-items:center}.card-avatar{display:flex;flex-direction:column}.describe{color:#666;font-size:24rpx} \ No newline at end of file diff --git a/dist/checkbox-group/index.js b/dist/checkbox-group/index.js deleted file mode 100644 index 65474516..00000000 --- a/dist/checkbox-group/index.js +++ /dev/null @@ -1 +0,0 @@ -import eventBus from"../core/utils/event-bus";import rules from"../behaviors/rules";Component({behaviors:["wx://form-field",rules],externalClasses:["l-class","l-error-text","l-error-text-class"],relations:{"../checkbox/index":{type:"child",linked(e){this.init(e)},linkChanged(){},unlinked(){}}},properties:{placement:{type:String,value:"column"},maxSelected:{type:[Number,null],value:null},minSelected:{type:[Number,null],value:null}},data:{},attached(){let{minSelected:e,maxSelected:t}=this.properties;this.checkMax(e,t)},methods:{init(e){void 0===this._keys&&(this._keys={}),void 0===this._selected&&(this._selected={}),this.checkDefaultItem(e),this.checkedKeyRepeat(e)},checkedKeyRepeat(e){let{key:t}=e.properties;if(this._keys[t])throw new Error("keys有重复元素, checkbox的key属性不能重复:"+t);this._keys[t]=!0},checkDefaultItem(e){const{key:t,checked:l,cell:s}=e.properties;l&&(this._selected[t]={...s,checked:!0,value:t})},checkMax(e,t){if(null!==e&&e<0)throw new Error("最小选择个数必须大于等于0");if(null!==t&&t<0)throw new Error("最多选择个数必须大于0");if(null!==t&&null!==e&&e>=t)throw new Error("最多选择个数必须大于最小选择个数")},onEmitEventHandle(e){e.checked?this.addSelect(e):this.removeSelect(e.key),this.validatorData({[this.data.name]:Object.values(this._selected)}),this.triggerEvent("linchange",e,{bubbles:!0,composed:!0}),eventBus.emit("lin-form-change-"+this.id,this.id)},onEmitOverflowHandle(e){this.triggerEvent("linout",e,{bubbles:!0,composed:!0})},removeSelect(e){delete this._selected[e]},addSelect(e){let{key:t,...l}=e;this._selected[t]={...l,value:t}},getValues(){return Object.values(this._selected)},reset(){this._selected={};return this.getRelationNodes("../checkbox/index").forEach(e=>e.setData({checked:!1}))}}}); \ No newline at end of file diff --git a/dist/checkbox-group/index.json b/dist/checkbox-group/index.json deleted file mode 100644 index f225c1c5..00000000 --- a/dist/checkbox-group/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index","l-checkbox":"../checkbox/index"}} \ No newline at end of file diff --git a/dist/checkbox-group/index.wxml b/dist/checkbox-group/index.wxml deleted file mode 100644 index 6626ba39..00000000 --- a/dist/checkbox-group/index.wxml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/dist/checkbox-group/index.wxss b/dist/checkbox-group/index.wxss deleted file mode 100644 index 1cdd3b84..00000000 --- a/dist/checkbox-group/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.checkbox-group{flex-wrap:wrap}.checkbox-group-row{display:flex;flex-direction:row}.checkbox-group-column{display:flex;flex-direction:column} \ No newline at end of file diff --git a/dist/checkbox/index.js b/dist/checkbox/index.js deleted file mode 100644 index adbdd3bb..00000000 --- a/dist/checkbox/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({behaviors:["wx://form-field"],externalClasses:["l-class","l-disabled-class"],relations:{"../checkbox-group/index":{type:"parent"}},options:{multipleSlots:!0},properties:{placement:{type:String,value:"left"},custom:{type:Boolean,value:!1},key:{type:String,value:""},cell:{type:Object,value:{}},size:{type:String,value:"38rpx"},disabled:{type:Boolean,value:!1},selectColor:{type:String,value:"#3963BC"},disabledColor:{type:String,value:"#ccc"},color:{type:String,value:"#ccc"},checked:{type:Boolean,value:!1}},data:{parentPlacement:""},ready(){const e=this.getRelationNodes("../checkbox-group/index")[0];let{placement:t}=e.properties;this.setData({parentPlacement:t})},methods:{onCheckboxChangeTap(){if(this.properties.disabled||this.data.parentDisabled)return;const e=this.getRelationNodes("../checkbox-group/index")[0];if(this.properties.checked){if(this.isOverflow("minSelected"))return}else if(this.isOverflow("maxSelected"))return;const t={checked:!this.properties.checked,key:this.properties.key,cell:this.properties.cell};e&&e.onEmitEventHandle(t)},isOverflow(e){const t=this.getRelationNodes("../checkbox-group/index")[0],l=t.properties[e];if(!l)return!1;const i=Object.values(t._selected).length;let o="minSelected"===e?i<=l:i>=l;if(o){let i="minSelected"===e?"min_selected":"max_selected";t.onEmitOverflowHandle&&t.onEmitOverflowHandle({key:this.properties.key,limitNumber:l,type:"overflow_"+i})}return o}}}); \ No newline at end of file diff --git a/dist/checkbox/index.json b/dist/checkbox/index.json deleted file mode 100644 index 6dc91e37..00000000 --- a/dist/checkbox/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-button":"../button/index"}} \ No newline at end of file diff --git a/dist/checkbox/index.wxml b/dist/checkbox/index.wxml deleted file mode 100644 index bca2bea6..00000000 --- a/dist/checkbox/index.wxml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/dist/checkbox/index.wxss b/dist/checkbox/index.wxss deleted file mode 100644 index c36bbfe3..00000000 --- a/dist/checkbox/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.label{display:flex;flex:1;align-items:center;font-size:30rpx;color:#333;width:100%;box-sizing:border-box}.label-left{flex-direction:row}.label-right{flex-direction:row-reverse;justify-content:space-between}.label-disabled{color:#ccc}.label-placement-row{padding-right:30rpx}.checkbox{margin-right:20rpx}.iconfont{font-family:iconfont!important;display:inline-flex;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAMMAAsAAAAABxgAAAK9AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBeIFdATYCJAMMCwgABCAFhG0HQBstBlGUzMkA2c8E020e0uBCKA1ReoTOr2jhX60Fez8evvb7nbu7X40GSTTS8S6aRBOpkCB1plMyIWkJb/+nLTemUXn+tjy1proDbGd+u9OXhuW20ygDQoJwOPhjfw50kxP0dlsW4tKSEtLyKhWqIpT/3MKy5KTZgMvpr8TnWZbTWts2jgmYYEBjDHuKrEQCzjUF2R2BWvJ9Am0LeioHm9MVtBXOskC8RIED7VJMUaRiU6i37C3iHV4zvaZPKG/x5+OfLdoktcxZe/S89mH27bv8VD0phAT5ch5Ih8jYBApx3eq7Uktzm2rahqZu1oO6IqSlklVFLDMN9YP+8RJR55R2wSrNJ775IoLvWEgggzoKDoFYipp4U38JhsVnsZqMDSLDTR9O5v6lxM+emWKnJ0j1WkJfv81PpvtdvqfbrTPuXw1+/Yswbx81bvFu4GNdLq7/WnYQrkR7OT7DTrwSHIOw0QhHGI+BEQb/TCiV/n/7MQFAQ9mO3iwSi9Gz9MCEpIu0tWgZiFkilLN8tRFgA1SnfMgz8o0Kgo9Q+Gcx3f/tTgFfe45JtDoVFO7QvAt/8FflYE8xlY49F13my+xAtjTRk6ASOahCOaGxn+mGGVxKaJrlSBrmkTUtkoWziZqOLdQ1baNtw/Zwx4SoidLCuneCMPSBpO8T2dAXWTjfqJnzi7ph1NB2EdwzO5Yj6oaEHCUf3UeMPM6N59RuUn6m4DZ1pKiMuTckZZTE8WBULW4pJ1liQ3kXTFQNGuEMN+QxSlPGQjgmTwehajEdDk3biwYeZ9C1TxCHIj7keoQiHpYz4XDVrb3/jARupRzS09AQv0FEKRodjQ2MAHKry6GGR2FTuhOYUMpAhmAZtCEekro5hor2WTHiUQPhhExhasgGGVQ32N6Q/UCp1ILzXI4UOYrOQ0he4vKDxXk7twIAAAAA') format('woff2')}.icon-unselect:before{content:"\e727"}.icon-select:before{content:"\e725"} \ No newline at end of file diff --git a/dist/circle/index.js b/dist/circle/index.js deleted file mode 100644 index 6fa8b8ba..00000000 --- a/dist/circle/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({externalClasses:["l-value-class"],properties:{percent:{type:Number,value:0},outerDiameter:{type:Number,value:220},innerDiameter:{type:Number,value:170},activeColor:{type:String},backgroundColor:{type:String,value:"#EBEBEB"},innerColor:{type:String,value:"#FFFFFF"},active:{type:Boolean,value:!1},duration:{type:Number,value:30},showValue:{type:Boolean,value:!1},valueColor:{type:String},valueSize:{type:Number,value:25}},options:{multipleSlots:!0,pureDataPattern:/^_/},data:{displayPercent:0},observers:{percent:async function(e){if(e>100)this.setData({percent:100});else if(e<0)this.setData({percent:0});else if(this.data.active){let t=this.data.displayPercent;if(te)for(;t>e;)await this.sleep(this.data.duration),t-=1,this.setData({displayPercent:t})}else this.setData({displayPercent:e})},outerDiameter:function(e){enew Promise(t=>{setTimeout(t,e)})}}); \ No newline at end of file diff --git a/dist/circle/index.json b/dist/circle/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/circle/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/circle/index.wxml b/dist/circle/index.wxml deleted file mode 100644 index b554e6c4..00000000 --- a/dist/circle/index.wxml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - {{displayPercent}}% - - - - diff --git a/dist/circle/index.wxss b/dist/circle/index.wxss deleted file mode 100644 index 3a921ffa..00000000 --- a/dist/circle/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.sector{position:relative;border-radius:50%;overflow:hidden;display:flex;justify-content:center;align-items:center}.sx1,.sx2{position:absolute;top:0;left:0}.sx1{z-index:1}.sx2{z-index:2}.sx_t{border-radius:50%;z-index:3;display:flex;flex-direction:row;justify-content:center;align-items:center}.sector1{background:#3963bc}.sector2 .sx1,.sector2 .sx2{background:#3963bc;transform:rotate(180deg)} \ No newline at end of file diff --git a/dist/collapse-item/index.js b/dist/collapse-item/index.js deleted file mode 100644 index 6d2b3643..00000000 --- a/dist/collapse-item/index.js +++ /dev/null @@ -1 +0,0 @@ -import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class","l-title-class","l-body-class"],relations:{"../collapse/index":{type:"parent"}},options:{multipleSlots:!0,pureDataPattern:/^_/},properties:{itemId:{type:String,value:"default"},title:{type:String,value:"默认标题"},customTitle:{type:Boolean,value:!1},disable:{type:Boolean,value:!1},animationTime:{type:String,value:"0.3"}},data:{bodyHeight:"0",isExpandContent:!1,_idDefault:-1},methods:{async onTapTitle(){if(this.data.disable)return;let t=this.getRelationNodes("../collapse/index");await t[0].onTapCollapseItem(this)},async foldContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.data.isExpandContent?(this.setData({bodyHeight:t.height+"px"}),setTimeout(()=>{this.setData({isExpandContent:!1,bodyHeight:"0px"})},20)):this.setData({isExpandContent:!1,bodyHeight:"0px"})},async expandContent(){const t=await nodeUtil.getNodeRectFromComponent(this,".container-body-wrapper");this.setData({isExpandContent:!0,bodyHeight:t.height+"px"})},onTransitionend(){this.data.isExpandContent&&this.setData({bodyHeight:"auto"})}}}); \ No newline at end of file diff --git a/dist/collapse-item/index.json b/dist/collapse-item/index.json deleted file mode 100644 index 71dc0d49..00000000 --- a/dist/collapse-item/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-list":"../list/index","l-icon":"../icon/index"}} \ No newline at end of file diff --git a/dist/collapse-item/index.wxml b/dist/collapse-item/index.wxml deleted file mode 100644 index 56febb8b..00000000 --- a/dist/collapse-item/index.wxml +++ /dev/null @@ -1,12 +0,0 @@ - - - {{title}} - - - - - - - - - diff --git a/dist/collapse-item/index.wxss b/dist/collapse-item/index.wxss deleted file mode 100644 index 7052ff50..00000000 --- a/dist/collapse-item/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.container{display:flex;flex-direction:column;width:100%;box-sizing:border-box}.container-title{display:flex;justify-content:space-between;padding:10rpx;align-items:center;font-size:32rpx;color:#333}.container-title-l-icon{transition:.3s}.container-body{width:100%;color:#888;box-sizing:border-box;font-size:28rpx;transition:height .3s ease-in-out;overflow:hidden}.container-body-wrapper{position:relative;padding:10rpx} \ No newline at end of file diff --git a/dist/collapse/index.js b/dist/collapse/index.js deleted file mode 100644 index 282b2d08..00000000 --- a/dist/collapse/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({options:{pureDataPattern:/^_/},relations:{"../collapse-item/index":{type:"child",linked:function(){this._setAllItemId()},linkChanged:function(){this._setAllItemId()},unlinked:function(){this._setAllItemId()}}},lifetimes:{ready:function(){this.updateView()}},properties:{type:{type:String,value:"normal"},expandItemId:{type:Array,value:[]}},data:{_expandItems:[]},observers:{expandItemId:function(){this.updateView()}},methods:{async updateView(){let t;t="accordion"===this.data.type?this.data.expandItemId.slice(0,1):this.data.expandItemId;let e=this.getRelationNodes("../collapse-item/index");for(let a=0;a-1&&!d.isExpandContent?await this.setCollapseItemStatus(d,!0):(d.isExpandContent||"accordion"===this.data.type)&&await this.setCollapseItemStatus(d,!1)}},async onTapCollapseItem(t){"accordion"===this.data.type&&await this.foldAllExpandItem(t),this.setCollapseItemStatus(t,!t.data.isExpandContent),t.data.isExpandContent?this.triggerEvent("linfold",{id:t.data.itemId?t.data.itemId:t.data._idDefault}):this.triggerEvent("linexpand",{id:t.data.itemId?t.data.itemId:t.data._idDefault})},async setCollapseItemStatus(t,e){if(e)t.expandContent(),this.data._expandItems.push(t);else{await t.foldContent();for(let e=0;e{t.data._idDefault=e})}}}); \ No newline at end of file diff --git a/dist/collapse/index.json b/dist/collapse/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/collapse/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/collapse/index.wxml b/dist/collapse/index.wxml deleted file mode 100644 index 74480dcf..00000000 --- a/dist/collapse/index.wxml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/dist/combined-tabs/index.js b/dist/combined-tabs/index.js deleted file mode 100644 index 82c3e2e4..00000000 --- a/dist/combined-tabs/index.js +++ /dev/null @@ -1 +0,0 @@ -import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-class-header","l-class-active","l-class-inactive","l-class-line","l-class-tabimage","l-header-class","l-active-class","l-inactive-class","l-line-class","l-tabimage-class","l-content-class"],relations:{"../tabpanel/index":{type:"child"},linked(){this.initTabs()}},options:{multipleSlots:!0},properties:{activeKey:{type:String,value:"",observer:"changeCurrent"},placement:{type:String,value:"top"},aminmated:Boolean,scrollable:Boolean,swipeable:{type:Boolean,value:!0},hasLine:{type:Boolean,value:!0},activeColor:{type:String,value:"#333333"},inactiveColor:{type:String,value:"#bbbbbb"}},data:{tabList:[],currentIndex:0,transformX:0,transformY:0},ready(){this.initTabs()},methods:{initTabs(){this.initTabList(),this.initActiveIndex()},initActiveIndex(t=this.data.activeKey){let e=t,a=this.data.currentIndex;this.data.tabList.forEach((s,i)=>{e=t||0!==i?e:s.key,a=s.key===e?i:a}),this.setData({activeKey:e,currentIndex:a},()=>{this.data.scrollable&&this.queryMultipleNodes()})},initTabList(){let t=this.getRelationNodes("../tabpanel/index");if(t.length>0){const e=[];t.forEach(t=>{const a=e.findIndex(e=>e.tab===t.data.tab);let s={};-1===a&&(s={tab:t.data.tab,key:t.data.key,icon:t.data.icon,iconStyle:t.data.iconStyle,image:t.data.image,subTabs:[]},e.push(s));const i=-1===a?s:e[a];if(t.data.subTab){i.subTabs=i.subTabs||[];const e={tab:t.data.subTab,key:t.data.subKey};i.subTabs.push(e),i.activeSubKey=this.data.subActiveKey||i.subTabs[0].key,i.subCurrentIndex=0}}),this.setData({tabList:e})}},swiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const t=a,e=this.data.tabList[a].key,s=this.data.tabList[t].subCurrentIndex,i=this.data.tabList[t].activeSubKey;this._setChangeData({activeKey:e,currentIndex:t,subCurrentIndex:s,activeSubKey:i})}},subSwiperChange(t){const{source:e,current:a}=t.detail;if("touch"===e){const{currentIndex:t,activeKey:e}=this.data,s=a,i=this.data.tabList[t].subTabs[s].key,n=this.data.tabList[t];n.activeSubKey=i,n.subCurrentIndex=s,this.setData({[`tabList[${t}]`]:n}),this._setChangeData({activeKey:e,currentIndex:t,activeSubKey:i,subCurrentIndex:s})}},handleChange(t){const e="subTab"===t.currentTarget.dataset.headerType,{currentIndex:a,activeKey:s}=this.data,i=t.currentTarget.dataset.index,n=e?i:this.data.tabList[i].subCurrentIndex,r=e?this.data.tabList[a].subTabs[n].key:this.data.tabList[i].activeSubKey;if(e){const t=this.data.tabList[a];t.activeSubKey=r,t.subCurrentIndex=n,this.setData({[`tabList[${a}]`]:t}),this._setChangeData({activeKey:s,currentIndex:a,activeSubKey:r,subCurrentIndex:n})}else{const e=t.currentTarget.dataset.key;this._setChangeData({activeKey:e,currentIndex:i,subCurrentIndex:n,activeSubKey:r})}},_setChangeData({activeKey:t,currentIndex:e,activeSubKey:a="",subCurrentIndex:s=null}){this.setData({activeKey:t,currentIndex:e},()=>{this.data.scrollable&&this.queryMultipleNodes()}),this.triggerEvent("linchange",{activeKey:t,currentIndex:e,activeSubKey:a,subCurrentIndex:s})},async queryMultipleNodes(){const{placement:t,activeKey:e,tabList:a}=this.data,s=await nodeUtil.getNodeRectFromComponent(this,"#"+e);if(-1!==["top","bottom"].indexOf(t))this.setData({transformX:s.left-a.length/2*s.width,transformY:0});else{const t=await nodeUtil.getNodeRectFromComponent(this,".l-tabs-header"),e=s.top-t.top-t.height/2;this.setData({transformX:0,transformY:e})}}}}); \ No newline at end of file diff --git a/dist/combined-tabs/index.json b/dist/combined-tabs/index.json deleted file mode 100644 index 9951b5bc..00000000 --- a/dist/combined-tabs/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index"}} \ No newline at end of file diff --git a/dist/combined-tabs/index.wxml b/dist/combined-tabs/index.wxml deleted file mode 100644 index e98d022f..00000000 --- a/dist/combined-tabs/index.wxml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/combined-tabs/index.wxss b/dist/combined-tabs/index.wxss deleted file mode 100644 index b3e0cdaf..00000000 --- a/dist/combined-tabs/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-tabs{display:flex;border-radius:8rpx;box-sizing:border-box;overflow:hidden;flex-direction:column;background:#fff;height:100%}.l-tabs .l-tabs-header{display:flex;width:100%;flex-direction:row;background:#fff;align-items:center}.l-tabs .l-tabs-header .l-tabs-item{flex:1;font-size:28rpx;text-align:center;box-sizing:border-box;display:flex;justify-content:center;align-items:center}.l-tabs .l-tabs-header .l-icon-active,.l-tabs .l-tabs-header .l-tabs-active{color:#333;font-size:28rpx}.l-tabs .l-tabs-header .l-icon-inactive,.l-tabs .l-tabs-header .l-tabs-inactive{font-size:28rpx;color:#bbb}.l-tabs .l-tabs-header .l-tabsitems-row{flex-direction:row}.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row .l-icon-inactive{margin-right:10rpx}.l-tabs .l-tabs-header .l-tabsitems-row-reverse{flex-direction:row-reverse}.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-active,.l-tabs .l-tabs-header .l-tabsitems-row-reverse .l-icon-inactive{margin-left:10rpx}.l-placement-top .l-tabs-header{height:80rpx}.l-placement-top .l-tabs-header .l-tabs-item{min-height:100%}.l-sub-placement-left{flex-direction:row}.l-sub-placement-left .l-tabs-header{flex-direction:column;width:160rpx}.l-sub-placement-left .l-tabs-header>.l-tabs-item{width:100%;height:80rpx;background:#f6f8fa}.l-sub-placement-left .l-tabs-header>.l-tabs-active{background:#fff}.l-sub-placement-left .l-tabs-main .l-tabpanel-content{width:100%;-webkit-box-orient:vertical;-webkit-box-direction:normal;flex-direction:column;position:relative;will-change:transform;transition:transform .3s cubic-bezier(.645,.045,.355,1)}.l-placement-top .l-tabpanel-content{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.l-subpanel-content{width:100%;height:100%}.l-tabpanel{width:100%;height:100%;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-transition:opacity .45s;transition:opacity .45s;opacity:1;text-overflow:ellipsis}.l-tabpanel-inactive{opacity:0;height:0;padding:0!important;pointer-events:none}.l-subpanel{height:100%}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header{-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-scroll.l-tabs-horizontal .l-tabs-header .l-tabs-item{overflow:visible;min-width:160rpx}.l-tabs-scroll.l-tabs-horizontal .l-tabpanel-content{height:150px}.l-tabs-vertical .l-tabsscroll{width:160rpx}.l-tabs-vertical .l-tabs-header{height:100%;min-height:80rpx;-webkit-overflow-scrolling:touch;white-space:nowrap}.l-tabs-vertical .l-tabs-header .l-tabs-item{overflow:visible;min-height:80rpx}.l-tabs-item{position:relative}.l-tab-line{position:absolute;bottom:0;left:0;right:0;width:0;background:#000}.l-tabs-horizontal .l-tab-line{height:4rpx;margin:0 auto}.l-tabs-horizontal .l-tabs-active .l-tab-line{width:100%;transition-delay:.1s}.l-placement-top .l-tab-line{bottom:0}.l-placement-top .l-tabs-header-line{border-bottom:1px solid #f3f3f3}.l-tabs-vertical .l-tabs-active .l-tab-line{width:6rpx!important;height:40rpx!important;border-radius:0 6rpx 6rpx 0;top:0;left:0;margin:auto 0;transition-delay:.1s}.l-sub-placement-left .l-tab-line{left:0;right:auto}.l-sub-placement-left .l-tabs-header-line{border-right:1px solid #f3f3f3}.l-tab-image{width:100rpx;height:100rpx}.l-tab-image-placement-top{flex-direction:column}.l-tab-image-placement-left{flex-direction:row}.l-tabs-main{flex:1}.l-combined-tabs-main{display:flex} \ No newline at end of file diff --git a/dist/common/async-validator/rule/enum.js b/dist/common/async-validator/rule/enum.js deleted file mode 100644 index f4c0b31b..00000000 --- a/dist/common/async-validator/rule/enum.js +++ /dev/null @@ -1 +0,0 @@ -import*as util from"../util";const ENUM="enum";function enumerable(e,u,n,m,r){e.enum=Array.isArray(e.enum)?e.enum:[],-1===e.enum.indexOf(u)&&m.push(util.format(r.messages.enum,e.fullField,e.enum.join(", ")))}export default enumerable; \ No newline at end of file diff --git a/dist/common/async-validator/rule/index.js b/dist/common/async-validator/rule/index.js deleted file mode 100644 index 44d17a6f..00000000 --- a/dist/common/async-validator/rule/index.js +++ /dev/null @@ -1 +0,0 @@ -import required from"./required.js";import whitespace from"./whitespace.js";import type from"./type.js";import range from"./range.js";import enumRule from"./enum.js";import pattern from"./pattern.js";export default{required:required,whitespace:whitespace,type:type,range:range,enum:enumRule,pattern:pattern}; \ No newline at end of file diff --git a/dist/common/async-validator/rule/pattern.js b/dist/common/async-validator/rule/pattern.js deleted file mode 100644 index c66d7db1..00000000 --- a/dist/common/async-validator/rule/pattern.js +++ /dev/null @@ -1 +0,0 @@ -import*as util from"../util";function pattern(t,e,a,p,n){if(t.pattern)if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern));else if("string"==typeof t.pattern){new RegExp(t.pattern.replace(/^\/|\/$/g,"")).test(e)||p.push(util.format(n.messages.pattern.mismatch,t.fullField,e,t.pattern))}}export default pattern; \ No newline at end of file diff --git a/dist/common/async-validator/rule/range.js b/dist/common/async-validator/rule/range.js deleted file mode 100644 index 1615f534..00000000 --- a/dist/common/async-validator/rule/range.js +++ /dev/null @@ -1 +0,0 @@ -import*as util from"../util";function range(e,l,n,m,t){const u="number"==typeof e.len,r="number"==typeof e.min,a="number"==typeof e.max,i=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let s=l,f=null;const o="number"==typeof l,g="string"==typeof l,p=Array.isArray(l);if(o?f="number":g?f="string":p&&(f="array"),!f)return!1;p&&(s=l.length),g&&(s=l.replace(i,"_").length),u?s!==e.len&&m.push(util.format(t.messages[f].len,e.fullField,e.len)):r&&!a&&se.max?m.push(util.format(t.messages[f].max,e.fullField,e.max)):r&&a&&(se.max)&&m.push(util.format(t.messages[f].range,e.fullField,e.min,e.max))}export default range; \ No newline at end of file diff --git a/dist/common/async-validator/rule/required.js b/dist/common/async-validator/rule/required.js deleted file mode 100644 index 993d61f6..00000000 --- a/dist/common/async-validator/rule/required.js +++ /dev/null @@ -1 +0,0 @@ -import*as util from"../util";function required(e,r,i,u,t,l){!e.required||i.hasOwnProperty(e.field)&&!util.isEmptyValue(r,l||e.type)||u.push(util.format(t.messages.required,e.fullField))}export default required; \ No newline at end of file diff --git a/dist/common/async-validator/rule/type.js b/dist/common/async-validator/rule/type.js deleted file mode 100644 index 8520c410..00000000 --- a/dist/common/async-validator/rule/type.js +++ /dev/null @@ -1 +0,0 @@ -import*as util from"../util";import required from"./required";const pattern={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},types={integer:e=>types.number(e)&&parseInt(e,10)===e,float:e=>types.number(e)&&!types.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear,number:e=>!isNaN(e)&&""!==e,object:e=>"object"==typeof e&&!types.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&!!e.match(pattern.email)&&e.length<255,url:e=>"string"==typeof e&&!!e.match(pattern.url),hex:e=>"string"==typeof e&&!!e.match(pattern.hex)};function type(e,t,r,a,f){if(e.required&&void 0===t)return void required(e,t,r,a,f);const p=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(p)>-1?types[p](t)||a.push(util.format(f.messages.types[p],e.fullField,e.type)):p&&typeof t!==e.type&&a.push(util.format(f.messages.types[p],e.fullField,e.type))}export default type; \ No newline at end of file diff --git a/dist/common/async-validator/rule/whitespace.js b/dist/common/async-validator/rule/whitespace.js deleted file mode 100644 index b6c3e582..00000000 --- a/dist/common/async-validator/rule/whitespace.js +++ /dev/null @@ -1 +0,0 @@ -import*as util from"../util";function whitespace(t,e,s,i,a){(/^\s+$/.test(e)||""===e)&&i.push(util.format(a.messages.whitespace,t.fullField))}export default whitespace; \ No newline at end of file diff --git a/dist/common/async-validator/validator/array.js b/dist/common/async-validator/validator/array.js deleted file mode 100644 index e273a743..00000000 --- a/dist/common/async-validator/validator/array.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function array(r,e,a,u,i){const t=[];if(r.required||!r.required&&u.hasOwnProperty(r.field)){if(isEmptyValue(e,"array")&&!r.required)return a();rules.required(r,e,u,t,i,"array"),isEmptyValue(e,"array")||(rules.type(r,e,u,t,i),rules.range(r,e,u,t,i))}a(t)}export default array; \ No newline at end of file diff --git a/dist/common/async-validator/validator/boolean.js b/dist/common/async-validator/validator/boolean.js deleted file mode 100644 index adcacaf1..00000000 --- a/dist/common/async-validator/validator/boolean.js +++ /dev/null @@ -1 +0,0 @@ -import{isEmptyValue}from"../util";import rules from"../rule/index.js";function boolean(e,r,i,u,o){const t=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,t,o),void 0!==r&&rules.type(e,r,u,t,o)}i(t)}export default boolean; \ No newline at end of file diff --git a/dist/common/async-validator/validator/date.js b/dist/common/async-validator/validator/date.js deleted file mode 100644 index 9f5d9b8e..00000000 --- a/dist/common/async-validator/validator/date.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function date(e,r,t,i,u){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return t();if(rules.required(e,r,i,l,u),!isEmptyValue(r)){let t;t="number"==typeof r?new Date(r):r,rules.type(e,t,i,l,u),t&&rules.range(e,t.getTime(),i,l,u)}}t(l)}export default date; \ No newline at end of file diff --git a/dist/common/async-validator/validator/enum.js b/dist/common/async-validator/validator/enum.js deleted file mode 100644 index 56ff475b..00000000 --- a/dist/common/async-validator/validator/enum.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";const ENUM="enum";function enumerable(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),r&&rules.enum(e,r,i,l,t)}u(l)}export default enumerable; \ No newline at end of file diff --git a/dist/common/async-validator/validator/float.js b/dist/common/async-validator/validator/float.js deleted file mode 100644 index ef661afd..00000000 --- a/dist/common/async-validator/validator/float.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function floatFn(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default floatFn; \ No newline at end of file diff --git a/dist/common/async-validator/validator/index.js b/dist/common/async-validator/validator/index.js deleted file mode 100644 index 23d314b4..00000000 --- a/dist/common/async-validator/validator/index.js +++ /dev/null @@ -1 +0,0 @@ -import string from"./string";import method from"./method";import number from"./number";import boolean from"./boolean";import regexp from"./regexp";import integer from"./integer";import float from"./float";import array from"./array";import object from"./object";import enumValidator from"./enum";import pattern from"./pattern";import date from"./date";import required from"./required";import type from"./type";export default{string:string,method:method,number:number,boolean:boolean,regexp:regexp,integer:integer,float:float,array:array,object:object,enum:enumValidator,pattern:pattern,date:date,url:type,hex:type,email:type,required:required}; \ No newline at end of file diff --git a/dist/common/async-validator/validator/integer.js b/dist/common/async-validator/validator/integer.js deleted file mode 100644 index 08bc7144..00000000 --- a/dist/common/async-validator/validator/integer.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function integer(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),void 0!==r&&(rules.type(e,r,u,l,t),rules.range(e,r,u,l,t))}i(l)}export default integer; \ No newline at end of file diff --git a/dist/common/async-validator/validator/method.js b/dist/common/async-validator/validator/method.js deleted file mode 100644 index bbe6ac83..00000000 --- a/dist/common/async-validator/validator/method.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function method(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default method; \ No newline at end of file diff --git a/dist/common/async-validator/validator/number.js b/dist/common/async-validator/validator/number.js deleted file mode 100644 index 818f08e5..00000000 --- a/dist/common/async-validator/validator/number.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function number(e,r,u,i,t){const l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return u();rules.required(e,r,i,l,t),void 0!==r&&(rules.type(e,r,i,l,t),rules.range(e,r,i,l,t))}u(l)}export default number; \ No newline at end of file diff --git a/dist/common/async-validator/validator/object.js b/dist/common/async-validator/validator/object.js deleted file mode 100644 index d3f4b50c..00000000 --- a/dist/common/async-validator/validator/object.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function object(e,r,i,t,u){const o=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,t,o,u),void 0!==r&&rules.type(e,r,t,o,u)}i(o)}export default object; \ No newline at end of file diff --git a/dist/common/async-validator/validator/pattern.js b/dist/common/async-validator/validator/pattern.js deleted file mode 100644 index 210b48c0..00000000 --- a/dist/common/async-validator/validator/pattern.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function pattern(r,e,t,i,u){const n=[];if(r.required||!r.required&&i.hasOwnProperty(r.field)){if(isEmptyValue(e,"string")&&!r.required)return t();rules.required(r,e,i,n,u),isEmptyValue(e,"string")||rules.pattern(r,e,i,n,u)}t(n)}export default pattern; \ No newline at end of file diff --git a/dist/common/async-validator/validator/regexp.js b/dist/common/async-validator/validator/regexp.js deleted file mode 100644 index 5bd2d11c..00000000 --- a/dist/common/async-validator/validator/regexp.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function regexp(e,r,i,u,t){const l=[];if(e.required||!e.required&&u.hasOwnProperty(e.field)){if(isEmptyValue(r)&&!e.required)return i();rules.required(e,r,u,l,t),isEmptyValue(r)||rules.type(e,r,u,l,t)}i(l)}export default regexp; \ No newline at end of file diff --git a/dist/common/async-validator/validator/required.js b/dist/common/async-validator/validator/required.js deleted file mode 100644 index e5fca14a..00000000 --- a/dist/common/async-validator/validator/required.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";function required(r,e,u,i,o){const t=[],a=Array.isArray(e)?"array":typeof e;rules.required(r,e,i,t,o,a),u(t)}export default required; \ No newline at end of file diff --git a/dist/common/async-validator/validator/string.js b/dist/common/async-validator/validator/string.js deleted file mode 100644 index 5fbc864e..00000000 --- a/dist/common/async-validator/validator/string.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function string(e,r,i,t,s){const u=[];if(e.required||!e.required&&t.hasOwnProperty(e.field)){if(isEmptyValue(r,"string")&&!e.required)return i();rules.required(e,r,t,u,s,"string"),isEmptyValue(r,"string")||(rules.type(e,r,t,u,s),rules.range(e,r,t,u,s),rules.pattern(e,r,t,u,s),!0===e.whitespace&&rules.whitespace(e,r,t,u,s))}i(u)}export default string; \ No newline at end of file diff --git a/dist/common/async-validator/validator/type.js b/dist/common/async-validator/validator/type.js deleted file mode 100644 index 30114450..00000000 --- a/dist/common/async-validator/validator/type.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../rule/index.js";import{isEmptyValue}from"../util";function type(e,r,t,i,u){const p=e.type,l=[];if(e.required||!e.required&&i.hasOwnProperty(e.field)){if(isEmptyValue(r,p)&&!e.required)return t();rules.required(e,r,i,l,u,p),isEmptyValue(r,p)||rules.type(e,r,i,l,u)}t(l)}export default type; \ No newline at end of file diff --git a/dist/countdown/index.js b/dist/countdown/index.js deleted file mode 100644 index 40aeafbc..00000000 --- a/dist/countdown/index.js +++ /dev/null @@ -1 +0,0 @@ -import countDownBehaviors from"../behaviors/countdown";Component({externalClasses:["l-class","l-class-time","l-time-class"],behaviors:[countDownBehaviors],properties:{doneText:{type:String,value:"已结束"}},methods:{}}); \ No newline at end of file diff --git a/dist/countdown/index.json b/dist/countdown/index.json deleted file mode 100644 index 64c73674..00000000 --- a/dist/countdown/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{} } \ No newline at end of file diff --git a/dist/countdown/index.wxml b/dist/countdown/index.wxml deleted file mode 100644 index 0a78d41c..00000000 --- a/dist/countdown/index.wxml +++ /dev/null @@ -1,3 +0,0 @@ - - {{item.value}}{{item.name}} - \ No newline at end of file diff --git a/dist/countdown/index.wxss b/dist/countdown/index.wxss deleted file mode 100644 index da502685..00000000 --- a/dist/countdown/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-countdown{font-size:28rpx;line-height:40px}.l-countdown-item{display:inline-block;color:inherit}.l-countdown-time{display:inline-flex;width:56rpx;height:56rpx;background:#45526b;border-radius:4rpx;color:#fff;align-items:center;justify-content:center;margin:0 16rpx} \ No newline at end of file diff --git a/dist/counter/index.js b/dist/counter/index.js deleted file mode 100644 index 0e6b9acd..00000000 --- a/dist/counter/index.js +++ /dev/null @@ -1 +0,0 @@ -import eventUtil from"../core/utils/event-util";Component({externalClasses:["l-class","l-symbol-class","l-count-class","l-disabled-class"],properties:{count:{type:Number,value:1},max:{type:Number,value:9999},min:{type:Number,value:1},step:{type:Number,value:1},disabled:Boolean,iconSize:String,iconColor:String},data:{focus:!1},observers:{count:function(t){eventUtil.emit(this,"linchange",{count:t})},"count,min,max":function(){this.valueRange(this.data.count,"parameter")}},methods:{doNothing(t){const{type:e}=t.currentTarget.dataset;eventUtil.emit(this,"linout",{type:e,way:"icon"})},onCount(){this.setData({focus:!0})},onBlur(t){let{value:e}=t.detail;setTimeout(()=>{this.blurCount(Number(e),()=>{eventUtil.emit(this,"lintap",{count:this.data.count,type:"blur"})})},50)},blurCount(t,e){t&&this.valueRange(t),e&&e()},valueRange(t,e="input"){const{count:n,min:a,max:i}=this.data;"parameter"===e&&t>i&&console.error(`Counter 组件:初始值 ${n} 大于了最大值 ${i},请注意修正`),"parameter"===e&&ti&&eventUtil.emit(this,"linout",{type:"overflow_max",way:e}),ti?i:t){this.setData({focus:!1})})},onTapChange(t){const e=t.currentTarget.dataset.changeType,{count:n,step:a,min:i,max:o}=this.data;let s;"add"===e?s=n+a>o?o:n+a:"reduce"===e&&(s=n-a - - - - - - - - - diff --git a/dist/counter/index.wxss b/dist/counter/index.wxss deleted file mode 100644 index 929666b8..00000000 --- a/dist/counter/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.container-count{display:flex;flex-direction:row;width:170rpx;height:56rpx}.symbol{height:100%;width:56rpx;font-size:28rpx;color:#596c8e;display:flex;align-items:center;justify-content:center}.disabled{background-color:#f3f3f3;color:#c4c9d2}.abled{background-color:#ecf1f8;color:#596c8e}.count{height:100%;flex:1;min-height:56rpx;line-height:56rpx;font-size:24rpx;color:#596c8e;background:#f6f7f9;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@font-face{font-family:iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAALEAAsAAAAABqwAAAJ3AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqBFIEWATYCJAMMCwgABCAFhG0HNxvdBcgekiSBqhRCJKIogADMEYRr5GySu0dQoBAloETFRVKmqpWoK1wVG1th2Ij732n7N5fsqTh2xyneKfa2N3/anZKGvYXFohGGrUFIEA6JogD/fZ7L6U2gA7nGtyynNW3s8fyoF2AcUEBjbYqsRALxFtlF3ImLOE6g3ZheoYOxmRVIKtC4QLww9QYkCxFFMfKtQt2wtIjXKq3pZfrEq+j78d9qJEmqDE09fTTahoFf6deHfNxwgxOiBHl1hYx5oBC3GjMXIsLgItpN0e7yWhHSXPEmkcq31Dv94yWihmo7wbQcS/yiMoJf9yskkEFdzE0Diwo7eF2IkexeNr35cvtSjmQ/fjt5zeTy++93z1I4x8LHT3u9VVdH6SHr0r8+OjOTtCopyONe0uFsIlZDiaMZyTdAmzFfZzrm0+EOQPOcP/IeANGP4rNA8KN0+V8rbPwlMwX83P7UK0Wa5wJwS+sZvMEfUwMbiq9F1lxcFVWFvmwE4ErICtOvARTo9zPeMgROEVoL2hG+FqMeslbjZGHnUemwjlqrbbSbM766wwAuIkobZl1ICL0ekXT7jqzXF1nYb1SG/aLWGxG0O4uBLTtMhpne59gQ2CbNHWK2mEeJXaTj+iXUN5wGz2sjfg15YMaJJqvl/Dh6yOeYEWzqFSEooZy5ZEw6DR2HEZ8zC1tCNoTwq4pCm94kt5gLafs41CCgNqJpB2FqYTyUtxbSlc8vQboNjgbeIejJr0FcwOyc0MhUADlu8kCCe3klsElXIQgUQXGMixiTBiGHgyH85kEW1CLIjBEpX5WCm1GoSV7f4n7fNmiH9syRIkeR77bbiWdmwzMaDAAA') format('woff2')}.l-icon-add:before{content:"\e602"}.l-icon-reduce:before{content:"\e69c"}.l-icon{font-family:iconfont;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.l-icon::before{display:inline-flex}.count-hover{opacity:.8} \ No newline at end of file diff --git a/dist/custom-tab-bar/index.js b/dist/custom-tab-bar/index.js deleted file mode 100644 index 6cc19ec8..00000000 --- a/dist/custom-tab-bar/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({properties:{position:{type:String,value:"bottom"},show:{type:Boolean,value:!0},selected:{type:Number,value:0},color:{type:String,value:"#707070"},selectedColor:{type:String,value:"3963BC"},borderStyle:{type:String,value:"#f6f6f6"},backgroundColor:{type:String,value:"#fff"},backgroundImg:{type:String,value:""},fontSize:{type:Number,value:24},isRedirectToTab:{type:Boolean,value:!0},isNav:{type:Boolean,value:!0},list:{type:Array,value:[]}},data:{},attached(){},methods:{switchTab(t){const e=t.currentTarget.dataset,a=e.path;this.data.isNav&&(this.data.isRedirectToTab,wx.switchTab({url:a})),this.showItem(e.index)},show(){this.setData({show:!0})},hide(){this.setData({show:!1})},showItem(t){this.setData({selected:t});let e={idx:t,path:this.route};this.triggerEvent("lintap",e,{bubbles:!0,composed:!0})},showRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!0})},hideRedDot(t){const e=`list[${t}].redDot`;this.setData({[e]:!1})},setTabBarBadge(t,e){const a=`list[${t}].badge`;this.setData({[a]:e})},removeTabBarBadge(t){const e=`list[${t}].badge`;this.setData({[e]:""})}}}); \ No newline at end of file diff --git a/dist/custom-tab-bar/index.json b/dist/custom-tab-bar/index.json deleted file mode 100644 index a8456c1f..00000000 --- a/dist/custom-tab-bar/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true} \ No newline at end of file diff --git a/dist/custom-tab-bar/index.wxml b/dist/custom-tab-bar/index.wxml deleted file mode 100644 index 28c3c24e..00000000 --- a/dist/custom-tab-bar/index.wxml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - {{item.text}} - - {{item.badge}} - - diff --git a/dist/custom-tab-bar/index.wxss b/dist/custom-tab-bar/index.wxss deleted file mode 100644 index b12c5746..00000000 --- a/dist/custom-tab-bar/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.tab-bar{position:relative;height:110rpx;width:750rpx;background:#fff;display:flex;flex-direction:row;background-position:center center;background-size:100% 100%;padding-bottom:env(safe-area-inset-bottom)}.tab-bar-bottom{position:fixed!important;bottom:0;left:0;right:0}.tab-bar-border{position:absolute;left:0;top:0;width:100%;display:flex;flex-direction:row;height:1rpx;background:#f6f6f6;box-shadow:0 -1px 3px 1px #f6f6f6}.tab-bar-item{position:relative;flex:1;text-align:center;display:flex;justify-content:center;align-items:center;flex-direction:column}.item-circle{width:120rpx;height:60rpx;background-color:#fff;border-radius:200rpx 200rpx 0 0;border-bottom:none;background:#fff;position:absolute;top:-40rpx;box-shadow:0 -1px 1px 0 #f6f6f6}.tab-bar-item-image{width:64rpx;height:64rpx}.tab-bar-item view{font-size:24rpx}.reddot{height:20rpx;width:20rpx;background:red;border-radius:50%;position:absolute;top:15rpx;margin-left:25rpx}.badge{height:32rpx;line-height:32rpx;padding:0rpx 6rpx;background:red;border-radius:16rpx;position:absolute;font-size:18rpx;color:#fff;top:10rpx;margin-left:25rpx;box-sizing:border-box}.center-circle{height:100rpx;width:100rpx;border-radius:50%;position:absolute;top:-30rpx} \ No newline at end of file diff --git a/dist/dialog/index.js b/dist/dialog/index.js deleted file mode 100644 index 9dcbedc2..00000000 --- a/dist/dialog/index.js +++ /dev/null @@ -1 +0,0 @@ -import computeOffset from"../behaviors/computeOffset";import zIndex from"../behaviors/zIndex";import hover from"../behaviors/hover";import validator from"../behaviors/validator";Component({behaviors:[computeOffset,zIndex,hover,validator],externalClasses:["l-class","l-title-class","l-content-class","l-confirm-class","l-cancel-class","l-bg-class"],properties:{show:{type:Boolean,value:!1},type:{type:String,value:"alert",options:["alert","confirm"]},title:{type:String,value:"提示"},showTitle:{type:Boolean,value:!0},content:{type:String,value:""},locked:{type:Boolean,value:!0},confirmText:{type:String,value:"确定"},confirmColor:{type:String,value:"#3683d6"},cancelText:{type:String,value:"取消"},cancelColor:{type:String,value:"#45526b"},titleColor:String,contentColor:{type:String,value:"rgba(89,108,142,1)"},openApi:{type:Boolean,value:!0}},data:{success:null,fail:null},attached(){this.data.openApi&&this.initDialog()},pageLifetimes:{show(){this.data.openApi&&this.initDialog()}},methods:{initDialog(){wx.lin=wx.lin||{},wx.lin.showDialog=t=>{const{type:e="alert",title:o="提示",showTitle:l=!0,content:s="",locked:a=!0,confirmText:i="确定",contentColor:n="rgba(89,108,142,1)",cancelColor:c="#45526b",cancelText:r="取消",confirmColor:h="#3683d6",success:p=null,fail:m=null}=t;return this.setData({type:e,title:o,showTitle:l,content:s,locked:a,confirmText:i,cancelColor:c,cancelText:r,confirmColor:h,contentColor:n,show:!0,fail:m,success:p}),this}},onConfirmTap(){const{success:t}=this.data;t&&t({confirm:!0,cancel:!1,errMsg:"showDialog: success"}),this.setData({show:!this.data.show}),this.triggerEvent("linconfirm","confirm",{bubbles:!0,composed:!0})},onCancelTap(){const{success:t}=this.data;t&&t({confirm:!1,cancel:!0,errMsg:"showDialog: success"}),this.setData({show:!this.data.show}),this.triggerEvent("lincancel","cancel",{bubbles:!0,composed:!0})},onDialogTap(){!0!==this.data.locked&&this.setData({show:!this.data.show}),this.triggerEvent("lintap",!0,{bubbles:!0,composed:!0})}}}); \ No newline at end of file diff --git a/dist/dialog/index.json b/dist/dialog/index.json deleted file mode 100644 index 11a6eb11..00000000 --- a/dist/dialog/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-popup":"../popup/index"}} \ No newline at end of file diff --git a/dist/dialog/index.wxml b/dist/dialog/index.wxml deleted file mode 100644 index 1079fea9..00000000 --- a/dist/dialog/index.wxml +++ /dev/null @@ -1,14 +0,0 @@ - - - - {{title}} - - - {{content}} - - - {{cancelText}} - {{confirmText}} - - - diff --git a/dist/dialog/index.wxss b/dist/dialog/index.wxss deleted file mode 100644 index 33a7bfd8..00000000 --- a/dist/dialog/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.dialog-container{display:flex;flex-direction:column;align-items:center;width:520rpx;background:#fff;border-radius:12rpx}.dialog-title{font-size:32rpx;font-family:PingFangSC-Regular;color:#45526b;line-height:44rpx;margin-top:30rpx;padding:0 25rpx;text-align:center}.dialog-content{font-size:28rpx;font-family:PingFangSC-Regular;line-height:40rpx;margin-top:30rpx;margin-bottom:30rpx;display:flex;flex-direction:column;align-items:center;padding:0 25rpx}.dialog-btn-group{width:100%;height:80rpx;display:flex;flex-direction:row;justify-content:space-between;align-items:center}.dialog-btn-cancel{font-size:28rpx;height:80rpx;width:259rpx;border-right:2rpx solid #f3f3f3;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.dialog-btn-confirm{font-size:28rpx;flex:1;color:#3963bc;height:80rpx;display:flex;flex-direction:row;align-items:center;justify-content:center;border-top:2rpx solid #f3f3f3}.active{color:#3683d6}.leave{color:#45526b}.group-hover{opacity:.8} \ No newline at end of file diff --git a/dist/error-tip/index.js b/dist/error-tip/index.js deleted file mode 100644 index 362add14..00000000 --- a/dist/error-tip/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({externalClasses:["l-error-text","l-error-text-class"],properties:{errorText:String},data:{},methods:{}}); \ No newline at end of file diff --git a/dist/error-tip/index.json b/dist/error-tip/index.json deleted file mode 100644 index 64c73674..00000000 --- a/dist/error-tip/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{} } \ No newline at end of file diff --git a/dist/error-tip/index.wxml b/dist/error-tip/index.wxml deleted file mode 100644 index 0ce9d31f..00000000 --- a/dist/error-tip/index.wxml +++ /dev/null @@ -1 +0,0 @@ -{{errorText}} \ No newline at end of file diff --git a/dist/error-tip/index.wxss b/dist/error-tip/index.wxss deleted file mode 100644 index 38f29e36..00000000 --- a/dist/error-tip/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.error-text{font-size:22rpx;color:#f4516c;margin-right:20rpx;line-height:2} \ No newline at end of file diff --git a/dist/filter/array.wxs b/dist/filter/array.wxs deleted file mode 100644 index 2dd48071..00000000 --- a/dist/filter/array.wxs +++ /dev/null @@ -1,174 +0,0 @@ -var is = require("./is.wxs"); - -function _isArray(targetArray, funName) { - if (!is.isArray(targetArray)) { - console.log('[WXS:Array]' + funName + ',targetArray must be array'); - return false; - } - return true; -} - -/** - * concat 合并数组 - * @param {Array} targetArray 目标数组 - */ -function concat() { - var length = arguments.length; - var result = []; - var validatorArray = _isArray(arguments[0], 'concat'); - if (validatorArray) { - for (var i = 1; i < length; i++) { - result = arguments[0].concat(arguments[i]) - } - return result - } -} - -/** - * join 数组转成字符串 - * @param {Array} targetArray 目标数组 - * @param {String} spearator 连接符 - */ -function join(targetArray, spearator) { - var validatorArray = _isArray(arguments[0], 'concat'); - if (validatorArray) return targetArray.join(spearator); -} - -/** - * pop 移除最后一个数组元素,并返回移除后的数组和溢出的值 - * @param {Array} targetArray 目标数组 - */ -function pop(targetArray) { - var validatorArray = _isArray(arguments[0], 'pop'); - if (validatorArray) { - var result = targetArray.pop(); - return { - newArray: targetArray, - item: result - } - } -} - -/** - * shift 移除第一个数组元素,并返回移除后的数组和溢出的值 - * @param {Array} targetArray 目标数组 - */ -function shift(targetArray) { - var validatorArray = _isArray(arguments[0], 'shift'); - if (validatorArray) { - var result = targetArray.shift(); - return { - newArray: targetArray, - item: result - } - } -} - -/** - * push 从后追加数组元素,并返回新的数组 - * @param {Array} targetArray 目标数组 - */ -function push() { - var length = arguments.length; - var validatorArray = _isArray(arguments[0], 'push'); - if (validatorArray) { - for (var i = 1; i < length; i++) { - arguments[0].push(arguments[i]) - } - return arguments[0] - } -} - -/** - * unshift 从前追加数组元素,并返回新的数组 - * @param {Array} targetArray 目标数组 - */ -function unshift(targetArray) { - var length = arguments.length; - var validatorArray = _isArray(arguments[0], 'unshift'); - if (validatorArray) { - for (var i = length - 1; i > 0; i--) { - arguments[0].unshift(arguments[i]) - } - return arguments[0] - } -} -/** - * reverse 倒序 - * @param {Array} targetArray 目标数组 - */ -function reverse(targetArray) { - var validatorArray = _isArray(targetArray, 'reverse'); - if (validatorArray) return targetArray.reverse(); -} - -/** - * slice 截取数组 - * @param {Array} targetArray 目标数组 - * @param {Number} beginSlice 从该索引(以 0 为基数)处开始提取目标数组中的元素 - * @param {Number} endSlice 在该索引(以 0 为基数)处结束提取数组元素 - */ -function slice(targetArray, beginSlice, endSlice) { - var validatorArray = _isArray(targetArray, 'slice'); - if (validatorArray) return targetArray.slice(beginSlice, endSlice); -} - -/** - * splice 截取数组 - * @param {Array} targetArray 目标数组 - * @param {Number} start - * @param {Number} deleteCount - */ -function splice(targetArray, start, deleteCount) { - var validatorArray = _isArray(targetArray, 'splice'); - if (validatorArray) { - if (arguments.length < 4) { - targetArray.splice(start, deleteCount); - } else { - targetArray.splice(start, deleteCount, arguments[3]); - var length = arguments.length; - for (var i = 4; i < length; i++) { - arguments[i] && targetArray.splice(++start, 0, arguments[i]) - } - } - return targetArray - } -} - -/** - * indexOf 查找数组 - * @param {Array} targetArray 目标数组 - * @param {String} searchValue 被查找的值 - * @param {Number} fromIndex 开始查找的位置 - * - */ -function indexOf(targetArray, searchValue, fromIndex = 0) { - var validatorArray = _isArray(targetArray, 'indexOf'); - if (validatorArray) return targetArray.indexOf(searchValue, fromIndex); -} - -/** - * lastIndexOf 查找字符串最后出现的位置 - * @param {Array} targetArray 目标数组 - * @param {String} searchValue 被查找的值 - * @param {Number} fromIndex 开始查找的位置,str.length - * - */ -function lastIndexOf(targetArray, searchValue, fromIndex = 0) { - var validatorArray = _isArray(targetArray, 'lastIndexOf'); - if (validatorArray) return targetArray.lastIndexOf(searchValue, fromIndex || targetArray.length); -} - -module.exports = { - concat: concat, - join: join, - pop: pop, - shift: shift, - push: push, - unshift: unshift, - reverse: reverse, - slice: slice, - splice: splice, - indexOf:indexOf, - lastIndexOf:lastIndexOf -} diff --git a/dist/filter/classnames.wxs b/dist/filter/classnames.wxs deleted file mode 100644 index a83cbe0e..00000000 --- a/dist/filter/classnames.wxs +++ /dev/null @@ -1,33 +0,0 @@ -var is = require('./is.wxs'); -var object = require('./object.wxs'); - -function apply(fun, args) { - return args.map(function (item) { - return fun(item) - }) -} - -function classnames() { - var classes = []; - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - if (!arg) continue; - if (is.isString(arg) || is.isNumber(arg)) { - classes.push(arg); - } else if (is.isArray(arg) && arg.length) { - var inner = apply(classnames, arg); - if (inner) { - classes.push(inner); - } - } else if (is.isObject(arg)) { - object.keys(arg).forEach(function (key) { - if (arg[key]) { - classes.push(key); - } - }) - } - } - return classes.join(' '); -} - -module.exports = classnames; diff --git a/dist/filter/is.wxs b/dist/filter/is.wxs deleted file mode 100644 index 1d14aa0d..00000000 --- a/dist/filter/is.wxs +++ /dev/null @@ -1,70 +0,0 @@ -var TYPE = { - NULL: 'null', - UNDEFINED: 'undefined', - NUMBER: 'Number', - STRING: 'String', - BOOLEAN: 'Boolean', - OBJECT: 'Object', - FUNCTION: 'Function', - ARRAY: 'Array', - DATE: 'Date', - REGEXP: 'RegExp' -} - -function isUndefined(val) { - return TYPE.UNDEFINED === typeof val; -} - -function isNull(val) { - return val === TYPE.NULL; -} - -function _jadgeFun(val, type) { - if (isUndefined(val) || isNull(val)) return false; - return TYPE[type] === val.constructor; -} - -function isNumber(val) { - return _jadgeFun(val, 'NUMBER'); -} - -function isString(val) { - return _jadgeFun(val, 'STRING'); -} - -function isBoolean(val) { - return _jadgeFun(val, 'BOOLEAN'); -} - -function isObject(val) { - return _jadgeFun(val, 'OBJECT'); -} - -function isFunction(val) { - return _jadgeFun(val, 'FUNCTION'); -} - -function isArray(val) { - return _jadgeFun(val, 'ARRAY'); -} - -function isDate(val) { - return _jadgeFun(val, 'DATE'); -} - -function isRegExp(val) { - return _jadgeFun(val, 'REGEXP'); -} - -module.exports = { - isNull: isNull, - isUndefined: isUndefined, - isNumber: isNumber, - isString: isString, - isBoolean: isBoolean, - isObject: isObject, - isFunction: isFunction, - isArray: isArray, - isDate: isDate, - isRegExp: isRegExp -} diff --git a/dist/filter/object.wxs b/dist/filter/object.wxs deleted file mode 100644 index 244fe4fd..00000000 --- a/dist/filter/object.wxs +++ /dev/null @@ -1,12 +0,0 @@ -var REGEXP = getRegExp('{|}|"', 'g'); - -function keys(obj) { - return JSON.stringify(obj) - .replace(REGEXP, '') - .split(',') - .map(function(item) { - return item.split(':')[0]; - }); -} - -module.exports.keys = keys; \ No newline at end of file diff --git a/dist/filter/string.wxs b/dist/filter/string.wxs deleted file mode 100644 index 6cb5ea3e..00000000 --- a/dist/filter/string.wxs +++ /dev/null @@ -1,178 +0,0 @@ -var is = require("./is.wxs"); - -function _isString(targetString, funName) { - if (!is.isString(targetString)) { - console.log('[WXS:String]' + funName + ',targetString must be string'); - return false; - } - return true; -} -/** - * toString 返回指定对象的字符串形式 - * @param {String} targetString 目标字符串 - */ - -function toString(targetString) { - return targetString && targetString.toString(); -} - -/** - * valueOf 返回指定对象的value - * @param {String} targetString 目标字符串 - */ - -function valueOf(targetString) { - return targetString && targetString.valueOf(); -} - -/** - * charAt 一个字符串中返回指定的字符。 - * @param {String} targetString 目标字符串 - * @param {Number} index 返回指定字符的位置 - * - */ -function charAt(targetString, index = 0) { - var validatorString = _isString(targetString, 'charAt'); - if (validatorString) return targetString.charAt(index); -} - -/** - * charCodeAt 返回0到65535之间的整数,表示给定索引处的UTF-16代码单元 - * @param {String} targetString 目标字符串 - * @param {Number} index 返回指定字符的位置 - * - */ -function charCodeAt(targetString, index = 0) { - var validatorString = _isString(targetString, 'charCodeAt'); - if (validatorString) return targetString.charCodeAt(index); -} - -/** - * indexOf 查找字符串 - * @param {String} targetString 目标字符串 - * @param {String} searchValue 被查找的值 - * @param {Number} fromIndex 开始查找的位置 - * - */ -function indexOf(targetString, searchValue, fromIndex = 0) { - var validatorString = _isString(targetString, 'indexOf'); - if (validatorString) return targetString.indexOf(searchValue, fromIndex); -} - -/** - * lastIndexOf 查找字符串最后出现的位置 - * @param {String} targetString 目标字符串 - * @param {String} searchValue 被查找的值 - * @param {Number} fromIndex 开始查找的位置,str.length - * - */ -function lastIndexOf(targetString, searchValue, fromIndex = 0) { - var validatorString = _isString(targetString, 'lastIndexOf'); - if (validatorString) return targetString.lastIndexOf(searchValue, fromIndex || targetString.length); -} - -/** - * slice 取一个字符串的一部分,并返回一新的字符串 - * @param {String} targetString 目标字符串 - * @param {Number} beginSlice 从该索引(以 0 为基数)处开始提取原字符串中的字符 - * @param {Number} endSlice 在该索引(以 0 为基数)处结束提取字符 - * - */ -function slice(targetString, beginSlice, endSlice) { - var validatorString = _isString(targetString, 'slice'); - if (validatorString) return targetString.slice(beginSlice, endSlice || targetString.length); -} - -/** - * split 分割字符串 - * @param {String} targetString 目标字符串 - * @param {String} separator 从该索引(以 0 为基数)处开始提取原字符串中的字符 - * @param {Number} limit - * - */ -function split(targetString, separator, limit) { - var validatorString = _isString(targetString, 'split'); - if (validatorString) return targetString.split(separator, limit); -} - -/** - * substring 取一个字符串的一部分,并返回一新的字符串 - * @param {String} targetString 目标字符串 - * @param {Number} indexStart 需要截取的第一个字符的索引,该字符作为返回的字符串的首字母。 - * @param {Number} indexEnd 一个 0 到字符串长度之间的整数,以该数字为索引的字符不包含在截取的字符串内。 - * - */ -function substring(targetString, indexStart, indexEnd) { - var validatorString = _isString(targetString, 'substring'); - if (validatorString) return targetString.substring(indexStart, indexEnd); -} - -/** - * toLowerCase 字符串值转为小写形式 - * @param {String} targetString 目标字符串 - * - */ -function toLowerCase(targetString) { - var validatorString = _isString(targetString, 'toLowerCase'); - if (validatorString) return targetString.toLowerCase(); -} - -/** - * toLocaleLowerCase 字符串值转为小写形式 - * @param {String} targetString 目标字符串 - * - */ -function toLocaleLowerCase(targetString) { - var validatorString = _isString(targetString, 'toLocaleLowerCase'); - if (validatorString) return targetString.toLocaleLowerCase(); -} - -/** - * toUpperCase 字符串值转为大写形式 - * @param {String} targetString 目标字符串 - * - */ -function toUpperCase(targetString) { - var validatorString = _isString(targetString, 'toUpperCase'); - if (validatorString) return targetString.toUpperCase(); -} - -/** - * toLocaleUpperCase 根据任何特定于语言环境的案例映射,返回调用字符串值转换为大写的值。 - * @param {String} targetString 目标字符串 - * - */ -function toLocaleUpperCase(targetString) { - var validatorString = _isString(targetString, 'toLocaleUpperCase'); - if (validatorString) return targetString.toLocaleUpperCase(); -} - -/** - * trim 从一个字符串的两端删除空白字符 - * @param {String} targetString 目标字符串 - * - */ -function trim(targetString) { - var validatorString = _isString(targetString, 'trim'); - if (validatorString) return targetString.trim(); -} - - - - -module.exports = { - indexOf: indexOf, - charAt: charAt, - charCodeAt: charCodeAt, - toString: toString, - valueOf: valueOf, - lastIndexOf: lastIndexOf, - slice: slice, - split: split, - substring: substring, - toLowerCase: toLowerCase, - toLocaleLowerCase: toLocaleLowerCase, - toUpperCase: toUpperCase, - toLocaleUpperCase: toLocaleUpperCase, - trim: trim -} diff --git a/dist/filter/zero-padding.wxs b/dist/filter/zero-padding.wxs deleted file mode 100644 index a6b4eb07..00000000 --- a/dist/filter/zero-padding.wxs +++ /dev/null @@ -1,8 +0,0 @@ -function zeroPadding(num, length = 2) { - if((num + "").length >= length) { - return num; - } - return zeroPadding("0" + num, length) -} - -module.exports = zeroPadding; \ No newline at end of file diff --git a/dist/form-item/index.js b/dist/form-item/index.js deleted file mode 100644 index d549925d..00000000 --- a/dist/form-item/index.js +++ /dev/null @@ -1 +0,0 @@ -import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},externalClasses:["l-form-item-class","l-form-label-class","l-form-content-class","l-error-text-class"],behaviors:[rules],relations:{"../form/index":{type:"parent",linked:function(){},linkChanged:function(){},unlinked:function(){}}},properties:{label:String,labelPlacement:{type:String,value:"row"},alignItems:{type:String,value:"start"},labelWidth:{type:String,value:"auto"},labelSlot:{type:Boolean,value:!1},name:{type:String,value:""}},data:{isRequired:!1},attached(){this.initRules(),this.isRequired()},methods:{isRequired(){this.data.rules.forEach(e=>{e.required&&this.setData({isRequired:!0})})}}}); \ No newline at end of file diff --git a/dist/form-item/index.json b/dist/form-item/index.json deleted file mode 100644 index d9025d84..00000000 --- a/dist/form-item/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-error-tip":"../error-tip/index"}} \ No newline at end of file diff --git a/dist/form-item/index.wxml b/dist/form-item/index.wxml deleted file mode 100644 index 03966555..00000000 --- a/dist/form-item/index.wxml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - {{label}} - - - - - - - diff --git a/dist/form-item/index.wxss b/dist/form-item/index.wxss deleted file mode 100644 index ac803205..00000000 --- a/dist/form-item/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.form-item-container{display:flex;border-bottom:1px solid #eee;color:#777;padding:0 20rpx;position:relative}.form-item-container.textHeight{margin-bottom:44rpx}.form-item-container.label-column{align-items:left;flex-direction:column}.form-item-container.label-column .label-text{line-height:44rpx}.form-item-container.label-row{align-items:center;flex-direction:row}.form-item-container.label-row .label-text{line-height:88rpx}.form-item-container .label-text{display:flex;line-height:88rpx}.form-item-container .label-text-column-start{justify-content:flex-start}.form-item-container .label-text-column-end{justify-content:flex-end}.form-item-container .label-text-column-center{justify-content:center}.form-item-container .label-text-row-start{justify-content:flex-start}.form-item-container .label-text-row-end{justify-content:flex-end}.form-item-container .label-text-row-center{justify-content:center}.form-item-container .label-content{flex:1}.form-item-container .label-text-required::before{display:inline-block;margin-right:4px;color:#f5222d;font-family:SimSun,sans-serif;content:'*'}.error-text{text-align:right;line-height:44rpx;color:#f56c6c;font-size:12px;position:absolute;top:100%;left:0;padding-left:24rpx}.row{display:none!important} \ No newline at end of file diff --git a/dist/form/index.js b/dist/form/index.js deleted file mode 100644 index 0ba109a1..00000000 --- a/dist/form/index.js +++ /dev/null @@ -1 +0,0 @@ -import eventBus from"../core/utils/event-bus.js";import eventUtil from"../core/utils/event-util";Component({externalClasses:["l-form-container-class","l-form-submit-class","l-form-reset-class","l-form-btn-class"],options:{multipleSlots:!0},relations:{"../form-item/index":{type:"child",linked:function(t){this._initItem(t)},linkChanged:function(){},unlinked:function(){}}},properties:{name:{type:String,value:""},isSubmitValidate:{type:Boolean,value:!0}},attached(){this._init()},detached(){for(let t in this._keys)Object.prototype.hasOwnProperty.call(this._keys,t)&&(eventBus.off("lin-form-blur-"+t),eventBus.off("lin-form-change-"+t))},data:{_this:null},methods:{_init(){wx.lin=wx.lin||{},wx.lin.forms=wx.lin.forms||{},wx.lin.forms[this.properties.name]=this,wx.lin.initValidateForm=t=>{wx.lin._instantiation=t},wx.lin.submitForm=function(t){wx.lin.forms[t].submit()},wx.lin.resetForm=function(t){wx.lin.forms[t].reset()}},_initItem(t){this._keys=this._keys||{},this._errors=this._errors||{};const e=t.properties.name;if(eventBus.on("lin-form-blur-"+e,t=>{this._validateItem(t,"blur")}),eventBus.on("lin-form-change-"+e,t=>{clearTimeout(this.change_time),this.change_time=setTimeout(()=>{this._validateItem(t,"change")},200)}),this._keys[e])throw new Error("表单项存在重复的name:"+e);this._keys[e]="",this._errors[e]=[]},_validateItem(t,e){let i=wx.lin._instantiation,s=this._getValues();const r=this.getRelationNodes("../form-item/index").find(e=>e.properties.name===t);if(!i.selectComponent("#"+t))throw new Error("表单项不存在name:"+t);return r.validatorData(s,e),this._errors[t]=r.data.errors,r.data.errors},_forEachNodes(t,e){let i=this.getRelationNodes("../form-item/index");e&&i.reverse(),i.forEach((e,i)=>{t(e,i)})},_validateForm(){let t=wx.lin._instantiation,e=[],i=this._getValues();return this._forEachNodes(s=>{const r=s.properties.name;if(!t.selectComponent("#"+r))throw new Error("表单项不存在name:"+r);s.validatorData(i),this._errors[r]=s.data.errors,e=e.concat(s.data.errors)},!0),e},_getValues(){let t={},e=wx.lin._instantiation;return this._forEachNodes(i=>{const s=i.properties.name,r=e.selectComponent("#"+s);r&&(t[s]=r.getValues())}),t},submit(){let t=this.data.isSubmitValidate?this._validateForm():[];this.triggerEvent("linsubmit",{values:this._getValues(),errors:this.data.isSubmitValidate?this._errors:{},isValidate:0===t.length})},reset(){let t=wx.lin._instantiation;this._forEachNodes(e=>{e.setData({errorText:""});const i=e.properties.name,s=t.selectComponent("#"+i);s&&s.reset()}),eventUtil.emit(this,"linreset")}}}); \ No newline at end of file diff --git a/dist/form/index.json b/dist/form/index.json deleted file mode 100644 index 64c73674..00000000 --- a/dist/form/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{} } \ No newline at end of file diff --git a/dist/form/index.wxml b/dist/form/index.wxml deleted file mode 100644 index cb7567e5..00000000 --- a/dist/form/index.wxml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/dist/form/index.wxss b/dist/form/index.wxss deleted file mode 100644 index e69de29b..00000000 diff --git a/dist/grid-item/index.js b/dist/grid-item/index.js deleted file mode 100644 index 06429a3a..00000000 --- a/dist/grid-item/index.js +++ /dev/null @@ -1 +0,0 @@ -import dataUtil from"../core/utils/data-util";Component({relations:{"../grid/index":{type:"parent"}},externalClasses:["l-grid-item","l-grid-item-class"],properties:{key:String,cell:{type:Object,value:{}}},data:{index:0,isHover:!0},attached(){},observers:{key:function(){const t=this.getRelationNodes("../grid/index")[0];t&&(t.setData({gridItems:[],childNum:0}),t.initGrids())}},lifetimes:{ready(){const t=this.getRelationNodes("../grid/index")[0];t&&dataUtil.setDiffData(this,{isHover:t.data.isHover})}},methods:{tapGridItem(){this.triggerEvent("linitemtap",{...this.data},{bubbles:!0,composed:!0})}}}); \ No newline at end of file diff --git a/dist/grid-item/index.json b/dist/grid-item/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/grid-item/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/grid-item/index.wxml b/dist/grid-item/index.wxml deleted file mode 100644 index 0245b11c..00000000 --- a/dist/grid-item/index.wxml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/dist/grid-item/index.wxss b/dist/grid-item/index.wxss deleted file mode 100644 index 8a0bda10..00000000 --- a/dist/grid-item/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.grid-item{display:flex;justify-content:center;align-items:center;flex-direction:column;padding:32rpx 16rpx;box-sizing:border-box}.l-gird-item-hover{opacity:.8} \ No newline at end of file diff --git a/dist/grid/index.js b/dist/grid/index.js deleted file mode 100644 index 2c2cc519..00000000 --- a/dist/grid/index.js +++ /dev/null @@ -1 +0,0 @@ -import hover from"../behaviors/hover";Component({options:{multipleSlots:!0},behaviors:[hover],relations:{"../grid-item/index":{type:"child",linked(){this.initGrids()},unlinked(){this.initGrids()}}},externalClasses:["l-class","l-class-grid","l-grid-class"],properties:{rowNum:{type:String,value:3},showBorder:Boolean,showColBorder:Boolean,showRowBorder:Boolean},data:{gridItems:[],childNum:0,currentIndex:-1,currentCell:-1},ready(){this.initGrids()},lifetimes:{show(){}},methods:{initGrids(){let e=this.getRelationNodes("../grid-item/index");if(this.data.childNum===e.length)return;const t=e.map((e,t)=>(e.setData({index:t}),{index:t,key:e.data.key,cell:e.data.cell}));this.setData({gridItems:t,childNum:e.length})},tapGridItem(e){const{gridIndex:t}=e.target.dataset;this.setData({currentIndex:t,currentCell:this.data.gridItems[t].cell})},tapGrid(){this.triggerEvent("lintap",{index:this.data.currentIndex,cell:this.data.currentCell},{bubbles:!0,composed:!0}),this.setData({currentIndex:-1,currentCell:-1})}}}); \ No newline at end of file diff --git a/dist/grid/index.json b/dist/grid/index.json deleted file mode 100644 index 225ddd4e..00000000 --- a/dist/grid/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-grid-item":"../grid-item/index"} } \ No newline at end of file diff --git a/dist/grid/index.wxml b/dist/grid/index.wxml deleted file mode 100644 index 55b71249..00000000 --- a/dist/grid/index.wxml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/dist/grid/index.wxss b/dist/grid/index.wxss deleted file mode 100644 index 42aa8208..00000000 --- a/dist/grid/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-grid{display:flex;width:inherit;flex-wrap:wrap}.l-grid .l-grid-item{display:flex;justify-content:center;flex-direction:column;text-align:center;box-sizing:border-box;border-style:solid;border-color:#ededed;border-width:0}.l-grid .center-grid{border-bottom-width:2rpx}.l-grid .side-grid{border-right-width:2rpx} \ No newline at end of file diff --git a/dist/icon/index.js b/dist/icon/index.js deleted file mode 100644 index 890ecfa8..00000000 --- a/dist/icon/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({externalClasses:["l-class"],options:{addGlobalClass:!0},properties:{name:String,color:{type:String,value:"#3963bc"},size:{type:String,value:"40"}},ready:function(){this.properties.name||console.error("请传入Icon组件的name属性")},methods:{}}); \ No newline at end of file diff --git a/dist/icon/index.json b/dist/icon/index.json deleted file mode 100644 index 64c73674..00000000 --- a/dist/icon/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{} } \ No newline at end of file diff --git a/dist/icon/index.wxml b/dist/icon/index.wxml deleted file mode 100644 index 5d00d132..00000000 --- a/dist/icon/index.wxml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/dist/icon/index.wxss b/dist/icon/index.wxss deleted file mode 100644 index 5bb74c1e..00000000 --- a/dist/icon/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.l-icon{font-family:l-iconfont;font-size:40rpx;color:#3963bc;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@font-face{font-family:l-iconfont;src:url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAABlQAAsAAAAALjQAABkCAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCHfArGDLcsATYCJAOBQAtiAAQgBYRtB4NEG6olZYaYxwFwTfuLqNbE2f9/Sm6MARWY/pOTwg2KLc2GRcKNTOMuNh68NAtDV/m4j5u9WOw1c5P3lMV4fyxtacPmwbwqcERQJeJjvoUr/xOfFoM7qlAqxxySVJo8fE1/f+7uJi8klO5A1epL0yhUtW08QjUFSqNwGP2F6frrN3hzD+Td7hfLPPBAE40owAJriOas2d0ggZANVohsEpKaBJIa0GLBg7URoFALFlwDdeSRUkmQ1g+CSrg7agGq9MoDFWh6QjmhpXdeIQkgwxMAfk21T8jShR+KkqJxLG96X/9jjeEh9oxYZlnksVU6nTO/vAIkM9dp24ARt12bWGaplkImiSTy8J/buqlbgiU4WwVtqL3df8dGUQYwn1t+TOQEou8h32yT80qtaJGIOg3TzrSC5Tssu/BNhIWT/iLg/9f5ulrhkQtbSCUcZhy3d5+k//XuuzYHZIXkoOyA9RndtDzldAKcO0ySHALZ//NkKE89HTO2wzx1GOcibJPh8Qgd0REhHqHOJVmJe0uBTueWyw37zc9Yha5cm4wwQCRl+3p3ixNozZrAkzOBEBgqEkOfx7voI8DwyirNjtAk6uK+RXyoNOktPcT7/vfjn8KQpMpySedR7hHAeaFaGJH3wyWi8Dxn4XoQGWuAQnyV9mc+Yu2WbSXLj6h7WEg/W1i3SU4bs2u3RLX/17yerDGg1Rk0ZNiIURTDCZKiGZbjBVEilckVSpVao9XpDUaT2WJFJKKWvQchncTFTeDneL1E8HOCXppCaAYh5iUyPznU0RxCgBAPIQFCIoQkCMkQUiCkQkiDkA4hA0ImhCwI2RByIORCyIOQD6EAQiGEIgjFEEoglEIog1AOoQJCJYQqCNUQaiDUQqiDUA+hBYSWEFpBaA2hjZco/Lx1lcBbQEljq7xo/zB8INodT2TSZZFmIsXx6lWJCWdeYmW9QJ/LDlCWwAplJguMzBt+o1JWA+bSVyRJHY48AnvD3K9YVGigb5Pyk/wEfGCA0fM6wCxG/YN5jAosh8wAjintnQO6lgcv+INFgedRSFCQmEWdUvoGANDV6b6G3PppWlsoxAgbWLIytrUVCKk/5gbezKowzaLKBmgo4ARAGZzalxVJ/osqWZgiZjwqbaGuBCqS5CWKIVHVGSpZkqYSq4wVQ6MXEyjrhg0HkTzCYIKl4VUbly1xiZh1qQmrKhLV5y6pzgg/kvLrHsFCjuee9Q9lg8YbOCJH3XCyMNuHnqwCTYBg++KoDeOiODRSz9PDQ8R5enSY4uaOLD529tXM44Exr1Qk+KZ1A92Ct8c7WDFwJK3BEO6uWyhWbv8nyRATv4OluVtpGPkykzOorYDGLCjNQu/e1vM8jwKxzTlZaI5Omw0eqRIUQ2WhWafiTtR1ArGJxTBZRSUORrhWWRI4qvcmChDsgJjnAYs70ibEOIqGiS/fA8K/JhOizIcFjiu9lHE+JdmQXngjf1r2rPg74VwkdX1+aTZl9dQRAsFC/cW3GNh8wyNcekdnm1yL4wS+upOVMZBPY5cYozHE/PDoPbVhU7FGmTY0WSCO8ap9lCqRMlpDCN+EGPgQ2kJzlByKW5ouvKHpH3y73fTye4Ye9EYPtqR66aTIChCDNg77L792lT+VUGqRtN2RfpQOptLBn4njhsL8DrZXDMQzqZfvy96pFqZ30s9LFcXK6qFmosLVzchrMhlkVYzKyzkcRyvuvoCmOSRCphk/vDwvjRUkIazIoxvWzUKUcDAM2GCDs0ooBqDP5PRZcqlgE5W4nNKBumK8rbYmeAF4UY8YgvxYNUvhwb9K45GdbGJ5M5pxAuMZGin+dXz1pIAV25dPZaVTm2td810KXCIcAJBHqzSM4cHqdVyRr9cIQRduch6em020Uq4iWZUigR7XGqJXq5wnJjo5ABOYVDQKAZkZXMBkcSPcJn4zOPTuaMUm2L7H5IHitW06Y4iIqnPlQF+wKWnlo1vaiCuFrYOlCy6KfcbhbKPYuJxvk2gnK9tFainFRLpgSa2FfbZ1eMc/7+zIxQTKi02dwCEuZqTmplxctJXTQPs420KBfxvf3OqIJBXSZyf34KBbgwqRYiss7tGLt2ol0tQZJOCY+PBtnQ6Y9f4Xp8261i0PBofa5nInl9F7gKNbPqkXYG+DQKaBYGYedN3msLpyxvfkDU2yTv80WB8H/rFLMsKE0ygsyXB7H7rZt76atmIgpnxnDQ1T1h7PktDYBb2/g96GwKGRd3H/XWMPFNhpEEm2lcc8vIaN8DyULSk/uG5QbNgMKDR6ToD2mBwd52A5ND/3i5LDE+HNrZd4dMC/vV7XEi4atilEVoan5ODZUxAw5YLMNTBFNkoNX6B19as99C64LoCvVHFVqnmlVZwAIJMCxJoKC1VWSlTA27U5KG8PyRWwsmBbydWHpCovsai7N8yQSEjXRgHI+lgg/g5/7i/b02do4KL+WvQaD40wiq4IAk7MG1B79Tp2cTZx2jbAIPgmgkIYIWLnler+jZhKKk+gs4NU+ypkR/Vx9AphNu+QqTtd9kxsq5WF4lE11S1EiFLdXEXEFPGrxpClJRDNHYnVPqqrCfi55KH8KpKYDI1cusGT/eekPJr1ssrr+nvvFDRC4p65VnyyiGUpkGyVqApKbxxVarSO3ZvnL93aVXv49nf1F2/urNm88XWvcY5fmyFkIXYZyy/h2/CWjfAMXEPf9wWUXCz0X8U/ERyoBqhloHowwr8ahedAtTenJrDOijadax7f7OWDDW+34pWyYYYucG4Oc67wDegaALaUW2tsNOO9WTwhhDd3Dh+IuzY0clhJdaPHzTQeIuwgJtfWpYmj5Ok0wrPVMO6gRndp2VHOwIARhLHDlOnwPBKjxJDxTRcEF1eUJHfr1pBrl96bp3DFm6Loya8wctSZLuK0TZ78iVeqnEKRuKgLSn4dTSuuYpssESXPvO7hkWLU6Iznq+m3W/hAKE4Kgmbec56J2sa5L2M/dSXlp9dSiRtGCs97DCEpiVUGFxrURa9m8Thv3LkaWpO8O2DWdhg/0qVBfhrfFiKyZTqeVK7JuwUs09xXTKx6UCoLSl4kMMtrUIENjdgnhLrRkjV9RrUWXRiGDaUFmDkc+t1xZ7MkJN3Xxy+Q0q5M1W/jX0a/mCrKmVD0sv+LJOiTavZk0DuzZDOzCLGSU9ndO7KA91z0CYEKMkRCXXOco3cntPf88zvXMvUvMEPKW26IIx94Xbnn9IZ3rQUEV7aMOdbJq0KjbQ9pIEyZpNK6W+jlyhG3nTY1DQkMD4oqkTS31KIzaXbi7Yat+KnDrfr7KIaPvU97SyDHR2Hjk7aPHMfDbCfN3H1BaJiJpcqSGAee/Lu+6SrlJqdpPeUq5+b6pmuUG5z9lles3TcMoJYqHKH3JhDxJugxFLgyH+ultUtnplnanYdr50tvYn4Cqb2nTy8Fjpin0agz79aAM+YWSwK/+XUj65c2bly9em7DyLp5T885sOUH5xExnJ4OS7Rk+owYfhnAazUOCLg8cjmPGGtvjXt+uzNpgNYwQ9QSZypoY53J/Rqapv+Bcr49EQLgA5yS9WtVmLBTZWyWN9OEmGrN2qdMSRBizevWbder6HxMtX4DwGmSvb0NDCKenJR2qsnALl71Tw+rWAVNX5eGZ737K+HFWcWdhRZWi+zPcLQcKR0cKoUbq+hIqY9rnrwqv789P7+ykO1q5QfDcZWVcTAYWP419INbTHzDfriZ0m4+YkTZVc0qduHEcVzAbtsdF6lc6plXr5qpPIryrGfc9LSC6kZpQkmZ7KNGl0cmWTQ2AA+JT+rubUUGf7m379IwtK9n2Y3JJ/V0o3wUntVjMvVmQbD9jZ38utvHttR9tKsQ4Ib+/nsIJs7A1x7Xd0jCsJmxX+LGrxxj88GZs/IC623OwAfyB4LV+abuNiKmKLJoQXq7qQ9JkF552ED+q8ZJFsYiNjpb6L82sHAed8YZzMGe7m5Tb8IPLNzBJ2FzEF8c6gLGWS4JhfivITf5g/IdanDaZiQy/oHNqXa7BjV4MNjVNfSAeQqMdA0+7XvIPGOjtv+hYcQG7DXrnLqhXGE/evTbGtXaR8vvo/65zJx7/AEzUBlS8cdV4anMZn0Fk7qsQ6lE3fKp1RHPEv8Gs12GwiCPiZ6Xu46AWusclBmbnBoWKAoSrsvt1M1/V917zyCMBb1WKKXs69wdnCdbg0yj7VKNjA6Ci4n0EMeBpjw/JMCX40rc6PNrcMzWzHoQjqv6b1SNjCDF9urg7P7e89h3P/km3upgT83A1XqtjAWAF8/NXaRdTKEcxHTzvUg0X/3B3pTbqBPE6NPXDsDOyo/ehwSaH8V5uDtzAnFhjS74ak7q+Ck5VASNHeckp+CdPTwQaWbTOEbFm6RN8ni0/lszLMsha9T5B/lVy++fU68j/qa2VeFHLR9uemh5dFVoy1KlT5pfC+C6xqFc1NtAl9yTrDPwRrn0dZmep2dgT2AKvW15LSoj2mF2pqDd7hNlRBZ956Wzgi9e09pVFdc+iGYnpmq+ir8u3iIWW+ClmtL47R4bRWzy9vhS4HhHsK9s3/37CpMJIos4YaIw0C+lsKmKL1+UylujqMTZKUQnEKSmKigSvcjSMwqqQio93ejZCAqOEFVLSypMhF3qOL1ZhRocPdtFQEhuDC6p9e3b/LqVr0udtW4MPuqM8hluIOG3ySUicenpm/NdttaailkiViQrypZzXpvyvtGyMfZy1FSKuhlGXPoWaOeIxLk3b0KozPPBjwacbF9E2gW9rMYzU8MuJK14fbT46KXf40JYKp7J1czd+cZUu5trRj6SYWSdM9GfPX6hz7Fp7eNc64C5moq71rUutlaBQ0FDBq62xz9rrqmYsw7IXfskzaHvwniOpiNUijc6+Wk118xbawoStjcNe0Hx6pVClXfWesZX41IvkkhR3FSjqq89v8SbNuYlmw0FArk80NCvnYRn8Vh4XF6ab6ZeBJHH5KOIwD4swRJoXFMA5xuZCSoiLM/gGAy92RD76zvd6r5L21z30bZcgAz+/fcgblDBs8jgwxdxSMS2aDQf88eulCA9o1fdnIEPgwGqC7GgoKdPI44lF17tASpXj7U8152ntjaZMmPVJnW+d/LZMunKRzWpHv+rRln36716o3hkKNnJVUHjUZUeXpMFhQhQ12BLsHbSX2uI0L/99WqbcoznrJYIJwinAlwjjQhvLLJsU5yXKfMJeF5pRiyCm5vhNItGqgjxzkfK5LBeVwQdhg4VyQ8zY5v1UlER54qZcRtEMmaGm/xG4t+HhDCzwbsik2YlMxXJFSytvBf5KCk84GD3NkgwxWxVlQIy3WaicaK8sbykpLikvrF+6KUBQvGFQIFf0BQHKBTNlCalUnDCwB4goO07dVQCMHGLqsWWj3oIaLQQb+zsLcJrOKGmJgFOhMuCEzLLbscjZkKHDykDN1JogQFdt6JNBDR0XcIVED0u3sKOc3b1nSdhpHlf15n/RiMJso1Y78Z9RtdktOFFahgIqNzNNSCKHWVaY+qd6g9MNRtRMkEq4Z1xNeQlPeIDrbq8Ysw2NpkAUGPC5CsTtsnc5KoEuKYSiqs2edWPV5Kq502VZmXmzypEs7JMJyL6aUKuFxgWEu3Qah1HVjiQHB0vqzif51UwGjGWhje7vGg/IJs9rynw0sTGXTY3PIZj552vkMV7FVw2w6eNrT/rVHSGW//5n2WadLd0PLMjXvbLtIKm4B0wIHJpXKKBb62h5nwcJV7Wn443v0wJk908u5/TL4uHNIVwYxfPu/WQNtfFKZodcR08kf5EFjHD7AjueS/b7jCnpkBjE2sw+QGey4quAAqQyQLShDpDTxvUjc4l2jB+Y0K1Aid5lOGQYVTxyeLEj2htNHf55OU54yHjWO9J43n8X0GPlrl0HukRyqNzQdXxYUyl1aroqtfaIZsiNJGrpGctzWpDBjejQOAkGTLl//nO4F9/Dfms4MQOKNM9HJLotJmBj3EzNSUs/qzOVdObYTAAr4SkZyqID+SvQbnMlhAsupf5qB/JjeGGro9p3e/uFHoFS/H8u8TBGbpnUja6F6dX4brhuFotyufNx0g3pMgrDZgpO6oPODzYc8AHOLFODjOG1WoydclkqKen1SdPCwOQiohSflRJUQJ+CFyqUnNPI+pR+GDvqIv2RYL9eRGi/vjfMKJGCkJ43F6N83G3+mmite7ZNad6ZHISgVlvuQYkCAR+9mfS37lZkTP/fm9p/QlgE7sgxgUSiyEXDZlsF+iRDR39iKNTg+g4MYkvyqazURdIIgYuGmNmq86ef8fzgJ4QIesR/2E86JFNpqmIJWbZ29sCh5KLUU8jJZGRT6kW7y0pihYlifrxxEz8x/7pH0/6cnyFY/f2aw4MlvKFXvu+x8UQINfgEDfgCioDuT4U17pDQpZdkRXPFS+dpw6Ebkb5qNwmdnQEtTVhI12BQlRO4m+vtmftUP1DWBaWZNWNbsu7VwV4dWZ1ZsCqbpS3a9PoaCgAGsrkoXJGgLBr1CINTcjpIfEYPFJPZQfs6bqB4E6GkPeRI95Qu0G2fjvkffQu4aZdF4mBy8rgmHY9VmC7Dybb4b9YRNENJN2tq1PRIzGVrLsor+LvtajHAvb7LomltvsCYZy+y3U7VuuD/j61zWnmyNTUMICA+tqd7Ump0n1uXBtHDOn78KEP6UVKIAE87oNzTGVuW/yHlvTzvVNrvYRV4Mx3bhZn/WsFfpurwHapRdYwI5o5HFV5obT6Il9NCL3Cmx3jmzZl5rUQVUWFhIM/Qg+5tWDRzAlRUoYdx/5axGlb9xbGSW3L+y/Nt682ETuP2Js6lwtHgIjUsVdiOvHP4yYiPq22i3DQ5DZgIoUzYn+nGT2nbCx+rOzXgem30eTtzmbLX8y54wkSWHv43Z9o8cf2BYM+NsyZ4mUu6gANq+ubTEjBW5rbazaiXGnvdv2HW15tmdvyCOiOXcb8XXxjM+wN643JNaGP19deMdAzIys2/Ayurf/9hNP00EPldMqOE0/gQrhn+VM3PhRc3iPPd7scAjc9e3/DyigSv6h/C0QXLX7/7QTr8m3q31bIPVnAMOAey0n9gdiQ6t3SpmAq1q4Vdpfe/HaxY2z18tCOxcVm+ndIEeCb5ua/3N47r7hwZdbdtZ8N4EpyDM5UVysoiprqHOoZ3vXiiIjbid9XRLJZ0qOfYsifY+R75gzFjqLIDg358aAODD7Zp8lsal9txclUGPlHc9L3wjz9r0Es2hngWLVz6/FY4WD3uk1DoZ7rkhuj2eWs6EbroKvXvloNVxFy4WXCuSP36tXt8LWrTQCBgmLntSd45detAzoqo9tIFaS26MoBN/hAbl4YdADKy/P+uLC83ANwGJybC1YKd5EWO7CORdRAx3m/rZKGGPaIDoPDkdcu3unZHBNp1bYcaRNFaiPtBA1jHKgoqDvQqHa2cNaMgoozUxRTrEYEbO5QUhYKP6ys4V55PNij3rbxC3vK6oeshYU4ajXF/tSxTT3Y8/gKd2XNh8KUherVoFAXBYH9tFwcFVEALzQE/gaAjdqGOG+fNhJe3F/iS6To6WC4u3qxVxA5ADsehBR4O3RIYanNFcQXZBeAa+TbPFvun6C2PJBcPOldJCv0QO90n1cA271It4Ig3OIYjrj8VZlUfpA0f4cZUly6H4RsDzdO50sca1t6Lb4UvW68ObjYL0ihbmW/wna3BABcaVMHDob4vyDSnwZb7v22iTofZWEuqM3wystEcyJDcG9ciZfk/ei44UgOzd1AHfw7TjnVtn0PgpDdl554D9n8PwHXAz98Jbn7Q6jj/6b714FzP/7dp2TicMSbP/aOBX/3p3FwSax3bjsisbWzFPkIJ3N5fF8E6f5nP77y+IgrsLMun2WgUXNgy9W5CW18jj6ITo77aI5PAfOzaF70mZr0zKhZY04pm9fUSmdPrTX21daq/cGdCQdARBnAitNTw6hbTYZ9q9moRymbX7Uy7Vdro4GorQvIPGJnIXak16/AKYK93C15LpGH9fXa9xfmnp08dyR7/0EanbPHrZz3y58oEBx3aOt8Uo02Ci/27C0NObOtwl/wukuq9WO/LSpvDTvPy8PrV+AUwV7u5zeT5xK/WF9T//wvzD07KZly8+Z/kEY/3R53BwDlUxagKdsyuK3zSQMr2uNo4cWeAws5LrGt+dW+4HWXINz6sQ+uFkHlrv74onJS+KaN/lPgtwENaURjmtCUZsSIozmBeBJIJElWVE03TMt2XM8PwihO0iwvyqpu2q5fLFeCratIEZZN6JQcDysFsIks19GFIGhtujh/vTkJz281Ge9EB5+5YfQJ/oowcrNVC4qawLfyU9qb8gLZpkFW8tgEZCgMAulU6mZ2YRKCQKqN2hDdyjKS4sgDTUKuz7hjTIRh3XI3GVFNpiveCytF8k6Jy8ASICOWwVTmqbrWbu/1mIUFYyWvXfBSe85bYuWD0Jx0wp0bnPg01MQFY4Pqh4NN864MLbmF07r3tEYwjXswSguelepGecvA+tSr+U9nMr3VCg2V5cOiOnkA') format('woff2')}.l-icon-error:before{content:"\e605"}.l-icon-duihao:before{content:"\e63c"}.l-icon-video:before{content:"\e609"}.l-icon-fork:before{content:"\e632"}.l-icon-address:before{content:"\e606"}.l-icon-backward:before{content:"\e607"}.l-icon-add:before{content:"\e608"}.l-icon-cart:before{content:"\e60a"}.l-icon-close:before{content:"\e60b"}.l-icon-checked:before{content:"\e60c"}.l-icon-comment:before{content:"\e60d"}.l-icon-down:before{content:"\e60e"}.l-icon-customer-service:before{content:"\e60f"}.l-icon-delete:before{content:"\e610"}.l-icon-edit:before{content:"\e611"}.l-icon-download:before{content:"\e612"}.l-icon-ellipsis:before{content:"\e613"}.l-icon-favor:before{content:"\e614"}.l-icon-favor-fill:before{content:"\e631"}.l-icon-forward:before{content:"\e615"}.l-icon-help:before{content:"\e616"}.l-icon-eye:before{content:"\e617"}.l-icon-history:before{content:"\e618"}.l-icon-left:before{content:"\e619"}.l-icon-like:before{content:"\e61a"}.l-icon-notification:before{content:"\e61b"}.l-icon-order:before{content:"\e61c"}.l-icon-loading:before{content:"\e61d"}.l-icon-password:before{content:"\e61e"}.l-icon-more:before{content:"\e61f"}.l-icon-picture:before{content:"\e620"}.l-icon-pull-down:before{content:"\e621"}.l-icon-right:before{content:"\e622"}.l-icon-research:before{content:"\e623"}.l-icon-phone:before{content:"\e624"}.l-icon-setting:before{content:"\e625"}.l-icon-scan:before{content:"\e626"}.l-icon-share:before{content:"\e627"}.l-icon-success:before{content:"\e628"}.l-icon-soud:before{content:"\e629"}.l-icon-time:before{content:"\e62a"}.l-icon-warning:before{content:"\e62b"}.l-icon-to-top:before{content:"\e62c"}.l-icon-up:before{content:"\e62d"}.l-icon-WiFi:before{content:"\e62e"}.l-icon-user:before{content:"\e62f"} \ No newline at end of file diff --git a/dist/image-clipper-tools/index.js b/dist/image-clipper-tools/index.js deleted file mode 100644 index 5d71273c..00000000 --- a/dist/image-clipper-tools/index.js +++ /dev/null @@ -1 +0,0 @@ -Component({relations:{"../image-clipper/index":{type:"parent"}},externalClasses:["l-class"],properties:{zIndex:{type:Number,value:999},lockWidth:{type:Boolean,value:!1},lockHeight:{type:Boolean,value:!1},lockRatio:{type:Boolean,value:!1},disableScale:{type:Number,value:!1},disableRotate:{type:Number,value:!1},limitMove:{type:Boolean,value:!1}},data:{formColor:"#3963bc",lockWidthValue:!1,lockHeightValue:!1,lockRatioValue:!0,disableScaleValue:!1,disableRotateValue:!1,limitMoveValue:!1},methods:{bindSwitchChange:async function(e){const a=e.detail.value,l=e.currentTarget.dataset.type;let t=this.getRelationNodes("../image-clipper/index")[0];await t.setData({[l]:a})}}}); \ No newline at end of file diff --git a/dist/image-clipper-tools/index.json b/dist/image-clipper-tools/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/image-clipper-tools/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/image-clipper-tools/index.wxml b/dist/image-clipper-tools/index.wxml deleted file mode 100644 index f05a22fb..00000000 --- a/dist/image-clipper-tools/index.wxml +++ /dev/null @@ -1,28 +0,0 @@ - - - - 锁定裁剪框宽 - - - - 锁定裁剪框高 - - - - 锁定裁剪框比例 - - - - 限制移动范围 - - - - 禁止缩放 - - - - 禁止旋转 - - - - \ No newline at end of file diff --git a/dist/image-clipper-tools/index.wxss b/dist/image-clipper-tools/index.wxss deleted file mode 100644 index 4ccdd4ed..00000000 --- a/dist/image-clipper-tools/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.tools-container{width:100%;padding:20rpx 40rpx;box-sizing:border-box}.tools-container .tools-form{margin-top:20rpx;display:flex;flex-wrap:wrap;color:#fff}.tools-container .tools-form .slider-wrapper{display:flex;align-items:center}.tools-container .tools-form .tools-switch{transform:scale(.7)} \ No newline at end of file diff --git a/dist/image-clipper/calculate.js b/dist/image-clipper/calculate.js deleted file mode 100644 index d90383cc..00000000 --- a/dist/image-clipper/calculate.js +++ /dev/null @@ -1 +0,0 @@ -export function determineDirection(t,e,i,c,h,a){let n;const r=[t+i/2,e+c/2],l=[h,a];return l[0]<=r[0]&&l[1]<=r[1]?n=3:l[0]>=r[0]&&l[1]<=r[1]?n=2:l[0]<=r[0]&&l[1]>=r[1]?n=4:l[0]>=r[0]&&l[1]>=r[1]&&(n=1),n}export function calcImageOffset(t,e){let i=t.imageLeft,c=t.imageTop;e=e||t.scale;let h=t.imageWidth,a=t.imageHeight;t.angle/90%2&&(h=t.imageHeight,a=t.imageWidth);const{cutX:n,clipWidth:r,cutY:l,clipHeight:o}=t,g=t=>t*e/2,u=g(h),d=g(a);return i=n+u>=i?i:n+u,i=n+r-u<=i?i:n+r-u,c=l+d>=c?c:l+d,c=l+o-d<=c?c:l+o-d,{left:i,top:c,scale:e}}export function calcImageScale(t,e){e=e||t.scale;let i=t.imageWidth,c=t.imageHeight;return t.angle/90%2&&(i=t.imageHeight,c=t.imageWidth),i*e(i.clipWidth||i.width)/(i.clipWidth||i.height)?(h=i.clipHeight||i.height,c=t/e*h):(c=i.clipWidth||i.width,h=e/t*c);else{c=(i._SYS_INFO||wx.getSystemInfoSync()).windowWidth,h=0}return{imageWidth:c,imageHeight:h}}export function calcPythagoreanTheorem(t,e){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}export function clipTouchMoveOfCalculate(t,e){const i=e.touches[0].clientX,c=e.touches[0].clientY,{clipWidth:h,clipHeight:a,cutY:n,cutX:r,_CUT_START:l,lockRatio:o}=t;let{maxWidth:g,minWidth:u,maxHeight:d,minHeight:p}=t;g/=2,u/=2,p/=2,d/=2;let m=h,f=a,s=n,x=r,w=()=>{m=m<=g?m>=u?m:u:g,f=f<=d?f>=p?f:p:d},W=()=>(m>g||md||f1&&l.corner<4?1:-1)*(l.y-c),l.corner){case 1:if(m=l.width-l.x+i,o&&(f=m/(h/a)),!W())return;break;case 2:if(m=l.width-l.x+i,o&&(f=m/(h/a)),!W())return;s=l.cutY-(f-l.height);break;case 3:if(m=l.width+l.x-i,o&&(f=m/(h/a)),!W())return;s=l.cutY-(f-l.height),x=l.cutX-(m-l.width);break;case 4:if(m=l.width+l.x-i,o&&(f=m/(h/a)),!W())return;x=l.cutX-(m-l.width)}return{width:m,height:f,cutX:x,cutY:s}}export function imageTouchMoveOfCalcOffset(t,e,i){return{left:e-t._touchRelative[0].x,top:i-t._touchRelative[0].y}} \ No newline at end of file diff --git a/dist/image-clipper/images/close.png b/dist/image-clipper/images/close.png deleted file mode 100755 index a1c6c99c..00000000 Binary files a/dist/image-clipper/images/close.png and /dev/null differ diff --git a/dist/image-clipper/images/photo.png b/dist/image-clipper/images/photo.png deleted file mode 100755 index 80928c3b..00000000 Binary files a/dist/image-clipper/images/photo.png and /dev/null differ diff --git a/dist/image-clipper/images/rotate-along.png b/dist/image-clipper/images/rotate-along.png deleted file mode 100755 index 7c51905d..00000000 Binary files a/dist/image-clipper/images/rotate-along.png and /dev/null differ diff --git a/dist/image-clipper/images/rotate-inverse.png b/dist/image-clipper/images/rotate-inverse.png deleted file mode 100755 index ec77b6b5..00000000 Binary files a/dist/image-clipper/images/rotate-inverse.png and /dev/null differ diff --git a/dist/image-clipper/images/sure.png b/dist/image-clipper/images/sure.png deleted file mode 100755 index 05f59556..00000000 Binary files a/dist/image-clipper/images/sure.png and /dev/null differ diff --git a/dist/image-clipper/index.js b/dist/image-clipper/index.js deleted file mode 100644 index acd9a2fe..00000000 --- a/dist/image-clipper/index.js +++ /dev/null @@ -1 +0,0 @@ -import dataUtil from"../core/utils/data-util";import eventUtil from"../core/utils/event-util";import{determineDirection,calcImageOffset,calcImageScale,calcImageSize,calcPythagoreanTheorem,clipTouchMoveOfCalculate,imageTouchMoveOfCalcOffset}from"./calculate";const detail=!0,IMAGE_TYPE={base64:"base64",url:"url"};Component({externalClasses:["l-class"],relations:{"../image-clipper-tools/index":{type:"child"}},options:{pureDataPattern:/^_/},properties:{show:{type:Boolean,value:!1},zIndex:{type:Number,value:99},imageUrl:{type:String},type:{type:String,options:["url","base64"],value:"url"},quality:{type:Number,value:1},width:{type:Number,value:400},height:{type:Number,value:400},minWidth:{type:Number,value:200},maxWidth:{type:Number,value:600},minHeight:{type:Number,value:200},maxHeight:{type:Number,value:600},lockWidth:{type:Boolean,value:!1},lockHeight:{type:Boolean,value:!1},lockRatio:{type:Boolean,value:!0},scaleRatio:{type:Number,value:1},minRatio:{type:Number,value:.5},maxRatio:{type:Number,value:2},disableScale:{type:Number,value:!1},disableRotate:{type:Number,value:!1},limitMove:{type:Boolean,value:!1},checkImage:{type:Boolean,value:!0},checkImageIcon:{type:String,value:"./images/photo.png"},rotateAlong:{type:Boolean,value:!0},rotateAlongIcon:{type:String,value:"./images/rotate-along.png"},rotateInverse:{type:Boolean,value:!0},rotateInverseIcon:{type:String,value:"./images/rotate-inverse.png"},sure:{type:Boolean,value:!0},sureIcon:{type:String,value:"./images/sure.png"},close:{type:Boolean,value:!0},closeIcon:{type:String,value:"./images/close.png"},rotateAngle:{type:Number,value:90}},data:{CANVAS_WIDTH:0,CANVAS_HEIGHT:0,cutX:0,cutY:0,clipWidth:0,clipHeight:0,cutAnimation:!1,imageWidth:0,imageHeight:0,imageTop:0,imageLeft:0,scale:1,angle:0,_SYS_INFO:{},_MOVE_THROTTLE:null,_MOVE_THROTTLE_FLAG:!0,_TIME_CUT_CENTER:null,_flagCutTouch:!1,_flagEndTouch:!1,_CUT_START:{},_cutAnimationTime:null,_touchRelative:[{x:0,y:0}],_hypotenuseLength:0,_ctx:null},observers:{imageUrl(t){t&&(this.imageReset(),wx.showLoading({title:"请稍候...",mask:!0}),wx.getImageInfo({src:t,success:t=>{this.imgComputeSize(t.width,t.height),this.properties.limitMove&&(this.imgMarginDetectionScale(),eventUtil.emit(this,"linimageready",t))},fail:()=>{this.imgComputeSize(),this.properties.limitMove&&this.imgMarginDetectionScale()}}))},"clipWidth, clipHeight"(t,e){let{minWidth:i,minHeight:a}=this.data;i/=2,a/=2,t{dataUtil.setDiffData(this,{cutAnimation:!1})},260);dataUtil.setDiffData(this,{_cutAnimationTime:t})}},limitMove(t){t&&(this.data.angle%90&&dataUtil.setDiffData(this,{angle:90*Math.round(this.data.angle/90)}),this.imgMarginDetectionScale())},"cutY, cutX"(){this.cutDetectionPosition()},"width, height"(t,e){t!==this.width&&dataUtil.setDiffData(this,{clipWidth:t/2}),e!==this.height&&dataUtil.setDiffData(this,{clipHeight:e/2})}},methods:{setCutInfo(){const{width:t,height:e}=this.properties,{_SYS_INFO:i}=this.data,a=t/2,s=e/2,o=(i.windowHeight-s)/2,h=(i.windowWidth-a)/2,l=i.windowWidth/2,n=i.windowHeight/2,c=wx.createCanvasContext("image-clipper",this);this.setData({clipWidth:a,clipHeight:s,cutX:h,cutY:o,CANVAS_HEIGHT:s,CANVAS_WIDTH:a,_ctx:c,imageLeft:l,imageTop:n})},setCutCenter(){const{sysInfo:t,clipHeight:e,clipWidth:i,imageTop:a,imageLeft:s}=this.data;let o=t||wx.getSystemInfoSync(),h=.5*(o.windowHeight-e),l=.5*(o.windowWidth-i);this.setData({imageTop:a-this.data.cutY+h,imageLeft:s-this.data.cutX+l,cutY:h,cutX:l})},clipTouchStart(t){if(!this.properties.imageUrl)return void wx.showToast({title:"请选择图片",icon:"none"});const e=t.touches[0].clientX,i=t.touches[0].clientY,{cutX:a,cutY:s,clipWidth:o,clipHeight:h}=this.data,l=determineDirection(a,s,o,h,e,i);this.moveDuring();const n={width:o,height:h,x:e,y:i,cutY:s,cutX:a,corner:l};this.setData({_flagCutTouch:!0,_flagEndTouch:!0,_CUT_START:n})},clipTouchMove(t){if(!this.properties.imageUrl)return void wx.showToast({title:"请选择图片",icon:"none"});if(1!==t.touches.length)return;const{_flagCutTouch:e,_MOVE_THROTTLE_FLAG:i}=this.data;if(e&&i){const{lockRatio:e,lockHeight:i,lockWidth:a}=this.properties;if(e&&(a||i))return;dataUtil.setDiffData(this,{_MOVE_THROTTLE_FLAG:!1}),this.moveThrottle();const s=clipTouchMoveOfCalculate(this.data,t);if(s){const{width:t,height:e,cutX:o,cutY:h}=s;a||i?a?i||dataUtil.setDiffData(this,{clipHeight:e,cutY:h}):dataUtil.setDiffData(this,{clipWidth:t,cutX:o}):dataUtil.setDiffData(this,{clipWidth:t,clipHeight:e,cutX:o,cutY:h}),this.imgMarginDetectionScale()}}},clipTouchEnd(){this.moveStop(),this.setData({_flagCutTouch:!1})},moveDuring(){clearTimeout(this.data._TIME_CUT_CENTER)},moveStop(){clearTimeout(this.data._TIME_CUT_CENTER);const t=setTimeout(()=>{this.data.cutAnimation||dataUtil.setDiffData(this,{cutAnimation:!0}),this.setCutCenter()},800);dataUtil.setDiffData(this,{_TIME_CUT_CENTER:t})},moveThrottle(){if("android"===this.data._SYS_INFO.platform){clearTimeout(this.data._MOVE_THROTTLE);const t=setTimeout(()=>{dataUtil.setDiffData(this,{_MOVE_THROTTLE_FLAG:!0})},20);dataUtil.setDiffData(this,{_MOVE_THROTTLE:t})}else dataUtil.setDiffData(this,{_MOVE_THROTTLE_FLAG:!0})},imageReset(){const t=this.data._SYS_INFO||wx.getSystemInfoSync();this.setData({scale:1,angle:0,imageTop:t.windowHeight/2,imageLeft:t.windowWidth/2})},imageLoad(){this.imageReset(),wx.hideLoading(),eventUtil.emit(this,"linimageload",!0)},imgComputeSize(t,e){const{imageWidth:i,imageHeight:a}=calcImageSize(t,e,this.data);this.setData({imageWidth:i,imageHeight:a})},imgMarginDetectionScale(t){if(!this.properties.limitMove)return;const e=calcImageScale(this.data,t);this.imgMarginDetectionPosition(e)},imgMarginDetectionPosition(t){if(!this.properties.limitMove)return;const{scale:e,left:i,top:a}=calcImageOffset(this.data,t);dataUtil.setDiffData(this,{imageLeft:i,imageTop:a,scale:e})},imageTouchStart(t){this.setData({_flagEndTouch:!1});const{imageLeft:e,imageTop:i}=this.data,a=t.touches[0].clientX,s=t.touches[0].clientY;let o=[];if(1===t.touches.length)o[0]={x:a-e,y:s-i},this.setData({_touchRelative:o});else{const h=t.touches[1].clientX,l=t.touches[1].clientY;let n=Math.abs(a-h),c=Math.abs(s-l);const u=calcPythagoreanTheorem(n,c);o=[{x:a-e,y:s-i},{x:h-e,y:l-i}],this.setData({_touchRelative:o,_hypotenuseLength:u})}},imageTouchMove(t){const{_flagEndTouch:e,_MOVE_THROTTLE_FLAG:i}=this.data;if(e||!i)return;const a=t.touches[0].clientX,s=t.touches[0].clientY;if(dataUtil.setDiffData(this,{_MOVE_THROTTLE_FLAG:!1}),this.moveThrottle(),this.moveDuring(),1===t.touches.length){const{left:t,top:e}=imageTouchMoveOfCalcOffset(this.data,a,s);dataUtil.setDiffData(this,{imageLeft:t,imageTop:e}),this.imgMarginDetectionPosition()}else{const e=t.touches[1].clientX,i=t.touches[1].clientY;let o=Math.abs(a-e),h=Math.abs(s-i),l=calcPythagoreanTheorem(o,h),n=this.data.scale*(l/this.data._hypotenuseLength);this.properties.disableScale?n=1:(n=n<=this.properties.minRatio?this.properties.minRatio:n,n=n>=this.properties.maxRatio?this.properties.maxRatio:n,eventUtil.emit(this,"linsizechange",{imageWidth:this.data.imageWidth*n,imageHeight:this.data.imageHeight*n})),this.imgMarginDetectionScale(n),dataUtil.setDiffData(this,{_hypotenuseLength:Math.sqrt(Math.pow(o,2)+Math.pow(h,2)),scale:n})}},imageTouchEnd(){dataUtil.setDiffData(this,{_flagEndTouch:!0}),this.moveStop()},cutDetectionPosition(){const{cutX:t,cutY:e,_SYS_INFO:i,clipHeight:a,clipWidth:s}=this.data;let o=()=>{e<0&&dataUtil.setDiffData(this,{cutY:0}),e>i.windowHeight-a&&dataUtil.setDiffData(this,{cutY:i.windowHeight-a})},h=()=>{t<0&&dataUtil.setDiffData(this,{cutX:0}),t>i.windowWidth-s&&dataUtil.setDiffData(this,{cutX:i.windowWidth-s})};if(null===e&&null===t){let t=.5*(i.windowHeight-a),e=.5*(i.windowWidth-s);dataUtil.setDiffData(this,{cutX:e,cutY:t})}else null!==e&&null!==t?(o(),h()):null!==e&&null===t?(o(),dataUtil.setDiffData(this,{cutX:(i.windowWidth-s)/2})):null===e&&null!==t&&(h(),dataUtil.setDiffData(this,{cutY:(i.windowHeight-a)/2}))},computeCutSize(){const{clipHeight:t,clipWidth:e,_SYS_INFO:i,cutX:a,cutY:s}=this.data;e>i.windowWidth?dataUtil.setDiffData(this,{clipWidth:i.windowWidth}):e+a>i.windowWidth&&dataUtil.setDiffData(this,{cutX:i.windowWidth-a}),t>i.windowHeight?dataUtil.setDiffData(this,{clipHeight:i.windowHeight}):t+s>i.windowHeight&&dataUtil.setDiffData(this,{cutY:i.windowHeight-s})},getImageData(){if(!this.properties.imageUrl)return void wx.showToast({title:"请选择图片",icon:"none"});wx.showLoading({title:"加载中"});const{clipHeight:t,clipWidth:e,_ctx:i,scale:a,imageLeft:s,imageTop:o,cutX:h,cutY:l,angle:n}=this.data;let{CANVAS_HEIGHT:c,CANVAS_WIDTH:u}=this.data;const{scaleRatio:g,imageUrl:r,quality:d,type:m}=this.properties,p=()=>{const c=this.data.imageWidth*a*g,u=this.data.imageHeight*a*g,p=s-h,f=o-l;i.translate(p*g,f*g),i.rotate(n*Math.PI/180),i.drawImage(r,-c/2,-u/2,c,u),i.draw(!1,()=>{let i={width:e*g,height:Math.round(t*g),destWidth:e*g,destHeight:Math.round(t)*g,fileType:"png",quality:d},a={url:"",base64:"",width:e*g,height:t*g};IMAGE_TYPE.base64===m?wx.canvasGetImageData({canvasId:"image-clipper",x:0,y:0,width:e*g,height:Math.round(t*g),success:t=>{const e=new Uint8Array(t.data),i=wx.arrayBufferToBase64(e);a.url=i,a.base64=i,wx.hideLoading(),eventUtil.emit(this,"linclip",a)}}):wx.canvasToTempFilePath({...i,canvasId:"image-clipper",success:t=>{a.url=t.tempFilePath,a.base64=t.tempFilePath,wx.hideLoading(),eventUtil.emit(this,"linclip",a)},fail(t){throw t}},this)})};u!==e||c!==t?(u=e,c=t,i.draw(),setTimeout(()=>{p()},100)):p()},uploadImage(){wx.chooseImage({count:1,sizeType:["original","compressed"],sourceType:["album","camera"],success:t=>{const e=t.tempFilePaths;this.setData({imageUrl:e})}})},rotate(t){if(this.properties.disableRotate)return;if(!this.properties.imageUrl)return void wx.showToast({title:"请选择图片",icon:"none"});const{rotateAngle:e}=this.properties,i=this.data.angle;"along"===t.currentTarget.dataset.type?this.setData({angle:i+e}):this.setData({angle:i-e}),eventUtil.emit(this,"linrotate",{currentDeg:this.data.angle})},close(){this.setData({show:!1})},doNothing(){}},lifetimes:{ready(){const t=wx.getSystemInfoSync();this.setData({_SYS_INFO:t}),this.setCutInfo(),this.setCutCenter(),this.computeCutSize(),this.cutDetectionPosition()}}}); \ No newline at end of file diff --git a/dist/image-clipper/index.json b/dist/image-clipper/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/image-clipper/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/image-clipper/index.wxml b/dist/image-clipper/index.wxml deleted file mode 100644 index 44fa6001..00000000 --- a/dist/image-clipper/index.wxml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/dist/image-clipper/index.wxss b/dist/image-clipper/index.wxss deleted file mode 100644 index bed0533e..00000000 --- a/dist/image-clipper/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.container{width:100vw;height:100vh;background-color:rgba(0,0,0,.6);position:fixed;top:0;left:0;z-index:1}.container .clip-wrapper{position:absolute;width:100vw;height:100vh}.container .clip-wrapper .clip-content{width:100vw;height:100vh;position:absolute;z-index:99;display:flex;flex-direction:column;pointer-events:none}.container .clip-wrapper .clip-content .flex-auto{flex:auto}.container .clip-wrapper .clip-content .clip-content-footer,.container .clip-wrapper .clip-content .clip-content-top{width:100%;pointer-events:none}.container .clip-wrapper .clip-content .clip-content-middle{width:100%;height:400rpx;display:flex;box-sizing:border-box}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-left,.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-right{height:100%}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-center{position:relative;border:1px solid;box-sizing:border-box}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-center .clip-edge{position:absolute;left:6rpx;width:34rpx;height:34rpx;border:2rpx solid #fff;pointer-events:auto;box-sizing:border-box}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-center .clip-edge.clip-edge-top-left{border-bottom-width:0!important;border-right-width:0!important}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-center .clip-edge.clip-edge-top-right{border-bottom-width:0!important;border-left-width:0!important}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-center .clip-edge.clip-edge-bottom-left{border-top-width:0!important;border-right-width:0!important}.container .clip-wrapper .clip-content .clip-content-middle .clip-content-middle-center .clip-edge.clip-edge-bottom-right{border-top-width:0!important;border-left-width:0!important}.container .clip-wrapper .bg-transparent{background-color:rgba(0,0,0,.6);transition-duration:.35s}.container .cropper-image{width:100%;border-style:none;position:absolute;top:0;left:0;z-index:2;-webkit-backface-visibility:hidden;backface-visibility:hidden;transform-origin:center}.container .clipper-canvas{position:fixed;z-index:10;left:-2000px;top:-2000px;pointer-events:none}.container .footer-tools{position:absolute;left:0;bottom:0;width:100%;z-index:99}.container .footer-tools .tools-icon{display:flex;align-items:center;justify-content:space-between;width:100%;padding:20rpx 40rpx;box-sizing:border-box}.container .footer-tools .tools-icon-image{display:block;width:50rpx;height:50rpx} \ No newline at end of file diff --git a/dist/image-picker/image/add.png b/dist/image-picker/image/add.png deleted file mode 100644 index 8b5dc492..00000000 Binary files a/dist/image-picker/image/add.png and /dev/null differ diff --git a/dist/image-picker/index.js b/dist/image-picker/index.js deleted file mode 100644 index a07d3508..00000000 --- a/dist/image-picker/index.js +++ /dev/null @@ -1 +0,0 @@ -import validator from"../behaviors/validator";Component({externalClasses:["l-class","l-item-class"],behaviors:["wx://form-field",validator],properties:{urls:{type:Array,value:[]},count:{type:[String,Number],value:9},clear:{type:Boolean,value:!1,observer:function(e){e&&this.handleClear()}},size:{type:[String,Number],value:3,options:[3,4,"3","4"]},sizeType:{type:String,value:"original",options:["original","compressed"]},mode:{type:String,value:"aspectFit",options:["scaleToFill","aspectFit","aspectFill","widthFix","top","bottom","center","left","right","top left","top right","bottom left","bottom right"]},custom:{type:Boolean,value:!1},preview:{type:Boolean,value:!0},maxImageSize:{type:Number,value:1e7},cells:{type:Array,value:null}},data:{showBtn:!0,tempFilePath:""},lifetimes:{attached:function(){let e=this.judgeNewOrOld();null!==this.data.cells&&(e="new",this.setData({urls:this.data.cells})),this.setData({newOrOld:e})}},observers:{urls(){if(null===this.data.cells){let e=this.judgeNewOrOld();this.setData({newOrOld:e})}}},methods:{handleClear(){let e=this.data.urls;this.setData({urls:[],clear:!1,showBtn:!0});let t={all:e,current:e};this.triggerEvent("linclear",t,{})},onPreviewTap(e){const t=e.currentTarget.dataset.index,l=this.data.urls;let a="",s=[];const i=this.data.newOrOld;if("[object Object]"===Object.prototype.toString.call(this.data.cells)){const e=this.data.cells;a=e[t].url;for(let t=0;te.data.maxImageSize;const s=e.data.urls.concat(a);s.length===parseInt(e.data.count)&&e.setData({showBtn:!1}),e.setData({urls:s,value:s,tempFilePath:a});let i={current:a,all:s},r={};e.triggerEvent("linchange",i,r),e.triggerEvent("linpush",i,r);let n=[];for(let e=0;e0){let t={current:a,all:s,overSizeList:n};e.triggerEvent("linoversize",t,r)}}})},onDelTap(e){const t=e.currentTarget.dataset.index,l=this.data.urls,a=l[t],s=this.handleSplice(l,a);s.lengthe.filter(e=>e!==t),judgeNewOrOld:function(){const e=this.data.urls;return 0!==e.length&&"object"!=typeof e[0]?"old":"new"}}}); \ No newline at end of file diff --git a/dist/image-picker/index.json b/dist/image-picker/index.json deleted file mode 100644 index 19acd717..00000000 --- a/dist/image-picker/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index","l-grid-item":"../grid-item/index","l-grid":"../grid/index"}} \ No newline at end of file diff --git a/dist/image-picker/index.wxml b/dist/image-picker/index.wxml deleted file mode 100644 index 13e32026..00000000 --- a/dist/image-picker/index.wxml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/image-picker/index.wxss b/dist/image-picker/index.wxss deleted file mode 100644 index ea896986..00000000 --- a/dist/image-picker/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.item{position:relative}.close{position:absolute;right:10rpx;top:10rpx;height:40rpx;width:40rpx;border-radius:50%;background:rgba(0,0,0,.4);display:flex;flex-direction:row;align-items:center;justify-content:center;box-sizing:border-box;z-index:99}.add{height:220rpx;width:220rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.add-icon{height:100rpx;width:100rpx}.img{height:220rpx;width:220rpx;margin-bottom:10rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.min-img{height:160rpx;width:160rpx;margin-bottom:10rpx;border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.flex{border:1rpx solid #eee;border-radius:4rpx;display:flex;flex-direction:row;align-items:center;justify-content:center}.l-grid-item{padding:0!important} \ No newline at end of file diff --git a/dist/index-anchor/index.js b/dist/index-anchor/index.js deleted file mode 100644 index 426dc280..00000000 --- a/dist/index-anchor/index.js +++ /dev/null @@ -1 +0,0 @@ -import nodeUtil from"../core/utils/node-util";Component({externalClasses:["l-anchor-class"],options:{multipleSlots:!0,pureDataPattern:/^_/},relations:{"../index-list/index":{type:"parent"}},data:{anchorSlot:{height:-1},anchor:{height:0},anchorText:"",anchorStyle:"",anchorWrapperStyle:""},lifetimes:{attached(){this.parseAnchorSlotRect()}},methods:{async parseAnchorSlotRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor-slot");t?this.setData({"anchorSlot.height":t.height}):this.setData({"anchorSlot.height":0})},async parseAnchorRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".anchor");t&&this.setData({"anchor.height":t.height})},setFixed(t,e){const a=`\n position:fixed;\n top:${t}rpx;\n `,o=`height:${e}px;`;this.setData({anchorStyle:a,anchorWrapperStyle:o})},setRelative(t){const e=`\n position:relative;\n transform: translate3d(0, ${t}px, 0);\n `;this.setData({anchorStyle:e})},clearStyle(){this.setData({anchorStyle:"",anchorWrapperStyle:""})},isRelative(){return this.data.anchorStyle.indexOf("relative")>0},isFixed(){return this.data.anchorStyle.indexOf("fixed")>0}}}); \ No newline at end of file diff --git a/dist/index-anchor/index.json b/dist/index-anchor/index.json deleted file mode 100644 index 8d97f7de..00000000 --- a/dist/index-anchor/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-index-list":"../index-list/index"}} \ No newline at end of file diff --git a/dist/index-anchor/index.wxml b/dist/index-anchor/index.wxml deleted file mode 100644 index 44729cb1..00000000 --- a/dist/index-anchor/index.wxml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - {{anchorText}} - - - diff --git a/dist/index-anchor/index.wxss b/dist/index-anchor/index.wxss deleted file mode 100644 index 1b449e9e..00000000 --- a/dist/index-anchor/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.anchor-wrapper{width:100%}.anchor-wrapper .anchor{width:100%}.anchor-wrapper .anchor-default{width:100%;background-color:#f7f8fa;display:flex;align-items:center;padding:8rpx 0 8rpx 30rpx;font-size:26rpx;font-weight:700;color:#323132;box-sizing:border-box} \ No newline at end of file diff --git a/dist/index-list/index.js b/dist/index-list/index.js deleted file mode 100644 index 01e05040..00000000 --- a/dist/index-list/index.js +++ /dev/null @@ -1 +0,0 @@ -import nodeUtil from"../core/utils/node-util";import dataUtil from"../core/utils/data-util";import eventUtil from"../core/utils/event-util";import pixelUtil from"../core/utils/pixel-util";const defaultSidebarData=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];Component({externalClasses:["l-tip-class","l-tip-text-class","l-sidebar-class","l-selected-class","l-unselected-class","l-sidebar-item-class"],relations:{"../index-anchor/index":{type:"child"}},options:{multipleSlots:!0,pureDataPattern:/^_/},lifetimes:{attached(){this.init()}},properties:{isStick:{type:Boolean,value:!1},scrollTop:{type:Number,value:0},sidebarData:{type:Array,value:defaultSidebarData},showSidebar:{type:Boolean,value:!0},stickOffsetTop:{type:Number,value:0}},data:{_sidebar:{top:0,height:0,sidebarItemCenterPoints:[],isMoving:!1,sidebarItemRect:{}},_anchor:{anchorTopLocations:[],indexAnchorComponents:[],currentStickAnchorIndex:-1,anchorItemsHeight:[]},_stickOffsetTopPx:0,activeSidebarItem:0,tipTop:0,showTip:!1,tipHeight:0},observers:{scrollTop:function(t){this.setIndexListStyle(t)},stickOffsetTop:function(t){this.setData({_stickOffsetTopPx:pixelUtil.rpx2px(t)})}},methods:{async init(){await this.parseSidebarRect(),await this.parseSidebarItemRect(),await this.parseIndexAnchors(),this.parseAnchorRect(),wx.lin=wx.lin||{},wx.lin.setScrollTop=t=>{dataUtil.setDiffData(this,{scrollTop:t})}},async parseSidebarRect(){const t=await nodeUtil.getNodeRectFromComponent(this,".sidebar");this.setData({"_sidebar.height":t.height,"_sidebar.top":t.top})},async parseSidebarItemRect(){const t=this.data.sidebarData.length,e=await nodeUtil.getNodeRectFromComponent(this,".sidebar-item"),i=this.data._sidebar.height/t,a=e.height,s=await nodeUtil.getNodeFieldsFromComponent(this,".sidebar-item",{computedStyle:["margin-top"]}),o=await nodeUtil.getNodeFieldsFromComponent(this,".tip",{computedStyle:["height"]}),n=[],r=s["margin-top"].replace("px","");for(let e=1;e<=t;e++)n.push((2*e-1)*a/2+e*parseInt(r));const h=parseInt(o.height.replace("px",""));this.setData({tipHeight:h,tipHeightOverflow:.205*h,"_sidebar.sidebarItemRect":e,"_sidebar.sidebarItemHeight":i,"_sidebar.sidebarItemRealHeight":a,"_sidebar.sidebarItemCenterPoints":n})},parseIndexAnchors(){const t=this.getRelationNodes("../index-anchor/index");if(t){this.setData({"_anchor.indexAnchorComponents":t});for(let e=0;e=n&&t+c<=h-r&&!o.isFixed()){o.setFixed(this.data.stickOffsetTop,r);for(let t=0;th-r&&t+ca-1&&(o=a-1);const n=this.data.sidebarData[o];dataUtil.setDiffData(this,{tipText:n,activeSidebarItem:o,tipTop:this.data._sidebar.sidebarItemCenterPoints[o]});let r=this.data._anchor.anchorTopLocations[o]-this.data._stickOffsetTopPx;wx.pageScrollTo({duration:0,scrollTop:r}),"tap"===t.type&&setTimeout(()=>{this.switchIsMovingSidebar(!1)},100),eventUtil.emit(this,"linselected",{index:o,tipText:n})},onTouchend(){setTimeout(()=>{this.switchTipShow(!1)},500),this.switchIsMovingSidebar(!1)},onTapSidebar(t){this.onTouchMove(t)}}}); \ No newline at end of file diff --git a/dist/index-list/index.json b/dist/index-list/index.json deleted file mode 100644 index 1450e2ec..00000000 --- a/dist/index-list/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{}} \ No newline at end of file diff --git a/dist/index-list/index.wxml b/dist/index-list/index.wxml deleted file mode 100644 index b2ca0a8a..00000000 --- a/dist/index-list/index.wxml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - {{sidebarItem}} - - - - - {{tipText}} - - - - - diff --git a/dist/index-list/index.wxss b/dist/index-list/index.wxss deleted file mode 100644 index aaecbd06..00000000 --- a/dist/index-list/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.index-list .sidebar{font-size:24rpx;position:fixed;right:30rpx;top:50%;transform:translateY(-50%);display:flex;flex-direction:column;align-items:center}.index-list .sidebar-item{width:40rpx;height:40rpx;border-radius:50%;display:flex;justify-content:center;align-items:center;margin-top:8rpx}.index-list .sidebar-item-active{color:#fff;background-color:#3963bc}.index-list .tip{width:90rpx;height:90rpx;background-color:#d8d8d8;border-radius:90px 90px 0;display:flex;justify-content:center;align-items:center;position:absolute;left:-160rpx;transform:rotate(-45deg) translateY(-35%)}.index-list .tip-text{font-size:30rpx;transform:rotate(45deg)} \ No newline at end of file diff --git a/dist/input/index.js b/dist/input/index.js deleted file mode 100644 index e8c56c8e..00000000 --- a/dist/input/index.js +++ /dev/null @@ -1 +0,0 @@ -import eventBus from"../core/utils/event-bus.js";import validator from"../behaviors/validator";import rules from"../behaviors/rules";Component({options:{multipleSlots:!0},behaviors:["wx://form-field",validator,rules],externalClasses:["l-class","l-label-class","l-error-text","l-error-text-class","l-input-class","l-row-class"],properties:{label:String,hideLabel:Boolean,labelCustom:Boolean,showRow:{type:Boolean,value:!0},required:Boolean,placeholder:String,type:{type:String,value:"text",options:["text","idcard","digit","password","number"]},value:String,colon:Boolean,focus:Boolean,clear:Boolean,maxlength:{type:Number,value:140},width:{type:Number,value:null},labelWidth:{type:Number,value:200},labelLayout:{type:String,value:"left",options:["left","right"]},disabled:Boolean,placeholderStyle:String,showEye:{type:Boolean,value:!1}},data:{},attached(){},methods:{handleInputChange(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),eventBus.emit("lin-form-change-"+this.id,this.id),this.triggerEvent("lininput",e.detail)},handleInputFocus(e){this.triggerEvent("linfocus",e.detail)},handleInputBlur(e){this.validatorData({[this.data.name]:e.detail.value}),eventBus.emit("lin-form-blur-"+this.id,this.id),this.triggerEvent("linblur",e.detail)},handleInputConfirm(e){const{detail:t={}}=e,{value:a=""}=t;this.setData({value:a}),this.triggerEvent("linconfirm",e.detail)},onClearTap(e){this.setData({value:""}),this.triggerEvent("linclear",e.detail)},getValues(){return this.data.value},reset(){this.setData({value:""})},onTapEyeIcon(){const e=this.data.type;"text"===e?this.setData({type:"password"}):"password"===e&&this.setData({type:"text"})}}}); \ No newline at end of file diff --git a/dist/input/index.json b/dist/input/index.json deleted file mode 100644 index a70bd9bb..00000000 --- a/dist/input/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index","l-error-tip":"../error-tip/index"}} \ No newline at end of file diff --git a/dist/input/index.wxml b/dist/input/index.wxml deleted file mode 100644 index 08a37f78..00000000 --- a/dist/input/index.wxml +++ /dev/null @@ -1,23 +0,0 @@ - - diff --git a/dist/input/index.wxss b/dist/input/index.wxss deleted file mode 100644 index 89c6970d..00000000 --- a/dist/input/index.wxss +++ /dev/null @@ -1 +0,0 @@ -.form-item{position:relative;font-size:28rpx;color:#333;height:88rpx;display:flex;flex-direction:row;align-items:center;padding-right:25rpx;box-sizing:border-box}.row{position:absolute;bottom:0;right:0;height:2rpx;width:730rpx;background:#f3f3f3}.text-require{color:#e23;vertical-align:middle}.form-label{display:flex;flex-direction:row;align-items:center;height:88rpx;padding-left:25rpx;padding-right:15rpx;box-sizing:border-box}.disabled{color:#9a9a9a!important}.mask{position:absolute;z-index:999;height:100%;width:100%}.form-label-right{justify-content:flex-end}.form-label-left{justify-content:flex-start}.input{height:100%;line-height:100%;flex:1}.close{height:36rpx;width:36rpx;background:#ddd;display:flex;flex-direction:row;align-items:center;justify-content:center;border-radius:50%;margin-right:20rpx}.pls-class{color:#9a9a9a}.hideLabel{padding-left:25rpx}.l-eye{padding:10rpx}.l-eye-text{color:#3963bc!important}.l-eye-password{color:rgba(57,99,188,.6)!important} \ No newline at end of file diff --git a/dist/list/index.js b/dist/list/index.js deleted file mode 100644 index f70ae4dd..00000000 --- a/dist/list/index.js +++ /dev/null @@ -1 +0,0 @@ -import hover from"../behaviors/hover";Component({behaviors:[hover],relations:{"../list/index":{type:"parent",linked(){},linkChanged(){},unlinked(){}}},options:{multipleSlots:!0},externalClasses:["l-class","l-class-icon","l-icon-class","l-class-image","l-image-class","l-class-right","l-right-class","l-class-content","l-content-class","l-class-desc","l-desc-class","l-link-icon-class"],properties:{icon:String,iconColor:{type:String,value:"#3963BC"},iconSize:{type:String,value:"28"},image:String,title:String,desc:String,tagPosition:{type:String,value:"left"},tagContent:String,tagShape:{type:String,value:"square"},tagColor:String,tagPlain:Boolean,badgePosition:{type:String,value:"left"},dotBadge:Boolean,badgeCount:Number,badgeMaxCount:{type:Number,value:99},badgeCountType:{type:String,value:"overflow"},rightDesc:String,gap:Number,leftGap:Number,rightGap:Number,isLink:{type:Boolean,value:!0},linkType:{type:String,value:"navigateTo"},url:String},methods:{tapcell:function(e){const{linkType:t,url:l}=e.currentTarget.dataset;l&&wx[t]({url:l}),this.triggerEvent("lintap",{e:e},{bubbles:!0,composed:!0})}}}); \ No newline at end of file diff --git a/dist/list/index.json b/dist/list/index.json deleted file mode 100644 index 32f4c753..00000000 --- a/dist/list/index.json +++ /dev/null @@ -1 +0,0 @@ -{"component":true,"usingComponents":{"l-icon":"../icon/index","l-badge":"../badge/index","l-tag":"../tag/index"} } \ No newline at end of file diff --git a/dist/list/index.wxml b/dist/list/index.wxml deleted file mode 100644 index ca412781..00000000 --- a/dist/list/index.wxml +++ /dev/null @@ -1,34 +0,0 @@ - - - -