提交 4599842e 编写于 作者: D dongwei 提交者: wanggang

add test cases

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