-
Notifications
You must be signed in to change notification settings - Fork 669
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
619 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<template> | ||
<view> | ||
<uni-card is-full> | ||
<text class="uni-h6">通过数据驱动的单选框和复选框,可直接通过连接 uniCloud 获取数据,同时可以配合表单组件 uni-forms 使用</text> | ||
</uni-card> | ||
<uni-section title="本地数据" type="line"> | ||
<uni-data-select v-model="value" :localdata="range" @change="change"></uni-data-select> | ||
</uni-section> | ||
<uni-section title="云端数据" subTitle="连接云服务空间, 且存在相关的数据表才能生效(此处演示, 未连接云服务空间, 故不生效)" type="line"> | ||
<uni-data-select collection="opendb-app-list" field="appid as value, name as text" v-mode="appid" /> | ||
</uni-section> | ||
<uni-section title="是否可清除已选项" type="line"> | ||
<uni-data-select v-model="value" :localdata="range" @change="change" :clear="false"></uni-data-select> | ||
</uni-section> | ||
<uni-section title="配置左侧标题" type="line"> | ||
<uni-data-select v-model="value" :localdata="range" @change="change" label="应用选择"></uni-data-select> | ||
</uni-section> | ||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
value: 0, | ||
range: [{"value": 0,"text": "篮球"}, | ||
{"value": 1,"text": "足球"}, | ||
{"value": 2,"text": "游泳"}] | ||
} | ||
}, | ||
methods: { | ||
change(e){ | ||
console.log('e:',e); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
.text { | ||
font-size: 12px; | ||
color: #666; | ||
margin-top: 5px; | ||
} | ||
.uni-px-5 { | ||
padding-left: 10px; | ||
padding-right: 10px; | ||
} | ||
.uni-pb-5 { | ||
padding-bottom: 10px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
## 0.1.0(2022-04-22) | ||
- 初始化 |
Oops, something went wrong.