vue-stack-tabs 0.1.19 → 0.1.20

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.
@@ -58,9 +58,9 @@ export default () => {
58
58
  return message
59
59
  }
60
60
  // const localeI18n = inject('locales') as { locale: string; messages: object }
61
- const getI18n = (localeI18n?:any) => {
62
- let combinateMessage ={ ...allLangs()}
63
- if(!localeI18n){
61
+ const getI18n = (localeI18n?: any) => {
62
+ let combinateMessage = { ...allLangs() }
63
+ if (!localeI18n) {
64
64
  combinateMessage = { ...allLangs(), ...localeI18n.messages }
65
65
  }
66
66
 
package/src/lib/index.ts CHANGED
@@ -27,7 +27,10 @@ declare module '@vue/runtime-core' {
27
27
 
28
28
  export { IFrame, useTabLoading, useTabRouter, useStackTab, TabHeaderButton, StackTab }
29
29
  export default {
30
- install(Vue: App,options: { locale:string,messages: any }={locale:'zh-CN',messages:{}}): void {
30
+ install(
31
+ Vue: App,
32
+ options: { locale: string; messages: any } = { locale: 'zh-CN', messages: {} }
33
+ ): void {
31
34
  tabVersion(import.meta.env.PACKAGE_VERSION)
32
35
  Vue.component('VueStackTabs', StackTab).use(useTabMitt).use(i18n().getI18n(options))
33
36
  }
@@ -89,9 +89,9 @@ export class Stack<T> {
89
89
  private items: Map<number, T>
90
90
 
91
91
  //
92
- constructor(items?:T[]) {
92
+ constructor(items?: T[]) {
93
93
  this.items = new Map()
94
- if(items) {
94
+ if (items) {
95
95
  for (const item of items) {
96
96
  this.push(item)
97
97
  }