Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into build-toggle-cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
rhlin committed May 13, 2024
2 parents d9b6710 + aa8d361 commit b94d758
Show file tree
Hide file tree
Showing 115 changed files with 732 additions and 559 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18

- name: Install pnpm
run: npm i -g pnpm
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
6 changes: 3 additions & 3 deletions packages/blockToWebComponentTemplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"dependencies": {
"@opentiny/tiny-engine-i18n-host": "workspace:*",
"@opentiny/tiny-engine-webcomponent-core": "workspace:*",
"@opentiny/vue": "~3.11.0",
"@opentiny/vue-icon": "~3.11.0",
"@opentiny/vue-theme": "~3.11.0",
"@opentiny/vue": "~3.14.0",
"@opentiny/vue-icon": "~3.14.0",
"@opentiny/vue-theme": "~3.14.0",
"@vue/shared": "^3.3.11",
"vue": "^3.4.15",
"vue-i18n": "^9.9.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/blockToWebComponentTemplate/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default defineConfig(({ command, mode }) => {
}

const vuePluginConfig = {}
const styleLinks = ['https://npm.onmicrosoft.cn/@opentiny/vue-theme@3.11/index.css']
const styleLinks = ['https://npm.onmicrosoft.cn/@opentiny/vue-theme@3.14/index.css']

config.publicDir = false

