├── .babelrc ├── .gitignore ├── .npmignore ├── .npmrc ├── LICENSE ├── README.md ├── changelog.md ├── coverage ├── clover.xml ├── coverage-final.json ├── lcov-report │ ├── base.css │ ├── block-navigation.js │ ├── clientAppEnhance.ts.html │ ├── config.js.html │ ├── errorId.js.html │ ├── favicon.png │ ├── index.html │ ├── index.js.html │ ├── prettify.css │ ├── prettify.js │ ├── sort-arrow-sprite.png │ ├── sorter.js │ └── utils.js.html └── lcov.info ├── dist ├── plugins │ └── index.js └── project │ ├── vue2 │ └── index.js │ └── vue3 │ ├── index.d.ts │ ├── index.js │ ├── inject │ └── componentInject.d.ts │ └── provide │ └── pageProvide.d.ts ├── docs ├── .vuepress │ ├── clientAppEnhance.ts │ ├── config.ts │ ├── data │ │ └── links.ts │ ├── public │ │ └── images │ │ │ └── logo.png │ ├── styles │ │ └── index.scss │ └── theme │ │ ├── index.ts │ │ └── layouts │ │ └── Layout.vue ├── README.md ├── code │ └── use │ │ ├── 1 │ │ ├── App.vue │ │ ├── afterPageA.vue │ │ └── beforePageA.vue │ │ ├── 2 │ │ ├── App.vue │ │ ├── customCopyright.vue │ │ └── main.js │ │ ├── 3 │ │ ├── App.vue │ │ ├── main.js │ │ ├── pageA.vue │ │ ├── pages.json │ │ └── uni.scss │ │ ├── 4 │ │ ├── App.vue │ │ ├── main.js │ │ ├── mixin.js │ │ ├── pageA.vue │ │ └── pageB.vue │ │ ├── 5 │ │ ├── App.vue │ │ ├── customSubmit.vue │ │ ├── pageA.vue │ │ └── pageB.vue │ │ ├── 6 │ │ ├── App.vue │ │ ├── main.js │ │ ├── mixin.js │ │ ├── pageA.vue │ │ └── pageB.vue │ │ ├── 7 │ │ ├── App.vue │ │ ├── customSubmit.vue │ │ ├── main.ts │ │ ├── pageA.vue │ │ └── toast.vue │ │ ├── 8 │ │ ├── App.vue │ │ ├── main.js │ │ ├── pageA.vue │ │ └── vite.config.js │ │ └── 5-1 │ │ ├── App.vue │ │ ├── customSubmit.vue │ │ ├── pageA.vue │ │ └── pageB.vue ├── components │ ├── footer.vue │ └── modal.vue └── md │ ├── aboutMe.md │ ├── changeLog.md │ ├── configure.md │ ├── followUpPlan.md │ ├── install.md │ ├── introduce.md │ ├── precautions.md │ └── use.md ├── examples ├── uniapp-vue2-cli-loader │ ├── .gitignore │ ├── README.md │ ├── babel.config.js │ ├── jsconfig.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ │ └── index.html │ ├── src │ │ ├── App.vue │ │ ├── components │ │ │ └── customSubmit.vue │ │ ├── main.js │ │ ├── manifest.json │ │ ├── pages.json │ │ ├── pages │ │ │ └── index │ │ │ │ └── index.vue │ │ ├── plugin │ │ │ ├── hack.h5.js │ │ │ ├── hack.js │ │ │ └── hack.wx.js │ │ ├── static │ │ │ └── logo.png │ │ └── uni.scss │ ├── tsconfig.json │ └── vue.config.js ├── uniapp-vue2-hbuilder-nvue-loader │ ├── .hbuilderx │ │ └── launch.json │ ├── App.vue │ ├── components │ │ └── submit.vue │ ├── index.html │ ├── main.js │ ├── manifest.json │ ├── mixins │ │ └── index.js │ ├── package.json │ ├── pages.json │ ├── pages │ │ └── index │ │ │ └── index.nvue │ ├── static │ │ └── logo.png │ ├── uni.scss │ └── vue.config.js ├── uniapp-vue2-hbuilderx-loader │ ├── .hbuilderx │ │ └── launch.json │ ├── App.vue │ ├── components │ │ └── submit.vue │ ├── global.scss │ ├── index.html │ ├── main.js │ ├── manifest.json │ ├── package.json │ ├── pages.json │ ├── pages │ │ └── index │ │ │ ├── index.vue │ │ │ └── other.vue │ ├── static │ │ └── logo.png │ ├── uni.scss │ └── vue.config.js ├── uniapp-vue3-cli-vite-ts-plugin │ ├── .gitignore │ ├── .vscode │ │ └── settings.json │ ├── README.md │ ├── index.html │ ├── package.json │ ├── plugin.js │ ├── postcss.config.js │ ├── project.config.json │ ├── src │ │ ├── App.vue │ │ ├── components │ │ │ ├── customSubmit.vue │ │ │ ├── demo.vue │ │ │ └── toast.vue │ │ ├── env.d.ts │ │ ├── main.ts │ │ ├── manifest.json │ │ ├── pages.json │ │ ├── pages │ │ │ ├── home │ │ │ │ └── index.vue │ │ │ └── mine │ │ │ │ └── index │ │ │ │ └── index.vue │ │ ├── static │ │ │ └── logo.png │ │ └── uni.scss │ ├── tsconfig.json │ └── vite.config.ts └── uniapp-vue3-hbuilderx-plugin │ ├── .hbuilderx │ └── launch.json │ ├── App.vue │ ├── components │ ├── customSubmit.vue │ └── toast.vue │ ├── global.scss │ ├── index.html │ ├── main.js │ ├── manifest.json │ ├── package.json │ ├── pages.json │ ├── pages │ └── index │ │ ├── index.vue │ │ └── other.vue │ ├── plugin.js │ ├── static │ └── logo.png │ ├── uni.scss │ └── vite.config.js ├── jest.config.js ├── package.json ├── package.uniModules.json ├── rollup.config.js ├── scripts ├── addBaiduStatistics.js ├── chokidar.js ├── compressZipExample.js ├── compressZipSrc.js ├── copyChangelog.js ├── localPublish.js └── localTest.js ├── src ├── config.d.ts ├── config.js ├── plugins │ ├── errorId.js │ ├── index.js │ └── utils.js └── project │ ├── vue2 │ ├── index.js │ └── mixins │ │ ├── componentInject.js │ │ └── pageProvide.js │ └── vue3 │ ├── index.ts │ ├── inject │ └── componentInject.ts │ └── provide │ └── pageProvide.ts ├── test ├── addCode │ └── index.test.js ├── appVueTemplate │ └── index.test.js ├── getRouterFile │ ├── data │ │ ├── 1 │ │ │ └── pages.json │ │ └── 2 │ │ │ └── pages.json │ └── index.test.js ├── parse │ ├── vite.spec.js │ └── webpack.spec.js ├── parseHtml │ └── index.test.js └── print │ └── index.test.js ├── tsconfig.xx.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ] 5 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/unpackage 3 | /examples**/dist 4 | /examples/**/yarn.lock 5 | 6 | /docs/.vuepress/.temp 7 | /docs/.vuepress/.cache 8 | /docs/.vuepress/dist 9 | 10 | **/DS_Store 11 | **/.DS_Store 12 | **/yarn-error.log 13 | /zip 14 | /temp 15 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | /coverage 2 | /docs 3 | /examples 4 | /node_modules 5 | /scripts 6 | /test 7 | /zip 8 | /temp 9 | 10 | **/.DS_Store 11 | /yarn-error.log 12 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry=https://registry.npmjs.org 2 | always-auth=true 3 | email=fty2460392754@gmail.com 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 pocky 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # uniapp-router-view-loader 2 | 3 | [![issues](https://img.shields.io/github/issues/2460392754/uniapp-router-view-loader.svg?style=for-the-badge)](https://github.com/2460392754/uniapp-router-view-loader) 4 | [![forks](https://img.shields.io/github/forks/2460392754/uniapp-router-view-loader.svg?style=for-the-badge)](https://github.com/2460392754/uniapp-router-view-loader) 5 | [![stars](https://img.shields.io/github/stars/2460392754/uniapp-router-view-loader.svg?style=for-the-badge)](https://github.com/2460392754/uniapp-router-view-loader) 6 | [![license](https://img.shields.io/github/license/2460392754/uniapp-router-view-loader.svg?style=for-the-badge)](https://github.com/2460392754/uniapp-router-view-loader) 7 | [![downloads](https://img.shields.io/npm/dm/uniapp-router-view-loader.svg?sanitize=true&style=for-the-badge)](https://www.npmjs.com/package/uniapp-router-view-loader) 8 | [![npm](https://img.shields.io/npm/v/uniapp-router-view-loader.svg?sanitize=true&style=for-the-badge)](https://www.npmjs.com/package/uniapp-router-view-loader) 9 | 10 | [在线文档](https://docs.965.ink/uniapp-router-view-loader/) 11 | 12 | [demo 项目](./examples/) 13 | 14 | 15 | ## QQ 群 16 | 17 | 424521214 18 | 19 | ## 说明 20 | 21 | 全网首个专属于 `UniApp` 的编译工具插件,全面支持各平台、各环境、各语言、各类型文件、各编译工具。 22 | 23 | ## 功能 24 | 25 | - [路由模板](https://docs.965.ink/uniapp-router-view-loader/md/introduce.html#路由模板) 26 | - [虚拟标签](https://docs.965.ink/uniapp-router-view-loader/md/introduce.html#虚拟标签) 27 | 28 | ## 后续计划 29 | 30 | - 支持 `虚拟标签` ✅ 31 | - 支持 `app-nvue` 32 | - 支持 `uni_modules` 33 | - 支持 `webpack hot` 和 `vite hot` 34 | - 重构 `TS` 35 | - 完善 `单元测试` 36 | 37 | 38 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | --- 2 | lang: zh-CN 3 | title: 更新日志 4 | --- 5 | 6 | # 更新日志 7 | 8 | - 2022-04-14 - v1.1.2 9 | 10 | - bug: 修复 多 `template` 标签导致 “添加代码到尾部” 异常 11 | 12 | - 2022-04-11 - v1.1.1 13 | 14 | - bug: 修复 页面 `footer插槽` 解析匹配错误 15 | 16 | - 2022-03-10 - v1.1.0 17 | 18 | - feature: 新增 `虚拟标签` 19 | 20 | - 2022-03-04 - v1.0.3 21 | 22 | - feature: 优化插件配置 23 | - feature: 优化冗余文件 24 | - example: 更新 `demo` 项目配置 25 | 26 | - 2022-03-03 - v1.0.2 27 | 28 | - bug: 修复 `vue` 文件中存在多 `script` 标签导致 `vue-compile` 工具编译异常 29 | 30 | - 2022-03-02 - v1.0.1 31 | 32 | - bug: 修复 `window系统` 磁盘路径读取后正则匹配异常 33 | - example: 添加 nvue 项目 34 | 35 | - 2022-03-01 - v1.0.0 36 | 37 | - feature: 插件发布 38 | -------------------------------------------------------------------------------- /coverage/clover.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | -------------------------------------------------------------------------------- /coverage/lcov-report/base.css: -------------------------------------------------------------------------------- 1 | body, html { 2 | margin:0; padding: 0; 3 | height: 100%; 4 | } 5 | body { 6 | font-family: Helvetica Neue, Helvetica, Arial; 7 | font-size: 14px; 8 | color:#333; 9 | } 10 | .small { font-size: 12px; } 11 | *, *:after, *:before { 12 | -webkit-box-sizing:border-box; 13 | -moz-box-sizing:border-box; 14 | box-sizing:border-box; 15 | } 16 | h1 { font-size: 20px; margin: 0;} 17 | h2 { font-size: 14px; } 18 | pre { 19 | font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace; 20 | margin: 0; 21 | padding: 0; 22 | -moz-tab-size: 2; 23 | -o-tab-size: 2; 24 | tab-size: 2; 25 | } 26 | a { color:#0074D9; text-decoration:none; } 27 | a:hover { text-decoration:underline; } 28 | .strong { font-weight: bold; } 29 | .space-top1 { padding: 10px 0 0 0; } 30 | .pad2y { padding: 20px 0; } 31 | .pad1y { padding: 10px 0; } 32 | .pad2x { padding: 0 20px; } 33 | .pad2 { padding: 20px; } 34 | .pad1 { padding: 10px; } 35 | .space-left2 { padding-left:55px; } 36 | .space-right2 { padding-right:20px; } 37 | .center { text-align:center; } 38 | .clearfix { display:block; } 39 | .clearfix:after { 40 | content:''; 41 | display:block; 42 | height:0; 43 | clear:both; 44 | visibility:hidden; 45 | } 46 | .fl { float: left; } 47 | @media only screen and (max-width:640px) { 48 | .col3 { width:100%; max-width:100%; } 49 | .hide-mobile { display:none!important; } 50 | } 51 | 52 | .quiet { 53 | color: #7f7f7f; 54 | color: rgba(0,0,0,0.5); 55 | } 56 | .quiet a { opacity: 0.7; } 57 | 58 | .fraction { 59 | font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; 60 | font-size: 10px; 61 | color: #555; 62 | background: #E8E8E8; 63 | padding: 4px 5px; 64 | border-radius: 3px; 65 | vertical-align: middle; 66 | } 67 | 68 | div.path a:link, div.path a:visited { color: #333; } 69 | table.coverage { 70 | border-collapse: collapse; 71 | margin: 10px 0 0 0; 72 | padding: 0; 73 | } 74 | 75 | table.coverage td { 76 | margin: 0; 77 | padding: 0; 78 | vertical-align: top; 79 | } 80 | table.coverage td.line-count { 81 | text-align: right; 82 | padding: 0 5px 0 20px; 83 | } 84 | table.coverage td.line-coverage { 85 | text-align: right; 86 | padding-right: 10px; 87 | min-width:20px; 88 | } 89 | 90 | table.coverage td span.cline-any { 91 | display: inline-block; 92 | padding: 0 5px; 93 | width: 100%; 94 | } 95 | .missing-if-branch { 96 | display: inline-block; 97 | margin-right: 5px; 98 | border-radius: 3px; 99 | position: relative; 100 | padding: 0 4px; 101 | background: #333; 102 | color: yellow; 103 | } 104 | 105 | .skip-if-branch { 106 | display: none; 107 | margin-right: 10px; 108 | position: relative; 109 | padding: 0 4px; 110 | background: #ccc; 111 | color: white; 112 | } 113 | .missing-if-branch .typ, .skip-if-branch .typ { 114 | color: inherit !important; 115 | } 116 | .coverage-summary { 117 | border-collapse: collapse; 118 | width: 100%; 119 | } 120 | .coverage-summary tr { border-bottom: 1px solid #bbb; } 121 | .keyline-all { border: 1px solid #ddd; } 122 | .coverage-summary td, .coverage-summary th { padding: 10px; } 123 | .coverage-summary tbody { border: 1px solid #bbb; } 124 | .coverage-summary td { border-right: 1px solid #bbb; } 125 | .coverage-summary td:last-child { border-right: none; } 126 | .coverage-summary th { 127 | text-align: left; 128 | font-weight: normal; 129 | white-space: nowrap; 130 | } 131 | .coverage-summary th.file { border-right: none !important; } 132 | .coverage-summary th.pct { } 133 | .coverage-summary th.pic, 134 | .coverage-summary th.abs, 135 | .coverage-summary td.pct, 136 | .coverage-summary td.abs { text-align: right; } 137 | .coverage-summary td.file { white-space: nowrap; } 138 | .coverage-summary td.pic { min-width: 120px !important; } 139 | .coverage-summary tfoot td { } 140 | 141 | .coverage-summary .sorter { 142 | height: 10px; 143 | width: 7px; 144 | display: inline-block; 145 | margin-left: 0.5em; 146 | background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent; 147 | } 148 | .coverage-summary .sorted .sorter { 149 | background-position: 0 -20px; 150 | } 151 | .coverage-summary .sorted-desc .sorter { 152 | background-position: 0 -10px; 153 | } 154 | .status-line { height: 10px; } 155 | /* yellow */ 156 | .cbranch-no { background: yellow !important; color: #111; } 157 | /* dark red */ 158 | .red.solid, .status-line.low, .low .cover-fill { background:#C21F39 } 159 | .low .chart { border:1px solid #C21F39 } 160 | .highlighted, 161 | .highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{ 162 | background: #C21F39 !important; 163 | } 164 | /* medium red */ 165 | .cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE } 166 | /* light red */ 167 | .low, .cline-no { background:#FCE1E5 } 168 | /* light green */ 169 | .high, .cline-yes { background:rgb(230,245,208) } 170 | /* medium green */ 171 | .cstat-yes { background:rgb(161,215,106) } 172 | /* dark green */ 173 | .status-line.high, .high .cover-fill { background:rgb(77,146,33) } 174 | .high .chart { border:1px solid rgb(77,146,33) } 175 | /* dark yellow (gold) */ 176 | .status-line.medium, .medium .cover-fill { background: #f9cd0b; } 177 | .medium .chart { border:1px solid #f9cd0b; } 178 | /* light yellow */ 179 | .medium { background: #fff4c2; } 180 | 181 | .cstat-skip { background: #ddd; color: #111; } 182 | .fstat-skip { background: #ddd; color: #111 !important; } 183 | .cbranch-skip { background: #ddd !important; color: #111; } 184 | 185 | span.cline-neutral { background: #eaeaea; } 186 | 187 | .coverage-summary td.empty { 188 | opacity: .5; 189 | padding-top: 4px; 190 | padding-bottom: 4px; 191 | line-height: 1; 192 | color: #888; 193 | } 194 | 195 | .cover-fill, .cover-empty { 196 | display:inline-block; 197 | height: 12px; 198 | } 199 | .chart { 200 | line-height: 0; 201 | } 202 | .cover-empty { 203 | background: white; 204 | } 205 | .cover-full { 206 | border-right: none !important; 207 | } 208 | pre.prettyprint { 209 | border: none !important; 210 | padding: 0 !important; 211 | margin: 0 !important; 212 | } 213 | .com { color: #999 !important; } 214 | .ignore-none { color: #999; font-weight: normal; } 215 | 216 | .wrapper { 217 | min-height: 100%; 218 | height: auto !important; 219 | height: 100%; 220 | margin: 0 auto -48px; 221 | } 222 | .footer, .push { 223 | height: 48px; 224 | } 225 | -------------------------------------------------------------------------------- /coverage/lcov-report/block-navigation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var jumpToCode = (function init() { 3 | // Classes of code we would like to highlight in the file view 4 | var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no']; 5 | 6 | // Elements to highlight in the file listing view 7 | var fileListingElements = ['td.pct.low']; 8 | 9 | // We don't want to select elements that are direct descendants of another match 10 | var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > ` 11 | 12 | // Selecter that finds elements on the page to which we can jump 13 | var selector = 14 | fileListingElements.join(', ') + 15 | ', ' + 16 | notSelector + 17 | missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b` 18 | 19 | // The NodeList of matching elements 20 | var missingCoverageElements = document.querySelectorAll(selector); 21 | 22 | var currentIndex; 23 | 24 | function toggleClass(index) { 25 | missingCoverageElements 26 | .item(currentIndex) 27 | .classList.remove('highlighted'); 28 | missingCoverageElements.item(index).classList.add('highlighted'); 29 | } 30 | 31 | function makeCurrent(index) { 32 | toggleClass(index); 33 | currentIndex = index; 34 | missingCoverageElements.item(index).scrollIntoView({ 35 | behavior: 'smooth', 36 | block: 'center', 37 | inline: 'center' 38 | }); 39 | } 40 | 41 | function goToPrevious() { 42 | var nextIndex = 0; 43 | if (typeof currentIndex !== 'number' || currentIndex === 0) { 44 | nextIndex = missingCoverageElements.length - 1; 45 | } else if (missingCoverageElements.length > 1) { 46 | nextIndex = currentIndex - 1; 47 | } 48 | 49 | makeCurrent(nextIndex); 50 | } 51 | 52 | function goToNext() { 53 | var nextIndex = 0; 54 | 55 | if ( 56 | typeof currentIndex === 'number' && 57 | currentIndex < missingCoverageElements.length - 1 58 | ) { 59 | nextIndex = currentIndex + 1; 60 | } 61 | 62 | makeCurrent(nextIndex); 63 | } 64 | 65 | return function jump(event) { 66 | if ( 67 | document.getElementById('fileSearch') === document.activeElement && 68 | document.activeElement != null 69 | ) { 70 | // if we're currently focused on the search input, we don't want to navigate 71 | return; 72 | } 73 | 74 | switch (event.which) { 75 | case 78: // n 76 | case 74: // j 77 | goToNext(); 78 | break; 79 | case 66: // b 80 | case 75: // k 81 | case 80: // p 82 | goToPrevious(); 83 | break; 84 | } 85 | }; 86 | })(); 87 | window.addEventListener('keydown', jumpToCode); 88 | -------------------------------------------------------------------------------- /coverage/lcov-report/clientAppEnhance.ts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Code coverage report for clientAppEnhance.ts 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 |
21 |
22 |

