vite-plugin-vue-gql::high_voltage:Vue SFC的GraphQL标签:high_voltage:-源码

上传者: 42107374 | 上传时间: 2021-08-15 10:36:44 | 文件大小: 64KB | 文件类型: ZIP
通过将graphql静态对象移动到自己的块来清理Vue SFC脚本 为什么? 在为GraphQL API编写Vue客户端时,我注意到Vue SFC文件中的脚本已被GraphQL查询过度填充,并且需要更好地组织代码,而又不能脱离SFC的优点:将所有代码合并为一个组件井井有条。 将查询移动到它们自己的文件中将为单个组件创建多个文件,从而使项目更加混乱,并降低了必须编写跨越多个文件的组件的工作效率。 输入Vue GQL! 我写了这个Vite插件,允许将与组件相关的GraphQL查询直接放置在组件文件中,而不会使脚本混乱,方法是将它们放置在它们自己的专用标记中。 :warning: 该插件仍在开发中,目前仅适用于[removed]格式 安装 # Install Plugin npm i -D vite-plugin-vue-gql # Install Peer Dependici

文件下载

资源详情

[{"title":"( 27 个子文件 64KB ) vite-plugin-vue-gql::high_voltage:Vue SFC的GraphQL标签:high_voltage:-源码","children":[{"title":"vite-plugin-vue-gql-main","children":[{"title":"package.json <span style='color:#111;'> 1.79KB </span>","children":null,"spread":false},{"title":"pnpm-lock.yaml <span style='color:#111;'> 120.75KB </span>","children":null,"spread":false},{"title":".eslintrc.json <span style='color:#111;'> 134B </span>","children":null,"spread":false},{"title":"assets","children":[{"title":"VQL-Logo.svg <span style='color:#111;'> 16.27KB </span>","children":null,"spread":false}],"spread":true},{"title":"client.d.ts <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"src","children":[{"title":"fragments.ts <span style='color:#111;'> 2.29KB </span>","children":null,"spread":false},{"title":"wrapper.ts <span style='color:#111;'> 512B </span>","children":null,"spread":false},{"title":"query.ts <span style='color:#111;'> 992B </span>","children":null,"spread":false},{"title":"types.ts <span style='color:#111;'> 94B </span>","children":null,"spread":false},{"title":"config.ts <span style='color:#111;'> 160B </span>","children":null,"spread":false},{"title":"index.ts <span style='color:#111;'> 3.26KB </span>","children":null,"spread":false},{"title":"util.ts <span style='color:#111;'> 9.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"tsconfig.json <span style='color:#111;'> 379B </span>","children":null,"spread":false},{"title":"pnpm-workspace.yaml <span style='color:#111;'> 24B </span>","children":null,"spread":false},{"title":"examples","children":[{"title":"spa","children":[{"title":"package.json <span style='color:#111;'> 586B </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 270B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"App.vue <span style='color:#111;'> 331B </span>","children":null,"spread":false},{"title":"shims-vue.d.ts <span style='color:#111;'> 147B </span>","children":null,"spread":false},{"title":"main.ts <span style='color:#111;'> 255B </span>","children":null,"spread":false},{"title":"components","children":[{"title":"TestComponent.vue <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false}],"spread":false},{"title":"fragments","children":[{"title":"fragments.gql <span style='color:#111;'> 54B </span>","children":null,"spread":false}],"spread":false},{"title":"index.css <span style='color:#111;'> 63B </span>","children":null,"spread":false}],"spread":false},{"title":"vite.config.ts <span style='color:#111;'> 320B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".gitignore <span style='color:#111;'> 27B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 5.02KB </span>","children":null,"spread":false},{"title":".vscode","children":[{"title":"settings.json <span style='color:#111;'> 28B </span>","children":null,"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明