feat:引入第三方组件库element-plus部分组件示例 (#105)

* feat: 引入第三方组件库element-plus示例

* fix:修复格式错误

* feat:表格列配置组件

* feat:增加表格列配置组件

* fix:build error

* fix:修复scheme2code接口报错

* fix:修改import顺序
This commit is contained in:
yaoyun8 2023-12-22 14:34:14 +08:00 committed by GitHub
parent 422714e7a3
commit a3b43ec166
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13970 additions and 13135 deletions

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@ export default class Schema2CodeServcice {
return components.map((component) => {
const {
component: componentName,
npm: { package: packageName, exportName, version, destructuring }
npm: { package: packageName, exportName, version, destructuring } = {}
} = component
return {
componentName,

View File

@ -0,0 +1,33 @@
<template>
<MetaArrayItem v-bind="$attrs" @update:modelValue="updateColumns"></MetaArrayItem>
</template>
<script setup>
import { nextTick } from 'vue'
import { updateRect } from '@opentiny/tiny-engine-canvas'
import { useProperties, useResource } from '@opentiny/tiny-engine-controller'
import MetaArrayItem from './MetaArrayItem.vue'
const { children: schemaChildren, componentName, props } = useProperties().getSchema()
const configureMap = useResource().getConfigureMap()
const childComponentName =
configureMap[componentName]?.nestingRule?.childWhitelist?.[0] || schemaChildren?.[0]?.componentName
const updateColumns = (columns) => {
if (!columns?.length) {
return
}
const children = columns.map((item) => {
return {
componentName: childComponentName,
props: { ...item }
}
})
useProperties().getSchema().children = children
nextTick(updateRect)
}
updateColumns(props?.columns)
</script>

View File

@ -1,14 +1,14 @@
/**
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
* Copyright (c) 2023 - present TinyEngine Authors.
* Copyright (c) 2023 - present Huawei Cloud Computing Technologies Co., Ltd.
*
* Use of this source code is governed by an MIT-style license.
*
* THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,
* BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR
* A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS.
*
*/
import PluginSetting from './component/PluginSetting.vue'
import PluginPanel from './component/PluginPanel.vue'
@ -77,6 +77,7 @@ import MetaRelatedColumns from './component/MetaRelatedColumns.vue'
import BlockDeployDialog from './component/BlockDeployDialog.vue'
import ProgressBar from './component/ProgressBar.vue'
import MetaButtonGroup from './component/MetaButtonGroup.vue'
import MetaTableColumns from './component/MetaTableColumns.vue'
import i18n, { i18nKeyMaps } from './js/i18n.js'
@ -128,8 +129,8 @@ export const MetaComponents = {
MetaCheckboxGroup,
MetaIpSection,
MetaRelatedEditor,
MetaRelatedColumns
MetaRelatedColumns,
MetaTableColumns
}
export {
@ -188,5 +189,6 @@ export {
SaveNewBlock,
BindI18n,
BlockDeployDialog,
ProgressBar
ProgressBar,
MetaTableColumns
}

File diff suppressed because it is too large Load Diff