All files clientAppEnhance.ts

23 |
24 | 25 |
26 | 0% 27 | Statements 28 | 0/1 29 |
30 | 31 | 32 |
33 | 100% 34 | Branches 35 | 0/0 36 |
37 | 38 | 39 |
40 | 0% 41 | Functions 42 | 0/1 43 |
44 | 45 | 46 |
47 | 0% 48 | Lines 49 | 0/1 50 |
51 | 52 | 53 |
54 |

55 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 56 |

57 | 63 |
64 |
65 |

 66 | 
1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 6 72 | 7  73 |   74 |   75 |   76 |   77 |   78 |  
import { defineClientAppEnhance } from '@vuepress/client';
 79 | import Modal from '../components/modal.vue';
 80 |  
 81 | export default defineClientAppEnhance(({ app, router, siteData }) => {
 82 |     app.component('Modal', Modal);
 83 | });
 84 |  
85 | 86 |
87 |
88 | 93 | 94 | 99 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /coverage/lcov-report/config.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Code coverage report for config.js 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 |
21 |
22 |

All files config.js

23 |
24 | 25 |
26 | 100% 27 | Statements 28 | 2/2 29 |
30 | 31 | 32 |
33 | 100% 34 | Branches 35 | 0/0 36 |
37 | 38 | 39 |
40 | 100% 41 | Functions 42 | 0/0 43 |
44 | 45 | 46 |
47 | 100% 48 | Lines 49 | 2/2 50 |
51 | 52 | 53 |
54 |

