edecker-business-headers
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -1,1 +0,11 @@ | ||
export declare function commonHeaders(app: HTMLElement | null): void | ||
export interface HeaderNavs { | ||
/** | ||
* 名称 | ||
*/ | ||
label: string | ||
path: string | ||
pathPrefix: string | ||
icon: string | ||
} | ||
export declare function commonHeaders(app: HTMLElement | null, navs: HeaderNavs[]): void |
11
main.ts
@@ -0,15 +1,18 @@ | ||
import './src/iconfont/iconfont' | ||
import { createApp } from 'vue' | ||
import { HeaderNavs } from '.' | ||
import App from './src/index.vue' | ||
import SvgIcon from './src/svg-icon/index.vue' | ||
import './src/iconfont/iconfont' | ||
function commonHeaders(doc: HTMLElement) { | ||
import SvgIcon from '../svg-icon/index.vue' | ||
function commonHeaders(doc: HTMLElement, navs: HeaderNavs[]) { | ||
const dom = document.createElement('div') | ||
dom.id = 'edecker-common-header' | ||
if (!doc) { | ||
throw new Error('unfound #app element!!!!!!') | ||
throw new Error('unfound #app element!') | ||
} | ||
doc.prepend(dom) | ||
const app = createApp(App) | ||
app.provide('navs', navs) | ||
app.component('svg-icon', SvgIcon) | ||
app.mount('#edecker-common-header') | ||
} | ||
@@ -16,0 +19,0 @@ |
{ | ||
"name": "edecker-business-headers", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "edecker 业务导航组件", | ||
@@ -5,0 +5,0 @@ "main": "dist/edecker-business-headers.es.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
307643
20
5864