Commit 5cea3951 authored by tangfh's avatar tangfh

+

parent 4112ad25
......@@ -3,8 +3,11 @@
<f-status-view v-if="statusViewUI.isShow" :status="statusViewUI.status" :style="statusViewStyle"
@tap="onStatusViewClick"></f-status-view>
<view class="v-row">
<f-date-time-picker style="width: 100%;" mode="datetime" returnType="yyyy-MM-dd" @change="onPopDatetimePickerChange"
@dismiss="onPopDatatimePickerDismiss"></f-date-time-picker>
<f-checkbox-txt :isEnable="isEnable" @click="onCheckboxTxtClick"></f-checkbox-txt>
</view>
<view class="v-row">
<f-date-time-picker style="width: 100%;" mode="datetime" returnType="yyyy-MM-dd"
@change="onPopDatetimePickerChange" @dismiss="onPopDatatimePickerDismiss"></f-date-time-picker>
</view>
<view class="v-row">
<f-avatar-edit :avatar="avatar" @onAvatarSelected="onAvatarSelected" @click="onAvatarClick"
......@@ -103,6 +106,7 @@
data() {
return {
title: 'fashion-ui',
isEnable: false,
avatar: "/static/logo.png",
statusViewStyle: {
width: "",
......@@ -174,6 +178,10 @@
onAvatarSelected(res) {
this.avatar = res[0]
},
onCheckboxTxtClick() {
console.log("hello");
this.isEnable = !this.isEnable
},
onAvatarClick(res) {
},
......
## 1.0.3(2024-11-01)
1.0.3
## 1.0.2(2024-11-01)
1.0.2
## 1.0.1(2024-11-01)
1.0.1
## 1.0.0(2024-11-01)
1.0.0
<template>
<view class="v-parent flex-row row-center-v"
:style="{'background-color': getBgColor(), 'padding': getPadding(), 'border': getBorder()}" @click="onClick">
<image class="i-circle" v-if="!isEnable" style="margin-right: 2rpx;"></image>
<text class="t-txt" :style="{'color': getColor()}">{{ isEnable?txtEnable:txtDisable }}</text>
<image class="i-circle" v-if="isEnable" style="margin-left: 2rpx;"></image>
</view>
</template>
<script>
export default {
name: 'f-checkbox-txt',
props: {
txtEnable: {
type: String,
default: "开启"
},
txtDisable: {
type: String,
default: "禁用"
},
isEnable: {
type: Boolean,
default: "false"
}
},
methods: {
getColor() {
return this.isEnable ? "#333" : "#999"
},
getBgColor() {
return this.isEnable ? "#F8C514" : "#fff"
},
getPadding() {
return this.isEnable ? "2rpx 2rpx 2rpx 10rpx" : "2rpx 10rpx 2rpx 2rpx"
},
getBorder() {
return this.isEnable ? "1rpx solid #F8C514" : "1rpx solid #ededed"
},
onClick() {
this.$emit("click")
}
},
created() {
}
}
</script>
<style>
.v-parent {
height: 36rpx;
border-radius: 36rpx;
padding: 2rpx;
}
.i-circle {
width: 34rpx;
height: 34rpx;
background-color: white;
border-radius: 34rpx;
box-shadow: 0px 0px 2px 0px rgba(0,0,0,0.5);
}
.t-txt {
font-size: 26rpx;
}
</style>
\ No newline at end of file
{
"id": "f-checkbox-txt",
"displayName": "f-checkbox-txt",
"version": "1.0.3",
"description": "带文本checkbox",
"keywords": [
"带文本checkbox"
],
"repository": "http://git.guoguodz.com/tangfh/fashion-ui.git",
"engines": {
"HBuilderX": "^3.8.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"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
\ No newline at end of file
# f-checkbox-txt
\ 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