12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <template>
- <view class="lighting-index">
- <view class="lighting-box" @click="isOpen = !isOpen">
- <view class="lighting-icon">
- <uni-icons type="icon-diandeng" custom-prefix="iconfont" size="60" color="#a1a1a1"></uni-icons>
- </view>
- <view class="lighting-content">
- <uni-icons type="icon-caozuo-kaiguan" custom-prefix="iconfont" size="40"
- :color="isOpen ? '#08979c' : '#cccccc'"></uni-icons>
- <view class="lighting-title">{{title}}</view>
- <view class="lighting-space">{{space}}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- props: ['title', 'space'],
- data() {
- return {
- isOpen: false
- }
- },
- }
- </script>
- <style lang="scss">
- .lighting-index {
- padding: 60rpx;
- .lighting-box {
- background: #fff;
- width: 560rpx;
- height: 560rpx;
- margin: 0 auto;
- background: linear-gradient(to bottom, #dcdee1, #f2f2f2);
- box-shadow: 0px 5px 10px rgba(3, 3, 3, 0.08);
- display: flex;
- flex-direction: column;
- .lighting-icon {
- flex: 1;
- text-align: center;
- padding-top: 40rpx;
- }
- .lighting-content {
- text-align: center;
- padding-bottom: 30rpx;
- color: $uni-secondary-color;
- font-weight: 300;
- }
- .lighting-title {
- margin: 30rpx 0 15rpx 0;
- }
- .lighting-space {
- font-size: 12px;
- }
- }
- }
- </style>
|