去掉 fab

This commit is contained in:
Wang Kejun 2022-07-27 12:21:44 +08:00
parent dc65cd5b03
commit b5b0eec8dc
16 changed files with 7 additions and 245 deletions

View File

@ -1,3 +0,0 @@
{
"component": true
}

View File

@ -1,31 +0,0 @@
/** index.wxss **/
.divider {
margin: 0;
flex-shrink: 0;
border-width: 0;
border-style: solid;
border-color: rgb(0 0 0 / 12%);
border-bottom-width: thin;
}
.flexItem {
align-self: stretch;
height: auto;
}
.vertical {
height: 100%;
border-bottom-width: 0;
border-right-width: thin;
margin: 0rpx 8rpx;
}
.horizontal {
display: block;
unicode-bidi: isolate;
margin-block-start: 0.5em;
margin-block-end: 0.5em;
margin-inline-start: auto;
margin-inline-end: auto;
overflow: hidden;
}

View File

@ -1,15 +0,0 @@
Component({
properties: {
// circle || square
mode: {
type: String,
value: ''
},
// small || large || default
flexItem: {
type: Boolean,
value: false,
},
}
});

View File

@ -1,2 +0,0 @@
<!-- index.wxml -->
<hr class="divider {{mode === 'vertical' ? mode : 'horizontal'}} {{flexItem === true ? 'flexItem' : ''}}" />

View File

@ -1,3 +0,0 @@
{
"component": true
}

View File

@ -1,82 +0,0 @@
@import "../../../config/styles/_base.less";
.btn-view {
position: fixed;
}
.fab {
display: inline-flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
outline: 0;
margin: 0;
padding: 0;
cursor: pointer;
user-select: none;
vertical-align: middle;
color: #fff;
width: 112rpx;
height: 112rpx;
z-index: 1050;
font-size: 0.875rem;
line-height: 1.75;
text-transform: uppercase;
border-radius: 50%;
transition: background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms, border-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
box-shadow: 0 3px 5px -1px rgb(0 0 0 / 20%), 0 6px 10px 0 rgb(0 0 0 / 14%), 0 1px 18px 0 rgb(0 0 0 / 12%);
&:active {
box-shadow: 0 7px 8px -4px rgb(0 0 0 / 20%), 0 12px 17px 2px rgb(0 0 0 / 14%), 0 5px 22px 4px rgb(0 0 0 / 12%);
}
&-default {
background-color: @default-color;
}
&-success {
background-color: @success-color;
}
&-warning {
background-color: @warning-color;
}
&-error {
background-color: @error-color;
}
}
.ripple {
position: relative;
overflow: hidden;
}
.ripple:focus {
outline: none;
}
.ripple::after {
content: "";
display: block;
position: absolute;
top: -10px;
left: -10px;
right: -10px;
bottom: -10px;
pointer-events: none;
background-color: #888;
background-repeat: no-repeat;
background-position: 50%;
opacity: 0;
transition: all 0.3s;
}
.ripple:active::after {
opacity: 0.3;
top: 0;
left: 0;
right: 0;
bottom: 0;
transition: 0s;
}

View File

@ -1,89 +0,0 @@
Component({
properties: {
// button组建标识
bottom: {
type: Number,
value: 50,
},
right: {
type: Number,
value: 32,
},
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: false,
},
special: {
type: Boolean,
value: false,
},
// 微信原生接口
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: false
}
},
methods: {
// button点击事件
handleTap() {
if (this.data.disabled || this.data.loading) return false;
this.triggerEvent('click', {}, {
bubbles: true,
composed: true
});
},
// 开放能力事件回调
openTypeEvent(data:any) {
this.triggerEvent(data.type, data.detail, {});
}
}
});

View File

