margin 和 padding;
<view class="m pl">有外距, 和左内衬</view>
<view class="p-small">小内衬</view>
<alert>消息</alert>
<alert class="alert-success">成功</alert>
<alert class="alert-error">错误</alert>
<alert class="alert-warn">警示</alert>
<dialog></dialog>
<stack>子元素向下排列</stack>
<stack class="stack-row">向右排列</stack>
<stack class="flex-center">子元素居中</stack>
<stack class="flex-center-j">主轴元素居中</stack>
<stack class="flex-center-a">次轴元素居中</stack>
<stack class="flex-grow">撑开</stack>
<stack class="stack-spacing">子项目间距</stack>
<stack class="stack-spacing-">子项目间距1</stack>
<grid class="grid-2">2列</grid>
<grid class="grid-3">3列</grid>
<grid class="grid-4">4列</grid>
<grid class="grid-5">5列</grid>
<grid class="grid-gap">排水沟(间距)</grid>
<grid class="grid-gap-1">大排水沟 </grid>
<icon src="VolunteerActivismIcon"></icon>
<icon class="avatar" src="VolunteerActivismIcon"></icon>
<icon class="avatar" src="01/chengzhong"></icon>
<divider></divider>
<chip>突出显示</chip>
<chip class="chip-disabled">灰色灰色</chip>
<chip class="chip-secondary">次要</chip>
<card>
<!-- 头 -->
<stack class="stack-row pr flex-center-a">
<icon class="avatar m" src="VolunteerActivismIcon"></icon>
<stack class="m">
<view class="text-title">标题</view>
<view class="text-subtitle">次标题</view>
</stack>
<button class="button-icon button-contained">
<icon src="CloseIcon"></icon>
</button>
</stack>
<!-- 分隔线 -->
<divider></divider>
<!-- 图片 -->
<stack class="card-image">
<image src="https://yun.gansudaily.com.cn/upload/vote/807102f6624af82804621af22be35f91/image/1649386474265807f7ca449148461a01b6aa8b5334380.jpeg"></image>
<label class="label-c">
<view class="bg-primary p radius-small">标签</view>
</label>
</stack>
<view class="p">内容</view>
<!-- 按钮 -->
<view class="stack stack-row flex-end">
<view class="flex-grow"></view>
<button class="button-icon button-contained">
<icon src="CloseIcon"></icon>
</button>
</view>
</card>
将 card 或其他 内容放入 dialog 即可
<dialog>
<card>...</card>
</dialog>
下抽屉及关闭事件, 通过 open 控制销毁和显示
<dialog bottom="{{true}}" wx:if="{{open}}" bind:onClose="onClose">
<alert class="alert-success">msg</alert>
</dialog>
onClose() {
this.setData({ open: false })
},
formcontrol-filled 为填充样式 默认为 outlined
<formcontrol class="formcontrol-filled">
<label>关键字</label>
<input placeholder="x" />
</formcontrol>
button-contained 实体按钮 button-outlined 线框按钮 button-icon 图标按钮
<button class="button-icon button-contained">
<icon src="CloseIcon"></icon>
</button>
<tabs
value="{{tabsIndex}}"
tabs="{{['开始','第二']}}"
bind:change="onTabsChange"
></tabs>
<swiper class="swiper" bindchange="onTabsChange" current="{{tabsIndex}}">
<swiper-item>
<view>tab1</view>
</swiper-item>
<swiper-item>
<view>tab2</view>
</swiper-item>
</swiper>
两个必须的值
data:{ tabsIndex:0 },
onTabsChange(e) {
this.setData({ tabsIndex: e.detail.current });
},
1 横条 2 伸缩条 3 带圆圈长条 4 进度条 属性: value:number 进度值 0-1; color:string 颜色 5 缓冲条 属性: color:string 颜色 6 loop 转圈图标 7 圆形进度
<skeleton modes="{{[1,2,3, 4, 5, 6]}}" value="{{.5}}"></skeleton>
玉东数据是一家专注于互联网应用开发的企业,由从业多年的技术专家组成,在应用开发、网络运维等方面有广泛的经验和实力。
技术涵盖最新的 Web、小程序、Flutter、Android、iOS等多个领域的前沿技术。
商务合作,请微信扫码联系我: