init
This commit is contained in:
55
xhs-mini-demos/component-case/button/button.css
Normal file
55
xhs-mini-demos/component-case/button/button.css
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
.radio-group-container {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.button_bg_red {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.button_group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.button_group button {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.mini_button_group {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.button_disabled {
|
||||
height: 40px;
|
||||
border-radius: 1000px;
|
||||
background-color: rgba(255, 36, 66, 0.2);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: white;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
._ui-button-transparent {
|
||||
background-color: white;
|
||||
border: 1px solid #ff2442;
|
||||
color: rgba(255, 36, 66, 1);
|
||||
}
|
||||
|
||||
._ui-button-transparent-disabled {
|
||||
background-color: white;
|
||||
border: 1px solid rgba(51, 51, 51, 0.1);
|
||||
}
|
||||
|
||||
._ui-button-gray {
|
||||
background-color: rgba(51, 51, 51, 0.05);
|
||||
color: black;
|
||||
}
|
||||
._ui-button-transparent-gray {
|
||||
background-color: white;
|
||||
border: 1px solid rgba(51, 51, 51, 0.2);
|
||||
color: black;
|
||||
}
|
||||
142
xhs-mini-demos/component-case/button/button.js
Normal file
142
xhs-mini-demos/component-case/button/button.js
Normal file
@@ -0,0 +1,142 @@
|
||||
const __templateJs = require("./templates.js");
|
||||
const __mergePageOptions = require("../../util/mergePageOptions.js");
|
||||
const types = ['default', 'primary', 'warn'];
|
||||
const pageObject = {
|
||||
data: {
|
||||
size: 'default',
|
||||
type: 'default',
|
||||
plain: false,
|
||||
disabled: false,
|
||||
loading: false,
|
||||
formType: '',
|
||||
hoverClass: 'button-hover',
|
||||
hoverStopPropagation: false,
|
||||
hoverStartTime: 20,
|
||||
hoverStayTime: 70
|
||||
},
|
||||
onShareAppMessage() {
|
||||
return {
|
||||
title: 'button',
|
||||
path: 'page/component/pages/button/button'
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
console.log('onLoad 2');
|
||||
setTimeout(() => {
|
||||
this.removeSkeleton?.();
|
||||
}, 1000);
|
||||
},
|
||||
onShow() {
|
||||
console.log('onShow 2');
|
||||
xhs.request({
|
||||
url: 'https://spider-tracker.xiaohongshu.com/api/data/onShow/button',
|
||||
method: 'POST'
|
||||
});
|
||||
},
|
||||
onReady() {
|
||||
console.log('onReady 2');
|
||||
},
|
||||
onHide() {
|
||||
console.log('onHide 2');
|
||||
xhs.request({
|
||||
url: 'https://spider-tracker.xiaohongshu.com/api/data/onHide/button',
|
||||
method: 'POST'
|
||||
});
|
||||
},
|
||||
onUnload() {
|
||||
console.log('onUnload 2');
|
||||
xhs.request({
|
||||
url: 'https://spider-tracker.xiaohongshu.com/api/data/onUnload/button',
|
||||
method: 'POST'
|
||||
});
|
||||
},
|
||||
onTabItemTap(item) {
|
||||
console.log('====component:', item);
|
||||
},
|
||||
setDisabled() {
|
||||
this.setData({
|
||||
disabled: !this.data.disabled
|
||||
});
|
||||
},
|
||||
setPlain() {
|
||||
this.setData({
|
||||
plain: !this.data.plain
|
||||
});
|
||||
},
|
||||
setLoading() {
|
||||
this.setData({
|
||||
loading: !this.data.loading
|
||||
});
|
||||
},
|
||||
handleContact(e) {
|
||||
console.log(e.detail);
|
||||
},
|
||||
handleGetPhoneNumber(e) {
|
||||
console.log('handleGetPhoneNumber: ', e.detail);
|
||||
},
|
||||
handleGetUserInfo(e) {
|
||||
console.log('handleGetUserInfo', e.detail);
|
||||
},
|
||||
handleOpenSetting(e) {
|
||||
console.log(e.detail.authSetting);
|
||||
},
|
||||
changeSize({
|
||||
detail
|
||||
}) {
|
||||
this.setData({
|
||||
size: detail.value
|
||||
});
|
||||
},
|
||||
changeType({
|
||||
detail
|
||||
}) {
|
||||
this.setData({
|
||||
type: detail.value
|
||||
});
|
||||
},
|
||||
changePlain() {
|
||||
this.setData({
|
||||
plain: !this.data.plain
|
||||
});
|
||||
},
|
||||
changeDisabled() {
|
||||
this.setData({
|
||||
disabled: !this.data.disabled
|
||||
});
|
||||
},
|
||||
changeLoading() {
|
||||
this.setData({
|
||||
loading: !this.data.loading
|
||||
});
|
||||
},
|
||||
changeHoverStopPropagation() {
|
||||
this.setData({
|
||||
hoverStopPropagation: !this.data.hoverStopPropagation
|
||||
});
|
||||
},
|
||||
changeHoverStartTime({
|
||||
detail
|
||||
}) {
|
||||
this.setData({
|
||||
hoverStartTime: detail.value
|
||||
});
|
||||
},
|
||||
changeHoverStayTime({
|
||||
detail
|
||||
}) {
|
||||
this.setData({
|
||||
hoverStayTime: detail.value
|
||||
});
|
||||
}
|
||||
};
|
||||
for (let i = 0; i < types.length; ++i) {
|
||||
(function (type) {
|
||||
pageObject[type] = function () {
|
||||
const key = `${type}Size`;
|
||||
const changedData = {};
|
||||
changedData[key] = this.data[key] === 'default' ? 'mini' : 'default';
|
||||
this.setData(changedData);
|
||||
};
|
||||
})(types[i]);
|
||||
}
|
||||
Page(__mergePageOptions(pageObject, __templateJs));
|
||||
14
xhs-mini-demos/component-case/button/button.json
Normal file
14
xhs-mini-demos/component-case/button/button.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"navigationBarTitleText": "按钮",
|
||||
"usingComponents": {
|
||||
"showbox": "../../common/component/showbox/index",
|
||||
"box": "../../common/component/container/index"
|
||||
},
|
||||
"skeleton": {
|
||||
"path": "./button.skeleton.xhsml",
|
||||
"options": {
|
||||
"background": "#eee",
|
||||
"animation": "shine"
|
||||
}
|
||||
}
|
||||
}
|
||||
590
xhs-mini-demos/component-case/button/button.skeleton.css
Normal file
590
xhs-mini-demos/component-case/button/button.skeleton.css
Normal file
@@ -0,0 +1,590 @@
|
||||
.skeleton-text-block-mark,
|
||||
.skeleton-text-block-mark * {
|
||||
background-origin: content-box;
|
||||
background-clip: content-box;
|
||||
background-repeat: repeat-y;
|
||||
background-color: transparent !important;
|
||||
color: transparent !important;
|
||||
}
|
||||
.sk-pseudo::before,
|
||||
.sk-pseudo::after {
|
||||
background: none rgb(238, 238, 238) !important;
|
||||
color: transparent !important;
|
||||
border-color: transparent !important;
|
||||
border-radius: 0px !important;
|
||||
}
|
||||
.sk-button {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
.sk-transparent::before,
|
||||
.sk-transparent::after {
|
||||
opacity: 0 !important;
|
||||
}
|
||||
.sk-animation-shine-2 {
|
||||
background: linear-gradient(
|
||||
90deg,
|
||||
rgba(0, 0, 0, 0.06) 20%,
|
||||
rgba(0, 0, 0, 0.15) 37%,
|
||||
rgba(0, 0, 0, 0.06) 63%
|
||||
)
|
||||
0% 0% / 400% 100%;
|
||||
animation-name: sk-shine-2;
|
||||
animation-duration: 1.4s;
|
||||
animation-timing-function: ease;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
@keyframes sk-shine-2 {
|
||||
0% {
|
||||
background-position: 100% 50%;
|
||||
}
|
||||
100% {
|
||||
background-position: 0px 50%;
|
||||
}
|
||||
}
|
||||
html {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
body {
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
scroll-behavior: smooth;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
* {
|
||||
text-size-adjust: none;
|
||||
}
|
||||
view {
|
||||
display: block;
|
||||
}
|
||||
video {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.xgplayer div.gradient {
|
||||
background-image: none;
|
||||
}
|
||||
.xgplayer-mobile xg-controls.xgplayer-controls {
|
||||
background-image: linear-gradient(
|
||||
transparent,
|
||||
rgba(0, 0, 0, 0.25),
|
||||
rgba(0, 0, 0, 0.5),
|
||||
rgba(0, 0, 0, 0.75)
|
||||
);
|
||||
}
|
||||
.xgplayer .flex-controls xg-inner-controls.xg-inner-controls {
|
||||
bottom: 4px;
|
||||
}
|
||||
.xhs-ios-native-input {
|
||||
overflow: scroll;
|
||||
position: absolute;
|
||||
inset: 0px;
|
||||
}
|
||||
input {
|
||||
position: relative;
|
||||
cursor: auto;
|
||||
display: block;
|
||||
height: 22px;
|
||||
text-overflow: clip;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
margin: 0px;
|
||||
}
|
||||
input .web-input {
|
||||
position: relative;
|
||||
min-height: 22px;
|
||||
text-overflow: inherit;
|
||||
border: none;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
color: inherit;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
outline: none;
|
||||
text-align: inherit;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
input .web-input div {
|
||||
position: absolute;
|
||||
inset: 0px;
|
||||
margin: auto;
|
||||
min-height: 22px;
|
||||
white-space: pre;
|
||||
text-align: inherit;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
input input {
|
||||
position: relative;
|
||||
border: none;
|
||||
height: inherit;
|
||||
width: 100%;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
color: inherit;
|
||||
background: transparent;
|
||||
display: inherit;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
outline: none;
|
||||
vertical-align: middle;
|
||||
text-align: inherit;
|
||||
overflow: inherit;
|
||||
white-space: inherit;
|
||||
text-overflow: inherit;
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
z-index: 1;
|
||||
}
|
||||
.xhs-inner-input-placeholder {
|
||||
color: rgb(153, 153, 153);
|
||||
}
|
||||
map {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
map .tmap-scale-text {
|
||||
display: var(--map-showScale, block);
|
||||
}
|
||||
map .tmap-scale-line {
|
||||
display: var(--map-showScale, block);
|
||||
}
|
||||
map .rotate-circle {
|
||||
display: var(--map-showCompass, block);
|
||||
}
|
||||
map img {
|
||||
display: inline;
|
||||
}
|
||||
map .logo-text {
|
||||
display: none;
|
||||
}
|
||||
map a[target='_blank'] {
|
||||
display: none;
|
||||
}
|
||||
map .tmap-zoom-control {
|
||||
display: none;
|
||||
}
|
||||
map > * {
|
||||
z-index: 1099;
|
||||
position: absolute !important;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
width: 1px;
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
background: rgb(241, 241, 241);
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgb(136, 136, 136);
|
||||
}
|
||||
._ma2 {
|
||||
margin: 4px;
|
||||
}
|
||||
._mx2 {
|
||||
margin: 0px 4px;
|
||||
}
|
||||
._my2 {
|
||||
margin: 4px 0px;
|
||||
}
|
||||
._mt2 {
|
||||
margin-top: 4px;
|
||||
}
|
||||
._mb2 {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
._ml2 {
|
||||
margin-left: 4px;
|
||||
}
|
||||
._mr2 {
|
||||
margin-right: 4px;
|
||||
}
|
||||
._pa2 {
|
||||
padding: 4px;
|
||||
}
|
||||
._px2 {
|
||||
padding: 0px 4px;
|
||||
}
|
||||
._py2 {
|
||||
padding: 4px 0px;
|
||||
}
|
||||
._pt2 {
|
||||
padding-top: 4px;
|
||||
}
|
||||
._pb2 {
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
._pl2 {
|
||||
padding-left: 4px;
|
||||
}
|
||||
._pr2 {
|
||||
padding-right: 4px;
|
||||
}
|
||||
._ma4 {
|
||||
margin: 8px;
|
||||
}
|
||||
._mx4 {
|
||||
margin: 0px 8px;
|
||||
}
|
||||
._my4 {
|
||||
margin: 8px 0px;
|
||||
}
|
||||
._mt4 {
|
||||
margin-top: 8px;
|
||||
}
|
||||
._mb4 {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
._ml4 {
|
||||
margin-left: 8px;
|
||||
}
|
||||
._mr4 {
|
||||
margin-right: 8px;
|
||||
}
|
||||
._pa4 {
|
||||
padding: 8px;
|
||||
}
|
||||
._px4 {
|
||||
padding: 0px 8px;
|
||||
}
|
||||
._py4 {
|
||||
padding: 8px 0px;
|
||||
}
|
||||
._pt4 {
|
||||
padding-top: 8px;
|
||||
}
|
||||
._pb4 {
|
||||
padding-bottom: 8px;
|
||||
}
|
||||
._pl4 {
|
||||
padding-left: 8px;
|
||||
}
|
||||
._pr4 {
|
||||
padding-right: 8px;
|
||||
}
|
||||
._ma6 {
|
||||
margin: 12px;
|
||||
}
|
||||
._mx6 {
|
||||
margin: 0px 12px;
|
||||
}
|
||||
._my6 {
|
||||
margin: 12px 0px;
|
||||
}
|
||||
._mt6 {
|
||||
margin-top: 12px;
|
||||
}
|
||||
._mb6 {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
._ml6 {
|
||||
margin-left: 12px;
|
||||
}
|
||||
._mr6 {
|
||||
margin-right: 12px;
|
||||
}
|
||||
._pa6 {
|
||||
padding: 12px;
|
||||
}
|
||||
._px6 {
|
||||
padding: 0px 12px;
|
||||
}
|
||||
._py6 {
|
||||
padding: 12px 0px;
|
||||
}
|
||||
._pt6 {
|
||||
padding-top: 12px;
|
||||
}
|
||||
._pb6 {
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
._pl6 {
|
||||
padding-left: 12px;
|
||||
}
|
||||
._pr6 {
|
||||
padding-right: 12px;
|
||||
}
|
||||
._ma8 {
|
||||
margin: 16px;
|
||||
}
|
||||
._mx8 {
|
||||
margin: 0px 16px;
|
||||
}
|
||||
._my8 {
|
||||
margin: 16px 0px;
|
||||
}
|
||||
._mt8 {
|
||||
margin-top: 16px;
|
||||
}
|
||||
._mb8 {
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
._ml8 {
|
||||
margin-left: 16px;
|
||||
}
|
||||
._mr8 {
|
||||
margin-right: 16px;
|
||||
}
|
||||
._pa8 {
|
||||
padding: 16px;
|
||||
}
|
||||
._px8 {
|
||||
padding: 0px 16px;
|
||||
}
|
||||
._py8 {
|
||||
padding: 16px 0px;
|
||||
}
|
||||
._pt8 {
|
||||
padding-top: 16px;
|
||||
}
|
||||
._pb8 {
|
||||
padding-bottom: 16px;
|
||||
}
|
||||
._pl8 {
|
||||
padding-left: 16px;
|
||||
}
|
||||
._pr8 {
|
||||
padding-right: 16px;
|
||||
}
|
||||
._ma10 {
|
||||
margin: 20px;
|
||||
}
|
||||
._mx10 {
|
||||
margin: 0px 20px;
|
||||
}
|
||||
._my10 {
|
||||
margin: 20px 0px;
|
||||
}
|
||||
._mt10 {
|
||||
margin-top: 20px;
|
||||
}
|
||||
._mb10 {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
._ml10 {
|
||||
margin-left: 20px;
|
||||
}
|
||||
._mr10 {
|
||||
margin-right: 20px;
|
||||
}
|
||||
._pa10 {
|
||||
padding: 20px;
|
||||
}
|
||||
._px10 {
|
||||
padding: 0px 20px;
|
||||
}
|
||||
._py10 {
|
||||
padding: 20px 0px;
|
||||
}
|
||||
._pt10 {
|
||||
padding-top: 20px;
|
||||
}
|
||||
._pb10 {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
._pl10 {
|
||||
padding-left: 20px;
|
||||
}
|
||||
._pr10 {
|
||||
padding-right: 20px;
|
||||
}
|
||||
._ui-input {
|
||||
background-color: rgba(51, 51, 51, 0.024);
|
||||
border-radius: 18px;
|
||||
padding: 9px 16px;
|
||||
}
|
||||
._ui-textarea {
|
||||
background-color: rgba(0, 0, 0, 0.04);
|
||||
border-radius: 8px;
|
||||
padding: 14px 12px;
|
||||
}
|
||||
._ui-button {
|
||||
background-color: rgb(255, 36, 66);
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
._ui-button-hover {
|
||||
background-color: rgba(255, 36, 66, 0.7);
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
._ui-button-hover::after {
|
||||
border: none;
|
||||
}
|
||||
picker {
|
||||
border: 1px solid rgb(238, 238, 238);
|
||||
border-radius: 5px;
|
||||
}
|
||||
button {
|
||||
height: 40px;
|
||||
border-radius: 1000px;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
line-height: 40px;
|
||||
}
|
||||
.button-hover::after,
|
||||
button::after {
|
||||
border: none;
|
||||
}
|
||||
textarea {
|
||||
padding: 0px;
|
||||
}
|
||||
.xhs-inner-switch-control-switch::after {
|
||||
background-color: rgb(0, 255, 255);
|
||||
}
|
||||
picker {
|
||||
border: none;
|
||||
}
|
||||
checkbox *,
|
||||
radio * {
|
||||
display: flex;
|
||||
}
|
||||
slider > div > div > div > div:nth-child(2) {
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
margin-top: -8px !important;
|
||||
margin-left: -8px !important;
|
||||
}
|
||||
:root {
|
||||
--xhs-theme-color: red;
|
||||
}
|
||||
._cred {
|
||||
color: var(--xhs-theme-color);
|
||||
}
|
||||
._bcred {
|
||||
background-color: var(--xhs-theme-color);
|
||||
color: rgb(255, 255, 255);
|
||||
}
|
||||
._dflex {
|
||||
display: flex;
|
||||
}
|
||||
._fd_column {
|
||||
flex-direction: column;
|
||||
}
|
||||
._jc_space-around {
|
||||
justify-content: space-around;
|
||||
}
|
||||
._jc_center {
|
||||
justify-content: center;
|
||||
}
|
||||
._jc_space-between {
|
||||
justify-content: space-between;
|
||||
}
|
||||
._ai_center {
|
||||
align-items: center;
|
||||
}
|
||||
._flex_1 {
|
||||
flex: 1 1 0%;
|
||||
}
|
||||
._text_wrap {
|
||||
word-break: break-all;
|
||||
}
|
||||
._end_split {
|
||||
position: relative;
|
||||
border: 0px;
|
||||
}
|
||||
._end_split::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
height: 1px;
|
||||
background: rgb(235, 235, 235);
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
}
|
||||
._ui-space > * {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
._ui-space > :last-child {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
body,
|
||||
html {
|
||||
height: 100%;
|
||||
font-family: -apple-system-font, 'Helvetica Neue', Helvetica, sans-serif;
|
||||
font-size: 100px;
|
||||
color: rgb(51, 51, 51);
|
||||
}
|
||||
.container {
|
||||
font-size: 0.14rem;
|
||||
overflow: hidden;
|
||||
}
|
||||
.radio-group-container {
|
||||
display: flex;
|
||||
flex: 1 1 0%;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.button_bg_red {
|
||||
background-color: red;
|
||||
}
|
||||
.button_group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.button_group xhs-button {
|
||||
margin: 10px 0px;
|
||||
}
|
||||
.mini_button_group {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
.button_disabled {
|
||||
height: 40px;
|
||||
border-radius: 1000px;
|
||||
background-color: rgba(255, 36, 66, 0.2);
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: rgb(255, 255, 255);
|
||||
line-height: 40px;
|
||||
}
|
||||
._ui-button-transparent {
|
||||
background-color: rgb(255, 255, 255);
|
||||
border: 1px solid rgb(255, 36, 66);
|
||||
color: rgb(255, 36, 66);
|
||||
}
|
||||
._ui-button-transparent-disabled {
|
||||
background-color: rgb(255, 255, 255);
|
||||
border: 1px solid rgba(51, 51, 51, 0.1);
|
||||
}
|
||||
._ui-button-gray {
|
||||
background-color: rgba(51, 51, 51, 0.05);
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
._ui-button-transparent-gray {
|
||||
background-color: rgb(255, 255, 255);
|
||||
border: 1px solid rgba(51, 51, 51, 0.2);
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
.xhs-demo-card {
|
||||
margin: 10px;
|
||||
background-color: rgb(255, 255, 255);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.xhs-demo-card-title {
|
||||
margin: 0px 16px;
|
||||
padding: 15px 0px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 18px;
|
||||
}
|
||||
.xhs-demo-card-content {
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
.xhs-demo-card-spiver {
|
||||
position: relative;
|
||||
border: 0px;
|
||||
}
|
||||
.xhs-demo-card-spiver::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgb(239, 239, 239);
|
||||
transform-origin: 0px 100%;
|
||||
}
|
||||
241
xhs-mini-demos/component-case/button/button.skeleton.xhsml
Normal file
241
xhs-mini-demos/component-case/button/button.skeleton.xhsml
Normal file
@@ -0,0 +1,241 @@
|
||||
<view class="container" style="border-color: rgb(238, 238, 238);">
|
||||
<showbox style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="xhs-demo-card" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="xhs-demo-card-title xhs-demo-card-spiver" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="skeleton-text-block-mark sk-animation-shine-2" style="display: inline-block; position: relative; background-position-x: 0%;">一级按钮</view>
|
||||
</view>
|
||||
<view class="xhs-demo-card-content" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<box class="box" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="padding: 16px; border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button sk-button sk-animation-shine-2" hover-class="_ui-button-hover xhs_0__ui-button-hover" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
<button class="button_disabled _mt8 sk-button sk-animation-shine-2" disabled="" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
</view>
|
||||
<view class="_mt8" style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button _px10 sk-button sk-animation-shine-2" size="mini" hover-class="_ui-button-hover xhs_0__ui-button-hover" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 104px; height: 40px;"/>
|
||||
<button class="button_disabled _px10 _ml8 sk-button sk-animation-shine-2" disabled="" size="mini" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 104px; height: 40px;"/>
|
||||
</view>
|
||||
</view>
|
||||
</box>
|
||||
</view>
|
||||
</view>
|
||||
</showbox>
|
||||
<showbox style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="xhs-demo-card" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="xhs-demo-card-title xhs-demo-card-spiver" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="skeleton-text-block-mark sk-animation-shine-2" style="display: inline-block; position: relative; background-position-x: 0%;">二级按钮</view>
|
||||
</view>
|
||||
<view class="xhs-demo-card-content" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<box class="box" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="padding: 16px; border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button-transparent sk-button sk-animation-shine-2" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
<button class="_ui-button-transparent-disabled _mt8 sk-button sk-animation-shine-2" disabled="" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
</view>
|
||||
<view class="_mt8" style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button-transparent _px10 sk-button sk-animation-shine-2" size="mini" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 106px; height: 40px;"/>
|
||||
<button class="_ui-button-transparent-disabled _px10 _ml8 sk-button sk-animation-shine-2" disabled="" size="mini" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 106px; height: 40px;"/>
|
||||
</view>
|
||||
</view>
|
||||
</box>
|
||||
</view>
|
||||
</view>
|
||||
</showbox>
|
||||
<showbox style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="xhs-demo-card" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="xhs-demo-card-title xhs-demo-card-spiver" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="skeleton-text-block-mark sk-animation-shine-2" style="display: inline-block; position: relative; background-position-x: 0%;">三级按钮</view>
|
||||
</view>
|
||||
<view class="xhs-demo-card-content" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<box class="box" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="padding: 16px; border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button-gray sk-button sk-animation-shine-2" hover-class="none xhs_0_none" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
<button class="_mt8 sk-button sk-animation-shine-2" disabled="" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
</view>
|
||||
<view class="_mt8" style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button-gray _px10 sk-button sk-animation-shine-2" size="mini" hover-class="none xhs_0_none" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 104px; height: 40px;"/>
|
||||
<button class="_px10 _ml8 sk-button sk-animation-shine-2" disabled="" size="mini" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 104px; height: 40px;"/>
|
||||
</view>
|
||||
</view>
|
||||
</box>
|
||||
</view>
|
||||
</view>
|
||||
</showbox>
|
||||
<showbox style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="xhs-demo-card" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="xhs-demo-card-title xhs-demo-card-spiver" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="skeleton-text-block-mark sk-animation-shine-2" style="display: inline-block; position: relative; background-position-x: 0%;">四级按钮</view>
|
||||
</view>
|
||||
<view class="xhs-demo-card-content" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<box class="box" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="padding: 16px; border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button-transparent-gray sk-button sk-animation-shine-2" hover-class="none xhs_0_none" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
<button class="_ui-button-transparent-disabled _mt8 sk-button sk-animation-shine-2" disabled="" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
</view>
|
||||
<view class="_mt8" style="border-color: rgb(238, 238, 238);">
|
||||
<button class="_ui-button-transparent-gray _px10 sk-button sk-animation-shine-2" size="mini" hover-class="none xhs_0_none" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 106px; height: 40px;"/>
|
||||
<button class="_ui-button-transparent-disabled _px10 _ml8 sk-button sk-animation-shine-2" disabled="" size="mini" style="--button-bg-color: #F7F7F7; --button-color: rgba(0, 0, 0, 0.3); --button-font-size: 13px; --button-display: inline-block; --button-line-height: 2.3; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 106px; height: 40px;"/>
|
||||
</view>
|
||||
</view>
|
||||
</box>
|
||||
</view>
|
||||
</view>
|
||||
</showbox>
|
||||
<showbox style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="xhs-demo-card" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="xhs-demo-card-title xhs-demo-card-spiver" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="skeleton-text-block-mark sk-animation-shine-2" style="display: inline-block; position: relative; background-position-x: 0%;">加载状态</view>
|
||||
</view>
|
||||
<view class="xhs-demo-card-content" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<box style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="padding: 16px; border-color: rgb(238, 238, 238);">
|
||||
|
||||
<button class="_ui-button sk-button sk-animation-shine-2" hover-class="_ui-button-hover xhs_0__ui-button-hover" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
</view>
|
||||
</box>
|
||||
</view>
|
||||
</view>
|
||||
</showbox>
|
||||
</view>
|
||||
|
||||
<view class="container" style="border-color: rgb(238, 238, 238);">
|
||||
<showbox style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="xhs-demo-card" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="xhs-demo-card-title xhs-demo-card-spiver" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="skeleton-text-block-mark sk-animation-shine-2" style="display: inline-block; position: relative; background-position-x: 0%;">button演示</view>
|
||||
</view>
|
||||
<view class="xhs-demo-card-content" style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<box style="border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view style="padding: 16px; border-color: rgb(238, 238, 238);">
|
||||
|
||||
<view class="_ui-space" style="border-color: rgb(238, 238, 238);">
|
||||
<view style="border-color: rgb(238, 238, 238);">
|
||||
<button size="default" type="default" contact-id="" hover-class="button-hover xhs_0_button-hover" hover-start-time="20" hover-stay-time="70" class="sk-button sk-animation-shine-2" style="--button-bg-color: #F8F8F8; --button-color: #000000; --button-font-size: 18px; --button-display: block; --button-line-height: 2.55555556; --button-active-bg-color: #dedede; --button-active-color: rgba(0, 0, 0, 0.6); --button-border: 1px solid rgba(0, 0, 0, 0.2); --button-active-border-color: 1px solid rgba(0, 0, 0, 0.2); border-color: transparent; background-color: rgb(238, 238, 238); color: transparent; width: 378px; height: 40px;"/>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">size</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<picker range="default,mini" value="0" class="sk-animation-shine-2 skeleton-text-block-mark" style="border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">default</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">type</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<picker range="primary,default,warn" value="1" class="sk-animation-shine-2 skeleton-text-block-mark" style="border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">default</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex _jc_space-between" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">是否开启plain</text>
|
||||
</view>
|
||||
<view class="sk-animation-shine-2" style="width: 57px; height: 32px; background-color: rgba(0, 0, 0, 0); display: block;"/>
|
||||
</view>
|
||||
<view class="_dflex _jc_space-between" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">是否开启disabled</text>
|
||||
</view>
|
||||
<view class="sk-animation-shine-2" style="width: 57px; height: 32px; background-color: rgba(0, 0, 0, 0); display: block;"/>
|
||||
</view>
|
||||
<view class="_dflex _jc_space-between" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">是否开启loading</text>
|
||||
</view>
|
||||
<view class="sk-animation-shine-2" style="width: 57px; height: 32px; background-color: rgba(0, 0, 0, 0); display: block;"/>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">formType</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<picker range="submit,reset" value="-1" class="sk-animation-shine-2 skeleton-text-block-mark" style="border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">请选择</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">openType</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<picker range="share,getPhoneNumber,getUserInfo,openSetting,contact" value="-1" class="sk-animation-shine-2 skeleton-text-block-mark" style="border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">请选择</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">contactType</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<picker range="seller,goods,order" value="-1" class="sk-animation-shine-2 skeleton-text-block-mark" style="border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">请选择</picker>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">contactId</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<view class="sk-animation-shine-2" style="width: 207.602px; height: 22px; background-color: rgba(0, 0, 0, 0);"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">hoverClass</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<view class="sk-animation-shine-2" style="width: 207.602px; height: 22px; background-color: rgba(0, 0, 0, 0);"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex _jc_space-between" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">是否开启hoverStopPropagation</text>
|
||||
</view>
|
||||
<view class="sk-animation-shine-2" style="width: 57px; height: 32px; background-color: rgba(0, 0, 0, 0); display: block;"/>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">hoverStartTime</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<view class="sk-animation-shine-2" style="width: 207.602px; height: 22px; background-color: rgba(0, 0, 0, 0);"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="_dflex" style="border-color: rgb(238, 238, 238);">
|
||||
<view class="_dflex _ai_center" style="flex: 4 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<text class="sk-animation-shine-2 skeleton-text-block-mark" style="--text-display: inline; --text-selectable: none; border-color: rgb(238, 238, 238); position: relative; background-position-x: 0%;">hoverStayTime</text>
|
||||
</view>
|
||||
<view class="_ui-input" style="flex: 6 1 0%; border-color: rgb(238, 238, 238);">
|
||||
<view class="sk-animation-shine-2" style="width: 207.602px; height: 22px; background-color: rgba(0, 0, 0, 0);"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</box>
|
||||
</view>
|
||||
</view>
|
||||
</showbox>
|
||||
</view>
|
||||
106
xhs-mini-demos/component-case/button/button.xhsml
Normal file
106
xhs-mini-demos/component-case/button/button.xhsml
Normal file
@@ -0,0 +1,106 @@
|
||||
<view class="container">
|
||||
<showbox title="一级按钮">
|
||||
<box class="box">
|
||||
<view>
|
||||
<button class="_ui-button" hover-class="_ui-button-hover">
|
||||
一级按钮 Normal
|
||||
</button>
|
||||
|
||||
<button class="button_disabled _mt8" disabled>
|
||||
一级按钮 Disabled
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="_mt8">
|
||||
<button class="_ui-button _px10" size="mini" hover-class="_ui-button-hover">
|
||||
一级按钮
|
||||
</button>
|
||||
|
||||
<button class="button_disabled _px10 _ml8" disabled size="mini">
|
||||
一级按钮
|
||||
</button>
|
||||
</view>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="二级按钮">
|
||||
<box class="box">
|
||||
<view>
|
||||
<button class="_ui-button-transparent">
|
||||
二级按钮 Normal
|
||||
</button>
|
||||
|
||||
<button class="_ui-button-transparent-disabled _mt8" disabled>
|
||||
二级按钮 Disabled
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="_mt8">
|
||||
<button class="_ui-button-transparent _px10" size="mini">
|
||||
二级按钮
|
||||
</button>
|
||||
|
||||
<button class="_ui-button-transparent-disabled _px10 _ml8" disabled size="mini">
|
||||
二级按钮
|
||||
</button>
|
||||
</view>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="三级按钮">
|
||||
<box class="box">
|
||||
<view>
|
||||
<button class="_ui-button-gray" hover-class="none">
|
||||
三级按钮 Normal
|
||||
</button>
|
||||
|
||||
<button class=" _mt8" disabled>
|
||||
三级按钮 Disabled
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="_mt8">
|
||||
<button class="_ui-button-gray _px10" size="mini" hover-class="none">
|
||||
三级按钮
|
||||
</button>
|
||||
|
||||
<button class="_px10 _ml8" disabled size="mini">
|
||||
三级按钮
|
||||
</button>
|
||||
</view>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="四级按钮">
|
||||
<box class="box">
|
||||
<view>
|
||||
<button class="_ui-button-transparent-gray" hover-class="none">
|
||||
四级按钮 Normal
|
||||
</button>
|
||||
|
||||
<button class="_ui-button-transparent-disabled _mt8" disabled>
|
||||
四级按钮 Disabled
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="_mt8">
|
||||
<button class="_ui-button-transparent-gray _px10" size="mini" hover-class="none">
|
||||
四级按钮
|
||||
</button>
|
||||
|
||||
<button class="_ui-button-transparent-disabled _px10 _ml8" disabled size="mini">
|
||||
四级按钮
|
||||
</button>
|
||||
</view>
|
||||
</box>
|
||||
</showbox>
|
||||
|
||||
<showbox title="加载状态">
|
||||
<box>
|
||||
<button loading="{{loading}}" class="_ui-button" hover-class="_ui-button-hover" bindtap="changeLoading">
|
||||
点击切换按钮loading状态
|
||||
</button>
|
||||
</box>
|
||||
</showbox>
|
||||
</view>
|
||||
<include src="templates.xhsml" />
|
||||
99
xhs-mini-demos/component-case/button/templates.js
Normal file
99
xhs-mini-demos/component-case/button/templates.js
Normal file
@@ -0,0 +1,99 @@
|
||||
/** 以下内容为自动生成,请勿手动修改 */
|
||||
|
||||
module.exports = {
|
||||
data: {
|
||||
page_data_0: 0,
|
||||
|
||||
page_data_1: ["default", "mini"],
|
||||
|
||||
page_data_2: 1,
|
||||
|
||||
page_data_3: ["primary", "default", "warn"],
|
||||
|
||||
page_data_4: false,
|
||||
|
||||
page_data_5: false,
|
||||
|
||||
page_data_6: false,
|
||||
|
||||
page_data_7: -1,
|
||||
|
||||
page_data_8: ["submit", "reset"],
|
||||
|
||||
page_data_9: -1,
|
||||
|
||||
page_data_10: [
|
||||
"share",
|
||||
"getPhoneNumber",
|
||||
"getUserInfo",
|
||||
"openSetting",
|
||||
"contact",
|
||||
],
|
||||
|
||||
page_data_11: -1,
|
||||
|
||||
page_data_12: ["seller", "goods", "order"],
|
||||
|
||||
page_data_13: ``,
|
||||
|
||||
page_data_14: `button-hover`,
|
||||
|
||||
page_data_15: false,
|
||||
|
||||
page_data_16: `20`,
|
||||
|
||||
page_data_17: `70`,
|
||||
},
|
||||
|
||||
page_fun_0(e) {
|
||||
this.setData("page_data_0", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_1(e) {
|
||||
this.setData("page_data_2", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_2(e) {
|
||||
this.setData("page_data_4", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_3(e) {
|
||||
this.setData("page_data_5", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_4(e) {
|
||||
this.setData("page_data_6", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_5(e) {
|
||||
this.setData("page_data_7", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_6(e) {
|
||||
this.setData("page_data_9", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_7(e) {
|
||||
this.setData("page_data_11", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_8(e) {
|
||||
this.setData("page_data_13", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_9(e) {
|
||||
this.setData("page_data_14", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_10(e) {
|
||||
this.setData("page_data_15", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_11(e) {
|
||||
this.setData("page_data_16", e.detail.value);
|
||||
},
|
||||
|
||||
page_fun_12(e) {
|
||||
this.setData("page_data_17", e.detail.value);
|
||||
},
|
||||
};
|
||||
204
xhs-mini-demos/component-case/button/templates.xhsml
Normal file
204
xhs-mini-demos/component-case/button/templates.xhsml
Normal file
@@ -0,0 +1,204 @@
|
||||
<!-- 以下内容为自动生成,请勿手动修改 -->
|
||||
|
||||
<view class="container">
|
||||
<showbox title="button演示">
|
||||
<box>
|
||||
<view class="_ui-space">
|
||||
<view>
|
||||
<button
|
||||
size="{{page_data_1[page_data_0]}}"
|
||||
type="{{page_data_3[page_data_2]}}"
|
||||
plain="{{page_data_4}}"
|
||||
disabled="{{page_data_5}}"
|
||||
loading="{{page_data_6}}"
|
||||
form-type="{{page_data_8[page_data_7]}}"
|
||||
open-type="{{page_data_10[page_data_9]}}"
|
||||
contact-type="{{page_data_12[page_data_11]}}"
|
||||
contact-id="{{page_data_13}}"
|
||||
hover-class="{{page_data_14}}"
|
||||
hover-stop-propagation="{{page_data_15}}"
|
||||
hover-start-time="{{page_data_16}}"
|
||||
hover-stay-time="{{page_data_17}}"
|
||||
>
|
||||
我是一个按钮
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>size</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<picker
|
||||
value="{{page_data_0}}"
|
||||
range="{{page_data_1}}"
|
||||
bindchange="page_fun_0"
|
||||
>
|
||||
{{page_data_1[page_data_0] ?? '请选择'}}
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>type</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<picker
|
||||
value="{{page_data_2}}"
|
||||
range="{{page_data_3}}"
|
||||
bindchange="page_fun_1"
|
||||
>
|
||||
{{page_data_3[page_data_2] ?? '请选择'}}
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex _jc_space-between">
|
||||
<view class="_dflex _ai_center">
|
||||
<text>是否开启plain</text>
|
||||
</view>
|
||||
<switch
|
||||
checked="{{page_data_4}}"
|
||||
color="rgba(255, 36, 66, 1)"
|
||||
bindchange="page_fun_2"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="_dflex _jc_space-between">
|
||||
<view class="_dflex _ai_center">
|
||||
<text>是否开启disabled</text>
|
||||
</view>
|
||||
<switch
|
||||
checked="{{page_data_5}}"
|
||||
color="rgba(255, 36, 66, 1)"
|
||||
bindchange="page_fun_3"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="_dflex _jc_space-between">
|
||||
<view class="_dflex _ai_center">
|
||||
<text>是否开启loading</text>
|
||||
</view>
|
||||
<switch
|
||||
checked="{{page_data_6}}"
|
||||
color="rgba(255, 36, 66, 1)"
|
||||
bindchange="page_fun_4"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>formType</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<picker
|
||||
value="{{page_data_7}}"
|
||||
range="{{page_data_8}}"
|
||||
bindchange="page_fun_5"
|
||||
>
|
||||
{{page_data_8[page_data_7] ?? '请选择'}}
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>openType</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<picker
|
||||
value="{{page_data_9}}"
|
||||
range="{{page_data_10}}"
|
||||
bindchange="page_fun_6"
|
||||
>
|
||||
{{page_data_10[page_data_9] ?? '请选择'}}
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>contactType</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<picker
|
||||
value="{{page_data_11}}"
|
||||
range="{{page_data_12}}"
|
||||
bindchange="page_fun_7"
|
||||
>
|
||||
{{page_data_12[page_data_11] ?? '请选择'}}
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>contactId</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<input
|
||||
value="{{page_data_13}}"
|
||||
placeholder="contactId"
|
||||
type="text"
|
||||
bindinput="page_fun_8"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>hoverClass</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<input
|
||||
value="{{page_data_14}}"
|
||||
placeholder="hoverClass"
|
||||
type="text"
|
||||
bindinput="page_fun_9"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex _jc_space-between">
|
||||
<view class="_dflex _ai_center">
|
||||
<text>是否开启hoverStopPropagation</text>
|
||||
</view>
|
||||
<switch
|
||||
checked="{{page_data_15}}"
|
||||
color="rgba(255, 36, 66, 1)"
|
||||
bindchange="page_fun_10"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>hoverStartTime</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<input
|
||||
value="{{page_data_16}}"
|
||||
placeholder="hoverStartTime"
|
||||
type="text"
|
||||
bindinput="page_fun_11"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="_dflex">
|
||||
<view style="flex: 4" class="_dflex _ai_center"
|
||||
><text>hoverStayTime</text></view
|
||||
>
|
||||
<view style="flex: 6" class="_ui-input">
|
||||
<input
|
||||
value="{{page_data_17}}"
|
||||
placeholder="hoverStayTime"
|
||||
type="text"
|
||||
bindinput="page_fun_12"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</box>
|
||||
</showbox>
|
||||
</view>
|
||||
Reference in New Issue
Block a user