diff --git a/base/nfs/dir.go b/base/nfs/dir.go index 06dfb4f0..99439400 100644 --- a/base/nfs/dir.go +++ b/base/nfs/dir.go @@ -118,7 +118,7 @@ func _dir_list(m *ice.Message, root string, dir string, level int, deep bool, di } if deep && isDir { switch s.Name() { - case "node_modules", "pluged", "target", "trash", ice.VAR, ice.USR: + case "node_modules": continue } _dir_list(m, root, pp, level+1, deep, dir_type, dir_reg, fields) diff --git a/misc/node/admin.shy b/misc/node/admin.shy index a71474b3..a40f3750 100644 --- a/misc/node/admin.shy +++ b/misc/node/admin.shy @@ -1,4 +1,15 @@ -section "admin" +section "vue-element-admin" +shell ` +git clone https://shylinux.com/x/vue-element-admin +cd vue-element-admin +npm install +vue serve +vue build +` + +field web.code.vimer args "usr/vue-element-admin/ src/main.js" + +section "lin-cms-vue" refer ` https://www.imooc.com/course/list?c=nodejs https://gitee.com/talelin @@ -12,4 +23,4 @@ shell ` git clone -b imooc-island https://gitee.com/talelin/lin-cms-vue.git git clone -b imooc-island https://gitee.com/talelin/lin-cms-koa.git ` -field web.code.vimer args "usr/lin-cms-vue/ src/views/home/Home.vue" +# field web.code.vimer args "usr/lin-cms-vue/ src/views/home/Home.vue" diff --git a/misc/node/api.go b/misc/node/api.go index 218c396b..da820601 100644 --- a/misc/node/api.go +++ b/misc/node/api.go @@ -7,20 +7,30 @@ import ( ) type api struct { - spaceList string `http:"/api/space/list"` - userList string `http:"/api/user/list"` - userAdd string `http:"/api/user/add"` + adminLogin string `http:"/api/admin/login"` + adminLogout string `http:"/api/admin/logout"` + spaceList string `http:"/api/space/list"` + spaceAdd string `http:"/api/space/add"` + userList string `http:"/api/user/list"` + userAdd string `http:"/api/user/add"` } +func (s api) AdminLogin(m *ice.Message, arg ...string) { +} +func (s api) AdminLogout(m *ice.Message, arg ...string) { +} +func (s api) SpaceList(m *ice.Message, arg ...string) { + m.Cmdy(web.DREAM) +} +func (s api) SpaceAdd(m *ice.Message, arg ...string) { + m.Cmdy(web.DREAM) +} func (s api) UserAdd(m *ice.Message, arg ...string) { m.Cmdy(aaa.USER) } func (s api) UserList(m *ice.Message, arg ...string) { m.Cmdy(aaa.USER) } -func (s api) SpaceList(m *ice.Message, arg ...string) { - m.Cmdy(web.DREAM) -} func (s api) List() { } diff --git a/misc/node/node.shy b/misc/node/node.shy index 2797434a..9dd30652 100644 --- a/misc/node/node.shy +++ b/misc/node/node.shy @@ -4,7 +4,7 @@ refer ` 官网 https://nodejs.org/ 源码 https://github.com/nodejs/node 文档 https://nodejs.org/dist/latest-v18.x/docs/api/ -https://cloud.tencent.com/developer/section/1489885 +文档 https://cloud.tencent.com/developer/section/1489885 ` field web.code.node.node diff --git a/misc/node/scss.go b/misc/node/scss.go new file mode 100644 index 00000000..3248323c --- /dev/null +++ b/misc/node/scss.go @@ -0,0 +1,23 @@ +package node + +import ( + "shylinux.com/x/ice" + "shylinux.com/x/icebergs/base/nfs" + "shylinux.com/x/icebergs/core/code" + kit "shylinux.com/x/toolkits" +) + +type scss struct { + ice.Code + ice.Lang +} + +func (s scss) Init(m *ice.Message) { + s.Lang.Init(m, code.PREPARE, ice.Map{ + code.KEYWORD: kit.List("h1"), + code.FUNCTION: kit.List(), + }, "include", kit.List(nfs.CSS), "split.operator", "{[(.,:#)]}") +} +func (s scss) List(m *ice.Message) { m.Cmdy(nfs.DIR, nfs.USR) } + +func init() { ice.CodeCtxCmd(scss{}) } diff --git a/misc/node/vscode.shy b/misc/node/vscode.shy index 17d9ebf0..5cce717c 100644 --- a/misc/node/vscode.shy +++ b/misc/node/vscode.shy @@ -4,10 +4,8 @@ refer ` 文档 https://code.visualstudio.com/docs ` shell linux ` - ` macos ` https://az764295.vo.msecnd.net/stable/b3e4e68a0bc097f0ae7907b217c1119af9e03435/VSCode-darwin-universal.zip https://vscode.cdn.azure.cn/stable/b3e4e68a0bc097f0ae7907b217c1119af9e03435/VSCode-darwin-universal.zip ` windows ` - ` diff --git a/misc/node/vue.go b/misc/node/vue.go index baf84512..d6b6df75 100644 --- a/misc/node/vue.go +++ b/misc/node/vue.go @@ -22,29 +22,25 @@ func (s vue) Init(m *ice.Message) { s.Lang.Init(m, code.PREPARE, ice.Map{ code.KEYWORD: kit.List( "template", "script", "style", + "component", "slot", "router-link", "router-view", "el-container", "el-aside", "el-header", "el-main", - - "el-tabs", - "el-tab-pane", "el-dialog", - "el-form", - "el-form-item", + + "el-icon", "el-avatar", + + "el-menu", "el-sub-menu", "el-menu-item", + "el-table", "el-table-column", "el-pagination", + + "el-tabs", "el-tab-pane", + "el-form", "el-form-item", "el-input", "el-select", "el-option", "el-button", - "el-checkbox-group", "el-checkbox", - "el-pagination", - - "el-menu", - "el-submenu", - "el-menu-item", - - "el-table", - "el-table-column", + "el-checkbox-group", ), code.FUNCTION: kit.List( "data", @@ -55,6 +51,7 @@ func (s vue) Init(m *ice.Message) { "computed", "created", "mounted", + "unmounted", "methods", "watch", ), diff --git a/misc/node/vue.shy b/misc/node/vue.shy index c1ecb716..16c567ba 100644 --- a/misc/node/vue.shy +++ b/misc/node/vue.shy @@ -14,9 +14,10 @@ vue build section "grpc" shell ` -cnpm i --save-dev grpc-web -cnpm i --save-dev google-protobuf -cnpm i -g protoc-gen-js protoc-gen-grpc-web +cnpm install -D grpc-web +cnpm install -D google-protobuf +cnpm install -g protoc-gen-js +cnpm install -g protoc-gen-grpc-web protoc --js_out=import_style=commonjs:./demo/src --grpc-web_out=import_style=commonjs,mode=grpcwebtext:./demo/src ./idl/*.proto ` @@ -27,6 +28,10 @@ refer ` 源码 https://github.com/axios/axios ` +shell ` +npm install axios +` + section "router" refer ` https://router.vuejs.org/zh/guide/essentials/nested-routes.html @@ -38,6 +43,7 @@ https://element.eleme.cn/2.0/#/zh-CN/component/installation ` shell ` npm install element-ui +npm install @vueuse/core ` field inner ` @@ -46,3 +52,14 @@ import ElementUI from "element-ui" Vue.use(ElementUI) ` + +shell ` +npm install element-plus +npm install @vueuse/core +` +field inner ` + +` +field inner ` +import 'element-plus/theme-chalk/dark/css-vars.css' +`