mini-form-render 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
<template>
|
2
2
|
<view class="basic-picker">
|
3
3
|
<view class="^form-item-title">{{item.title}}</view>
|
4
|
-
<picker
|
4
|
+
<picker
|
5
|
+
wx:model="{{resultIndex}}"
|
6
|
+
wx:model-event="change"
|
7
|
+
range="{{item.customData.pickerArr}}"
|
8
|
+
>
|
5
9
|
<view class="picker-box">
|
6
10
|
<view class="picker-show-title">
|
7
11
|
{{item.customData.pickerArr[resultIndex]}}
|
8
12
|
</view>
|
9
|
-
<image class="picker-title-arrow" src="
|
13
|
+
<image class="picker-title-arrow" src="https://aipaint.lihuanyu.com/common/caret-right.svg" mode="widthFix"></image>
|
10
14
|
</view>
|
11
15
|
</picker>
|
12
16
|
</view>
|
package/src/components/form.mpx
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<view class="mini-form-container">
|
3
|
-
<view wx:for="{{scheme.properties}}">
|
3
|
+
<view wx:for="{{scheme.properties}}" wx:key="key">
|
4
4
|
<view class="mini-form-item {{index !== scheme.properties.length - 1 ? 'retina-border-bottom' : ''}}">
|
5
5
|
<basic-picker wx:if="{{item.widget === 'picker'}}" item="{{item}}" wx:model="{{formRes[item.key]}}"/>
|
6
6
|
<basic-input wx:else item="{{item}}" wx:model="{{formRes[item.key]}}"/>
|