Skip to content
Closed
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
4 changes: 2 additions & 2 deletions packages/renderless/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/vue-renderless",
"version": "3.18.0",
"version": "3.18.4",
"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 Expand Up @@ -43,4 +43,4 @@
"esno": "^4.7.0",
"tsup": "7.2.0"
}
}
}
3 changes: 3 additions & 0 deletions packages/renderless/src/anchor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ export const handleScroll = (state: IAnchorRenderlessParams['state']) => () => {

// 设置滚动偏移量
const setChildOffsetTop = ({ state, props }: Pick<IAnchorRenderlessParams, 'state' | 'props'>) => {
if (!props.links?.length) {
return
}
state.offsetTop = document.querySelector(props.links[0].link)?.offsetTop || 0
}

Expand Down
47 changes: 42 additions & 5 deletions packages/renderless/src/fluent-editor/options.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
import { isNull } from '../common/type'

const fontFamilyConfig = [
'songti',
'yahei',
'kaiti',
'heiti',
'lishu',
'mono',
'arial',
'arialblack',
'comic',
'impact',
'times'
]

const fontSizeConfig = [
'12px',
'13px',
'14px',
'15px',
'16px',
'17px',
'18px',
'19px',
'20px',
'22px',
'24px',
'26px',
'29px',
'32px',
'36px',
'40px',
'48px',
'72px'
]

const lineHeightConfig = ['1', '1.2', '1.5', '2', '2.5', '3', '4', '5']

const betterTable = {
operationMenu: {
items: {
Expand All @@ -20,7 +57,7 @@ const betterTable = {
}
}

const toolbar = (FluentEditor) => {
const toolbar = () => {
const underline = ['bold', 'italic', 'underline', 'strike']
const list = [{ list: 'ordered' }, { list: 'bullet' }]
const script = [{ script: 'sub' }, { script: 'super' }]
Expand All @@ -29,9 +66,9 @@ const toolbar = (FluentEditor) => {
container: [
['undo', 'redo', 'clean'],
[
{ font: FluentEditor.imports['formats/font'].whitelist },
{ size: FluentEditor.imports['formats/size'].whitelist },
{ lineheight: FluentEditor.imports['formats/lineheight'].whitelist },
{ font: fontFamilyConfig },
{ size: fontSizeConfig },
{ lineheight: lineHeightConfig },
{ header: [1, 2, 3, 4, 5, 6, false] }
],
underline,
Expand Down Expand Up @@ -170,7 +207,7 @@ const defaultOption = ({ FluentEditor, state, mentionObj }) => {
file: true, // 上传文件需开启
image: FluentEditor.imports['modules/image-spec'],
counter: false,
toolbar: toolbar(FluentEditor),
toolbar: toolbar(),
'better-table': betterTable,
mention: mention(mentionObj),
keyboard: keyboard({ FluentEditor, state })
Expand Down
3 changes: 1 addition & 2 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@opentiny/vue-theme",
"type": "module",
"version": "3.18.1",
"version": "3.18.3",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Version numbers are inconsistent across packages.

The packages/theme/package.json has been updated to version 3.18.3, while other related packages are on different versions such as 3.18.0, 3.18.4, and some vue packages are at 3.18.1 or 3.18.5. Please synchronize the version numbers across all packages to maintain consistency.

🔗 Analysis chain

LGTM: Version bump looks good.

The version update from 3.18.1 to 3.18.3 is consistent with the PR objective of synchronizing version 3.18.0 to the dev branch. This minor version bump suggests a patch or small feature update.

To ensure consistency across related packages, please run the following script:

This will help identify any potential version mismatches across different packages in the project.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify version consistency across related packages

# Test: Check for any inconsistencies in version numbers
echo "Checking version consistency across packages:"
fd -t f package.json | xargs grep -H '"version":' | sort

Length of output: 19317

"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",
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/dropdown-item/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@opentiny/vue-dropdown-item",
"type": "module",
"version": "3.18.0",
"version": "3.18.1",
"description": "",
"license": "MIT",
"sideEffects": false,
Expand All @@ -25,4 +25,4 @@
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}
}
22 changes: 11 additions & 11 deletions packages/vue/src/form-item/package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
{
"name": "@opentiny/vue-form-item",
"version": "3.18.0",
"type": "module",
"version": "3.18.1",
"description": "",
"license": "MIT",
"sideEffects": false,
"main": "lib/index.js",
"module": "index.ts",
"sideEffects": false,
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
},
"dependencies": {
"@opentiny/vue-tooltip": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-icon": "workspace:~"
"@opentiny/vue-tooltip": "workspace:~"
Comment on lines +16 to +18
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Unused Dependency Detected: @opentiny/vue-icon

The dependency @opentiny/vue-icon has been added to packages/vue/src/form-item/package.json but does not appear to be used in the codebase.

  • Action Required: Consider removing @opentiny/vue-icon if it's not being utilized to avoid unnecessary bloat.
🔗 Analysis chain

Verify the usage of the new dependency

The changes to the dependencies look good. The addition of @opentiny/vue-icon suggests new functionality or a refactor involving icons. The reordering of @opentiny/vue-tooltip improves readability.

Please verify that @opentiny/vue-icon is being used in the package. Run the following script to check for its usage:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for the usage of @opentiny/vue-icon in the package

# Test: Search for import statements or require calls for @opentiny/vue-icon
rg --type typescript --type vue 'from\s+[\'"]@opentiny/vue-icon[\'"]|require\([\'"]@opentiny/vue-icon[\'"]\)' packages/vue/src/form-item

Length of output: 449

},
"license": "MIT"
}
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}
5 changes: 3 additions & 2 deletions packages/vue/src/form-item/src/pc.vue
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export default defineComponent({
// 兼容 2.0 组件 validation 是否有 required
state.validationRequired = propsData.validation && !!propsData.validation.required
}
// 如果为 2.0 的验证 不会使用 toolltip 组件
// 如果为 2.0 的验证 不会使用 tooltip 组件
if (propsData.validation) {
return item
}
Expand Down Expand Up @@ -223,7 +223,8 @@ export default defineComponent({
}
data = item.props
}
data.class = deduplicateCssClass('tiny-tooltip' + stringifyCssClass(data.class))
const mergeClass = `tiny-tooltip ${stringifyCssClass(data.class)}`
data.class = deduplicateCssClass(mergeClass)
return item
})
: null
Expand Down
62 changes: 31 additions & 31 deletions packages/vue/src/grid-toolbar/package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
{
"name": "@opentiny/vue-grid-toolbar",
"version": "3.18.0",
"type": "module",
"version": "3.18.1",
"description": "",
"license": "MIT",
"sideEffects": false,
"main": "lib/index.js",
"module": "index.ts",
"sideEffects": false,
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
},
"scripts": {
"build": "pnpm -w build:ui $npm_package_name",
"//postversion": "pnpm build"
},
"dependencies": {
"@opentiny/vue-button": "workspace:~",
"@opentiny/vue-select": "workspace:~",
"@opentiny/vue-option": "workspace:~",
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-modal": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-grid": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-layout": "workspace:~",
"@opentiny/vue-row": "workspace:~",
"@opentiny/vue-col": "workspace:~",
"@opentiny/vue-alert": "workspace:~",
"@opentiny/vue-dialog-box": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-split": "workspace:~",
"@opentiny/vue-button": "workspace:~",
"@opentiny/vue-checkbox": "workspace:~",
"@opentiny/vue-radio": "workspace:~",
"@opentiny/vue-checkbox-group": "workspace:~",
"@opentiny/vue-radio-group": "workspace:~",
"@opentiny/vue-search": "workspace:~",
"@opentiny/vue-col": "workspace:~",
"@opentiny/vue-common": "workspace:~",
"@opentiny/vue-dialog-box": "workspace:~",
"@opentiny/vue-dropdown": "workspace:~",
"@opentiny/vue-dropdown-menu": "workspace:~",
"@opentiny/vue-dropdown-item": "workspace:~",
"@opentiny/vue-tooltip": "workspace:~",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-tabs": "workspace:~",
"@opentiny/vue-tab-item": "workspace:~",
"@opentiny/vue-dropdown-menu": "workspace:~",
"@opentiny/vue-grid": "workspace:~",
"@opentiny/vue-icon": "workspace:~",
"@opentiny/vue-input": "workspace:~",
"@opentiny/vue-layout": "workspace:~",
"@opentiny/vue-locale": "workspace:~",
"@opentiny/vue-modal": "workspace:~",
"@opentiny/vue-option": "workspace:~",
"@opentiny/vue-popover": "workspace:~",
"@opentiny/vue-radio": "workspace:~",
"@opentiny/vue-radio-group": "workspace:~",
"@opentiny/vue-renderless": "workspace:~",
"@opentiny/vue-row": "workspace:~",
"@opentiny/vue-search": "workspace:~",
"@opentiny/vue-select": "workspace:~",
"@opentiny/vue-split": "workspace:~",
"@opentiny/vue-tab-item": "workspace:~",
"@opentiny/vue-tabs": "workspace:~",
"@opentiny/vue-theme": "workspace:~",
"@opentiny/vue-tooltip": "workspace:~",
"@opentiny/vue-tree": "workspace:~"
},
"license": "MIT"
}
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
}
}
1 change: 0 additions & 1 deletion packages/vue/src/grid-toolbar/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ export default defineComponent({
})
}
},
// NEXT 未用到
updateColumn(fullColumn) {
this.tableFullColumn = fullColumn
},
Expand Down
6 changes: 3 additions & 3 deletions packages/vue/src/grid/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@opentiny/vue-grid",
"version": "3.18.0",
"type": "module",
"version": "3.18.5",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Version update incomplete across package.json files

