调整分包,完成隐私协议(样式待优化)
This commit is contained in:
20
childPackage/miniprogram_npm/towxml/todogroup/todogroup.js
Normal file
20
childPackage/miniprogram_npm/towxml/todogroup/todogroup.js
Normal file
@@ -0,0 +1,20 @@
|
||||
Component({
|
||||
options: {
|
||||
styleIsolation: 'shared'
|
||||
},
|
||||
properties: {
|
||||
data: {
|
||||
type: Object,
|
||||
value: {}
|
||||
}
|
||||
},
|
||||
data: {
|
||||
},
|
||||
methods: {
|
||||
_change:function(...arg){
|
||||
if(global._events && typeof global._events.change === 'function'){
|
||||
global._events.change(...arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"decode": "../decode"
|
||||
}
|
||||
}
|
12
childPackage/miniprogram_npm/towxml/todogroup/todogroup.wxml
Normal file
12
childPackage/miniprogram_npm/towxml/todogroup/todogroup.wxml
Normal file
@@ -0,0 +1,12 @@
|
||||
<checkbox-group wx:if="{{data.tag === 'todogroup'}}" class="{{data.attrs.class}}" bindchange="_change">
|
||||
<block wx:if="{{data.children}}" wx:for="{{data.children}}" wx:for-item="item" wx:key="i">
|
||||
<label wx:if="{{item.tag}}" class="{{item.attrs.class}}">
|
||||
<block wx:if="{{item.children}}" wx:for="{{item.children}}" wx:for-item="item" wx:key="i">
|
||||
<!--解析选择框-->
|
||||
<checkbox wx:if="{{item.tag === 'checkbox'}}" class="{{item.attrs.class}}" value="{{item.attrs.value}}" data-_e="{{item}}" checked="{{item.attrs.checked}}" disabled="{{item.attrs.disabled}}"/>
|
||||
<!--解析文字-->
|
||||
<decode wx:if="{{item.children}}" nodes="{{item}}"/>
|
||||
</block>
|
||||
</label>
|
||||
</block>
|
||||
</checkbox-group>
|
@@ -0,0 +1,3 @@
|
||||
.h2w__todolist {
|
||||
display:block;
|
||||
}
|
Reference in New Issue
Block a user