Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:materials sql #231

Merged
merged 7 commits into from
Jan 11, 2024
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