迁移组件代码到npm

This commit is contained in:
2025-03-20 18:59:30 +08:00
parent 27025cecc4
commit 257eab643e
14 changed files with 42 additions and 14 deletions

View File

@ -66,7 +66,6 @@ Component({
}else{ }else{
heightStyle = `height:${this.properties.height*2}rpx` heightStyle = `height:${this.properties.height*2}rpx`
} }
console.log(heightStyle);
this.setData({ this.setData({
heightStyle:heightStyle heightStyle:heightStyle
}) })

View File

@ -1,9 +1,8 @@
<scroll-view scroll-y refresher-enabled bindrefresherrefresh="refreshList" <scroll-view scroll-y refresher-enabled bindrefresherrefresh="refreshList"
refresher-triggered="{{refresherTriggered}}" style="{{heightStyle}}" bindscroll="scrolling" refresher-triggered="{{refresherTriggered}}" style="{{heightStyle}}" enhanced
class="scroll-view" id="scrollView" enhanced show-scrollbar="{{false}}"> bindscroll="scrolling" class="scroll-view" id="scrollView" show-scrollbar="{{false}}">
<view class="scroll-view-top-margin"></view> <view class="scroll-view-top-margin"></view>
<slot/> <slot/>
<view class="load-more" wx:if="{{showLoadMore}}"> <view class="load-more" wx:if="{{showLoadMore}}">
<label class="text" wx:if="{{loadAll}}">{{loadMoreText}}</label> <label class="text" wx:if="{{loadAll}}">{{loadMoreText}}</label>
<label class="text" wx:else>加载中...</label> <label class="text" wx:else>加载中...</label>

View File

@ -21,4 +21,8 @@
width:100%;height:1rpx; width:100%;height:1rpx;
background-color: rgba(136, 136, 136, 0.25); background-color: rgba(136, 136, 136, 0.25);
z-index: -1; z-index: -1;
}
.scroll-view-top-margin{
height:1rpx;
} }

View File

@ -13,7 +13,7 @@
</view> </view>
<input wx:if="{{editable&&useInput}}" model:value="{{content}}" cursor-spacing="140px" <input wx:if="{{editable&&useInput}}" model:value="{{content}}" cursor-spacing="140px"
focus="{{show&&autoFocus}}" class="content-input" placeholder="{{contentPlaceholder}}"/> focus="{{show&&autoFocus}}" class="content-input" placeholder="{{contentPlaceholder}}"/>
<textarea class="content-textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:elif="{{editable}}" focus="{{show&&autoFocus}}" <textarea class="content-textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:elif="{{editable}}" focus="{{show&&autoFocus}}" disable-default-padding
placeholder="{{contentPlaceholder}}" focus="{{contentFocus}}" animation="{{contentAnimation}}" cursor-spacing="200rpx"></textarea> placeholder="{{contentPlaceholder}}" focus="{{contentFocus}}" animation="{{contentAnimation}}" cursor-spacing="200rpx"></textarea>
<view class="content-text" wx:else>{{content}}</view> <view class="content-text" wx:else>{{content}}</view>

View File

@ -56,7 +56,7 @@
border: 1.2px solid rgba(85, 85, 85, 0.3); border: 1.2px solid rgba(85, 85, 85, 0.3);
border-radius: 18rpx; border-radius: 18rpx;
margin:30rpx 0; margin:30rpx 0;
padding:24rpx 20rpx; padding:22rpx 20rpx;
font-size: 34rpx; font-size: 34rpx;
width:100%; width:100%;
box-sizing: border-box; box-sizing: border-box;

24
package-lock.json generated
View File

