UNPKG

ttk-app-core

Version:
65 lines (64 loc) 2.09 kB
export function getMeta() { return { name: 'root', component: 'Layout', className: 'edfx-app-home', children: [{ name: 'scrollBar', component:'::div', className: 'edfx-app-home-scrollBar', children: [{ name: 'content', component: '::div', key: '{{data.other.mathRandom}}', className: 'edfx-app-home-content', // onScroll: '{{$desktopScroll}}', children: [{ name: 'panel', component: '::div', className: '{{(data.other.dataState[data.desktopAppList[_rowIndex].appName].empty || false) && $isFilterNeeded()}}', cust_appname: '{{data.desktopAppList[_rowIndex].appName}}', cust_ratio: '2', style: "{{$calculateWidth(data.desktopAppList[_rowIndex].widthRatio)}}", children: { name: 'card', component: 'Card', onMouseOver: '{{(data.other.dataState[data.desktopAppList[_rowIndex].appName].empty || false) && function() {$mouseOverEvent(data.desktopAppList[_rowIndex].appName)}}}', onMouseLeave: '{{(data.other.dataState[data.desktopAppList[_rowIndex].appName].empty || false) && function() {$mouseLeaveEvent(data.desktopAppList[_rowIndex].appName)}}}', children: [{ name: 'app', component: 'AppLoader', callback:'{{$zoom}}', appName: '{{data.desktopAppList[_rowIndex].appName}}', hasData: '{{data.other.dataState[data.desktopAppList[_rowIndex].appName].empty || false}}', appIndex: '{{data.desktopAppList[_rowIndex].showIndex}}', enterScreen: '{{data.desktopAppList[_rowIndex].enterScreen}}', data: '{{data.data[data.desktopAppList[_rowIndex].appName]}}', period: '{{data.other.period}}' }] }, _power: 'for in data.desktopAppList' }] }] }] } } export function getInitState() { return { data: { zoom: false, periodList:[], zoomValue: undefined, animation: 'in', showPanel: 'none', hotSearch:'', sale:'', visit:'', periodList: [], other: { mathRandom: Math.random(), isMax: false } } } }