55 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 56 |

57 | 63 |
64 |
65 |

 66 | 
1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 6 72 | 7 73 | 8 74 | 9 75 | 10 76 | 11 77 | 12 78 | 13 79 | 14  80 |   81 |   82 |   83 |   84 | 5x 85 |   86 |   87 |   88 |   89 | 5x 90 |   91 |   92 |  
export { name, version } from '../package.json'
 93 |  
 94 | /**
 95 |  * pages.json 在项目中的相对路径
 96 |  */
 97 | export const publicPath = '../../'
 98 |  
 99 | /**
100 |  * vnode 节点
101 |  */
102 | export const VNode = {
103 |     'VNode-Navbar': '/src/template/navbar',
104 |     'VNode-Copyright': '/src/template/copyright',
105 | }
106 | 107 |
108 |
109 | 114 | 115 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /coverage/lcov-report/errorId.js.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Code coverage report for errorId.js 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 |
21 |
22 |

All files errorId.js

23 |
24 | 25 |
26 | 0% 27 | Statements 28 | 0/0 29 |
30 | 31 | 32 |
33 | 0% 34 | Branches 35 | 0/0 36 |
37 | 38 | 39 |
40 | 0% 41 | Functions 42 | 0/0 43 |
44 | 45 | 46 |
47 | 0% 48 | Lines 49 | 0/0 50 |
51 | 52 | 53 |
54 |

