forked from opentiny/tiny-vue
feat: sync release-3.17.0 to dev (#1801)
* fix(card): 修复card组件样式污染全局问题 * feat(drawer): [drawer] Add drag listening event (#1701) * feat(drawer): [drawer] Add drag listening event * feat(drawer): [drawer] Modify version number * feat(vue): [button-group] add empty slot (#1700) * feat(vue): [button-group] add empty slot * docs(button-group): add new api version * fix(select): fix Select‘s SMB theme, multi select svg color (#1705) * feat: update theme version * fix(chart): [chart] Fixed chart-core bug (#1708) * fix: chart-core添加cloneDeep引入 * fix: 修改chart组件getFormatted函数判断逻辑 * fix: 更新chart-core包版本为3.17.1 * fix(popper): fix build error in vitepress (#1711) * fix(popper): fix build error in vitepress * fix(popper): 升级版本 * fix(select): rename select's css var name (#1713) * fix(grid): [grid] change custom components to tinyvue components to a… (#1724) * fix(grid): [grid] change custom components to tinyvue components to adapt difference theme * Update package.json * fix(drawer): fix the issue content can not display when using v-if (#1733) * fix(dropdown): fix dropdown in virtual scrolling grid (#1717) * feat: update renderless version * fix(select): the input parameter of the computedDisabledTooltipcontent lost props (#1740) * fix(select): the input parameter of the computedDisabledTooltipcontent does not contain props * fix(select): update version * fix(grid-toolbar): [grid] fix toolbar ref name error (#1745) * fix(breadcrumb): [breadcrumb] resolve delimiter issued (#1755) * fix(breadcrumb): [breadcrumb] resolve delimiter issued * fix(breadcrumb): [breadcrumb] resolve delimiter issued * feat: update runtime version * fix(breadcrumb): [breadcrumb] resolve the issue of separator not switching (#1783) * fix(theme): when release theme, copy dist to _dist and replace cssvar… (#1768) * fix(theme): when release theme, copy dist to _dist and replace cssvar's prefix name * fix(vue-theme): update package's version --------- Co-authored-by: MomoPoppy <125256456+MomoPoppy@users.noreply.github.com> Co-authored-by: gimmyhehe <975402925@qq.com> Co-authored-by: 申君健 <40288193@qq.com> Co-authored-by: Davont <davontz@icloud.com> Co-authored-by: Huang Yilin <huangyilin16@qq.com> Co-authored-by: wuyiping0628 <42107997+wuyiping0628@users.noreply.github.com>
This commit is contained in:
parent
3aee085d47
commit
43f7971727
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'))
|
||||
|
|
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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": [
|
||||
|
@ -87,4 +87,4 @@
|
|||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue