Skip to content

Commit 165096f

Browse files
authored
Merge pull request #13 from mpvue/develop
Develop
2 parents 859b093 + b32ccf4 commit 165096f

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

template/.postcssrc.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
module.exports = {
44
"plugins": {
5-
// to edit target browsers: use "browserslist" field in package.json
6-
"autoprefixer": {},
75
"postcss-mpvue-wxss": {}
86
}
97
}

template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"vuex": "^2.3.1"{{/vuex}}
1919
},
2020
"devDependencies": {
21-
"mpvue-loader": "^1.0.6",
21+
"mpvue-loader": "^1.0.7",
2222
"mpvue-webpack-target": "^1.0.0",
2323
"mpvue-template-compiler": "^1.0.5",
2424
"postcss-mpvue-wxss": "^1.0.0",

template/src/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ app.$mount(){{#if_eq lintConfig "airbnb"}};{{/if_eq}}
1414
export default {
1515
// 这个字段走 app.json
1616
config: {
17-
pages: ['pages/logs/logs', '^pages/index/index'], // 页面前带有 ^ 符号的,会被编译成首页,其他页面可以选填,我们会自动把 webpack entry 里面的入口页面加进去
17+
// 页面前带有 ^ 符号的,会被编译成首页,其他页面可以选填,我们会自动把 webpack entry 里面的入口页面加进去
18+
pages: ['pages/logs/logs', '^pages/index/index'],
1819
window: {
1920
backgroundTextStyle: 'light',
2021
navigationBarBackgroundColor: '#fff',

template/src/pages/index/index.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
<input type="text" class="form-control" v-model="motto" placeholder="v-model" />
1919
<input type="text" class="form-control" v-model.lazy="motto" placeholder="v-model.lazy" />
2020
</form>
21-
21+
{{#if vuex}}
22+
<a href="/pages/counter/counter" class="counter">去往Vuex示例页面</a>
23+
{{/if}}
2224
</div>
2325
</template>
2426

@@ -94,4 +96,14 @@ export default {
9496
margin-bottom: 5px;
9597
border: 1px solid #ccc;
9698
}
99+
100+
{{#if vuex}}
101+
.counter {
102+
display: inline-block;
103+
margin: 10px auto;
104+
padding: 5px 10px;
105+
color: blue;
106+
border: 1px solid blue;
107+
}
108+
{{/if}}
97109
</style>

0 commit comments

Comments
 (0)