hy-app 0.5.4 → 0.5.5
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/components/hy-action-sheet/typing.d.ts +1 -63
- package/components/hy-address-picker/hy-address-picker.vue +7 -6
- package/components/hy-address-picker/typing.d.ts +0 -84
- package/components/hy-avatar/typing.d.ts +0 -66
- package/components/hy-back-top/typing.d.ts +0 -47
- package/components/hy-badge/typing.d.ts +0 -62
- package/components/hy-button/typing.d.ts +28 -162
- package/components/hy-calendar/hy-calendar.vue +2 -2
- package/components/hy-calendar/typing.d.ts +0 -128
- package/components/hy-card/hy-card.vue +12 -12
- package/components/hy-card/index.scss +17 -5
- package/components/hy-card/props.ts +1 -2
- package/components/hy-card/typing.d.ts +1 -114
- package/components/hy-cell/props.ts +1 -1
- package/components/hy-cell/typing.d.ts +0 -55
- package/components/hy-check-button/typing.d.ts +0 -43
- package/components/hy-checkbox/typing.d.ts +1 -73
- package/components/hy-checkbox-group/typing.d.ts +0 -65
- package/components/hy-code-input/typing.d.ts +0 -70
- package/components/hy-count-down/typing.d.ts +1 -20
- package/components/hy-count-to/typing.d.ts +0 -47
- package/components/hy-coupon/typing.d.ts +0 -133
- package/components/hy-datetime-picker/typing.d.ts +0 -119
- package/components/hy-dropdown-item/typing.d.ts +12 -31
- package/components/hy-empty/typing.d.ts +1 -59
- package/components/hy-float-button/typing.d.ts +24 -113
- package/components/hy-form/typing.d.ts +0 -27
- package/components/hy-form-item/hy-form-item.vue +7 -5
- package/components/hy-form-item/typing.d.ts +0 -19
- package/components/hy-grid/typing.d.ts +0 -43
- package/components/hy-icon/typing.d.ts +0 -86
- package/components/hy-image/typing.d.ts +0 -80
- package/components/hy-input/typing.d.ts +0 -149
- package/components/hy-list/typing.d.ts +0 -51
- package/components/hy-menu/typing.d.ts +0 -35
- package/components/hy-modal/typing.d.ts +9 -84
- package/components/hy-navbar/typing.d.ts +0 -81
- package/components/hy-notice-bar/typing.d.ts +0 -65
- package/components/hy-number-step/typing.d.ts +0 -110
- package/components/hy-overlay/typing.d.ts +2 -27
- package/components/hy-pagination/typing.d.ts +6 -49
- package/components/hy-picker/typing.d.ts +27 -124
- package/components/hy-popover/typing.d.ts +25 -66
- package/components/hy-popup/typing.d.ts +8 -77
- package/components/hy-price/typing.d.ts +0 -41
- package/components/hy-qrcode/hy-qrcode.vue +3 -4
- package/components/hy-qrcode/index.scss +3 -3
- package/components/hy-qrcode/qrcode.js +0 -138
- package/components/hy-qrcode/typing.d.ts +0 -66
- package/components/hy-radio/typing.d.ts +1 -86
- package/components/hy-rate/typing.d.ts +0 -62
- package/components/hy-read-more/typing.d.ts +4 -49
- package/components/hy-scroll-list/typing.d.ts +4 -33
- package/components/hy-search/typing.d.ts +19 -120
- package/components/hy-signature/typing.d.ts +0 -101
- package/components/hy-slider/typing.d.ts +8 -77
- package/components/hy-steps/typing.d.ts +16 -60
- package/components/hy-submit-bar/typing.d.ts +0 -72
- package/components/hy-subsection/typing.d.ts +0 -49
- package/components/hy-swipe-action/index.ts +13 -22
- package/components/hy-swipe-action/typing.d.ts +1 -38
- package/components/hy-swiper/typing.d.ts +0 -101
- package/components/hy-switch/typing.d.ts +0 -62
- package/components/hy-tabbar/index.scss +1 -1
- package/components/hy-tabbar/typing.d.ts +0 -40
- package/components/hy-tabbar-item/typing.ts +0 -12
- package/components/hy-tabs/typing.d.ts +25 -92
- package/components/hy-tag/typing.d.ts +9 -78
- package/components/hy-text/typing.d.ts +3 -100
- package/components/hy-textarea/typing.d.ts +0 -27
- package/components/hy-tooltip/props.ts +0 -1
- package/components/hy-tooltip/typing.d.ts +2 -55
- package/components/hy-transition/typing.d.ts +14 -43
- package/components/hy-upload/typing.d.ts +56 -164
- package/components/hy-warn/typing.d.ts +4 -45
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/components/hy-config-provider/typing.d.ts +0 -24
- package/components/hy-divider/typing.d.ts +0 -64
- package/components/hy-dropdown/typing.d.ts +0 -48
- package/components/hy-form-group/typing.d.ts +0 -0
- package/components/hy-line/typing.d.ts +0 -32
- package/components/hy-line-progress/typing.d.ts +0 -32
- package/components/hy-loading/typing.d.ts +0 -52
- package/components/hy-notify/typing.d.ts +0 -48
- package/components/hy-status-bar/typing.d.ts +0 -12
- package/components/hy-tabbar-group/README.md +0 -326
- package/components/hy-waterfall/typing.d.ts +0 -14
- package/components/hy-watermark/typing.d.ts +0 -76
|
@@ -1,79 +1,10 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyPopupProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 是否展示弹窗 (默认 false )
|
|
6
|
-
* */
|
|
7
|
-
show: boolean
|
|
8
|
-
/**
|
|
9
|
-
* @description 是否显示遮罩 (默认 true )
|
|
10
|
-
* */
|
|
11
|
-
overlay?: boolean
|
|
12
|
-
/**
|
|
13
|
-
* @description 弹出方向(默认 'bottom' )
|
|
14
|
-
* */
|
|
15
|
-
mode?: HyApp.LayoutType
|
|
16
|
-
/**
|
|
17
|
-
* @description 动画时长,单位ms (默认 300 )
|
|
18
|
-
* */
|
|
19
|
-
duration?: number
|
|
20
|
-
/**
|
|
21
|
-
* @description 是否显示关闭图标(默认 false )
|
|
22
|
-
* */
|
|
23
|
-
closeable?: boolean
|
|
24
|
-
/**
|
|
25
|
-
* @description 自定义遮罩的样式
|
|
26
|
-
* */
|
|
27
|
-
overlayStyle?: CSSProperties
|
|
28
|
-
/**
|
|
29
|
-
* @description 遮罩透明度,0-1之间(默认 0.5)
|
|
30
|
-
* */
|
|
31
|
-
overlayOpacity?: number
|
|
32
|
-
/**
|
|
33
|
-
* @description 点击遮罩是否关闭弹窗 (默认 true )
|
|
34
|
-
* */
|
|
35
|
-
closeOnClickOverlay?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* @description 层级 (默认 10075 )
|
|
38
|
-
* */
|
|
39
|
-
zIndex?: number
|
|
40
|
-
/**
|
|
41
|
-
* @description 是否为iPhoneX留出底部安全距离 (默认 true )
|
|
42
|
-
* */
|
|
43
|
-
safeAreaInsetBottom?: boolean
|
|
44
|
-
/**
|
|
45
|
-
* @description 是否留出顶部安全距离(状态栏高度) (默认 false )
|
|
46
|
-
* */
|
|
47
|
-
safeAreaInsetTop?: boolean
|
|
48
|
-
/**
|
|
49
|
-
* @description 自定义关闭图标位置(默认 'top-right' )
|
|
50
|
-
* */
|
|
51
|
-
closeIconPos?: 'top-left' | 'top-right'
|
|
52
|
-
/**
|
|
53
|
-
* @description 圆角值(默认 0)
|
|
54
|
-
* */
|
|
55
|
-
round?: string | number
|
|
56
|
-
/**
|
|
57
|
-
* @description 当mode=center时 是否开启缩放(默认 true )
|
|
58
|
-
* */
|
|
59
|
-
zoom?: boolean
|
|
60
|
-
/**
|
|
61
|
-
* @description 背景颜色
|
|
62
|
-
* */
|
|
63
|
-
bgColor?: string
|
|
64
|
-
/**
|
|
65
|
-
* @description 自定义样式
|
|
66
|
-
* */
|
|
67
|
-
customStyle?: CSSProperties
|
|
68
|
-
}
|
|
69
|
-
|
|
70
1
|
export interface IPopupEmits {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
2
|
+
/** 弹出层打开触发 */
|
|
3
|
+
(e: 'open'): void
|
|
4
|
+
/** 弹出层关闭触发 */
|
|
5
|
+
(e: 'close'): void
|
|
6
|
+
/** 弹出层点击触发 */
|
|
7
|
+
(e: 'click'): void
|
|
8
|
+
/** 显示隐藏触发 */
|
|
9
|
+
(e: 'update:show', visible: boolean): void
|
|
79
10
|
}
|
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyPriceProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 传入金额值
|
|
6
|
-
* */
|
|
7
|
-
text: string | number
|
|
8
|
-
/**
|
|
9
|
-
* @description 金额符号(默认:¥)
|
|
10
|
-
* */
|
|
11
|
-
symbol?: string
|
|
12
|
-
/**
|
|
13
|
-
* @description 比例大小(默认:1.4)
|
|
14
|
-
* */
|
|
15
|
-
ratio?: number
|
|
16
|
-
/**
|
|
17
|
-
* @description 保留小数点后几位数(默认:2)
|
|
18
|
-
* */
|
|
19
|
-
num?: number
|
|
20
|
-
/**
|
|
21
|
-
* @description 字体颜色(默认:#FE3232)
|
|
22
|
-
* */
|
|
23
|
-
color?: string
|
|
24
|
-
/**
|
|
25
|
-
* @description 字体大小(默认:12)
|
|
26
|
-
* */
|
|
27
|
-
size?: string | number
|
|
28
|
-
/**
|
|
29
|
-
* @description 字体粗细(默认:500)
|
|
30
|
-
* */
|
|
31
|
-
weight?: number
|
|
32
|
-
/**
|
|
33
|
-
* @description 是否倾斜(默认:false)
|
|
34
|
-
* */
|
|
35
|
-
slant?: boolean
|
|
36
|
-
/**
|
|
37
|
-
* @description 自定义样式
|
|
38
|
-
* */
|
|
39
|
-
customStyle?: CSSProperties
|
|
40
|
-
}
|
|
41
|
-
|
|
42
1
|
export interface IPriceEmits {
|
|
43
2
|
/** 点击事件 */
|
|
44
3
|
(e: 'click', text: string | number): void
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<canvas
|
|
7
7
|
class="hy-qrcode__content--canvas"
|
|
8
8
|
:id="cid"
|
|
9
|
-
|
|
9
|
+
:canvas-id="cid"
|
|
10
10
|
:style="{ width: addUnit(size), height: addUnit(size) }"
|
|
11
11
|
/>
|
|
12
12
|
<!-- #endif -->
|
|
@@ -36,7 +36,7 @@ export default {
|
|
|
36
36
|
import { getCurrentInstance, ref, watch, nextTick } from 'vue'
|
|
37
37
|
import type { IQrcodeEmits } from './typing'
|
|
38
38
|
import QRCode from './qrcode.js'
|
|
39
|
-
import { addUnit, error
|
|
39
|
+
import { addUnit, error } from '../../libs'
|
|
40
40
|
// 组件
|
|
41
41
|
import HyLoading from '../hy-loading/hy-loading.vue'
|
|
42
42
|
import HyImage from '../hy-image/hy-image.vue'
|
|
@@ -52,7 +52,7 @@ const props = defineProps({
|
|
|
52
52
|
/** 实例ID字符串(如果有多个二维码组件必须设置不一样的cid) */
|
|
53
53
|
cid: {
|
|
54
54
|
type: String,
|
|
55
|
-
default: 'hy-qrcode-
|
|
55
|
+
default: 'hy-qrcode-canvas' + Math.random().toString()
|
|
56
56
|
},
|
|
57
57
|
/** 二维码大小 */
|
|
58
58
|
size: {
|
|
@@ -138,7 +138,6 @@ const initQrCode = () => {
|
|
|
138
138
|
image: props.icon, // 二维码图标
|
|
139
139
|
imageSize: props.iconSize, // 二维码图标大小
|
|
140
140
|
cbResult: function (res: any) {
|
|
141
|
-
console.log(res)
|
|
142
141
|
// 生成二维码的回调
|
|
143
142
|
_result(res)
|
|
144
143
|
}
|
|
@@ -1146,111 +1146,6 @@ let QRCode = {}
|
|
|
1146
1146
|
}
|
|
1147
1147
|
return options.foreground
|
|
1148
1148
|
}
|
|
1149
|
-
// 为2D Canvas添加辅助函数
|
|
1150
|
-
function drawIconWithBackground(canvas, ctx, options, qrCodeAlg) {
|
|
1151
|
-
// 在小程序中使用canvas.createImage()而不是wx.createImage()
|
|
1152
|
-
const img = canvas.createImage()
|
|
1153
|
-
img.src = options.image
|
|
1154
|
-
img.onload = function () {
|
|
1155
|
-
var ratioImgSize = options.imageSize || 40
|
|
1156
|
-
var x = Number(((options.size - ratioImgSize) / 2).toFixed(2))
|
|
1157
|
-
var y = Number(((options.size - ratioImgSize) / 2).toFixed(2))
|
|
1158
|
-
|
|
1159
|
-
// 绘制圆角矩形背景
|
|
1160
|
-
drawRoundedRect2D(ctx, x, y, ratioImgSize, ratioImgSize, 2, options.background)
|
|
1161
|
-
|
|
1162
|
-
// 绘制图标
|
|
1163
|
-
ctx.drawImage(img, x, y, ratioImgSize, ratioImgSize)
|
|
1164
|
-
|
|
1165
|
-
// 导出图片
|
|
1166
|
-
exportCanvasImage(canvas, options)
|
|
1167
|
-
}
|
|
1168
|
-
|
|
1169
|
-
// 添加错误处理
|
|
1170
|
-
img.onerror = function (e) {
|
|
1171
|
-
console.error('Failed to load QR code icon:', e)
|
|
1172
|
-
// 即使图标加载失败也要导出二维码
|
|
1173
|
-
exportCanvasImage(canvas, options)
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
|
-
function drawRoundedRect2D(ctx, x, y, width, height, r, fillColor) {
|
|
1178
|
-
ctx.beginPath()
|
|
1179
|
-
ctx.moveTo(x + r, y)
|
|
1180
|
-
ctx.arcTo(x + width, y, x + width, y + r, r)
|
|
1181
|
-
ctx.arcTo(x + width, y + height, x + width - r, y + height, r)
|
|
1182
|
-
ctx.arcTo(x, y + height, x, y + height - r, r)
|
|
1183
|
-
ctx.arcTo(x, y, x + r, y, r)
|
|
1184
|
-
ctx.closePath()
|
|
1185
|
-
ctx.fillStyle = fillColor
|
|
1186
|
-
ctx.fill()
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
function exportCanvasImage(canvas, options) {
|
|
1190
|
-
setTimeout(() => {
|
|
1191
|
-
wx.canvasToTempFilePath(
|
|
1192
|
-
{
|
|
1193
|
-
canvas: canvas,
|
|
1194
|
-
quality: 1,
|
|
1195
|
-
success: function (res) {
|
|
1196
|
-
if (options.cbResult) {
|
|
1197
|
-
options.cbResult(res.tempFilePath)
|
|
1198
|
-
}
|
|
1199
|
-
},
|
|
1200
|
-
fail: function (res) {
|
|
1201
|
-
if (options.cbResult) {
|
|
1202
|
-
options.cbResult(res)
|
|
1203
|
-
}
|
|
1204
|
-
},
|
|
1205
|
-
complete: function () {
|
|
1206
|
-
uni.hideLoading()
|
|
1207
|
-
}
|
|
1208
|
-
},
|
|
1209
|
-
options.context
|
|
1210
|
-
)
|
|
1211
|
-
}, options.text.length + 100)
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
// 2D Canvas二维码绘制函数
|
|
1215
|
-
function drawQRCode2D(canvas, ctx, options, qrCodeAlg) {
|
|
1216
|
-
var count = qrCodeAlg.getModuleCount()
|
|
1217
|
-
var ratioSize = options.size
|
|
1218
|
-
|
|
1219
|
-
// 清除画布
|
|
1220
|
-
ctx.clearRect(0, 0, ratioSize, ratioSize)
|
|
1221
|
-
// 设置背景色
|
|
1222
|
-
ctx.fillStyle = options.background
|
|
1223
|
-
ctx.fillRect(0, 0, ratioSize, ratioSize)
|
|
1224
|
-
|
|
1225
|
-
//计算每个点的长宽
|
|
1226
|
-
var tileW = (ratioSize / count).toPrecision(4)
|
|
1227
|
-
var tileH = (ratioSize / count).toPrecision(4)
|
|
1228
|
-
|
|
1229
|
-
//绘制二维码
|
|
1230
|
-
for (var row = 0; row < count; row++) {
|
|
1231
|
-
for (var col = 0; col < count; col++) {
|
|
1232
|
-
var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW)
|
|
1233
|
-
var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW)
|
|
1234
|
-
var foreground = getForeGround({
|
|
1235
|
-
row: row,
|
|
1236
|
-
col: col,
|
|
1237
|
-
count: count,
|
|
1238
|
-
options: options
|
|
1239
|
-
})
|
|
1240
|
-
ctx.fillStyle = qrCodeAlg.modules[row][col] ? foreground : options.background
|
|
1241
|
-
ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h)
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
|
|
1245
|
-
if (options.image) {
|
|
1246
|
-
// 绘制中间图标
|
|
1247
|
-
drawIconWithBackground(canvas, ctx, options, qrCodeAlg)
|
|
1248
|
-
} else {
|
|
1249
|
-
// 导出图片
|
|
1250
|
-
exportCanvasImage(canvas, options)
|
|
1251
|
-
}
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
1149
|
// 创建canvas
|
|
1255
1150
|
let createCanvas = function (options) {
|
|
1256
1151
|
if (options.showLoading) {
|
|
@@ -1259,39 +1154,6 @@ let QRCode = {}
|
|
|
1259
1154
|
mask: true
|
|
1260
1155
|
})
|
|
1261
1156
|
}
|
|
1262
|
-
|
|
1263
|
-
// 尝试使用2D Canvas (小程序端)
|
|
1264
|
-
try {
|
|
1265
|
-
if (!options.nvueContext && typeof wx !== 'undefined' && wx.createSelectorQuery) {
|
|
1266
|
-
const query = wx.createSelectorQuery().in(options.context)
|
|
1267
|
-
query
|
|
1268
|
-
.select('#' + options.canvasId)
|
|
1269
|
-
.fields({ node: true, size: true })
|
|
1270
|
-
.exec((res) => {
|
|
1271
|
-
if (res[0] && res[0].node) {
|
|
1272
|
-
const canvas = res[0].node
|
|
1273
|
-
const ctx = canvas.getContext('2d')
|
|
1274
|
-
|
|
1275
|
-
// 设置canvas尺寸
|
|
1276
|
-
const dpr = wx.getSystemInfoSync().pixelRatio
|
|
1277
|
-
canvas.width = options.size * dpr
|
|
1278
|
-
canvas.height = options.size * dpr
|
|
1279
|
-
ctx.scale(dpr, dpr)
|
|
1280
|
-
|
|
1281
|
-
// 创建二维码算法实例
|
|
1282
|
-
var qrCodeAlg = new QRCodeAlg(options.text, options.correctLevel)
|
|
1283
|
-
|
|
1284
|
-
// 使用2D Canvas绘制
|
|
1285
|
-
drawQRCode2D(canvas, ctx, options, qrCodeAlg)
|
|
1286
|
-
return
|
|
1287
|
-
}
|
|
1288
|
-
})
|
|
1289
|
-
}
|
|
1290
|
-
} catch (e) {
|
|
1291
|
-
console.warn('2D Canvas initialization failed, falling back to legacy mode:', e)
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
// 回退到传统Canvas方式
|
|
1295
1157
|
var ctx = ''
|
|
1296
1158
|
if (options.nvueContext) {
|
|
1297
1159
|
ctx = options.nvueContext
|
|
@@ -1,69 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyQrcodeProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 实例ID字符串(如果有多个二维码组件必须设置不一样的cid)
|
|
6
|
-
* */
|
|
7
|
-
cid?: string
|
|
8
|
-
/**
|
|
9
|
-
* @description 二维码大小
|
|
10
|
-
* */
|
|
11
|
-
size?: string | number
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @description 二维码内容
|
|
15
|
-
* */
|
|
16
|
-
text: string
|
|
17
|
-
/**
|
|
18
|
-
* @description 是否显示二维码
|
|
19
|
-
* */
|
|
20
|
-
show?: boolean
|
|
21
|
-
/**
|
|
22
|
-
* @description 二维码背景色
|
|
23
|
-
* */
|
|
24
|
-
background?: string
|
|
25
|
-
/**
|
|
26
|
-
* @description 二维码颜色
|
|
27
|
-
* */
|
|
28
|
-
foreground?: string
|
|
29
|
-
/**
|
|
30
|
-
* @description 定位角点颜色
|
|
31
|
-
* */
|
|
32
|
-
pdGround?: string
|
|
33
|
-
/**
|
|
34
|
-
* @description 容错级别
|
|
35
|
-
* */
|
|
36
|
-
lv?: number
|
|
37
|
-
/**
|
|
38
|
-
* @description 是否是自定义组件
|
|
39
|
-
* */
|
|
40
|
-
usingComponents?: boolean
|
|
41
|
-
/**
|
|
42
|
-
* @description 二维码中间图标
|
|
43
|
-
* */
|
|
44
|
-
icon?: string
|
|
45
|
-
/**
|
|
46
|
-
* @description 二维码中间图标大小
|
|
47
|
-
* */
|
|
48
|
-
iconSize?: string | number
|
|
49
|
-
/**
|
|
50
|
-
* @description 显示加载状态
|
|
51
|
-
* */
|
|
52
|
-
showLoading?: boolean
|
|
53
|
-
/**
|
|
54
|
-
* @description 加载中提示语
|
|
55
|
-
* */
|
|
56
|
-
loadingText?: string
|
|
57
|
-
/**
|
|
58
|
-
* @description 是否预览
|
|
59
|
-
* */
|
|
60
|
-
allowPreview?: boolean
|
|
61
|
-
/**
|
|
62
|
-
* @description 定义需要用到的外部样式
|
|
63
|
-
* */
|
|
64
|
-
customStyle?: CSSProperties
|
|
65
|
-
}
|
|
66
|
-
|
|
67
1
|
export interface IQrcodeEmits {
|
|
68
2
|
/** 二维码生成成功 */
|
|
69
3
|
(e: 'result', res: any): void
|
|
@@ -1,89 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CheckboxColumnsVo, IFieldNames } from '../hy-check-button/typing'
|
|
3
|
-
|
|
4
|
-
export default interface HyRadioProps {
|
|
5
|
-
/**
|
|
6
|
-
* @description 双向绑定值,数组类型
|
|
7
|
-
* */
|
|
8
|
-
modelValue: string | number
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @description 接受数组值
|
|
12
|
-
* */
|
|
13
|
-
columns: CheckboxColumnsVo[]
|
|
14
|
-
/**
|
|
15
|
-
* @description 自定义接收columns的键
|
|
16
|
-
* */
|
|
17
|
-
fieldNames?: IFieldNames
|
|
18
|
-
/**
|
|
19
|
-
* @description checkbox组件的标示符
|
|
20
|
-
* */
|
|
21
|
-
name?: string
|
|
22
|
-
/**
|
|
23
|
-
* @description 形状,square为方形,circle为圆型
|
|
24
|
-
* */
|
|
25
|
-
shape?: HyApp.ShapeType
|
|
26
|
-
/**
|
|
27
|
-
* @description 整体的大小
|
|
28
|
-
* */
|
|
29
|
-
size?: HyApp.SizeType | string | number
|
|
30
|
-
/**
|
|
31
|
-
* @description 是否默认选中
|
|
32
|
-
* */
|
|
33
|
-
checkbox?: boolean
|
|
34
|
-
/**
|
|
35
|
-
* @description 是否禁用
|
|
36
|
-
* */
|
|
37
|
-
disabled?: boolean
|
|
38
|
-
/**
|
|
39
|
-
* @description 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
|
|
40
|
-
* */
|
|
41
|
-
activeColor?: string
|
|
42
|
-
/**
|
|
43
|
-
* @description 未选中的颜色
|
|
44
|
-
* */
|
|
45
|
-
inactiveColor?: string
|
|
46
|
-
/**
|
|
47
|
-
* @description 图标的大小,单位px
|
|
48
|
-
* */
|
|
49
|
-
iconSize?: string
|
|
50
|
-
/**
|
|
51
|
-
* @description 图标颜色
|
|
52
|
-
* */
|
|
53
|
-
iconColor?: string
|
|
54
|
-
/**
|
|
55
|
-
* @description label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
|
|
56
|
-
* */
|
|
57
|
-
label?: string
|
|
58
|
-
/**
|
|
59
|
-
* @description label的字体大小,px单位
|
|
60
|
-
* */
|
|
61
|
-
labelSize?: string | number
|
|
62
|
-
/**
|
|
63
|
-
* @description label的颜色
|
|
64
|
-
* */
|
|
65
|
-
labelColor?: string
|
|
66
|
-
/**
|
|
67
|
-
* @description 勾选图标的对齐方式,left-左边,right-右边
|
|
68
|
-
* */
|
|
69
|
-
iconPlacement?: HyApp.LeftRightType
|
|
70
|
-
/**
|
|
71
|
-
* @description 竖向配列时,是否显示下划线
|
|
72
|
-
* */
|
|
73
|
-
borderBottom?: boolean
|
|
74
|
-
/**
|
|
75
|
-
* @description 是否禁止点击提示语选中复选框
|
|
76
|
-
* */
|
|
77
|
-
labelDisabled?: boolean
|
|
78
|
-
/**
|
|
79
|
-
* @description 定义需要用到的外部样式
|
|
80
|
-
* */
|
|
81
|
-
customStyle?: CSSProperties
|
|
82
|
-
/**
|
|
83
|
-
* @description 布局方式,row-横向,column-纵向
|
|
84
|
-
* */
|
|
85
|
-
placement?: HyApp.DirectionType
|
|
86
|
-
}
|
|
1
|
+
import { CheckboxColumnsVo } from '../hy-check-button/typing'
|
|
87
2
|
|
|
88
3
|
export interface IRadioEmits {
|
|
89
4
|
/** 选择触发 */
|
|
@@ -1,65 +1,3 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyRateProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description v-model绑定的值
|
|
6
|
-
* */
|
|
7
|
-
modelValue: number
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @description 星星的默认最多数
|
|
11
|
-
* */
|
|
12
|
-
count?: number
|
|
13
|
-
/**
|
|
14
|
-
* @description 是否禁用
|
|
15
|
-
* */
|
|
16
|
-
disabled?: boolean
|
|
17
|
-
/**
|
|
18
|
-
* @description 是否只读
|
|
19
|
-
* */
|
|
20
|
-
readonly?: boolean
|
|
21
|
-
/**
|
|
22
|
-
* @description 星星的大小
|
|
23
|
-
* */
|
|
24
|
-
size?: number | string
|
|
25
|
-
/**
|
|
26
|
-
* @description 未激活星星的颜色
|
|
27
|
-
* */
|
|
28
|
-
inactiveColor?: string
|
|
29
|
-
/**
|
|
30
|
-
* @description 激活星星的颜色
|
|
31
|
-
* */
|
|
32
|
-
activeColor?: string
|
|
33
|
-
/**
|
|
34
|
-
* @description 星星之间的间距
|
|
35
|
-
* */
|
|
36
|
-
gutter?: number
|
|
37
|
-
/**
|
|
38
|
-
* @description 最小星星数量
|
|
39
|
-
* */
|
|
40
|
-
minCount?: number
|
|
41
|
-
/**
|
|
42
|
-
* @description 是否允许半星
|
|
43
|
-
* */
|
|
44
|
-
allowHalf?: boolean
|
|
45
|
-
/**
|
|
46
|
-
* @description 激活状态的图标
|
|
47
|
-
* */
|
|
48
|
-
activeIcon?: string
|
|
49
|
-
/**
|
|
50
|
-
* @description 未激活状态的图标
|
|
51
|
-
* */
|
|
52
|
-
inactiveIcon?: string
|
|
53
|
-
/**
|
|
54
|
-
* @description 是否可触摸
|
|
55
|
-
* */
|
|
56
|
-
touchable?: boolean
|
|
57
|
-
/**
|
|
58
|
-
* @description 自定义样式
|
|
59
|
-
* */
|
|
60
|
-
customStyle?: CSSProperties
|
|
61
|
-
}
|
|
62
|
-
|
|
63
1
|
export interface IRateEmits {
|
|
64
2
|
/** 选中的星星发生变化时触发 */
|
|
65
3
|
(e: 'change', index: number): void
|
|
@@ -1,51 +1,6 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyReadMoreProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 内容超出此高度才会显示展开全文按钮,单位px(默认 400 )
|
|
6
|
-
* */
|
|
7
|
-
showHeight?: number
|
|
8
|
-
/**
|
|
9
|
-
* @description 展开后是否显示收起按钮(默认 false )
|
|
10
|
-
* */
|
|
11
|
-
toggle?: boolean
|
|
12
|
-
/**
|
|
13
|
-
* @description 关闭时的提示文字(默认 '展开阅读全文' )
|
|
14
|
-
* */
|
|
15
|
-
closeText?: string
|
|
16
|
-
/**
|
|
17
|
-
* @description 展开时的提示文字(默认 '收起' )
|
|
18
|
-
* */
|
|
19
|
-
openText?: string
|
|
20
|
-
/**
|
|
21
|
-
* @description 提示文字的颜色(默认 '#2979ff' )
|
|
22
|
-
* */
|
|
23
|
-
color?: string
|
|
24
|
-
/**
|
|
25
|
-
* @description 提示文字的大小,单位px (默认 14 )
|
|
26
|
-
* */
|
|
27
|
-
fontSize?: number
|
|
28
|
-
/**
|
|
29
|
-
* @description 段落首行缩进的字符个数 (默认 '2em' )
|
|
30
|
-
* */
|
|
31
|
-
textIndent?: string
|
|
32
|
-
/**
|
|
33
|
-
* @description 用于在 open 和 close 事件中当作回调参数返回
|
|
34
|
-
* */
|
|
35
|
-
name?: string
|
|
36
|
-
/**
|
|
37
|
-
* @description 显示阴影的样式
|
|
38
|
-
* */
|
|
39
|
-
shadowStyle?: CSSProperties
|
|
40
|
-
/**
|
|
41
|
-
* @description 定义需要用到的外部样式
|
|
42
|
-
* */
|
|
43
|
-
customStyle?: CSSProperties
|
|
44
|
-
}
|
|
45
|
-
|
|
46
1
|
export interface IReadMoreEmits {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
2
|
+
/** 打开触发 */
|
|
3
|
+
(e: 'open', name: string): void
|
|
4
|
+
/** 关闭触发 */
|
|
5
|
+
(e: 'close', name: string): void
|
|
51
6
|
}
|
|
@@ -1,35 +1,6 @@
|
|
|
1
|
-
import type { CSSProperties } from 'vue'
|
|
2
|
-
|
|
3
|
-
export default interface HyScrollListProps {
|
|
4
|
-
/**
|
|
5
|
-
* @description 指示器的整体宽度 (默认 50 )
|
|
6
|
-
* */
|
|
7
|
-
indicatorWidth?: number
|
|
8
|
-
/**
|
|
9
|
-
* @description 滑块的宽度 (默认 20 )
|
|
10
|
-
* */
|
|
11
|
-
indicatorBarWidth?: number
|
|
12
|
-
/**
|
|
13
|
-
* @description 是否显示面板指示器 (默认 true )
|
|
14
|
-
* */
|
|
15
|
-
indicator?: boolean
|
|
16
|
-
/**
|
|
17
|
-
* @description 指示器非激活颜色 (默认 '#f2f2f2' )
|
|
18
|
-
* */
|
|
19
|
-
indicatorColor?: string
|
|
20
|
-
/**
|
|
21
|
-
* @description 指示器的激活颜色 (默认 '#3c9cff' )
|
|
22
|
-
* */
|
|
23
|
-
indicatorActiveColor?: string
|
|
24
|
-
/**
|
|
25
|
-
* @description 指示器样式,可通过bottom,left,right进行定位
|
|
26
|
-
* */
|
|
27
|
-
indicatorStyle?: CSSProperties
|
|
28
|
-
}
|
|
29
|
-
|
|
30
1
|
export interface IScrollListEmits {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
2
|
+
/** 滑动到左边时触发 */
|
|
3
|
+
(e: 'scrollLeft'): void
|
|
4
|
+
/** 滑动到右边时触发 */
|
|
5
|
+
(e: 'scrollRight'): void
|
|
35
6
|
}
|