@ -1,5 +0,0 @@
<view class="btn-view" style="bottom: {{bottom}}rpx; right: {{right}}rpx">
<button class="fab fab-{{type}} ripple" id="{{name}}" lang="{{lang}}" form-type="{{formType}}" open-type="{{openType}}" app-parameter="{{ appParameter }}" hover-stop-propagation="{{ hoverStopPropagation }}" hover-start-time="{{ hoverStartTime }}" hover-stay-time="{{ hoverStayTime }}" session-from="{{ sessionFrom }}" send-message-title="{{ sendMessageTitle }}" send-message-path="{{ sendMessagePath }}" send-message-img="{{ sendMessageImg }}" show-message-card="{{ showMessageCard }}" bindcontact="openTypeEvent" bindgetuserinfo="openTypeEvent" bindgetphonenumber="openTypeEvent" bindopensetting="openTypeEvent" bind:tap="handleTap">
<slot />
</button>
</view>

View File

@ -1,8 +1,6 @@
{
"navigationBarTitleText": "人员管理",
"usingComponents": {
"divider": "../../../components/UI/divider/index",
"fab": "../../../components/UI/fab/index",
"t-button": "../../../miniprogram_npm/tdesign/button/button",
"t-tag": "../../../miniprogram_npm/tdesign/tag/tag",
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon",

View File

@ -5,7 +5,6 @@
"t-dialog": "../../../miniprogram_npm/tdesign/dialog/dialog",
"t-tag": "../../../miniprogram_npm/tdesign/tag/tag",
"t-fab": "../../../miniprogram_npm/tdesign/fab/fab",
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon",
"fab": "../../../components/UI/fab/index"
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon"
}
}

View File

@ -6,7 +6,6 @@
"t-divider": "../../../miniprogram_npm/tdesign/divider/divider",
"t-tag": "../../../miniprogram_npm/tdesign/tag/tag",
"t-fab": "../../../miniprogram_npm/tdesign/fab/fab",
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon",
"fab": "../../../components/UI/fab/index"
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon"
}
}

View File

@ -1,8 +1,6 @@
{
"navigationBarTitleText": "修改权限",
"usingComponents": {
"t-cell": "../../../miniprogram_npm/tdesign/cell/cell",
"divider": "../../../components/UI/divider/index",
"fab": "../../../components/UI/fab/index"
"t-cell": "../../../miniprogram_npm/tdesign/cell/cell"
}
}

View File

@ -1,8 +1,7 @@
{
"navigationBarTitleText": "修改权限",
"usingComponents": {
"divider": "../../../components/UI/divider/index",
"fab": "../../../components/UI/fab/index",
"t-divider": "../../../miniprogram_npm/tdesign/divider/divider",
"t-button": "../../../miniprogram_npm/tdesign/button/button",
"t-switch": "../../../miniprogram_npm/tdesign/switch/switch"
}

View File

@ -6,7 +6,7 @@
<image mode="aspectFill" class="img" src="{{user.avatar}}" lazy-load></image>
<text class="name">{{user.name || user.nickname || '--'}}</text>
<text class="mobile">{{user.mobile || '--'}}</text>
<divider />
<t-divider />
<view class="list" wx:for="{{rows}}" wx:key="idx">
<block wx:if="{{relations.length === 1}}">
<view class="singleRelationItem">

View File

@ -1,8 +1,7 @@
{
"navigationBarTitleText": "修改权限",
"usingComponents": {
"divider": "../../../components/UI/divider/index",
"fab": "../../../components/UI/fab/index",
"divider": "../../../miniprogram_npm/tdesign/divider/divider",
"t-icon": "../../../miniprogram_npm/tdesign/icon/icon",
"t-button": "../../../miniprogram_npm/tdesign/button/button",
"t-switch": "../../../miniprogram_npm/tdesign/switch/switch",

View File

@ -27,7 +27,7 @@
</view>
</block>
<block wx:else>
<divider />
<t-divider />
<view class="content">
<block wx:for="{{relations}}" wx:key="idx" wx:for-index="index2" wx:for-item="relation">
<view class="relation-item">