1234567891011121314151617181920212223242526272829 |
- /*
- * UseStudio.Example 主js文件
- * 负责基本页面效果
- * qv
- **/
- //Namespace.register("U.EX");
- var U = {}; U.EX = {}; //暂时没有用Uj
- //Util
- function $(id) { return document.querySelectorAll(id); } //暂时没有UJ 暂用着
- U.EX.SList = function (id) {//视图隐藏与否 [Mark 暂用,到时优化成状态切换]
- var willHide = $("#" + id)[0].style;
- willHide.display = (willHide.display === "block" ? "none" : "block");
- }
- U.EX.VCSwitch = function (i) {//效果视图和代码视图切换
- var Code = $("#U_E_C_Left")[0].style
- , View = $("#U_E_C_Right")[0].style;
- if (i === "Code") {
- View.display = "none"; Code.display = "block"; Code.width = 100 + "%";
- } else if (i === "View") {
- View.display = "block"; Code.display = "none"; View.width = 100 + "%";
- } else {
- View.display = "block"; View.width = 50 + "%"; Code.display = "block"; Code.width = 50 + "%";
- }
- }
|