Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

处理不同操作系统运行工程的问题 #658

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
node_modules/.bin/commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged --allow-empty $1
node_modules/.bin/lint-staged --allow-empty $1
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@
"src/uni_modules/wot-design-uni/locale",
"src/uni_modules/wot-design-uni/locale/lang"
],
"common-intellisense.ui": []
"common-intellisense.ui": [],
"files.eol": "\n"
}
9 changes: 5 additions & 4 deletions docs/.vitepress/theme/components/frame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@
<script setup lang="ts">
import { useRoute, useData } from 'vitepress'
import { computed, onMounted, ref, watch } from 'vue'
const baseUrl =
process.env.NODE_ENV === 'production' ? `${location.origin}/demo/?timestamp=${new Date().getTime()}#/` : 'http://localhost:5173/demo/#/'
const baseUrl = ref('http://localhost:5173/demo/#/')

const route = useRoute()
const href = computed(() => {
const path = route.path
const paths = path ? path.split('.')[0].split('/') : []
let href = ''
if (paths.length) {
href = baseUrl + `pages/${kebabToCamel(paths[paths.length - 1])}/Index`
href = baseUrl.value + `pages/${kebabToCamel(paths[paths.length - 1])}/Index`
} else {
href = baseUrl
href = baseUrl.value
}
return href
})
Expand All @@ -26,6 +25,8 @@ const iframe = ref<HTMLIFrameElement | null>(null)
const vitepressData = useData()

onMounted(() => {
baseUrl.value =
process.env.NODE_ENV === 'production' ? `${location.origin}/demo/?timestamp=${new Date().getTime()}#/` : 'http://localhost:5173/demo/#/'
iframe.value &&
iframe.value.addEventListener('load', () => {
// 在iframe加载完成后执行发送消息的操作
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ import { type CSSProperties, computed, reactive, ref } from 'vue'
import { addUnit, debounce, isDef, isObj, objToStyle, uuid } from '../common/util'
import type { SortDirection, TableColumn, TableColumnInstance, TableColumnProps } from '../wd-table-col/types'
import { TABLE_KEY, tableProps, type TableProvide } from './types'
import WdTableCol from '../wd-table-col/wd-table-col.vue'
import { useTranslate } from '../composables/useTranslate'
import { useChildren } from '../composables/useChildren'

Expand Down