SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for work -- ---------------------------- DROP TABLE IF EXISTS `work`; CREATE TABLE `work` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '标题', `description` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '描述', `cover_image_url` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `pages` json NULL, `publish` tinyint(1) NOT NULL DEFAULT 0, `template` tinyint(1) NOT NULL DEFAULT 0, `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间', `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for work_forms -- ---------------------------- DROP TABLE IF EXISTS `work_forms`; CREATE TABLE `work_forms` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `form` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL, `work_id` bigint(20) NOT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `work_id` (`work_id`) USING BTREE, CONSTRAINT `work_forms_ibfk_1` FOREIGN KEY (`work_id`) REFERENCES `work` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; create table scripts ( id int auto_increment primary key, title varchar(255) not null comment '标题', content longtext not null comment '内容', create_time datetime default CURRENT_TIMESTAMP not null, update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP ) comment '脚本' charset = utf8mb3; INSERT INTO scripts (id, title, content, create_time, update_time) VALUES (1, '测试脚本1', 'return { methodsConfig: { // 此项配置自定义方法的在组件配置面板如何展示 clickFn: { // 方法名,对应于 methods 内的某方法 label: \'外部跳转1\', // 自定义方法显示名 params: [ // 参数列表,对象数组 { label: \'类型\', desc: \'query形式参数\', type: \'object\', default: \'http://\', editor: { type: \'a-select\', label: \'类型\', prop: { options: [ { "label": "http://", "value": "http://" }, { "label": "https://", "value": "https://" }, { "label": "邮件", "value": "mailto:" }, { "label": "打电话", "value": "tel:" }, { "label": "页码跳转", "value": "#page" }, { "label": "表单提交", "value": "@submit" }, { "label": "分享", "value": "@share" } ] } } }, { label: \'跳转地址\', // 参数1的名称 desc: \'项目相对地址\', // 参数1的描述 type: \'string\', // 参数1的类型,支持string|number|boolean|array|object default: \'www.baidu.com\', // 参数1默认值 }, ] } }, methods:{ clickFn:function(type, url){ console.log(url) let win = window.open(type+url, \'_blank\') win.focus() } } }', now(), now());