Commit c5c3a9e1 authored by tangfh's avatar tangfh

封装 f-button-01 插件(按钮),上传插件市场

parent f3e96c95
...@@ -26,4 +26,10 @@ ...@@ -26,4 +26,10 @@
.placeholder-class { .placeholder-class {
color: #d1d1d1; color: #d1d1d1;
}
.v-row {
width: 100%;
justify-content: space-between;
margin-bottom: 20rpx;
} }
\ No newline at end of file
...@@ -55,6 +55,7 @@ function init() { ...@@ -55,6 +55,7 @@ function init() {
export default { export default {
appUI: appUI, appUI: appUI,
navigationBarUI: navigationBarUI,
statusViewUI: statusViewUI, statusViewUI: statusViewUI,
scrollViewUI: scrollViewUI, scrollViewUI: scrollViewUI,
init: init, init: init,
......
<template> <template>
<view class="content" :style="[style]"> <view class="content" :style="[style]">
<f-status-view v-if="statusViewUI.isShowStatusView" :status="statusViewUI.status" <f-status-view v-if="statusViewUI.isShowStatusView" :status="statusViewUI.status"
:style="statusViewStyle"
@tap="onStatusViewClick"></f-status-view> @tap="onStatusViewClick"></f-status-view>
<view class="v-row flex-row">
<f-button-01 style="flex: 0 0 50%;" clazz="style-02"></f-button-01>
<f-button-01 style="flex: 0 0 50%;" clazz="style-03"></f-button-01>
</view>
<view class="v-row flex-row">
<f-button-01 style="flex: 0 0 100%;" clazz="style-01"></f-button-01>
</view>
<f-add-image-grid @choose="onImageChoose" @delete="onImageDelete"></f-add-image-grid> <f-add-image-grid @choose="onImageChoose" @delete="onImageDelete"></f-add-image-grid>
<button @click="showPopTop">f-pop-top</button> <button @click="showPopTop">f-pop-top</button>
...@@ -59,6 +69,10 @@ ...@@ -59,6 +69,10 @@
data() { data() {
return { return {
title: 'fashion-ui', title: 'fashion-ui',
statusViewStyle: {
width: "",
height: "",
},
isShowPopTop: false, isShowPopTop: false,
isShowPopCenter: false, isShowPopCenter: false,
isShowPopBottom: false, isShowPopBottom: false,
...@@ -117,10 +131,10 @@ ...@@ -117,10 +131,10 @@
}, },
methods: { methods: {
onImageChoose(res) { onImageChoose(res) {
}, },
onImageDelete(res) { onImageDelete(res) {
}, },
showPopTop() { showPopTop() {
this.isShowPopTop = true this.isShowPopTop = true
...@@ -150,6 +164,11 @@ ...@@ -150,6 +164,11 @@
this.style = { this.style = {
paddingBottom: ui.appUI.saftBottom + "px" paddingBottom: ui.appUI.saftBottom + "px"
} }
let systemInfo = uni.getSystemInfoSync()
this.statusViewStyle = {
width: ui.statusViewUI.width + "px",
height: (systemInfo.screenHeight - ui.navigationBarUI.height) + "px",
}
}, },
cMultiText01UiInit() { cMultiText01UiInit() {
let ui = JSON.parse(JSON.stringify(constant.CONST.cMultiTextUI)); let ui = JSON.parse(JSON.stringify(constant.CONST.cMultiTextUI));
...@@ -186,4 +205,5 @@ ...@@ -186,4 +205,5 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
</style> </style>
\ No newline at end of file
## 1.0.0(2024-05-31)
1.0.0
<template>
<button class="t-btn"
:class="{'button-01-style-01': clazz=='style-01','button-01-style-02': clazz=='style-02','button-01-style-03': clazz=='style-03'}"
:style="{'borderRadius': borderRadius, 'margin': margin, 'backgroundColor': backgroundColor, 'color': color}">
{{ text }}
</button>
</template>
<script>
export default {
name: 'f-button-01',
props: {
clazz: {
type: String,
default: "style-01",
},
text: {
type: String,
default: "按钮",
},
color: {
type: String,
default: "white",
},
borderRadius: {
type: String,
default: ""
},
margin: {
type: String,
default: ""
},
backgroundColor: {
type: String,
default: "#4AA7F7"
}
},
methods: {},
created() {
}
}
</script>
<style lang="scss" scoped>
.t-btn {
width: auto;
height: 96rpx;
font-weight: 500;
font-size: 15px;
line-height: 96rpx;
text-align: center;
color: white;
background-color: $c-bg-color;
}
.button-01-style-01 {
border-radius: 48rpx;
margin: 0rpx 32rpx 0rpx 32rpx;
}
.button-01-style-02 {
border-radius: 48rpx 0rpx 0rpx 48rpx;
margin: 0rpx 22rpx 0rpx 32rpx;
}
.button-01-style-03 {
border-radius: 0rpx 48rpx 48rpx 0rpx;
margin: 0rpx 32rpx 0rpx 0rpx;
}
</style>
\ No newline at end of file
{
"id": "f-button-01",
"displayName": "f-button-01",
"version": "1.0.0",
"description": "f-button-01",
"keywords": [
"f-button-01"
],
"repository": "http://git.guoguodz.com/tangfh/fashion-ui.git",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "u",
"app-nvue": "u",
"app-uvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "y",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
\ No newline at end of file
# f-button-01
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment