Exemplo n.º 1
0
module.exports = SimplePager(lumineView(({
    props
}, ctx) => {
    const articleCnt = props.article && getArticleContent(props.article);
    return n(Vn, [
        n(FunctionBar, {
            title: 'Article',
            leftLogos: [
                n('div', '<')
            ],
            style: {
                container: {
                    height: 100,
                    backgroundColor: 'white',
                    borderBottom: '1px solid rgb(239, 241, 242) !important'
                },
                title: {
                    lineHeight: 100,
                    color: 'black'
                },
                logoLeft: {
                    backgroundColor: 'white',
                    color: 'black',
                    height: 100
                },
                logoRight: {
                    backgroundColor: 'white',
                    color: 'black',
                    height: 100
                }
            },

            onsignal: onSignalType('click', (signal) => {
                if (signal.data.sourceType === 'leftLogos') {
                    if (signal.data.index === 0) {
                        ctx.notify(Signal('route', '?page=indexPage'));
                    }
                }
            })
        }),

        n('div', {
            style: {
                padding: 8
            }
        }, [articleCnt])
    ]);
}, {
Exemplo n.º 2
0
 }, props.category.map((item, index) => {
     return n('div', {
         style: index === props.currentItemPosition ? props.style.highlightItem : props.style.item,
         onclick: () => {
             ctx.updateWithNotify(Signal('switch', index), 'props.currentItemPosition', index);
         }
     }, [item]);
 }));
Exemplo n.º 3
0
module.exports = lumineView(({
    props
}, ctx) => {
    return n('div', {
        style: props.style.container
    }, props.category.map((item, index) => {
        return n('div', {
            style: index === props.currentItemPosition ? props.style.highlightItem : props.style.item,
            onclick: () => {
                ctx.updateWithNotify(Signal('switch', index), 'props.currentItemPosition', index);
            }
        }, [item]);
    }));
}, {