Semantic-ui: Can be encapsulated into a JS object?(可以封装成JS对象吗?)

Created on 9 Jan 2017  ·  11Comments  ·  Source: Semantic-Org/Semantic-UI

Semantic-UI Is a number of HTML and CSS styles,This will increase the amount of code, if it can be packaged into a pile of JS objects so it will be very popular with everyone, I am currently packaged in it.
(
Semantic-UI 目前是一堆的html和css如果可以将其封装成JS对象,搭配好的在线设计器那么Semantic-UI
将是非常强大的,目前我正在封装成JS不知道Semantic-UI是否也愿意将其封装成对象控件
)
A little proposal ,I am sorry ! My English is very poor.

Discussion Enhancement

Most helpful comment

@lc-soft thank you. I’ll close this for now, maybe we’ll be able to return to it some time in the future.

All 11 comments

Semantic UI 預設就有支援 JS,這個問題有點不太具體令人不太清楚。

screen shot 2017-01-10 at 12 46 50 am

讓我們以 Accordion 來說,其中的 Usage 分頁就有封裝成 JS 元件。

http://semantic-ui.com/modules/accordion.html#/usage

我是想封裝成JS純對象的操作方式,比如佈局使用容器佈局方式,讓前端裏面出現的只是JS代碼!封裝的類似extjs這種控件,那樣操作起來會非常友好方便,這個只是我個人的意見,我覺得MVVM的方式不如JS對象化的操作好!
封裝成一套的控件,從佈局到元件這樣Semantic-UI會更加強大.這是我個人的意見!
不過在白忙中能會我的消息,我感到非常高興,謝謝!
Thank you ! @YamiOdymel
Semantic UI 直接封裝成一套JS的控件庫,佈局->組件->皮膚

我是想封裝成JS純對象的操作方式,比如佈局使用容器佈局方式,讓前端裏面出現的只是JS代碼!封裝的類似extjs這種控件,那樣操作起來會非常友好方便,這個只是我個人的意見,我覺得MVVM的方式不如JS對象化的操作好!

I want to package JS into pure object operation, such as the layout of container layout, let the front inside there is only a JS code! Similar to the extjs control package, so the operation will be very friendly and convenient, this is just my personal opinion, I think MVVM is not the way of the good operation of the JS object!

封裝成一套的控件,從佈局到元件這樣Semantic-UI會更加強大.這是我個人的意見!

Packaging into a set of controls, from the layout to the component so that Semantic-UI will be more powerful!

不過在白忙中能會我的消息,我感到非常高興,謝謝!

But I'm very happy to be able to hear from you!

Thank you ! @YamiOdymel

You @YamiOdymel! Thank!

Semantic UI 直接封裝成一套JS的控件庫,佈局->組件->皮膚

The Semantic UI package into a JS control library, component layout - > - > skin

比如我創建一個Tree的表格我只需要引入
(function(){
"use strict";
var _width=$namespace("width");
var _tree=$namespace("width.tree");
/*
* tree.Node对象,是Tree的节点信息
* attr
* header 当前节点的标题名称
* iconClass 当前节点的图标
* children 当前节点下所有子节点对象(只读属性)
* tree 当前节点所属Tree树
* checkable 是否显示选择框
* checked 选择框是否被选中
* eve
* onCreate 当节点创建后的执行的事件
*/
_tree.Node=function(_conf){
var self=this;
var dom =""+
"

" +
"