Skip to content

Commit

Permalink
chore: Upgrade dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangmo8 committed Jun 13, 2024
1 parent 0440f50 commit 6e87eb7
Show file tree
Hide file tree
Showing 71 changed files with 7,994 additions and 6,650 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineNuxtConfig({
varlet: {
modulePath: '...',
exclude: ['...'],
icon: {...}
icon: {}
}
})
```
Expand Down
4 changes: 0 additions & 4 deletions eslint.config.js

This file was deleted.

11 changes: 11 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// eslint.config.js
import antfu from '@antfu/eslint-config'

export default antfu({
ignores: [
'**/fixtures',
'**/node_modules',
'**/dist',
'**/.nuxt',
],
})
37 changes: 19 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@varlet/nuxt",
"type": "module",
"version": "0.1.3",
"packageManager": "pnpm@7.22.0",
"description": "varlet module for nuxt",
"license": "MIT",
"repository": {
Expand All @@ -27,39 +26,41 @@
"dist"
],
"scripts": {
"prepack": "nuxt-module-build",
"preinstall": "npx only-allow pnpm",
"prepack": "nuxt-module-build build",
"clear": "rm -rf ./playground/node_modules/.cache && rm -rf ./playground/.nuxt",
"dev": "nuxi dev playground",
"dev:build": "nuxi build playground",
"dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
"build": "npm run dev:prepare && nuxt-module-build",
"build": "npm run dev:prepare && nuxt-module-build build",
"gen": "npx changelogen --release",
"release:beta": "npm run build && npm publish --beta",
"release": "npm run build && npx changelogen --release && npm publish && git push --follow-tags",
"lint": "eslint . --fix"
},
"peerDependencies": {
"@varlet/ui": "latest"
},
"dependencies": {
"@nuxt/kit": "^3.11.2",
"@varlet/ui": "latest",
"@varlet/unplugin-icon-builder": "^0.2.26",
"@nuxt/kit": "^3.12.1",
"@varlet/ui": "^3.2.15-alpha.1718198850293",
"@varlet/unplugin-icon-builder": "^0.2.27",
"knitwork": "^1.1.0",
"magic-string": "^0.29.0",
"magic-string": "^0.30.10",
"unplugin": "^1.10.1"
},
"devDependencies": {
"@antfu/eslint-config": "^2.18.1",
"@nuxt/eslint-config": "^0.1.1",
"@nuxt/module-builder": "^0.2.1",
"@nuxt/schema": "^3.11.2",
"@antfu/eslint-config": "^2.21.1",
"@nuxt/eslint-config": "^0.3.13",
"@nuxt/module-builder": "^0.7.1",
"@nuxt/schema": "^3.12.1",
"@nuxtjs/eslint-config-typescript": "^12.1.0",
"@types/node": "^18.19.33",
"eslint": "^8.57.0",
"husky": "^8.0.3",
"lint-staged": "^13.3.0",
"nuxt": "^3.11.2",
"typescript": "^4.9.5"
"@types/node": "^20.14.2",
"eslint": "^9.4.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.6",
"nuxt": "^3.12.1",
"typescript": "^5.4.5"
},
"husky": {
"hooks": {
Expand All @@ -80,4 +81,4 @@
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}
}
12 changes: 11 additions & 1 deletion playground/app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<script setup lang="ts">
import { locale, messages } from './store'
onMounted(() => {
Locale.add('en-US', Locale.enUS)
})
</script>

<template>
<nuxt-layout>
<nuxt-page />
<var-locale-provider :locale="locale" :messages="messages">
<nuxt-page />
</var-locale-provider>
</nuxt-layout>
</template>
13 changes: 11 additions & 2 deletions playground/layouts/default.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
<script lang="ts" setup>
import { switchLocale } from '../store'
const route = useRoute()
</script>

<template>
<var-app-bar class="bar" :title="String(route.name) || ''">
<template #left>
<var-button @click="$router.back()" color="transparent" text-color="#fff" round text>
<var-button color="transparent" text-color="#fff" round text @click="$router.back()">
<var-icon name="chevron-left" :size="24" />
</var-button>
</template>

<template #right>
<var-button size="small" text @click="switchLocale">
<var-icon text-6 name="translate" />
<var-icon text-6 name="chevron-down" />
</var-button>
</template>
</var-app-bar>
<slot />
</template>
Expand All @@ -17,4 +26,4 @@ const route = useRoute()
.bar {
margin-bottom: 18px;
}
</style>
</style>
8 changes: 4 additions & 4 deletions playground/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import path from 'node:path'
import { resolve } from 'node:path'
import { defineNuxtConfig } from 'nuxt/config'
import varlet from '..'
import varletModules from '..'

const svgIconsDir = path.resolve(__dirname, './assets/svg-icons')
const svgIconsDir = resolve(__dirname, './assets/svg-icons')

export default defineNuxtConfig({
modules: [varlet],
modules: [varletModules],
varlet: {
icon: {
dir: svgIconsDir,
Expand Down
14 changes: 9 additions & 5 deletions playground/pages/component/app-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ const active = ref(0)
</script>

<template>
<var-app-bar round image="https://varlet.gitee.io/varlet-ui/tree.jpeg"
image-linear-gradient="to right top, rgba(29, 68, 147, 0.5) 0%, rgba(74, 198, 170, 0.9) 100%">
<var-app-bar
round image="https://varlet.gitee.io/varlet-ui/tree.jpeg"
image-linear-gradient="to right top, rgba(29, 68, 147, 0.5) 0%, rgba(74, 198, 170, 0.9) 100%"
>
标题
<template #left>
<var-button round text color="transparent" text-color="#fff">
Expand All @@ -27,12 +29,14 @@ const active = ref(0)
</template>

<template #content>
<var-tabs style="margin-top: 100px" color="transparent" active-color="#fff" inactive-color="#ddd"
v-model:active="active">
<var-tabs
v-model:active="active" style="margin-top: 100px" color="transparent" active-color="#fff"
inactive-color="#ddd"
>
<var-tab>选项卡</var-tab>
<var-tab>选项卡</var-tab>
<var-tab>选项卡</var-tab>
</var-tabs>
</template>
</var-app-bar>
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/avatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
<var-avatar src="https://varlet.gitee.io/varlet-ui/cat.jpg" size="large" />
<var-avatar src="https://varlet.gitee.io/varlet-ui/cat.jpg" :size="78" />
</var-space>
</template>
</template>
6 changes: 4 additions & 2 deletions playground/pages/component/back-top.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ const lists = [...Array(100).keys()]

<template>
<div>
<var-cell v-for="list in lists" :key="list">Scroll to bottom {{ list }}</var-cell>
<var-cell v-for="list in lists" :key="list">
Scroll to bottom {{ list }}
</var-cell>
<var-back-top :duration="300" />
</div>
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/badge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
<var-chip>左下</var-chip>
</var-badge>
</var-space>
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/bottom-navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ const active = ref(0)
<var-bottom-navigation-item label="标签" icon="heart" />
<var-bottom-navigation-item label="标签" icon="account-circle" />
</var-bottom-navigation>
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/breadcrumbs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
<var-breadcrumb>二级</var-breadcrumb>
<var-breadcrumb>三级</var-breadcrumb>
</var-breadcrumbs>
</template>
</template>
29 changes: 22 additions & 7 deletions playground/pages/component/button.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
<script setup lang="ts">
function onChange() {
Locale.use('en-US')
}
</script>
<template>
<var-space :size="[10, 10]">
<var-button>默认按钮</var-button>
<var-button type="primary">主要按钮</var-button>
<var-button type="info">信息按钮</var-button>
<var-button type="success">成功按钮</var-button>
<var-button type="warning">警告按钮</var-button>
<var-button type="danger">危险按钮</var-button>
<var-button @click="onChange">默认按钮</var-button>
<var-button type="primary">
主要按钮
</var-button>
<var-button type="info">
信息按钮
</var-button>
<var-button type="success">
成功按钮
</var-button>
<var-button type="warning">
警告按钮
</var-button>
<var-button type="danger">
危险按钮
</var-button>
</var-space>
</template>
</template>
8 changes: 5 additions & 3 deletions playground/pages/component/card.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<template>
<var-card title="本草纲目" subtitle="我表情悠哉 跳个大概"
<var-card
title="本草纲目" subtitle="我表情悠哉 跳个大概"
description="如果华佗再世,崇洋都被医治,外邦来学汉字,激发我民族意识。马钱子、决明子、苍耳子,还有莲子;黄药子、苦豆子、川楝子,我要面子。用我的方式,改写一部历史。没什么别的事,跟着我念几个字。山药当归枸杞 GO,山药 当归 枸杞 GO,看我抓一把中药,服下一帖骄傲~"
src="https://varlet.gitee.io/varlet-ui/cat.jpg" />
</template>
src="https://varlet.gitee.io/varlet-ui/cat.jpg"
/>
</template>
10 changes: 7 additions & 3 deletions playground/pages/component/checkbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ const value = ref([])

<template>
<var-checkbox-group ref="group" v-model="value">
<var-checkbox :checked-value="0">吃饭</var-checkbox>
<var-checkbox :checked-value="1">睡觉</var-checkbox>
<var-checkbox :checked-value="0">
吃饭
</var-checkbox>
<var-checkbox :checked-value="1">
睡觉
</var-checkbox>
</var-checkbox-group>
<var-space :size="[0, 10]">
<var-button type="primary" @click="$refs.group.checkAll()">
Expand All @@ -18,4 +22,4 @@ const value = ref([])
</var-button>
</var-space>
<div>当前的值: {{ value }}</div>
</template>
</template>
22 changes: 16 additions & 6 deletions playground/pages/component/chip.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
<template>
<var-space>
<var-chip>默认纸片</var-chip>
<var-chip type="primary">主要纸片</var-chip>
<var-chip type="success">成功纸片</var-chip>
<var-chip type="danger">危险纸片</var-chip>
<var-chip type="warning">警告纸片</var-chip>
<var-chip type="info">信息纸片</var-chip>
<var-chip type="primary">
主要纸片
</var-chip>
<var-chip type="success">
成功纸片
</var-chip>
<var-chip type="danger">
危险纸片
</var-chip>
<var-chip type="warning">
警告纸片
</var-chip>
<var-chip type="info">
信息纸片
</var-chip>
</var-space>
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/collapse-transition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ const expand = ref(false)
不要温和地走进那良夜,老年应当在日暮时燃烧咆哮;怒斥,怒斥光明的消逝。虽然智慧的人临终时懂得黑暗有理,因为他们的话没有迸发出闪电,他们 也并不温和地走进那个良夜。善良的人,当最后一浪过去,高呼他们脆弱的善行
可能曾会多么光辉地在绿色的海湾里舞蹈,怒斥,怒斥光明的消逝。
</var-collapse-transition>
</template>
</template>
10 changes: 7 additions & 3 deletions playground/pages/component/collapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const value = ref(['1'])

<template>
<var-collapse v-model="value">
<var-collapse-item title="标题" name="1">文本</var-collapse-item>
<var-collapse-item title="标题" name="2">文本</var-collapse-item>
<var-collapse-item title="标题" name="1">
文本
</var-collapse-item>
<var-collapse-item title="标题" name="2">
文本
</var-collapse-item>
</var-collapse>
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/countdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const time = ref(30 * 60 * 60 * 1000)

<template>
<var-countdown :time="time" format="HH:mm:ss:SS" />
</template>
</template>
2 changes: 1 addition & 1 deletion playground/pages/component/counter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ const value = ref(0)

<template>
<var-counter v-model="value" />
</template>
</template>
6 changes: 2 additions & 4 deletions playground/pages/component/date-picker.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<script setup>
import { ref } from 'vue'
<script setup lang="ts">
const date = ref('2021-04-08')
</script>

<template>
<var-date-picker v-model="date" />
</template>
</template>
3 changes: 3 additions & 0 deletions playground/pages/component/dialog.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<script setup lang="ts">
</script>

<template>
<var-button type="primary" block @click="Dialog('兰亭临帖 行书如行云流水')">
基本使用
Expand Down
Loading

0 comments on commit 6e87eb7

Please sign in to comment.