@meethive/components 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.
|
@@ -1,31 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue'
|
|
2
|
+
import { renderSlot as _renderSlot } from "vue"
|
|
3
|
+
|
|
4
|
+
import { provide, reactive, watch } from 'vue'
|
|
3
5
|
import defaultLocal from '../locale/zh-CN'
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exist: true
|
|
17
|
-
}
|
|
18
|
-
})
|
|
7
|
+
|
|
8
|
+
const __sfc_main__ = _defineComponent({
|
|
9
|
+
...{
|
|
10
|
+
name: 'JLocaleProvider'
|
|
11
|
+
},
|
|
12
|
+
__name: 'LocaleProvider',
|
|
13
|
+
props: {
|
|
14
|
+
locale: { type: Object, required: false }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
|
|
19
18
|
|
|
20
|
-
watch(() => props.locale, () => {
|
|
21
|
-
state.antLocale = {
|
|
22
|
-
...props.locale || defaultLocal || {},
|
|
23
|
-
exist: true
|
|
24
|
-
}
|
|
25
|
-
}, { deep: true })
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
const props = __props
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
const state = reactive({
|
|
23
|
+
antLocale: {
|
|
24
|
+
...props.locale || defaultLocal || {},
|
|
25
|
+
exist: true
|
|
30
26
|
}
|
|
31
27
|
})
|
|
28
|
+
|
|
29
|
+
watch(() => props.locale, () => {
|
|
30
|
+
state.antLocale = {
|
|
31
|
+
...props.locale || defaultLocal || {},
|
|
32
|
+
exist: true
|
|
33
|
+
}
|
|
34
|
+
}, { deep: true })
|
|
35
|
+
|
|
36
|
+
provide('componentLocaleData', state)
|
|
37
|
+
|
|
38
|
+
return (_ctx,_cache) => {
|
|
39
|
+
return _renderSlot(_ctx.$slots, "default")
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
})
|
|
44
|
+
export default __sfc_main__;
|
|
@@ -1,31 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as _defineComponent } from 'vue'
|
|
2
|
+
import { renderSlot as _renderSlot } from "vue"
|
|
3
|
+
|
|
4
|
+
import { provide, reactive, watch } from 'vue'
|
|
3
5
|
import defaultLocal from '../locale/zh-CN'
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
exist: true
|
|
17
|
-
}
|
|
18
|
-
})
|
|
7
|
+
|
|
8
|
+
const __sfc_main__ = _defineComponent({
|
|
9
|
+
...{
|
|
10
|
+
name: 'JLocaleProvider'
|
|
11
|
+
},
|
|
12
|
+
__name: 'LocaleProvider',
|
|
13
|
+
props: {
|
|
14
|
+
locale: { type: Object, required: false }
|
|
15
|
+
},
|
|
16
|
+
setup(__props) {
|
|
17
|
+
|
|
19
18
|
|
|
20
|
-
watch(() => props.locale, () => {
|
|
21
|
-
state.antLocale = {
|
|
22
|
-
...props.locale || defaultLocal || {},
|
|
23
|
-
exist: true
|
|
24
|
-
}
|
|
25
|
-
}, { deep: true })
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
const props = __props
|
|
28
21
|
|
|
29
|
-
|
|
22
|
+
const state = reactive({
|
|
23
|
+
antLocale: {
|
|
24
|
+
...props.locale || defaultLocal || {},
|
|
25
|
+
exist: true
|
|
30
26
|
}
|
|
31
27
|
})
|
|
28
|
+
|
|
29
|
+
watch(() => props.locale, () => {
|
|
30
|
+
state.antLocale = {
|
|
31
|
+
...props.locale || defaultLocal || {},
|
|
32
|
+
exist: true
|
|
33
|
+
}
|
|
34
|
+
}, { deep: true })
|
|
35
|
+
|
|
36
|
+
provide('componentLocaleData', state)
|
|
37
|
+
|
|
38
|
+
return (_ctx,_cache) => {
|
|
39
|
+
return _renderSlot(_ctx.$slots, "default")
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
})
|
|
44
|
+
export default __sfc_main__;
|