Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/zhengjg/tiny-engine into…
Browse files Browse the repository at this point in the history
… develop

* 'develop' of https://github.com/zhengjg/tiny-engine:
  修复新增页面搜索条件存在并没有触发 (opentiny#448)
  Fix/serarch empty:为对部分功能设置搜索为空样式处理 (opentiny#446)
  fix(reset-button): 修复样式配置中重置按钮的样式和设计稿不一致的问题 (opentiny#435)
  fix(dataSource): 数据源新增字段时,新增的表单设置在列表头部,且数组插入数据时插入到头部 (opentiny#454)
  fix(block-diff): 修复区块发布是查看差异保存时schema出错的bug (opentiny#453)
  新建区块弹出框点击遮罩层会关闭 (opentiny#447)
  修复918.json mock数据不一致问题 (opentiny#452)
  fix(chore): fix vue version of 3.4.24 caught tiny-select component error (opentiny#445)
  (style-position)修复样式定位reset后未恢复默认值 (opentiny#433)
  fix(data-source): on configuring static data panel, the batch delete button should horizontally aligned. (opentiny#413)
  fix: 修改滚动到节点的逻辑,适配超宽超高组件 (opentiny#428)
  fix(plugin-dataSource): 修复数据源面板新增时未校验名称的重复性 (opentiny#434)

# Conflicts:
#	packages/plugins/materials/src/component/Main.vue
  • Loading branch information
zhengjg committed May 9, 2024
2 parents 9cc331f + c36cc66 commit 6f6dad1
Show file tree
Hide file tree
Showing 32 changed files with 215 additions and 127 deletions.
10 changes: 5 additions & 5 deletions materials/components/MsBigWheel.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"id": 77,
"version": " 0.3.2",
"version": " 0.8.8",
"name": {
"zh_CN": "转盘抽奖"
},
"component": "BigWheel",
"icon": "button",
"icon": "ms-big-wheel",
"description": "大转盘抽奖",
"doc_url": "",
"screenshot": "",
Expand All @@ -14,9 +14,9 @@
"dev_mode": "proCode",
"npm": {
"package": "ms-ui-lib",
"version": "0.8.2",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"css": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/style.css",
"version": "0.8.8",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.8/lib/ms-ui.es.js",
"css": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.8/lib/style.css",
"dependencies": null,
"exportName": "BigWheel"
},
Expand Down
6 changes: 3 additions & 3 deletions materials/components/MsEtfHot.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": 85,
"version": " 0.1.0",
"version": " 0.8.2",
"name": {
"zh_CN": "EFT热榜"
},
Expand All @@ -14,8 +14,8 @@
"dev_mode": "proCode",
"npm": {
"package": "ms-ui-lib",
"version": "0.8.1",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.1/lib/ms-ui.es.js",
"version": "0.8.2",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"css": null,
"dependencies": {},
"exportName": "EtfHot"
Expand Down
14 changes: 7 additions & 7 deletions materials/components/MsHeader.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": 76,
"version": " 0.3.0",
"version": " 0.8.4",
"name": {
"zh_CN": "页面导航"
},
Expand All @@ -14,8 +14,8 @@
"dev_mode": "proCode",
"npm": {
"package": "ms-ui-lib",
"version": "0.8.2",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"version": "0.8.4",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.4/lib/ms-ui.es.js",
"css": null,
"dependencies": null,
"exportName": "Header"
Expand Down Expand Up @@ -216,10 +216,10 @@
{
"property": "bgColor",
"type": "string",
"defaultValue": "",
"defaultValue": "#ffffff",
"label": {
"text": {
"zh_CN": "bgColor"
"zh_CN": "导航背景颜色"
}
},
"cols": 12,
Expand All @@ -228,9 +228,9 @@
"readOnly": false,
"disabled": false,
"widget": {
"component": "MetaInput",
"component": "MetaColor",
"props": {
"placeholder": "请输入rgba颜色值"
"placeholder": "请输入背景颜色"
}
},
"description": {
Expand Down
4 changes: 2 additions & 2 deletions materials/components/MsMarquee.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": 78,
"version": " 0.3.0",
"version": " 0.8.2",
"name": {
"zh_CN": "九宫格抽奖"
},
Expand All @@ -15,7 +15,7 @@
"npm": {
"package": "ms-ui-lib",
"version": "0.8.1",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.1/lib/ms-ui.es.js",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"css": null,
"dependencies": {
"@nutui/nutui-bingo": "^1.0.7"
Expand Down
6 changes: 3 additions & 3 deletions materials/components/MsNineSquare.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": 79,
"version": " 0.3.0",
"version": " 0.8.2",
"name": {
"zh_CN": "卡牌抽奖"
},
Expand All @@ -14,8 +14,8 @@
"dev_mode": "proCode",
"npm": {
"package": "ms-ui-lib",
"version": "0.8.1",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.1/lib/ms-ui.es.js",
"version": "0.8.2",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"css": null,
"dependencies": {
"@nutui/nutui-bingo": "^1.0.7"
Expand Down
8 changes: 4 additions & 4 deletions materials/components/MsScoreTaskList.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": 82,
"version": " 0.8.2",
"version": " 0.8.1",
"name": {
"zh_CN": "任务列表"
},
Expand All @@ -14,8 +14,8 @@
"dev_mode": "proCode",
"npm": {
"package": "ms-ui-lib",
"version": "0.8.2",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"version": "0.8.1",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.1/lib/ms-ui.es.js",
"css": null,
"dependencies": {
"@nutui/nutui-bingo": "^1.0.7"
Expand All @@ -25,7 +25,7 @@
"group": "ms-ui-lib",
"category": "活动组件",
"configure": {
"loop": true,
"loop": false,
"condition": true,
"styles": true,
"isContainer": false,
Expand Down
6 changes: 3 additions & 3 deletions materials/components/MsSlotMachine.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": 80,
"version": " 0.5.0",
"version": " 0.8.2",
"name": {
"zh_CN": "老虎机抽奖"
},
Expand All @@ -14,8 +14,8 @@
"dev_mode": "proCode",
"npm": {
"package": "ms-ui-lib",
"version": "0.8.1",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.1/lib/ms-ui.es.js",
"version": "0.8.2",
"script": "https://npm.onmicrosoft.cn/ms-ui-lib@0.8.2/lib/ms-ui.es.js",
"css": null,
"dependencies": {
"@nutui/nutui-bingo": "^1.0.7"
Expand Down
2 changes: 1 addition & 1 deletion mockServer/src/mock/get/app-center/v1/apps/schema/918.json
Original file line number Diff line number Diff line change
Expand Up @@ -1690,7 +1690,7 @@
],
"fileName": "createVm",
"meta": {
"id": 1977,
"id": "NTJ4MjvqoVj8OVsc",
"parentId": "0",
"group": "staticPages",
"occupier": {
Expand Down
18 changes: 9 additions & 9 deletions packages/canvas/src/components/container/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,19 +320,19 @@ export const scrollToNode = (element) => {
if (element) {
const container = getDocument().documentElement
const { clientWidth, clientHeight } = container
const { x, y, width, height } = element.getBoundingClientRect()
const { left, right, top, bottom, width, height } = element.getBoundingClientRect()
const option = {}

if (x < 0) {
option.left = container.scrollLeft + x - SCROLL_MARGIN
} else if (x > clientWidth) {
option.left = x + width - clientWidth + SCROLL_MARGIN
if (right < 0) {
option.left = container.scrollLeft + left - SCROLL_MARGIN
} else if (left > clientWidth) {
option.left = container.scrollLeft + left - clientWidth + width + SCROLL_MARGIN
}

if (y < 0) {
option.top = container.scrollTop + y - SCROLL_MARGIN
} else if (y > clientHeight) {
option.top = y + height - clientHeight + SCROLL_MARGIN
if (bottom < 0) {
option.top = container.scrollTop + top - SCROLL_MARGIN
} else if (top > clientHeight) {
option.top = container.scrollTop + top - clientHeight + height + SCROLL_MARGIN
}

if (typeof option.left === 'number' || typeof option.top === 'number') {
Expand Down
24 changes: 18 additions & 6 deletions packages/common/component/BlockDeployDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
:modal="false"
:fullscreen="true"
:append-to-body="true"
title="Schema 本地与线上差异"
title="Schema 线上与本地差异"
>
<vue-monaco
v-if="state.compareVisible"
Expand Down Expand Up @@ -82,8 +82,9 @@ import {
FormItem as TinyFormItem
} from '@opentiny/vue'
import { theme } from '@opentiny/tiny-engine-controller/adapter'
import { useLayout } from '@opentiny/tiny-engine-controller'
import { useLayout, useNotify } from '@opentiny/tiny-engine-controller'
import { getSchema, setSchema } from '@opentiny/tiny-engine-canvas'
import { constants } from '@opentiny/tiny-engine-utils'
import VueMonaco from './VueMonaco.vue'
export default {
Expand All @@ -106,6 +107,7 @@ export default {
},
emits: ['update:visible'],
setup(props, { emit, attrs }) {
const { COMPONENT_NAME } = constants
const formState = reactive({
deployInfo: '',
version: '',
Expand Down Expand Up @@ -212,10 +214,20 @@ export default {
}
const save = () => {
const pageSchema = JSON.parse(state.newCode)
setSchema(pageSchema)
close()
if (!state.newCode) {
close()
return
}
try {
const pageSchema = JSON.parse(state.newCode)
setSchema({ ...pageSchema, componentName: COMPONENT_NAME.Block })
close()
} catch (err) {
useNotify({
type: 'error',
message: '代码静态检查有错误,请先修改后再保存'
})
}
}
return {
Expand Down
6 changes: 5 additions & 1 deletion packages/common/component/PluginBlockList.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<ul
v-if="state.data.length"
:class="['block-list', 'lowcode-scrollbar', { 'is-small-list': blockStyle === 'mini' }, { isShortcutPanel }]"
@mouseleave="state.hover = false"
>
Expand Down Expand Up @@ -122,12 +123,14 @@
</div>
</div>
</ul>
<search-empty :isShow="!state.data.length" />
</template>

<script>
import { computed, watch, inject, reactive } from 'vue'
import { iconSetting, iconPlus } from '@opentiny/vue-icon'
import { Tooltip, Progress, Popover } from '@opentiny/vue'
import SearchEmpty from './SearchEmpty.vue'
import SvgButton from './SvgButton.vue'
const defaultImg =
Expand All @@ -140,7 +143,8 @@ export default {
IconSetting: iconSetting(),
IconPlus: iconPlus(),
TinyPopover: Popover,
SvgButton
SvgButton,
SearchEmpty
},
props: {
data: {
Expand Down
9 changes: 8 additions & 1 deletion packages/common/component/SaveNewBlock.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<template>
<div>
<tiny-dialog-box :append-to-body="true" :visible="visible" title="新建区块" width="500" @close="cancel">
<tiny-dialog-box
:append-to-body="true"
:close-on-click-modal="false"
:visible="visible"
title="新建区块"
width="500"
@close="cancel"
>
<tiny-form
show-message
:model="formData"
Expand Down
19 changes: 19 additions & 0 deletions packages/common/component/SearchEmpty.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<div v-if="isShow" class="empty-wrap">
<svg-icon class="empty-icon" name="empty"></svg-icon>
<p class="empty-text">暂无数据</p>
</div>
</template>
<script>
export default {
props: {
/**
* 控制搜索空数据显示
*/
isShow: {
type: Boolean,
default: false
}
}
}
</script>
7 changes: 5 additions & 2 deletions packages/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import BlockDeployDialog from './component/BlockDeployDialog.vue'
import ProgressBar from './component/ProgressBar.vue'
import MetaButtonGroup from './component/MetaButtonGroup.vue'
import MetaTableColumns from './component/MetaTableColumns.vue'
import SearchEmpty from './component/SearchEmpty.vue'

import i18n, { i18nKeyMaps } from '@opentiny/tiny-engine-controller/js/i18n'

Expand Down Expand Up @@ -145,7 +146,8 @@ export const MetaComponents = {
MetaIpSection,
MetaRelatedEditor,
MetaRelatedColumns,
MetaTableColumns
MetaTableColumns,
SearchEmpty
}

export {
Expand Down Expand Up @@ -206,5 +208,6 @@ export {
BindI18n,
BlockDeployDialog,
ProgressBar,
MetaTableColumns
MetaTableColumns,
SearchEmpty
}
2 changes: 1 addition & 1 deletion packages/design-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"monaco-editor": "0.33.0",
"prettier": "2.7.1",
"sortablejs": "^1.14.0",
"vue": "^3.4.15",
"vue": "3.4.23",
"vue-i18n": "^9.9.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions packages/design-core/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export default {
}
}
.tiny-engine-right-wrap {
position: relative;
z-index: 4;
}
:deep(.monaco-editor .suggest-widget) {
Expand Down
2 changes: 1 addition & 1 deletion packages/design-core/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const config = {

const importMapVersions = {
prettier: '2.7.1',
vue: '3',
vue: '3.4.23',
tinyVue: '~3.11'
}

Expand Down
Loading

0 comments on commit 6f6dad1

Please sign in to comment.