How to use the defineComponent function from vue
Find comprehensive JavaScript vue.defineComponent code examples handpicked from public code repositorys.
1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784
this.render.destroy(); this.select.destroy(); } } var script = vue.defineComponent({ name: 'SlimSelect', props: { modelValue: { type: [String, Array, undefined],
167
856
18
+ 4 other calls in file
GitHub: slinkity/slinkity
10 11 12 13 14 15 16 17 18 19
const app = createSSRApp({ render: () => h(Component.default, props, slots) }); const html = await renderToString(app); return { html, css: undefined }; }; const SlotWrapper = defineComponent({ props: { value: String, }, setup({ value }) {
38
441
6
+ 3 other calls in file
GitHub: LeFE-1/LeFE
101 102 103 104 105 106 107 108 109 110
} script.render = render; script.__file = "packages/tabs/src/tab-bar.vue"; var script$1 = vue.defineComponent({ name: 'OElTabNav', components: { TabBar: script, },
3
8
3
+ 7 other calls in file
GitHub: hacfins/vue3-multi-page
31 32 33 34 35 36 37 38 39 40
const elFormEvents = { addField: 'el.form.addField', removeField: 'el.form.removeField', }; var LabelWrap = vue.defineComponent({ name: 'ElLabelWrap', props: { isAutoWidth: Boolean, updateAll: Boolean,
1
2
1
+ 3 other calls in file
47 48 49 50 51 52 53 54 55 56
function createNamespace(name) { return `EASI${name}`; } var script$5 = _vue.defineComponent({ name: createNamespace("menu"), props: { collapsed: { type: Boolean,
1
1
4
+ 7 other calls in file
117 118 119 120 121 122 123 124 125 126 127
const _hoisted_1 = { class: "v-code-block--button-copy" }; const _hoisted_2 = { class: "v-code-block--button-run" }; const _hoisted_3 = { class: "v-code-block--code" }; const _hoisted_4 = ["innerHTML"]; var _sfc_main = /*#__PURE__*/ vue.defineComponent({ __name: 'CodeBlock', props: { browserWindow: { type: Boolean,
0
1
1
18 19 20 21 22 23 24 25 26 27 28
const _withScopeId = n => (vue.pushScopeId("data-v-7d8ba791"), n = n(), vue.popScopeId(), n); const _hoisted_1$1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/ vue.createElementVNode("path", { d: "M224 0c-35.3 0-64 28.7-64 64V288c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V64c0-35.3-28.7-64-64-64H224zM64 160c-35.3 0-64 28.7-64 64V448c0 35.3 28.7 64 64 64H288c35.3 0 64-28.7 64-64V384H288v64H64V224h64V160H64z" }, null, -1 /* HOISTED */)); const _hoisted_2$1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/ vue.createElementVNode("path", { d: "M470.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L192 338.7 425.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }, null, -1 /* HOISTED */)); const _hoisted_3$1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/ vue.createElementVNode("path", { d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" }, null, -1 /* HOISTED */)); var _sfc_main$1 = /*#__PURE__*/ vue.defineComponent({ __name: 'StatusIcons', props: { icon: { type: String,
0
1
1
+ 11 other calls in file
GitHub: csii-cli/vue-template
37 38 39 40 41 42 43 44 45 46
id: id, visibility: 'hidden', ref: elementRef }) } exports.Editor = vue_1.defineComponent({ props: EditorPropTypes_1.editorProps, setup: function (props, ctx) { var _a = vue_1.toRefs(props), disabled = _a.disabled,
0
0
1
2112 2113 2114 2115 2116 2117 2118 2119 2120 2121
isActive, isExactActive, navigate, }; } const RouterLinkImpl = /*#__PURE__*/ vue.defineComponent({ name: 'RouterLink', props: { to: { type: [String, Object],
0
0
1
+ 23 other calls in file
754 755 756 757 758 759 760 761 762 763 764
} function useActiveMeta() { return vue.inject(metaActiveKey); } const MetainfoImpl = vue.defineComponent({ name: 'Metainfo', inheritAttrs: false, setup(_, { slots }) { return () => {
0
0
1
+ 3 other calls in file
GitHub: WenyaoL/marked2vue
2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559
}]); return Parser; }(); var _hoisted_1$b = ["href", "title"]; var script$e = /*#__PURE__*/ vue.defineComponent({ __name: 'Link', props: { href: { type: String, required: true }, title: { type: String, required: false }
0
0
1
+ 89 other calls in file
vue.createElementBlock is the most popular function in vue (2388 examples)