Skip to content

Commit

Permalink
插件配置
Browse files Browse the repository at this point in the history
  • Loading branch information
CoderMikeHe committed Apr 15, 2019
1 parent ec61475 commit d022d0e
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 69 deletions.
33 changes: 27 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,34 @@ module.exports = {
env: {
node: true
},
extends: ["plugin:vue/essential", "@vue/prettier"],
extends: ['plugin:vue/essential', '@vue/prettier'],
rules: {
"no-console": process.env.NODE_ENV === "production" ? "error" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "error" : "off",
"indent": [1, 2]
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
indent: [1, 2]
},
parserOptions: {
parser: "babel-eslint"
parser: 'babel-eslint'
}
};
}

// https://segmentfault.com/q/1010000011675886/a-1020000011676399
// https://juejin.im/post/5c36af60f265da61682b91dd
// https://blog.csdn.net/qq_40128375/article/details/84781282
// https://blog.csdn.net/weixin_37580235/article/details/82021921
// https://segmentfault.com/a/1190000015315545
// https://www.jianshu.com/p/f35a7e97356a
// https://blog.csdn.net/weixin_36222137/article/details/80040758
// https://segmentfault.com/a/1190000015315545
// http://web.jobbole.com/94786/
// [ESLint配置详解](https://blog.csdn.net/mafan121/article/details/77965252)
// https://blog.csdn.net/FavoriteStudent/article/details/82218157

// https://www.jianshu.com/p/24e6054405c3?utm_campaign
// https://www.jianshu.com/p/7fdcb29080da

// https://prettier.io/docs/en/integrating-with-linters.html

// https://blog.csdn.net/shenxianhui1995/article/details/81604818

// VSCode配置 Debugger for Chrome插件 https://www.jianshu.com/p/66033d4949bf
54 changes: 1 addition & 53 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,56 +115,4 @@ new Vue({
// - [Mac上解决Chrome浏览器跨域问题](https://www.jianshu.com/p/2db73311fcbe)

/// --------🔥 Third Lib 🔥-------------
// - [vue-lazyload)](https://github.com/hilongjw/vue-lazyload)

{
"explorer.confirmDragAndDrop": false,
"workbench.sideBar.location": "left",
"workbench.editor.showTabs": false,
"editor.fontSize": 18,
"explorer.confirmDelete": false,
"editor.tabSize": 2,
"window.restoreWindows": "all",
"editor.formatOnSave": true,
"css.fileExtensions": ["css", "scss"],
"editor.quickSuggestions": {
"other": true,
"comments": true,
"strings": true
},
"diffEditor.ignoreTrimWhitespace": true,
"files.autoSave": "off",
"workbench.iconTheme": "vscode-icons",

"prettier.singleQuote": true,
"prettier.semi": false,
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"eslint.autoFixOnSave": true,
"eslint.validate": [
{
"language": "vue",
"autoFix": true
},
{
"language": "html",
"autoFix": true
},
{
"language": "javascript",
"autoFix": true
},
{
"language": "javascriptreact",
"autoFix": true
},
{
"language": "typescript",
"autoFix": true
},
{
"language": "typescriptreact",
"autoFix": true
}
]
}
// - [vue-lazyload)](https://github.com/hilongjw/vue-lazyload)
24 changes: 23 additions & 1 deletion src/views/About.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
<template>
<div class="about">
<h1>This is an about page</h1>
<h1 class="kkk">This is an about page</h1>
</div>
</template>

<script>
export default {
data() {
return {
reg: ""
};
}
};
</script>

<style scoped>
.kkk {
color: aqua;
}
.abc {
font-size: 16px;
}
.knm {
color: red;
}
</style>
34 changes: 25 additions & 9 deletions src/views/discover/Moments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,28 @@
<!-- 头部 -->
<div class="mh-moment__hd">
<!-- 头像 -->
<img :src="moment.user.profile_image_url" alt>
<img :src="moment.user.profile_image_url" alt />
</div>
<!-- 身体 -->
<div class="mh-moment__bd">
<div class="mh-moment__name">
<span class="mh-moment--tap-highlight">{{ moment.user.screen_name }}</span>
<span class="mh-moment--tap-highlight">{{
moment.user.screen_name
}}</span>
</div>
<p
class="mh-moment__content"
:class="moment.unfold ? 'unfold' : 'fold'"
ref="content"
>{{ moment.text }}</p>
>
{{ moment.text }}
</p>
<p class="mh-moment__expand" v-if="moment.showUnfold">
<span
class="mh-moment--tap-highlight"
@click="moment.unfold = !moment.unfold"
>{{ moment.unfold ? '收起' : '全文' }}</span>
>{{ moment.unfold ? "收起" : "全文" }}</span
>
</p>
<!-- 图片九宫格 -->
<div class="mh-moment__pictures" :style="moment.picsWrapperStyle">
Expand All @@ -48,9 +53,16 @@
<div class="mh-moment__more-wrapper">
<p class="mh-moment__time">{{ moment.created_at | dateFormat }}</p>
<transition name="fade">
<MomentOperationMore class="more-wrapper__operation" v-if="moment.showCmt"></MomentOperationMore>
<MomentOperationMore
class="more-wrapper__operation"
v-if="moment.showCmt"
></MomentOperationMore>
</transition>
<div class="mh-moment__more" @click.stop="moreAction(moment)" @touchstart.stop></div>
<div
class="mh-moment__more"
@click.stop="moreAction(moment)"
@touchstart.stop
></div>
</div>

<!-- 点赞or评论 -->
Expand All @@ -76,7 +88,11 @@
</div>

<!-- ActionSheet -->
<actionSheet v-model="showActionSheet" @did-click-item="didClickItem" :items="items"></actionSheet>
<actionSheet
v-model="showActionSheet"
@did-click-item="didClickItem"
:items="items"
></actionSheet>
</div>
</div>
</template>
Expand All @@ -88,7 +104,6 @@ import actionSheet, {
} from "components/actionSheet/ActionSheet";
import MHMoments from "../../assets/js/MHMoments.js";
import MomentOperationMore from "./MomentOperationMore";
export default {
Expand All @@ -104,7 +119,8 @@ export default {
expanded: false,
// 当前显示的moment
tempMoment: {}
tempMoment: {},
ets: ""
};
},
created() {
Expand Down
14 changes: 14 additions & 0 deletions src/views/discover/Test.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script>
export default {
data() {
return {
knm: ""
};
},
methods: {
fuck() {
console.log("object");
}
}
};
</script>

0 comments on commit d022d0e

Please sign in to comment.