@zfqh/uview-x 0.0.0-stage → 0.0.2

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.
Files changed (93) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/LICENSE +21 -0
  3. package/README.md +127 -3
  4. package/components/uv-badge/props.ts +83 -0
  5. package/components/uv-badge/uv-badge.vue +186 -0
  6. package/components/uv-button/props.ts +148 -0
  7. package/components/uv-button/uv-button.vue +565 -0
  8. package/components/uv-checkbox/props.ts +83 -0
  9. package/components/uv-checkbox/uv-checkbox.vue +403 -0
  10. package/components/uv-checkbox-group/props.ts +97 -0
  11. package/components/uv-checkbox-group/uv-checkbox-group.vue +163 -0
  12. package/components/uv-code/props.ts +48 -0
  13. package/components/uv-code/uv-code.vue +156 -0
  14. package/components/uv-dialog/props.ts +56 -0
  15. package/components/uv-dialog/uv-dialog.vue +492 -0
  16. package/components/uv-form/props.ts +59 -0
  17. package/components/uv-form/uv-form.vue +256 -0
  18. package/components/uv-form/valid.ts +1344 -0
  19. package/components/uv-form-item/props.ts +62 -0
  20. package/components/uv-form-item/uv-form-item.vue +335 -0
  21. package/components/uv-icon/icons.ts +161 -0
  22. package/components/uv-icon/props.ts +91 -0
  23. package/components/uv-icon/uv-icon.vue +208 -0
  24. package/components/uv-icon/uvicons.ttf +0 -0
  25. package/components/uv-input/props.ts +185 -0
  26. package/components/uv-input/uv-input.vue +431 -0
  27. package/components/uv-line/props.ts +42 -0
  28. package/components/uv-line/uv-line.vue +75 -0
  29. package/components/uv-line-progress/props.ts +43 -0
  30. package/components/uv-line-progress/uv-line-progress.vue +166 -0
  31. package/components/uv-loading-icon/props.ts +78 -0
  32. package/components/uv-loading-icon/uv-loading-icon.vue +226 -0
  33. package/components/uv-overlay/props.ts +38 -0
  34. package/components/uv-overlay/uv-overlay.vue +120 -0
  35. package/components/uv-popup/props.ts +101 -0
  36. package/components/uv-popup/uv-popup.vue +371 -0
  37. package/components/uv-safe-bottom/props.ts +18 -0
  38. package/components/uv-safe-bottom/uv-safe-bottom.vue +120 -0
  39. package/components/uv-status-bar/props.ts +22 -0
  40. package/components/uv-status-bar/uv-status-bar.vue +121 -0
  41. package/components/uv-tabs/props.ts +84 -0
  42. package/components/uv-tabs/uv-tabs.vue +432 -0
  43. package/components/uv-transition/props.ts +38 -0
  44. package/components/uv-transition/uv-transition.vue +170 -0
  45. package/hooks/index.ts +5 -0
  46. package/hooks/useDebounce.ts +35 -0
  47. package/hooks/useI18n.ts +95 -0
  48. package/hooks/useThrottle.ts +38 -0
  49. package/index.ts +23 -0
  50. package/libs/dayjs/index.ts +217 -0
  51. package/libs/index.ts +4 -0
  52. package/libs/luch-request/adapters/index.ts +133 -0
  53. package/libs/luch-request/core/InterceptorManager.ts +52 -0
  54. package/libs/luch-request/core/Request.ts +202 -0
  55. package/libs/luch-request/core/buildFullPath.ts +21 -0
  56. package/libs/luch-request/core/defaults.ts +34 -0
  57. package/libs/luch-request/core/dispatchRequest.ts +7 -0
  58. package/libs/luch-request/core/mergeConfig.ts +127 -0
  59. package/libs/luch-request/core/settle.ts +17 -0
  60. package/libs/luch-request/helpers/buildURL.ts +65 -0
  61. package/libs/luch-request/helpers/combineURLs.ts +15 -0
  62. package/libs/luch-request/helpers/isAbsoluteURL.ts +15 -0
  63. package/libs/luch-request/index.d.ts +197 -0
  64. package/libs/luch-request/index.ts +3 -0
  65. package/libs/luch-request/utils/clone.ts +265 -0
  66. package/libs/luch-request/utils.ts +136 -0
  67. package/locales/en.ts +78 -0
  68. package/locales/index.ts +169 -0
  69. package/locales/zh-Hans.ts +78 -0
  70. package/package.json +42 -4
  71. package/styles/color.scss +33 -0
  72. package/styles/common.scss +134 -0
  73. package/styles/components.scss +19 -0
  74. package/styles/index.scss +7 -0
  75. package/styles/theme.scss +44 -0
  76. package/styles/var.module.scss +32 -0
  77. package/styles/vue.scss +39 -0
  78. package/theme.scss +2 -0
  79. package/types/index.d.ts +66 -0
  80. package/utils/colorGradient.ts +139 -0
  81. package/utils/compat.ts +165 -0
  82. package/utils/compress.ts +34 -0
  83. package/utils/config.ts +95 -0
  84. package/utils/debounce.ts +7 -0
  85. package/utils/digit.ts +157 -0
  86. package/utils/function.ts +771 -0
  87. package/utils/http.ts +5 -0
  88. package/utils/index.ts +57 -0
  89. package/utils/locale.ts +296 -0
  90. package/utils/platform.ts +71 -0
  91. package/utils/route.ts +142 -0
  92. package/utils/test.ts +256 -0
  93. package/utils/throttle.ts +7 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [0.0.2](http://10.10.10.16/caoben/front-end-tools/compare/@zfqh/uview-x@0.0.1...@zfqh/uview-x@0.0.2) (2026-11-09)
7
+
8
+ **Note:** Version bump only for package @zfqh/uview-x
9
+
10
+
11
+
12
+
13
+
14
+ ## 0.0.1 (2026-11-09)
15
+
16
+ **Note:** Version bump only for package @zfqh/uview-x
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 aniu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,127 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # @zfqh/uview-x
2
+
3
+ 面向 uni-app x 蒸汽模式(Vapor)与经典 uni-app Vue3 的 UV UI 组件库,由 `@gmcb/uv-ui` fork 并完成多端适配:App 支持 uni-app x 蒸汽模式与经典 nvue,H5 / 微信小程序支持 uni-app x VDOM 与经典 Vue3 VDOM。组件保持 `.vue`,沿用 uv-ui 的 `uv-*` 组件名与主要 API。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm i @zfqh/uview-x
9
+ ```
10
+
11
+ ## 接入
12
+
13
+ `main.ts` 注册插件,注册后脚本可用 `uni.$uv`、模板可用 `$uv`:
14
+
15
+ ```ts
16
+ import { createSSRApp } from 'vue';
17
+ import App from './App.uvue';
18
+ import uviewX from '@zfqh/uview-x';
19
+
20
+ export function createApp() {
21
+ const app = createSSRApp(App);
22
+ app.use(uviewX as any);
23
+ return { app };
24
+ }
25
+ ```
26
+
27
+ `pages.json` 配置 easycom,组件按需自动引入:
28
+
29
+ ```json
30
+ {
31
+ "easycom": {
32
+ "autoscan": true,
33
+ "custom": {
34
+ "^uv-(.*)": "@zfqh/uview-x/components/uv-$1/uv-$1.vue"
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ `uni.scss` 引入主题变量,`App.uvue` 引入全局工具样式:
41
+
42
+ ```scss
43
+ @import '@zfqh/uview-x/theme.scss';
44
+ ```
45
+
46
+ ```vue
47
+ <style lang="scss">
48
+ @import '@zfqh/uview-x/styles/index.scss';
49
+ </style>
50
+ ```
51
+
52
+ App x 需在 `manifest.json` 开启蒸汽模式:`"uni-app-x": { "vapor": true, "styleIsolationVersion": "2", "vapor-default-script-lang": "ts" }`,完整配置见 `examples/uview-vapor/manifest.json`。
53
+
54
+ ## 组件示例
55
+
56
+ ```vue
57
+ <template>
58
+ <uv-button type="primary" text="提交" @click="onSubmit" />
59
+ <uv-icon name="search" :size="24" />
60
+ <uv-line />
61
+ </template>
62
+ ```
63
+
64
+ 已适配组件以 `components/uv-*` 为准。业务对话框 `uv-dialog`(基于 `uv-popup`,`open()` 返回 Promise)示例见 `examples/uview-vapor/pages/feedback/dialog/` 与 `examples/uview-nvue/pages/feedback/dialog/`,完整说明见 `AGENTS.md`。
65
+
66
+ ## 工具与 hooks
67
+
68
+ 入口同时导出 `hooks`、`utils`、`libs` 的公共 API(`libs` 仅汇总第三方库公共入口),例如:
69
+
70
+ ```ts
71
+ import { $uv, config, useDebounce, useThrottle, Request, dayjs } from '@zfqh/uview-x';
72
+
73
+ config.color.primary;
74
+ uni.$uv.config.color.primary; // 同一个对象
75
+
76
+ // 组件全局 props;需在组件加载前调用,后续修改不影响已加载组件
77
+ uni.$uv.setConfig({
78
+ props: {
79
+ button: { type: { default: 'primary' } },
80
+ input: { color: { default: '#303133' } },
81
+ },
82
+ });
83
+ ```
84
+
85
+ ## 国际化
86
+
87
+ 组件内置文案(`uv-dialog` / `uv-code` / `uv-form` / `timeFrom`)随包提供 `zh-Hans`、`en` 两套语言包;`createI18n` 会自动合并,用户 `messages` 传同名 key 即可覆盖(键空间 `uv.*`)。
88
+
89
+ ```ts
90
+ // main.ts:创建 i18n(自动合并组件内置语言包),再安装到 Vue app
91
+ import { createI18n } from '@zfqh/uview-x';
92
+
93
+ const i18n = createI18n({
94
+ legacy: false,
95
+ locale: 'zh-Hans',
96
+ fallbackLocale: 'zh-Hans',
97
+ messages: {
98
+ // 只覆盖想自定义的 key,未传的以内置文案兜底
99
+ 'zh-Hans': { uv: { dialog: { title: '温馨提示' } } },
100
+ en: { uv: { dialog: { title: 'Notice' } } },
101
+ },
102
+ });
103
+
104
+ app.use(i18n);
105
+ ```
106
+
107
+ ```ts
108
+ // 页面内
109
+ import { useI18n, setLocale, getLocale } from '@zfqh/uview-x';
110
+
111
+ const { t } = useI18n();
112
+
113
+ t('uv.dialog.title'); // 未创建实例时也能取到内置文案(自动降级)
114
+ setLocale('en'); // 更新实例 + 写入 storage 的 UNI_LOCALE + 调用 uni.setLocale
115
+ getLocale(); // 读取当前语言(优先 storage UNI_LOCALE)
116
+ ```
117
+
118
+ - 公共 API:`createI18n` / `getLocale` / `getLocaleMessage` / `setLocale` + `useI18n`;`useI18n` 在未创建实例时降级读组件内置语言包,不会抛错。
119
+ - 内置文案键空间:`uv.dialog.title/cancel/confirm`、`uv.code.start/change/end`、`uv.time.*`、`uv.form.*`(async-validator 校验文案,保留 `%s` 占位符)。
120
+ - `uv-dialog` 的 `title` / `cancelText` / `confirmText` 默认 `''` 时取内置文案;隐藏按钮用 `showCancelButton` / `showConfirmButton`(文本只能是 String,不能传 `false`)。
121
+ - 完整 API、平台差异与降级规则见 `AGENTS.md` §12.1。
122
+
123
+ ## 文档
124
+
125
+ - 开发约定、组件 API、平台差异与验证:[AGENTS.md](AGENTS.md)
126
+ - 示例工程:`examples/uview-vapor`(蒸汽模式)、`examples/uview-nvue`(nvue)
127
+ - 参考:[uni-app x 蒸汽模式](https://doc.dcloud.net.cn/uni-app-x/app-vapor.html) · [uv-ui 官方文档](https://www.uvui.cn)
@@ -0,0 +1,83 @@
1
+ // @ts-nocheck
2
+
3
+ import config from '../../utils/config';
4
+
5
+ const props = {
6
+ // 是否显示圆点
7
+ isDot: {
8
+ type: Boolean,
9
+ default: false,
10
+ },
11
+ // 显示的内容
12
+ value: {
13
+ type: [Number, String],
14
+ default: '',
15
+ },
16
+ // 是否显示
17
+ show: {
18
+ type: Boolean,
19
+ default: true,
20
+ },
21
+ // 最大值,超过最大值会显示 '{max}+'
22
+ max: {
23
+ type: [Number, String],
24
+ default: 999,
25
+ },
26
+ // 主题类型,error|warning|success|primary
27
+ type: {
28
+ type: [String, null],
29
+ default: 'error',
30
+ },
31
+ // 当数值为 0 时,是否展示 Badge
32
+ showZero: {
33
+ type: Boolean,
34
+ default: false,
35
+ },
36
+ // 背景颜色,优先级比type高,如设置,type参数会失效
37
+ bgColor: {
38
+ type: [String, null],
39
+ default: null,
40
+ },
41
+ // 字体颜色
42
+ color: {
43
+ type: [String, null],
44
+ default: null,
45
+ },
46
+ // 徽标形状,circle-四角均为圆角,horn-左下角为直角
47
+ shape: {
48
+ type: [String, null],
49
+ default: 'circle',
50
+ },
51
+ // 设置数字的显示方式,overflow|ellipsis|limit
52
+ numberType: {
53
+ type: [String, null],
54
+ default: 'overflow',
55
+ },
56
+ // 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
57
+ offset: {
58
+ type: Array,
59
+ default: () => [],
60
+ },
61
+ // 是否反转背景和字体颜色
62
+ inverted: {
63
+ type: Boolean,
64
+ default: false,
65
+ },
66
+ // 是否绝对定位
67
+ absolute: {
68
+ type: Boolean,
69
+ default: false,
70
+ },
71
+ customStyle: {
72
+ type: [Object, String],
73
+ default: () => ({}),
74
+ },
75
+ customClass: {
76
+ type: String,
77
+ default: '',
78
+ },
79
+
80
+ ...config.props.badge,
81
+ };
82
+
83
+ export default props;
@@ -0,0 +1,186 @@
1
+ <template>
2
+ <text
3
+ v-if="showBadge"
4
+ class="uv-badge"
5
+ :class="badgeClasses"
6
+ :style="[$uv.addStyle(p.customStyle), badgeStyle]"
7
+ >{{ badgeText }}</text>
8
+ </template>
9
+
10
+ <script setup lang="ts">
11
+ import { computed } from 'vue'
12
+ import { $uv } from '../../utils'
13
+ import props from './props'
14
+
15
+ defineOptions({
16
+ name: 'uv-badge',
17
+ // #ifdef UNI-APP-X
18
+ styleIsolation: 'app-and-page',
19
+ // #endif
20
+ virtualHost: true,
21
+ })
22
+
23
+ /**
24
+ * badge 徽标数
25
+ * @description 该组件一般用于图标右上角显示未读的消息数量,提示用户点击,有圆点和圆包含文字两种形式。
26
+ * @tutorial https://www.uvui.cn/components/badge.html
27
+ * @property {Boolean} isDot 是否显示圆点 (默认 false )
28
+ * @property {String | Number} value 显示的内容
29
+ * @property {Boolean} show 是否显示 (默认 true )
30
+ * @property {String | Number} max 最大值,超过最大值会显示 '{max}+' (默认999)
31
+ * @property {String} type 主题类型,error|warning|success|primary (默认 'error' )
32
+ * @property {Boolean} showZero 当数值为 0 时,是否展示 Badge (默认 false )
33
+ * @property {String} bgColor 背景颜色,优先级比type高,如设置,type参数会失效
34
+ * @property {String} color 字体颜色 (默认 '#ffffff' )
35
+ * @property {String} shape 徽标形状,circle-四角均为圆角,horn-左下角为直角 (默认 'circle' )
36
+ * @property {String} numberType 设置数字的显示方式,overflow|ellipsis|limit (默认 'overflow')
37
+ * @property {Array} offset 设置badge的位置偏移,格式为 [x, y],也即设置的为top和right的值,absolute为true时有效
38
+ * @property {Boolean} inverted 是否反转背景和字体颜色(默认 false )
39
+ * @property {Boolean} absolute 是否绝对定位(默认 false )
40
+ * @property {Object} customStyle 定义需要用到的外部样式
41
+ * @example <uv-badge :type="type" :count="count"></uv-badge>
42
+ */
43
+ const p = defineProps(props)
44
+
45
+ // 主题类型,未设置时默认 error
46
+ const propsType = computed(() => p.type || 'error')
47
+
48
+ // 是否显示 badge
49
+ const showBadge = computed(() => {
50
+ const valueIsZero = Number(p.value) === 0
51
+ return p.show && ((valueIsZero ? p.showZero : true) || p.isDot)
52
+ })
53
+
54
+ const badgeClasses = computed<string[]>(() => {
55
+ const classes: string[] = [p.isDot ? 'uv-badge--dot' : 'uv-badge--not-dot']
56
+ if (p.inverted) classes.push('uv-badge--inverted')
57
+ if (p.shape === 'horn') classes.push('uv-badge--horn')
58
+ classes.push(`uv-badge--${propsType.value}${p.inverted ? '--inverted' : ''}`)
59
+ if (p.customClass) classes.push(p.customClass)
60
+ return classes
61
+ })
62
+
63
+ const badgeStyle = computed(() => {
64
+ const style: any = {}
65
+ if (p.color) style.color = p.color
66
+ if (p.bgColor && !p.inverted) style.backgroundColor = p.bgColor
67
+ if (p.absolute) {
68
+ style.position = 'absolute'
69
+ // 如果有设置offset参数
70
+ if (p.offset.length) {
71
+ // top和right分为为offset的第一个和第二个值,如果没有第二个值,则right等于top
72
+ const top = p.offset[0]
73
+ const right = p.offset[1] || top
74
+ style.top = $uv.addUnit(top)
75
+ style.right = $uv.addUnit(right)
76
+ }
77
+ }
78
+ return style
79
+ })
80
+
81
+ const showValue = computed(() => {
82
+ switch (p.numberType) {
83
+ case 'overflow':
84
+ return Number(p.value) > Number(p.max) ? `${p.max}+` : p.value
85
+ case 'ellipsis':
86
+ return Number(p.value) > Number(p.max) ? '...' : p.value
87
+ case 'limit':
88
+ return Number(p.value) > 999
89
+ ? Number(p.value) >= 9999
90
+ ? `${Math.floor((p.value as any) / 1e4 * 100) / 100}w`
91
+ : `${Math.floor((p.value as any) / 1e3 * 100) / 100}k`
92
+ : p.value
93
+ default:
94
+ return Number(p.value)
95
+ }
96
+ })
97
+
98
+ // 圆点模式不展示文字
99
+ const badgeText = computed(() => (p.isDot ? '' : showValue.value))
100
+ </script>
101
+
102
+ <style lang="scss">
103
+ @import '../../styles/components.scss';
104
+ @import '../../styles/color.scss';
105
+
106
+ $uv-badge-primary: $uv-primary !default;
107
+ $uv-badge-error: $uv-error !default;
108
+ $uv-badge-success: $uv-success !default;
109
+ $uv-badge-info: $uv-info !default;
110
+ $uv-badge-warning: $uv-warning !default;
111
+ $uv-badge-dot-radius: 100px !default;
112
+ $uv-badge-dot-size: 8px !default;
113
+ $uv-badge-text-font-size: 11px !default;
114
+ $uv-badge-text-padding: 2px 5px !default;
115
+ $uv-badge-text-align: center !default;
116
+ $uv-badge-text-color: #ffffff !default;
117
+
118
+ .uv-badge {
119
+ border-top-right-radius: $uv-badge-dot-radius;
120
+ border-top-left-radius: $uv-badge-dot-radius;
121
+ border-bottom-left-radius: $uv-badge-dot-radius;
122
+ border-bottom-right-radius: $uv-badge-dot-radius;
123
+ @include flex;
124
+ line-height: $uv-badge-text-font-size;
125
+ text-align: $uv-badge-text-align;
126
+ font-size: $uv-badge-text-font-size;
127
+ color: $uv-badge-text-color;
128
+ }
129
+
130
+ .uv-badge--dot {
131
+ height: $uv-badge-dot-size;
132
+ width: $uv-badge-dot-size;
133
+ }
134
+
135
+ .uv-badge--inverted {
136
+ font-size: 13px;
137
+ }
138
+
139
+ .uv-badge--not-dot {
140
+ padding: $uv-badge-text-padding;
141
+ }
142
+
143
+ .uv-badge--horn {
144
+ border-bottom-left-radius: 0;
145
+ }
146
+
147
+ .uv-badge--primary {
148
+ background-color: $uv-badge-primary;
149
+ }
150
+
151
+ .uv-badge--primary--inverted {
152
+ color: $uv-badge-primary;
153
+ }
154
+
155
+ .uv-badge--error {
156
+ background-color: $uv-badge-error;
157
+ }
158
+
159
+ .uv-badge--error--inverted {
160
+ color: $uv-badge-error;
161
+ }
162
+
163
+ .uv-badge--success {
164
+ background-color: $uv-badge-success;
165
+ }
166
+
167
+ .uv-badge--success--inverted {
168
+ color: $uv-badge-success;
169
+ }
170
+
171
+ .uv-badge--info {
172
+ background-color: $uv-badge-info;
173
+ }
174
+
175
+ .uv-badge--info--inverted {
176
+ color: $uv-badge-info;
177
+ }
178
+
179
+ .uv-badge--warning {
180
+ background-color: $uv-badge-warning;
181
+ }
182
+
183
+ .uv-badge--warning--inverted {
184
+ color: $uv-badge-warning;
185
+ }
186
+ </style>
@@ -0,0 +1,148 @@
1
+ // @ts-nocheck
2
+
3
+ import config from '../../utils/config';
4
+
5
+ const props = {
6
+ hairline: {
7
+ type: Boolean,
8
+ default: true,
9
+ },
10
+ type: {
11
+ type: String,
12
+ default: 'info',
13
+ },
14
+ size: {
15
+ type: String,
16
+ default: 'normal',
17
+ },
18
+ shape: {
19
+ type: String,
20
+ default: 'square',
21
+ },
22
+ radius: {
23
+ type: [String, Number],
24
+ default: null,
25
+ },
26
+ plain: {
27
+ type: Boolean,
28
+ default: false,
29
+ },
30
+ // 浅色按钮:背景使用主题色的 light 色值,文字/图标使用主题色。
31
+ // 与 plain 冲突时 plain 优先(light 不生效)。
32
+ light: {
33
+ type: Boolean,
34
+ default: false,
35
+ },
36
+ disabled: {
37
+ type: Boolean,
38
+ default: false,
39
+ },
40
+ loading: {
41
+ type: Boolean,
42
+ default: false,
43
+ },
44
+ loadingText: {
45
+ type: [String, Number],
46
+ default: '',
47
+ },
48
+ loadingMode: {
49
+ type: String,
50
+ default: 'spinner',
51
+ },
52
+ loadingSize: {
53
+ type: [String, Number],
54
+ default: 14,
55
+ },
56
+ openType: {
57
+ type: String,
58
+ default: '',
59
+ },
60
+ formType: {
61
+ type: String,
62
+ default: '',
63
+ },
64
+ appParameter: {
65
+ type: String,
66
+ default: '',
67
+ },
68
+ hoverStopPropagation: {
69
+ type: Boolean,
70
+ default: true,
71
+ },
72
+ lang: {
73
+ type: String,
74
+ default: 'en',
75
+ },
76
+ sessionFrom: {
77
+ type: String,
78
+ default: '',
79
+ },
80
+ sendMessageTitle: {
81
+ type: String,
82
+ default: '',
83
+ },
84
+ sendMessagePath: {
85
+ type: String,
86
+ default: '',
87
+ },
88
+ sendMessageImg: {
89
+ type: String,
90
+ default: '',
91
+ },
92
+ showMessageCard: {
93
+ type: Boolean,
94
+ default: true,
95
+ },
96
+ dataName: {
97
+ type: String,
98
+ default: '',
99
+ },
100
+ throttleTime: {
101
+ type: [String, Number],
102
+ default: 0,
103
+ },
104
+ hoverStartTime: {
105
+ type: [String, Number],
106
+ default: 0,
107
+ },
108
+ hoverStayTime: {
109
+ type: [String, Number],
110
+ default: 200,
111
+ },
112
+ text: {
113
+ type: [String, Number],
114
+ default: '',
115
+ },
116
+ icon: {
117
+ type: String,
118
+ default: '',
119
+ },
120
+ iconSize: {
121
+ type: [String, Number],
122
+ default: '',
123
+ },
124
+ iconColor: {
125
+ type: String,
126
+ default: '#000000',
127
+ },
128
+ color: {
129
+ type: String,
130
+ default: '',
131
+ },
132
+ customTextStyle: {
133
+ type: [Object, String],
134
+ default: '',
135
+ },
136
+ customStyle: {
137
+ type: [Object, String],
138
+ default: () => ({}),
139
+ },
140
+ customClass: {
141
+ type: String,
142
+ default: '',
143
+ },
144
+
145
+ ...config.props.button,
146
+ };
147
+
148
+ export default props;