-
I had searched the document but found no related topic. Element-plus can be used in a single html like this: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>element-plus</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css"
/>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/element-plus"></script>
</head>
<body>
<div id="app">
<el-button type="primary" @click="showMsg">element-plus</el-button>
</div>
<script>
const app = Vue.createApp({
data() {
return {
msg: "hhhhh",
};
},
methods: {
showMsg() {
ElementPlus.ElMessage("hhh");
},
},
});
app.use(ElementPlus);
app.mount("#app");
</script>
</body>
</html> While the same way, it seems naive can't.I don't know whether i write the wrong code. <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>naive</title>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdn.jsdelivr.net/npm/naive-ui"></script>
</head>
<body>
<div id="app">
<n-button>click</n-button>
</div>
<script>
const app = Vue.createApp({
data() {
return {
msg: "hhhhh",
};
},
});
app.use(Naive);
app.mount("#app");
</script>
</body>
</html> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Basiclly we won't support it. I don't want the library to be used like this. I've seen many company's rubbish projects using library with umd bundle, which makes project undebuggable & unmaintainable & large. If I allow it to be used like this, it will be abused by somebody (although not all). If you need the feature, other libraries may be better choices. |
Beta Was this translation helpful? Give feedback.
Basiclly we won't support it. I don't want the library to be used like this.
I've seen many company's rubbish projects using library with umd bundle, which makes project undebuggable & unmaintainable & large. If I allow it to be used like this, it will be abused by somebody (although not all).
If you need the feature, other libraries may be better choices.