更新Invoker,移除tsx
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import {
|
||||
defineComponent,
|
||||
h,
|
||||
isVue2,
|
||||
onMounted,
|
||||
onUnmounted,
|
||||
ref,
|
||||
@@ -9,6 +11,7 @@ import {
|
||||
import { ModContext } from "../types/ModContext";
|
||||
import { InvokerItem } from "./InvokerItem";
|
||||
import { modPageConfig } from "../modPageConfig";
|
||||
import { hh } from "./DemiHelper";
|
||||
|
||||
let idCount = 0;
|
||||
export type InvokerModName = string;
|
||||
@@ -108,18 +111,17 @@ export default defineComponent({
|
||||
emit('destroyed');
|
||||
});
|
||||
|
||||
return (h) => {
|
||||
return (createElem) => {
|
||||
const render = isVue2 ? createElem : h;
|
||||
if (slots.default) {
|
||||
return <div>{slots.default()}</div>;
|
||||
return render('div', {}, slots.default());
|
||||
}
|
||||
|
||||
return (
|
||||
<iframe
|
||||
src={url.value}
|
||||
scrolling={props.scroll ? "yes" : "no"}
|
||||
style={`border: none; width: 100%; height: ${props.height}; `}
|
||||
></iframe>
|
||||
);
|
||||
return hh('iframe', {
|
||||
src: url.value,
|
||||
scrolling: props.scroll ? "yes" : "no",
|
||||
style: `border: none; width: 100%; height: ${props.height}; `
|
||||
});
|
||||
};
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user