Skip to content

Commit b92b0d7

Browse files
committed
更新 App.vue 组件,移除版本号前的额外 'v' 前缀;将版本号定义为全局变量 __APP_VERSION__。
-------------------------------------- [deploy]
1 parent a794891 commit b92b0d7

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/dev/App.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
<div class="header">
66
<div class="title-container">
77
<h1 class="main-title">Vue Expression Editor</h1>
8-
<span class="version-tag">v{{ version }}</span>
8+
<!-- 移除额外的 v 前缀 -->
9+
<span class="version-tag">{{ version }}</span>
910
</div>
1011
<div class="links-container">
1112
<a href="https://www.npmjs.com/package/vue-expression-editor" target="_blank" class="link-item npm-link">
@@ -119,13 +120,13 @@
119120
</template>
120121

121122
<script setup lang="ts">
123+
declare const __APP_VERSION__: string
124+
const version = __APP_VERSION__
122125
import { ref, computed } from 'vue'
123126
import ExpressionEditor from '../components/ExpressionEditor.vue'
124127
import { ElMessage } from 'element-plus'
125128
import { Platform, Box, Delete, Plus } from '@element-plus/icons-vue'
126129
127-
const version = (window as any).__APP_VERSION__ || 'dev'
128-
129130
const expressionEditorRef = ref<InstanceType<typeof ExpressionEditor> | null>(null)
130131
const testExpression = ref('')
131132
const originalExpression = ref('')

0 commit comments

Comments
 (0)