v1.3.0 #10
@@ -61,6 +61,8 @@ async function onChangeTab(value: string) {
|
|||||||
|
|
||||||
`AppShell` 只负责导航形态与容器尺寸,不接管路由。`v-model` 与 `change` 都只是把点击结果交回业务,跳不跳、跳去哪里由业务决定。
|
`AppShell` 只负责导航形态与容器尺寸,不接管路由。`v-model` 与 `change` 都只是把点击结果交回业务,跳不跳、跳去哪里由业务决定。
|
||||||
|
|
||||||
|
点击未禁用的左侧导航项时,`rail-click` 会传出该项的值,包括已激活的导航项。该事件表示点击,不受 `before-change` 控制;切换是否被允许仍由 `before-change` 和 `change` 决定。
|
||||||
|
|
||||||
## 平板布局
|
## 平板布局
|
||||||
|
|
||||||
`tablet` 默认 `true`——引入 `AppShell` 就意味着要手机和平板两端。真有项目只需要容器能力、暂不响应式,传 `:tablet="false"` 即可退回纯手机布局。
|
`tablet` 默认 `true`——引入 `AppShell` 就意味着要手机和平板两端。真有项目只需要容器能力、暂不响应式,传 `:tablet="false"` 即可退回纯手机布局。
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"module": "./dist/timi-tdesign-mobile.mjs",
|
"module": "./dist/timi-tdesign-mobile.mjs",
|
||||||
"style": "./dist/timi-tdesign-mobile.css",
|
"style": "./dist/timi-tdesign-mobile.css",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "pnpm run -C docs dev",
|
"dev": "pnpm run -C docs dev",
|
||||||
|
|||||||
@@ -90,6 +90,7 @@ const props = withDefaults(defineProps<AppShellProps>(), {
|
|||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
"update:modelValue": [value: AppShellValue];
|
"update:modelValue": [value: AppShellValue];
|
||||||
"change": [value: AppShellValue];
|
"change": [value: AppShellValue];
|
||||||
|
"rail-click": [value: AppShellValue];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
defineSlots<{
|
defineSlots<{
|
||||||
@@ -164,6 +165,7 @@ function onSelect(item: AppShellItem): void {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
emit("rail-click", item.value);
|
||||||
void requestChange(item.value);
|
void requestChange(item.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user