Skip to content

Commit

Permalink
fixbug: 修复3.2.11版本语法问题,element-push1.1.0版本导航栏组件问题
Browse files Browse the repository at this point in the history
  • Loading branch information
jsxiaosi committed Sep 20, 2021
1 parent 22b9b90 commit 99a4972
Show file tree
Hide file tree
Showing 19 changed files with 103 additions and 120 deletions.
12 changes: 11 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
module.exports = {
root: true,
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
withDefaults: 'readonly',
},
env: {
browser: true,
commonjs: true,
es6: true,
node: true,
},
extends: ['standard', 'plugin:vue/essential', 'plugin:prettier/recommended'],
extends: [
'standard',
'plugin:vue/vue3-recommended',
'plugin:prettier/recommended',
],
parserOptions: {
ecmaVersion: 2016,
// 对Babel解析器的包装使其与 ESLint 兼容。
Expand Down
134 changes: 51 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite+vue3 Template",
"version": "0.1.0",
"version": "1.1.0",
"author": {
"name": "小斯斯",
"email": "[email protected]",
Expand Down Expand Up @@ -45,7 +45,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-vue": "^7.11.1",
"eslint-plugin-vue": "^7.18.0",
"http-server": "^0.12.3",
"husky": "^6.0.0",
"lint-staged": "^11.0.0",
Expand Down
9 changes: 6 additions & 3 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@
</template>

<script setup>
import { defineProps, reactive } from 'vue'
import { reactive } from 'vue'
defineProps({
msg: String,
msg: {
type: String,
default: '',
},
})
const state = reactive({ count: 0 })
</script>

<style lang="scss" scoped>
a {
color: #42b983;
color: #42b983;
}
</style>
2 changes: 1 addition & 1 deletion src/components/SvgIcon/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</template>

<script setup>
import { computed, defineProps, ref } from 'vue'
import { computed, ref } from 'vue'
const props = defineProps({
// route object
Expand Down
1 change: 1 addition & 0 deletions src/layouts/components/AppMain/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<script setup>
import { computed } from 'vue'
import { useRoute } from 'vue-router'
console.log(useRoute)
const route = computed(() => {
const route = useRoute()
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/Breadcrumb/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="no-redirect"
>{{ item.meta.title }}</span
>
<a class="redirect" v-else @click.prevent="handleLink(item)">{{
<a v-else class="redirect" @click.prevent="handleLink(item)">{{
item.meta.title
}}</a>
</el-breadcrumb-item>
Expand Down
2 changes: 0 additions & 2 deletions src/layouts/components/Sidebar/Item.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
</template>

<script setup>
import { defineProps } from 'vue'
defineProps({
icon: {
type: String,
Expand Down
3 changes: 2 additions & 1 deletion src/layouts/components/Sidebar/Link.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<script setup>
import { isExternal as isExt } from '@/utils/validate'
import { computed, defineProps } from 'vue'
import { computed } from 'vue'
const props = defineProps({
to: {
Expand All @@ -26,6 +26,7 @@ const type = computed(() => {
})
const linkProps = (to) => {
console.log('点击', to)
if (isExternal.value) {
return {
href: to,
Expand Down
Loading

0 comments on commit 99a4972

Please sign in to comment.