vue#createApp JavaScript Examples

The following examples show how to use vue#createApp. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: abandoned.jsx    From ant-simple-pro with MIT License 6 votes vote down vote up
function newInstance(options, callback) {
  const div = document.createElement('div')
  div.className = 'image-preview-wrapper-root'
  document.body.appendChild(div)
  const app = createApp({
    mounted() {
      const self = this // eslint-disable-line
      this.$nextTick(() => {
        callback({
          // eslint-disable-line
          open() {
            self.$refs.imageViewer.visible = true
          },
          close() {
            self.$refs.imageViewer.visible = false
          },
          destroy() {
            app && app.unmount(div)
            if (div.parentNode) {
              div.parentNode.removeChild(div)
            }
          }
        })
      })
    },
    render() {
      const props = {
        ...options,
        ref: 'imageViewer'
      }
      return h(ImageViewer, props)
    }
  })
  app.mount(div)
}
Example #2
Source File: main.js    From Ale with MIT License 6 votes vote down vote up
initInstance = () => {
  // createMountEle();

  instance = createApp({
    el: document.createElement('div'),
    ...msgboxVue
  }).mount(document.createElement('div'));

  // instance = messageBoxApp.mount('#' + MOUNT_ID);

  // instance = new MessageBoxConstructor({
  //   el: document.createElement('div')
  // });

  instance.callback = defaultCallback;
}
Example #3
Source File: main.js    From uptime-kuma with MIT License 6 votes vote down vote up
app = createApp({
    mixins: [
        socket,
        theme,
        mobile,
        datetime,
        publicMixin,
        lang,
    ],
    data() {
        return {
            appName: appName
        };
    },
    render: () => h(App),
})
Example #4
Source File: main.js    From restqa with MIT License 6 votes vote down vote up
createApp(App)
  .use(ElementPlus)
  .use(router)
  .use(store)
  .use(VueGtag, {
    isEnabled: false,
    property: {
      id: "UA-118770210-1"
    }
  })
  .mount("#app");
Example #5
Source File: main.js    From readr-coverages with MIT License 5 votes vote down vote up
app = createApp(App)
Example #6
Source File: main.js    From ant-simple-pro with MIT License 5 votes vote down vote up
app = createApp(App)
Example #7
Source File: index.js    From vue-json-schema-form with Apache License 2.0 5 votes vote down vote up
app = createApp(App)
Example #8
Source File: main.js    From module-federation-examples with MIT License 5 votes vote down vote up
createApp(App).mount('#app');
Example #9
Source File: main.js    From new-tailwind-app with MIT License 5 votes vote down vote up
createApp(App).mount('#app');
Example #10
Source File: main.js    From vue-form-render with MIT License 5 votes vote down vote up
app = createApp(App)
Example #11
Source File: main.js    From atropos with MIT License 5 votes vote down vote up
app = createApp(App)
Example #12
Source File: main.js    From skeleton-elements with MIT License 5 votes vote down vote up
app = createApp(App)
Example #13
Source File: mount.test.js    From mount-vue-component with MIT License 5 votes vote down vote up
test('it can append an appContext to the vNode', () => {
  const appComponent = createComponent()
  const comp = createComponent()
  const app = createApp(appComponent)
  const { vNode } = createComponentInstance(comp, { app })
  assert.ok(vNode.appContext)
})
Example #14
Source File: abandoned.js    From ant-simple-pro with MIT License 5 votes vote down vote up
function newInstance(options, callback) {
  const div = document.createElement('div')
  div.className = 'context-menu-wrapper-root'
  document.body.appendChild(div)
  const app = createApp({
    data() {
      return {
        appProps: {
          ...options,
          ref: 'contextMenu'
        }
      }
    },
    mounted() {
      const self = this // eslint-disable-line
      callback({
        // eslint-disable-line
        open() {
          self.$refs.appProps.position = position
          self.$refs.contextMenu.sVisible = false
          setTimeout(() => {
            self.contextMenu.sVisible = true
          }, 20)
        },
        close() {
          self.$refs.contextMenu.sVisible = false
        },
        destroy() {
          app && app.unmount(div)
          if (div.parentNode) {
            div.parentNode.removeChild(div)
          }
        }
      })
      // this.$nextTick(() => {
      // })
    },
    render() {
      // const props = {
      //   ...options,
      //   ref: 'contextMenu'
      // }
      return h(ContextMenu, this.appProps)
    }
  })
  app.mount(div)
}
Example #15
Source File: main.js    From LoR_Master with MIT License 5 votes vote down vote up
app = createApp(App)
Example #16
Source File: main.js    From vue3-highcharts with MIT License 5 votes vote down vote up
createApp(App).mount('#app');
Example #17
Source File: main.js    From p2p-tunnel with GNU General Public License v2.0 5 votes vote down vote up
app = createApp(App)
Example #18
Source File: main.js    From app with Apache License 2.0 5 votes vote down vote up
createApp(App).mount();
Example #19
Source File: main.js    From javascript-mini-projects with The Unlicense 5 votes vote down vote up
createApp(App).mount("#app");
Example #20
Source File: main.js    From vite-plugin-monaco-editor with MIT License 5 votes vote down vote up
createApp(App).use(router).mount('#app')
Example #21
Source File: custom-root-prop.output.js    From vue-cli-plugin-vue-next with MIT License 5 votes vote down vote up
createApp({
  myOption: 'hello!',
  render: () => h(App),
}).mount('#app');
Example #22
Source File: main.js    From todomvc-vue-composition-api with MIT License 5 votes vote down vote up
app = createApp(App)
Example #23
Source File: life-cycle.js    From wl-mfe with Apache License 2.0 5 votes vote down vote up
render = ({ routes, routerBase, container } = {}) => {
  // Vue.config.productionTip = false;
  router = createRouter({
    history: createWebHistory(__qiankun__ ? routerBase : "/"),
    routes: __qiankun__ ? routeMatch(routes, routerBase) : selfRoutes
  });
  instance = createApp(App).use(router).use(store).mount(container ? container.querySelector("#app") : "#app");
}
Example #24
Source File: main.js    From d2data with MIT License 5 votes vote down vote up
createApp(App).mount('#app');
Example #25
Source File: main.js    From Elecrue with MIT License 5 votes vote down vote up
createApp(App).mount('#app')
Example #26
Source File: main.js    From practice-repo with MIT License 5 votes vote down vote up
createApp(App).mount('#app')
Example #27
Source File: main.js    From vue.draggable.next with MIT License 5 votes vote down vote up
app = createApp(App)
  .use(store)
  .use(router)
  .use(ElementPlus)
  .component("rawDisplayer", rawDisplayer)
Example #28
Source File: main.js    From vue-iClient3D_for_Cesium with Apache License 2.0 5 votes vote down vote up
app = createApp(App)
Example #29
Source File: index.js    From holo-schedule with MIT License 5 votes vote down vote up
app = createApp(App)