55 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 56 |

57 | 63 |
64 |
65 |

 66 | 
1 67 | 2 68 | 3 69 | 4 70 | 5 71 | 6  72 |   73 |   74 |   75 |   76 |  
export default {
 77 |     10001: 'pages.json文件解析异常',
 78 |     10101: 'App.vue文件中未找到<view-router />标签',
 79 |     10102: 'App.vue文件中<view-router />标签数量超过1个以上',
 80 |     10201: '运行环境异常'
 81 | }
82 | 83 |
84 |
85 | 90 | 91 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /coverage/lcov-report/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2460392754/uniapp-router-view-loader/aeff206c59c32c801a1d48365da28000d21ac634/coverage/lcov-report/favicon.png -------------------------------------------------------------------------------- /coverage/lcov-report/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Code coverage report for All files 7 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 |
21 |
22 |

All files

23 |
24 | 25 |
26 | 67.92% 27 | Statements 28 | 72/106 29 |
30 | 31 | 32 |
33 | 70.96% 34 | Branches 35 | 22/31 36 |
37 | 38 | 39 |
40 | 70.37% 41 | Functions 42 | 19/27 43 |
44 | 45 | 46 |
47 | 68.31% 48 | Lines 49 | 69/101 50 |
51 | 52 | 53 |
54 |