Expand Down
4 changes: 3 additions & 1 deletion packages/builtinComponent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
"preview": "vite preview"
},
"dependencies": {
"@opentiny/vue": "~3.10.0",
"vite-plugin-css-injected-by-js": "^3.3.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"vite": "^4.5.0"
},
"peerDependencies": {
"vue": "^3.4.15"
}
}
6 changes: 3 additions & 3 deletions packages/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
"@opentiny/tiny-engine-i18n-host": "workspace:*",
"@opentiny/tiny-engine-utils": "workspace:*",
"@opentiny/tiny-engine-webcomponent-core": "workspace:*",
"@opentiny/vue": "~3.10.0",
"@opentiny/vue-icon": "~3.10.0",
"@opentiny/vue-renderless": "~3.10.0",
"@vue/babel-plugin-jsx": "1.1.1",
"@vue/shared": "^3.3.4",
"@vueuse/core": "^9.6.0"
Expand All @@ -46,6 +43,9 @@
"vite": "^4.3.7"
},
"peerDependencies": {
"@opentiny/vue": "^3.14.0",
"@opentiny/vue-icon": "^3.14.0",
"@opentiny/vue-renderless": "^3.14.0",
"vue": "^3.4.15",
"vue-i18n": "^9.9.0"
}
Expand Down
57 changes: 45 additions & 12 deletions packages/canvas/src/components/container/CanvasAction.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,46 @@
</div>
<!-- 绝对定位画布时调节元素大小 -->
<template v-else>
<div class="drag-resize resize-top" @mousedown.stop="onMousedown($event, 'center', 'start')"></div>
<div class="drag-resize resize-bottom" @mousedown.stop="onMousedown($event, 'center', 'end')"></div>
<div class="drag-resize resize-left" @mousedown.stop="onMousedown($event, 'start', 'center')"></div>
<div class="drag-resize resize-right" @mousedown.stop="onMousedown($event, 'end', 'center')"></div>
<div class="drag-resize resize-top-left" @mousedown.stop="onMousedown($event, 'start', 'start')"></div>
<div class="drag-resize resize-top-right" @mousedown.stop="onMousedown($event, 'end', 'start')"></div>
<div class="drag-resize resize-bottom-left" @mousedown.stop="onMousedown($event, 'start', 'end')"></div>
<div class="drag-resize resize-bottom-right" @mousedown.stop="onMousedown($event, 'end', 'end')"></div>
<div
class="drag-resize resize-top"
draggable="true"
@mousedown.stop="onMousedown($event, 'center', 'start')"
></div>
<div
class="drag-resize resize-bottom"
draggable="true"
@mousedown.stop="onMousedown($event, 'center', 'end')"
></div>
<div
class="drag-resize resize-left"
draggable="true"
@mousedown.stop="onMousedown($event, 'start', 'center')"
></div>
<div
class="drag-resize resize-right"
draggable="true"
@mousedown.stop="onMousedown($event, 'end', 'center')"
></div>
<div
class="drag-resize resize-top-left"
draggable="true"
@mousedown.stop="onMousedown($event, 'start', 'start')"
></div>
<div
class="drag-resize resize-top-right"
draggable="true"
@mousedown.stop="onMousedown($event, 'end', 'start')"
></div>
<div
class="drag-resize resize-bottom-left"
draggable="true"
@mousedown.stop="onMousedown($event, 'start', 'end')"
></div>
<div
class="drag-resize resize-bottom-right"
draggable="true"
@mousedown.stop="onMousedown($event, 'end', 'end')"
></div>
</template>
<div v-if="showAction" ref="optionRef" class="corner-mark-right" :style="fixStyle">
<template v-if="!isModal">
Expand Down Expand Up @@ -68,7 +100,7 @@
<div v-show="hoverState.configure?.isContainer" class="corner-mark-bottom-right">拖放元素到容器内</div>
</div>
<div v-show="lineState.height && lineState.width" class="canvas-rect line">
<div :class="['hover-line', lineState.position]">
<div :class="['hover-line', lineState.position, { forbidden: lineState.forbidden }]">
<div v-if="lineState.position === 'in' && hoverState.configure" class="choose-slots"></div>
</div>
</div>
Expand Down Expand Up @@ -540,11 +572,12 @@ export default {
height: 100%;
background: var(--ti-lowcode-canvas-hover-line-in-bg-color);
}
&.forbid {
width: 100%;
height: 100%;
&.forbidden:not(.in) {
background: var(--ti-lowcode-canvas-hover-line-forbid-bg-color);
}
&.forbidden.in {
background: var(--ti-lowcode-canvas-hover-line-in-forbid-bg-color);
}
}
.choose-slots {
Expand Down
18 changes: 10 additions & 8 deletions packages/canvas/src/components/container/CanvasContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
:windowGetClickEventTarget="target"
:resize="canvasState.type === 'absolute'"
@select-slot="selectSlot"
@setting="settingModle"
@setting="settingModel"
></canvas-action>
<canvas-divider :selectState="selectState"></canvas-divider>
<canvas-resize-border :iframe="iframe"></canvas-resize-border>
Expand Down Expand Up @@ -55,7 +55,8 @@ import {
initCanvas,
clearLineState,
querySelectById,
getCurrent
getCurrent,
canvasApi
} from './container'
export default {
Expand All @@ -71,7 +72,7 @@ export default {
const insertPanel = ref(null)
const insertPosition = ref(false)
const loading = computed(() => useCanvas().isLoading())
let showSettingModle = ref(false)
let showSettingModel = ref(false)
let target = ref(null)
const setCurrentNode = async (event) => {
Expand Down Expand Up @@ -105,6 +106,8 @@ export default {
}
}
useCanvas().initCanvasApi(canvasApi)
const beforeCanvasReady = () => {
if (iframe.value) {
const win = iframe.value.contentWindow
Expand All @@ -119,7 +122,6 @@ export default {
iframeMonitoring()
initCanvas({ emit, renderer: detail, iframe: iframe.value, controller: props.controller })
useCanvas().renderer.value = { ...detail, ...window.canvasApi }
const doc = iframe.value.contentDocument
const win = iframe.value.contentWindow
Expand Down Expand Up @@ -179,8 +181,8 @@ export default {
}
}
// 设置弹窗
const settingModle = () => {
showSettingModle.value = true
const settingModel = () => {
showSettingModel.value = true
}
const updateI18n = (message) => {
Expand Down Expand Up @@ -237,9 +239,9 @@ export default {
canvasState,
insertComponent,
insertPanel,
settingModle,
settingModel,
target,
showSettingModle,
showSettingModel,
insertPosition,
loading
}
Expand Down
26 changes: 6 additions & 20 deletions packages/canvas/src/components/container/CanvasFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
props: {
data: {
type: Array,
default: []
default: () => []
}
},
emits: ['click']
Expand All @@ -44,37 +44,23 @@ export default {
li {
width: unset !important;
background: var(--ti-lowcode-breadcrumb-bg);
a {
.label {
padding: 0 3px 0 16px;
border-top: 0;
color: var(--ti-lowcode-breadcrumb-color);
transition: 0.3s;
&::after {
display: inline-block;
right: -6px;
border-left: 6px solid var(--ti-lowcode-breadcrumb-bg);
transition: 0.3s;
}
&::before {
display: inline-block;
right: -7px;
left: unset;
border-left: 6px solid var(--ti-lowcode-breadcrumb-icon-color);
transition: 0.3s;
z-index: 1;
}
&:hover {
background: var(--ti-lowcode-breadcrumb-hover-bg);
cursor: pointer;
&::after {
border-left-color: var(--ti-lowcode-breadcrumb-hover-bg);
border-left-color: var(--ti-steps-advanced-li-hover-bg-color);
}
}
}
&:last-child a {
&:last-child .label {
border-right: 0px solid var(--ti-lowcode-breadcrumb-color);
border-radius: 0;
}
&:first-child a {
&:first-child .label {
border-right: 0px solid var(--ti-lowcode-breadcrumb-color);
border-radius: 0;
border-left: unset;
Expand Down
Loading

0 comments on commit b94d758

Please sign in to comment.