Skip to content

Commit

Permalink
fix:materials sql (#231)
Browse files Browse the repository at this point in the history
* fix: 修复数据源mock数据不一致

* fix:新增组件写入sql数据问题
  • Loading branch information
yaoyun8 committed Jan 11, 2024
1 parent 1cbecd2 commit 00160f9
Showing 1 changed file with 40 additions and 7 deletions.
47 changes: 40 additions & 7 deletions scripts/connection.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ class MysqlConnection {
return
}

if (value === void 0) {
return
}

if (typeof value === 'string') {
const formatValue = this.formatSingleQuoteValue(value)

Expand Down Expand Up @@ -160,8 +164,37 @@ class MysqlConnection {
* @returns 新增组件的sql语句
*/
insertComponent(component) {
const defaultNpm = {
package: '',
exportName: '',
version: '1.0.0',
destructuring: true
}
const defaultConfigure = {
loop: true,
condition: true,
styles: true,
isContainer: true,
isModal: false,
nestingRule: {
childWhiteList: '',
parentWhiteList: '',
descendantBlacklist: '',
ancestorWhitelist: ''
},
isNullNode: false,
isLayout: false,
rootSelector: '',
shortcuts: {
properties: ['value', 'disabled']
},
contextMenu: {
actions: ['create symbol'],
disable: ['copy', 'remove']
}
}
const {
version,
version = '1.0.0',
name,
component: componentName,
icon,
Expand All @@ -170,14 +203,14 @@ class MysqlConnection {
screenshot,
tags,
keywords,
devMode,
npm,
devMode = 'proCode',
npm = defaultNpm,
group,
category,
category = 'general',
priority = 1,
snippets,
schema,
configure,
snippets = [{}],
schema = {},
configure = defaultConfigure,
public: publicRight = 0,
framework = 'vue',
isOfficial = 0,
Expand Down

0 comments on commit 00160f9

Please sign in to comment.