The version was intended to be updated to 3.18.5, but multiple package.json files still reference version 3.18.0. Please ensure that all relevant package.json files are updated accordingly to maintain consistency.

🔗 Analysis chain

Version update from 3.18.0 to 3.18.5

The package version has been incremented from 3.18.0 to 3.18.5. This minor version bump suggests backward-compatible bug fixes or small features have been added.

To ensure consistency across the project, let's verify if this version update is reflected in other relevant files:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for consistency of version 3.18.5 across package.json files

# Test: Search for version 3.18.5 in all package.json files
echo "Checking for version 3.18.5 in package.json files:"
rg --type json '"version":\s*"3.18.5"' -g 'package.json'

# Test: Check if there are any remaining references to version 3.18.0
echo "Checking for any remaining references to version 3.18.0:"
rg --type json '"version":\s*"3.18.0"' -g 'package.json'

Length of output: 17992

"description": "",
"main": "lib/index.js",
"module": "index.ts",
"sideEffects": false,
"type": "module",
"devDependencies": {
"@opentiny-internal/vue-test-utils": "workspace:*",
"vitest": "^0.31.0"
Expand All @@ -31,4 +31,4 @@
"@opentiny/vue-common": "workspace:~"
},
"license": "MIT"
}
}
4 changes: 3 additions & 1 deletion packages/vue/src/grid/src/column/src/column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ export default defineComponent({

const hasSubColumn = findTree(
slotVnode,
({ componentOptions, type }) => {
(node) => {
// 当使用jsx来写默认插槽时,vnode的children为[undefined], 使用fallback值防止解构报错
const { componentOptions, type } = node || {}
const componentName = (type && type.name) || (componentOptions && componentOptions.Ctor.extendOptions.name)

return $table.isValidCustomColumn(componentName)
Expand Down
11 changes: 8 additions & 3 deletions packages/vue/src/grid/src/dragger/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,16 @@ export default {
},
// 处理行拖拽
rowDrop(bodyEl) {
const { plugin, onBeforeMove, filter, refresh = true, rowHandle } = this.dropConfig
const { plugin, onBeforeMove, filter, refresh = true, rowHandle, trigger } = this.dropConfig
const rowDropContainer = bodyEl.querySelector('.tiny-grid__body tbody')

// 拖拽触发源,默认是行
let handle = trigger || '.tiny-grid-body__row'
// 配置了 rowHandle === 'index'则忽略trigger
if (rowHandle === 'index') {
handle = '.tiny-grid-body__row>td.col__index>.row__drop-handle'
}
const rowDropOptions = {
handle: rowHandle === 'index' ? '.tiny-grid-body__row>td.col__index>.row__drop-handle' : '.tiny-grid-body__row',
handle,
filter,
onEnd: createHandlerOnEnd({ _vm: this, refresh }),
onStart: (event) => {
Expand Down
6 changes: 6 additions & 0 deletions packages/vue/src/grid/src/table/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,12 @@ const Methods = {
})
this.collectColumn = collectColumn
}

const toolbarVm = this.getVm('toolbar')
// 合并更新toolbar的Column配置
if (toolbarVm) {
toolbarVm.updateColumn(fullColumn)
}
this.$emit('update:customs', fullColumn)
},
resetAll() {
Expand Down