lxui-uni 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
- # lxui-uni
2
-
3
- ### npm安装
4
- ```sh
5
- npm install lxui-uni -S
6
- ```
1
+ # lxui-uni
2
+
3
+ ### npm安装
4
+
5
+ ```sh
6
+ npm install lxui-uni -S
7
+ ```
8
+
9
+ ### 文档地址:
10
+
11
+ https://lalalalaxx.github.io/lxui-uni/
@@ -1,251 +1,251 @@
1
- <script lang="ts" setup>
2
- /*
3
- * @description: 头部组件
4
- * @fileName: Header.vue
5
- * @params
6
- * @author: lxx
7
- * @date: 2023-07-16 09:32:09
8
- * @version: V1.0.2
9
- */
10
- import { goToPage } from '../../libs/util'
11
- import { type CSSProperties, computed, ref, watchEffect } from 'vue'
12
-
13
- type headerInt = {
14
- title: string
15
- // 头部高度 默认为44px (微信小程序不可用)
16
- headerHeight?: number
17
- // 是否显示左侧内容
18
- leftIconShow?: boolean
19
- // 样式部分
20
- backgroundColor?: string
21
- backgroundColor2?: string
22
- textColor?: string
23
- textFontSize?: number
24
- // 是否需要生成和头部高度相同的盒子
25
- isShowHeaderBox?: boolean
26
- positionState?: string
27
- isShowShadow?: boolean
28
- isBlackIcon?: boolean
29
- // 头部没有右侧盒子,true:左中右结构 false:左中结构(小程序可以为左中右结构但是没有右侧盒子)
30
- isHaveRightBox?: boolean
31
- }
32
-
33
- const props = withDefaults(defineProps<headerInt>(), {
34
- // 头部高度 默认为44px (微信小程序不可用)
35
- headerHeight: 44,
36
- // 是否显示左侧内容
37
- leftIconShow: true,
38
- // 样式部分
39
- backgroundColor: '#ffffff', //linear-gradient(90deg, rgba(10, 207, 254, 1) 0%, rgba(74, 92, 255, 1) 100%)
40
- backgroundColor2: '#ffffff',
41
- textColor: '#000',
42
- textFontSize: 34,
43
- title: '标题',
44
- // 是否需要生成和头部高度相同的盒子
45
- isShowHeaderBox: true,
46
- positionState: 'fixed',
47
- isShowShadow: false,
48
- isBlackIcon: true, // 是否为黑色图标
49
- isHaveRightBox: true
50
- })
51
-
52
- let { statusBarHeight } = uni.getSystemInfoSync()
53
- // #ifdef MP-WEIXIN
54
- // 胶囊状态
55
- let menuButton = uni.getMenuButtonBoundingClientRect()
56
- // 微信头部宽度
57
- let wxHeaderWidth = menuButton.left - 10
58
- // 上边距
59
- statusBarHeight = menuButton.top
60
- // #endif
61
-
62
- // padding的高度(防止头部塌陷)
63
- const fillBoxHeight = ref(statusBarHeight + 3)
64
-
65
- // 设置header的高度
66
- const headerHeightRef = ref(0)
67
- watchEffect(() => {
68
- headerHeightRef.value = props.headerHeight
69
- // #ifdef MP-WEIXIN
70
- // 中间高度
71
- headerHeightRef.value = menuButton.height
72
- // #endif
73
- })
74
- // console.log('statusBarHeight', statusBarHeight)
75
-
76
- const style = computed(() => {
77
- return {
78
- boxShadow: props.isShowShadow ? '0 0 8rpx -3rpx #333' : '0 0 0 0 #333',
79
- background: props.backgroundColor,
80
- color: props.textColor,
81
- position: props.positionState
82
- } as CSSProperties
83
- })
84
- // 返回上一页(如没有页面返回首页)
85
- const goBack = () => {
86
- if (getCurrentPages().length <= 1) {
87
- goToPage({
88
- url: 'pages/index/index',
89
- mode: 'redirectTo'
90
- })
91
- } else {
92
- uni.navigateBack()
93
- }
94
- }
95
-
96
- const backIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACMklEQVR4nO2av0uVURjHPyiEYgkuoVC4ODSK2pRDYFOENOQP6A+IEgknkWgKgqTEP6AaHIKyhqhGiSgVpKwGBweLBMHZcjAK47xcXrxxn6el5/pwzvnAme5wv5/ve+/hPO/7kslkMplMxjsjwCdgB7iV2tW6Aez/tW46yFUXpmvIh/U6AXfuCvJhnXOQz5R7ivz1iL0LZhX5Sw7ymTIviG8DpyP2pg14Kch/BjodZDSjHdgQ5D8CrZF6F3QD3wT5VeCog4xm9AD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w3AY+N8JN1hY8pYCRCG5uMz6citF07MQRcMT6/JyIHHWWth+KWvG48BsrR1MeATl0MSLjcBgFSsvDRqfH81AVonQ5IeBhLghuMDu4KSHgELEhdgNb2wPbXk2EluKGko6EN0KfAaOoCtDYEJHwEVqYuQIpDkBlDgh58jqcuQIpjsM+BwXFb6gKkeOatlSOD7BC7ocLzGzoKVw6kLqBTNwMSDrVBgJSsHw63QYDW+YCEM20QICWLqIk2CJDAS5EUW+0jqQuQ4h1Ai+nu9YMbIguQYvCzeAssT12A1lbgpyFB3ygbdRB9lpoESPEekbV+uBSr/zF2hevihYiMiciXHu0vcdPLGu+ATq0C3nX9+/poWGcRmUwmk8lk+kRE/gCfWLdyj0KPNgAAAABJRU5ErkJggg=='
98
- </script>
99
-
100
- <template>
101
- <!-- #ifndef MP-TOUTIAO -->
102
- <view class="header_box">
103
- <view class="header_main" :style="style">
104
- <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
105
- <!-- 标准的左中右结构 -->
106
- <view v-if="isHaveRightBox" class="header flex-center-between" :style="{ height: headerHeightRef + 'px' }">
107
- <view class="header_left flex-center-between">
108
- <slot name="left" v-if="leftIconShow">
109
- <view class="icon flex" @click="goBack">
110
- <image
111
- :src="isBlackIcon ? backIcon : backIconW"
112
- mode="widthFix"></image>
113
- </view>
114
- </slot>
115
- </view>
116
- <view class="header_center">
117
- <slot name="center">
118
- <view class="title" :style="{ fontSize: textFontSize + 'rpx' }">
119
- {{ title }}
120
- </view>
121
- </slot>
122
- </view>
123
- <view class="header_right flex">
124
- <!-- #ifndef MP-WEIXIN -->
125
- <slot name="right"></slot>
126
- <!-- #endif -->
127
- </view>
128
- </view>
129
- <!-- 左右结构 -->
130
- <view v-else class="wx_header flex"
131
- :style="{ height: headerHeightRef + 'px', width: wxHeaderWidth + 'px' }">
132
- <view class="wx_header_left flex">
133
- <slot name="left">
134
- <view class="icon flex" @click="goBack" v-if="leftIconShow">
135
- <image
136
- :src="isBlackIcon ? backIcon : backIconW"
137
- mode="widthFix"></image>
138
- </view>
139
- </slot>
140
- </view>
141
- <view class="wx_header_txt flex">
142
- <slot name="center">
143
- <view class="title" :style="{ fontSize: textFontSize + 'rpx' }">
144
- {{ title }}
145
- </view>
146
- </slot>
147
- </view>
148
- </view>
149
- </view>
150
- <!-- 填充头部防止塌陷 新加(v-if="isShowHeaderBox") -->
151
- <view class="status_bar" v-if="isShowHeaderBox" :style="{ height: fillBoxHeight + 'px' }"></view>
152
- <!-- #ifdef MP-WEIXIN -->
153
- <view v-if="isShowHeaderBox" :style="{ height: headerHeightRef + 4 + 'px', background: backgroundColor2 }">
154
- </view>
155
- <!-- #endif -->
156
- <!-- 待测试 -->
157
- <!-- #ifndef MP-WEIXIN -->
158
- <view v-if="isShowHeaderBox" :style="{ height: headerHeightRef + 'px', background: backgroundColor2 }"></view>
159
- <!-- #endif -->
160
- </view>
161
- <!-- #endif -->
162
- </template>
163
-
164
- <style lang="scss" scoped>
165
- .header_box {
166
- // padding: 0 20rpx 5rpx;
167
- // background-color: #fff;
168
- }
169
-
170
- .header_main {
171
- width: 100%;
172
- z-index: 9999;
173
- top: 0;
174
- left: 0;
175
- /* #ifdef MP-WEIXIN */
176
- padding: 0 20rpx 15rpx;
177
- /* #endif */
178
- /* #ifndef MP-WEIXIN */
179
- padding: 5rpx 20rpx;
180
- /* #endif */
181
- box-sizing: border-box;
182
- .img {
183
- width: 48rpx;
184
- height: 48rpx;
185
- }
186
- .header {
187
- // padding: 0 16rpx;
188
- box-sizing: border-box;
189
-
190
- .header_left {
191
- width: 20%;
192
-
193
- .icon {
194
- width: 48rpx;
195
- }
196
-
197
- .left_txt {
198
- font-size: 22rpx;
199
- line-height: 22rpx;
200
- }
201
- }
202
-
203
- .header_center {
204
- width: 60%;
205
- text-align: center;
206
- font-size: 28rpx;
207
-
208
- .title {
209
- overflow: hidden;
210
- text-overflow: ellipsis;
211
- white-space: nowrap;
212
- }
213
- }
214
-
215
- .header_right {
216
- width: 20%;
217
- }
218
- }
219
-
220
- .wx_header {
221
- .wx_header_left {
222
- height: 100%;
223
-
224
- .icon {
225
- width: 48rpx;
226
-
227
- image {
228
- vertical-align: middle;
229
- width: 100%;
230
- }
231
- }
232
- }
233
-
234
- .wx_header_txt {
235
- flex: 1;
236
- height: 100%;
237
- padding-left: 26rpx;
238
-
239
- .title {
240
- width: 100%;
241
- line-height: 1;
242
- overflow: hidden;
243
- text-overflow: ellipsis;
244
- white-space: nowrap;
245
- font-size: 28rpx;
246
- }
247
- }
248
- }
249
- }
250
- </style>
1
+ <script lang="ts" setup>
2
+ /*
3
+ * @description: 头部组件
4
+ * @fileName: Header.vue
5
+ * @params
6
+ * @author: lxx
7
+ * @date: 2023-07-16 09:32:09
8
+ * @version: V1.0.2
9
+ */
10
+ import { goToPage } from '../../libs/util'
11
+ import { type CSSProperties, computed, ref, watchEffect } from 'vue'
12
+
13
+ type headerInt = {
14
+ title: string
15
+ // 头部高度 默认为44px (微信小程序不可用)
16
+ headerHeight?: number
17
+ // 是否显示左侧内容
18
+ leftIconShow?: boolean
19
+ // 样式部分
20
+ backgroundColor?: string
21
+ backgroundColor2?: string
22
+ textColor?: string
23
+ textFontSize?: number
24
+ // 是否需要生成和头部高度相同的盒子
25
+ isShowHeaderBox?: boolean
26
+ positionState?: string
27
+ isShowShadow?: boolean
28
+ isBlackIcon?: boolean
29
+ // 头部没有右侧盒子,true:左中右结构 false:左中结构(小程序可以为左中右结构但是没有右侧盒子)
30
+ isHaveRightBox?: boolean
31
+ }
32
+
33
+ const props = withDefaults(defineProps<headerInt>(), {
34
+ // 头部高度 默认为44px (微信小程序不可用)
35
+ headerHeight: 44,
36
+ // 是否显示左侧内容
37
+ leftIconShow: true,
38
+ // 样式部分
39
+ backgroundColor: '#ffffff', //linear-gradient(90deg, rgba(10, 207, 254, 1) 0%, rgba(74, 92, 255, 1) 100%)
40
+ backgroundColor2: '#ffffff',
41
+ textColor: '#000',
42
+ textFontSize: 34,
43
+ title: '标题',
44
+ // 是否需要生成和头部高度相同的盒子
45
+ isShowHeaderBox: true,
46
+ positionState: 'fixed',
47
+ isShowShadow: false,
48
+ isBlackIcon: true, // 是否为黑色图标
49
+ isHaveRightBox: true
50
+ })
51
+
52
+ let { statusBarHeight } = uni.getSystemInfoSync()
53
+ // #ifdef MP-WEIXIN
54
+ // 胶囊状态
55
+ let menuButton = uni.getMenuButtonBoundingClientRect()
56
+ // 微信头部宽度
57
+ let wxHeaderWidth = menuButton.left - 10
58
+ // 上边距
59
+ statusBarHeight = menuButton.top
60
+ // #endif
61
+
62
+ // padding的高度(防止头部塌陷)
63
+ const fillBoxHeight = ref(statusBarHeight + 3)
64
+
65
+ // 设置header的高度
66
+ const headerHeightRef = ref(0)
67
+ watchEffect(() => {
68
+ headerHeightRef.value = props.headerHeight
69
+ // #ifdef MP-WEIXIN
70
+ // 中间高度
71
+ headerHeightRef.value = menuButton.height
72
+ // #endif
73
+ })
74
+ // console.log('statusBarHeight', statusBarHeight)
75
+
76
+ const style = computed(() => {
77
+ return {
78
+ boxShadow: props.isShowShadow ? '0 0 8rpx -3rpx #333' : '0 0 0 0 #333',
79
+ background: props.backgroundColor,
80
+ color: props.textColor,
81
+ position: props.positionState
82
+ } as CSSProperties
83
+ })
84
+ // 返回上一页(如没有页面返回首页)
85
+ const goBack = () => {
86
+ if (getCurrentPages().length <= 1) {
87
+ goToPage({
88
+ url: 'pages/index/index',
89
+ mode: 'redirectTo'
90
+ })
91
+ } else {
92
+ uni.navigateBack()
93
+ }
94
+ }
95
+
96
+ const backIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACMklEQVR4nO2av0uVURjHPyiEYgkuoVC4ODSK2pRDYFOENOQP6A+IEgknkWgKgqTEP6AaHIKyhqhGiSgVpKwGBweLBMHZcjAK47xcXrxxn6el5/pwzvnAme5wv5/ve+/hPO/7kslkMplMxjsjwCdgB7iV2tW6Aez/tW46yFUXpmvIh/U6AXfuCvJhnXOQz5R7ivz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PgmCLAWNTqvXztseO8Cbhnhp615fSoCFgL3jfB3gXmxwnsUoPP2Z0b4qZjBPQpYA3wwwt+uI7w3AY+N8JN1hY8pYCRCG5uMz6citF07MQRcMT6/JyIHHWWth+KWvG48BsrR1MeATl0MSLjcBgFSsvDRqfH81AVonQ5IeBhLghuMDu4KSHgELEhdgNb2wPbXk2EluKGko6EN0KfAaOoCtDYEJHwEVqYuQIpDkBlDgh58jqcuQIpjsM+BwXFb6gKkeOatlSOD7BC7ocLzGzoKVw6kLqBTNwMSDrVBgJSsHw63QYDW+YCEM20QICWLqIk2CJDAS5EUW+0jqQuQ4h1Ai+nu9YMbIguQYvCzeAssT12A1lbgpyFB3ygbdRB9lpoESPEekbV+uBSr/zF2hevihYiMiciXHu0vcdPLGu+ATq0C3nX9+/poWGcRmUwmk8lk+kRE/gCfWLdyj0KPNgAAAABJRU5ErkJggg=='
98
+ </script>
99
+
100
+ <template>
101
+ <!-- #ifndef MP-TOUTIAO -->
102
+ <view class="header_box">
103
+ <view class="header_main" :style="style">
104
+ <view class="status_bar" :style="{ height: statusBarHeight + 'px' }"></view>
105
+ <!-- 标准的左中右结构 -->
106
+ <view v-if="isHaveRightBox" class="header flex-center-between" :style="{ height: headerHeightRef + 'px' }">
107
+ <view class="header_left flex-center-between">
108
+ <slot name="left" >
109
+ <view v-if="leftIconShow" class="icon flex" @click="goBack">
110
+ <image
111
+ :src="isBlackIcon ? backIcon : backIconW"
112
+ mode="widthFix"></image>
113
+ </view>
114
+ </slot>
115
+ </view>
116
+ <view class="header_center">
117
+ <slot>
118
+ <view class="title" :style="{ fontSize: textFontSize + 'rpx' }">
119
+ {{ title }}
120
+ </view>
121
+ </slot>
122
+ </view>
123
+ <view class="header_right flex">
124
+ <!-- #ifndef MP-WEIXIN -->
125
+ <slot name="right"></slot>
126
+ <!-- #endif -->
127
+ </view>
128
+ </view>
129
+ <!-- 左右结构 -->
130
+ <view v-else class="wx_header flex"
131
+ :style="{ height: headerHeightRef + 'px', width: wxHeaderWidth + 'px' }">
132
+ <view class="wx_header_left flex">
133
+ <slot name="left">
134
+ <view class="icon flex" @click="goBack" v-if="leftIconShow">
135
+ <image
136
+ :src="isBlackIcon ? backIcon : backIconW"
137
+ mode="widthFix"></image>
138
+ </view>
139
+ </slot>
140
+ </view>
141
+ <view class="wx_header_txt flex">
142
+ <slot name="center">
143
+ <view class="title" :style="{ fontSize: textFontSize + 'rpx' }">
144
+ {{ title }}
145
+ </view>
146
+ </slot>
147
+ </view>
148
+ </view>
149
+ </view>
150
+ <!-- 填充头部防止塌陷 新加(v-if="isShowHeaderBox") -->
151
+ <view class="status_bar" v-if="isShowHeaderBox" :style="{ height: fillBoxHeight + 'px' }"></view>
152
+ <!-- #ifdef MP-WEIXIN -->
153
+ <view v-if="isShowHeaderBox" :style="{ height: headerHeightRef + 4 + 'px', background: backgroundColor2 }">
154
+ </view>
155
+ <!-- #endif -->
156
+ <!-- 待测试 -->
157
+ <!-- #ifndef MP-WEIXIN -->
158
+ <view v-if="isShowHeaderBox" :style="{ height: headerHeightRef + 'px', background: backgroundColor2 }"></view>
159
+ <!-- #endif -->
160
+ </view>
161
+ <!-- #endif -->
162
+ </template>
163
+
164
+ <style lang="scss" scoped>
165
+ .header_box {
166
+ // padding: 0 20rpx 5rpx;
167
+ // background-color: #fff;
168
+ }
169
+
170
+ .header_main {
171
+ width: 100%;
172
+ z-index: 9999;
173
+ top: 0;
174
+ left: 0;
175
+ /* #ifdef MP-WEIXIN */
176
+ padding: 0 20rpx 15rpx;
177
+ /* #endif */
178
+ /* #ifndef MP-WEIXIN */
179
+ padding: 5rpx 20rpx;
180
+ /* #endif */
181
+ box-sizing: border-box;
182
+ .img {
183
+ width: 48rpx;
184
+ height: 48rpx;
185
+ }
186
+ .header {
187
+ // padding: 0 16rpx;
188
+ box-sizing: border-box;
189
+
190
+ .header_left {
191
+ width: 20%;
192
+
193
+ .icon {
194
+ width: 48rpx;
195
+ }
196
+
197
+ .left_txt {
198
+ font-size: 22rpx;
199
+ line-height: 22rpx;
200
+ }
201
+ }
202
+
203
+ .header_center {
204
+ width: 60%;
205
+ text-align: center;
206
+ font-size: 28rpx;
207
+
208
+ .title {
209
+ overflow: hidden;
210
+ text-overflow: ellipsis;
211
+ white-space: nowrap;
212
+ }
213
+ }
214
+
215
+ .header_right {
216
+ width: 20%;
217
+ }
218
+ }
219
+
220
+ .wx_header {
221
+ .wx_header_left {
222
+ height: 100%;
223
+
224
+ .icon {
225
+ width: 48rpx;
226
+
227
+ image {
228
+ vertical-align: middle;
229
+ width: 100%;
230
+ }
231
+ }
232
+ }
233
+
234
+ .wx_header_txt {
235
+ flex: 1;
236
+ height: 100%;
237
+ padding-left: 26rpx;
238
+
239
+ .title {
240
+ width: 100%;
241
+ line-height: 1;
242
+ overflow: hidden;
243
+ text-overflow: ellipsis;
244
+ white-space: nowrap;
245
+ font-size: 28rpx;
246
+ }
247
+ }
248
+ }
249
+ }
250
+ </style>
251
251
  ../../libs/util
@@ -1,25 +1,25 @@
1
- <script setup lang="ts">
2
- /**
3
- * @description:
4
- * @param {*} msg 显示字符串
5
- * @return {*}
6
- */
7
- defineProps<{
8
- msg: string
9
- }>()
10
- </script>
11
-
12
- <template>
13
- <div class="greetings">
14
- <h1 class="green">{{ msg }}</h1>
15
- </div>
16
- </template>
17
-
18
- <style scoped>
19
- h1 {
20
- font-weight: 500;
21
- font-size: 2.6rem;
22
- position: relative;
23
- top: -10px;
24
- }
25
- </style>
1
+ <script setup lang="ts">
2
+ /**
3
+ * @description:
4
+ * @param {*} msg 显示字符串
5
+ * @return {*}
6
+ */
7
+ defineProps<{
8
+ msg: string
9
+ }>()
10
+ </script>
11
+
12
+ <template>
13
+ <div class="greetings">
14
+ <h1 class="green">{{ msg }}</h1>
15
+ </div>
16
+ </template>
17
+
18
+ <style scoped>
19
+ h1 {
20
+ font-weight: 500;
21
+ font-size: 2.6rem;
22
+ position: relative;
23
+ top: -10px;
24
+ }
25
+ </style>