starai-ui 0.1.20 → 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.
- package/index.d.ts +66 -0
- package/index.js +9 -4
- package/package.json +8 -13
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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
// 导入所有组件
|
|
3
|
-
import starButton from './components/star-button'
|
|
4
|
-
import starInput from './components/star-input'
|
|
3
|
+
import starButton from './components/star-button/star-button.vue'
|
|
4
|
+
import starInput from './components/star-input/star-input.vue'
|
|
5
5
|
|
|
6
6
|
// 组件列表
|
|
7
7
|
const components = [starButton, starInput]
|
|
@@ -29,8 +29,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
// 导出默认对象
|
|
32
|
-
|
|
33
|
-
version: '0.1.
|
|
32
|
+
const StarUI = {
|
|
33
|
+
version: '0.1.22',
|
|
34
34
|
install,
|
|
35
35
|
// 导出所有组件
|
|
36
36
|
'star-button': starButton, 'star-input': starInput
|
|
@@ -39,3 +39,8 @@ export default {
|
|
|
39
39
|
// 按需导出组件
|
|
40
40
|
export { starButton as 'star-button' }
|
|
41
41
|
export { starInput as 'star-input' }
|
|
42
|
+
|
|
43
|
+
// CommonJS 导出
|
|
44
|
+
export default StarUI
|
|
45
|
+
module.exports = StarUI
|
|
46
|
+
module.exports.default = StarUI
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "starai-ui",
|
|
3
|
-
"version": "0.1.
|
|
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
|
-
"
|
|
8
|
+
"types": "index.d.ts",
|
|
9
|
+
"files": ["components", "styles", "index.js", "index.d.ts"],
|
|
10
|
+
"uni-app": {
|
|
11
|
+
"main": "index.js"
|
|
12
|
+
},
|
|
13
|
+
"keywords": ["uniapp", "vue2", "components", "weixin"],
|
|
9
14
|
"scripts": {
|
|
10
15
|
"serve": "npm run dev:h5",
|
|
11
16
|
"build:lib": "node build/build.js",
|
|
@@ -90,13 +95,6 @@
|
|
|
90
95
|
"Android >= 4.4",
|
|
91
96
|
"ios >= 9"
|
|
92
97
|
],
|
|
93
|
-
"keywords": [
|
|
94
|
-
"uniapp",
|
|
95
|
-
"vue2",
|
|
96
|
-
"component",
|
|
97
|
-
"ui",
|
|
98
|
-
"mobile"
|
|
99
|
-
],
|
|
100
98
|
"author": "DengChengBo",
|
|
101
99
|
"license": "MIT",
|
|
102
100
|
"repository": {
|
|
@@ -106,8 +104,5 @@
|
|
|
106
104
|
"bugs": {
|
|
107
105
|
"url": "https://gitee.com/chengboDeng/star-ui-library/issues"
|
|
108
106
|
},
|
|
109
|
-
"homepage": "https://gitee.com/chengboDeng/star-ui-library#readme"
|
|
110
|
-
"uni-app": {
|
|
111
|
-
"scripts": {}
|
|
112
|
-
}
|
|
107
|
+
"homepage": "https://gitee.com/chengboDeng/star-ui-library#readme"
|
|
113
108
|
}
|