xt-element-ui 1.3.1 → 1.3.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.
- package/lib/index.common.js +34 -27
- package/lib/index.umd.js +34 -27
- package/lib/index.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/components/xt-button/index.vue +1 -1
- package/src/components/xt-map/index.js +8 -0
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@ export default {
|
|
|
33
33
|
type: {
|
|
34
34
|
type: String,
|
|
35
35
|
default: '',
|
|
36
|
-
validator: (val) => ['', 'primary', 'success', 'warning', 'danger'
|
|
36
|
+
validator: (val) => ['', 'primary', 'success', 'warning', 'danger'].includes(val)
|
|
37
37
|
},
|
|
38
38
|
size: {
|
|
39
39
|
type: String,
|
|
@@ -2,6 +2,7 @@ import XtMap from './index.vue'
|
|
|
2
2
|
import XtMapProvider from './provider.vue'
|
|
3
3
|
import './style/index.scss'
|
|
4
4
|
|
|
5
|
+
// 为组件添加 install 方法,支持 Vue.use() 单独引入
|
|
5
6
|
XtMap.install = function (Vue) {
|
|
6
7
|
Vue.component(XtMap.name, XtMap)
|
|
7
8
|
}
|
|
@@ -10,13 +11,20 @@ XtMapProvider.install = function (Vue) {
|
|
|
10
11
|
Vue.component(XtMapProvider.name, XtMapProvider)
|
|
11
12
|
}
|
|
12
13
|
|
|
14
|
+
// 导出单个组件,支持按需引入
|
|
13
15
|
export { XtMap, XtMapProvider }
|
|
14
16
|
|
|
17
|
+
// 导出默认对象,支持全量引入
|
|
15
18
|
export default {
|
|
16
19
|
install(Vue) {
|
|
17
20
|
Vue.component(XtMap.name, XtMap)
|
|
18
21
|
Vue.component(XtMapProvider.name, XtMapProvider)
|
|
19
22
|
},
|
|
23
|
+
// 确保导出的组件对象包含 name 属性
|
|
20
24
|
XtMap,
|
|
21
25
|
XtMapProvider
|
|
22
26
|
}
|
|
27
|
+
|
|
28
|
+
// 为了兼容旧版本,同时导出组件的 name 属性
|
|
29
|
+
export const XtMapName = XtMap.name
|
|
30
|
+
export const XtMapProviderName = XtMapProvider.name
|