|
72 | 72 | <input type="checkbox" id="stable" v-model="shouldStable">
|
73 | 73 | </div>
|
74 | 74 | <div>
|
75 |
| - <label for="version">version: </label> |
76 |
| - <select name="version" id="version" v-model="version"> |
| 75 | + <label for="viewVersion">version: </label> |
| 76 | + <select name="viewVersion" id="viewVersion" v-model="viewVersion"> |
77 | 77 | <option v-for="option in versionOptions" v-bind:value="option">
|
78 | 78 | {{ option }}
|
79 | 79 | </option>
|
|
107 | 107 | configurationDescriptions: [],
|
108 | 108 | searchCondition: searchTerm,
|
109 | 109 | shouldStable: false,
|
110 |
| - version: versionNumber, |
111 |
| - oldVersion: undefined, |
| 110 | + viewVersion: versionNumber, |
| 111 | + oldViewVersion: undefined, |
112 | 112 | versionOptions: ['master'],
|
113 | 113 | scrolledOnce: false,
|
114 | 114 | },
|
|
122 | 122 | return;
|
123 | 123 | }
|
124 | 124 | if (versionParam == null) {
|
125 |
| - this.version = latest.name; |
| 125 | + this.viewVersion = latest.name; |
126 | 126 | }
|
127 | 127 | },
|
128 | 128 | async outputHtml() {
|
129 |
| - if (this.version !== this.oldVersion) { |
| 129 | + if (this.viewVersion !== this.oldViewVersion) { |
130 | 130 | const ConfigurationMdUrl =
|
131 |
| - `https://raw.githubusercontent.com/rust-lang/rustfmt/${this.version}/Configurations.md`; |
| 131 | + `https://raw.githubusercontent.com/rust-lang/rustfmt/${this.viewVersion}/Configurations.md`; |
132 | 132 | let res;
|
133 | 133 | try {
|
134 | 134 | res = await axios.get(ConfigurationMdUrl).catch(e => { throw e });
|
|
144 | 144 | this.aboutHtml = marked.parser(about);
|
145 | 145 | this.configurationAboutHtml = marked.parser(configurationAbout);
|
146 | 146 | this.configurationDescriptions = configurationDescriptions;
|
147 |
| - this.oldVersion = this.version; |
| 147 | + this.oldViewVersion = this.viewVersion; |
148 | 148 | }
|
149 | 149 |
|
150 | 150 | const ast = this.configurationDescriptions
|
|
162 | 162 | }, []);
|
163 | 163 | ast.links = {};
|
164 | 164 |
|
165 |
| - queryParams.set('version', this.version); |
| 165 | + queryParams.set('version', this.viewVersion); |
166 | 166 | queryParams.set('search', this.searchCondition);
|
167 | 167 | const curUrl = window.location.pathname +
|
168 | 168 | '?' + queryParams.toString() + window.location.hash;
|
|
0 commit comments