g-ui-core 0.0.2 → 0.0.3
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/package.json +2 -2
- package/vue/global.d.ts +2 -27
- package/vue/index.d.ts +2 -0
- package/vue/index.ts +5 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "g-ui-core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "G-UI Web Components built with Stencil",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"types": "./dist/types/index.d.ts"
|
|
23
23
|
},
|
|
24
24
|
"./vue": {
|
|
25
|
-
"types": "./vue/
|
|
25
|
+
"types": "./vue/index.d.ts",
|
|
26
26
|
"import": "./vue/index.ts",
|
|
27
27
|
"default": "./vue/index.ts"
|
|
28
28
|
}
|
package/vue/global.d.ts
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type {
|
|
3
|
-
ButtonType,
|
|
4
|
-
ButtonSize,
|
|
5
|
-
NativeButtonType
|
|
6
|
-
} from '../dist/types/components/my-button/my-button'
|
|
7
2
|
|
|
3
|
+
// 增强 Vue 全局组件类型(Volar 智能提示)
|
|
8
4
|
declare module '@vue/runtime-core' {
|
|
9
5
|
export interface GlobalComponents {
|
|
10
|
-
GButton:
|
|
11
|
-
type?: ButtonType
|
|
12
|
-
size?: ButtonSize
|
|
13
|
-
plain?: boolean | string
|
|
14
|
-
text?: boolean | string
|
|
15
|
-
bg?: boolean | string
|
|
16
|
-
link?: boolean | string
|
|
17
|
-
round?: boolean | string
|
|
18
|
-
circle?: boolean | string
|
|
19
|
-
dashed?: boolean | string
|
|
20
|
-
loading?: boolean | string
|
|
21
|
-
loadingIcon?: string
|
|
22
|
-
disabled?: boolean | string
|
|
23
|
-
icon?: string
|
|
24
|
-
autofocus?: boolean | string
|
|
25
|
-
nativeType?: NativeButtonType
|
|
26
|
-
autoInsertSpace?: boolean | string
|
|
27
|
-
color?: string
|
|
28
|
-
dark?: boolean | string
|
|
29
|
-
tag?: string
|
|
30
|
-
label?: string
|
|
31
|
-
}
|
|
6
|
+
GButton: import('../dist/types/components').Components.GButton
|
|
32
7
|
}
|
|
33
8
|
}
|
|
34
9
|
|
package/vue/index.d.ts
ADDED
package/vue/index.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import type { App } from 'vue'
|
|
2
|
-
|
|
3
|
-
// 导入 Stencil 组件(auto-define 会自动注册)
|
|
4
1
|
import '../dist/components/g-button.js'
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
install(app:
|
|
8
|
-
const original = app.config
|
|
3
|
+
const plugin = {
|
|
4
|
+
install(app: any) {
|
|
5
|
+
const original = app.config?.compilerOptions?.isCustomElement
|
|
9
6
|
app.config.compilerOptions.isCustomElement = (tag: string) =>
|
|
10
7
|
tag.startsWith('g-') || (typeof original === 'function' && original(tag))
|
|
11
8
|
}
|
|
12
9
|
}
|
|
10
|
+
|
|
11
|
+
export default plugin
|