MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / initComponent

Function initComponent

public/iframe/lib/js/mixinsComponents.js:241–3235  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239
240 },
241 initComponent() {
242 Vue.component('x-grouplist', {
243 props: {
244 item: {
245 type: Object,
246 default: () => {
247 return {};
248 },
249 }
250 },
251 template: `
252 <div v-if="item.property.type==='group'" :id="'groupOutLayer'+item.property.elementId"
253 :key="item.property.elementId" class="groupOutLayer "
254 :class="{activeOutLayer:item.property.elementId===vm.nowGroupId,
255 moveActive: item.property.elementId === vm.mouseenterGroup && item.property.elementId!==vm.nowGroupId}"
256 @mouseenter="vm.mouseenterGroupTemplate($event,true)"
257 @mouseleave="vm.mouseenterGroupTemplate($event,false)"
258 @mousedown.stop="vm.clickGroup(item.property.elementId)">
259 <x-grouplist v-for="child in item.property.children" :key="child.property.elementId" :item="child" ></x-grouplist>
260 <template v-if="item.property.type === 'group' && item.property.elementId === vm.nowGroupId">
261 <div class="quickOperate">
262 <div id="groupMove"><i class="el-icon-rank"></i> </div>
263 </div>
264 </template>
265 </template>
266 </div>
267 <x-singleTemplate v-else :item="item"/>
268 `
269 })
270 Vue.component('x-singleTemplate', {
271 props: {
272 item: {
273 type: Object,
274 default: () => {
275 return {};
276 },
277 },
278 },
279 template: `
280 <div class="chart-item" :id="item.property.elementId+'chart-item'"
281 @mousedown.stop="vm.clickTemplate(item.property.elementId)"
282 @dblclick.stop="vm.dblclickTemplate(item.property.elementId)"
283 @mouseenter="vm.mouseenter($event,true)"
284 @mouseleave="vm.mouseenter($event,false)" :ref="item.property.elementId+'Template'"
285 :class="{hidden:item.property.isHidden,
286 'activeItem':item.property.elementId == vm.nowId,
287 moveActive: item.property.elementId === vm.mouseenterTemplate && item.property.elementId !== vm.nowId,
288 heighLight:(item.isHorizontal || item.isVertical|| item.isHorCenter || item.isVerCenter )&&vm.isMove ,
289 isMove:vm.isMove,
290 isMultipyMove: vm.multiplyMoveList.includes(item.property.elementId)}"> <div class='main animate__animated'
291 :class="['animate__'+item.property.animate.default,item.property.selfAnimate&&item.property.selfAnimate.default]"
292 :style="{background:item.property.background?'url('+item.property.background+') no-repeat':'none'}" >
293 <div :id="item.property.elementId+'rotate'" :class="[{'notClickable':!item.isClickable&&item.property.elementId === vm.nowId}]">
294 <component :v-loading="item.loading"
295 :data-type="item.property.type"
296 :key="item.isLoading"
297 :is="'x-'+(item.componentsType=='private'?'private': item.property.type)"
298 :link="item.property.multLink" :config="item.property.bluePrintConfig"

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected