提交 62dc92ff 编写于 作者: fxy060608's avatar fxy060608

wip(app): nvue

上级 f7964909
......@@ -256,20 +256,6 @@ export function nvueFactory(exports, document) {
return _globalThis || (_globalThis = typeof globalThis !== 'undefined' ? globalThis : typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {});
};
var latestNodeId = 1;
class NVueTextNode {
constructor(text) {
this.instanceId = '';
this.nodeId = latestNodeId++;
this.parentNode = null;
this.nodeType = 3;
this.text = text;
this.children = [];
}
}
function warn(msg) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key2 = 1; _key2 < _len; _key2++) {
args[_key2 - 1] = arguments[_key2];
......@@ -10970,7 +10956,7 @@ export function nvueFactory(exports, document) {
createElement: tag => {
return document.createElement(tag);
},
createText: text => new NVueTextNode(text),
createText: text => document.createText(text),
createComment: text => document.createComment(text),
setText: (node, text) => {
node.setAttr('value', text);
......
......@@ -10,9 +10,7 @@ export const hasOwn = (
key: string | symbol
): key is keyof typeof val => hasOwnProperty.call(val, key)
const cacheStringFunction = <T extends (str: string) => string>(
fn: T
): T => {
const cacheStringFunction = <T extends (str: string) => string>(fn: T): T => {
const cache: Record<string, string> = Object.create(null)
return ((str: string) => {
const hit = cache[str]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册