55 | Press n or j to go to the next uncovered block, b, p or k for the previous block. 56 |

57 | 63 |
64 |
65 |
66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 |
FileStatementsBranchesFunctionsLines
config.js 84 |
85 |
100%2/2100%0/0100%0/0100%2/2
index.js 99 |
100 |
0%0/340%0/80%0/80%0/32
utils.js 114 |
115 |
100%70/7095.65%22/23100%19/19100%67/67
128 |
129 |
130 |
131 | 136 | 137 | 142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /coverage/lcov-report/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | -------------------------------------------------------------------------------- /coverage/lcov-report/sort-arrow-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2460392754/uniapp-router-view-loader/aeff206c59c32c801a1d48365da28000d21ac634/coverage/lcov-report/sort-arrow-sprite.png -------------------------------------------------------------------------------- /coverage/lcov-report/sorter.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | var addSorting = (function() { 3 | 'use strict'; 4 | var cols, 5 | currentSort = { 6 | index: 0, 7 | desc: false 8 | }; 9 | 10 | // returns the summary table element 11 | function getTable() { 12 | return document.querySelector('.coverage-summary'); 13 | } 14 | // returns the thead element of the summary table 15 | function getTableHeader() { 16 | return getTable().querySelector('thead tr'); 17 | } 18 | // returns the tbody element of the summary table 19 | function getTableBody() { 20 | return getTable().querySelector('tbody'); 21 | } 22 | // returns the th element for nth column 23 | function getNthColumn(n) { 24 | return getTableHeader().querySelectorAll('th')[n]; 25 | } 26 | 27 | function onFilterInput() { 28 | const searchValue = document.getElementById('fileSearch').value; 29 | const rows = document.getElementsByTagName('tbody')[0].children; 30 | for (let i = 0; i < rows.length; i++) { 31 | const row = rows[i]; 32 | if ( 33 | row.textContent 34 | .toLowerCase() 35 | .includes(searchValue.toLowerCase()) 36 | ) { 37 | row.style.display = ''; 38 | } else { 39 | row.style.display = 'none'; 40 | } 41 | } 42 | } 43 | 44 | // loads the search box 45 | function addSearchBox() { 46 | var template = document.getElementById('filterTemplate'); 47 | var templateClone = template.content.cloneNode(true); 48 | templateClone.getElementById('fileSearch').oninput = onFilterInput; 49 | template.parentElement.appendChild(templateClone); 50 | } 51 | 52 | // loads all columns 53 | function loadColumns() { 54 | var colNodes = getTableHeader().querySelectorAll('th'), 55 | colNode, 56 | cols = [], 57 | col, 58 | i; 59 | 60 | for (i = 0; i < colNodes.length; i += 1) { 61 | colNode = colNodes[i]; 62 | col = { 63 | key: colNode.getAttribute('data-col'), 64 | sortable: !colNode.getAttribute('data-nosort'), 65 | type: colNode.getAttribute('data-type') || 'string' 66 | }; 67 | cols.push(col); 68 | if (col.sortable) { 69 | col.defaultDescSort = col.type === 'number'; 70 | colNode.innerHTML = 71 | colNode.innerHTML + ''; 72 | } 73 | } 74 | return cols; 75 | } 76 | // attaches a data attribute to every tr element with an object 77 | // of data values keyed by column name 78 | function loadRowData(tableRow) { 79 | var tableCols = tableRow.querySelectorAll('td'), 80 | colNode, 81 | col, 82 | data = {}, 83 | i, 84 | val; 85 | for (i = 0; i < tableCols.length; i += 1) { 86 | colNode = tableCols[i]; 87 | col = cols[i]; 88 | val = colNode.getAttribute('data-value'); 89 | if (col.type === 'number') { 90 | val = Number(val); 91 | } 92 | data[col.key] = val; 93 | } 94 | return data; 95 | } 96 | // loads all row data 97 | function loadData() { 98 | var rows = getTableBody().querySelectorAll('tr'), 99 | i; 100 | 101 | for (i = 0; i < rows.length; i += 1) { 102 | rows[i].data = loadRowData(rows[i]); 103 | } 104 | } 105 | // sorts the table using the data for the ith column 106 | function sortByIndex(index, desc) { 107 | var key = cols[index].key, 108 | sorter = function(a, b) { 109 | a = a.data[key]; 110 | b = b.data[key]; 111 | return a < b ? -1 : a > b ? 1 : 0; 112 | }, 113 | finalSorter = sorter, 114 | tableBody = document.querySelector('.coverage-summary tbody'), 115 | rowNodes = tableBody.querySelectorAll('tr'), 116 | rows = [], 117 | i; 118 | 119 | if (desc) { 120 | finalSorter = function(a, b) { 121 | return -1 * sorter(a, b); 122 | }; 123 | } 124 | 125 | for (i = 0; i < rowNodes.length; i += 1) { 126 | rows.push(rowNodes[i]); 127 | tableBody.removeChild(rowNodes[i]); 128 | } 129 | 130 | rows.sort(finalSorter); 131 | 132 | for (i = 0; i < rows.length; i += 1) { 133 | tableBody.appendChild(rows[i]); 134 | } 135 | } 136 | // removes sort indicators for current column being sorted 137 | function removeSortIndicators() { 138 | var col = getNthColumn(currentSort.index), 139 | cls = col.className; 140 | 141 | cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, ''); 142 | col.className = cls; 143 | } 144 | // adds sort indicators for current column being sorted 145 | function addSortIndicators() { 146 | getNthColumn(currentSort.index).className += currentSort.desc 147 | ? ' sorted-desc' 148 | : ' sorted'; 149 | } 150 | // adds event listeners for all sorter widgets 151 | function enableUI() { 152 | var i, 153 | el, 154 | ithSorter = function ithSorter(i) { 155 | var col = cols[i]; 156 | 157 | return function() { 158 | var desc = col.defaultDescSort; 159 | 160 | if (currentSort.index === i) { 161 | desc = !currentSort.desc; 162 | } 163 | sortByIndex(i, desc); 164 | removeSortIndicators(); 165 | currentSort.index = i; 166 | currentSort.desc = desc; 167 | addSortIndicators(); 168 | }; 169 | }; 170 | for (i = 0; i < cols.length; i += 1) { 171 | if (cols[i].sortable) { 172 | // add the click event handler on the th so users 173 | // dont have to click on those tiny arrows 174 | el = getNthColumn(i).querySelector('.sorter').parentElement; 175 | if (el.addEventListener) { 176 | el.addEventListener('click', ithSorter(i)); 177 | } else { 178 | el.attachEvent('onclick', ithSorter(i)); 179 | } 180 | } 181 | } 182 | } 183 | // adds sorting functionality to the UI 184 | return function() { 185 | if (!getTable()) { 186 | return; 187 | } 188 | cols = loadColumns(); 189 | loadData(); 190 | addSearchBox(); 191 | addSortIndicators(); 192 | enableUI(); 193 | }; 194 | })(); 195 | 196 | window.addEventListener('load', addSorting); 197 | -------------------------------------------------------------------------------- /coverage/lcov.info: -------------------------------------------------------------------------------- 1 | TN: 2 | SF:src/config.js 3 | FNF:0 4 | FNH:0 5 | DA:6,5 6 | DA:11,5 7 | LF:2 8 | LH:2 9 | BRF:0 10 | BRH:0 11 | end_of_record 12 | TN: 13 | SF:src/index.js 14 | FN:14,getConfigure 15 | FN:30,handleAppVue 16 | FN:49,handleRouteFile 17 | FN:63,(anonymous_3) 18 | FN:72,(anonymous_4) 19 | FN:83,vitePlugin 20 | FN:90,(anonymous_6) 21 | FN:103,(anonymous_7) 22 | FNF:8 23 | FNH:0 24 | FNDA:0,getConfigure 25 | FNDA:0,handleAppVue 26 | FNDA:0,handleRouteFile 27 | FNDA:0,(anonymous_3) 28 | FNDA:0,(anonymous_4) 29 | FNDA:0,vitePlugin 30 | FNDA:0,(anonymous_6) 31 | FNDA:0,(anonymous_7) 32 | DA:4,0 33 | DA:15,0 34 | DA:18,0 35 | DA:20,0 36 | DA:31,0 37 | DA:33,0 38 | DA:34,0 39 | DA:35,0 40 | DA:37,0 41 | DA:38,0 42 | DA:40,0 43 | DA:50,0 44 | DA:52,0 45 | DA:53,0 46 | DA:55,0 47 | DA:64,0 48 | DA:67,0 49 | DA:68,0 50 | DA:72,0 51 | DA:73,0 52 | DA:76,0 53 | DA:84,0 54 | DA:86,0 55 | DA:92,0 56 | DA:93,0 57 | DA:95,0 58 | DA:96,0 59 | DA:97,0 60 | DA:99,0 61 | DA:103,0 62 | DA:104,0 63 | DA:106,0 64 | LF:32 65 | LH:0 66 | BRDA:67,0,0,0 67 | BRDA:67,0,1,0 68 | BRDA:72,1,0,0 69 | BRDA:72,1,1,0 70 | BRDA:92,2,0,0 71 | BRDA:92,2,1,0 72 | BRDA:103,3,0,0 73 | BRDA:103,3,1,0 74 | BRF:8 75 | BRH:0 76 | end_of_record 77 | TN: 78 | SF:src/utils.js 79 | FN:15,(anonymous_0) 80 | FN:25,(anonymous_1) 81 | FN:36,(anonymous_2) 82 | FN:43,(anonymous_3) 83 | FN:47,(anonymous_4) 84 | FN:48,(anonymous_5) 85 | FN:66,(anonymous_6) 86 | FN:67,(anonymous_7) 87 | FN:75,(anonymous_8) 88 | FN:76,(anonymous_9) 89 | FN:95,(anonymous_10) 90 | FN:102,(anonymous_11) 91 | FN:124,(anonymous_12) 92 | FN:152,(anonymous_13) 93 | FN:161,(anonymous_14) 94 | FN:185,(anonymous_15) 95 | FN:193,(anonymous_16) 96 | FN:224,(anonymous_17) 97 | FN:233,(anonymous_18) 98 | FNF:19 99 | FNH:19 100 | FNDA:13,(anonymous_0) 101 | FNDA:9,(anonymous_1) 102 | FNDA:3,(anonymous_2) 103 | FNDA:4,(anonymous_3) 104 | FNDA:2,(anonymous_4) 105 | FNDA:4,(anonymous_5) 106 | FNDA:7,(anonymous_6) 107 | FNDA:4,(anonymous_7) 108 | FNDA:7,(anonymous_8) 109 | FNDA:4,(anonymous_9) 110 | FNDA:3,(anonymous_10) 111 | FNDA:1,(anonymous_11) 112 | FNDA:1,(anonymous_12) 113 | FNDA:3,(anonymous_13) 114 | FNDA:15,(anonymous_14) 115 | FNDA:3,(anonymous_15) 116 | FNDA:15,(anonymous_16) 117 | FNDA:7,(anonymous_17) 118 | FNDA:6,(anonymous_18) 119 | DA:15,5 120 | DA:16,13 121 | DA:25,5 122 | DA:26,9 123 | DA:27,9 124 | DA:29,9 125 | DA:36,5 126 | DA:37,3 127 | DA:38,3 128 | DA:40,2 129 | DA:41,2 130 | DA:43,2 131 | DA:44,4 132 | DA:47,2 133 | DA:48,2 134 | DA:49,4 135 | DA:53,2 136 | DA:55,1 137 | DA:56,1 138 | DA:66,5 139 | DA:67,7 140 | DA:75,5 141 | DA:76,7 142 | DA:95,5 143 | DA:97,3 144 | DA:99,3 145 | DA:102,1 146 | DA:103,1 147 | DA:104,1 148 | DA:108,1 149 | DA:110,1 150 | DA:124,1 151 | DA:125,1 152 | DA:126,1 153 | DA:129,1 154 | DA:135,1 155 | DA:152,5 156 | DA:154,3 157 | DA:157,3 158 | DA:161,15 159 | DA:185,5 160 | DA:186,3 161 | DA:187,3 162 | DA:188,3 163 | DA:190,3 164 | DA:191,3 165 | DA:193,3 166 | DA:194,15 167 | DA:195,3 168 | DA:196,3 169 | DA:197,3 170 | DA:200,12 171 | DA:201,4 172 | DA:203,8 173 | DA:208,3 174 | DA:209,1 175 | DA:210,2 176 | DA:211,1 177 | DA:214,1 178 | DA:224,5 179 | DA:225,7 180 | DA:233,5 181 | DA:234,6 182 | DA:236,6 183 | DA:238,1 184 | DA:239,1 185 | DA:242,5 186 | LF:67 187 | LH:67 188 | BRDA:40,0,0,1 189 | BRDA:99,1,0,1 190 | BRDA:99,1,1,1 191 | BRDA:99,1,2,1 192 | BRDA:99,1,3,1 193 | BRDA:99,1,4,1 194 | BRDA:99,1,5,1 195 | BRDA:99,1,6,1 196 | BRDA:99,1,7,1 197 | BRDA:99,1,8,1 198 | BRDA:99,1,9,1 199 | BRDA:99,1,10,1 200 | BRDA:194,2,0,3 201 | BRDA:194,2,1,12 202 | BRDA:200,3,0,4 203 | BRDA:200,3,1,8 204 | BRDA:208,4,0,1 205 | BRDA:208,4,1,2 206 | BRDA:210,5,0,1 207 | BRDA:210,5,1,1 208 | BRDA:233,6,0,0 209 | BRDA:236,7,0,1 210 | BRDA:236,7,1,5 211 | BRF:23 212 | BRH:22 213 | end_of_record 214 | -------------------------------------------------------------------------------- /dist/project/vue2/index.js: -------------------------------------------------------------------------------- 1 | const provideKey="$urvl";var componentInject={inject:[provideKey],mounted(){const o=this[provideKey].$refs;Object.keys(o).forEach(e=>{o[e].$v=void 0===o[e].$vm?o[e]:o[e].$vm})}};const s=Date.now();var pageProvide={provide(){return{[provideKey]:this[s]}},data(){return{[s]:{$refs:this.$refs}}}};export{componentInject as ComponentInjectMixin,pageProvide as PageProvideMixin}; 2 | -------------------------------------------------------------------------------- /dist/project/vue3/index.d.ts: -------------------------------------------------------------------------------- 1 | export * from './provide/pageProvide'; 2 | export * from './inject/componentInject'; 3 | -------------------------------------------------------------------------------- /dist/project/vue3/index.js: -------------------------------------------------------------------------------- 1 | import{provide,inject}from"vue";const provideKey="$urvl";var pageProvide=function(o){var n={};Object.keys(o).forEach(function(e){n[e]=function(){return o[e].value}}),provide(provideKey,n)},componentInject=function(){return inject(provideKey)};export{componentInject,pageProvide}; 2 | -------------------------------------------------------------------------------- /dist/project/vue3/inject/componentInject.d.ts: -------------------------------------------------------------------------------- 1 | declare type ComponentInjectRes = { 2 | [K in keyof T]: () => T[K]; 3 | }; 4 | export declare const componentInject: () => ComponentInjectRes; 5 | export {}; 6 | -------------------------------------------------------------------------------- /dist/project/vue3/provide/pageProvide.d.ts: -------------------------------------------------------------------------------- 1 | import { Ref } from 'vue'; 2 | interface Opts { 3 | [key: string]: Ref; 4 | } 5 | export declare const pageProvide: (opts: Opts) => void; 6 | export {}; 7 | -------------------------------------------------------------------------------- /docs/.vuepress/clientAppEnhance.ts: -------------------------------------------------------------------------------- 1 | import { defineClientAppEnhance } from '@vuepress/client'; 2 | import Modal from '../components/modal.vue'; 3 | import Footer from '../components/footer.vue'; 4 | 5 | export default defineClientAppEnhance(({ app, router, siteData }) => { 6 | app.component('Modal', Modal); 7 | app.component('Footer', Footer); 8 | }); 9 | -------------------------------------------------------------------------------- /docs/.vuepress/config.ts: -------------------------------------------------------------------------------- 1 | import { defineUserConfig } from 'vuepress'; 2 | import type { DefaultThemeOptions } from 'vuepress'; 3 | import type { ViteBundlerOptions } from '@vuepress/bundler-vite'; 4 | import path from 'path'; 5 | import LinksData from './data/links'; 6 | import { version, name } from '../../package.json'; 7 | 8 | export default defineUserConfig({ 9 | // 站点配置 10 | lang: 'en-US', 11 | title: name + ' v' + version, 12 | description: 'Just playing around', 13 | base: '/uniapp-router-view-loader/', 14 | 15 | bundlerConfig: { 16 | viteOptions: { 17 | // base: './' 18 | plugins: [] 19 | } 20 | }, 21 | 22 | plugins: [ 23 | // ['vuepress-plugin-vuepress2.x-code-copy', true] 24 | // ['vuepress-plugin-copy-code2yarn dev', {}], 25 | [ 26 | '@vuepress/plugin-search', 27 | { 28 | locales: { 29 | '/': { 30 | placeholder: '搜索' 31 | } 32 | } 33 | } 34 | ] 35 | ], 36 | 37 | markdown: { 38 | extractHeaders: { 39 | level: [2, 3, 4] 40 | } 41 | }, 42 | 43 | // theme: 'vuepress-theme-quicksand', 44 | theme: path.resolve(__dirname, './theme'), 45 | 46 | themeConfig: { 47 | contributors: false, 48 | // logo: '/images/logo.png', 49 | navbar: [ 50 | { text: '首页', link: '/' }, 51 | { text: '配置', link: '/md/configure' }, 52 | { text: '插件市场', link: 'https://ext.dcloud.net.cn/plugin?id=7523' }, 53 | // { text: 'Gitee', link: '' }, 54 | { 55 | text: 'Github', 56 | link: 'https://github.com/2460392754/uniapp-router-view-loader' 57 | }, 58 | { 59 | text: '友情链接', 60 | children: LinksData 61 | } 62 | ], 63 | 64 | sidebarDepth: 4, 65 | sidebar: [ 66 | '/md/introduce', 67 | '/md/install', 68 | '/md/configure', 69 | '/md/use', 70 | '/md/precautions', 71 | '/md/changelog', 72 | '/md/followUpPlan', 73 | '/md/aboutMe' 74 | 75 | // { 76 | // text: '实现原理', 77 | // children: [] 78 | // } 79 | ] 80 | } 81 | }); 82 | -------------------------------------------------------------------------------- /docs/.vuepress/data/links.ts: -------------------------------------------------------------------------------- 1 | import type { NavbarGroup, NavbarItem } from '@vuepress/theme-default/lib/shared/nav'; 2 | 3 | const LinkDatas: (NavbarGroup | NavbarItem | string)[] = [ 4 | { 5 | text: 'uview ui', 6 | link: 'https://www.uviewui.com/' 7 | } 8 | ]; 9 | 10 | export default LinkDatas; 11 | -------------------------------------------------------------------------------- /docs/.vuepress/public/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2460392754/uniapp-router-view-loader/aeff206c59c32c801a1d48365da28000d21ac634/docs/.vuepress/public/images/logo.png -------------------------------------------------------------------------------- /docs/.vuepress/styles/index.scss: -------------------------------------------------------------------------------- 1 | :root { 2 | --content-width: 1000px; 3 | --homepage-width: 1050px; 4 | } 5 | 6 | // * { 7 | // margin: 0; 8 | // padding: 0; 9 | // } 10 | .page { 11 | transform: none !important; 12 | } 13 | 14 | .theme-container .navbar .logo { 15 | border-radius: 0 !important; 16 | } 17 | -------------------------------------------------------------------------------- /docs/.vuepress/theme/index.ts: -------------------------------------------------------------------------------- 1 | import path from 'path'; 2 | 3 | export default { 4 | name: 'vuepress-theme-my-custom-local', 5 | extends: 'vuepress-theme-quicksand', 6 | layouts: { 7 | Layout: path.resolve(__dirname, 'layouts/Layout.vue') 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /docs/.vuepress/theme/layouts/Layout.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 24 | 25 | 40 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: Layout 3 | home: true 4 | heroImage: /images/logo.png 5 | heroText: uniapp-router-view-loader 6 | tagline: 让你拥有的代码拥有 "路由模板"、"虚拟标签" 7 | actions: 8 | - text: 快速上手 9 | link: /md/introduce 10 | type: primary 11 | # - text: 查看原理 12 | # link: /reference/config.html#theme 13 | # type: secondary 14 | features: 15 | - title: 简洁至上 16 | details: 极简的配置,极致的享受 17 | - title: 奇思妙想 18 | details: 实现官方未实现的功能 19 | - title: 全面兼容 20 | details: 无需关心,专注开发 21 | - title: 微入侵 22 | details: 高内聚,低耦合 23 | - title: 低成本 24 | details: 类模版功能 25 | - title: 高效率 26 | details: 几行代码就可实现理想功能 27 | --- 28 | 29 | 30 | 31 | 32 | 33 |