feat: init fitness-coach (backend + miniprogram)
- backend: NestJS service with exercise/plan data - miniprogram: WeChat mini program client - exclude node_modules, dist, runtime data-store, local env
This commit is contained in:
16
miniprogram/components/chip/index.js
Normal file
16
miniprogram/components/chip/index.js
Normal file
@@ -0,0 +1,16 @@
|
||||
Component({
|
||||
properties: {
|
||||
label: { type: String, value: '' },
|
||||
active: { type: Boolean, value: false },
|
||||
color: { type: String, value: '' },
|
||||
value: { type: String, value: '' }
|
||||
},
|
||||
methods: {
|
||||
onTap() {
|
||||
this.triggerEvent('tap', {
|
||||
value: this.data.value,
|
||||
label: this.data.label
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
miniprogram/components/chip/index.json
Normal file
4
miniprogram/components/chip/index.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
6
miniprogram/components/chip/index.wxml
Normal file
6
miniprogram/components/chip/index.wxml
Normal file
@@ -0,0 +1,6 @@
|
||||
<view
|
||||
class="chip {{active ? 'chip--active' : ''}}"
|
||||
style="{{color ? 'border-color:' + color + '66; color:' + color : ''}}"
|
||||
bindtap="onTap">
|
||||
<text>{{label}}</text>
|
||||
</view>
|
||||
18
miniprogram/components/chip/index.wxss
Normal file
18
miniprogram/components/chip/index.wxss
Normal file
@@ -0,0 +1,18 @@
|
||||
.chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 12rpx 26rpx;
|
||||
border-radius: 999rpx;
|
||||
background: var(--surface-2);
|
||||
color: var(--text-2);
|
||||
font-size: 24rpx;
|
||||
border: 1rpx solid var(--line);
|
||||
transition: all .15s ease;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.chip--active {
|
||||
background: var(--gold-soft);
|
||||
color: var(--gold-2);
|
||||
border-color: var(--gold-line);
|
||||
}
|
||||
Reference in New Issue
Block a user