Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wx-boss
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
wx-boss
Commits
448a2cb2
Commit
448a2cb2
authored
Dec 31, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改切换方法传参
parent
dbb509cf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
index.js
miniprogram/custom-tab-bar/index.js
+3
-3
index.ts
miniprogram/custom-tab-bar/index.ts
+1
-1
index.wxml
miniprogram/custom-tab-bar/index.wxml
+3
-2
No files found.
miniprogram/custom-tab-bar/index.js
View file @
448a2cb2
"use strict"
;
Component
({
properties
:
{
checked
:
{
type
:
Number
,
value
:
0
},
checked
:
{
type
:
String
,
value
:
''
},
listData
:
{
type
:
Array
,
value
:
[]
},
},
lifetimes
:
{
...
...
@@ -31,4 +31,4 @@ Component({
}
},
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsU0FBUyxDQUFDO0lBSVIsVUFBVSxFQUFFO1FBQ1YsT0FBTyxFQUFFLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxLQUFLLEVBQUUsQ0FBQyxFQUFFO1FBQ25DLFFBQVEsRUFBRSxFQUFFLElBQUksRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEVBQUUs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cblxuICB9LFxuXG4gIC8qKlxuICAgKiDnu4Tku7bnmoTmlrnms5XliJfooahcbiAgICovXG4gIG1ldGhvZHM6IHtcbiAgICBjbGlja0hhbmRsZShlKSB7XG4gICAgICBsZXQgeyBwYXRoLCBpbmRleCB9ID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQ7XG4gICAgICBsZXQgbXlFdmVudERldGFpbCA9IHtcbiAgICAgICAgcGF0aCwgaW5kZXgsXG4gICAgICB9IC8vIGRldGFpbOWvueixoe+8jOaPkOS+m+e7meS6i+S7tuebkeWQrOWHveaVsFxuICAgICAgdGhpcy50cmlnZ2VyRXZlbnQoJ2N1c3RvbWV2ZW50JywgbXlFdmVudERldGFpbClcbiAgICB9XG4gIH0sXG59KTtcbiJdfQ==
\ No newline at end of file
miniprogram/custom-tab-bar/index.ts
View file @
448a2cb2
...
...
@@ -4,7 +4,7 @@ Component({
* 组件的属性列表
*/
properties
:
{
checked
:
{
type
:
Number
,
value
:
0
},
checked
:
{
type
:
String
,
value
:
''
},
listData
:
{
type
:
Array
,
value
:
[]
},
},
lifetimes
:
{
...
...
miniprogram/custom-tab-bar/index.wxml
View file @
448a2cb2
<!-- custom-tab-bar/index.wxml -->
<view class="custom-tab-bar">
<view wx:for="{{listData}}" wx:key="index" class="custom-tab-bar-item {{checked === i
ndex?'checked':''}}" data-index="{{index
}}" data-path="{{item.pagePath}}" bindtap="clickHandle">
<image class="custom-tab-bar-icon" src="{{checked === i
ndex
? item.selectedIconPath : item.iconPath}}"></image>
<view wx:for="{{listData}}" wx:key="index" class="custom-tab-bar-item {{checked === i
tem.code?'checked':''}}" data-index="{{item.code
}}" data-path="{{item.pagePath}}" bindtap="clickHandle">
<image class="custom-tab-bar-icon" src="{{checked === i
tem.code
? item.selectedIconPath : item.iconPath}}"></image>
<view>{{item.text}}</view>
</view>
</view>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment