Skip to content

feat: sync release-3.17.0 to dev #1801

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

Merged
merged 20 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
0ba1db2
fix(card): 修复card组件样式污染全局问题
zzcr Jun 26, 2024
c7980b3
feat(drawer): [drawer] Add drag listening event (#1701)
MomoPoppy Jun 27, 2024
b94cde0
feat(vue): [button-group] add empty slot (#1700)
gimmyhehe Jun 28, 2024
d9d47ba
fix(select): fix Select‘s SMB theme, multi select svg color (#1705)
shenjunjian Jun 28, 2024
fa7fa03
feat: update theme version
zzcr Jun 28, 2024
80b0d28
fix(chart): [chart] Fixed chart-core bug (#1708)
Davont Jul 2, 2024
abde7dd
fix(popper): fix build error in vitepress (#1711)
zzcr Jul 2, 2024
8a324c9
fix(select): rename select's css var name (#1713)
shenjunjian Jul 5, 2024
2c7685e
fix(grid): [grid] change custom components to tinyvue components to a…
gimmyhehe Jul 7, 2024
c490f03
fix(drawer): fix the issue content can not display when using v-if (#…
Huangyilin19 Jul 9, 2024
8ecb97e
fix(dropdown): fix dropdown in virtual scrolling grid (#1717)
zzcr Jul 10, 2024
0a14897
feat: update renderless version
zzcr Jul 10, 2024
0b3ea56
fix(select): the input parameter of the computedDisabledTooltipconten…
shenjunjian Jul 11, 2024
ccfc904
fix(grid-toolbar): [grid] fix toolbar ref name error (#1745)
gimmyhehe Jul 12, 2024
f3b49c6
Merge branch 'dev' into release-3.17.0
zzcr Jul 17, 2024
e4fa4c5
fix(breadcrumb): [breadcrumb] resolve delimiter issued (#1755)
wuyiping0628 Jul 18, 2024
b0f0035
feat: update runtime version
zzcr Jul 19, 2024
f2d1a8d
fix(breadcrumb): [breadcrumb] resolve the issue of separator not swit…
wuyiping0628 Jul 26, 2024
6f186c2
fix(theme): when release theme, copy dist to _dist and replace cssvar…
shenjunjian Jul 26, 2024
31f71c6
Merge branch 'dev' into release-3.17.0
zzcr Jul 31, 2024
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
2 changes: 1 addition & 1 deletion packages/renderless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-renderless",
"version": "3.17.5",
"version": "3.17.6",
"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",
Expand Down
9 changes: 3 additions & 6 deletions packages/renderless/src/breadcrumb-item/vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@ export const api = ['linkClick', 'state']

export const renderless = (
props: IBreadcrumbItemProps,
{ reactive, inject }: ISharedRenderlessParamHooks,
{ designConfig },
{ refs, router, emit }: IBreadcrumbItemRenderlessParamUtils
{ reactive, inject, computed }: ISharedRenderlessParamHooks,
{ refs, router, emit, designConfig }: IBreadcrumbItemRenderlessParamUtils
) => {
const breadcrumbEmitter = inject('breadcrumbEmitter')
const breadcrumb = inject('breadcrumb')
const constants = breadcrumb._constants
// separator
const separator = breadcrumb.separator || designConfig?.separator || '>'
const state = reactive({
size: inject('size', null),
separator
separator: computed(() => breadcrumb.separator || designConfig?.separator || '>')
})
const api: IBreadcrumbItemApi = {
state,
Expand Down
41 changes: 32 additions & 9 deletions packages/theme/build/release.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
/**
* 将 dist 目录生成 TGZ 的压缩包
* 将 dist 目录生成 TGZ 的压缩包 fs.cp 需要node 18.0+
*/

const fs = require('node:fs')
const path = require('node:path')
const { execSync } = require('node:child_process')
const fg = require('fast-glob')

const source = 'dist'
const content = fs.readFileSync(path.join(source, 'index.css')).toString('UTF-8')
// 提供特殊的前缀名称
const result = content.replace(/--ti-/g, '--ti-vue-')
const packagesPath = path.join(source, 'lowcode.css')
// 替换文件内容。 如果不指定target,则原地覆盖
function replaceFile(src, cb, target = null) {
let content = fs.readFileSync(src, 'utf8')
content = cb(content)
fs.writeFileSync(target || src, content, 'utf8')
}

fs.writeFileSync(packagesPath, result)
// 1、从 index.css 生成 lowcode.css ------ 提供特殊的前缀名称
replaceFile('dist/index.css', (content) => content.replace(/--ti-/g, '--ti-vue-'), 'dist/lowcode.css')

fs.copyFileSync('package.json', path.join(source, 'package.json'))
// 2、复制一份冗余的文件,统一替换 --ti- 前缀为 --tvue- ,避免混用 tiny3时,css变量名冲突。
fs.cpSync('dist', '_dist', { recursive: true, force: true })
fs.cpSync('_dist', 'dist/_dist', { recursive: true, force: true })
fs.rmSync('_dist', { recursive: true, force: true })
// 2.1 处理所有的 index.css
let files = fg.sync(['dist/_dist/**/index.css'])
files.forEach((file) => {
replaceFile(file, (content) => content.replace(/--ti-/g, '--tvue-'))
})
// 2.2 处理所有的说主题js
files = fg.sync(['dist/_dist/**/{aurora,smb}-theme.js', 'dist/_dist/theme/**/{index,component}.js'])
files.forEach((file) => {
replaceFile(file, (content) =>
content
.replace(/--ti-/g, '--tvue-') //
.replace(/'ti-/g, `'tvue-`)
)
})

// 3、复制package.json/README.md到dist目录
fs.copyFileSync('package.json', path.join('dist', 'package.json'))
fs.copyFileSync('README.md', path.join('dist', 'README.md'))
34 changes: 17 additions & 17 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
{
"name": "@opentiny/vue-theme",
"version": "3.17.3",
"version": "3.17.4",
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
"main": "index.css",
"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",
Expand All @@ -15,24 +23,16 @@
"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"
},
"exports": {
"./*": "./src/*"
},
"main": "index.css",
"scripts": {
"clean": "rimraf dist src/aurora-theme src/smb-theme",
"build:theme": "gulp build --gulpfile build/gulp-dist.js",
"build": "npm run clean && npm run build:theme && node build/replace-img.js",
"build:fast": "npm run build && npm run release",
"release": "node build/release.js && node build/postbuild.js && shx cp README.md dist",
"release": "node build/release.js && node build/postbuild.js",
"build:copy-remote": "npm run build:theme && cp-cli dist ../tiny-vue/node_modules/@opentiny/vue-theme",
"publishTgz": "node .cloudbuild/publish-tgzs.js",
"postversion": "pnpm build",
Expand All @@ -42,18 +42,18 @@
"@babel/cli": "^7.5.5",
"@babel/core": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"fast-glob": "^3.2.12",
"gulp": "^4.0.2",
"gulp-autoprefixer": "^7.0.1",
"gulp-clean-css": "^4.2.0",
"gulp-concat": "2.6.1",
"gulp-less": "^5.0.0",
"gulp-svg-inline": "^1.0.1",
"gulp-transform": "3.0.5",
"gulp-concat": "2.6.1",
"svgo": "3.2.0",
"rimraf": "^2.6.2",
"fast-glob": "^3.2.12",
"stylelint": "^14.14.0",
"stylelint-config-standard": "^29.0.0"
"stylelint-config-standard": "^29.0.0",
"svgo": "3.2.0"
},
"stylelint": {
"extends": [
Expand Down Expand Up @@ -87,4 +87,4 @@
]
}
}
}
}
Loading