{"id":19112228,"url":"https://github.com/slimkit/plus-web","last_synced_at":"2025-02-22T11:31:49.245Z","repository":{"id":40829181,"uuid":"162983175","full_name":"slimkit/plus-web","owner":"slimkit","description":"VUE SSR version for ThinkSNS+ Desktop Client.","archived":false,"fork":false,"pushed_at":"2022-06-23T03:29:16.000Z","size":2233,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-03T04:44:57.749Z","etag":null,"topics":["nuxt","ssr","thinksns","vue"],"latest_commit_sha":null,"homepage":"","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slimkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-24T11:21:16.000Z","updated_at":"2024-03-18T06:58:28.000Z","dependencies_parsed_at":"2022-09-02T08:12:24.113Z","dependency_job_id":null,"html_url":"https://github.com/slimkit/plus-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimkit%2Fplus-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimkit%2Fplus-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimkit%2Fplus-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimkit%2Fplus-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slimkit","download_url":"https://codeload.github.com/slimkit/plus-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240170070,"owners_count":19759140,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nuxt","ssr","thinksns","vue"],"created_at":"2024-11-09T04:32:14.831Z","updated_at":"2025-02-22T11:31:49.224Z","avatar_url":"https://github.com/slimkit.png","language":"Vue","readme":"# ThinkSNS+ Desktop Client\n\n\u003e **(prototype)** VUE SSR version for ThinkSNS+ Desktop View.\n\n## Build Setup\n\n``` bash\n# 安装依赖\n$ yarn\n\n# 启动开发环境\n$ yarn dev\n\n# 以生产环境构建并启动服务\n$ yarn build\n$ yarn start\n\n# 构建 SPA 静态版本\n$ yarn generate\n\n# 启动测试\n$ yarn test\n\n```\n\n# 开发文档\n\n## 开发前准备\n\n- nodejs \u003e 10\n- [yarn 包管理器](https://yarnpkg.com/) (安装依赖提速)\n- vscode (或其他支持 eslint、vue 高亮的插件)\n- chorome 或 firefox 的 [vue-devtools 插件](https://github.com/vuejs/vue-devtools)\n\n### vscode 插件推荐\n- \\* `vetur` vue 语法高亮\n- \\* `ESLint` 代码风格检查与自动修正\n- `Path Intellisense` 路径感知（文件跳转）\n- `Vue Peek` vue 组件跳转\n- `Toggle Quotes` 快速切换引号 按 `ctrl+'` 在[`'` `\"` `` ` ``]中快速切换\n\n### 其他编辑器必装插件\n- vue 语法高亮, less 语法高亮，es6 语法支持\n- eslint (最好开启保存时自动修复 auto-fix on save)\n\n## 缓存策略\n\n### Vuex 数据管理\n\n## UI 组件\n\n组件方面使用 `iView` 作为原型组件库，使用时请添加前缀 `I`。\n\n``` html\n\b\u003cIButton type=\"primary\"\u003e确定\u003c/IButton\u003e\n\n\u003cIForm\u003e\n  \u003cIFormItem\u003e\n    \u003cIInput v-model=\"name\" placeholder=\"默认有前缀 I\" /\u003e\n    \n    \u003cSelect\u003e\n      \u003cOption\u003e这两个组件没有前缀 `I`\u003c/Option\u003e\n    \u003c/Select\u003e\n  \u003c/IFormItem\u003e\n\u003c/IForm\u003e\n```\n\n\u003e **注意**: `Select` `Option` 这两个组件**不能**添加前缀 `I`，否则会不能选中选择项\n\n### 按需加载\n\niView 使用按需加载，如果要使用某组件，在 `plugins/iview` 中加载即可\n\n\u003e 若导入后缺失样式，在 `assets/less/iview/components/index.less` 中将相应组件的注释打开即可\n\niView 样式表使用 less 重新导入在 `assets/less/iview/` 下\n\n## API\n\n### 全局组件\n\n以下组件可以在任意地方使用 `this.$root.$emit('xxx', payload)` 来呼出 modal\n\n- `reward` 打赏\n- `pinned` 置顶\n- `report` 举报\n- `password` 密码验证\n\n\u003e 这些文件位于 `./components/common/ModalXXX.vue` 中\n\n例如要打赏id为12的动态\n\n``` js\nexport default {\n  methods: {\n    onReward() {\n      this.$root.$emit('reward', {\n        type: 'feed',\n        article: 12,\n        callback: amount =\u003e {\n          console.log(`成功打赏${amount}积分！`)\n        }\n      })\n    }\n  }\n}\n```\n\n\u003e `payload` 参数根据不同的需求有所不同，具体请参考组件中 `created` 钩子中注册事件（`this.$root.$on('xxx')`）的部分\n\n# 参考资料\n\n## vue\n\n[官方手册](https://cn.vuejs.org/v2/guide/index.html)\n\n## ES6\n\n[阮一峰的ES6入门手册](http://es6.ruanyifeng.com/)\n\n## nuxt\n\n[官方教程](https://zh.nuxtjs.org/guide)\n\n[API](https://zh.nuxtjs.org/api)\n\n## iView\n\n[组件手册](https://www.iviewui.com/docs/guide/start)\n\n## axios\n\n[axios (英文)](https://github.com/axios/axios)\n\n[axios for nuxt (英文) ](https://axios.nuxtjs.org/)\n\n## less\n\n[中文文档](http://lesscss.cn/)\n\n## flex 布局教程\n\n[阮一峰的 flex 布局教程](http://www.ruanyifeng.com/blog/2015/07/flex-grammar.html)\n\n## ava (单元测试)\n\n[官方文档](https://github.com/avajs/ava-docs/blob/master/zh_CN/readme.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslimkit%2Fplus-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslimkit%2Fplus-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslimkit%2Fplus-web/lists"}