diff --git a/examples/sites/demos/pc/webdoc/develop-demo-en.md b/examples/sites/demos/pc/webdoc/develop-demo-en.md
index dc6bc05fd4..9f389282f3 100644
--- a/examples/sites/demos/pc/webdoc/develop-demo-en.md
+++ b/examples/sites/demos/pc/webdoc/develop-demo-en.md
@@ -43,16 +43,13 @@ npm install @opentiny/vue@3
Then modify the`vite.config.js`, add the following code highlighted section:
```js {8-10}
-//vite.config.js
+// vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
- plugins: [vue()],
- define: {
- 'process.env': { ...process.env }
- }
+ plugins: [vue()]
})
```
diff --git a/examples/sites/demos/pc/webdoc/develop-demo.md b/examples/sites/demos/pc/webdoc/develop-demo.md
index 3b718b489b..72190c5e7d 100644
--- a/examples/sites/demos/pc/webdoc/develop-demo.md
+++ b/examples/sites/demos/pc/webdoc/develop-demo.md
@@ -49,10 +49,7 @@ import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
export default defineConfig({
- plugins: [vue()],
- define: {
- 'process.env': { ...process.env }
- }
+ plugins: [vue()]
})
```
diff --git a/examples/sites/demos/pc/webdoc/installation-en.md b/examples/sites/demos/pc/webdoc/installation-en.md
index 7f7bc3e129..68838ac7b1 100644
--- a/examples/sites/demos/pc/webdoc/installation-en.md
+++ b/examples/sites/demos/pc/webdoc/installation-en.md
@@ -31,7 +31,7 @@ yarn add @opentiny/vue@2
npm install @opentiny/vue@2
```
-If it's`Vite`After the dependency is installed, modify the project.`vite.config.js`, add the following code highlighted section:
+@opentiny/vue
Supports multiple modes. If you are a `Vite` project and not a mobile client, you can modify the `vite.config.js` of the project by adding the highlighted parts of the following code, so that the project can shake off the mobile mode code during construction and optimize the volume of the packaged product:
```js {8-10}
// vite.config.js
@@ -42,15 +42,14 @@ import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
define: {
- 'process.env': { ...process.env }
+ 'process.env': { TINY_MODE: 'pc' }
}
})
```
-
To avoid the uncertainty associated with monthly (minor) upgrades of @opentiny/vue
, it is recommended to use ~ before relying on the version number of the package in package.json
in your project.
-For example, "@opentiny/vue": "~3.12.0
.
-
@opentiny/vue
supports multiple modes. If your project is not a mobile project, you can declare the value of TINY_MODE
in process.env
in the above configuration code. In order to make the project during construction, the mobile side code can be shaken off and the volume of the packaged product can be optimized. For example, 'process.env': {... env,TINY_MODE:'pc'}
.
+
To avoid the uncertainty caused by monthly minor upgrades of@opentiny/vue
, it is recommended to use ~ before the version number of the dependent package in package.json
in your project,
+ For example,"@opentiny/vue": "~3.12.0"
.
## Import through CDN
diff --git a/examples/sites/demos/pc/webdoc/installation.md b/examples/sites/demos/pc/webdoc/installation.md
index 7d1e17761d..e195fb9066 100644
--- a/examples/sites/demos/pc/webdoc/installation.md
+++ b/examples/sites/demos/pc/webdoc/installation.md
@@ -31,7 +31,7 @@ yarn add @opentiny/vue@2
npm install @opentiny/vue@2
```
-如果是`Vite` 工程,安装完依赖后,修改项目的 `vite.config.js` ,添加以下代码突出显示的部分:
+ @opentiny/vue
支持多种模式。如果您是 `Vite` 工程且非移动端,可以修改项目的 `vite.config.js`,添加以下代码突出显示的部分,以使工程在构建时,能将移动端模式的代码摇掉,优化打包产物的体积:
```js {8-10}
// vite.config.js
@@ -42,15 +42,14 @@ import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
define: {
- 'process.env': { ...process.env }
+ 'process.env': { TINY_MODE: 'pc' }
}
})
```
为了避免 @opentiny/vue
的月度版本 (minor) 升级带来的不确定因素,因此推荐在您的工程中的 package.json
中依赖包的版本号前使用 ~,
- 比如 "@opentiny/vue": "~3.12.0
。
-
@opentiny/vue
支持多种模式。如果您的工程非移动端工程,可以在上面配置代码中的process.env
中,声明TINY_MODE
的值,以使工程在构建时,能将移动端模式的代码摇掉,优化打包产物的体积。比如 'process.env': { ...process.env,TINY_MODE:'pc' }
。
+ 比如
"@opentiny/vue": "~3.12.0"
。
## 通过 CDN 方式引入 (v3.16.0 及之前的版本可用)
diff --git a/examples/sites/package.json b/examples/sites/package.json
index f23ac78cb2..2b5abb02dc 100644
--- a/examples/sites/package.json
+++ b/examples/sites/package.json
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-docs",
- "version": "3.21.0",
+ "version": "3.21.4",
"license": "MIT",
"scripts": {
"start": "vite",
diff --git a/examples/sites/src/i18n/en.json b/examples/sites/src/i18n/en.json
index b4e15c681b..5f6a7a3b16 100644
--- a/examples/sites/src/i18n/en.json
+++ b/examples/sites/src/i18n/en.json
@@ -32,6 +32,7 @@
"backTop": "Back To Top",
"overview": "Components Overview",
"overviewDesc": "TinyVue provides a wealth of basic UI components for web applications, and we will continue to explore the best UI practices for enterprise-level applications. Welcome to try TinyVue.",
+ "overviewDescPlus": "TinyVuePlus is a component library for Cloud business scenarios based on TinyVue, following the new design specifications of Cloud CloudDesign and utilizing Vite+Vue3+TypeScript technology stack.",
"searchComponents": "search components",
"apiType": "Components demos code style",
"apiStyleOptions": "Options",
@@ -41,4 +42,4 @@
"demoModeMultiple": "Multiple",
"contributor": "Contributors",
"noData": "No Data"
-}
\ No newline at end of file
+}
diff --git a/examples/sites/src/i18n/zh.json b/examples/sites/src/i18n/zh.json
index 68ed387cce..4ba0cc8da1 100644
--- a/examples/sites/src/i18n/zh.json
+++ b/examples/sites/src/i18n/zh.json
@@ -32,6 +32,7 @@
"backTop": "返回顶部",
"overview": "组件总览",
"overviewDesc": "TinyVue 为 Web 应用提供了丰富的基础 UI 组件,我们还将持续探索企业级应用的最佳 UI 实践,欢迎尝试使用 TinyVue。",
+ "overviewDescPlus": "TinyVuePlus 是一款基于 TinyVue 的面向云业务场景的组件库,遵循 CloudDesign 新设计规范,基于 Vite + Vue3 + TypeScript 技术栈。",
"searchComponents": "搜索组件",
"apiType": "组件示例代码风格",
"apiStyleOptions": "选项式",
@@ -41,4 +42,4 @@
"demoModeMultiple": "多示例",
"contributor": "贡献者",
"noData": "暂无数据"
-}
\ No newline at end of file
+}
diff --git a/examples/sites/src/main.js b/examples/sites/src/main.js
index 9f0672a1b8..6ae29233f6 100644
--- a/examples/sites/src/main.js
+++ b/examples/sites/src/main.js
@@ -41,13 +41,15 @@ hljs.registerLanguage('javascript', javascript)
hljs.registerLanguage('css', css)
hljs.registerLanguage('html', html)
-docsearch({
- appId: 'AGPA5UXHMH',
- apiKey: '5fa09fc20270efa61d68e2c2eb0f56df',
- indexName: 'opentiny',
- container: '.search-box',
- debug: false
-})
+if (!location.href.includes('tiny-vue-plus')) {
+ docsearch({
+ appId: 'AGPA5UXHMH',
+ apiKey: '5fa09fc20270efa61d68e2c2eb0f56df',
+ indexName: 'opentiny',
+ container: '.search-box',
+ debug: false
+ })
+}
if (envTarget !== 'open') {
// 支持本地开发和内网使用全局搜索
diff --git a/examples/sites/src/views/components/components.vue b/examples/sites/src/views/components/components.vue
index d1249adb60..45816ebd09 100644
--- a/examples/sites/src/views/components/components.vue
+++ b/examples/sites/src/views/components/components.vue
@@ -20,7 +20,84 @@
-
+
+
+
+
+
+ {{ oneGroup.name }}
+
+
+ {{ oneGroup.type }}
+
+
+
+
+
+ {{ key }}
+
+
+
+
+
+
+
+
+
+
+
+ {{ row.name }}
+ {{ row.name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/examples/sites/src/views/docs/docs.vue b/examples/sites/src/views/docs/docs.vue
index 738692d029..1796f703c6 100644
--- a/examples/sites/src/views/docs/docs.vue
+++ b/examples/sites/src/views/docs/docs.vue
@@ -1,5 +1,24 @@
+
+
+ TinyVue 从 3.13.0 开始不需要在
+ vite.config.js 文件中配置
+ define: { 'process.env': { ...process.env } }
+ 这段代码,这段代码会导致环境变量被打包到构建产物中,引起信息安全风险,请业务尽快升级到
+ 3.13.0 或以上版本!如果不升级版本可以改成:define: { 'process.env': { }}
+ 同样也可以解决此问题!感谢您对 TinyVue 的支持!
+
+
+ {{
+ disabled ? `${time} S后可关闭此提示` : '确认将不再弹出此提示'
+ }}
+ 取消
+
+
@@ -198,6 +199,7 @@ export default defineComponent({
font-size: 14px;
color: rgb(51, 54, 57);
line-height: 1.6;
+
&:hover {
box-shadow: 1px 1px 6px 6px rgba(31, 52, 121, 0.08);
}
@@ -227,6 +229,7 @@ export default defineComponent({
.overview-card {
gap: 2%;
}
+
.overview-card-container {
width: 49%;
}
diff --git a/packages/renderless/package.json b/packages/renderless/package.json
index 095593d64a..2eca08a542 100644
--- a/packages/renderless/package.json
+++ b/packages/renderless/package.json
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-renderless",
- "version": "3.21.1",
+ "version": "3.21.2",
"private": true,
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"author": "OpenTiny Team",
@@ -36,8 +36,8 @@
"release": "esno ./scripts/postbuild.ts && shx cp README.md dist"
},
"dependencies": {
- "color": "4.2.3",
- "@opentiny/utils": "workspace:~"
+ "@opentiny/utils": "workspace:~",
+ "color": "4.2.3"
},
"devDependencies": {
"esno": "^4.7.0",
diff --git a/packages/renderless/src/common/deps/popper.ts b/packages/renderless/src/common/deps/popper.ts
index b8b0504e41..8b59fd3209 100644
--- a/packages/renderless/src/common/deps/popper.ts
+++ b/packages/renderless/src/common/deps/popper.ts
@@ -77,6 +77,10 @@ const isFixed = (el: HTMLElement) => {
return true
}
+ // 处理遇到 shadowRoot的情况
+ if (el.host) {
+ el = el.host
+ }
return el.parentNode ? isFixed(el.parentNode as HTMLElement) : false
}
diff --git a/packages/renderless/src/common/deps/vue-popper.ts b/packages/renderless/src/common/deps/vue-popper.ts
index 409d7bb99c..a2ebc571f3 100644
--- a/packages/renderless/src/common/deps/vue-popper.ts
+++ b/packages/renderless/src/common/deps/vue-popper.ts
@@ -59,6 +59,11 @@ const getReferMaxZIndex = (reference) => {
do {
reference = reference.parentNode
+ // 处理遇到shadowRoot的情况
+ if (reference && reference instanceof ShadowRoot && reference.host) {
+ reference = reference.host
+ }
+
if (reference) {
z = getZIndex(reference)
} else {
diff --git a/packages/renderless/src/grid/utils/dom.ts b/packages/renderless/src/grid/utils/dom.ts
index 8cbf00d328..03fe39574f 100644
--- a/packages/renderless/src/grid/utils/dom.ts
+++ b/packages/renderless/src/grid/utils/dom.ts
@@ -180,11 +180,15 @@ export const colToVisible = ($table, column, move) => {
}
export const hasDataTag = (el, value) => {
- // el可能为shadow-root,shadow-root没有getAttribute方法
- if (!el || !value || !el.getAttribute) {
+ if (!el || !value) {
return false
}
+ // 处理遇到 shadowRoot的情况
+ if (el.host) {
+ el = el.host
+ }
+
return (' ' + el.getAttribute('data-tag') + ' ').includes(' ' + value + ' ')
}
diff --git a/packages/theme/src/nav-menu/index.less b/packages/theme/src/nav-menu/index.less
index 1f64ac3ac3..9414330837 100644
--- a/packages/theme/src/nav-menu/index.less
+++ b/packages/theme/src/nav-menu/index.less
@@ -87,7 +87,7 @@
}
> .more {
- padding: 0 12px;
+ padding: 0 10px;
font-size: var(--tv-NavMenu-item-font-size);
text-align: center;
color: var(--tv-NavMenu-item-text-color);
@@ -217,7 +217,9 @@
}
> .sub-menu {
+ border-left: 1px solid var(--tv-NavMenu-popmenu-more-menu-border-color-right);
float: left;
+ margin-left: -1px;
width: calc(100% - 160px);
padding-left: 14px;
box-sizing: border-box;
@@ -358,7 +360,7 @@
margin: 0;
.@{nav-menu-prefix-cls}__sub-menu-title {
- padding: 18px 35px 0 12px;
+ margin: 18px 35px 0 12px;
&.@{nav-menu-prefix-cls}__sub-menu-title-blank {
padding: 0 35px 0 12px;
diff --git a/packages/vue/package.json b/packages/vue/package.json
index 96b77bfb65..529088b839 100644
--- a/packages/vue/package.json
+++ b/packages/vue/package.json
@@ -1,9 +1,19 @@
{
"name": "@opentiny/vue",
+ "type": "module",
+ "version": "3.21.3",
"private": true,
- "version": "3.21.2",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
+ "author": "OpenTiny Team",
+ "license": "MIT",
"homepage": "https://opentiny.design/tiny-vue",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:opentiny/tiny-vue.git"
+ },
+ "bugs": {
+ "url": "https://github.com/opentiny/tiny-vue/issues"
+ },
"keywords": [
"vue",
"vue3",
@@ -15,18 +25,12 @@
"renderless-components",
"headless-components"
],
- "author": "OpenTiny Team",
- "license": "MIT",
- "repository": {
- "type": "git",
- "url": "git@github.com:opentiny/tiny-vue.git"
- },
- "bugs": {
- "url": "https://github.com/opentiny/tiny-vue/issues"
- },
- "type": "module",
- "main": "index.ts",
"sideEffects": false,
+ "main": "index.ts",
+ "scripts": {
+ "build": "pnpm -w build:ui",
+ "postversion": "pnpm build"
+ },
"dependencies": {
"@opentiny/vue-action-menu": "workspace:~",
"@opentiny/vue-action-sheet": "workspace:~",
@@ -270,9 +274,5 @@
"vue2": "npm:vue@2.6.14",
"vue2.7": "npm:vue@2.7.10",
"vue3": "npm:vue@3.3.9"
- },
- "scripts": {
- "build": "pnpm -w build:ui",
- "postversion": "pnpm build"
}
}