@zfqh/uview-x 0.0.5 → 0.0.7
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/CHANGELOG.md +16 -0
- package/README.md +51 -8
- package/components/uv-badge/uv-badge.vue +4 -4
- package/components/uv-button/uv-button.vue +10 -10
- package/components/uv-checkbox/uv-checkbox.vue +11 -9
- package/components/uv-checkbox-group/uv-checkbox-group.vue +2 -2
- package/components/uv-code/uv-code.vue +2 -2
- package/components/uv-dialog/uv-dialog.vue +11 -10
- package/components/uv-form/uv-form.vue +244 -246
- package/components/uv-form-item/uv-form-item.vue +10 -9
- package/components/uv-icon/uv-icon.vue +13 -13
- package/components/uv-input/uv-input.vue +6 -5
- package/components/uv-line/uv-line.vue +7 -6
- package/components/uv-line-progress/uv-line-progress.vue +5 -5
- package/components/uv-loading-icon/uv-loading-icon.vue +9 -8
- package/components/uv-overlay/uv-overlay.vue +3 -2
- package/components/uv-popup/uv-popup.vue +7 -5
- package/components/uv-safe-bottom/uv-safe-bottom.vue +4 -3
- package/components/uv-status-bar/uv-status-bar.vue +4 -3
- package/components/uv-tabs/uv-tabs.vue +15 -12
- package/components/uv-transition/uv-transition.vue +2 -2
- package/hooks/index.ts +5 -5
- package/hooks/useDebounce.ts +33 -35
- package/hooks/useI18n.ts +4 -3
- package/hooks/useThrottle.ts +36 -38
- package/index.ts +50 -29
- package/locales/en.ts +56 -79
- package/locales/es.ts +47 -69
- package/locales/fr.ts +47 -69
- package/locales/index.ts +15 -159
- package/locales/ru.ts +47 -69
- package/locales/zh-Hans.ts +57 -79
- package/locales/zh-Hant.ts +47 -69
- package/package.json +2 -2
- package/types/index.d.ts +68 -66
- package/utils/color.ts +139 -0
- package/utils/compress.ts +28 -28
- package/utils/config.ts +45 -10
- package/utils/debounce.ts +4 -4
- package/utils/function.ts +2 -87
- package/utils/locale.ts +444 -304
- package/utils/merge.ts +74 -0
- package/utils/platform.ts +28 -28
- package/utils/route.ts +123 -129
- package/utils/scrollbar.ts +19 -19
- package/utils/throttle.ts +4 -4
- package/utils/colorGradient.ts +0 -139
- package/utils/index.ts +0 -58
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.0.7](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.6...@zfqh/uview-x@0.0.7) (2026-11-11)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @zfqh/uview-x
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.0.6](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.5...@zfqh/uview-x@0.0.6) (2026-11-11)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @zfqh/uview-x
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [0.0.5](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.4...@zfqh/uview-x@0.0.5) (2026-11-11)
|
|
7
23
|
|
|
8
24
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zfqh/uview-x
|
|
2
2
|
|
|
3
|
-
面向 uni-app x 蒸汽模式(Vapor)、uni-app x H5 / 微信小程序(VDOM)与经典 uni-app Vue3 / nvue 的 UV UI 组件库,沿用 `uv-*` 组件名与 uv-ui API
|
|
3
|
+
面向 uni-app x 蒸汽模式(Vapor)、uni-app x H5 / 微信小程序(VDOM)与经典 uni-app Vue3 / nvue 的 UV UI 组件库,沿用 `uv-*` 组件名与 uv-ui API;根入口默认导出插件并提供公共 API(`config` / `setConfig` / i18n / hooks / `route` / `http` / `compress` / `debounce` / `throttle` / `test`),其余工具与第三方库按深路径引入。
|
|
4
4
|
|
|
5
5
|
## 安装
|
|
6
6
|
|
|
@@ -10,20 +10,22 @@ npm i @zfqh/uview-x
|
|
|
10
10
|
|
|
11
11
|
## 快速开始
|
|
12
12
|
|
|
13
|
-
`main.ts`
|
|
13
|
+
`main.ts` 注册插件(只应用运行时配置与 i18n,不注册组件、不注入全局对象):
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
16
|
import { createSSRApp } from 'vue';
|
|
17
17
|
import App from './App.uvue';
|
|
18
|
-
import
|
|
18
|
+
import UviewX from '@zfqh/uview-x';
|
|
19
19
|
|
|
20
20
|
export function createApp() {
|
|
21
21
|
const app = createSSRApp(App);
|
|
22
|
-
app.use(
|
|
22
|
+
app.use(UviewX, { unit: 'px' });
|
|
23
23
|
return { app };
|
|
24
24
|
}
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
也可以先 `import { setConfig } from '@zfqh/uview-x'` 并调用 `setConfig({ unit: 'px' })`,再 `app.use(UviewX)`;`app.use` 传入的同名字段会覆盖此前配置。
|
|
28
|
+
|
|
27
29
|
页面推荐显式 import 组件(uni-app x Vapor 构建必需):
|
|
28
30
|
|
|
29
31
|
```vue
|
|
@@ -63,18 +65,59 @@ dev 阶段也可使用 easycom(`pages.json`):
|
|
|
63
65
|
</style>
|
|
64
66
|
```
|
|
65
67
|
|
|
66
|
-
|
|
68
|
+
运行时配置(如 H5 滚动条,默认隐藏)同样可通过根入口导出的 `setConfig` 或插件 options 设置,例如 `import { setConfig } from '@zfqh/uview-x'; setConfig({ scrollbar: true })`;`setConfig` 可配置 unit / type / color / props / scrollbar 与 i18n,详见 `AGENTS.md`。
|
|
67
69
|
|
|
68
70
|
## 国际化
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
默认英文(`en`);其他语言按需引入并合并(可选:`zh-Hans`、`zh-Hant`、`es`、`fr`、`ru`):
|
|
71
73
|
|
|
72
74
|
```ts
|
|
73
75
|
import en from '@zfqh/uview-x/locales/en';
|
|
74
|
-
|
|
75
|
-
|
|
76
|
+
import zhHans from '@zfqh/uview-x/locales/zh-Hans';
|
|
77
|
+
|
|
78
|
+
// 也可从 locales 聚合入口导入全部语言包
|
|
79
|
+
// import { en, zhHans } from '@zfqh/uview-x/locales';
|
|
80
|
+
// import locales from '@zfqh/uview-x/locales';
|
|
81
|
+
|
|
82
|
+
app.use(UviewX, {
|
|
83
|
+
i18n: {
|
|
84
|
+
locale: 'en',
|
|
85
|
+
fallbackLocale: 'en',
|
|
86
|
+
messages: {
|
|
87
|
+
en,
|
|
88
|
+
'zh-Hans': zhHans,
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// 或先 setConfig({ i18n: {...} }),再 app.use(UviewX)
|
|
94
|
+
// createI18n({ locale: 'zh-Hans', messages: {...} }) 可覆盖当前 i18n 配置
|
|
95
|
+
// 语言包使用扁平 key,例如 en['uv.dialog.title']
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## 工具与第三方库
|
|
99
|
+
|
|
100
|
+
根入口只提供公共 API;其余工具按文件深路径引入,不存在 `$uv` 聚合对象:
|
|
101
|
+
|
|
102
|
+
```ts
|
|
103
|
+
// 根入口:配置、导航、请求、压缩、防抖/节流、校验
|
|
104
|
+
import { config, setConfig, route, http, compress, debounce, throttle, test } from '@zfqh/uview-x';
|
|
105
|
+
import { useDebounce, useThrottle, useI18n, createI18n, getLocale, getLocaleMessage, setLocale } from '@zfqh/uview-x';
|
|
106
|
+
|
|
107
|
+
// 其余工具:@zfqh/uview-x/utils/<file>
|
|
108
|
+
import { colorGradient } from '@zfqh/uview-x/utils/color';
|
|
109
|
+
import { addUnit, timeFormat } from '@zfqh/uview-x/utils/function';
|
|
110
|
+
|
|
111
|
+
// 第三方库:@zfqh/uview-x/libs
|
|
112
|
+
import { Request, dayjs } from '@zfqh/uview-x/libs';
|
|
76
113
|
```
|
|
77
114
|
|
|
115
|
+
## 迁移提示
|
|
116
|
+
|
|
117
|
+
- 已移除 `$uv` / `uni.$uv` / `app.config.globalProperties.$uv` 与 `utils`、`libs` 聚合导出,改为从根入口或深路径具名导入(见上节)。
|
|
118
|
+
- `utils/index.ts` 已删除,工具从 `@zfqh/uview-x/utils/<file>` 引入;`utils/colorGradient.ts` 更名为 `utils/color.ts`。
|
|
119
|
+
- SCSS 主题变量 `$uv-*` 保持不变。
|
|
120
|
+
|
|
78
121
|
## 文档
|
|
79
122
|
|
|
80
123
|
- 开发约定、组件清单、完整 API、平台差异与验证:[AGENTS.md](AGENTS.md)
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
v-if="showBadge"
|
|
4
4
|
class="uv-badge"
|
|
5
5
|
:class="badgeClasses"
|
|
6
|
-
:style="[
|
|
6
|
+
:style="[addStyle(p.customStyle), badgeStyle]"
|
|
7
7
|
>{{ badgeText }}</text>
|
|
8
8
|
</template>
|
|
9
9
|
|
|
10
10
|
<script setup lang="ts">
|
|
11
11
|
import { computed } from 'vue'
|
|
12
|
-
import {
|
|
12
|
+
import { addStyle, addUnit } from '../../utils/function'
|
|
13
13
|
import props from './props'
|
|
14
14
|
|
|
15
15
|
defineOptions({
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
// top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top
|
|
72
72
|
const top = p.offset[0]
|
|
73
73
|
const right = p.offset[1] || top
|
|
74
|
-
style.top =
|
|
75
|
-
style.right =
|
|
74
|
+
style.top = addUnit(top)
|
|
75
|
+
style.right = addUnit(right)
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
return style
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
:hover-class="hoverClass"
|
|
25
25
|
class="uv-button uv-reset-button"
|
|
26
26
|
:class="[bemClass, p.customClass, p.color ? 'uv-button--custom-color' : '']"
|
|
27
|
-
:style="[baseColor, radiusStyle,
|
|
27
|
+
:style="[baseColor, radiusStyle, addStyle(p.customStyle)]"
|
|
28
28
|
@click="clickHandler"
|
|
29
29
|
@getphonenumber="onGetPhoneNumber"
|
|
30
30
|
@getuserinfo="onGetUserInfo"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
></uv-loading-icon>
|
|
49
49
|
<text
|
|
50
50
|
class="uv-button__loading-text"
|
|
51
|
-
:style="[{ fontSize: textSize + 'px', color: textColorCom },
|
|
51
|
+
:style="[{ fontSize: textSize + 'px', color: textColorCom }, addStyle(p.customTextStyle)]"
|
|
52
52
|
>{{ p.loadingText || p.text }}</text>
|
|
53
53
|
</template>
|
|
54
54
|
<template v-else>
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
<slot>
|
|
62
62
|
<text
|
|
63
63
|
class="uv-button__text"
|
|
64
|
-
:style="[textStyleCom,
|
|
64
|
+
:style="[textStyleCom, addStyle(p.customTextStyle)]"
|
|
65
65
|
>{{ p.text }}</text>
|
|
66
66
|
</slot>
|
|
67
67
|
<slot name="suffix"></slot>
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
:hover-class="hoverClass"
|
|
77
77
|
class="uv-button uv-reset-button"
|
|
78
78
|
:class="[bemClass, p.customClass, p.color ? 'uv-button--custom-color' : '']"
|
|
79
|
-
:style="[baseColor, radiusStyle,
|
|
79
|
+
:style="[baseColor, radiusStyle, addStyle(p.customStyle)]"
|
|
80
80
|
@click="clickHandler"
|
|
81
81
|
>
|
|
82
82
|
<template v-if="p.loading">
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
></uv-loading-icon>
|
|
88
88
|
<text
|
|
89
89
|
class="uv-button__loading-text"
|
|
90
|
-
:style="[{ fontSize: textSize + 'px', color: textColorCom },
|
|
90
|
+
:style="[{ fontSize: textSize + 'px', color: textColorCom }, addStyle(p.customTextStyle)]"
|
|
91
91
|
>{{ p.loadingText || p.text }}</text>
|
|
92
92
|
</template>
|
|
93
93
|
<template v-else>
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
<slot>
|
|
101
101
|
<text
|
|
102
102
|
class="uv-button__text"
|
|
103
|
-
:style="[textStyleCom,
|
|
103
|
+
:style="[textStyleCom, addStyle(p.customTextStyle)]"
|
|
104
104
|
>{{ p.text }}</text>
|
|
105
105
|
</slot>
|
|
106
106
|
<slot name="suffix"></slot>
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
|
|
113
113
|
<script setup lang="ts">
|
|
114
114
|
import { computed } from 'vue'
|
|
115
|
-
import {
|
|
115
|
+
import { addStyle, addUnit } from '../../utils/function'
|
|
116
116
|
import props from './props'
|
|
117
117
|
import UvIcon from '../uv-icon/uv-icon.vue'
|
|
118
118
|
import UvLoadingIcon from '../uv-loading-icon/uv-loading-icon.vue'
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
const radiusStyle = computed(() => {
|
|
277
277
|
const style: any = {}
|
|
278
278
|
if (p.shape === 'square' && p.radius !== null && p.radius !== '') {
|
|
279
|
-
const value =
|
|
279
|
+
const value = addUnit(p.radius)
|
|
280
280
|
style.borderTopLeftRadius = value
|
|
281
281
|
style.borderTopRightRadius = value
|
|
282
282
|
style.borderBottomLeftRadius = value
|
|
@@ -296,7 +296,7 @@
|
|
|
296
296
|
|
|
297
297
|
const getIconSize = computed(() => {
|
|
298
298
|
const size = p.iconSize ? p.iconSize : textSize.value * 1.35
|
|
299
|
-
return
|
|
299
|
+
return addUnit(size)
|
|
300
300
|
})
|
|
301
301
|
|
|
302
302
|
// 文本样式:颜色显式下发(nvue 的 text 不继承父节点颜色),
|
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
|
|
313
313
|
const btnWrapperStyle = computed(() => {
|
|
314
314
|
const style: any = {}
|
|
315
|
-
const customStyle =
|
|
315
|
+
const customStyle = addStyle(p.customStyle)
|
|
316
316
|
if (customStyle && customStyle.width) style.width = customStyle.width
|
|
317
317
|
return style
|
|
318
318
|
})
|
|
@@ -40,7 +40,9 @@
|
|
|
40
40
|
|
|
41
41
|
<script setup lang="ts">
|
|
42
42
|
import { computed, inject, nextTick, onUnmounted, ref, watch } from 'vue'
|
|
43
|
-
import {
|
|
43
|
+
import { addStyle, addUnit, error } from '../../utils/function'
|
|
44
|
+
import { deepMerge } from '../../utils/merge'
|
|
45
|
+
import { array as isArray } from '../../utils/test'
|
|
44
46
|
import props from './props'
|
|
45
47
|
import UvIcon from '../uv-icon/uv-icon.vue'
|
|
46
48
|
import { preventEvent } from '../../utils/compat'
|
|
@@ -97,7 +99,7 @@
|
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
if (!checkboxGroupContext) {
|
|
100
|
-
|
|
102
|
+
error('uv-checkbox必须搭配uv-checkbox-group组件使用')
|
|
101
103
|
} else {
|
|
102
104
|
checkboxGroupContext.register(handle)
|
|
103
105
|
}
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
}
|
|
115
117
|
const parentValue = checkboxGroupContext ? checkboxGroupContext.value : []
|
|
116
118
|
// 父组件uv-checkbox-group的value可能是array,所以额外判断
|
|
117
|
-
if (
|
|
119
|
+
if (isArray(parentValue)) {
|
|
118
120
|
// 查找数组是是否存在此name元素值
|
|
119
121
|
isChecked.value = parentValue.some((item: any) => item === p.name)
|
|
120
122
|
}
|
|
@@ -125,7 +127,7 @@
|
|
|
125
127
|
watch(
|
|
126
128
|
() => (checkboxGroupContext ? checkboxGroupContext.value : null),
|
|
127
129
|
(value: any) => {
|
|
128
|
-
if (
|
|
130
|
+
if (isArray(value)) {
|
|
129
131
|
isChecked.value = value.some((item: any) => item === p.name)
|
|
130
132
|
}
|
|
131
133
|
}
|
|
@@ -204,7 +206,7 @@
|
|
|
204
206
|
|
|
205
207
|
// label大小
|
|
206
208
|
const elLabelSize = computed(() => {
|
|
207
|
-
return
|
|
209
|
+
return addUnit(
|
|
208
210
|
p.labelSize
|
|
209
211
|
? p.labelSize
|
|
210
212
|
: checkboxGroupContext && checkboxGroupContext.labelSize
|
|
@@ -249,8 +251,8 @@
|
|
|
249
251
|
const style: any = {}
|
|
250
252
|
style.backgroundColor = isChecked.value && !elDisabled.value ? elActiveColor.value : '#ffffff'
|
|
251
253
|
style.borderColor = isChecked.value && !elDisabled.value ? elActiveColor.value : elInactiveColor.value
|
|
252
|
-
style.width =
|
|
253
|
-
style.height =
|
|
254
|
+
style.width = addUnit(elSize.value)
|
|
255
|
+
style.height = addUnit(elSize.value)
|
|
254
256
|
if (elDisabled.value) {
|
|
255
257
|
// 与 uv-ui 一致:禁用时背景固定为 #ebedf0(原实现通过 CSS !important 覆盖),边框取未选中颜色
|
|
256
258
|
style.backgroundColor = '#ebedf0'
|
|
@@ -275,13 +277,13 @@
|
|
|
275
277
|
const checkboxStyle = computed(() => {
|
|
276
278
|
const style: any = {}
|
|
277
279
|
if (checkboxGroupContext && checkboxGroupContext.borderBottom && checkboxGroupContext.placement === 'row') {
|
|
278
|
-
|
|
280
|
+
error('检测到您将borderBottom设置为true,需要同时将uv-checkbox-group的placement设置为column才有效')
|
|
279
281
|
}
|
|
280
282
|
// 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
|
|
281
283
|
if (checkboxGroupContext && checkboxGroupContext.borderBottom && checkboxGroupContext.placement === 'column') {
|
|
282
284
|
style.paddingBottom = '8px'
|
|
283
285
|
}
|
|
284
|
-
return
|
|
286
|
+
return deepMerge(style, addStyle(p.customStyle))
|
|
285
287
|
})
|
|
286
288
|
|
|
287
289
|
// 横向两端排列时,点击组件即可触发选中事件
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="uv-checkbox-group"
|
|
4
4
|
:class="[bemClass, p.customClass]"
|
|
5
|
-
:style="[
|
|
5
|
+
:style="[addStyle(p.customStyle)]"
|
|
6
6
|
>
|
|
7
7
|
<slot></slot>
|
|
8
8
|
</view>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
<script setup lang="ts">
|
|
12
12
|
import { computed, provide, reactive, watch } from 'vue'
|
|
13
|
-
import {
|
|
13
|
+
import { addStyle } from '../../utils/function'
|
|
14
14
|
import props from './props'
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<view class="uv-code" :class="[p.customClass]" :style="[
|
|
2
|
+
<view class="uv-code" :class="[p.customClass]" :style="[addStyle(p.customStyle)]">
|
|
3
3
|
<!-- 此组件功能由js完成,无需写html逻辑 -->
|
|
4
4
|
</view>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script setup lang="ts">
|
|
8
8
|
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
9
|
-
import {
|
|
9
|
+
import { addStyle } from '../../utils/function'
|
|
10
10
|
import props from './props'
|
|
11
11
|
import { useI18n } from '../../hooks'
|
|
12
12
|
|
|
@@ -94,7 +94,8 @@
|
|
|
94
94
|
|
|
95
95
|
<script setup lang="ts">
|
|
96
96
|
import { computed, nextTick, onMounted, ref, watch } from 'vue'
|
|
97
|
-
import {
|
|
97
|
+
import { addStyle, addUnit, sys } from '../../utils/function'
|
|
98
|
+
import { deepMerge } from '../../utils/merge'
|
|
98
99
|
import props from './props'
|
|
99
100
|
import UvPopup from '../uv-popup/uv-popup.vue'
|
|
100
101
|
import UvButton from '../uv-button/uv-button.vue'
|
|
@@ -186,7 +187,7 @@
|
|
|
186
187
|
const showCancelBtn = computed(() => Boolean(cfg.value.showCancelButton))
|
|
187
188
|
const showConfirmBtn = computed(() => Boolean(cfg.value.showConfirmButton))
|
|
188
189
|
|
|
189
|
-
const addUnit = (value: string | number) =>
|
|
190
|
+
const addUnit = (value: string | number) => addUnit(value)
|
|
190
191
|
|
|
191
192
|
const titleAlignValue = computed(() => {
|
|
192
193
|
const map: Record<string, string> = {
|
|
@@ -207,7 +208,7 @@
|
|
|
207
208
|
if (cfg.value.mode === 'center') {
|
|
208
209
|
style.width = addUnit(cfg.value.width)
|
|
209
210
|
}
|
|
210
|
-
return
|
|
211
|
+
return deepMerge(style, addStyle(cfg.value.customStyle))
|
|
211
212
|
})
|
|
212
213
|
|
|
213
214
|
const headerStyleCom = computed(() => {
|
|
@@ -224,7 +225,7 @@
|
|
|
224
225
|
style.borderBottomStyle = 'solid'
|
|
225
226
|
style.borderBottomColor = '#f2f3f5'
|
|
226
227
|
}
|
|
227
|
-
return
|
|
228
|
+
return deepMerge(style, addStyle(cfg.value.headerStyle))
|
|
228
229
|
})
|
|
229
230
|
|
|
230
231
|
const titleStyleCom = computed(() => {
|
|
@@ -234,7 +235,7 @@
|
|
|
234
235
|
lineHeight: m.titleSize + 8 + 'px',
|
|
235
236
|
color: '#303133'
|
|
236
237
|
}
|
|
237
|
-
return
|
|
238
|
+
return deepMerge(style, addStyle(cfg.value.titleStyle))
|
|
238
239
|
})
|
|
239
240
|
|
|
240
241
|
const scrollStyleCom = computed(() => {
|
|
@@ -244,13 +245,13 @@
|
|
|
244
245
|
// #endif
|
|
245
246
|
// #ifndef WEB || H5
|
|
246
247
|
try {
|
|
247
|
-
const info =
|
|
248
|
+
const info = sys()
|
|
248
249
|
style.maxHeight = Math.floor(Number(info.windowHeight || 800) * 0.6) + 'px'
|
|
249
250
|
} catch (e) {
|
|
250
251
|
style.maxHeight = '500px'
|
|
251
252
|
}
|
|
252
253
|
// #endif
|
|
253
|
-
return
|
|
254
|
+
return deepMerge(style, addStyle(cfg.value.scrollStyle))
|
|
254
255
|
})
|
|
255
256
|
|
|
256
257
|
const contentStyleCom = computed(() => {
|
|
@@ -265,7 +266,7 @@
|
|
|
265
266
|
const textAlign = align === 'center' ? 'center' : align === 'right' ? 'right' : 'left'
|
|
266
267
|
style.textAlign = textAlign
|
|
267
268
|
style.alignItems = textAlign === 'center' ? 'center' : textAlign === 'right' ? 'flex-end' : 'flex-start'
|
|
268
|
-
return
|
|
269
|
+
return deepMerge(style, addStyle(cfg.value.contentStyle))
|
|
269
270
|
})
|
|
270
271
|
|
|
271
272
|
const contentTextStyle = computed(() => {
|
|
@@ -277,7 +278,7 @@
|
|
|
277
278
|
}
|
|
278
279
|
const align = String(cfg.value.align || 'left')
|
|
279
280
|
style.textAlign = align === 'center' ? 'center' : align === 'right' ? 'right' : 'left'
|
|
280
|
-
return
|
|
281
|
+
return deepMerge(style, addStyle(cfg.value.contentStyle))
|
|
281
282
|
})
|
|
282
283
|
|
|
283
284
|
const footerStyleCom = computed(() => {
|
|
@@ -293,7 +294,7 @@
|
|
|
293
294
|
style.borderTopStyle = 'solid'
|
|
294
295
|
style.borderTopColor = '#f2f3f5'
|
|
295
296
|
}
|
|
296
|
-
return
|
|
297
|
+
return deepMerge(style, addStyle(cfg.value.footerStyle))
|
|
297
298
|
})
|
|
298
299
|
|
|
299
300
|
const gapStyle = computed(() => ({ width: metrics.value.gap + 'px' }))
|