starai-ui 0.1.21 → 0.1.22

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 (3) hide show
  1. package/index.d.ts +66 -0
  2. package/index.js +1 -1
  3. package/package.json +3 -2
package/index.d.ts ADDED
@@ -0,0 +1,66 @@
1
+ // TypeScript 声明文件
2
+ import Vue from 'vue'
3
+
4
+ // 组件属性定义
5
+ export interface StarButtonProps {
6
+ type?: 'default' | 'primary' | 'success' | 'warning' | 'danger'
7
+ size?: 'small' | 'medium' | 'large'
8
+ plain?: boolean
9
+ round?: boolean
10
+ circle?: boolean
11
+ disabled?: boolean
12
+ loading?: boolean
13
+ icon?: string
14
+ block?: boolean
15
+ }
16
+
17
+ export interface StarInputProps {
18
+ type?: 'text' | 'number' | 'idcard' | 'digit'
19
+ value?: string | number
20
+ password?: boolean
21
+ placeholder?: string
22
+ disabled?: boolean
23
+ maxlength?: number
24
+ autoFocus?: boolean
25
+ focus?: boolean
26
+ showWordLimit?: boolean
27
+ clearable?: boolean
28
+ inputAlign?: 'left' | 'center' | 'right'
29
+ confirmType?: 'done' | 'go' | 'next' | 'search' | 'send'
30
+ confirmHold?: boolean
31
+ cursorSpacing?: number
32
+ adjustPosition?: boolean
33
+ holdKeyboard?: boolean
34
+ selectionStart?: number
35
+ selectionEnd?: number
36
+ showConfirmBar?: boolean
37
+ disableDefaultPadding?: boolean
38
+ }
39
+
40
+ // 组件声明
41
+ declare const StarButton: Vue.Component<StarButtonProps>
42
+ declare const StarInput: Vue.Component<StarInputProps>
43
+
44
+ // 组件库安装选项
45
+ export interface StarUIInstallOptions {
46
+ size?: string
47
+ zIndex?: number
48
+ }
49
+
50
+ // 组件库声明
51
+ declare const StarUI: {
52
+ version: string
53
+ install: (Vue: typeof Vue, options?: StarUIInstallOptions) => void
54
+ starButton: typeof StarButton
55
+ starInput: typeof StarInput
56
+ }
57
+
58
+ // 导出组件
59
+ export { StarButton, StarInput }
60
+ export default StarUI
61
+
62
+ // 模块声明
63
+ declare module 'starai-ui' {
64
+ export * from './index'
65
+ export default StarUI
66
+ }
package/index.js CHANGED
@@ -30,7 +30,7 @@ if (typeof window !== 'undefined' && window.Vue) {
30
30
 
31
31
  // 导出默认对象
32
32
  const StarUI = {
33
- version: '0.1.21',
33
+ version: '0.1.22',
34
34
  install,
35
35
  // 导出所有组件
36
36
  'star-button': starButton, 'star-input': starInput
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "starai-ui",
3
- "version": "0.1.21",
3
+ "version": "0.1.22",
4
4
  "description": "基于Uniapp的Vue2组件库",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "umd:main": "index.js",
8
- "files": ["components", "styles", "index.js"],
8
+ "types": "index.d.ts",
9
+ "files": ["components", "styles", "index.js", "index.d.ts"],
9
10
  "uni-app": {
10
11
  "main": "index.js"
11
12
  },