Skip to content

Commit

Permalink
提交
Browse files Browse the repository at this point in the history
  • Loading branch information
Grnetsky committed Oct 24, 2024
1 parent 6716868 commit ed3e402
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 56 deletions.
33 changes: 0 additions & 33 deletions src/components/hello/hello.ce.vue

This file was deleted.

11 changes: 0 additions & 11 deletions src/components/hello/index.ts

This file was deleted.

12 changes: 0 additions & 12 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,5 @@ import App from './App.vue'
const app = createApp(App)
app.use(ElementPlus) // 全局安装ElementPlus
app.mount('#app')
import MyCount from "./components/hello/hello.ce.vue"; // 引入计数器组件
import { ElButton } from "element-plus"

const CustomElement = defineCustomElement(MyCount);
const B = defineCustomElement(ElButton);
// 为了便于业务自定义标签名称,导出名称注册方法,默认为my-conut
export function register(tagName = "my-count") {
customElements.define(tagName, CustomElement);
return CustomElement;
}

import './components/hello'

customElements.define('el-button',B)

0 comments on commit ed3e402

Please sign in to comment.