Hi Shalini,
I am really sorry for the non specified question. Let me explain the steps.
1) Create Vue project and implement the dashboard layout
package.json
{
"name": "syncfusion-layouts",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build"
},
"dependencies": {
"@syncfusion/ej2-vue-charts": "^19.3.45",
"@syncfusion/ej2-vue-layouts": "^19.3.44",
"core-js": "^3.6.5",
"vue": "^2.6.11",
"vue-class-component": "^8.0.0-rc.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
App.vue
<template>
<div>
<div class="control-section">
<ejs-dashboardlayout id='defaultLayout' :cellSpacing="spacing" :columns="6">
<div id="one" class="e-panel" data-row="0" data-col="0" data-sizeX="1" data-sizeY="1">
<div class="e-panel-container">
<div class="text-align">
<div>0div>
div>
div>
div>
<div id="two" class="e-panel" data-row="1" data-col="0" data-sizeX="1" data-sizeY="2">
<div class="e-panel-container">
<div class="text-align">
<div>1div>
div>
div>
div>
<div id="three" class="e-panel" data-row="0" data-col="1" data-sizeX="2" data-sizeY="2">
<div class="e-panel-container">
<div class="text-align">
<div>2div>
div>
div>
div>
<div id="four" class="e-panel" data-row="2" data-col="1" data-sizeX="1" data-sizeY="1">
<div class="e-panel-container">
<div class="text-align">
<div>3div>
div>
div>
div>
<div id="five" class="e-panel" data-row="2" data-col="2" data-sizeX="2" data-sizeY="1">
<div class="e-panel-container">
<div class="text-align">
<div>4div>
div>
div>
div>
<div id="six" class="e-panel" data-row="0" data-col="3" data-sizeX="1" data-sizeY="1">
<div class="e-panel-container">
<div class="text-align">
<div>5div>
div>
div>
div>
<div id="seven" class="e-panel" data-row="1" data-col="3" data-sizeX="1" data-sizeY="1">
<div class="e-panel-container">
<div class="text-align">
<div>6div>
div>
div>
div>
<div id="eight" class="e-panel" data-row="0" data-col="4" data-sizeX="1" data-sizeY="3">
<div class="e-panel-container">
<div class="text-align">
<div>7div>
div>
div>
div>
ejs-dashboardlayout>
div>
div>
template>
<script>
import Vue from "vue";
// Import syncfusion dashboardlayout component from layouts package
import { DashboardLayoutPlugin } from "@syncfusion/ej2-vue-layouts";
Vue.use(DashboardLayoutPlugin);
export default {
data: function() {
return {
count: 8,
spacing: [10,10]
};
}
}
script>
<style>
@import "../node_modules/@syncfusion/ej2-base/styles/material.css";
@import "../node_modules/@syncfusion/ej2-vue-layouts/styles/material.css";
/* DashboardLayout element styles */
#defaultLayout .e-panel .e-panel-container {
vertical-align: middle;
font-weight: 600;
font-size: 20px;
text-align: center;
}
.text-align {
line-height: 80px;
}
#defaultLayout .e-panel {
transition:none !important;
}
style>
main.js
import Vue from 'vue'
import App from './App.vue'
import wrap from "@vue/web-component-wrapper";
const wrappedElement = wrap(Vue, App);
Vue.config.productionTip = false
window.customElements.define("dashboard-layout", wrappedElement);
new Vue({
render: h => h(App),
}).$mount('#app')
( When I run the above project I get the dashboard layout. That works fine. )
2) Create web component
i) go to root of the vue project through CMD
ii) create the web component from App
3) use the dashboard-layout.min.js created above, in an html file to use
I get my issue here. Following screen shot is my issue (styling and drag and drop functionality doesnt work)
Can you please use vue cli if you create a sample