提交 eb2e63f7 编写于 作者: D dongwei

add test cases

Signed-off-by: Ndongwei <dongwei@kaihongdigi.com>
上级 5299c64b
...@@ -352,6 +352,7 @@ picker-view { ...@@ -352,6 +352,7 @@ picker-view {
selected-font-size: 12px; selected-font-size: 12px;
height: 60px; height: 60px;
disappear-font-size: 12px; disappear-font-size: 12px;
background-color: yellow;
} }
#pickerViewText { #pickerViewText {
background-color: deeppink; background-color: deeppink;
......
...@@ -140,6 +140,15 @@ ...@@ -140,6 +140,15 @@
<picker-view id="ifPropTrue" <picker-view id="ifPropTrue"
if="true"> if="true">
</picker-view> </picker-view>
<picker-view id="ifPropTrue"
elif="true">
</picker-view>
<picker-view id="ifPropTrue"
elif="false">
</picker-view>
<picker-view id="ifPropTrue"
elif="">
</picker-view>
<text class="sub-title"> <text class="sub-title">
渲染属性 -- show 渲染属性 -- show
...@@ -164,44 +173,89 @@ ...@@ -164,44 +173,89 @@
<text class="sub-title"> <text class="sub-title">
picker-view特有属性 -- type picker-view特有属性 -- type
</text> </text>
<!-- <picker-view--> <picker-view
<!-- id="pickerViewText"--> id="pickerViewText"
<!-- type="text"--> type="text"
<!-- selected="0"--> selected="0"
<!-- range="{{rangetext}}"--> range="{{rangetext}}"
<!-- indicatorprefix="前缀"--> indicatorprefix="前缀"
<!-- indicatorsuffix="后缀"--> indicatorsuffix="后缀"
<!-- ></picker-view>--> ></picker-view>
<!-- <picker-view--> <picker-view
<!-- id="pickerViewTime"--> id="pickerViewTime"
<!-- type="time"--> type="time"
<!-- containsecond="true"--> containsecond="true"
<!-- selected="11:22:30"--> selected="11:22:30"
<!-- hours="12"--> hours="12"
<!-- ></picker-view>--> ></picker-view>
<!-- <picker-view--> <picker-view
<!-- id="pickerViewDate"--> id="pickerViewDate"
<!-- type="date"--> type="date"
<!-- start="2002-2-5"--> start="2002-2-5"
<!-- end="2030-6-5"--> end="2030-6-5"
<!-- selected="2022-2-22"--> selected="2022-2-22"
<!-- lunar="false"--> lunar="false"
<!-- lunarswitch="true"--> lunarswitch="true"
<!-- ></picker-view>--> ></picker-view>
<!-- <picker-view--> <picker-view
<!-- id="pickerViewDatetime"--> id="pickerViewDatetime"
<!-- type="datetime"--> type="datetime"
<!-- selected=""--> selected=""
<!-- hours="12"--> hours="12"
<!-- lunar="false"--> lunar="false"
<!-- lunarswitch="true"--> lunarswitch="true"
<!-- ></picker-view>--> ></picker-view>
<!-- <picker-view--> <picker-view
<!-- id="pickerViewMultiText"--> id="pickerViewMultiText"
<!-- type="multi-text"--> type="multi-text"
<!-- columns="3"--> columns="3"
<!-- range="{{multitext}}"--> range="{{multitext}}"
<!-- selected="{{multitextselect}}"--> selected="{{multitextselect}}"
<!-- ></picker-view>--> ></picker-view>
<text class="sub-title">
picker-view特有属性 -- picker-view
</text>
<picker-view
class="pickerView"
type="text"
range="{{rangetext}}"
picker-view="picker-view"
></picker-view>
<picker-view
class="pickerView"
type="text"
range="{{rangetext}}"
picker-view=""
></picker-view>
<!--<text class="sub-title">
picker-view特有属性 -- shareid
</text>
<picker-view
class="pickerView"
type="text"
range="{{rangetext}}"
shareid="shareid"
></picker-view>
<picker-view
class="pickerView"
type="text"
range="{{rangetext}}"
shareid=""
></picker-view>-->
<text class="sub-title">
picker-view特有属性 -- tid
</text>
<picker-view
class="pickerView"
type="text"
range="{{rangetext}}"
tid="tid"
></picker-view>
<picker-view
class="pickerView"
type="text"
range="{{rangetext}}"
tid=""
></picker-view>
</div> </div>
</div> </div>
...@@ -48,10 +48,19 @@ export default { ...@@ -48,10 +48,19 @@ export default {
showPropTrue : null, showPropTrue : null,
showPropFalse : null, showPropFalse : null,
showPropNone : null, showPropNone : null,
multitext:[["a", "b", "c"], ["e", "f", "g"], ["h", "i"], ["k", "l", "m"]],
rangetext:['15', "20", "25"],
// multitextselect:[1,2,0],
// pickerViewText: null,
// pickerViewDate: null,
// pickerViewTime: null,
// pickerViewDatetime: null,
// pickerViewMultiText: null
}, },
onShow(){ onShow(){
this.getCommonPropValues(); this.getCommonPropValues();
// this.getSpecificPropValues();
globalThis.value = { globalThis.value = {
idProp : this.idProp, idProp : this.idProp,
classProp : this.classProp, classProp : this.classProp,
...@@ -121,4 +130,11 @@ export default { ...@@ -121,4 +130,11 @@ export default {
this.showPropFalse = this.$element("showPropFalse").getInspector() this.showPropFalse = this.$element("showPropFalse").getInspector()
this.showPropNone = this.$element("showPropNone").getInspector() this.showPropNone = this.$element("showPropNone").getInspector()
}, },
getSpecificPropValues () {
// this.pickerViewViewText = this.$element("pickerViewViewText").getInspector()
// this.pickerViewViewDate = this.$element("pickerViewViewDate").getInspector()
// this.pickerViewViewTime = this.$element("pickerViewViewTime").getInspector()
// this.pickerViewViewDatetime = this.$element("pickerViewViewDatetime").getInspector()
// this.pickerViewViewMultiText = this.$element("pickerViewViewMultiText").getInspector()
}
} }
...@@ -243,7 +243,7 @@ picker { ...@@ -243,7 +243,7 @@ picker {
.event4{ .event4{
width: 100%; width: 100%;
height: 20px; height: 40px;
background-color: blanchedalmond; background-color: blanchedalmond;
} }
......
...@@ -152,8 +152,8 @@ ...@@ -152,8 +152,8 @@
<text class="sub-title"> <text class="sub-title">
picker-view特有事件1 picker-view特有事件1
</text> </text>
<picker-view id="event4" class="event4" type="text" value="特有事件1" range="{{ rangetext }}" <picker-view id="event4" class="event4" type="multi-text" value="特有事件1" range="{{ multitext }}"
onchange="textonchange" oncancel="textoncancel"> onchange="multiTextChange" oncolumnchange="columnChange">
</picker-view> </picker-view>
</div> </div>
<div style="background-color: #000000; width: 100%; height: 2px;"> <div style="background-color: #000000; width: 100%; height: 2px;">
......
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
data: { data: {
defaultTime: "", defaultTime: "",
time: "", time: "",
multitext:[["a", "b", "c"], ["e", "f", "g"], ["h", "i"], ["k", "l", "m"]],
}, },
onMenuSelected(e) { onMenuSelected(e) {
prompt.showToast({ prompt.showToast({
...@@ -545,4 +546,10 @@ export default { ...@@ -545,4 +546,10 @@ export default {
concat(hours, minutes) { concat(hours, minutes) {
return `${this.fill(hours)}:${this.fill(minutes)}`; return `${this.fill(hours)}:${this.fill(minutes)}`;
}, },
multiTextChange() {
prompt.showToast({ message:"multiTextChange" });
},
columnChange () {
prompt.showToast({ message:"columnChange" });
},
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册