@ -9,9 +9,23 @@
"version": "1.0.0", "version": "1.0.0",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@beefast-wxmp/list-view": "^0.0.1",
"@beefast-wxmp/modal-view": "^0.1.7",
"@tencentcloud/donut-push": "^8.4.1" "@tencentcloud/donut-push": "^8.4.1"
} }
}, },
"node_modules/@beefast-wxmp/list-view": {
"version": "0.0.1",
"resolved": "https://packages.aliyun.com/6486fc420ce788fc1c0798b3/npm/repo-glpby/@beefast-wxmp/list-view/-/@beefast-wxmp/list-view-0.0.1.tgz",
"integrity": "sha512-XoTaXRqy8EuuHECGS2zFzAeDKoGDtC56VdahnVYTAcDLNo3fceQuXI2KhOSvjnn4Jbkt1UDch7IEuF9Eekf9eg==",
"license": "ISC"
},
"node_modules/@beefast-wxmp/modal-view": {
"version": "0.1.7",
"resolved": "https://packages.aliyun.com/6486fc420ce788fc1c0798b3/npm/repo-glpby/@beefast-wxmp/modal-view/-/@beefast-wxmp/modal-view-0.1.7.tgz",
"integrity": "sha512-lw7gdhxSfCdNW7sD9FuFgaFUih8+yf8TSJ2gX7ZUnnMEK6RIL6QxAEEj6LUJ+SHE6QuBegPb4ucrfAFVAd8s8A==",
"license": "ISC"
},
"node_modules/@tencentcloud/donut-push": { "node_modules/@tencentcloud/donut-push": {
"version": "8.4.1", "version": "8.4.1",
"resolved": "https://registry.npmmirror.com/@tencentcloud/donut-push/-/donut-push-8.4.1.tgz", "resolved": "https://registry.npmmirror.com/@tencentcloud/donut-push/-/donut-push-8.4.1.tgz",
@ -19,6 +33,16 @@
} }
}, },
"dependencies": { "dependencies": {
"@beefast-wxmp/list-view": {
"version": "0.0.1",
"resolved": "https://packages.aliyun.com/6486fc420ce788fc1c0798b3/npm/repo-glpby/@beefast-wxmp/list-view/-/@beefast-wxmp/list-view-0.0.1.tgz",
"integrity": "sha512-XoTaXRqy8EuuHECGS2zFzAeDKoGDtC56VdahnVYTAcDLNo3fceQuXI2KhOSvjnn4Jbkt1UDch7IEuF9Eekf9eg=="
},
"@beefast-wxmp/modal-view": {
"version": "0.1.7",
"resolved": "https://packages.aliyun.com/6486fc420ce788fc1c0798b3/npm/repo-glpby/@beefast-wxmp/modal-view/-/@beefast-wxmp/modal-view-0.1.7.tgz",
"integrity": "sha512-lw7gdhxSfCdNW7sD9FuFgaFUih8+yf8TSJ2gX7ZUnnMEK6RIL6QxAEEj6LUJ+SHE6QuBegPb4ucrfAFVAd8s8A=="
},
"@tencentcloud/donut-push": { "@tencentcloud/donut-push": {
"version": "8.4.1", "version": "8.4.1",
"resolved": "https://registry.npmmirror.com/@tencentcloud/donut-push/-/donut-push-8.4.1.tgz", "resolved": "https://registry.npmmirror.com/@tencentcloud/donut-push/-/donut-push-8.4.1.tgz",

View File

@ -13,6 +13,8 @@
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@beefast-wxmp/list-view": "^0.0.1",
"@beefast-wxmp/modal-view": "^0.1.7",
"@tencentcloud/donut-push": "^8.4.1" "@tencentcloud/donut-push": "^8.4.1"
} }
} }

View File

@ -1,8 +1,8 @@
{ {
"usingComponents": { "usingComponents": {
"list-view":"/components/listView", "list-view":"/miniprogram_npm/@beefast-wxmp/list-view",
"swipe-button":"/components/swipeButton", "swipe-button":"/components/swipeButton",
"modal-view":"/components/modalView", "modal-view":"/miniprogram_npm/@beefast-wxmp/modal-view",
"background-notice":"/components/background-notice", "background-notice":"/components/background-notice",
"mark-up":"./mark-up" "mark-up":"./mark-up"
}, },

View File

@ -1,7 +1,7 @@
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"modal-view":"/components/modalView", "modal-view":"/miniprogram_npm/@beefast-wxmp/modal-view",
"number-box":"/components/number-box", "number-box":"/components/number-box",
"img-uploader":"/components/img-uploader" "img-uploader":"/components/img-uploader"
}, },

View File

@ -11,7 +11,7 @@
height:128rpx; height:128rpx;
font-size: 30rpx; font-size: 30rpx;
width: 100%; width: 100%;
padding:24rpx; padding:20rpx 20rpx;
box-sizing:border-box; box-sizing:border-box;
} }
.mark-up-view .img-uploader{ .mark-up-view .img-uploader{

View File

@ -1,7 +1,7 @@
{ {
"usingComponents": { "usingComponents": {
"swipe-button":"/components/swipeButton", "swipe-button":"/components/swipeButton",
"modal-view":"/components/modalView", "modal-view":"/miniprogram_npm/@beefast-wxmp/modal-view",
"mark-up":"../index/mark-up" "mark-up":"../index/mark-up"
}, },
"navigationBarTitleText": "订单详情" "navigationBarTitleText": "订单详情"

View File

@ -1,6 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"modal-view":"/components/modalView" "modal-view":"/miniprogram_npm/@beefast-wxmp/modal-view"
}, },
"navigationBarTitleText": "银行卡管理" "navigationBarTitleText": "银行卡管理"
} }

View File

@ -1,6 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"list-view":"/components/listView" "list-view":"/miniprogram_npm/@beefast-wxmp/list-view"
}, },
"navigationBarTitleText": "交易明细" "navigationBarTitleText": "交易明细"
} }

View File

@ -1,6 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"list-view":"/components/listView" "list-view":"/miniprogram_npm/@beefast-wxmp/list-view"
}, },
"navigationBarTitleText": "提现记录" "navigationBarTitleText": "提现记录"
} }