diff --git a/designer-demo/package.json b/designer-demo/package.json index bc3dfdc01..30822897f 100644 --- a/designer-demo/package.json +++ b/designer-demo/package.json @@ -1,7 +1,7 @@ { "name": "designer-demo", "private": true, - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "type": "module", "scripts": { "dev": "cross-env VITE_THEME=light vite", diff --git a/designer-demo/public/mock/bundle.json b/designer-demo/public/mock/bundle.json index 700964c4a..358e84215 100644 --- a/designer-demo/public/mock/bundle.json +++ b/designer-demo/public/mock/bundle.json @@ -9060,7 +9060,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Select", + "exportName": "Breadcrumb", "version": "3.14.0", "destructuring": true, "script": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue.mjs", @@ -10732,7 +10732,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "PopEditor", + "exportName": "Popeditor", "version": "3.14.0", "destructuring": true, "script": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue.mjs", @@ -13441,18 +13441,14 @@ "props": { "text": "提交", "type": "primary", - "style": { - "margin": "0 5px 0 5px" - } + "style": "margin: 0 5px 0 5px;" } }, { "componentName": "TinyButton", "props": { "text": "重置", - "style": { - "margin": "0 5px 0 5px" - } + "style": "margin: 0 5px 0 5px;" } }, { @@ -13866,6 +13862,9 @@ "children": [ { "componentName": "TinyCarouselItem", + "props": { + "title": "carousel-item-a" + }, "children": [ { "componentName": "div", @@ -13877,6 +13876,9 @@ }, { "componentName": "TinyCarouselItem", + "props": { + "title": "carousel-item-b" + }, "children": [ { "componentName": "div", diff --git a/designer-demo/src/configurators/MyInputConfigurator.vue b/designer-demo/src/configurators/MyInputConfigurator.vue index 47a9b11e5..26dbd6be8 100644 --- a/designer-demo/src/configurators/MyInputConfigurator.vue +++ b/designer-demo/src/configurators/MyInputConfigurator.vue @@ -57,7 +57,7 @@ export default { font-size: 16px; &:hover { cursor: pointer; - color: var(--ti-lowcode-dialog-font-color); + color: var(--te-common-text-primary); } } diff --git a/mockServer/package.json b/mockServer/package.json index 1f8a7cd36..10c1e7c4f 100644 --- a/mockServer/package.json +++ b/mockServer/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-mock", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/mockServer/src/services/app.js b/mockServer/src/services/app.js index 33f4a4bf1..11ff3c3de 100644 --- a/mockServer/src/services/app.js +++ b/mockServer/src/services/app.js @@ -10,13 +10,13 @@ * */ -import { pageService } from '../routes/main-routes' +import { mockService } from '../routes/main-routes' import { getResponseData } from '../tool/Common' export default class AppService { async lock(query) { const { id, state } = query - const occupier = state === 'occupy' ? pageService.userInfo : null - await pageService.update(id, { occupier }) + const occupier = state === 'occupy' ? mockService.pageService.userInfo : null + await mockService.pageService.update(id, { occupier }) return getResponseData({ operate: 'success', occupier diff --git a/mockServer/src/services/block.js b/mockServer/src/services/block.js index c8071fe10..f29c00ad6 100644 --- a/mockServer/src/services/block.js +++ b/mockServer/src/services/block.js @@ -72,7 +72,8 @@ export default class BlockService { async detail(blockId) { const result = await this.db.findOneAsync({ _id: blockId }) - return result + + return getResponseData(result) } async delete(blockId) { diff --git a/packages/blockToWebComponentTemplate/package.json b/packages/blockToWebComponentTemplate/package.json index cdce2f488..911654858 100644 --- a/packages/blockToWebComponentTemplate/package.json +++ b/packages/blockToWebComponentTemplate/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-block-build", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "translate block to webcomponent template", "main": "./dist/web-components.es.js", "type": "module", diff --git a/packages/build/vite-config/package.json b/packages/build/vite-config/package.json index e6ae9335b..ac2368b9b 100644 --- a/packages/build/vite-config/package.json +++ b/packages/build/vite-config/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-vite-config", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "", "type": "module", "main": "./index.js", diff --git a/packages/build/vite-plugin-meta-comments/package.json b/packages/build/vite-plugin-meta-comments/package.json index 7b58bb512..36ca792ed 100644 --- a/packages/build/vite-plugin-meta-comments/package.json +++ b/packages/build/vite-plugin-meta-comments/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-vite-plugin-meta-comments", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "", "type": "module", "main": "dist/index.cjs", diff --git a/packages/builtinComponent/package.json b/packages/builtinComponent/package.json index 3e8d9485e..4248a2a53 100644 --- a/packages/builtinComponent/package.json +++ b/packages/builtinComponent/package.json @@ -1,9 +1,9 @@ { "name": "@opentiny/tiny-engine-builtin-component", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "", - "main": "dist/index.js", - "module": "dist/index.js", + "main": "dist/index.mjs", + "module": "dist/index.mjs", "type": "module", "publishConfig": { "access": "public" diff --git a/packages/builtinComponent/vite.config.js b/packages/builtinComponent/vite.config.js index d77e390b5..ef36eb9c2 100644 --- a/packages/builtinComponent/vite.config.js +++ b/packages/builtinComponent/vite.config.js @@ -23,7 +23,7 @@ export default defineConfig({ lib: { entry: path.resolve(__dirname, './index.js'), name: 'builtinComponent', - fileName: () => 'index.js', + fileName: () => 'index.mjs', formats: ['es'] }, rollupOptions: { diff --git a/packages/canvas/container/src/components/CanvasAction.vue b/packages/canvas/container/src/components/CanvasAction.vue index 04284bf0e..c3a2ba3f5 100644 --- a/packages/canvas/container/src/components/CanvasAction.vue +++ b/packages/canvas/container/src/components/CanvasAction.vue @@ -671,21 +671,8 @@ export default { } } } -.short-cut-set.tiny-popper.tiny-popover { - background: var(--ti-lowcode-toolbar-bg); +.short-cut-set.short-cut-set.tiny-popper.tiny-popover { padding: 10px; - .body label, - .header { - color: var(--ti-lowcode-dialog-font-color); - font-size: 12px; - } - .tiny-popover__title { - color: var(--ti-lowcode-dialog-font-color); - } -} - -.short-cut-set.tiny-popper.tiny-popover[x-placement^='bottom'] .popper__arrow::after { - border-bottom-color: var(--ti-lowcode-toolbar-bg); } .drag-resize { diff --git a/packages/canvas/container/src/components/CanvasDivider.vue b/packages/canvas/container/src/components/CanvasDivider.vue index 9f0b9dcd5..0b333fcd1 100644 --- a/packages/canvas/container/src/components/CanvasDivider.vue +++ b/packages/canvas/container/src/components/CanvasDivider.vue @@ -215,7 +215,7 @@ export default { left: v-bind('state.horizontalLeft'); } &:hover { - background-color: var(--ti-lowcode-common-primary-color); + background-color: var(--te-common-bg-primary-checked); .divider { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAGKADAAQAAAABAAAAGAAAAADiNXWtAAACbElEQVRIDZ2Vu2sVURCH9yZgbCxMsFFjKQkExScREgQtLISAXbS4GDu10fgHiL1gpxKDCLFRfICCCSpCwEiCYiNWFkYsImIRH4jgY/x+xzNy7t29614HvsycmfnN3j1nd5Nl0cysDrPwEV7DRVjn9Vaent7Y+wYvrWbUG/pJTIHsCzyBd1pg8v0NzcmC2kDswdkizIFmyKZCK4F+uWwGelxPfAx+wFPPpZ58JzyHX3DEa8TdoFmyesYf3ZKu+nd40nyJvGzEc+7JjYWK2aTn3JPXRTRzVhdYhjkvpp78KMieNeW7yGnPZYfSmsfktV3LHSSWoNVhro+CbTTvdzH+KGyI61batdSXdAcXQDYWBcGx1m2+ha/wHRZUwK+C9/ABtA3q6W7S+vadl6AH9LT8hAk4CKdAQtlJuBIis3340zE+gR+PsXqlkVYzNEsz/5wrQR/MQ2qfWYzHX72RWE+UnppPoP3vijUNVm9qCyz60rvSnXTAJtBjOwKr0wbWV8GtaDulkVYzdLbtGaLdINPed1ZVt3Mlf/21r8NVL1Cpj1+sM9IZvAK9uY8qCas2MfAGyPbC9RCZDVXVl/YxbHsc+FCNxDpE3cWDUmHVIoPug2yna4hvhYzZLs/9l2fInjjoZjqA3JaYn07zbccM0Qujw839TyB3B2Q72h4sAcIDQW52uWiABsf63aJ6aQ6h3uqX8A38q5nTULsHsq25YlkCweEgMzv3j77B2He7rK+hhmAFLII+YGsaigULevSU6bHdXFDOp2g8DrIz+Wo+Q99Q6Da7lq9mWdG3aCWNL+BskaA5V6vVHpPT8FpzTevfkrgJcwZ0OJIAAAAASUVORK5CYII=); } @@ -232,7 +232,7 @@ export default { .divider-line { position: absolute; - border: 1px dashed var(--ti-lowcode-common-primary-color); + border: 1px dashed var(--te-common-border-checked); z-index: 2; } diff --git a/packages/canvas/container/src/components/CanvasResizeBorder.vue b/packages/canvas/container/src/components/CanvasResizeBorder.vue index ef310dd22..136d9d46e 100644 --- a/packages/canvas/container/src/components/CanvasResizeBorder.vue +++ b/packages/canvas/container/src/components/CanvasResizeBorder.vue @@ -199,7 +199,7 @@ export default { &::after { content: ''; display: block; - border: 1px solid var(--ti-lowcode-common-primary-color); + border: 1px solid var(--te-common-border-checked); } &.resize-vertical { cursor: ns-resize; diff --git a/packages/canvas/container/src/components/shortCutPopover.vue b/packages/canvas/container/src/components/shortCutPopover.vue index e01f26c74..4722705e0 100644 --- a/packages/canvas/container/src/components/shortCutPopover.vue +++ b/packages/canvas/container/src/components/shortCutPopover.vue @@ -86,7 +86,7 @@ export default { display: flex; align-items: center; padding: 0 10px; - border-bottom: 1px solid var(--ti-lowcode-toolbar-border-color, #333); + border-bottom: 1px solid var(--te-common-border-default, #333); height: 36px; div { @@ -96,7 +96,7 @@ export default { .icon-setting { font-size: 16px; - fill: var(--ti-lowcode-toolbar-breadcrumb-color, #d9d9d9); + fill: var(--te-common-text-secondary, #d9d9d9); } .icon-wrap { @@ -111,7 +111,7 @@ export default { align-items: center; transition: 0.3s; &:hover { - fill: var(--ti-lowcode-toolbar-icon-color, #fff); + fill: var(--te-common-icon-primary, #fff); background: var(--ti-lowcode-icon-hover-bg, rgba(255, 255, 255, 0.1)); } } @@ -164,14 +164,14 @@ export default { width: 100%; padding: 4px 0; display: inline-block; - background: var(--ti-lowcode-toolbar-view-hover-bg, #4d4d4d); + background: var(--te-common-bg-container, #4d4d4d); border-radius: 2px; display: flex; justify-content: center; align-items: center; } svg { - fill: var(--ti-lowcode-toolbar-breadcrumb-color, #d9d9d9); + fill: var(--te-common-text-secondary, #d9d9d9); margin-left: 4px; } } diff --git a/packages/canvas/layout/src/CanvasLayout.vue b/packages/canvas/layout/src/CanvasLayout.vue index bb75e3226..9ddbbfd1e 100644 --- a/packages/canvas/layout/src/CanvasLayout.vue +++ b/packages/canvas/layout/src/CanvasLayout.vue @@ -21,7 +21,7 @@ const siteCanvasStyle = computed(() => { diff --git a/packages/common/js/http.js b/packages/common/js/http.js index 5d31972e1..2460db797 100644 --- a/packages/common/js/http.js +++ b/packages/common/js/http.js @@ -12,7 +12,7 @@ import { isVsCodeEnv } from './environments' import { generateRouter, generatePage } from './vscodeGenerateFile' -import { usePage, useCanvas, useNotify } from '@opentiny/tiny-engine-meta-register' +import { usePage, useCanvas, useNotify, useBreadcrumb } from '@opentiny/tiny-engine-meta-register' import { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register' /** @@ -37,7 +37,7 @@ export const requestEvent = (url, params) => { * @returns { Promise } * */ -export const handlePageUpdate = (pageId, params, routerChange) => { +export const handlePageUpdate = (pageId, params, routerChange, isCurEditPage) => { return getMetaApi(META_SERVICE.Http) .post(`/app-center/api/pages/update/${pageId}`, params) .then((res) => { @@ -58,14 +58,19 @@ export const handlePageUpdate = (pageId, params, routerChange) => { } } - if (routerChange) { - pageSettingState.updateTreeData() - } + // 更新页面管理的列表,如果不存在,说明还没有打开过页面管理面板 + pageSettingState.updateTreeData?.() pageSettingState.isNew = false useNotify({ message: '保存成功!', type: 'success' }) // 更新 页面状态 标志 setSaved(true) + + if (isCurEditPage) { + const { setBreadcrumbPage } = useBreadcrumb() + setBreadcrumbPage([params.name]) + } + return res }) .catch((err) => { diff --git a/packages/common/js/verification.js b/packages/common/js/verification.js index 3c3bb8d90..5bb5b5ff3 100644 --- a/packages/common/js/verification.js +++ b/packages/common/js/verification.js @@ -14,7 +14,7 @@ export const REGEXP_EVENT_NAME = /^[a-z]+([A-Z][a-z]*)*$/ export const verifyEventName = (name) => REGEXP_EVENT_NAME.test(name) -export const REGEXP_BLOCK_NAME = /^([A-Z][A-Za-z0-9]{2,})*?([A-Z][A-Za-z0-9]{2,})*?$/ +export const REGEXP_BLOCK_NAME = /^([A-Z][a-z0-9]*){2,}$/ export const verifyBlockName = (string) => REGEXP_BLOCK_NAME.test(string) diff --git a/packages/common/package.json b/packages/common/package.json index ad56b4597..25a74d7b4 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-common", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/configurator/package.json b/packages/configurator/package.json index 54decdf63..8e3cf3eef 100644 --- a/packages/configurator/package.json +++ b/packages/configurator/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-configurator", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "", "main": "dist/index.js", "module": "dist/index.js", diff --git a/packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue b/packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue index e8839afde..2582c7bc6 100644 --- a/packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue +++ b/packages/configurator/src/js-slot-configurator/JsSlotConfigurator.vue @@ -19,13 +19,13 @@ @@ -86,33 +86,41 @@ export default { const paramsPropPath = (index) => `${index}.params` - const parmasStringValidator = (rule, value, callback) => { - if (value && value.split(',').some((parma) => !verifyJsVarName(parma))) { + const paramsStringValidator = (rule, value, callback) => { + if (value && value.split(',').some((param) => !verifyJsVarName(param))) { callback(new Error('仅支持JavaScript中有效的变量名')) } else { callback() } } - const toggleSlot = (idx, { bind, name, params = '' }) => { - const slotInfo = { - [name]: { - type: 'JSSlot', - value: [ - { - componentName: 'div' - } - ] - } + const updateSlotParams = (slotData) => { + emit('update:modelValue', slotData) + + // 更新当前选中组件的根属性,不更新在jsslot中的数据非响应式 + const [propsName] = path.split('.') + const schema = useProperties().getSchema() + schema.props[propsName] = JSON.parse(JSON.stringify(schema.props[propsName])) + } + + const setSlotParams = ({ name, params = '' }) => { + if (!props.modelValue?.[name]) { + return } - const slotData = { ...slotInfo, ...(props.modelValue || {}) } + const slotData = { ...(props.modelValue || {}) } if (params.length) { slotData[name].params = params.split(',') } else { delete slotData[name].params } + + updateSlotParams(slotData) + } + + const toggleSlot = (idx, { bind, name, params = '' }) => { + // 原本绑定的,解除绑定 if (bind) { useModal().confirm({ title: '提示', @@ -120,33 +128,39 @@ export default { status: 'info', exec: () => { slotList.value[idx].bind = false - delete slotData[name] - emit('update:modelValue', slotData) - const [propsName] = path.split('.') - const schema = useProperties().getSchema() - schema.props[propsName] = JSON.parse(JSON.stringify(schema.props[propsName])) - }, - cancel: () => {} + const { [name]: _deleted, ...rest } = { ...(props.modelValue || {}) } + updateSlotParams(rest) + } }) - } else { - slotList.value[idx].bind = true + + return } - emit('update:modelValue', slotData) - // 更新当前选中组件的根属性,不根新在jsslot中的数据非响应式 - const [propsName] = path.split('.') - const schema = useProperties().getSchema() - schema.props[propsName] = JSON.parse(JSON.stringify(schema.props[propsName])) - } + // 未绑定的,新增绑定 + slotList.value[idx].bind = true + + const slotInfo = { + [name]: { + type: 'JSSlot', + value: [ + { + componentName: 'div' + } + ] + } + } + + if (params.length) { + slotInfo[name].params = params.split(',') + } - const setParams = (slot) => { - slot.bind && toggleSlot(true, slot) + updateSlotParams({ ...(props.modelValue || {}), ...slotInfo }) } - const validParmas = (slot, parmasPath) => { - slotRef.value.validateField([parmasPath], (tips) => { - if (!tips) { - setParams(slot) + const validParams = (paramsPath, slot) => { + slotRef.value.validateField([paramsPath], (error) => { + if (!error) { + slot.bind && setSlotParams(slot) } }) } @@ -161,9 +175,8 @@ export default { slotList, paramsPropPath, slotRef, - parmasStringValidator, - validParmas, - setParams, + paramsStringValidator, + validParams, state, componentsMap } diff --git a/packages/design-core/package.json b/packages/design-core/package.json index a7801876b..2ce53dfac 100644 --- a/packages/design-core/package.json +++ b/packages/design-core/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "type": "module", "description": "TinyEngine enables developers to customize low-code platforms, build low-bit platforms online in real time, and support secondary development or integration of low-bit platform capabilities.", "homepage": "https://opentiny.design/tiny-engine", diff --git a/packages/engine-cli/package.json b/packages/engine-cli/package.json index 49c4780bf..4851000bd 100644 --- a/packages/engine-cli/package.json +++ b/packages/engine-cli/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-cli", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "", "main": "dist/index.js", "scripts": { diff --git a/packages/engine-cli/template/designer/public/mock/bundle.json b/packages/engine-cli/template/designer/public/mock/bundle.json index 9e8a33138..1796684cd 100644 --- a/packages/engine-cli/template/designer/public/mock/bundle.json +++ b/packages/engine-cli/template/designer/public/mock/bundle.json @@ -76,10 +76,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "MyInputConfigurator", + "component": "InputConfigurator", "props": {} } }, @@ -97,7 +97,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "default", "widget": { @@ -134,7 +134,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -155,7 +155,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "I18nConfigurator", @@ -177,7 +177,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "number", "widget": { "component": "NumberConfigurator", @@ -199,11 +199,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -356,7 +356,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "default", "widget": { @@ -393,7 +393,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -414,10 +414,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -436,10 +436,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -458,10 +458,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -480,10 +480,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -502,10 +502,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -524,10 +524,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -546,10 +546,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -568,11 +568,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -678,7 +678,6 @@ "disabled": false, "cols": 12, "labelPosition": "top", - "type": "object", "widget": { "component": "CodeConfigurator", "props": { @@ -701,7 +700,6 @@ "disabled": false, "cols": 12, "labelPosition": "top", - "type": "object", "widget": { "component": "CodeConfigurator", "props": { @@ -723,10 +721,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -744,7 +742,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "right", "widget": { @@ -781,7 +779,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -803,7 +801,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -825,10 +823,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -846,11 +844,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "left", "widget": { - "component": "SelectConfigurator", + "component": "ButtonGroupConfigurator", "props": { "options": [ { @@ -879,11 +877,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -901,11 +899,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -923,11 +921,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -945,11 +943,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -967,7 +965,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "default", "widget": { @@ -1004,11 +1002,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -1027,11 +1025,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "device": [] @@ -1134,7 +1132,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -1155,7 +1153,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -1176,7 +1174,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -1197,10 +1195,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -1219,7 +1217,6 @@ "disabled": false, "cols": 12, "labelPosition": "top", - "type": "object", "widget": { "component": "CodeConfigurator", "props": { @@ -1241,7 +1238,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -1262,10 +1259,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -1283,10 +1280,10 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -1304,7 +1301,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "default", "widget": { @@ -1341,7 +1338,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -1362,7 +1359,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "SelectConfigurator", @@ -1485,7 +1482,6 @@ "disabled": false, "cols": 12, "labelPosition": "top", - "type": "array", "widget": { "component": "CodeConfigurator", "props": { @@ -1691,7 +1687,7 @@ { "property": "sortable", "type": "boolean", - "labelPosition": "top", + "labelPosition": "left", "label": { "text": { "zh_CN": "sortable" @@ -1703,7 +1699,7 @@ } }, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -1771,7 +1767,7 @@ { "property": "resizable", "type": "boolean", - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "label": { "text": { @@ -1784,7 +1780,7 @@ } }, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -1813,7 +1809,7 @@ { "property": "show-overflow-tooltip", "type": "boolean", - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "label": { "text": { @@ -1826,7 +1822,7 @@ } }, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -1963,7 +1959,7 @@ { "property": "reserve-selection", "type": "boolean", - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "label": { "text": { @@ -1976,7 +1972,7 @@ } }, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2024,7 +2020,7 @@ { "property": "filter-multiple", "type": "string", - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "label": { "text": { @@ -2037,7 +2033,7 @@ } }, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2116,7 +2112,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "number", "widget": { "component": "NumberConfigurator", @@ -2138,7 +2134,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "widget": { "component": "InputConfigurator", @@ -2160,11 +2156,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2182,11 +2178,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2204,7 +2200,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "type": "string", "defaultValue": "default", "widget": { @@ -2241,11 +2237,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2263,11 +2259,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": true, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2285,11 +2281,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2329,7 +2325,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "widget": { "component": "InputConfigurator", "props": {} @@ -2371,7 +2367,7 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "widget": { "component": "InputConfigurator", "props": {} @@ -2425,11 +2421,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } }, @@ -2447,11 +2443,11 @@ "readOnly": false, "disabled": false, "cols": 12, - "labelPosition": "top", + "labelPosition": "left", "defaultValue": false, "type": "boolean", "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} } } @@ -2749,12 +2745,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "name", @@ -2773,7 +2763,8 @@ }, "description": { "zh_CN": "幻灯片的名字,可用作 setActiveItem 的参数" - } + }, + "labelPosition": "left" }, { "property": "title", @@ -2792,7 +2783,8 @@ }, "description": { "zh_CN": "幻灯片的标题" - } + }, + "labelPosition": "left" }, { "property": "indicator-position", @@ -2806,7 +2798,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "ButtonGroupConfigurator", "props": { "options": [ { @@ -2822,7 +2814,8 @@ }, "description": { "zh_CN": "指示器的位置" - } + }, + "labelPosition": "left" } ] } @@ -2885,12 +2878,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "arrow", @@ -2938,12 +2925,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否自动切换" - } + }, + "labelPosition": "left" }, { "property": "tabs", @@ -3066,12 +3054,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否循环显示" - } + }, + "labelPosition": "left" }, { "property": "show-title", @@ -3085,12 +3074,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否显示标题" - } + }, + "labelPosition": "left" }, { "property": "trigger", @@ -3210,12 +3200,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "children", @@ -3254,7 +3238,8 @@ }, "description": { "zh_CN": "指定链接的 URL" - } + }, + "labelPosition": "left" }, { "property": "target", @@ -3268,7 +3253,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "ButtonGroupConfigurator", "props": { "options": [ { @@ -3360,12 +3345,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "children", @@ -3463,12 +3442,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "children", @@ -3564,12 +3537,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "type", @@ -3836,12 +3803,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 10, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "src", @@ -3912,12 +3873,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否显示控件" - } + }, + "labelPosition": "left" }, { "property": "autoplay", @@ -3931,12 +3893,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否马上播放" - } + }, + "labelPosition": "left" }, { "property": "attributes3", @@ -4011,12 +3974,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "src", @@ -4094,12 +4051,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "attributes3", @@ -4175,12 +4126,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "width", @@ -4291,12 +4236,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "colspan", @@ -4407,12 +4346,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "name", @@ -4536,12 +4469,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "for", @@ -4625,12 +4552,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "data", @@ -4685,7 +4606,8 @@ }, "description": { "zh_CN": "组件大小" - } + }, + "labelPosition": "left" }, { "property": "plain", @@ -4699,12 +4621,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否是朴素按钮" - } + }, + "labelPosition": "left" }, { "property": "disabled", @@ -4718,12 +4641,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" } ] } @@ -4785,12 +4709,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "layout", @@ -4855,12 +4773,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否为flex容器" - } + }, + "labelPosition": "left" }, { "property": "gutter", @@ -4940,12 +4859,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "disabled", @@ -4959,12 +4872,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "label-width", @@ -4998,12 +4912,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "行内布局模式,默认为 false" - } + }, + "labelPosition": "left" }, { "property": "label-align", @@ -5017,7 +4932,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5042,7 +4957,8 @@ }, "description": { "zh_CN": "表单中标签后缀" - } + }, + "labelPosition": "left" }, { "property": "label-position", @@ -5076,7 +4992,8 @@ }, "description": { "zh_CN": "表单中标签的布局位置" - } + }, + "labelPosition": "left" } ] }, @@ -5104,7 +5021,7 @@ "description": { "zh_CN": "表单数据对象" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "rules", @@ -5123,7 +5040,8 @@ }, "description": { "zh_CN": "表单验证规则" - } + }, + "labelPosition": "top" } ], "description": { @@ -5295,12 +5213,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "label", @@ -5340,7 +5252,8 @@ }, "description": { "zh_CN": "表单域 model 字段,在使用 validate、resetFields 方法的情况下,该属性是必填的" - } + }, + "labelPosition": "left" }, { "property": "required", @@ -5354,7 +5267,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5432,12 +5345,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "span", @@ -5716,12 +5623,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "text", @@ -5743,7 +5644,8 @@ }, "description": { "zh_CN": "按钮文字" - } + }, + "labelPosition": "left" }, { "property": "size", @@ -5784,7 +5686,8 @@ }, "description": { "zh_CN": "按钮大小" - } + }, + "labelPosition": "left" }, { "property": "disabled", @@ -5798,7 +5701,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5873,7 +5776,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5893,7 +5796,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5918,7 +5821,8 @@ }, "description": { "zh_CN": "设置禁用时间,防止重复提交,单位毫秒" - } + }, + "labelPosition": "left" }, { "property": "circle", @@ -5932,7 +5836,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5952,7 +5856,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -5972,7 +5876,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -6058,12 +5962,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -6113,7 +6011,8 @@ }, "description": { "zh_CN": "设置input框的type属性" - } + }, + "labelPosition": "left" }, { "property": "rows", @@ -6127,7 +6026,8 @@ }, "description": { "zh_CN": "输入框行数,只对 type='textarea' 有效" - } + }, + "labelPosition": "left" }, { "property": "placeholder", @@ -6161,7 +6061,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -6181,12 +6081,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "size", @@ -6220,7 +6121,8 @@ }, "description": { "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" - } + }, + "labelPosition": "left" } ] }, @@ -6247,8 +6149,7 @@ }, "description": { "zh_CN": "设置 input 框的maxLength" - }, - "labelPosition": "left" + } }, { "property": "autofocus", @@ -6262,7 +6163,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -6475,12 +6376,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "text", @@ -6550,12 +6445,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" } ] }, @@ -6579,12 +6475,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否显示边框" - } + }, + "labelPosition": "left" }, { "property": "size", @@ -6716,12 +6613,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 10, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -6775,7 +6666,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -6795,7 +6686,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -6815,12 +6706,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "options", @@ -6842,7 +6734,7 @@ "description": { "zh_CN": "配置 Select 下拉数据项" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "multiple", @@ -6856,7 +6748,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -6924,7 +6816,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7126,12 +7018,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "disabled", @@ -7145,7 +7031,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7170,7 +7056,8 @@ }, "description": { "zh_CN": "绑定默认值" - } + }, + "labelPosition": "left" }, { "property": "true-value", @@ -7224,7 +7111,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7330,12 +7217,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -7369,7 +7250,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7409,7 +7290,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7429,7 +7310,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7457,7 +7338,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7477,7 +7358,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7611,12 +7492,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -7650,12 +7525,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "checked", @@ -7669,7 +7545,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -7717,12 +7593,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否显示边框" - } + }, + "labelPosition": "left" }, { "property": "false-label", @@ -7741,7 +7618,8 @@ }, "description": { "zh_CN": "没有选中时的值" - } + }, + "labelPosition": "left" }, { "property": "true-label", @@ -7760,7 +7638,8 @@ }, "description": { "zh_CN": "选中时的值" - } + }, + "labelPosition": "left" } ], "description": { @@ -7872,12 +7751,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -7911,12 +7784,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "checked", @@ -7930,7 +7804,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8065,12 +7939,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -8106,12 +7974,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "options", @@ -8138,7 +8007,8 @@ }, "description": { "zh_CN": "checkbox组件列表" - } + }, + "labelPosition": "top" }, { "property": "type", @@ -8152,7 +8022,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "ButtonGroupConfigurator", "props": { "options": [ { @@ -8278,12 +8148,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "title", @@ -8317,7 +8181,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8357,12 +8221,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否开启弹窗的拖拽功能,默认值为 false 。" - } + }, + "labelPosition": "left" }, { "property": "center", @@ -8376,7 +8241,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8416,7 +8281,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8436,12 +8301,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否显示关闭按钮,默认值为 true 。" - } + }, + "labelPosition": "left" } ] } @@ -8560,12 +8426,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "showEditIcon", @@ -8579,7 +8439,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8641,7 +8501,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8661,7 +8521,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -8847,12 +8707,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "name", @@ -8945,7 +8799,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Select", + "exportName": "Breadcrumb", "version": "3.14.0", "destructuring": true, "script": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue.mjs", @@ -8962,12 +8816,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "separator", @@ -9008,7 +8856,8 @@ }, "description": { "zh_CN": "单独使用 Breadcrumb,通过 option 配置生成面包屑" - } + }, + "labelPosition": "top" }, { "property": "textField", @@ -9027,7 +8876,8 @@ }, "description": { "zh_CN": "指定面包屑的显示键值,结合 options 使用" - } + }, + "labelPosition": "left" } ] } @@ -9105,12 +8955,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "to", @@ -9200,12 +9044,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -9224,8 +9062,7 @@ }, "description": { "zh_CN": "双向绑定当前激活的面板" - }, - "labelPosition": "left" + } } ] } @@ -9334,12 +9171,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "name", @@ -9451,12 +9282,6 @@ "description": { "zh_CN": "基础属性" }, - "collapse": { - "number": 15, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "data", @@ -9478,7 +9303,8 @@ "onChange": "this.delProp('fetchData')", "description": { "zh_CN": "设置表格的数据" - } + }, + "labelPosition": "top" }, { "property": "columns", @@ -9535,9 +9361,10 @@ } }, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} - } + }, + "labelPosition": "left" }, { "property": "width", @@ -9756,7 +9583,7 @@ "description": { "zh_CN": "设置内置列的内容超出部分显示省略号配置,该属性的可选值为 ellipsis(只显示省略号)/ title(显示为原生 title)/ tooltip(显示为 tooltip 提示)" }, - "labelPosition": "left" + "labelPosition": "top" } ] } @@ -9798,7 +9625,8 @@ }, "description": { "zh_CN": "服务端数据查询方法" - } + }, + "labelPosition": "top" }, { "property": "pager", @@ -9825,7 +9653,8 @@ }, "description": { "zh_CN": "分页配置,需结合fetchData使用" - } + }, + "labelPosition": "top" }, { "property": "resizable", @@ -9839,7 +9668,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -9888,8 +9717,7 @@ }, "description": { "zh_CN": "表格行数据复选框配置项" - }, - "labelPosition": "left" + } }, { "property": "edit-rules", @@ -9909,7 +9737,7 @@ "description": { "zh_CN": "表格校验规则配置项" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "edit-config", @@ -9928,7 +9756,8 @@ }, "description": { "zh_CN": "表格编辑配置项" - } + }, + "labelPosition": "top" }, { "property": "expand-config", @@ -9948,7 +9777,7 @@ "description": { "zh_CN": "展开行配置项" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "sortable", @@ -9962,7 +9791,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -9979,12 +9808,6 @@ "description": { "zh_CN": "其他属性" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "auto-resize", @@ -9998,7 +9821,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10018,7 +9841,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10038,7 +9861,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10058,7 +9881,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10078,7 +9901,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10104,7 +9927,7 @@ "description": { "zh_CN": "给行附加 className,也可以是函数 Function({seq, row, rowIndex, $rowIndex})" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "max-height", @@ -10123,8 +9946,7 @@ }, "description": { "zh_CN": "设置表格内容区域(不含表格头部,底部)的最大高度。" - }, - "labelPosition": "left" + } }, { "property": "row-span", @@ -10144,7 +9966,7 @@ "description": { "zh_CN": "设置行合并,该属性仅适用于普通表格,不可与 tree-config 同时使用" }, - "labelPosition": "left" + "labelPosition": "top" } ] } @@ -10375,12 +10197,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 10, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "currentPage", @@ -10597,7 +10413,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "PopEditor", + "exportName": "Popeditor", "version": "3.14.0", "destructuring": true, "script": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue.mjs", @@ -10614,12 +10430,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -10673,7 +10483,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10693,12 +10503,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" } ] }, @@ -10746,7 +10557,7 @@ "description": { "zh_CN": "当弹出面板配置的是表格时,设置弹出面板中的过滤条件" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "grid-op", @@ -10765,8 +10576,7 @@ }, "description": { "zh_CN": "设置弹出面板中表格组件的配置信息" - }, - "labelPosition": "left" + } }, { "property": "pager-op", @@ -10786,7 +10596,7 @@ "description": { "zh_CN": "设置弹出编辑框中分页配置" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "multi", @@ -10800,7 +10610,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -10820,12 +10630,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "当 popseletor 为 grid 时才能生效,配置为 true 后还需配置 pagerOp 属性" - } + }, + "labelPosition": "left" } ], "description": { @@ -10982,12 +10793,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 10, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "show-checkbox", @@ -11001,7 +10806,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -11036,7 +10841,8 @@ }, "description": { "zh_CN": "可配置静态数据源和动态数据源" - } + }, + "labelPosition": "top" }, { "property": "node-key", @@ -11092,7 +10898,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -11118,7 +10924,7 @@ "description": { "zh_CN": "节点展开图标" }, - "labelPosition": "left" + "labelPosition": "top" }, { "property": "shrink-icon", @@ -11138,7 +10944,7 @@ "description": { "zh_CN": "节点收缩的图标" }, - "labelPosition": "left" + "labelPosition": "top" } ] }, @@ -11160,7 +10966,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -11186,7 +10992,7 @@ "description": { "zh_CN": "节点筛选函数" }, - "labelPosition": "left" + "labelPosition": "top" } ], "description": { @@ -11322,12 +11128,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "horizontal", @@ -11350,12 +11150,13 @@ "readOnly": false, "disabled": false, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "节点和文字横向布局" - } + }, + "labelPosition": "left" }, { "property": "vertical", @@ -11378,12 +11179,13 @@ "readOnly": false, "disabled": false, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "节点和文字垂直布局" - } + }, + "labelPosition": "left" }, { "property": "active", @@ -11439,7 +11241,7 @@ "description": { "zh_CN": "时间线步骤条数据" }, - "labelPosition": "left" + "labelPosition": "top" } ] } @@ -11533,12 +11335,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 20, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "placement", @@ -11629,7 +11425,8 @@ }, "description": { "zh_CN": "显示的内容,也可以通过 slot#content 传入 DOM" - } + }, + "labelPosition": "left" }, { "property": "render-content", @@ -11663,12 +11460,13 @@ "defaultValue": true, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "状态是否可见" - } + }, + "labelPosition": "left" }, { "property": "manual", @@ -11679,12 +11477,13 @@ }, "defaultValue": true, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效" - } + }, + "labelPosition": "left" } ] } @@ -11757,12 +11556,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -11776,7 +11569,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -11891,7 +11684,8 @@ }, "description": { "zh_CN": "触发方式,该属性的可选值为 click / focus / hover / manual,该属性的默认值为 click" - } + }, + "labelPosition": "left" }, { "property": "popper-class", @@ -11925,12 +11719,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否显示 Tooltip 箭头" - } + }, + "labelPosition": "left" }, { "property": "append-to-body", @@ -11944,12 +11739,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "Popover弹窗是否添加到body上" - } + }, + "labelPosition": "left" }, { "property": "arrow-offset", @@ -11987,7 +11783,8 @@ }, "description": { "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" - } + }, + "labelPosition": "left" }, { "property": "content", @@ -12006,7 +11803,8 @@ }, "description": { "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" - } + }, + "labelPosition": "left" }, { "property": "disabled", @@ -12020,12 +11818,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "Popover 是否可用" - } + }, + "labelPosition": "left" }, { "property": "offset", @@ -12044,7 +11843,8 @@ }, "description": { "zh_CN": "出现位置的偏移量" - } + }, + "labelPosition": "left" }, { "property": "open-delay", @@ -12063,7 +11863,8 @@ }, "description": { "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" - } + }, + "labelPosition": "left" }, { "property": "popper-options", @@ -12082,7 +11883,8 @@ }, "description": { "zh_CN": "popper.js 的参数" - } + }, + "labelPosition": "top" }, { "property": "title", @@ -12101,7 +11903,8 @@ }, "description": { "zh_CN": "提示内容标题" - } + }, + "labelPosition": "left" }, { "property": "transform-origin", @@ -12115,12 +11918,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "组件的旋转中心点,组件的旋转中心点" - } + }, + "labelPosition": "left" }, { "property": "transition", @@ -12139,7 +11943,8 @@ }, "description": { "zh_CN": "该属性的默认值为 fade-in-linear" - } + }, + "labelPosition": "left" }, { "property": "width", @@ -12158,7 +11963,8 @@ }, "description": { "zh_CN": "宽度" - } + }, + "labelPosition": "left" } ] } @@ -12245,12 +12051,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -12308,7 +12108,8 @@ }, "description": { "zh_CN": "设置日期框的type属性" - } + }, + "labelPosition": "left" }, { "property": "placeholder", @@ -12342,7 +12143,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -12362,12 +12163,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "readonly", @@ -12381,12 +12183,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否只读" - } + }, + "labelPosition": "left" }, { "property": "size", @@ -12420,7 +12223,8 @@ }, "description": { "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" - } + }, + "labelPosition": "left" } ] }, @@ -12447,8 +12251,7 @@ }, "description": { "zh_CN": "设置 input 框的maxLength" - }, - "labelPosition": "left" + } }, { "property": "autofocus", @@ -12462,7 +12265,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -12663,12 +12466,6 @@ "description": { "zh_CN": "基础信息" }, - "collapse": { - "number": 6, - "text": { - "zh_CN": "显示更多" - } - }, "content": [ { "property": "modelValue", @@ -12721,7 +12518,7 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { @@ -12741,12 +12538,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否禁用" - } + }, + "labelPosition": "left" }, { "property": "size", @@ -12780,7 +12578,8 @@ }, "description": { "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" - } + }, + "labelPosition": "left" }, { "property": "controls", @@ -12794,12 +12593,13 @@ "disabled": false, "cols": 12, "widget": { - "component": "SwitchConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { "zh_CN": "是否使用加减按钮" - } + }, + "labelPosition": "left" }, { "property": "controls-position", @@ -12829,8 +12629,7 @@ }, "description": { "zh_CN": "加减按钮位置" - }, - "labelPosition": "left" + } }, { "property": "precision", @@ -13267,18 +13066,14 @@ "props": { "text": "提交", "type": "primary", - "style": { - "margin": "0 5px 0 5px" - } + "style": "margin: 0 5px 0 5px;" } }, { "componentName": "TinyButton", "props": { "text": "重置", - "style": { - "margin": "0 5px 0 5px" - } + "style": "margin: 0 5px 0 5px;" } }, { @@ -13689,6 +13484,9 @@ "children": [ { "componentName": "TinyCarouselItem", + "props": { + "title": "carousel-item-a" + }, "children": [ { "componentName": "div", @@ -13700,6 +13498,9 @@ }, { "componentName": "TinyCarouselItem", + "props": { + "title": "carousel-item-b" + }, "children": [ { "componentName": "div", diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 11220390c..8dda4c5c0 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-i18n-host", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/layout/package.json b/packages/layout/package.json index cd6726ed0..e2827290a 100644 --- a/packages/layout/package.json +++ b/packages/layout/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-layout", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "scripts": { "build": "vite build" }, diff --git a/packages/plugins/block/package.json b/packages/plugins/block/package.json index 8ef1ff8ba..e763e5919 100644 --- a/packages/plugins/block/package.json +++ b/packages/plugins/block/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-block", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/block/src/BlockSetting.vue b/packages/plugins/block/src/BlockSetting.vue index b047ed5e9..ae060a0e1 100644 --- a/packages/plugins/block/src/BlockSetting.vue +++ b/packages/plugins/block/src/BlockSetting.vue @@ -82,7 +82,7 @@ import { reactive, ref, watch, watchEffect, computed } from 'vue' import { Button as TinyButton, Collapse as TinyCollapse, CollapseItem as TinyCollapseItem } from '@opentiny/vue' import { useModal } from '@opentiny/tiny-engine-meta-register' -import { getMergeMeta } from '@opentiny/tiny-engine-meta-register' +import { getMergeMeta, useBlock } from '@opentiny/tiny-engine-meta-register' import { BlockHistoryList, PluginSetting, CloseIcon, SvgButton, ButtonGroup } from '@opentiny/tiny-engine-common' import { previewBlock } from '@opentiny/tiny-engine-common/js/preview' import { LifeCycles } from '@opentiny/tiny-engine-common' @@ -217,8 +217,11 @@ export default { status, message, exec: async () => { - // 获取区块截图 - block.screenshot = await getBlockBase64() + const currentId = useBlock().getCurrentBlock()?.id + if (block.id === currentId) { + // 获取区块截图 + block.screenshot = await getBlockBase64() + } saveBlock(block) } }) diff --git a/packages/plugins/block/src/Main.vue b/packages/plugins/block/src/Main.vue index 7000b3f84..43085bebb 100644 --- a/packages/plugins/block/src/Main.vue +++ b/packages/plugins/block/src/Main.vue @@ -290,10 +290,11 @@ export default { boxVisibility.value = false } const editBlock = async (block) => { - const isEdite = true + const isEdit = true + if (isSaved()) { await refreshBlockData(block) - useBlock().initBlock(block, {}, isEdite) + useBlock().initBlock(block, {}, isEdit) useLayout().closePlugin() closePanel() const url = new URL(window.location) @@ -305,7 +306,7 @@ export default { message: '当前画布内容尚未保存,是否要继续切换?', exec: async () => { await refreshBlockData(block) - useBlock().initBlock(block, {}, isEdite) + useBlock().initBlock(block, {}, isEdit) useLayout().closePlugin() closePanel() } diff --git a/packages/plugins/block/src/js/blockSetting.jsx b/packages/plugins/block/src/js/blockSetting.jsx index 490ada401..d93804574 100644 --- a/packages/plugins/block/src/js/blockSetting.jsx +++ b/packages/plugins/block/src/js/blockSetting.jsx @@ -435,7 +435,7 @@ export const refreshBlockData = async (block = {}) => { const newBlock = await fetchBlockContent(block.id) if (newBlock) { - if (newBlock.public_scope_tenants.length) { + if (newBlock?.public_scope_tenants?.length) { newBlock.public_scope_tenants = newBlock.public_scope_tenants.map((e) => e.id) } Object.assign(block, newBlock) @@ -664,7 +664,13 @@ const updateBlock = (block = {}) => { ) .then((data) => { useCanvas().setSaved(true) - useBlock().initBlock(data, {}, true) + const currentId = useBlock().getCurrentBlock()?.id + + // 如果是当前正在编辑的区块,需要同步更新画布 + if (currentId === id) { + useBlock().initBlock(data, {}, true) + } + // 弹出保存区块成功 useModal().message({ message: '保存区块成功!', status: 'success' }) // 本地生成区块服务 diff --git a/packages/plugins/bridge/package.json b/packages/plugins/bridge/package.json index 8e28af161..1ab9dd8a7 100644 --- a/packages/plugins/bridge/package.json +++ b/packages/plugins/bridge/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-bridge", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/datasource/package.json b/packages/plugins/datasource/package.json index b77361dd4..4ca0a1afb 100644 --- a/packages/plugins/datasource/package.json +++ b/packages/plugins/datasource/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-datasource", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/datasource/src/DataSourceRecordList.vue b/packages/plugins/datasource/src/DataSourceRecordList.vue index d15066de9..f24d2868e 100644 --- a/packages/plugins/datasource/src/DataSourceRecordList.vue +++ b/packages/plugins/datasource/src/DataSourceRecordList.vue @@ -473,6 +473,7 @@ export default { grid.value.removeSelecteds() state.totalData = state.totalData.filter(({ _id }) => !selectedData.includes(_id)) fetchData() + state.isBatchDeleteDisable = true } }) } diff --git a/packages/plugins/datasource/src/DataSourceRemoteDataResult.vue b/packages/plugins/datasource/src/DataSourceRemoteDataResult.vue index ed81a4a5a..5cdf2319e 100644 --- a/packages/plugins/datasource/src/DataSourceRemoteDataResult.vue +++ b/packages/plugins/datasource/src/DataSourceRemoteDataResult.vue @@ -10,7 +10,13 @@ 查看已获取的字段 复制代码 - + @@ -64,11 +70,16 @@ export default { const check = () => { emit('check') } + const handleChange = (val) => { + state.value = val + } + return { state, copyData, check, - editor + editor, + handleChange } } } diff --git a/packages/plugins/help/package.json b/packages/plugins/help/package.json index 6a03b7930..ac7dd191f 100644 --- a/packages/plugins/help/package.json +++ b/packages/plugins/help/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-help", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/i18n/package.json b/packages/plugins/i18n/package.json index b64bf3103..b33bfa8ef 100644 --- a/packages/plugins/i18n/package.json +++ b/packages/plugins/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-i18n", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/materials/package.json b/packages/plugins/materials/package.json index 2b3b678da..b615157e4 100644 --- a/packages/plugins/materials/package.json +++ b/packages/plugins/materials/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-materials", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/page/package.json b/packages/plugins/page/package.json index b64669e8b..bb6e45394 100644 --- a/packages/plugins/page/package.json +++ b/packages/plugins/page/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-page", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/page/src/PageSetting.vue b/packages/plugins/page/src/PageSetting.vue index 4558d2274..2578c1d19 100644 --- a/packages/plugins/page/src/PageSetting.vue +++ b/packages/plugins/page/src/PageSetting.vue @@ -210,8 +210,9 @@ export default { const updatePage = (id, params) => { const routerChange = pageSettingState.currentPageDataCopy.route !== pageSettingState.currentPageData.route + const isCurEditPage = pageState?.currentPage?.id === id - return handlePageUpdate(id, params, routerChange) + return handlePageUpdate(id, params, routerChange, isCurEditPage) } const restorePage = (pageData) => { diff --git a/packages/plugins/robot/package.json b/packages/plugins/robot/package.json index 0d83a3246..4d02efce6 100644 --- a/packages/plugins/robot/package.json +++ b/packages/plugins/robot/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-robot", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/schema/package.json b/packages/plugins/schema/package.json index c2b768e9b..b4f5d7e63 100644 --- a/packages/plugins/schema/package.json +++ b/packages/plugins/schema/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-schema", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/script/package.json b/packages/plugins/script/package.json index 0b95fe9c1..3268c4bd1 100644 --- a/packages/plugins/script/package.json +++ b/packages/plugins/script/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-script", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/state/package.json b/packages/plugins/state/package.json index b4fa6f913..e5b691836 100644 --- a/packages/plugins/state/package.json +++ b/packages/plugins/state/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-state", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/tree/package.json b/packages/plugins/tree/package.json index 6226fadc1..18927a2ec 100644 --- a/packages/plugins/tree/package.json +++ b/packages/plugins/tree/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-tree", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/plugins/tutorial/package.json b/packages/plugins/tutorial/package.json index 44fbf1392..b0ec42ec9 100644 --- a/packages/plugins/tutorial/package.json +++ b/packages/plugins/tutorial/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-plugin-tutorial", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/register/package.json b/packages/register/package.json index 809501268..72dcd34a3 100644 --- a/packages/register/package.json +++ b/packages/register/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-meta-register", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "description": "", "type": "module", "main": "dist/index.js", diff --git a/packages/settings/design/package.json b/packages/settings/design/package.json index de6a76914..f6cfdba8d 100644 --- a/packages/settings/design/package.json +++ b/packages/settings/design/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-setting-design", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/settings/events/package.json b/packages/settings/events/package.json index c39cb90a5..4c0bf2c95 100644 --- a/packages/settings/events/package.json +++ b/packages/settings/events/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-setting-events", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/settings/events/src/components/BindEvents.vue b/packages/settings/events/src/components/BindEvents.vue index 515fc08eb..5dfade520 100644 --- a/packages/settings/events/src/components/BindEvents.vue +++ b/packages/settings/events/src/components/BindEvents.vue @@ -17,12 +17,12 @@ @@ -39,7 +39,7 @@
- {{ action.eventName }}{{ state.componentEvents[action.eventName].label.zh_CN }} + {{ action.eventName }}{{ renderEventList[action.eventName]?.label?.[locale] }}
{{ action.linkedEventName }}
{{ action.ref }} @@ -73,7 +73,7 @@ @@ -92,6 +92,7 @@ import { getMetaApi, META_APP } from '@opentiny/tiny-engine-meta-register' +import i18n from '@opentiny/tiny-engine-common/js/i18n' import { BlockLinkEvent, SvgButton } from '@opentiny/tiny-engine-common' import { iconChevronDown } from '@opentiny/vue-icon' import BindEventsDialog, { open as openDialog } from './BindEventsDialog.vue' @@ -114,33 +115,32 @@ export default { const { getBlockEvents, getCurrentBlock, removeEventLink } = useBlock() const { getMaterial } = useMaterial() const { confirm } = useModal() - + const locale = i18n.global.locale.value const { highlightMethod } = getMetaApi(META_APP.Page) - const { commonEvents = {} } = getMergeMeta('engine.setting.event').options const state = reactive({ eventName: '', // 事件名称 eventBinding: null, // 事件绑定的处理方法对象 componentEvent: {}, - componentEvents: commonEvents, + customEvents: commonEvents, bindActions: {}, showBindEventDialog: false }) const isBlock = computed(() => Boolean(pageState.isBlock)) const isEmpty = computed(() => Object.keys(state.bindActions).length === 0) + const renderEventList = computed(() => ({ ...state.componentEvent, ...state.customEvents })) watchEffect(() => { const componentName = pageState?.currentSchema?.componentName const componentSchema = getMaterial(componentName) state.componentEvent = componentSchema?.content?.schema?.events || componentSchema?.schema?.events || {} - state.componentEvents = { ...commonEvents, ...state.componentEvent } const props = pageState?.currentSchema?.props || {} const keys = Object.keys(props) state.bindActions = {} // 遍历组件事件元数据 - Object.entries(state.componentEvents).forEach(([eventName, componentEvent]) => { + Object.entries(renderEventList.value).forEach(([eventName, componentEvent]) => { // 查找组件已添加的事件 if (keys.indexOf(eventName) > -1) { const event = props[eventName] @@ -228,7 +228,7 @@ export default { const handleAddEvent = (params) => { const { eventName, eventDescription } = params - Object.assign(state.componentEvents, { + Object.assign(state.customEvents, { [eventName]: { label: { zh_CN: eventDescription @@ -256,7 +256,9 @@ export default { openCodePanel, openActionDialog, handleAddEvent, - handleToggleAddEventDialog + handleToggleAddEventDialog, + renderEventList, + locale } } } diff --git a/packages/settings/panel/package.json b/packages/settings/panel/package.json index 62c6e7003..916f0f7e4 100644 --- a/packages/settings/panel/package.json +++ b/packages/settings/panel/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-settings-panel", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/settings/props/package.json b/packages/settings/props/package.json index 67f29d14c..59067362e 100644 --- a/packages/settings/props/package.json +++ b/packages/settings/props/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-setting-props", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/settings/styles/package.json b/packages/settings/styles/package.json index 7673cd072..b0b6915ee 100644 --- a/packages/settings/styles/package.json +++ b/packages/settings/styles/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-setting-styles", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/settings/styles/src/components/inputs/ResetButton.vue b/packages/settings/styles/src/components/inputs/ResetButton.vue index d31556119..540283740 100644 --- a/packages/settings/styles/src/components/inputs/ResetButton.vue +++ b/packages/settings/styles/src/components/inputs/ResetButton.vue @@ -41,6 +41,6 @@ export default { display: block; padding: 8px 4px; text-align: center; - color: var(--te-common-text-description); + color: var(--te-common-text-secondary); } diff --git a/packages/svgs/package.json b/packages/svgs/package.json index 046b9072d..a61d66147 100644 --- a/packages/svgs/package.json +++ b/packages/svgs/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-svgs", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/theme/base/package.json b/packages/theme/base/package.json index bbc65bdb6..36b15d3c5 100644 --- a/packages/theme/base/package.json +++ b/packages/theme/base/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-theme-base", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/theme/base/src/base.less b/packages/theme/base/src/base.less index a195c7a41..f2e75fe23 100644 --- a/packages/theme/base/src/base.less +++ b/packages/theme/base/src/base.less @@ -4,445 +4,241 @@ --te-base-color-inherit: inherit; --te-base-color-unset: unset; - // 灰阶 - --te-base-gray-1: #fff; - --te-base-gray-2: #fafafa; - --te-base-gray-3: #f2f2f2; - --te-base-gray-4: #f2f5fc; - --te-base-gray-5: #f5f5f5; - --te-base-gray-6: #f0f0f0; - --te-base-gray-7: #e6e6e6; - --te-base-gray-8: #eeeeee; - --te-base-gray-9: #dfe1e6; - --te-base-gray-10: #e3e3e3; - --te-base-gray-11: #ebebeb; - --te-base-gray-12: #d9d9d9; - --te-base-gray-13: #dbdbdb; - --te-base-gray-14: #e5e5e5; - --te-base-gray-15: #e9e9e9; - --te-base-gray-16: #b9b9b9; - --te-base-gray-17: #ccc; - --te-base-gray-18: #c2c2c2; - --te-base-gray-19: #afafaf; - --te-base-gray-20: #ababab; - --te-base-gray-21: #adb0b8; - --te-base-gray-22: #1476ff1a; - --te-base-gray-23: #a6a6a6; - --te-base-gray-24: #a7aab2; - --te-base-gray-25: #4d4d4d; - --te-base-gray-26: #464c59; - --te-base-gray-27: #5a5a5a; - --te-base-gray-28: #555; - --te-base-gray-29: #5e5e5e; - --te-base-gray-30: #575d6c; - --te-base-gray-31: #595959; - --te-base-gray-32: #666; - --te-base-gray-33: #6a6a6a; - --te-base-gray-34: #6b6b6b; - --te-base-gray-35: #606165; - --te-base-gray-36: #dddddd; - --te-base-gray-37: #cbcbcb; - --te-base-gray-38: #626262; - --te-base-gray-39: #737373; - --te-base-gray-40: #757575; - --te-base-gray-41: #888; - --te-base-gray-42: #8d8d8d; - --te-base-gray-43: #808080; - --te-base-gray-44: #8a8e99; - --te-base-gray-45: #9a9a9a; - --te-base-gray-46: #999; - --te-base-gray-47: #9d9d9d; - --te-base-gray-48: #9f9f9f; - --te-base-gray-49: #999999; - --te-base-gray-50: #8a887b; - --te-base-gray-51: #f3f3f3; - --te-base-gray-52: #d1d1d1; - --te-base-gray-53: #bdbdbd; - --te-base-gray-54: #dfdfdf; - --te-base-gray-55: #bfbfbf; - --te-base-gray-56: #b5b5b5; - --te-base-gray-57: #f3f3f5; - --te-base-gray-58: #919191; - --te-base-gray-59: #e7e8e9; - --te-base-gray-60: #9e9e9e; - --te-base-gray-61: #63666c; - --te-base-gray-62: #858585; - --te-base-gray-63: #f6eeee; - --te-base-gray-64: #f0f1f5; - --te-base-gray-65: #b4b5b8; - --te-base-gray-66: #8b8c8f; - --te-base-gray-67: #4d4e52; - --te-base-gray-68: #36383d; - --te-base-gray-69: #2b2d33; - - // black - --te-base-dark-1: #1f1f1f; - --te-base-dark-2: #1a1a1a; - --te-base-dark-3: #141414; - --te-base-dark-4: #191818; - --te-base-dark-5: #191919; - --te-base-dark-6: #202020; - --te-base-dark-7: #2e2e2e; - --te-base-dark-8: #2f2f2f; - --te-base-dark-9: #212121; - --te-base-dark-10: #232323; - --te-base-dark-11: #252b3a; - --te-base-dark-12: #2b2b2b; - --te-base-dark-13: #262626; - --te-base-dark-14: #222; - --te-base-dark-15: #323644; - --te-base-dark-16: #1e1e1e; - --te-base-dark-17: #292929; - --te-base-dark-18: #3c3c3c; - --te-base-dark-19: #313131; - --te-base-dark-20: #333; - --te-base-dark-21: #363636; - --te-base-dark-22: #404040; - --te-base-dark-23: #414141; - --te-base-dark-24: #433535; - --te-base-dark-25: #041320; - --te-base-dark-26: #000; - --te-base-dark-27: #212329; - --te-base-dark-28: #1d312a; - --te-base-dark-29: #2a2c31; + --te-base-gray-0: #fff; + --te-base-gray-5: #fafafa; + --te-base-gray-10: #f5f5f5; + --te-base-gray-20: #f0f0f0; + --te-base-gray-30: #e6e6e6; + --te-base-gray-40: #dbdbdb; + --te-base-gray-50: #c2c2c2; + --te-base-gray-60: #808080; + --te-base-gray-70: #595959; + --te-base-gray-80: #333333; + --te-base-gray-90: #191919; + --te-base-gray-100: #000; + --te-base-gray-110: #b4b5b8; + --te-base-gray-120: #8b8c8f; + --te-base-gray-130: #4d4e52; + --te-base-gray-140: #36383d; + --te-base-gray-150: #2a2c31; + --te-base-gray-160: #212329; + --te-base-gray-170: #0f1115; // expand-red - --te-base-red-1: #ffeae8; - --te-base-red-2: #fccdca; - --te-base-red-3: #faa9a5; - --te-base-red-4: #fa8682; - --te-base-red-5: #f76360; - --te-base-red-6: #f23030; - --te-base-red-7: #cc272a; - --te-base-red-8: #a3171c; - --te-base-red-9: #78080e; - --te-base-red-10: #4d0005; - --te-base-red-11: #a64242; - --te-base-red-12: #d4827f; - --te-base-red-13: #f2c5c2; - --te-base-red-14: #c7000b; - --te-base-red-15: #fce3e1; - --te-base-red-16: #feeaeb; - --te-base-red-17: #dc544f; - --te-base-red-18: #ff0000; - --te-base-red-19: #ea384c; - --te-base-red-20: #c92c3f; - --te-base-red-21: #de504e; + --te-base-red-10: #fff1f0; + --te-base-red-20: #fce2e0; + --te-base-red-30: #faa7a3; + --te-base-red-40: #fa8682; + --te-base-red-50: #f76360; + --te-base-red-60: #f23030; + --te-base-red-70: #bf0a1c; + --te-base-red-80: #a3171c; + --te-base-red-90: #78080e; + --te-base-red-100: #4d0005; + --te-base-red-110: #a64242; + --te-base-red-120: #d4827f; + --te-base-red-130: #f2c5c2; + --te-base-red-140: rgba(242, 48, 48, 0.3); // expand-orange - --te-base-orange-1: #fff5e8; - --te-base-orange-2: #fcdfb8; - --te-base-orange-3: #fcc98b; - --te-base-orange-4: #fcb25c; - --te-base-orange-5: #ff9a2e; - --te-base-orange-6: #ff8800; - --te-base-orange-7: #d96900; - --te-base-orange-8: #a64d00; - --te-base-orange-9: #733400; - --te-base-orange-10: #4d2201; - --te-base-orange-11: #9e6d3f; - --te-base-orange-12: #d6a981; - --te-base-orange-13: #f2d8c2; - --te-base-orange-14: #fa9841; - --te-base-orange-15: #facb4b; - --te-base-orange-16: #ffb100; + --te-base-orange-10: #fff5e8; + --te-base-orange-20: #ffebd1; + --te-base-orange-30: #fcd5a4; + --te-base-orange-40: #fcbc72; + --te-base-orange-50: #ff9a2e; + --te-base-orange-60: #ff8800; + --te-base-orange-70: #d96900; + --te-base-orange-80: #a64d00; + --te-base-orange-90: #733400; + --te-base-orange-100: #4d2201; + --te-base-orange-110: #9e6d3f; + --te-base-orange-120: #d6a981; + --te-base-orange-130: #f2d8c2; // expand-yellow - --te-base-yellow-1: #fcf9eb; - --te-base-yellow-2: #fcf0c2; - --te-base-yellow-3: #fae396; - --te-base-yellow-4: #f7d56d; - --te-base-yellow-5: #f7c845; - --te-base-yellow-6: #fcbe1e; - --te-base-yellow-7: #d99b0b; - --te-base-yellow-8: #a67711; - --te-base-yellow-9: #7a5202; - --te-base-yellow-10: #4d3200; - --te-base-yellow-11: #9e7e3f; - --te-base-yellow-12: #d4b57f; - --te-base-yellow-13: #e6d3b8; - --te-base-yellow-14: #501c1c; - --te-base-yellow-15: #8d5421; + --te-base-yellow-10: #fffae6; + --te-base-yellow-20: #fcf0c2; + --te-base-yellow-30: #fae49d; + --te-base-yellow-40: #f7d56f; + --te-base-yellow-50: #fac532; + --te-base-yellow-60: #ffb700; + --te-base-yellow-70: #e0a210; + --te-base-yellow-80: #a67711; + --te-base-yellow-90: #7a5202; + --te-base-yellow-100: #4d3200; + --te-base-yellow-110: #9e7e3f; + --te-base-yellow-120: #d4b57f; + --te-base-yellow-130: #e6d3b8; // expand-lemon - --te-base-lemon-1: #fcfae8; - --te-base-lemon-2: #fcf6c2; - --te-base-lemon-3: #fcf092; - --te-base-lemon-4: #fae969; - --te-base-lemon-5: #f7e04a; - --te-base-lemon-6: #f7d916; - --te-base-lemon-7: #d9bb16; - --te-base-lemon-8: #a38708; - --te-base-lemon-9: #756002; - --te-base-lemon-10: #4d3d00; - --te-base-lemon-11: #9e8f46; - --te-base-lemon-12: #d6c581; - --te-base-lemon-13: #eddfb2; + --te-base-lemon-10: #ffffe6; + --te-base-lemon-20: #fcfcc2; + --te-base-lemon-30: #faf78e; + --te-base-lemon-40: #fcf26a; + --te-base-lemon-50: #faee46; + --te-base-lemon-60: #f2e70c; + --te-base-lemon-70: #d9c816; + --te-base-lemon-80: #a38f08; + --te-base-lemon-90: #756202; + --te-base-lemon-100: #4d3c00; + --te-base-lemon-110: #9e8f46; + --te-base-lemon-120: #d6c581; + --te-base-lemon-130: #eddfb2; // expand-lime - --te-base-lime-1: #f8fae3; - --te-base-lime-2: #eff5bf; - --te-base-lime-3: #e2ed8e; - --te-base-lime-4: #d5e667; - --te-base-lime-5: #c6de3e; - --te-base-lime-6: #b2d119; - --te-base-lime-7: #95b312; - --te-base-lime-8: #728c0a; - --te-base-lime-9: #576e05; - --te-base-lime-10: #3b4d00; - --te-base-lime-11: #808c46; - --te-base-lime-12: #c1cc7a; - --te-base-lime-13: #3b4d00; + --te-base-lime-10: #fdffe6; + --te-base-lime-20: #eff5bf; + --te-base-lime-30: #e2ed8e; + --te-base-lime-40: #d5e667; + --te-base-lime-50: #c6de3e; + --te-base-lime-60: #b2d119; + --te-base-lime-70: #95b312; + --te-base-lime-80: #728c0a; + --te-base-lime-90: #576e05; + --te-base-lime-100: #3b4d00; + --te-base-lime-110: #808c46; + --te-base-lime-120: #c1cc7a; + --te-base-lime-130: #e0e6ac; // expand-kelly - --te-base-kelly-1: #f2fae6; - --te-base-kelly-2: #daf2bb; - --te-base-kelly-3: #b9e683; - --te-base-kelly-4: #9edb58; - --te-base-kelly-5: #7dcc29; - --te-base-kelly-6: #5cb300; - --te-base-kelly-7: #4b9902; - --te-base-kelly-8: #3c8001; - --te-base-kelly-9: #2e6600; - --te-base-kelly-10: #1f4700; - --te-base-kelly-11: #628c38; - --te-base-kelly-12: #a2c777; - --te-base-kelly-13: #d2e6bb; + --te-base-kelly-10: #edf7df; + --te-base-kelly-20: #daf2bb; + --te-base-kelly-30: #b9e683; + --te-base-kelly-40: #9edb58; + --te-base-kelly-50: #7dcc29; + --te-base-kelly-60: #5cb300; + --te-base-kelly-70: #4b9902; + --te-base-kelly-80: #3c8001; + --te-base-kelly-90: #2e6600; + --te-base-kelly-100: #1f4700; + --te-base-kelly-110: #628c38; + --te-base-kelly-120: #a2c777; + --te-base-kelly-130: #d2e6b8; // expand-green - --te-base-green-1: #e8fced; - --te-base-green-2: #bbf2c8; - --te-base-green-3: #82e09a; - --te-base-green-4: #51d675; - --te-base-green-5: #25c251; - --te-base-green-6: #00b336; - --te-base-green-7: #029931; - --te-base-green-8: #01802b; - --te-base-green-9: #006624; - --te-base-green-10: #004a1b; - --te-base-green-11: #3d995c; - --te-base-green-12: #77c78f; - --te-base-green-13: #b8e6c7; - --te-base-green-14: #e6f2d5; - --te-base-green-15: #2ad986; + --te-base-green-10: #e4f7e9; + --te-base-green-20: #d5f2dc; + --te-base-green-30: #92e0a5; + --te-base-green-40: #60d680; + --te-base-green-50: #25c251; + --te-base-green-60: #00b336; + --te-base-green-70: #029931; + --te-base-green-80: #01802b; + --te-base-green-90: #006624; + --te-base-green-100: #004a1b; + --te-base-green-110: #1d312a; + --te-base-green-120: #77c78f; + --te-base-green-130: #b8e6c7; + --te-base-green-140: rgba(92, 179, 54, 0.1); // expand-mint - --te-base-mint-1: #e8fcfa; - --te-base-mint-2: #bff5ef; - --te-base-mint-3: #8be8e0; - --te-base-mint-4: #5dded5; - --te-base-mint-5: #38d6ce; - --te-base-mint-6: #10c7c1; - --te-base-mint-7: #0aaba8; - --te-base-mint-8: #048c8c; - --te-base-mint-9: #046466; - --te-base-mint-10: #004547; - --te-base-mint-11: #3d9996; - --te-base-mint-12: #77c7c2; - --te-base-mint-13: #b8e6e1; - --te-base-mint-14: #50d4ab; + --te-base-mint-10: #e6fcfa; + --te-base-mint-20: #d0f5f1; + --te-base-mint-30: #97e8e1; + --te-base-mint-40: #64ded6; + --te-base-mint-50: #38d6ce; + --te-base-mint-60: #10c7c1; + --te-base-mint-70: #0bb8b2; + --te-base-mint-80: #048c8c; + --te-base-mint-90: #046466; + --te-base-mint-100: #004547; + --te-base-mint-110: #3d9996; + --te-base-mint-120: #77c7c2; + --te-base-mint-130: #b8e6e1; // expand-sky - --te-base-sky-1: #e8f8fc; - --te-base-sky-2: #c4f2ff; - --te-base-sky-3: #9de4fa; - --te-base-sky-4: #79d8f7; - --te-base-sky-5: #58cbf5; - --te-base-sky-6: #33bcf2; - --te-base-sky-7: #1f9acf; - --te-base-sky-8: #1075a3; - --te-base-sky-9: #065278; - --te-base-sky-10: #00304a; - --te-base-sky-11: #3d7f99; - --te-base-sky-12: #7ab8cc; - --te-base-sky-13: #b6e5f2; + --te-base-sky-10: #e8faff; + --te-base-sky-20: #d6f6ff; + --te-base-sky-30: #a5e6fa; + --te-base-sky-40: #79d8f7; + --te-base-sky-50: #58cbf5; + --te-base-sky-60: #33bcf2; + --te-base-sky-70: #1f9acf; + --te-base-sky-80: #1075a3; + --te-base-sky-90: #065278; + --te-base-sky-100: #00304a; + --te-base-sky-110: #3d7f99; + --te-base-sky-120: #7ab8cc; + --te-base-sky-130: #b6e5f2; // expand-blue - --te-base-blue-1: #e3effa; - --te-base-blue-2: #c4e1ff; - --te-base-blue-3: #99c9ff; - --te-base-blue-4: #68abfc; - --te-base-blue-5: #4191fa; - --te-base-blue-6: #1476ff; - --te-base-blue-7: #0f5ed4; - --te-base-blue-8: #0845a6; - --te-base-blue-9: #022e7a; - --te-base-blue-10: #001a4a; - --te-base-blue-11: #3d6899; - --te-base-blue-12: #7fa6d4; - --te-base-blue-13: #b6d4f2; - --te-base-blue-14: #4f77ff; - --te-base-blue-15: #3961eb; - --te-base-blue-16: #7693f5; - --te-base-blue-17: #526ecc; - --te-base-blue-18: #deecff; - --te-base-blue-19: #5073e5; - --te-base-blue-20: #5e7ce0; - --te-base-blue-21: #6bb0ff; - --te-base-blue-22: #006cff; - --te-base-blue-23: #8bbefa; - --te-base-blue-24: #476be5; - --te-base-blue-25: rgba(20, 118, 255, 0.1); + --te-base-blue-10: #f0f7ff; + --te-base-blue-20: #e7f1ff; + --te-base-blue-30: #b3d6ff; + --te-base-blue-40: #7eb7fc; + --te-base-blue-50: #4191fa; + --te-base-blue-60: #1476ff; + --te-base-blue-70: #0f5ed4; + --te-base-blue-80: #0845a6; + --te-base-blue-90: #022e7a; + --te-base-blue-100: #001a4a; + --te-base-blue-110: #202b3f; + --te-base-blue-120: #7fa6d4; + --te-base-blue-130: #b6d4f2; + --te-base-blue-140: rgba(20, 118, 255, 0.1); // expand-indigo - --te-base-indigo-1: #eee8ff; - --te-base-indigo-2: #ddd7fa; - --te-base-indigo-3: #b19cf7; - --te-base-indigo-4: #957af5; - --te-base-indigo-5: #6e51e0; - --te-base-indigo-6: #512fd6; - --te-base-indigo-7: #391eb0; - --te-base-indigo-8: #27108f; - --te-base-indigo-9: #19056e; - --te-base-indigo-10: #0e004d; - --te-base-indigo-11: #584d99; - --te-base-indigo-12: #847acc; - --te-base-indigo-13: #bbb8e6; - --te-base-indigo-14: #a790ff; + --te-base-indigo-10: #f0ebff; + --te-base-indigo-20: #e2d9fc; + --te-base-indigo-30: #a790ff; + --te-base-indigo-40: #9479f2; + --te-base-indigo-50: #6e51e0; + --te-base-indigo-60: #512fd6; + --te-base-indigo-70: #391eb0; + --te-base-indigo-80: #27108f; + --te-base-indigo-90: #19056e; + --te-base-indigo-100: #0e004d; + --te-base-indigo-110: #2f2e3f; + --te-base-indigo-120: #847acc; + --te-base-indigo-130: #bbb8e6; // expand-purple - --te-base-purple-1: #f5e8ff; - --te-base-purple-2: #e4c5fc; - --te-base-purple-3: #d0a1f7; - --te-base-purple-4: #b878f0; - --te-base-purple-5: #9f53e6; - --te-base-purple-6: #832fd6; - --te-base-purple-7: #641eb0; - --te-base-purple-8: #4c1091; - --te-base-purple-9: #370673; - --te-base-purple-10: #20004d; - --te-base-purple-11: #683d99; - --te-base-purple-12: #a07acc; - --te-base-purple-13: #cbb8e6; - --te-base-purple-14: #f0edfc; + --te-base-purple-10: #f9ebff; + --te-base-purple-20: #f4e0fc; + --te-base-purple-30: #dea3f7; + --te-base-purple-40: #cc78f0; + --te-base-purple-50: #ba53e6; + --te-base-purple-60: #a42fd6; + --te-base-purple-70: #841eb0; + --te-base-purple-80: #6b1091; + --te-base-purple-90: #520673; + --te-base-purple-100: #36004d; + --te-base-purple-110: #7d3d99; + --te-base-purple-120: #b47acc; + --te-base-purple-130: #d8b8e6; // expand-pink - --te-base-pink-1: #fce6fb; - --te-base-pink-2: #fcc2f9; - --te-base-pink-3: #f794f2; - --te-base-pink-4: #eb67e6; - --te-base-pink-5: #e841e5; - --te-base-pink-6: #d91ad9; - --te-base-pink-7: #b50fb8; - --te-base-pink-8: #8f0a94; - --te-base-pink-9: #6b0370; - --te-base-pink-10: #47004d; - --te-base-pink-11: #993d99; - --te-base-pink-12: #c97acc; - --te-base-pink-13: #e2b8e6; + --te-base-pink-10: #fce8fb; + --te-base-pink-20: #fcd4fa; + --te-base-pink-30: #f7a1f3; + --te-base-pink-40: #eb75e7; + --te-base-pink-50: #e841e5; + --te-base-pink-60: #d91ad9; + --te-base-pink-70: #b50fb8; + --te-base-pink-80: #8f0a94; + --te-base-pink-90: #6b0370; + --te-base-pink-100: #47004d; + --te-base-pink-110: #993d99; + --te-base-pink-120: #c97acc; + --te-base-pink-130: #e2b8e6; // expand-rose - --te-base-rose-1: #fce6ef; - --te-base-rose-2: #ffc4de; - --te-base-rose-3: #fa9bc9; - --te-base-rose-4: #f56cac; - --te-base-rose-5: #eb4696; - --te-base-rose-6: #e61c81; - --te-base-rose-7: #b50e65; - --te-base-rose-8: #940a54; - --te-base-rose-9: #70033f; - --te-base-rose-10: #4d002b; - --te-base-rose-11: #993d6e; - --te-base-rose-12: #cc7aa6; - --te-base-rose-13: #e6b8d2; - --te-base-rose-14: #f66f6a; - - // 公司品牌色 - --te-base-brand-color: #c7000b; - - // 主色 - --te-base-primary-color-1: #191919; - --te-base-primary-color-2: #1476ff; - - // 背景色 - --te-base-bg: #f5f5f5; - --te-base-bg-1: rgba(0, 0, 0, 0.05); - --te-base-bg-2: #fafafa; - --te-base-bg-3: #191919; - --te-base-bg-4: #595959; - --te-base-bg-5: #fff; - --te-base-bg-6: #5959591a; - --te-base-bg-7: rgba(0, 255, 0, 0.1); - --te-base-bg-8: rgba(242, 48, 48, 0.3); - --te-base-dark-bg: #141414; - --te-base-dark-bg-2: #333; - --te-base-dark-bg-3: #e6e6e6; - --te-base-dark-bg-4: #a6a6a6; - --te-base-dark-bg-5: #000; - --te-base-dark-bg-6: #a6a6a61a; - --te-base-dark-bg-7: rgba(255, 255, 255, 0.1); - --te-base-dark-bg-8: rgba(0, 0, 0, 0.16); - - // 文本色 - --te-base-text-color: #191919; - --te-base-text-color-1: #595959; - --te-base-text-color-2: #1476ff; - --te-base-text-color-3: #808080; - --te-base-text-color-4: #c2c2c2; - --te-base-dark-text-color: #e6e6e6; - --te-base-dark-text-color-1: #a6a6a6; - - // 文本链接色 - --te-base-text-link-color: #191919; - --te-base-text-link-color-1: #595959; - --te-base-text-link-color-2: #c2c2c2; - --te-base-text-link-color-3: #fff; - --te-base-dark-text-link-color: #e6e6e6; - --te-base-dark-text-link-color-1: #a6a6a6; - - // 按钮边框色 - --te-base-button-border-none: none; - --te-base-secondary-button-border-color: #595959; - --te-base-secondary-button-border-hover-color: #c2c2c2; - --te-base-default-button-border-color: #c2c2c2; - --te-base-default-button-border-disable-color: #dbdbdb; - --te-base-dark-secondary-button-border-color: #a6a6a6; - --te-base-dark-secondary-button-border-hover-color: #3d3d3d; - --te-base-dark-default-button-border-hover-color: #e6e6e6; - - // 分割线 - --te-base-split-color-1: rgba(0, 0, 0, 0.08); // 白色背景分割线 - --te-base-split-color-2: rgba(0, 0, 0, 0.15); // 灰色背景分割线 - --te-base-dark-split-color-1: rgba(255, 255, 255, 0.08); // 白色背景分割线 - --te-base-dark-split-color-2: rgba(255, 255, 255, 0.15); - - // rgba - --te-base-rgba-1: rgba(0, 0, 0, 0.2); - --te-base-rgba-2: rgba(0, 0, 0, 0.08); - --te-base-rgba-3: rgba(242, 48, 48, 0.1); - --te-base-rgba-4: rgba(20, 118, 255, 0.1); - --te-base-rgba-5: rgba(255, 0, 0); - --te-base-rgba-6: rgba(0, 0, 0, 0.5); - --te-base-rgba-7: rgba(200, 200, 200, 0.2); - --te-base-rgba-8: rgba(255, 255, 255, 0.1); - --te-base-rgba-9: rgba(76, 152, 241, 0.15); - --te-base-rgba-10: rgba(173, 176, 184, 0.6); - --te-base-rgba-11: rgba(0, 255, 0, 0.1); - --te-base-rgba-12: rgba(242, 48, 48, 0.3); - --te-base-rgba-13: rgba(255, 255, 255, 0.08); - --te-base-rgba-14: rgba(246, 111, 106, 0.1); - --te-base-rgba-15: rgba(217, 217, 217, 0.8); - --te-base-rgba-16: rgba(0, 179, 54, 0.6); - --te-base-rgba-17: rgba(217, 217, 217, 0.4); - --te-base-rgba-18: rgba(255, 255, 255, 0.4); - --te-base-rgba-19: rgba(255, 255, 255, 0.5); - --te-base-rgba-20: rgba(94, 94, 94, 0.8); - --te-base-rgba-21: rgba(121, 121, 121, 0.4); - --te-base-rgba-22: rgba(138, 142, 153, 0.99); - --te-base-rgba-23: rgba(25, 25, 25, 0.15); - --te-base-rgba-24: rgba(0, 0, 0, 0.16); - --te-base-rgba-25: rgba(0, 255, 0, 0.1); - --te-base-rgba-26: rgba(242, 48, 48, 0.3); - --te-base-rgba-27: rgba(0, 0, 0, 0.16); - --te-base-rgb-1: rgb(80, 212, 171); + --te-base-rose-10: #ffebf3; + --te-base-rose-20: #ffd6e8; + --te-base-rose-30: #faa0cb; + --te-base-rose-40: #f56ead; + --te-base-rose-50: #f24998; + --te-base-rose-60: #e61c81; + --te-base-rose-70: #b50e65; + --te-base-rose-80: #940a54; + --te-base-rose-90: #70033f; + --te-base-rose-100: #4d002b; + --te-base-rose-110: #993d6e; + --te-base-rose-120: #cc7aa6; + --te-base-rose-130: #e6b8d2; - // 状态色 - --te-base-error-color: #f23030; - --te-base-warn-color: #ff8800; - --te-base-warn-color-1: #f7d916; - --te-base-success-color: #5cb300; - --te-base-prompt-color: #1476ff; - --te-base-invalidate-color: #ebebeb; + --te-base-box-shadow-rgba-1: rgba(25, 25, 25, 0.15); + --te-base-box-shadow-rgba-2: rgba(0, 0, 0, 0.16); /** * 1.1 行高 diff --git a/packages/theme/base/src/common.less b/packages/theme/base/src/common.less index fe510a02b..5e77d231f 100644 --- a/packages/theme/base/src/common.less +++ b/packages/theme/base/src/common.less @@ -1,52 +1,54 @@ // common变量定义 :root { //功能色 - --te-common-color-success: var(--te-base-success-color); // 注释,成功-背景色 #5cb300 - --te-common-color-warning: var(--te-base-warn-color); // 注释,告警-背景色 #ff8800 - --te-common-color-error: var(--te-base-error-color); // 注释,错误-背景色 #f23030 - --te-common-color-info: var(--te-base-prompt-color); // 注释,告警-背景色 #1476ff - --te-common-color-prompt-secondary: var(--te-base-indigo-5); // 注释,区块提示-背景色 #6e51e0 + --te-common-color-success: var(--te-base-kelly-60); // 注释,成功-背景色 #5cb300 + --te-common-color-warning: var(--te-base-orange-60); // 注释,告警-背景色 #ff8800 + --te-common-color-error: var(--te-base-red-60); // 注释,错误-背景色 #f23030 + --te-common-color-info: var(--te-base-blue-60); // 注释,告警-背景色 #1476ff + --te-common-color-prompt-secondary: var(--te-base-indigo-50); // 注释,区块提示-背景色 #6e51e0 // 文本色 - --te-common-text-primary: var(--te-base-dark-5); // 一级文本色-重要信息/标题颜色/输入类文本颜色 #191919 - --te-common-text-secondary: var(--te-base-gray-31); // 二级文本色-次要信息/表单标签颜色/选块按钮默认色 #595959 - --te-common-text-weaken: var(--te-base-gray-43); // 三级文本色-弱化信息/提示文字 #808080 - --te-common-text-disabled: var(--te-base-gray-18); // 文本禁用色 #c2c2c2 - --te-common-text-link: var(--te-base-blue-6); // 链接色 #1476ff - --te-common-text-inverse: var(--te-base-gray-1); // 主按钮上的文本色 #fff - --te-common-text-dark-inverse: var(--te-base-gray-1); // 深色背景下按钮上的文本色 #fff - --te-common-text-emphasize: var(--te-base-blue-6); // 强调性文字 #1476ff - --te-common-text-description: var(--te-base-gray-47); // 描述性文字 #9d9d9d + --te-common-text-primary: var(--te-base-gray-90); // 一级文本色-重要信息/标题颜色/输入类文本颜色 #191919 + --te-common-text-secondary: var(--te-base-gray-70); // 二级文本色-次要信息/表单标签颜色/选块按钮默认色 #595959 + --te-common-text-weaken: var(--te-base-gray-60); // 三级文本色-弱化信息/提示文字 #808080 + --te-common-text-disabled: var(--te-base-gray-50); // 文本禁用色 #c2c2c2 + --te-common-text-link: var(--te-base-blue-60); // 链接色 #1476ff + --te-common-text-inverse: var(--te-base-gray-0); // 主按钮上的文本色 #fff + --te-common-text-dark-inverse: var(--te-base-gray-0); // 深色背景下按钮上的文本色 #fff + --te-common-text-emphasize: var(--te-base-blue-60); // 强调性文字 #1476ff + --te-common-text-checked: var(--te-base-blue-60); // 选中或者hover文字 #1476ff - --te-common-icon-primary: var(--te-base-dark-5); // 重要图标色 #191919 - --te-common-icon-secondary: var(--te-base-gray-43); // 图标默认色 #808080 - --te-common-icon-disabled: var(--te-base-gray-18); // 图标禁用色 #c2c2c2 - --te-common-icon-link: var(--te-base-blue-6); // 图标提示色 #1476ff + --te-common-icon-primary: var(--te-base-gray-90); // 重要图标色 #191919 + --te-common-icon-secondary: var(--te-base-gray-60); // 图标默认色 #808080 + --te-common-icon-disabled: var(--te-base-gray-50); // 图标禁用色 #c2c2c2 + --te-common-icon-link: var(--te-base-blue-60); // 图标提示色 #1476ff - --te-common-border-default: var(--te-base-gray-13); // 线条-输入框默认色 #dbdbdb - --te-common-border-active: var(--te-base-dark-5); // 线条-输入框悬浮色/激活色 #191919 - --te-common-border-disabled: var(--te-base-dark-5); // 线条-禁用色 #dbdbdb - --te-common-border-secondary: var(--te-base-gray-31); // 线条-次要按钮描边色 #595959 - --te-common-border-prompt: var(--te-base-gray-13); // 线条-三级按钮默认色/表单内按钮 #dbdbdb - --te-common-border-hover: var(--te-base-gray-18); // 线条-按钮边框悬浮色/复选框/单选框,欧仁边框色 #c2c2c2 - --te-common-border-divider: var(--te-base-gray-11); //线条-白色背景分割线颜色 #ebebeb - --te-common-border-bg-divider: var(--te-base-gray-13); // 线条-灰色背景分割线颜色/表头分割线/选块分割线 #dbdbdb - --te-common-border-checked: var(--te-base-blue-6); // 线条 选中色 #1476ff + --te-common-border-default: var(--te-base-gray-40); // 线条-输入框默认色 #dbdbdb + --te-common-border-active: var(--te-base-gray-90); // 线条-输入框悬浮色/激活色 #191919 + --te-common-border-disabled: var(--te-base-gray-40); // 线条-禁用色 #dbdbdb + --te-common-border-secondary: var(--te-base-gray-70); // 线条-次要按钮描边色 #595959 + --te-common-border-prompt: var(--te-base-gray-40); // 线条-三级按钮默认色/表单内按钮 #dbdbdb + --te-common-border-hover: var(--te-base-gray-50); // 线条-按钮边框悬浮色/复选框/单选框默认边框色 #c2c2c2 + --te-common-border-divider: var(--te-base-gray-30); //线条-白色背景分割线颜色 #e6e6e6 + --te-common-border-bg-divider: var(--te-base-gray-40); // 线条-灰色背景分割线颜色/表头分割线/选块分割线 #dbdbdb + --te-common-border-checked: var(--te-base-blue-60); // 线条 选中色 #1476ff - --te-common-bg-primary: var(--te-base-dark-5); // 主要按钮-背景色 #191919 - --te-common-bg-primary-checked: var(--te-base-blue-6); // 主色-背景色 #1476ff - --te-common-bg-primary-emphasize: var(--te-base-blue-6); // 主色-背景色 #1476ff + --te-common-bg-primary: var(--te-base-gray-90); // 主要按钮-背景色 #191919 + --te-common-bg-primary-checked: var(--te-base-blue-60); // 主色-背景色 选中和hover等颜色 #1476ff + --te-common-bg-primary-emphasize: var(--te-base-blue-60); // 主色-背景色 强调背景 #1476ff - --te-common-bg-secondary: var(--te-base-gray-31); // 次要按钮-背景色 #595959 - --te-common-bg-prompt: var(--te-base-gray-7); // 导航按钮-背景色/选块-选中色 #e6e6e6 + --te-common-bg-secondary: var(--te-base-gray-70); // 次要按钮-背景色 #595959 + --te-common-bg-prompt: var(--te-base-gray-30); // 导航按钮-背景色/选块-选中色 #e6e6e6 --te-common-bg-container: var( - --te-base-gray-5 + --te-base-gray-10 ); // 列表悬浮色/表格悬浮色/顶部导航按钮悬浮色/选块背景色/提示背景色 #f5f5f5 - --te-common-bg-container-weaken: var(--te-base-gray-2); // 浅编辑代码--背景色 #fafafa - --te-common-bg-tag: var(--te-base-green-14); // tag标签-背景色 #e6f2d5 - --te-common-bg-default: var(--te-base-gray-1); // 白色背景-输入框背景/面板背景色 #fff - --te-common-bg-disabled: var(--te-base-gray-6); // 禁用/标签/下拉框多选标签 背景色 #f0f0f0 - --te-common-bg-switch: var(--te-base-gray-18); // 开关默认色 #c2c2c2 + --te-common-bg-container-weaken: var(--te-base-gray-5); // 浅编辑代码--背景色 #fafafa + --te-common-bg-tag: var(--te-base-green-10); // tag标签-背景色 #e4f7e9 + --te-common-bg-default: var(--te-base-gray-0); // 白色背景-输入框背景/面板背景色 #fff + --te-common-bg-disabled: var(--te-base-gray-20); // 禁用/标签/下拉框多选标签 背景色 #f0f0f0 + --te-common-bg-switch: var(--te-base-gray-50); // 开关默认色 #c2c2c2 + --te-common-bg-error: var(--te-base-red-20); // 浅色错误背景-背景色 #fce2e0 + --te-common-bg-popover: var(--te-base-gray-0); // 对话框/tooltip/popover背景 #fff // 通用间距 --te-common-vertical-item-spacing-normal: 12px; // 表单元素之间的距离,标题和列表之间的距离、一个独立元素的padding等等 @@ -55,49 +57,52 @@ :root[data-theme='dark'] { //功能色 - --te-common-color-success: var(--te-base-success-color); // 注释,成功-背景色 #5cb300 - --te-common-color-warning: var(--te-base-warn-color); // 注释,告警-背景色 #ff8800 - --te-common-color-error: var(--te-base-error-color); // 注释,错误-背景色 #f23030 - --te-common-color-info: var(--te-base-prompt-color); // 注释,说明-背景色 #1476ff - --te-common-color-prompt-secondary: var(--te-base-indigo-14); // 注释,区块提示-背景色 #A790FF + --te-common-color-success: var(--te-base-kelly-60); // 注释,成功-背景色 #5cb300 + --te-common-color-warning: var(--te-base-orange-60); // 注释,告警-背景色 #ff8800 + --te-common-color-error: var(--te-base-red-60); // 注释,错误-背景色 #f23030 + --te-common-color-info: var(--te-base-blue-60); // 注释,告警-背景色 #1476ff + --te-common-color-prompt-secondary: var(--te-base-indigo-30); // 注释,区块提示-背景色 #A790FF // 文本色 - --te-common-text-primary: var(--te-base-gray-64); // 一级文本色-重要信息/标题颜色/输入类文本颜色 #F0F1F5 - --te-common-text-secondary: var(--te-base-gray-65); // 二级文本色-次要信息/表单标签颜色 #B4B5B8 - --te-common-text-weaken: var(--te-base-gray-66); // 三级文本色-弱化信息/提示文字 #8B8C8F - --te-common-text-disabled: var(--te-base-gray-67); // 文本禁用色 #4D4E52 - --te-common-text-link: var(--te-base-blue-6); // 链接色 #1476ff - --te-common-text-inverse: var(--te-base-dark-26); // 主按钮上的文本色 #000000 - --te-common-text-dark-inverse: var(--te-base-gray-1); // 深色背景下按钮上的文本色 #fff - --te-common-text-emphasize: var(--te-base-blue-6); // 强调性文字 #1476ff + --te-common-text-primary: var(--te-base-gray-20); // 一级文本色-重要信息/标题颜色/输入类文本颜色 #F0F0F0 + --te-common-text-secondary: var(--te-base-gray-110); // 二级文本色-次要信息/表单标签颜色 #B4B5B8 + --te-common-text-weaken: var(--te-base-gray-120); // 三级文本色-弱化信息/提示文字 #8B8C8F + --te-common-text-disabled: var(--te-base-gray-130); // 文本禁用色 #4D4E52 + --te-common-text-link: var(--te-base-blue-60); // 链接色 #1476ff + --te-common-text-inverse: var(--te-base-gray-100); // 主按钮上的文本色 #000000 + --te-common-text-dark-inverse: var(--te-base-gray-0); // 深色背景下按钮上的文本色 #fff + --te-common-text-emphasize: var(--te-base-blue-60); // 强调性文字 #1476ff + --te-common-text-checked: var(--te-base-blue-60); // 选中或者hover文字 #1476ff - --te-common-icon-primary: var(--te-base-gray-64); // 重要图标色 #F0F1F5 - --te-common-icon-secondary: var(--te-base-gray-66); // 图标默认色 #8B8C8F - --te-common-icon-disabled: var(--te-base-gray-18); // 图标禁用色 #C2C2C2 - --te-common-icon-link: var(--te-base-blue-6); // 图标提示色 #1476ff + --te-common-icon-primary: var(--te-base-gray-20); // 重要图标色 #F0F0F0 + --te-common-icon-secondary: var(--te-base-gray-120); // 图标默认色 #8B8C8F + --te-common-icon-disabled: var(--te-base-gray-50); // 图标禁用色 #C2C2C2 + --te-common-icon-link: var(--te-base-blue-60); // 图标提示色 #1476ff - --te-common-border-default: var(--te-base-gray-67); // 线条-输入框默认色 #4D4E52 - --te-common-border-active: var(--te-base-gray-64); // 线条-输入框悬浮色/激活色 #F0F1F5 - --te-common-border-disabled: var(--te-base-gray-68); // 线条-禁用色 #36383D - --te-common-border-secondary: var(--te-base-gray-65); // 线条-次要按钮描边色 #B4B5B8 - --te-common-border-prompt: var(--te-base-gray-67); // 线条-三级按钮默认色/表单内按钮 #4D4E52 - --te-common-border-hover: var(--te-base-gray-66); // 线条-按钮边框悬浮色 #8B8C8F - --te-common-border-divider: var(--te-base-gray-68); //线条-白色背景分割线颜色 #36383D - --te-common-border-bg-divider: var(--te-base-gray-67); // 线条-灰色背景分割线颜色/表头分割线/选块分割线 #4D4E52 - --te-common-border-checked: var(--te-base-blue-6); // 线条 选中色 #1476ff + --te-common-border-default: var(--te-base-gray-130); // 线条-输入框默认色 #4D4E52 + --te-common-border-active: var(--te-base-gray-20); // 线条-输入框悬浮色/激活色 #F0F0F0 + --te-common-border-disabled: var(--te-base-gray-140); // 线条-禁用色 #36383D + --te-common-border-secondary: var(--te-base-gray-110); // 线条-次要按钮描边色/禁用色 #B4B5B8 + --te-common-border-prompt: var(--te-base-gray-130); // 线条-三级按钮默认色/表单内按钮 #4D4E52 + --te-common-border-hover: var(--te-base-gray-120); // 线条-按钮边框悬浮色/复选框/单选框默认边框色 #8B8C8F + --te-common-border-divider: var(--te-base-gray-140); //线条-白色背景分割线颜色 #36383D + --te-common-border-bg-divider: var(--te-base-gray-130); // 线条-灰色背景分割线颜色/表头分割线/选块分割线 #4D4E52 + --te-common-border-checked: var(--te-base-blue-60); // 线条 选中色 #1476ff - --te-common-bg-primary: var(--te-base-gray-64); // 主要按钮-背景色 #F0F1F5 - --te-common-bg-primary-checked: var(--te-base-blue-6); // 主色-背景色 #1476ff - --te-common-bg-primary-emphasize: var(--te-base-blue-6); // 主色-背景色 #1476ff - --te-common-bg-secondary: var(--te-base-gray-65); // 次要按钮-背景色 #B4B5B8 - --te-common-bg-prompt: var(--te-base-gray-66); // 导航按钮-背景色/选块-选中色 #8B8C8F + --te-common-bg-primary: var(--te-base-gray-20); // 主要按钮-背景色 #F0F0F0 + --te-common-bg-primary-checked: var(--te-base-blue-60); // 主色-背景色 选中和hover等颜色 #1476ff + --te-common-bg-primary-emphasize: var(--te-base-blue-60); // 主色-背景色 强调背景 #1476ff + --te-common-bg-secondary: var(--te-base-gray-110); // 次要按钮-背景色 #B4B5B8 + --te-common-bg-prompt: var(--te-base-gray-120); // 导航按钮-背景色/选块-选中色 #8B8C8F --te-common-bg-container: var( - --te-base-gray-68 + --te-base-gray-140 ); // 列表悬浮色/表格悬浮色/顶部导航按钮悬浮色/选块背景色/提示背景色 #36383D - --te-common-bg-container-weaken: var(--te-base-gray-69); // 浅编辑代码--背景色 #2B2D33 - --te-common-bg-tag: var(--te-base-dark-28); // tag标签-背景色 #1d312a - --te-common-bg-default: var(--te-base-dark-27); // 深色背景-输入框背景/面板背景色 #212329 - --te-common-bg-disabled: var(--te-base-dark-29); // 禁用/标签/下拉框多选标签 背景色 #2a2c31 - --te-common-bg-switch: var(--te-base-gray-67); // 开关默认色 #4D4E52 + --te-common-bg-container-weaken: var(--te-base-gray-150); // 浅编辑代码--背景色 #2a2c31 + --te-common-bg-tag: var(--te-base-green-110); // tag标签-背景色 #1d312a + --te-common-bg-default: var(--te-base-gray-160); // 深色背景-输入框背景/面板背景色 #212329 + --te-common-bg-disabled: var(--te-base-gray-150); // 禁用/标签/下拉框多选标签 背景色 #2a2c31 + --te-common-bg-switch: var(--te-base-gray-130); // 开关默认色 #4D4E52 + --te-common-bg-error: var(--te-base-red-20); // 浅色错误背景-背景色 #fce2e0 + --te-common-bg-popover: var(--te-base-gray-170); // 对话框/tooltip/popover背景 #0F1115 // 通用间距 --te-common-vertical-item-spacing-normal: 12px; // 表单元素之间的距离,标题和列表之间的距离、一个独立元素的padding等等 diff --git a/packages/theme/base/src/component-common.less b/packages/theme/base/src/component-common.less index 37ae1da8c..2b43554b3 100644 --- a/packages/theme/base/src/component-common.less +++ b/packages/theme/base/src/component-common.less @@ -32,6 +32,7 @@ .tiny-select-dropdown.tiny-select-dropdown, .tiny-select-dropdown.tiny-select-dropdown.is-multiple { + background-color: var(--te-common-bg-default); // 下拉新增列 .tiny-select__top-create { margin: 8px 12px 4px 12px; @@ -88,6 +89,7 @@ height: 24px; border-color: var(--te-common-border-default); color: var(--te-common-text-primary); + background-color: transparent; font-size: var(--te-base-font-size-base); &:hover { border-color: var(--te-common-border-active); @@ -106,6 +108,7 @@ // 3、折叠框 .tiny-collapse.tiny-collapse { border-top: 0; + border-bottom: 0; .tiny-collapse-item__header { flex-direction: row-reverse; font-size: var(--te-base-font-size-base); @@ -131,6 +134,7 @@ } .tiny-collapse-item { border-top-color: var(--te-common-border-bg-divider); + border-bottom-color: var(--te-common-border-bg-divider); border-bottom: 0; border-left: 0; border-right: 0; @@ -165,7 +169,9 @@ height: 24px; .tiny-tree-node__content-left { padding: 0 12px; + background-color: var(--te-common-bg-default); .tiny-tree-node__content-box { + color: var(--te-common-text-primary); padding: 0 12px 0 4px; background-color: var(--te-common-bg-default); &:hover { @@ -245,10 +251,15 @@ // 7、dialog组件 .tiny-dialog-box.tiny-dialog-box { padding: 20px; + background-color: var(--te-common-bg-popover); .tiny-dialog-box__header { font-size: var(--te-base-font-size-1); color: var(--te-common-text-primary); padding: 0; + background-color: var(--te-common-bg-popover); + .tiny-dialog-box__close { + color: var(--te-common-text-primary); + } } .tiny-dialog-box__body { color: var(--te-common-text-secondary); @@ -362,7 +373,7 @@ .tiny-modal__box.tiny-modal__box { padding: 20px; border-radius: var(--te-base-border-radius-1); - box-shadow: 0 0 10px 0 var(--te-base-rgba-23); + box-shadow: 0 0 10px 0 var(--te-base-box-shadow-rgba-1); .tiny-modal__header { padding: 0; font-size: var(--te-base-font-size-1); @@ -394,7 +405,7 @@ .tiny-modal.tiny-modal.tiny-modal__wrapper.type__message { .tiny-modal__box { border-radius: var(--te-base-border-radius-2); - box-shadow: 0 2px 12px 0 var(--te-base-rgba-24); + box-shadow: 0 2px 12px 0 var(--te-base-box-shadow-rgba-2); padding: 0; height: 38px; .tiny-modal__body { @@ -421,6 +432,7 @@ color: var(--te-common-text-primary); border-color: var(--te-common-border-default); text-align: left; + background-color: var(--te-common-bg-default); } &.is-controls-right { .tiny-numeric__input-inner { @@ -462,9 +474,9 @@ padding: 0px 8px; font-size: var(--te-base-font-size-base); color: var(--te-common-text-primary); - background-color: var(--te-common-bg-default); + background-color: var(--te-common-bg-popover); border: 0; - box-shadow: 0 8px 24px 0 var(--te-base-rgba-27); + box-shadow: 0 8px 24px 0 var(--te-base-box-shadow-rgba-2); height: auto; } @@ -544,8 +556,9 @@ .tiny-notify.tiny-notify { border-radius: var(--te-base-border-radius-2); padding: 12px; - background-color: var(--te-common-bg-default); - box-shadow: 0 2px 12px 0 var(--te-base-rgba-24); + background-color: var(--te-common-bg-popover); + color: var(--te-common-text-primary); + box-shadow: 0 2px 12px 0 var(--te-base-box-shadow-rgba-2); .tiny-notify__icon-zone { height: 24px; .tiny-notify__icon-status { @@ -553,6 +566,9 @@ height: 16px; } } + .tiny-notify__title { + color: var(--te-common-text-primary); + } .tiny-notify__content { color: var(--te-common-text-secondary); font-size: var(--te-base-font-size-base); @@ -607,43 +623,43 @@ // 17、tooltip文字提示 .tiny-tooltip.tiny-tooltip { &.tiny-tooltip__popper { - background: var(--te-common-bg-default); + background: var(--te-common-bg-popover); color: var(--te-common-text-primary); - box-shadow: 0 0 20px 0 var(--te-base-dark-bg-8); + box-shadow: 0 0 20px 0 var(--te-base-box-shadow-rgba-2); &[class*='is-'] { - background: var(--te-common-bg-default); + background: var(--te-common-bg-popover); color: var(--te-common-text-primary); font-size: var(--te-base-font-size-base); padding: 12px; &[x-placement^='top'] { .popper__arrow { - border-top-color: var(--te-common-text-inverse); + border-top-color: var(--te-common-bg-popover); &.popper__arrow::after { - border-top-color: var(--te-common-text-inverse); + border-top-color: var(--te-common-bg-popover); } } } &[x-placement^='bottom'] { .popper__arrow { - border-bottom-color: var(--te-common-text-inverse); + border-bottom-color: var(--te-common-bg-popover); &.popper__arrow::after { - border-bottom-color: var(--te-common-text-inverse); + border-bottom-color: var(--te-common-bg-popover); } } } &[x-placement^='left'] { .popper__arrow { - border-left-color: var(--te-common-text-inverse); + border-left-color: var(--te-common-bg-popover); &.popper__arrow::after { - border-left-color: var(--te-common-text-inverse); + border-left-color: var(--te-common-bg-popover); } } } &[x-placement^='right'] { .popper__arrow { - border-right-color: var(--te-common-text-inverse); + border-right-color: var(--te-common-bg-popover); &.popper__arrow::after { - border-right-color: var(--te-common-text-inverse); + border-right-color: var(--te-common-bg-popover); } } } @@ -686,6 +702,7 @@ .tiny-grid__header { .tiny-grid-header__row { .tiny-grid-header__column { + color: var(--te-common-text-primary); height: 24px; &.col__center { text-align: left; @@ -718,6 +735,7 @@ } .tiny-grid__body { .tiny-grid-body__row { + background-color: var(--te-common-bg-default); &.nav-tree .tiny-grid-cell { line-height: inherit; } @@ -787,3 +805,21 @@ } } } + +// 指引弹窗 + +.tiny-guide.tiny-guide { + background-color: var(--te-common-bg-popover); + .shepherd-content .shepherd-header, + .shepherd-arrow:before { + background-color: var(--te-common-bg-popover); + } + &.shepherd-has-title[data-popper-placement^='bottom'], + &.shepherd-has-title[data-popper-placement^='top'], + &.shepherd-has-title[data-popper-placement^='left'], + &.shepherd-has-title[data-popper-placement^='right'] { + .shepherd-arrow:before { + background-color: var(--te-common-bg-popover); + } + } +} diff --git a/packages/theme/base/src/page/base-config-page.less b/packages/theme/base/src/page/base-config-page.less index 3f2e7c305..89a3480d1 100644 --- a/packages/theme/base/src/page/base-config-page.less +++ b/packages/theme/base/src/page/base-config-page.less @@ -50,6 +50,7 @@ body { margin: 0; font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; + color: var(--te-common-text-primary); } ol, @@ -133,15 +134,16 @@ td { } .tiny-popover.tiny-popover.option-popper { - background: var(--ti-lowcode-popover-bg-color); - border: 1px solid var(--ti-lowcode-popover-option-popper-border-color); - color: var(--ti-lowcode-toolbar-breadcrumb-color); + background: var(--te-common-bg-popover); + border: 1px solid transparent; + color: var(--te-common-text-secondary); padding: 0px 8px 12px; &[x-placement^='bottom'] { .popper__arrow { + border-color: transparent; &, &::after { - border-bottom-color: var(--ti-lowcode-popover-bg-color); + border-bottom-color: var(--te-common-bg-popover); } } } @@ -152,18 +154,19 @@ td { .popper__arrow { left: -7px; border-color: transparent; - + &, &::after { - border-right-color: var(--ti-lowcode-popover-bg-color); + border-right-color: var(--te-common-bg-popover); } } } &[x-placement^='top'] { .popper__arrow { + border-color: transparent; &, &::after { - border-top-color: var(--ti-lowcode-popover-bg-color); + border-top-color: var(--te-common-bg-popover); } } } @@ -171,17 +174,17 @@ td { &[x-placement^='left'] { .popper__arrow { right: -7px; - + border-color: transparent; &, &::after { - border-left-color: var(--ti-lowcode-popover-bg-color); + border-left-color: var(--te-common-bg-popover); } } } .add-options { &.top { - border-bottom: 1px solid var(--ti-lowcode-tabs-border-color); + border-bottom: 1px solid var(--te-common-border-default); margin-bottom: 15px; overflow: hidden; display: flex; @@ -207,16 +210,14 @@ td { margin-bottom: 4px; :deep(.tiny-form-item__label) { - color: var(--ti-lowcode-toolbar-breadcrumb-color); + color: var(--te-common-text-secondary); } :deep(.tiny-input__inner) { - color: var(--ti-lowcode-tootip-input-color); - background: var(--ti-lowcode-tootip-input-background-color); - border-color: var(--ti-lowcode-tootip-input-border-color); + border-color: var(--te-common-border-default); &:focus { - border-color: var(--ti-lowcode-canvas-handle-hover-bg); + border-color: var(--te-common-bg-primary-checked); } } } @@ -247,7 +248,7 @@ td { } &.isBind { - color: var(--ti-lowcode-icon-bind-color); + color: var(--te-common-text-checked); } } } diff --git a/packages/theme/dark/canvas.less b/packages/theme/dark/canvas.less index c05a1c637..7e02a6934 100644 --- a/packages/theme/dark/canvas.less +++ b/packages/theme/dark/canvas.less @@ -1,28 +1,27 @@ +// 这里为canvas样式变量,canvas在暗色主题和亮色主题时,很多表现都一致,因此可以不使用common变量,而是直接用base变量 #canvas-wrap { - --ti-lowcode-canvas-rect-border-color: var(--ti-lowcode-base-primary-color-2); - --ti-lowcode-canvas-hover-line-in-bg-color: rgba(0, 255, 0, 0.1); - --ti-lowcode-canvas-hover-line-forbid-bg-color: var(--ti-lowcode-base-error-color); - --ti-lowcode-canvas-hover-line-in-forbid-bg-color: rgba(242, 48, 48, 0.3); - --ti-lowcode-canvas-choose-slot-border-color: var(--ti-lowcode-base-text-color-2); - --ti-lowcode-canvas-choose-slot-color: var(--ti-lowcode-base-text-color-2); + --ti-lowcode-canvas-rect-border-color: var(--te-common-border-checked); + --ti-lowcode-canvas-hover-line-in-bg-color: var(--te-base-green-140); + --ti-lowcode-canvas-hover-line-forbid-bg-color: var(--te-common-color-error); + --ti-lowcode-canvas-hover-line-in-forbid-bg-color: var(--te-base-red-140); + --ti-lowcode-canvas-choose-slot-border-color: var(--te-common-border-checked); + --ti-lowcode-canvas-choose-slot-color: var(--te-common-text-dark-inverse); // 暗色和亮色存在差异 --ti-lowcode-canvas-corner-mark-left-color: var(--te-common-text-emphasize); - --ti-lowcode-canvas-corner-mark-bottom-right-color: var(--te-common-text-emphasize); - --ti-lowcode-canvas-corner-mark-bottom-right-border-color: #c2c2c2; - --ti-lowcode-canvas-corner-mark-bottom-right-bg-color: #f5f5f5; - --ti-lowcode-canvas-corner-mark-right-color: var(--ti-lowcode-base-gray-0); - --ti-lowcode-canvas-corner-mark-right-bg-color: var(--ti-lowcode-base-primary-color-2); - --ti-lowcode-canvas-select-corner-mark-left-color: var(--ti-lowcode-base-gray-0); - --ti-lowcode-canvas-select-corner-mark-left-bg-color: var(--ti-lowcode-base-primary-color-2); + --ti-lowcode-canvas-corner-mark-bottom-right-color: var(--te-common-text-dark-inverse); + --ti-lowcode-canvas-corner-mark-bottom-right-border-color: var(--te-common-border-hover); + --ti-lowcode-canvas-corner-mark-bottom-right-bg-color: var(--te-common-bg-primary-emphasize); // 暗色和亮色存在差异 + --ti-lowcode-canvas-corner-mark-right-color: var(--te-common-text-dark-inverse); + --ti-lowcode-canvas-corner-mark-right-bg-color: var(--te-common-bg-primary-checked); + --ti-lowcode-canvas-select-corner-mark-left-color: var(--te-common-text-dark-inverse); + --ti-lowcode-canvas-select-corner-mark-left-bg-color: var(--te-common-bg-primary-checked); --ti-lowcode-canvas-footer-border-top-color: transparent; // canvas 底部面包屑 边框色 - --ti-lowcode-canvas-tab-handle-bg: var(--ti-lowcode-common-component-bg); // canvas 宽度拖动手柄 背景色 - --ti-lowcode-canvas-tab-handle-hover-bg: var(--ti-lowcode-common-primary-color); // canvas 宽度拖动手柄 hover 背景色 - --ti-lowcode-canvas-tab-handle-color: var( - --ti-lowcode-common-secondary-text-color - ); // canvas 宽度拖动手柄 两条竖线颜色 - --ti-lowcode-canvas-menu-bg: var(--ti-lowcode-common-component-hover-bg); // canvas 右键菜单背景 - --ti-lowcode-canvas-menu-item-color: #adb0b8; // 右键菜单文字颜色 - --ti-lowcode-canvas-menu-item-hover-bg-color: #5e5e5e; - --ti-lowcode-canvas-menu-border-color: var(--ti-lowcode-common-border-color-2); + --ti-lowcode-canvas-tab-handle-bg: var(--te-common-bg-container); // canvas 宽度拖动手柄 背景色 + --ti-lowcode-canvas-tab-handle-hover-bg: var(--te-common-bg-primary-checked); // canvas 宽度拖动手柄 hover 背景色 + --ti-lowcode-canvas-tab-handle-color: var(--te-common-border-hover); // canvas 宽度拖动手柄 两条竖线颜色 + --ti-lowcode-canvas-menu-bg: var(--te-common-bg-container); // canvas 右键菜单背景 暗色和亮色存在差异 + --ti-lowcode-canvas-menu-item-color: var(--te-common-text-secondary); // 右键菜单文字颜色 + --ti-lowcode-canvas-menu-item-hover-bg-color: var(--te-common-bg-default); + --ti-lowcode-canvas-menu-border-color: var(--te-common-border-default); --ti-lowcode-canvas-menu-item-disabled-color: var(--te-common-text-weaken); } diff --git a/packages/theme/dark/package.json b/packages/theme/dark/package.json index 31700fc42..3ee03306b 100644 --- a/packages/theme/dark/package.json +++ b/packages/theme/dark/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-theme-dark", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/theme/dark/setting-style.less b/packages/theme/dark/setting-style.less index 552eee7e3..7672f02a1 100644 --- a/packages/theme/dark/setting-style.less +++ b/packages/theme/dark/setting-style.less @@ -1,8 +1,7 @@ :root { - --ti-lowcode-setting-style-input-bg: var(--ti-lowcode-base-blue-6); - --ti-lowcode-setting-style-font-color: var(--ti-lowcode-common-secondary-text-color); // light - --ti-lowcode-setting-style-input-font-color: var(--ti-lowcode-base-gray-0); - --ti-lowcode-setting-style-btn-font-color: var(--ti-lowcode-base-gray-40); - --ti-lowcode-setting-style-btn-border-color: var(--ti-lowcode-base-blue-6); - --ti-lowcode-setting-style-title-color: var(--ti-lowcode-base-text-color); + --ti-lowcode-setting-style-input-bg: var(--te-common-bg-primary-emphasize); + --ti-lowcode-setting-style-font-color: var(--te-common-text-dark-inverse); + --ti-lowcode-setting-style-input-font-color: var(--te-common-text-dark-inverse); + --ti-lowcode-setting-style-btn-font-color: var(--te-common-text-primary); + --ti-lowcode-setting-style-btn-border-color: var(--te-common-border-default); } diff --git a/packages/theme/light/canvas.less b/packages/theme/light/canvas.less index d9539b31e..de33eb032 100644 --- a/packages/theme/light/canvas.less +++ b/packages/theme/light/canvas.less @@ -1,8 +1,9 @@ +// 这里为canvas样式变量,canvas在暗色主题和亮色主题时,很多表现都一致,因此可以不使用common变量,而是直接用base变量 #canvas-wrap { --ti-lowcode-canvas-rect-border-color: var(--te-common-border-checked); - --ti-lowcode-canvas-hover-line-in-bg-color: var(--te-base-rgba-25); + --ti-lowcode-canvas-hover-line-in-bg-color: var(--te-base-green-140); --ti-lowcode-canvas-hover-line-forbid-bg-color: var(--te-common-color-error); - --ti-lowcode-canvas-hover-line-in-forbid-bg-color: var(--te-base-rgba-26); + --ti-lowcode-canvas-hover-line-in-forbid-bg-color: var(--te-base-red-140); --ti-lowcode-canvas-choose-slot-border-color: var(--te-common-border-checked); --ti-lowcode-canvas-choose-slot-color: var(--te-common-text-dark-inverse); --ti-lowcode-canvas-corner-mark-left-color: var(--te-common-text-emphasize); @@ -14,13 +15,13 @@ --ti-lowcode-canvas-select-corner-mark-left-color: var(--te-common-text-dark-inverse); --ti-lowcode-canvas-select-corner-mark-left-bg-color: var(--te-common-bg-primary-checked); - --ti-lowcode-canvas-footer-border-top-color: var(--ti-lowcode-common-border-color-4); // canvas 底部面包屑 边框色 - --ti-lowcode-canvas-tab-handle-bg: var(--ti-lowcode-common-secondary-text-color); // canvas 宽度拖动手柄 背景色 - --ti-lowcode-canvas-tab-handle-hover-bg: var(--ti-lowcode-common-primary-color); // canvas 宽度拖动手柄 hover 背景色 - --ti-lowcode-canvas-tab-handle-color: var(--ti-lowcode-common-text-color-2); // canvas 宽度拖动手柄 两条竖线颜色 - --ti-lowcode-canvas-menu-bg: var(--ti-lowcode-common-component-bg); // canvas 右键菜单背景 + --ti-lowcode-canvas-footer-border-top-color: var(--te-common-border-default); // canvas 底部面包屑 边框色 + --ti-lowcode-canvas-tab-handle-bg: var(--te-common-bg-container); // canvas 宽度拖动手柄 背景色 + --ti-lowcode-canvas-tab-handle-hover-bg: var(--te-common-bg-primary-checked); // canvas 宽度拖动手柄 hover 背景色 + --ti-lowcode-canvas-tab-handle-color: var(--te-common-border-hover); // canvas 宽度拖动手柄 两条竖线颜色 + --ti-lowcode-canvas-menu-bg: var(--te-common-bg-default); // canvas 右键菜单背景 --ti-lowcode-canvas-menu-item-color: var(--te-common-text-primary); // 右键菜单文字颜色 --ti-lowcode-canvas-menu-item-hover-bg-color: var(--te-common-bg-container); --ti-lowcode-canvas-menu-border-color: var(--te-common-border-default); - --ti-lowcode-canvas-menu-item-disabled-color: var(--ti-lowcode-base-text-color-4); + --ti-lowcode-canvas-menu-item-disabled-color: var(--te-common-text-weaken); } diff --git a/packages/theme/light/package.json b/packages/theme/light/package.json index 9644f5cce..8f82710b6 100644 --- a/packages/theme/light/package.json +++ b/packages/theme/light/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-theme-light", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/theme/light/setting-style.less b/packages/theme/light/setting-style.less index 1782792b4..7672f02a1 100644 --- a/packages/theme/light/setting-style.less +++ b/packages/theme/light/setting-style.less @@ -1,11 +1,7 @@ :root { - --ti-lowcode-setting-style-input-bg: var(--ti-lowcode-base-blue-6); - --ti-lowcode-setting-style-font-color: var(--ti-lowcode-base-text-color); - --ti-lowcode-setting-style-input-font-color: var(--ti-lowcode-base-gray-0); - --ti-lowcode-setting-style-btn-font-color: var(--ti-lowcode-base-gray-50); - --ti-lowcode-setting-style-btn-border-color: var(--ti-lowcode-base-gray-90); - --ti-lowcode-setting-style-title-color: var(--ti-lowcode-base-text-color); - --ti-lowcode-setting-style-tab-bg-color: var(--ti-lowcode-base-bg-7); - --ti-lowcode-setting-style-drag-bar-bg: var(--ti-lowcode-base-bg); - --ti-lowcode-setting-style-spacing-bg: var(--te-base-gray-34); + --ti-lowcode-setting-style-input-bg: var(--te-common-bg-primary-emphasize); + --ti-lowcode-setting-style-font-color: var(--te-common-text-dark-inverse); + --ti-lowcode-setting-style-input-font-color: var(--te-common-text-dark-inverse); + --ti-lowcode-setting-style-btn-font-color: var(--te-common-text-primary); + --ti-lowcode-setting-style-btn-border-color: var(--te-common-border-default); } diff --git a/packages/toolbars/breadcrumb/package.json b/packages/toolbars/breadcrumb/package.json index 6861acb89..eca54594c 100644 --- a/packages/toolbars/breadcrumb/package.json +++ b/packages/toolbars/breadcrumb/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-breadcrumb", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/clean/package.json b/packages/toolbars/clean/package.json index a21fa0364..c1f3080ec 100644 --- a/packages/toolbars/clean/package.json +++ b/packages/toolbars/clean/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-clean", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/collaboration/package.json b/packages/toolbars/collaboration/package.json index d0bf1136e..0d7644e79 100644 --- a/packages/toolbars/collaboration/package.json +++ b/packages/toolbars/collaboration/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-collaboration", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/fullscreen/package.json b/packages/toolbars/fullscreen/package.json index cf097282f..5306a9abc 100644 --- a/packages/toolbars/fullscreen/package.json +++ b/packages/toolbars/fullscreen/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-fullscreen", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/generate-code/package.json b/packages/toolbars/generate-code/package.json index 88fc15c0d..ccec83a37 100644 --- a/packages/toolbars/generate-code/package.json +++ b/packages/toolbars/generate-code/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-generate-code", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/lang/package.json b/packages/toolbars/lang/package.json index 4edc5ed58..85c8609bd 100644 --- a/packages/toolbars/lang/package.json +++ b/packages/toolbars/lang/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-lang", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/layout/package.json b/packages/toolbars/layout/package.json index 41f25aade..610dcb4fa 100644 --- a/packages/toolbars/layout/package.json +++ b/packages/toolbars/layout/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-layout", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/lock/package.json b/packages/toolbars/lock/package.json index 3cafb8c63..47fb4ffe1 100644 --- a/packages/toolbars/lock/package.json +++ b/packages/toolbars/lock/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-lock", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/logo/package.json b/packages/toolbars/logo/package.json index 361fb6cdb..0bc673341 100644 --- a/packages/toolbars/logo/package.json +++ b/packages/toolbars/logo/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-logo", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/logout/package.json b/packages/toolbars/logout/package.json index b6eba9296..65a57e8bb 100644 --- a/packages/toolbars/logout/package.json +++ b/packages/toolbars/logout/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-logout", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/media/package.json b/packages/toolbars/media/package.json index f9bc5f3b8..d43dd0cec 100644 --- a/packages/toolbars/media/package.json +++ b/packages/toolbars/media/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-media", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/preview/package.json b/packages/toolbars/preview/package.json index 7d9932c5b..6d6daef72 100644 --- a/packages/toolbars/preview/package.json +++ b/packages/toolbars/preview/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-preview", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/redoundo/package.json b/packages/toolbars/redoundo/package.json index 7e31bf873..7886a7ae9 100644 --- a/packages/toolbars/redoundo/package.json +++ b/packages/toolbars/redoundo/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-redoundo", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/refresh/package.json b/packages/toolbars/refresh/package.json index 8565ba96d..5544b244c 100644 --- a/packages/toolbars/refresh/package.json +++ b/packages/toolbars/refresh/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-refresh", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/save/package.json b/packages/toolbars/save/package.json index 372ae74d6..b22b28b1d 100644 --- a/packages/toolbars/save/package.json +++ b/packages/toolbars/save/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-save", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/toolbars/save/src/js/index.js b/packages/toolbars/save/src/js/index.js index 39f1479d5..c40c32701 100644 --- a/packages/toolbars/save/src/js/index.js +++ b/packages/toolbars/save/src/js/index.js @@ -58,7 +58,7 @@ const savePage = async (pageSchema) => { } isLoading.value = true - await handlePageUpdate(currentPage.id, { ...currentPage, ...params }) + await handlePageUpdate(currentPage.id, { ...currentPage, ...params }, false, true) isLoading.value = false } diff --git a/packages/toolbars/setting/package.json b/packages/toolbars/setting/package.json index a98e24747..208d216ce 100644 --- a/packages/toolbars/setting/package.json +++ b/packages/toolbars/setting/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-toolbar-setting", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index 4d9c1f25e..599aa7dc7 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-utils", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/vue-generator/package.json b/packages/vue-generator/package.json index 84e99fc85..166f2f0ce 100644 --- a/packages/vue-generator/package.json +++ b/packages/vue-generator/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-dsl-vue", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" }, diff --git a/packages/vue-generator/src/generator/generateApp.js b/packages/vue-generator/src/generator/generateApp.js index b602a1c9e..066181e46 100644 --- a/packages/vue-generator/src/generator/generateApp.js +++ b/packages/vue-generator/src/generator/generateApp.js @@ -15,8 +15,8 @@ import CodeGenerator from './codeGenerator' /** * 整体应用出码 - * @param {tinyEngineDslVue.IConfig} config - * @returns {tinyEngineDslVue.codeGenInstance} + * @param {import('@opentiny/tiny-engine-dsl-vue').IConfig} config + * @returns {import('@opentiny/tiny-engine-dsl-vue').codeGenInstance} */ export function generateApp(config = {}) { diff --git a/packages/vue-generator/src/index.d.ts b/packages/vue-generator/src/index.d.ts index 618b83bca..167700811 100644 --- a/packages/vue-generator/src/index.d.ts +++ b/packages/vue-generator/src/index.d.ts @@ -1,5 +1,8 @@ -declare namespace tinyEngineDslVue { - type defaultPlugins = +declare module '@opentiny/tiny-engine-dsl-vue' { + export function generateCode(param: { pageInfo: any; componentsMap?: Array; blocksData?: Array }): { + [key: string]: any + } + export type defaultPlugins = | 'template' | 'block' | 'page' @@ -12,9 +15,9 @@ declare namespace tinyEngineDslVue { | 'formatCode' | 'parseSchema' - type IPluginFun = (schema: IAppSchema, context: IContext) => void + export type IPluginFun = (schema: IAppSchema, context: IContext) => void - interface IConfig { + export interface IConfig { customPlugins?: { [key in defaultPlugins]?: IPluginFun } & { @@ -26,7 +29,7 @@ declare namespace tinyEngineDslVue { customContext?: Record } - interface IContext { + export interface IContext { config: Record genResult: Array genLogs: Array @@ -35,24 +38,24 @@ declare namespace tinyEngineDslVue { export function generateApp(config?: IConfig): codeGenInstance - interface codeGenInstance { - generate(IAppSchema): ICodeGenResult + export interface codeGenInstance { + generate(schema: IAppSchema): ICodeGenResult } - interface ICodeGenResult { + export interface ICodeGenResult { errors: Array genResult: Array genLogs: Array } - interface IFile { + export interface IFile { fileType: string fileName: string path: string fileContent: string } - interface IAppSchema { + export interface IAppSchema { i18n: { en_US: Record zh_CN: Record @@ -66,37 +69,37 @@ declare namespace tinyEngineDslVue { meta: IMetaInfo } - interface IUtilsItem { + export interface IUtilsItem { name: string type: 'npm' | 'function' content: object } - interface IDataSource { + export interface IDataSource { list: Array<{ id: number; name: string; data: object }> dataHandler?: IFuncType errorHandler?: IFuncType willFetch?: IFuncType } - interface IFuncType { + export interface IFuncType { type: 'JSFunction' value: string } - interface IExpressionType { + export interface IExpressionType { type: 'JSExpression' value: string } - interface IGlobalStateItem { + export interface IGlobalStateItem { id: string state: Record actions: Record getters: Record } - interface IPageSchema { + export interface IPageSchema { componentName: 'Page' | 'Block' css: string fileName: string @@ -120,7 +123,7 @@ declare namespace tinyEngineDslVue { } } - interface IFolderItem { + export interface IFolderItem { componentName: 'Folder' depth: number folderName: string @@ -129,14 +132,14 @@ declare namespace tinyEngineDslVue { router: string } - interface ISchemaChildrenItem { + export interface ISchemaChildrenItem { children: Array componentName: string id: string props: Record } - interface IComponentMapItem { + export interface IComponentMapItem { componentName: string destructuring: boolean exportName?: string @@ -144,7 +147,7 @@ declare namespace tinyEngineDslVue { version: string } - interface IMetaInfo { + export interface IMetaInfo { name: string description: string } diff --git a/packages/vue-generator/src/plugins/formatCodePlugin.js b/packages/vue-generator/src/plugins/formatCodePlugin.js index 5662c41bf..b55d2f500 100644 --- a/packages/vue-generator/src/plugins/formatCodePlugin.js +++ b/packages/vue-generator/src/plugins/formatCodePlugin.js @@ -29,7 +29,7 @@ function formatCode(options = {}) { description: 'transform block schema to code', /** * 格式化出码 - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema, context) { diff --git a/packages/vue-generator/src/plugins/genBlockPlugin.js b/packages/vue-generator/src/plugins/genBlockPlugin.js index f2b834fba..879847017 100644 --- a/packages/vue-generator/src/plugins/genBlockPlugin.js +++ b/packages/vue-generator/src/plugins/genBlockPlugin.js @@ -15,7 +15,7 @@ function genBlockPlugin(options = {}) { description: 'transform block schema to code', /** * 将区块 schema 转换成高代码 - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genDataSourcePlugin.js b/packages/vue-generator/src/plugins/genDataSourcePlugin.js index 0b8b0c74d..3c17badfe 100644 --- a/packages/vue-generator/src/plugins/genDataSourcePlugin.js +++ b/packages/vue-generator/src/plugins/genDataSourcePlugin.js @@ -15,7 +15,7 @@ function genDataSourcePlugin(options = {}) { description: 'transform schema to dataSource plugin', /** * 转换 dataSource - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genDependenciesPlugin.js b/packages/vue-generator/src/plugins/genDependenciesPlugin.js index da84f3b7b..5bdb77a8b 100644 --- a/packages/vue-generator/src/plugins/genDependenciesPlugin.js +++ b/packages/vue-generator/src/plugins/genDependenciesPlugin.js @@ -63,7 +63,7 @@ function genDependenciesPlugin(options = {}) { description: 'transform dependencies to package.json', /** * 分析依赖,写入 package.json - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genGlobalState.js b/packages/vue-generator/src/plugins/genGlobalState.js index 324f698a7..3e680a0c8 100644 --- a/packages/vue-generator/src/plugins/genGlobalState.js +++ b/packages/vue-generator/src/plugins/genGlobalState.js @@ -25,7 +25,7 @@ function genDependenciesPlugin(options = {}) { description: 'transform schema to globalState', /** * 转换 globalState - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genI18nPlugin.js b/packages/vue-generator/src/plugins/genI18nPlugin.js index be5fd00fd..290adece7 100644 --- a/packages/vue-generator/src/plugins/genI18nPlugin.js +++ b/packages/vue-generator/src/plugins/genI18nPlugin.js @@ -17,7 +17,7 @@ function genI18nPlugin(options = {}) { description: 'transform i18n schema to i18n code plugin', /** * 将国际化 schema 转换成 i18n 高代码 - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genPagePlugin.js b/packages/vue-generator/src/plugins/genPagePlugin.js index 9f6fb4306..68b9c7115 100644 --- a/packages/vue-generator/src/plugins/genPagePlugin.js +++ b/packages/vue-generator/src/plugins/genPagePlugin.js @@ -15,7 +15,7 @@ function genPagePlugin(options = {}) { description: 'transform page schema to code', /** * 将页面 schema 转换成高代码 - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genRouterPlugin.js b/packages/vue-generator/src/plugins/genRouterPlugin.js index 1a92510f4..bccc98eae 100644 --- a/packages/vue-generator/src/plugins/genRouterPlugin.js +++ b/packages/vue-generator/src/plugins/genRouterPlugin.js @@ -36,7 +36,7 @@ function genRouterPlugin(options = {}) { description: 'transform router schema to router code plugin', /** * 根据页面生成路由配置 - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/genTemplatePlugin.js b/packages/vue-generator/src/plugins/genTemplatePlugin.js index a48089a7a..159c331af 100644 --- a/packages/vue-generator/src/plugins/genTemplatePlugin.js +++ b/packages/vue-generator/src/plugins/genTemplatePlugin.js @@ -18,7 +18,7 @@ function genTemplatePlugin(options = {}) { return } - const template = context?.template || 'default' + const template = options?.template || 'default' if (!template) { return diff --git a/packages/vue-generator/src/plugins/genUtilsPlugin.js b/packages/vue-generator/src/plugins/genUtilsPlugin.js index ba89c5265..2c7a1cdab 100644 --- a/packages/vue-generator/src/plugins/genUtilsPlugin.js +++ b/packages/vue-generator/src/plugins/genUtilsPlugin.js @@ -42,7 +42,7 @@ function genUtilsPlugin(options = {}) { description: 'transform utils schema to utils code', /** * 生成 utils 源码 - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/plugins/parseSchemaPlugin.js b/packages/vue-generator/src/plugins/parseSchemaPlugin.js index 5e62f520b..1510c9c23 100644 --- a/packages/vue-generator/src/plugins/parseSchemaPlugin.js +++ b/packages/vue-generator/src/plugins/parseSchemaPlugin.js @@ -7,7 +7,7 @@ function parseSchema() { /** * 解析schema,预处理 schema - * @param {tinyEngineDslVue.IAppSchema} schema + * @param {import('@opentiny/tiny-engine-dsl-vue').IAppSchema} schema * @returns */ run(schema) { diff --git a/packages/vue-generator/src/templates/vue-template/index.js b/packages/vue-generator/src/templates/vue-template/index.js index b2a5ab9b4..3c9c229e6 100644 --- a/packages/vue-generator/src/templates/vue-template/index.js +++ b/packages/vue-generator/src/templates/vue-template/index.js @@ -3,6 +3,7 @@ import genViteConfig from './templateFiles/genViteConfig' import getPackageJson from './templateFiles/packageJson' import gitIgnoreFile from './templateFiles/.gitignore?raw' import entryHTMLFile from './templateFiles/index.html?raw' +import logoImage from './templateFiles/public/favicon.ico' import mainJSFile from './templateFiles/src/main.js?raw' import appVueFile from './templateFiles/src/App.vue?raw' import bridgeFile from './templateFiles/src/lowcodeConfig/bridge.js?raw' @@ -32,12 +33,48 @@ const getTemplate = (schema, str) => { }) } +/** + * 图片的 base64 转 Blob 对象,用于生成本地图片 + * @param {*} base64 String + * @returns Blob + */ +const base64ToBlob = (base64Data) => { + // Split base64 + const arr = base64Data.split(',') + + // Get MIME type + const mimeMatch = arr[0].match(/:(.*?);/) + + if (!mimeMatch) { + throw new Error('Invalid base64 data') + } + + const mime = mimeMatch[1] + // Decode base64 string + let raw + + try { + raw = window.atob(arr[1]) + } catch (e) { + throw new Error('Failed to decode base64 string') + } + + const rawLength = raw.length + // Convert to Blob + const uInt8Array = new Uint8Array(rawLength) + for (let i = 0; i < rawLength; i++) { + uInt8Array[i] = raw.charCodeAt(i) + } + + return new Blob([uInt8Array], { type: mime }) +} + /** * get project template * @returns */ export function generateTemplate(schema) { - return [ + const res = [ { fileType: 'md', fileName: 'README.md', @@ -122,4 +159,23 @@ export function generateTemplate(schema) { fileContent: httpEntryFile } ] + + // FIXME: vitest 测试的时候得到的并不是 base64data,所以这里需要跳过文件的出码 + if (process.env?.NODE_ENV !== 'test') { + try { + const faviconData = base64ToBlob(logoImage) + + res.push({ + fileType: 'image/x-icon', + fileName: 'favicon.ico', + path: './public', + fileContent: faviconData + }) + } catch (error) { + // eslint-disable-next-line no-console + console.error('generate favicon.ico error', error) + } + } + + return res } diff --git a/packages/vue-generator/src/templates/vue-template/templateFiles/public/favicon.ico b/packages/vue-generator/src/templates/vue-template/templateFiles/public/favicon.ico new file mode 100644 index 000000000..6271b2d81 Binary files /dev/null and b/packages/vue-generator/src/templates/vue-template/templateFiles/public/favicon.ico differ diff --git a/packages/webcomponent/package.json b/packages/webcomponent/package.json index 85cd15661..feb146b7b 100644 --- a/packages/webcomponent/package.json +++ b/packages/webcomponent/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-webcomponent-core", - "version": "2.0.0-rc.2", + "version": "2.0.0-rc.4", "publishConfig": { "access": "public" },