How to use the h function from vue
Find comprehensive JavaScript vue.h code examples handpicked from public code repositorys.
GitHub: slinkity/slinkity
5 6 7 8 9 10 11 12 13
const children = null; const slots = {}; if (children) { slots.default = () => h(SlotWrapper, { value: children }); } const app = createSSRApp({ render: () => h(Component.default, props, slots) }); const html = await renderToString(app); return { html, css: undefined }; };
38
441
6
+ 11 other calls in file
GitHub: JustinWinthers/shadow
76 77 78 79 80 81 82 83 84 85
} else { makeShadow(el.value); } }); return () => vue.h(props.tag, { ref: el }, [ static_.value ? slots.default() : vue.h(props.slotTag, { id: props.slotId, class: props.slotClass }, [slots.default()]) ]); }, install,
7
0
0
+ 7 other calls in file
GitHub: hacfins/vue3-multi-page
91 92 93 94 95 96 97 98 99 100
name: 'ElLoading', setup() { return componentSetupConfig; }, render() { const spinner = vue.h('svg', { class: 'circular', viewBox: '25 25 50 50', }, [ vue.h('circle', { class: 'path', cx: '50', cy: '50', r: '20', fill: 'none' }),
1
2
1
+ 11 other calls in file
GitHub: hacfins/vue3-multi-page
94 95 96 97 98 99 100 101 102 103
const marginLeft = parseInt(autoLabelWidth, 10) - computedWidth.value; if (marginLeft) { style.marginLeft = marginLeft + 'px'; } } return vue.h('div', { ref: el, class: ['el-form-item__label-wrap'], style, }, (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots));
1
2
1
+ 3 other calls in file
2146 2147 2148 2149 2150 2151 2152 2153 2154 2155
})); return () => { const children = slots.default && slots.default(link); return props.custom ? children : vue.h('a', { 'aria-current': link.isExactActive ? props.ariaCurrentValue : null, href: link.href,
0
0
1
+ 23 other calls in file
619 620 621 622 623 624 625 626 627 628
// console.log(data, attributes, config) if (isRaw && content) { attributes.innerHTML = content; } // Ignore empty string content const vnode = vue.h(finalTag, attributes, content || undefined); return { to: data.to, vnode };
0
0
1
+ 11 other calls in file
GitHub: WenyaoL/marked2vue
2938 2939 2940 2941 2942 2943 2944 2945 2946 2947
code = out; } } code = code.replace(/\n$/, '') + '\n'; if (!lang) { return vue.h(script$5, null, function () { return vue.h('code', { innerHTML: escaped ? code : escape(code, true) }); });
0
0
1
+ 149 other calls in file
vue.createElementBlock is the most popular function in vue (2388 examples)