diff --git a/.codecheck/check.yml b/.codecheck/check.yml index 4a049241a0..d485815226 100644 --- a/.codecheck/check.yml +++ b/.codecheck/check.yml @@ -8,4 +8,4 @@ tool_params: secsolar: source_dir: ./ cmetrics: - exclude: vite.config.js|package.json|index.js|axios.js|.eslintrc.js|mockServer|packages/vue-generator/test|packages/vue-generator/src/templates|packages/build/vite-plugin-meta-comments/src/test + exclude: vite.config.js|package.json|index.js|axios.js|.eslintrc.js|mockServer|packages/engine-cli/template|packages/vue-generator/test|packages/vue-generator/src/templates|packages/build/vite-plugin-meta-comments/src/test diff --git a/.env.local b/.env.local index a361a78c8f..93b036e1e4 100644 --- a/.env.local +++ b/.env.local @@ -2,4 +2,6 @@ SQL_HOST=localhost SQL_PORT=3306 SQL_USER=root SQL_PASSWORD=admin -SQL_DATABASE=tiny_engine \ No newline at end of file +SQL_DATABASE=tiny_engine + +backend_url=http://localhost:9090/material-center/api/component/bundle/create \ No newline at end of file diff --git a/.github/auto-labeler.yml b/.github/auto-labeler.yml index 47770e6244..e0ef8c69a2 100644 --- a/.github/auto-labeler.yml +++ b/.github/auto-labeler.yml @@ -10,7 +10,7 @@ labels: sync: true matcher: title: '^.+!:|#breaking' - body: '#breaking' + body: '## Does this PR introduce a breaking change\?\s+- \[[xX]\] *Yes' - label: 'enhancement' sync: true matcher: diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml new file mode 100644 index 0000000000..340c6fdbbd --- /dev/null +++ b/.github/workflows/deploy-gh-pages.yml @@ -0,0 +1,56 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: [develop] + +jobs: + deploy-gh-pages: + runs-on: ubuntu-latest + concurrency: + group: deploy-gh-pages + cancel-in-progress: true + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + run_install: false + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + + - name: Install dependencies + run: pnpm install + + - name: add environment variable + run: | + cat <<'EOF' >> designer-demo/env/.env.alpha + // ---- appended by CI (gh-pages) ---- + VITE_ORIGIN=https://agent.opentiny.design/ + EOF + - name: change material url + run: | + sed -i "s#material: \['/mock/bundle.json'\]#material: \['https://opentiny.github.io/tiny-engine/mock/bundle.json'\]#g" designer-demo/engine.config.js + echo "Updated material url in designer-demo/engine.config.js" + - name: Run Build + run: | + set -eo pipefail + pnpm run build:plugin 2>&1 | tee /tmp/build-plugin.log + pnpm run build:alpha 2>&1 | tee /tmp/build-alpha.log + + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./designer-demo/dist/ + keep_files: true + force_orphan: false + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' diff --git a/README.md b/README.md index 395c6909f0..34b9befafa 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@

TinyEngine enables developers to customize low-code platforms, build low-code platforms online in real time, and support secondary development or integration of low-code platform capabilities.

+[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/opentiny/tiny-engine) + English | [简体中文](README.zh-CN.md) 🌈 Features: diff --git a/designer-demo/engine.config.js b/designer-demo/engine.config.js index fa308f9bc2..0ed7c1858a 100644 --- a/designer-demo/engine.config.js +++ b/designer-demo/engine.config.js @@ -3,5 +3,7 @@ export default { theme: 'light', material: ['/mock/bundle.json'], scripts: [], - styles: [] + styles: [], + // 是否开启 TailWindCSS 特性 + enableTailwindCSS: true } diff --git a/designer-demo/package.json b/designer-demo/package.json index 746ea8144b..248aab5d45 100644 --- a/designer-demo/package.json +++ b/designer-demo/package.json @@ -1,7 +1,7 @@ { "name": "designer-demo", "private": true, - "version": "2.7.0", + "version": "2.9.0", "type": "module", "scripts": { "dev": "cross-env vite", diff --git a/designer-demo/public/default-template-cover.png b/designer-demo/public/default-template-cover.png new file mode 100644 index 0000000000..e9d55e0d30 Binary files /dev/null and b/designer-demo/public/default-template-cover.png differ diff --git a/designer-demo/public/mock/bundle.json b/designer-demo/public/mock/bundle.json index 53c0ca0d82..5bf5429a01 100644 --- a/designer-demo/public/mock/bundle.json +++ b/designer-demo/public/mock/bundle.json @@ -4,53 +4,26 @@ "materials": { "components": [ { - "id": 1, - "version": "2.4.2", + "version": "3.22.0", "name": { - "zh_CN": "输入框" + "zh_CN": "评分" }, - "component": "ElInput", - "icon": "input", - "description": "通过鼠标或键盘输入字符", - "doc_url": "", + "component": "TinyRate", + "icon": "line", + "description": "评分", + "docUrl": "", "screenshot": "", "tags": "", "keywords": "", - "dev_mode": "proCode", + "devMode": "proCode", "npm": { - "package": "element-plus", - "exportName": "ElInput", + "package": "@opentiny/vue", + "exportName": "TinyRate", "destructuring": true }, - "group": "表单组件", - "category": "element-plus", - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "isPopper": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["type", "size"] - }, - "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, + "group": "component", + "category": "评分组件", + "priority": 2, "schema": { "properties": [ { @@ -60,721 +33,561 @@ }, "content": [ { - "property": "modelValue", + "cols": 12, + "type": "number", "label": { "text": { "zh_CN": "绑定值" } }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "modelValue", + "readOnly": false, + "required": false, "description": { "zh_CN": "绑定值" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "defaultValue": 0, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "最大分值" } }, - "description": { - "zh_CN": "尺寸" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "max", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "最大分值" + }, + "defaultValue": 5, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", + "type": "array", + "label": { + "text": { + "zh_CN": "颜色数组" + } + }, "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "colors", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "icon 的颜色数组,为 Threshold 三个分段所对应的颜色" + }, + "defaultValue": "['#FADB14', '#FADB14', '#FADB14']", + "labelPosition": "left" }, { - "property": "type", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "禁用未选中颜色" } }, - "description": { - "zh_CN": "类型" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "disabled-void-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "禁用状态下未选中 icon 的颜色" + }, + "defaultValue": "#D9D9D9", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", "type": "string", + "label": { + "text": { + "zh_CN": "禁用未选中图标类" + } + }, "widget": { - "component": "InputConfigurator", - "props": {} - } + "props": { + "placeholder": "请输入图标名称" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "disabled-void-icon-class", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "只读状态下未选中的图标样式名" + }, + "defaultValue": "icon-starActive", + "labelPosition": "left" }, { - "property": "placeholder", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "图标类数组" } }, - "description": { - "zh_CN": "输入框占位文本" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "icon-classes", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "三个分段对应的图标样式名" + }, + "defaultValue": "['icon-starActive', 'icon-starActive', 'icon-starActive']", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", "type": "string", + "label": { + "text": { + "zh_CN": "图标大小" + } + }, "widget": { - "component": "I18nConfigurator", - "props": {} + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "device": [] + "disabled": false, + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "图标字体大小" + }, + "defaultValue": "18px", + "labelPosition": "left" }, { - "property": "maxlength", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "最大长度" + "zh_CN": "图标间距" } }, - "description": { - "zh_CN": "最大输入长度" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "space", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "每个图标所占宽度" + }, + "defaultValue": "24px", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "type": "number", + "type": "string", + "label": { + "text": { + "zh_CN": "文字颜色" + } + }, "widget": { - "component": "NumberConfigurator", - "props": {} + "props": {}, + "component": "ColorConfigurator" }, - "device": [] + "disabled": false, + "property": "text-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "辅助文字的颜色" + }, + "defaultValue": "#666666", + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "是否禁用" + "zh_CN": "未选中颜色" } }, - "description": { - "zh_CN": "是否禁用" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "void-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "未选中 icon 的颜色" + }, + "defaultValue": "#BFBFBF", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "string", + "label": { + "text": { + "zh_CN": "未选中图标类" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "placeholder": "请输入图标名称" + }, + "component": "InputConfigurator" }, - "device": [] + "disabled": false, + "property": "void-icon-class", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "未选中 icon 的图标样式名" + }, + "defaultValue": "icon-starDisable", + "labelPosition": "left" } ], "description": { - "zh_CN": "" - } - } - ], - "events": { - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定值改变时触发" - }, - "description": { - "zh_CN": "双向绑定值改变时触发" - } - }, - "onBlur": { - "label": { - "zh_CN": "输入框失去焦点时触发" - }, - "description": { - "zh_CN": "输入框失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - } - }, - "slots": { - "prefix": { - "label": { - "zh_CN": "头部内容" - }, - "description": { - "zh_CN": "输入框头部内容,只对非 type='textarea' 有效" - } - }, - "suffix": { - "label": { - "zh_CN": "尾部内容" - }, - "description": { - "zh_CN": "输入框尾部内容,只对非 type='textarea' 有效" - } - }, - "prepend": { - "label": { - "zh_CN": "前置内容" - }, - "description": { - "zh_CN": "输入框前置内容,只对非 type='textarea' 有效" + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" } }, - "append": { - "label": { - "zh_CN": "后置内容" - }, - "description": { - "zh_CN": "输入框后置内容,只对非 type='textarea' 有效" - } - } - } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "日期选择器" - }, - "component": "ElDatePicker", - "icon": "datepick", - "description": "日期选择器", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElDatePicker", - "destructuring": true - }, - "group": "表单组件", - "category": "element-plus", - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "isPopper": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["type", "size"] - }, - "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, - "schema": { - "properties": [ { - "name": "0", + "name": "2", "label": { - "zh_CN": "基础属性" + "zh_CN": "行为属性" }, "content": [ { - "property": "modelValue", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "允许半选" } }, - "description": { - "zh_CN": "绑定值" - }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "readonly", - "label": { - "text": { - "zh_CN": "只读" - } + "props": {}, + "component": "CheckBoxConfigurator" }, + "disabled": false, + "property": "allow-half", + "readOnly": false, + "required": false, "description": { - "zh_CN": "是否只读" + "zh_CN": "是否允许半选" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", "defaultValue": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "boolean", "label": { "text": { "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否禁用" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否为只读" + }, "defaultValue": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "高分阈值" } }, - "description": { - "zh_CN": "输入框尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "", "widget": { - "component": "SelectConfigurator", "props": { - "allowClear": true, - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "high-threshold", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "高分和中等分数的界限值,值本身被划分在高分中" + }, + "defaultValue": 4, + "labelPosition": "left" }, { - "property": "editable", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "是否可编辑" + "zh_CN": "低分阈值" } }, - "description": { - "zh_CN": "文本框是否可编辑" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "defaultValue": true, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "low-threshold", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "低分和中等分数的界限值,值本身被划分在低分中" }, - "device": [] + "defaultValue": 2, + "labelPosition": "left" }, { - "property": "clearable", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "是否可清除" + "zh_CN": "单选形态" } }, - "description": { - "zh_CN": "是否显示清楚按钮" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "defaultValue": true, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "radio", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "评分其他形态单选" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "placeholder", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "分数模板" } }, - "description": { - "zh_CN": "非范围选择时的占位内容" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "score-template", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "分数显示模板,用“{value}”代表分数" }, - "device": [] + "defaultValue": "{value}", + "labelPosition": "left" }, { - "property": "start-placeholder", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "起始占位文本" + "zh_CN": "显示分数" } }, - "description": { - "zh_CN": "范围选择时开始日期的占位内容" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "show-score", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示当前分数,show-score 和 show-text 不能同时为真" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "end-placeholder", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "结束占位文本" + "zh_CN": "显示文字" } }, - "description": { - "zh_CN": "范围选择时结束日期的占位内容" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "show-text", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示辅助文字,若为真,则会从 texts 数组中选取当前分数对应的文字内容" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "type", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "文字在底部" } }, - "description": { - "zh_CN": "显示类型" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "date", - "type": "string", - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "year", - "value": "year" - }, - { - "label": "years", - "value": "years" - }, - { - "label": "month", - "value": "month" - }, - { - "label": "months", - "value": "months" - }, - { - "label": "date", - "value": "date" - }, - { - "label": "dates", - "value": "dates" - }, - { - "label": "datetime", - "value": "datetime" - }, - { - "label": "week", - "value": "week" - }, - { - "label": "datetimerange", - "value": "datetimerange" - }, - { - "label": "daterange", - "value": "daterange" - }, - { - "label": "monthrange", - "value": "monthrange" - }, - { - "label": "yearrange", - "value": "yearrange" - } - ] - } + "property": "text-on-bottom", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否在图标下显示对应的文字" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "popper-class", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "下拉框类名" + "zh_CN": "文字数组" } }, - "description": { - "zh_CN": "DatePicker 下拉框的类名" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "texts", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "辅助文字数组,文字的数量应该与max属性一致" }, - "device": [] + "defaultValue": "['很差', '差', '一般', '好', '很好']", + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" } } ], "events": { - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定值改变时触发" - }, - "description": { - "zh_CN": "双向绑定值改变时触发" - } - }, "onChange": { - "label": { - "zh_CN": "用户确认选定的值时触发" - }, - "description": { - "zh_CN": "用户确认选定的值时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "在组件 Input 失去焦点时触发" - }, - "description": { - "zh_CN": "在组件 Input 失去焦点时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "在组件 Input 获得焦点时触发" - }, - "description": { - "zh_CN": "在组件 Input 获得焦点时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onCalendarChange": { - "label": { - "zh_CN": "在日历所选日期更改时触发" - }, - "description": { - "zh_CN": "在日历所选日期更改时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onPanelChange": { - "label": { - "zh_CN": "当日期面板改变时触发。" - }, - "description": { - "zh_CN": "当日期面板改变时触发。" - }, "type": "event", - "defaultValue": "" - }, - "onVisibleChange": { "label": { - "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + "zh_CN": "分值改变时触发" }, "description": { - "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + "zh_CN": "分值改变时触发" }, - "type": "event", - "defaultValue": "" + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number", + "description": { + "zh_CN": "改变后的分值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } } }, - "slots": { - "default": { - "label": { - "zh_CN": "自定义单元格内容" - }, - "description": { - "zh_CN": "自定义单元格内容" - } - }, - "range-separator": { - "label": { - "zh_CN": "自定义范围分割符内容" - }, - "description": { - "zh_CN": "自定义范围分割符内容" - } - } - } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "按钮" - }, - "component": "ElButton", - "icon": "button", - "description": "常用的操作按钮", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElButton", - "destructuring": true + "slots": {} }, - "group": "基础组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -785,16 +598,35 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["type", "size"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "滑块" + }, + "component": "TinySlider", + "icon": "slider", + "description": "滑块", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinySlider", + "destructuring": true }, + "group": "component", + "category": "滑块组件", + "priority": 2, "schema": { "properties": [ { @@ -804,297 +636,465 @@ }, "content": [ { - "property": "size", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "绑定值" } }, - "description": { - "zh_CN": "尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "modelValue", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置单滑块的当前值,必需是整数或数组" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "type", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "最小值" } }, - "description": { - "zh_CN": "类型" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "min", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置最小值" + }, + "defaultValue": 0, + "labelPosition": "left" }, { - "property": "plain", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "朴素按钮" + "zh_CN": "最大值" } }, - "description": { - "zh_CN": "是否为朴素按钮" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "max", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置最大值,必需是整数,可以负数,必需大于所设置的最小值" }, - "device": [] + "defaultValue": 100, + "labelPosition": "left" }, { - "property": "text", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "文字按钮" + "zh_CN": "步长" } }, - "description": { - "zh_CN": "是否为文字按钮" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "step", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置滑块移动时,每步位移距离,必需是大于0的正整数" }, - "device": [] - }, + "defaultValue": 1, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ { - "property": "bg", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "背景颜色" + "zh_CN": "高度" } }, - "description": { - "zh_CN": "是否显示文字按钮背景颜色" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "height", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "Slider 组件的高度,当 vertical 为 true 时有效" }, - "device": [] - }, + "defaultValue": "300px", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "link", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "链接按钮" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否为链接按钮" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否禁用" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "round", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "圆角按钮" + "zh_CN": "显示输入框" } }, - "description": { - "zh_CN": "是否为圆角按钮" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "show-input", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示输入框" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "circle", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "圆形按钮" + "zh_CN": "显示提示" } }, - "description": { - "zh_CN": "是否为圆形按钮" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "show-tip", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示 tooltip" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "type": "string", + "type": "boolean", + "label": { + "text": { + "zh_CN": "单位" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": {}, + "component": "CheckBoxConfigurator" }, - "device": [] + "disabled": false, + "property": "unit", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "输入框后面显示的单位,仅在输入框模式下有效" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "loading", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "加载中状态" + "zh_CN": "竖向模式" } }, - "description": { - "zh_CN": "是否为加载中状态" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "vertical", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否竖向模式" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", - "type": "string", + "type": "function", + "label": { + "text": { + "zh_CN": "格式化提示" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" }, - "device": [] + "disabled": false, + "property": "format-tooltip", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "格式化 tooltip 提示" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "刻度" } }, - "description": { - "zh_CN": "是否禁用" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "marks", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置滑杆的刻度值" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "number", + "label": { + "text": { + "zh_CN": "总步数" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "device": [] + "disabled": false, + "property": "num-pages", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置总步数,即按快捷键 PageDown/PageUp 时,每次移动的距离是 \"⌈(max-min)/num-pages⌉\"" + }, + "defaultValue": 1, + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } ], - "events": {}, - "slots": { - "default": { + "events": { + "onStop": { + "type": "event", "label": { - "zh_CN": "default" + "zh_CN": "滑动结束时触发" }, "description": { - "zh_CN": "自定义默认内容" + "zh_CN": "设置滑块滑动结束时,触发该事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number | [number, number]", + "description": { + "zh_CN": "当前值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } }, - "loading": { + "onStart": { + "type": "event", "label": { - "zh_CN": "loading" + "zh_CN": "滑动开始时触发" }, "description": { - "zh_CN": "自定义加载中组件" + "zh_CN": "设置滑块滑动开始时,触发该事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Event", + "description": { + "zh_CN": "事件对象" + }, + "defaultValue": "" + }, + { + "name": "value", + "type": "number | [number, number]", + "description": { + "zh_CN": "当前值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } + }, + "onChange": { + "type": "event", + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "值改变时触发(使用鼠标拖曳时,只在松开鼠标后触发)" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number | [number, number]", + "description": { + "zh_CN": "当前值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "显示滑块值的插槽,仅仅 v-model 是单数值时才有效" } } } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单" - }, - "component": "ElForm", - "icon": "form", - "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElForm", - "destructuring": true }, - "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { - "childWhitelist": ["ElFormItem"], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -1103,16 +1103,35 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "级联选择器" }, + "component": "TinyCascader", + "icon": "cascader", + "description": "级联选择器", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyCascader", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, "schema": { "properties": [ { @@ -1122,429 +1141,612 @@ }, "content": [ { - "property": "model", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "数据对象" + "zh_CN": "绑定值" } }, - "description": { - "zh_CN": "表单数据对象" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", "widget": { - "component": "CodeConfigurator", "props": { + "height": 150, "language": "json" - } - } + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "modelValue", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "选中项绑定值, 其类型由 props.multiple、props.emitPath 共同决定" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "rules", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "验证规则" + "zh_CN": "选项数据" } }, - "description": { - "zh_CN": "表单验证规则" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", "widget": { - "component": "CodeConfigurator", "props": { + "height": 150, "language": "json" - } - } + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "options", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "可选项数据源,键名可通过 Props 属性配置" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "inline", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "行内模式" + "zh_CN": "占位文本" } }, - "description": { - "zh_CN": "行内表单模式" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "placeholder", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "输入框占位文本" + }, + "defaultValue": "请选择", + "labelPosition": "left" }, { - "property": "label-position", + "cols": 12, + "type": "enum", "label": { "text": { - "zh_CN": "标签位置" + "zh_CN": "尺寸" } }, - "description": { - "zh_CN": "表单域标签的位置, 当设置为 left 或 right 时,则也需要设置标签宽度属性" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "right", "widget": { - "component": "SelectConfigurator", "props": { "options": [ { - "label": "left", - "value": "left" + "label": "medium", + "value": "medium" }, { - "label": "right", - "value": "right" + "label": "small", + "value": "small" }, { - "label": "top", - "value": "top" + "label": "mini", + "value": "mini" } ] - } - } + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "尺寸" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "label-width", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "标签宽度" + "zh_CN": "分隔符" } }, - "description": { - "zh_CN": "标签的长度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 可以使用 auto。" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "separator", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "选项分隔符" }, - "device": [] + "defaultValue": "/", + "labelPosition": "left" }, { - "property": "label-suffix", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "标签后缀" + "zh_CN": "显示所有层级" } }, - "description": { - "zh_CN": "表单域标签的后缀" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "show-all-levels", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "输入框中是否显示选中值的完整路径" }, - "device": [] - }, + "defaultValue": true, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "hide-required-asterisk", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "隐藏必填星号" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否隐藏必填字段标签旁边的红色星号" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否禁用" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "require-asterisk-position", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "星号位置" + "zh_CN": "可清空" } }, - "description": { - "zh_CN": "星号的位置" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "left", - "widget": { - "component": "ButtonGroupConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "property": "clearable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否支持清空选项" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "show-message", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "显示校验信息" + "zh_CN": "折叠标签" } }, - "description": { - "zh_CN": "是否显示校验错误信息" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "collapse-tags", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "多选模式下是否折叠 Tag" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "inline-message", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "行内显示校验信息" + "zh_CN": "可筛选" } }, - "description": { - "zh_CN": "是否以行内形式展示校验信息" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "filterable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否可搜索选项" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "status-icon", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "显示校验结果图标" + "zh_CN": "去抖延迟" } }, - "description": { - "zh_CN": "是否在输入框中显示校验结果反馈图标" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "debounce", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "搜索关键词输入的去抖延迟,单位毫秒" + }, + "defaultValue": 300, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "object", + "label": { + "text": { + "zh_CN": "筛选前钩子" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "before-filter", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "筛选之前的钩子,参数为输入的值,若返回 false 或者返回 Promise 且被 reject,则停止筛选" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "validate-on-rule-change", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "触发验证" + "zh_CN": "筛选方法" } }, - "description": { - "zh_CN": "是否在 rules 属性改变后立即触发一次验证" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "filter-method", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "自定义搜索逻辑,第一个参数是节点 node,第二个参数是搜索关键词 keyword,通过返回布尔值表示是否命中" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", + "type": "object", + "label": { + "text": { + "zh_CN": "配置选项" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "props", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "配置选项,具体见 ICascaderPanelConfig 表" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "形状模式" } }, - "description": { - "zh_CN": "用于控制该表单内组件的尺寸" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "shape", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 shape='filter' 属性切换至过滤器模式" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", "type": "string", - "defaultValue": "default", + "label": { + "text": { + "zh_CN": "标签" + } + }, "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "label", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "shape='filter' 时生效,可传入 label 显示标题" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "提示信息" } }, - "description": { - "zh_CN": "是否禁用该表单内的所有组件。 如果设置为 true, 它将覆盖内部组件的 disabled 属性" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "tip", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "shape='filter' 时生效,可传入 tip 显示提示信息" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, "type": "boolean", + "label": { + "text": { + "zh_CN": "透明背景" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": {}, + "component": "CheckBoxConfigurator" }, - "device": [] + "disabled": false, + "property": "blank", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "shape='filter' 时生效,设置过滤器模式背景为透明" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "scroll-to-error", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "滚动到错误项" + "zh_CN": "弹出框插入 body" } }, - "description": { - "zh_CN": "当校验失败时,滚动到第一个错误表单项" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "popper-append-to-body", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "string", + "label": { + "text": { + "zh_CN": "弹出框类名" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "device": [] + "disabled": false, + "property": "popper-class", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "为 popper 添加类名(可参考 popover 组件)" + }, + "defaultValue": null, + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } ], "events": { - "onValidate": { + "onBlur": { + "type": "event", "label": { - "zh_CN": "任一表单项被校验后触发" + "zh_CN": "当失去焦点时触发" }, "description": { - "zh_CN": "任一表单项被校验后触发" + "zh_CN": "当失去焦点时触发" }, + "defaultValue": "" + }, + "onFocus": { "type": "event", - "functionInfo": { - "params": [], - "returns": {} + "label": { + "zh_CN": "当获得焦点时触发" + }, + "description": { + "zh_CN": "当获得焦点时触发" }, "defaultValue": "" - } - }, - "slots": {} - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单子项" - }, - "component": "ElFormItem", - "icon": "formItem", - "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElFormItem", - "destructuring": true + }, + "onChange": { + "type": "event", + "label": { + "zh_CN": "当选中节点变化时触发" + }, + "description": { + "zh_CN": "当选中节点变化时触发" + }, + "defaultValue": "" + }, + "onRemoveTag": { + "type": "event", + "label": { + "zh_CN": "在多选模式下,移除Tag时触发" + }, + "description": { + "zh_CN": "在多选模式下,移除Tag时触发" + }, + "defaultValue": "" + }, + "onExpandChange": { + "type": "event", + "label": { + "zh_CN": "当展开节点发生变化时触发" + }, + "description": { + "zh_CN": "当展开节点发生变化时触发" + }, + "defaultValue": "" + }, + "onVisibleChange": { + "type": "event", + "label": { + "zh_CN": "下拉框出现/隐藏时触发" + }, + "description": { + "zh_CN": "下拉框出现/隐藏时触发" + }, + "defaultValue": "" + } + }, + "slots": { + "empty": { + "label": { + "zh_CN": "空状态" + }, + "description": { + "zh_CN": "无匹配选项时的内容" + } + }, + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "自定义备选项的节点内容,参数为 { node: ICascaderPanelNode, data: ICascaderPanelData },分别为当前节点的 Node 对象和数据" + } + }, + "no-data": { + "label": { + "zh_CN": "无数据" + }, + "description": { + "zh_CN": "通过 no-data 插槽设置没有数据时显示的内容" + } + } + } }, - "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -1555,16 +1757,35 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "单选组" + }, + "component": "TinyRadioGroup", + "icon": "radiogroup", + "description": "单选组", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyRadioGroup", + "destructuring": true }, + "group": "component", + "category": "组件", + "priority": 2, "schema": { "properties": [ { @@ -1574,325 +1795,324 @@ }, "content": [ { - "property": "prop", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "键名" + "zh_CN": "绑定值" } }, - "description": { - "zh_CN": "model 的键名。 它可以是一个属性的值(如 a.b.0 或 [a', 'b', '0'])。 在定义了 validate、resetFields 的方法时,该属性是必填的" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "modelValue", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "单选组绑定值" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "label", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "标签文本" + "zh_CN": "尺寸" } }, - "description": { - "zh_CN": "标签文本" + "widget": { + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + }, + "component": "SelectConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "单选组尺寸" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "label-width", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "标签宽度" + "zh_CN": "类型" } }, - "description": { - "zh_CN": "标签宽度,例如 '50px'。 可以使用 auto" + "widget": { + "props": { + "options": [ + { + "label": "radio", + "value": "radio" + }, + { + "label": "button", + "value": "button" + } + ] + }, + "component": "SelectConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "配置式单选组的展示形式" + }, + "defaultValue": "radio", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "required", "label": { "text": { - "zh_CN": "必填项" + "zh_CN": "填充颜色" } }, - "description": { - "zh_CN": "是否为必填项,如不设置,则会根据校验规则确认" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "fill", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "按钮形式单选选中时的背景颜色" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "rules", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "验证规则" + "zh_CN": "文本颜色" } }, - "description": { - "zh_CN": "表单验证规则, 更多内容可以参考async-validator" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "top", - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - }, + "property": "text-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "按钮形式单选激活时的文本颜色" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "error", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "错误信息" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "表单域验证错误时的提示信息。设置该值会导致表单验证状态变为 error,并显示该错误信息" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "show-message", - "label": { - "text": { - "zh_CN": "显示错误信息" - } - }, + "property": "disabled", + "readOnly": false, + "required": false, "description": { - "zh_CN": "是否显示校验错误信息" + "zh_CN": "是否禁用单选组" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "defaultValue": false, + "labelPosition": "left" }, { - "property": "inline-message", - "label": { - "text": { - "zh_CN": "行内显示错误信息" - } - }, - "description": { - "zh_CN": "是否在行内显示校验信息" - }, - "required": true, - "readOnly": false, - "disabled": false, "cols": 12, - "labelPosition": "left", "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "size", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "只读" } }, - "description": { - "zh_CN": "用于控制该表单内组件的尺寸" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "property": "display-only", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否只读状态" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "for", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "for" + "zh_CN": "垂直显示" } }, - "description": { - "zh_CN": "和原生标签相同能力" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, + "property": "vertical", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "垂直显示单选组" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ { - "property": "validate-status", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "校验状态" + "zh_CN": "选项配置" } }, - "description": { - "zh_CN": "formItem 校验的状态" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "error", - "value": "error" - }, - { - "label": "validating", - "value": "validating" - }, - { - "label": "success", - "value": "success" - } - ] - } - } + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "options", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "配置式单选组设置列表" + }, + "defaultValue": null, + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } ], - "events": {}, - "slots": { - "label": { + "events": { + "onChange": { + "type": "event", "label": { - "zh_CN": "label" + "zh_CN": "绑定值变化时触发" }, "description": { - "zh_CN": "标签位置显示的内容" + "zh_CN": "绑定值变化时触发的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number[] | string[]", + "description": { + "zh_CN": "变化后的值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } } - }, - "error": { + } + }, + "slots": { + "default": { "label": { - "zh_CN": "error" + "zh_CN": "默认内容" }, "description": { - "zh_CN": "验证错误信息的显示内容" + "zh_CN": "radio-group 的默认插槽" } } } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单" - }, - "component": "ElTable", - "icon": "table", - "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElTable", - "destructuring": true }, - "group": "数据展示", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { - "childWhitelist": ["ElTableColumn"], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -1901,16 +2121,35 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "步骤条" + }, + "component": "TinySteps", + "icon": "steps", + "description": "步骤条", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinySteps", + "destructuring": true }, + "group": "component", + "category": "步骤条", + "priority": 2, "schema": { "properties": [ { @@ -1920,147 +2159,5147 @@ }, "content": [ { - "property": "data", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "数据" + "zh_CN": "当前步骤" } }, - "description": { - "zh_CN": "显示的数据" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "active", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "当前步骤索引,从0开始计数" + }, + "defaultValue": -1, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "top", - "widget": { - "component": "CodeConfigurator", + "type": "array", + "label": { + "text": { + "zh_CN": "数据" + } + }, + "widget": { "props": { + "height": 150, "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "data", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "步骤条的数据" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "名称字段" } - } + }, + "widget": { + "props": { + "placeholder": "请输入字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "name-field", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点名称对应的字段名" + }, + "defaultValue": "", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括当前步骤、数据等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "内容居中" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "content-center", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "使步骤条内容默认居中显示" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "columns", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "表格列配置" + "zh_CN": "点状样式" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "dot", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "点状形步骤条,当值只支持垂直样式" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "自适应宽度" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "flex", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点是否自适应宽度" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "横向单链" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "line", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 line 设置横向单链型步骤条" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "间距" } }, + "widget": { + "props": { + "placeholder": "请输入宽度值" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "space", + "readOnly": false, "required": true, + "description": { + "zh_CN": "节点宽度, 可取值数字、带长度单位数值与百分比,传数字则默认以 px 为长度单位" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "高级模式" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "advanced", "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否开启高级向导模式" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "持续时间" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, "disabled": false, + "property": "duration", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点滚动的持续时间(单位 ms),仅高级向导模式有效" + }, + "defaultValue": 300, + "labelPosition": "left" + }, + { "cols": 12, - "properties": [ - { - "label": { - "zh_CN": "默认分组" - }, - "content": [ - { - "property": "type", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "type" - } - }, - "description": { - "text": { - "zh_CN": "对应列的类型。 如果设置了selection则显示多选框; 如果设置了 index 则显示该行的索引(从 1 开始计算); 如果设置了 expand 则显示为一个可展开的按钮" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "selection", - "value": "selection" - }, - { - "label": "index", - "value": "index" - }, - { - "label": "expand", - "value": "expand" - } - ] - } - } - }, - { - "property": "index", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "index" - } - }, - "description": { - "text": { - "zh_CN": "如果设置了 type=index,可以通过传递 index 属性来自定义索引" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } - }, - { - "property": "label", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "label" - } - }, - "description": { - "text": { - "zh_CN": "显示的标题" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "column-key", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "column-key" - } + "type": "number", + "label": { + "text": { + "zh_CN": "可见节点数" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "visible-num", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "控制信息可见的节点数,默认可见5个" + }, + "defaultValue": 5, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "计数字段" + } + }, + "widget": { + "props": { + "placeholder": "请输入字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "count-field", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "条形步骤条里徽标计数对应的字段名" + }, + "defaultValue": "", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "状态字段" + } + }, + "widget": { + "props": { + "placeholder": "请输入字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "status-field", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "数据状态对应的字段名,用于条形步骤条" + }, + "defaultValue": "", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": { + "onClick": { + "type": "event", + "label": { + "zh_CN": "节点点击事件" + }, + "description": { + "zh_CN": "节点点击事件,参数:index: 点击节点的索引node:点击节点的数据" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "index", + "type": "number", + "description": { + "zh_CN": "点击节点的索引" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "IStepsItem", + "description": { + "zh_CN": "点击节点的数据" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } + } + }, + "slots": { + "item": { + "label": { + "zh_CN": "数据项" + }, + "description": { + "zh_CN": "步骤条数据项插槽,用于条形步骤条" + } + }, + "itemFooter": { + "label": { + "zh_CN": "itemFooter" + }, + "description": { + "zh_CN": "步骤条数据项底部插槽,用于条形步骤条" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "树形菜单" + }, + "component": "TinyTreeMenu", + "icon": "tree", + "description": "树形菜单", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyTreeMenu", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "数据源" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "data", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "静态数据源" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "节点键" + } + }, + "widget": { + "props": { + "placeholder": "请输入节点键字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "node-key", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置每个树节点唯一标识(key)的属性,在整棵树中都是唯一的" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "object", + "label": { + "text": { + "zh_CN": "映射字段" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "props", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "映射字段" + }, + "defaultValue": { + "label": "label", + "isLeaf": "isLeaf", + "children": "children", + "disabled": "disabled" + }, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "默认勾选键" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "default-checked-keys", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "默认勾选节点的 key 的数组" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "默认展开所有" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "default-expand-all", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否默认展开所有子节点" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "默认展开键" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "default-expanded-keys", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "默认展开节点的 key 的数组" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "默认展开高亮键" + } + }, + "widget": { + "props": { + "placeholder": "请输入高亮节点键" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "default-expanded-keys-highlight", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置默认展开节点中的某个节点高亮,配合 default-expanded-keys 属性使用" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 data、node-key、props 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "缩进距离" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "indent", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "子级相对于父级节点的水平缩进距离,单位 px" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "节点高度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "node-height", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "节点高度" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "文字省略" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "ellipsis", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否文字超长省略显示。优先级高于 wrap" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "换行显示" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "wrap", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否换行显示" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "component", + "label": { + "text": { + "zh_CN": "自定义图标" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "customIcon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置带图标树形菜单" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "component", + "label": { + "text": { + "zh_CN": "搜索图标" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "search-icon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义搜索图标" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "component", + "label": { + "text": { + "zh_CN": "后缀图标" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "suffix-icon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "全局设置带图标树形菜单" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示数字" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "show-number", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "右侧下拉图标区域是否显示为 number 属性定义的数字内容,建议不超过 4 个字符" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "width-adapt" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "width-adapt", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 widthAdapt 属性,是否让组件宽度自适应父容器。" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 indent、node-height、ellipsis 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "手风琴效果" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "accordion", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否设置为手风琴效果(只能展开一个同级别的节点)" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "严格勾选" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "check-strictly", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否遵循父级和子级严格不相关联的做法,配合 show-checkbox 属性使用" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "可清空" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "clearable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "搜索框是否可清空" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "可收起" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "collapsible", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否允许展开后的菜单收起,未和 show-number 配套使用时,仍可以点击图标收起" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "可拖动" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "draggable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否可拖动菜单节点" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "点击节点展开" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "expand-on-click-node", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否能点击节点即展开/收起。配置为 fasle 则只能点击下拉图标展开/收起" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "highlight-query" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "highlight-query", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 highlightQuery 属性,是否在匹配的节点中,高亮搜索文字。" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "懒加载" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "lazy", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否懒加载子节点,配合 load 属性使用" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "侧边折叠按钮" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "menu-collapsible", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示侧边折叠与展开按钮" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "仅子级可选" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "only-check-children", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "父级是否不可选,只能展开不能跳转" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示复选框" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-checkbox", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点是否可被选择" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示展开收起" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "show-expand", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否启用一键展开/收起功能。点击左下角图标可展开/收起菜单注意:配合 customIcon 属性使用,纯文本菜单不支持此功能" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示搜索框" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-filter", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示搜索框,可搜索过滤节点" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示标题提示" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-title", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示节点的 title 提示,鼠标悬浮节点之上触发" + }, + "defaultValue": true, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 accordion、draggable、show-checkbox 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "允许拖拽回调" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "allow-drag", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "拖拽开始前的回调事件,定义节点是否允许拖拽的规则,返回 true 则允许拖拽,配合 draggable 属性使用" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "允许放置回调" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "allow-drop", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "拖拽结束前的回调事件,定义节点是否允许放置到模板节点的规则,返回 true 则允许放置,配合 draggable 属性使用" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "节点过滤方法" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "filter-node-method", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义树节点过滤的方法,返回 true 表示这个节点可以显示,返回 false 则表示这个节点会被隐藏" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "获取数据方法" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "get-menu-data-sync", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义获取服务端数据源的方法,返回一个 Promise 对象" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "加载子树方法" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "load", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "加载子树数据的方法,仅当 lazy 属性为 true 时生效" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + }, + { + "name": "4", + "label": { + "zh_CN": "其他属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "空文本" + } + }, + "widget": { + "props": { + "placeholder": "请输入空文本" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "empty-text", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "内容为空时展示的文本" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "占位符" + } + }, + "widget": { + "props": { + "placeholder": "请输入占位符" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "placeholder", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "当数据为空时的占位符" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "无法归属到 “基础/样式/行为/高级属性” 的特殊配置项,这类属性通常不具备前四类分组的明确功能共性" + } + } + ], + "events": { + "onNodeClick": { + "type": "event", + "label": { + "zh_CN": "节点点击" + }, + "description": { + "zh_CN": "监听节点被点击时的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeExpand": { + "type": "event", + "label": { + "zh_CN": "节点展开" + }, + "description": { + "zh_CN": "监听节点被点击展开时的事件;" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onCheckChange": { + "type": "event", + "label": { + "zh_CN": "勾选状态变化" + }, + "description": { + "zh_CN": "监听可勾选节点的勾选状态发生变化时的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + }, + { + "name": "checked", + "type": "boolean", + "description": { + "zh_CN": "是否勾选" + }, + "defaultValue": "" + }, + { + "name": "indeterminate", + "type": "boolean", + "description": { + "zh_CN": "是否半选" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeDragEnd": { + "type": "event", + "label": { + "zh_CN": "节点拖拽结束" + }, + "description": { + "zh_CN": "监听节点拖拽结束(可能未成功)的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "draggingNode", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "拖拽节点" + }, + "defaultValue": "" + }, + { + "name": "targetNode", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "目标节点" + }, + "defaultValue": "" + }, + { + "name": "dropType", + "type": "IDropType", + "description": { + "zh_CN": "放置类型" + }, + "defaultValue": "" + }, + { + "name": "event", + "type": "DragEvent", + "description": { + "zh_CN": "拖拽事件" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeCollapse": { + "type": "event", + "label": { + "zh_CN": "节点收起" + }, + "description": { + "zh_CN": "监听节点被点击收起时的事件;" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onCurrentChange": { + "type": "event", + "label": { + "zh_CN": "当前节点变化" + }, + "description": { + "zh_CN": "监听当前选中节点发生变化时的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeDragStart": { + "type": "event", + "label": { + "zh_CN": "节点拖拽开始" + }, + "description": { + "zh_CN": "监听节点开始拖拽的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + }, + { + "name": "event", + "type": "DragEvent", + "description": { + "zh_CN": "拖拽事件" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "自定义树节点的内容,参数为 { node, data }" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "折线图" + }, + "component": "TinyHuichartsLine", + "icon": "line", + "description": "折线图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsLine", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "折线图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "柱状图" + }, + "component": "TinyHuichartsHistogram", + "icon": "histogram", + "description": "柱状图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsHistogram", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "柱状图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "条形图" + }, + "component": "TinyHuichartsBar", + "icon": "bar", + "description": "条形图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsBar", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "条形图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onReady": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,每次渲染都会触发一次" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + }, + "onReadyOnce": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,只会在首次渲染完成后触发" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "圆盘图" + }, + "component": "TinyHuichartsPie", + "icon": "pie", + "description": "圆盘图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsPie", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "圆盘图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "环形图" + }, + "component": "TinyHuichartsRing", + "icon": "ring", + "description": "环形图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsRing", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "环形图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onReady": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,每次渲染都会触发一次" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + }, + "onReadyOnce": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,只会在首次渲染完成后触发" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "组件默认插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "雷达图" + }, + "component": "TinyHuichartsRadar", + "icon": "radar", + "description": "雷达图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsRadar", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "雷达图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onReady": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,每次渲染都会触发一次" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + }, + "onReadyOnce": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,只会在首次渲染完成后触发" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "组件默认插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "漏斗图" + }, + "component": "TinyHuichartsFunnel", + "icon": "funnel", + "description": "漏斗图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsFunnel", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "漏斗图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "散点图" + }, + "component": "TinyHuichartsScatter", + "icon": "scatter", + "description": "散点图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsScatter", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "散点图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "瀑布图" + }, + "component": "TinyHuichartsWaterfall", + "icon": "waterfall", + "description": "瀑布图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsWaterfall", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "瀑布图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "输入框" + }, + "component": "ElInput", + "icon": "input", + "description": "通过鼠标或键盘输入字符", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElInput", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "type", + "size" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "description": { + "zh_CN": "绑定值" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "类型" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "maxlength", + "label": { + "text": { + "zh_CN": "最大长度" + } + }, + "description": { + "zh_CN": "最大输入长度" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "number", + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "是否禁用" + } + }, + "description": { + "zh_CN": "是否禁用" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定值改变时触发" + }, + "description": { + "zh_CN": "双向绑定值改变时触发" + } + }, + "onBlur": { + "label": { + "zh_CN": "输入框失去焦点时触发" + }, + "description": { + "zh_CN": "输入框失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + }, + "slots": { + "prefix": { + "label": { + "zh_CN": "头部内容" + }, + "description": { + "zh_CN": "输入框头部内容,只对非 type='textarea' 有效" + } + }, + "suffix": { + "label": { + "zh_CN": "尾部内容" + }, + "description": { + "zh_CN": "输入框尾部内容,只对非 type='textarea' 有效" + } + }, + "prepend": { + "label": { + "zh_CN": "前置内容" + }, + "description": { + "zh_CN": "输入框前置内容,只对非 type='textarea' 有效" + } + }, + "append": { + "label": { + "zh_CN": "后置内容" + }, + "description": { + "zh_CN": "输入框后置内容,只对非 type='textarea' 有效" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "日期选择器" + }, + "component": "ElDatePicker", + "icon": "datepick", + "description": "日期选择器", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElDatePicker", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "type", + "size" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "description": { + "zh_CN": "绑定值" + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "readonly", + "label": { + "text": { + "zh_CN": "只读" + } + }, + "description": { + "zh_CN": "是否只读" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": false, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "description": { + "zh_CN": "是否禁用" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": false, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "输入框尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "", + "widget": { + "component": "SelectConfigurator", + "props": { + "allowClear": true, + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "editable", + "label": { + "text": { + "zh_CN": "是否可编辑" + } + }, + "description": { + "zh_CN": "文本框是否可编辑" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": true, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "clearable", + "label": { + "text": { + "zh_CN": "是否可清除" + } + }, + "description": { + "zh_CN": "是否显示清楚按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": true, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "description": { + "zh_CN": "非范围选择时的占位内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "start-placeholder", + "label": { + "text": { + "zh_CN": "起始占位文本" + } + }, + "description": { + "zh_CN": "范围选择时开始日期的占位内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "end-placeholder", + "label": { + "text": { + "zh_CN": "结束占位文本" + } + }, + "description": { + "zh_CN": "范围选择时结束日期的占位内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "显示类型" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "date", + "type": "string", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "year", + "value": "year" + }, + { + "label": "years", + "value": "years" + }, + { + "label": "month", + "value": "month" + }, + { + "label": "months", + "value": "months" + }, + { + "label": "date", + "value": "date" + }, + { + "label": "dates", + "value": "dates" + }, + { + "label": "datetime", + "value": "datetime" + }, + { + "label": "week", + "value": "week" + }, + { + "label": "datetimerange", + "value": "datetimerange" + }, + { + "label": "daterange", + "value": "daterange" + }, + { + "label": "monthrange", + "value": "monthrange" + }, + { + "label": "yearrange", + "value": "yearrange" + } + ] + } + }, + "device": [] + }, + { + "property": "popper-class", + "label": { + "text": { + "zh_CN": "下拉框类名" + } + }, + "description": { + "zh_CN": "DatePicker 下拉框的类名" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定值改变时触发" + }, + "description": { + "zh_CN": "双向绑定值改变时触发" + } + }, + "onChange": { + "label": { + "zh_CN": "用户确认选定的值时触发" + }, + "description": { + "zh_CN": "用户确认选定的值时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "在组件 Input 失去焦点时触发" + }, + "description": { + "zh_CN": "在组件 Input 失去焦点时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "在组件 Input 获得焦点时触发" + }, + "description": { + "zh_CN": "在组件 Input 获得焦点时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onCalendarChange": { + "label": { + "zh_CN": "在日历所选日期更改时触发" + }, + "description": { + "zh_CN": "在日历所选日期更改时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onPanelChange": { + "label": { + "zh_CN": "当日期面板改变时触发。" + }, + "description": { + "zh_CN": "当日期面板改变时触发。" + }, + "type": "event", + "defaultValue": "" + }, + "onVisibleChange": { + "label": { + "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + }, + "description": { + "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + }, + "type": "event", + "defaultValue": "" + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "自定义单元格内容" + }, + "description": { + "zh_CN": "自定义单元格内容" + } + }, + "range-separator": { + "label": { + "zh_CN": "自定义范围分割符内容" + }, + "description": { + "zh_CN": "自定义范围分割符内容" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "按钮" + }, + "component": "ElButton", + "icon": "button", + "description": "常用的操作按钮", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElButton", + "destructuring": true + }, + "group": "基础组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "type", + "size" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "类型" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "plain", + "label": { + "text": { + "zh_CN": "朴素按钮" + } + }, + "description": { + "zh_CN": "是否为朴素按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "text", + "label": { + "text": { + "zh_CN": "文字按钮" + } + }, + "description": { + "zh_CN": "是否为文字按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "bg", + "label": { + "text": { + "zh_CN": "背景颜色" + } + }, + "description": { + "zh_CN": "是否显示文字按钮背景颜色" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "link", + "label": { + "text": { + "zh_CN": "链接按钮" + } + }, + "description": { + "zh_CN": "是否为链接按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "round", + "label": { + "text": { + "zh_CN": "圆角按钮" + } + }, + "description": { + "zh_CN": "是否为圆角按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "circle", + "label": { + "text": { + "zh_CN": "圆形按钮" + } + }, + "description": { + "zh_CN": "是否为圆形按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "loading", + "label": { + "text": { + "zh_CN": "加载中状态" + } + }, + "description": { + "zh_CN": "是否为加载中状态" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "description": { + "zh_CN": "是否禁用" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": { + "default": { + "label": { + "zh_CN": "default" + }, + "description": { + "zh_CN": "自定义默认内容" + } + }, + "loading": { + "label": { + "zh_CN": "loading" + }, + "description": { + "zh_CN": "自定义加载中组件" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElForm", + "icon": "form", + "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElForm", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": [ + "ElFormItem" + ], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "inline", + "label-width" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "model", + "label": { + "text": { + "zh_CN": "数据对象" + } + }, + "description": { + "zh_CN": "表单数据对象" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "rules", + "label": { + "text": { + "zh_CN": "验证规则" + } + }, + "description": { + "zh_CN": "表单验证规则" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "inline", + "label": { + "text": { + "zh_CN": "行内模式" + } + }, + "description": { + "zh_CN": "行内表单模式" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "label-position", + "label": { + "text": { + "zh_CN": "标签位置" + } + }, + "description": { + "zh_CN": "表单域标签的位置, 当设置为 left 或 right 时,则也需要设置标签宽度属性" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "right", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + }, + { + "label": "top", + "value": "top" + } + ] + } + } + }, + { + "property": "label-width", + "label": { + "text": { + "zh_CN": "标签宽度" + } + }, + "description": { + "zh_CN": "标签的长度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 可以使用 auto。" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "label-suffix", + "label": { + "text": { + "zh_CN": "标签后缀" + } + }, + "description": { + "zh_CN": "表单域标签的后缀" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "hide-required-asterisk", + "label": { + "text": { + "zh_CN": "隐藏必填星号" + } + }, + "description": { + "zh_CN": "是否隐藏必填字段标签旁边的红色星号" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "require-asterisk-position", + "label": { + "text": { + "zh_CN": "星号位置" + } + }, + "description": { + "zh_CN": "星号的位置" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "left", + "widget": { + "component": "ButtonGroupConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "show-message", + "label": { + "text": { + "zh_CN": "显示校验信息" + } + }, + "description": { + "zh_CN": "是否显示校验错误信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "inline-message", + "label": { + "text": { + "zh_CN": "行内显示校验信息" + } + }, + "description": { + "zh_CN": "是否以行内形式展示校验信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "status-icon", + "label": { + "text": { + "zh_CN": "显示校验结果图标" + } + }, + "description": { + "zh_CN": "是否在输入框中显示校验结果反馈图标" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "validate-on-rule-change", + "label": { + "text": { + "zh_CN": "触发验证" + } + }, + "description": { + "zh_CN": "是否在 rules 属性改变后立即触发一次验证" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "用于控制该表单内组件的尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "description": { + "zh_CN": "是否禁用该表单内的所有组件。 如果设置为 true, 它将覆盖内部组件的 disabled 属性" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "scroll-to-error", + "label": { + "text": { + "zh_CN": "滚动到错误项" + } + }, + "description": { + "zh_CN": "当校验失败时,滚动到第一个错误表单项" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onValidate": { + "label": { + "zh_CN": "任一表单项被校验后触发" + }, + "description": { + "zh_CN": "任一表单项被校验后触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + }, + "slots": {} + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单子项" + }, + "component": "ElFormItem", + "icon": "formItem", + "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElFormItem", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "inline", + "label-width" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "prop", + "label": { + "text": { + "zh_CN": "键名" + } + }, + "description": { + "zh_CN": "model 的键名。 它可以是一个属性的值(如 a.b.0 或 [a', 'b', '0'])。 在定义了 validate、resetFields 的方法时,该属性是必填的" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "label", + "label": { + "text": { + "zh_CN": "标签文本" + } + }, + "description": { + "zh_CN": "标签文本" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "label-width", + "label": { + "text": { + "zh_CN": "标签宽度" + } + }, + "description": { + "zh_CN": "标签宽度,例如 '50px'。 可以使用 auto" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "required", + "label": { + "text": { + "zh_CN": "必填项" + } + }, + "description": { + "zh_CN": "是否为必填项,如不设置,则会根据校验规则确认" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "rules", + "label": { + "text": { + "zh_CN": "验证规则" + } + }, + "description": { + "zh_CN": "表单验证规则, 更多内容可以参考async-validator" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "error", + "label": { + "text": { + "zh_CN": "错误信息" + } + }, + "description": { + "zh_CN": "表单域验证错误时的提示信息。设置该值会导致表单验证状态变为 error,并显示该错误信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "show-message", + "label": { + "text": { + "zh_CN": "显示错误信息" + } + }, + "description": { + "zh_CN": "是否显示校验错误信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "inline-message", + "label": { + "text": { + "zh_CN": "行内显示错误信息" + } + }, + "description": { + "zh_CN": "是否在行内显示校验信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "用于控制该表单内组件的尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "for", + "label": { + "text": { + "zh_CN": "for" + } + }, + "description": { + "zh_CN": "和原生标签相同能力" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "validate-status", + "label": { + "text": { + "zh_CN": "校验状态" + } + }, + "description": { + "zh_CN": "formItem 校验的状态" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "error", + "value": "error" + }, + { + "label": "validating", + "value": "validating" + }, + { + "label": "success", + "value": "success" + } + ] + } + } + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": { + "label": { + "label": { + "zh_CN": "label" + }, + "description": { + "zh_CN": "标签位置显示的内容" + } + }, + "error": { + "label": { + "zh_CN": "error" + }, + "description": { + "zh_CN": "验证错误信息的显示内容" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElTable", + "icon": "table", + "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElTable", + "destructuring": true + }, + "group": "数据展示", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": [ + "ElTableColumn" + ], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "inline", + "label-width" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "data", + "label": { + "text": { + "zh_CN": "数据" + } + }, + "description": { + "zh_CN": "显示的数据" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "columns", + "label": { + "text": { + "zh_CN": "表格列配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "properties": [ + { + "label": { + "zh_CN": "默认分组" + }, + "content": [ + { + "property": "type", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "type" + } + }, + "description": { + "text": { + "zh_CN": "对应列的类型。 如果设置了selection则显示多选框; 如果设置了 index 则显示该行的索引(从 1 开始计算); 如果设置了 expand 则显示为一个可展开的按钮" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "selection", + "value": "selection" + }, + { + "label": "index", + "value": "index" + }, + { + "label": "expand", + "value": "expand" + } + ] + } + } + }, + { + "property": "index", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "index" + } + }, + "description": { + "text": { + "zh_CN": "如果设置了 type=index,可以通过传递 index 属性来自定义索引" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "label", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "label" + } + }, + "description": { + "text": { + "zh_CN": "显示的标题" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "column-key", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "column-key" + } + }, + "description": { + "text": { + "zh_CN": "column 的 key, column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "prop", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "prop" + } + }, + "description": { + "text": { + "zh_CN": "字段名称 对应列内容的字段名, 也可以使用 property属性" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "width", + "type": "number", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "width" + } + }, + "description": { + "text": { + "zh_CN": "对应列的宽度" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "min-width", + "type": "number", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "min-width" + } + }, + "description": { + "text": { + "zh_CN": "对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "fixed", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "fixed" + } + }, + "description": { + "text": { + "zh_CN": "列是否固定在左侧或者右侧。 true 表示固定在左侧" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "sortable", + "type": "boolean", + "labelPosition": "left", + "label": { + "text": { + "zh_CN": "sortable" + } + }, + "description": { + "text": { + "zh_CN": "对应列是否可以排序" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "sort-method", + "type": "function", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-method" + } + }, + "description": { + "text": { + "zh_CN": "指定数据按照哪个属性进行排序,仅当sortable设置为true的时候有效。 应该如同 Array.sort 那样返回一个 Number" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "sort-by", + "type": "array", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-by" + } + }, + "description": { + "text": { + "zh_CN": "指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "sort-orders", + "type": "array", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-orders" + } + }, + "description": { + "text": { + "zh_CN": "数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "resizable", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "resizable" + } + }, + "description": { + "text": { + "zh_CN": "对应列是否可以通过拖动改变宽度(需要在 el-table 上设置 border 属性为真)" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "formatter", + "type": "function", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "formatter" + } + }, + "description": { + "text": { + "zh_CN": "用来格式化内容" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + } + }, + { + "property": "show-overflow-tooltip", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "show-overflow-tooltip" + } + }, + "description": { + "text": { + "zh_CN": "当内容过长被隐藏时显示 tooltip" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "align", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "align" + } + }, + "description": { + "text": { + "zh_CN": "对齐方式" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "center", + "value": "center" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "header-align", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "header-align" + } + }, + "description": { + "text": { + "zh_CN": "表头对齐方式, 若不设置该项,则使用表格的对齐方式" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "center", + "value": "center" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "class-name", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "class-name" + } + }, + "description": { + "text": { + "zh_CN": "列的 className" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "label-class-name", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "label-class-name" + } + }, + "description": { + "text": { + "zh_CN": "当前列标题的自定义类名" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "selectable", + "type": "function", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "selectable" + } + }, + "description": { + "text": { + "zh_CN": "仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "reserve-selection", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "reserve-selection" + } + }, + "description": { + "text": { + "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "filters", + "type": "array", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filters" + } }, "description": { "text": { - "zh_CN": "column 的 key, column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件" + "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" } }, "widget": { - "component": "InputConfigurator", - "props": {} + "component": "CodeConfigurator", + "props": { + "language": "json" + } } }, { - "property": "prop", + "property": "filter-placement", "type": "string", "labelPosition": "top", "label": { "text": { - "zh_CN": "prop" + "zh_CN": "filter-placement" } }, "description": { "text": { - "zh_CN": "字段名称 对应列内容的字段名, 也可以使用 property属性" + "zh_CN": "过滤弹出框的定位" } }, "widget": { @@ -2069,1062 +7308,2851 @@ } }, { - "property": "width", - "type": "number", + "property": "filter-multiple", + "type": "string", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filter-multiple" + } + }, + "description": { + "text": { + "zh_CN": "数据过滤的选项是否多选" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "filter-method", + "type": "function", "labelPosition": "top", + "defaultValue": true, "label": { "text": { - "zh_CN": "width" + "zh_CN": "filter-method" } }, "description": { "text": { - "zh_CN": "对应列的宽度" + "zh_CN": "数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示" } }, "widget": { - "component": "NumberConfigurator", + "component": "CodeConfigurator", "props": {} } }, { - "property": "min-width", - "type": "number", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "min-width" - } - }, - "description": { - "text": { - "zh_CN": "对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列" - } - }, - "widget": { - "component": "NumberConfigurator", - "props": {} - } + "property": "filtered-value", + "type": "array", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "filtered-value" + } + }, + "description": { + "text": { + "zh_CN": "选中的数据过滤项,如果需要自定义表头过滤的渲染方式,可能会需要此属性" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + } + ] + } + ], + "widget": { + "component": "TableColumnsConfigurator", + "props": { + "type": "object", + "textField": "label", + "language": "json", + "buttonText": "编辑列配置", + "title": "编辑列配置", + "expand": true + } + }, + "description": { + "zh_CN": "表格列的配置信息" + }, + "labelPosition": "top" + }, + { + "property": "max-height", + "label": { + "text": { + "zh_CN": "最大高度" + } + }, + "description": { + "zh_CN": "Table 的最大高度。" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "number", + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "height", + "label": { + "text": { + "zh_CN": "表格高度" + } + }, + "description": { + "zh_CN": "Table 的高度, 默认为自动高度。 这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "stripe", + "label": { + "text": { + "zh_CN": "斑马纹" + } + }, + "description": { + "zh_CN": "是否为斑马纹 table" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "border", + "label": { + "text": { + "zh_CN": "纵向边框" + } + }, + "description": { + "zh_CN": "是否带有纵向边框" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "表格尺寸" + } + }, + "description": { + "zh_CN": "Table 的尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "fit", + "label": { + "text": { + "zh_CN": "列宽自撑开" + } + }, + "description": { + "zh_CN": "列的宽度是否自撑开" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "show-header", + "label": { + "text": { + "zh_CN": "显示表头" + } + }, + "description": { + "zh_CN": "是否显示表头" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "highlight-current-row", + "label": { + "text": { + "zh_CN": "高亮当前行" + } + }, + "description": { + "zh_CN": "是否要高亮当前行" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "current-row-key", + "label": { + "text": { + "zh_CN": "当前行的 key" + } + }, + "description": { + "zh_CN": "当前行的 key,只写属性" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "row-class-name", + "label": { + "text": { + "zh_CN": "行的类名" + } + }, + "description": { + "zh_CN": "行的 className" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "row-key", + "label": { + "text": { + "zh_CN": "行数据的 Key" + } + }, + "description": { + "zh_CN": "行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "empty-text", + "label": { + "text": { + "zh_CN": "空数据文本" + } + }, + "description": { + "zh_CN": "空数据时显示的文本内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "table-layout", + "label": { + "text": { + "zh_CN": "表格布局方式" + } + }, + "description": { + "zh_CN": "设置表格单元、行和列的布局方式" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "defaultValue": "fixed", + "widget": { + "component": "InputConfigurator", + "props": { + "options": [ + { + "label": "fixed", + "value": "fixed" }, { - "property": "fixed", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "fixed" - } - }, - "description": { - "text": { - "zh_CN": "列是否固定在左侧或者右侧。 true 表示固定在左侧" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "right", - "value": "right" - } - ] - } - } - }, + "label": "auto", + "value": "auto" + } + ] + } + }, + "device": [] + }, + { + "property": "scrollbar-always-on", + "label": { + "text": { + "zh_CN": "显示滚动条" + } + }, + "description": { + "zh_CN": "总是显示滚动条" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "flexible", + "label": { + "text": { + "zh_CN": "主轴最小尺寸" + } + }, + "description": { + "zh_CN": "确保主轴的最小尺寸,以便不超过内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onSelect": { + "label": { + "zh_CN": "勾选数据行的 Checkbox 时触发" + }, + "description": { + "zh_CN": "当用户手动勾选数据行的 Checkbox 时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + }, + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + } + ], + "returns": {} + } + }, + "onSelectAll": { + "label": { + "zh_CN": "勾选全选时触发" + }, + "description": { + "zh_CN": "当用户手动勾选全选 Checkbox 时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + } + ], + "returns": {} + } + }, + "onSelectionChange": { + "label": { + "zh_CN": "选择项发生变化时会触发" + }, + "description": { + "zh_CN": "当选择项发生变化时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + } + ], + "returns": {} + } + }, + "onCellMouseEnter": { + "label": { + "zh_CN": "单元格 hover 时会触发" + }, + "description": { + "zh_CN": "当单元格 hover 进入时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + }, + { + "name": "column", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前列" + } + }, + { + "name": "cell", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前单元格" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生事件 event" + } + } + ], + "returns": {} + } + }, + "onCellMouseLeave": { + "label": { + "zh_CN": "单元格 hover 退出时会触发" + }, + "description": { + "zh_CN": "当单元格 hover 退出时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + }, + { + "name": "column", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前列" + } + }, + { + "name": "cell", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前单元格" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生事件 event" + } + } + ], + "returns": {} + } + } + }, + "slots": { + "empty": { + "label": { + "zh_CN": "empty" + }, + "description": { + "zh_CN": "当数据为空时自定义的内容" + } + }, + "append": { + "label": { + "zh_CN": "append" + }, + "description": { + "zh_CN": "插入至表格最后一行之后的内容, 如果需要对表格的内容进行无限滚动操作,可能需要用到这个 slot。 若表格有合计行,该 slot 会位于合计行之上。" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElTableColumn", + "icon": "table", + "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElTableColumn", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "inline", + "label-width" + ] + }, + "contextMenu": { + "actions": [ + "copy", + "remove", + "insert", + "updateAttr", + "bindEvent", + "createBlock" + ], + "disable": [] + }, + "invalidity": [ + "" + ], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": {} + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "进度条" + }, + "component": "TinyProgress", + "icon": "progress", + "description": "进度条", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyProgress", + "destructuring": true + }, + "group": "component", + "category": "进度条", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "百分比" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "percentage", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "百分比(必填);该属性的可选值为 0-100" + }, + "defaultValue": 0, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "props": { + "options": [ { - "property": "sortable", - "type": "boolean", - "labelPosition": "left", - "label": { - "text": { - "zh_CN": "sortable" - } - }, - "description": { - "text": { - "zh_CN": "对应列是否可以排序" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "line", + "value": "line" }, { - "property": "sort-method", - "type": "function", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-method" - } - }, - "description": { - "text": { - "zh_CN": "指定数据按照哪个属性进行排序,仅当sortable设置为true的时候有效。 应该如同 Array.sort 那样返回一个 Number" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } + "label": "circle", + "value": "circle" }, { - "property": "sort-by", - "type": "array", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-by" - } - }, - "description": { - "text": { - "zh_CN": "指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - }, + "label": "dashboard", + "value": "dashboard" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "进度条类型" + }, + "defaultValue": "line", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "状态" + } + }, + "widget": { + "props": { + "options": [ { - "property": "sort-orders", - "type": "array", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-orders" - } - }, - "description": { - "text": { - "zh_CN": "数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } + "label": "success", + "value": "success" }, { - "property": "resizable", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "resizable" - } - }, - "description": { - "text": { - "zh_CN": "对应列是否可以通过拖动改变宽度(需要在 el-table 上设置 border 属性为真)" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "exception", + "value": "exception" }, { - "property": "formatter", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "formatter" - } - }, - "description": { - "text": { - "zh_CN": "用来格式化内容" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "dataType": "JSFunction" - } - } - }, + "label": "warning", + "value": "warning" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "status", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "进度条当前状态" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "颜色" + } + }, + "widget": { + "props": {}, + "component": "ColorConfigurator" + }, + "disabled": false, + "property": "color", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "进度条背景色(会覆盖 status 状态颜色)" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "线条宽度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "stroke-width", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "line 类型进度条的宽度,单位 px" + }, + "defaultValue": 6, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "宽度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "width", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "环形进度条画布宽度(只在 type 为 circle 或 dashboard 时可用)" + }, + "defaultValue": 126, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示文字" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-text", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示进度条文字内容" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "文字内置" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "text-inside", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "进度条显示文字内置在进度条内(只在 type=line 时可用)" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "格式" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "format", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义进度条的文字" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "状态图标" + } + }, + "widget": { + "props": { + "options": [ { - "property": "show-overflow-tooltip", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "show-overflow-tooltip" - } - }, - "description": { - "text": { - "zh_CN": "当内容过长被隐藏时显示 tooltip" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "successIcon", + "value": "successIcon" }, { - "property": "align", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "align" - } - }, - "description": { - "text": { - "zh_CN": "对齐方式" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "center", - "value": "center" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "label": "exceptionIcon", + "value": "exceptionIcon" }, { - "property": "header-align", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "header-align" - } - }, - "description": { - "text": { - "zh_CN": "表头对齐方式, 若不设置该项,则使用表格的对齐方式" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "center", - "value": "center" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "label": "warningIcon", + "value": "warningIcon" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "statusIcon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "状态插槽,successIcon / exceptionIcon / warningIcon" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "骨架屏" + }, + "component": "TinySkeleton", + "icon": "skeleton", + "description": "骨架屏", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinySkeleton", + "destructuring": true + }, + "group": "component", + "category": "骨架屏", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示头像" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "avatar", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示头像" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "行数" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "rows", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "默认样式,可配置段落显示行数" + }, + "defaultValue": 3, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "形态" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "image", + "value": "image" }, { - "property": "class-name", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "class-name" - } - }, - "description": { - "text": { - "zh_CN": "列的 className" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } + "label": "circle", + "value": "circle" }, { - "property": "label-class-name", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "label-class-name" - } - }, - "description": { - "text": { - "zh_CN": "当前列标题的自定义类名" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } + "label": "square", + "value": "square" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "variant", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "骨架屏形态" + }, + "defaultValue": "square", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "large", + "value": "large" }, { - "property": "selectable", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "selectable" - } - }, - "description": { - "text": { - "zh_CN": "仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } + "label": "medium", + "value": "medium" }, { - "property": "reserve-selection", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "reserve-selection" - } - }, - "description": { - "text": { - "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "small", + "value": "small" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "针对 image 和 circle 形态,内置三种大小" + }, + "defaultValue": "medium", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "开启动画" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "animated", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否开启动画" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示骨架屏" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "loading", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示骨架屏,传 false 时会展示加载完成后的内容" + }, + "defaultValue": true, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "行宽度" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "rows-width", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "自定义段落每一行的宽度,数组中的每一项可以为 number 或 string ,当为 number 时,组件会自动增加 px 单位" + }, + "defaultValue": [], + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "加载完成后显示的内容" + } + }, + "placeholder": { + "label": { + "zh_CN": "占位符" + }, + "description": { + "zh_CN": "自定义骨架屏结构" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "卡片" + }, + "component": "TinyCard", + "icon": "card", + "description": "卡片", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyCard", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "源地址" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "src", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "图片或者视频的地址" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "标题" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "title", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片的标题" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "text", + "value": "text" }, { - "property": "filters", - "type": "array", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filters" - } - }, - "description": { - "text": { - "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } + "label": "image", + "value": "image" }, { - "property": "filter-placement", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "filter-placement" - } - }, - "description": { - "text": { - "zh_CN": "过滤弹出框的定位" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } + "label": "video", + "value": "video" }, { - "property": "filter-multiple", - "type": "string", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filter-multiple" - } - }, - "description": { - "text": { - "zh_CN": "数据过滤的选项是否多选" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, + "label": "logo", + "value": "logo" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置卡片类型" + }, + "defaultValue": "text", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "自动宽度" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "auto-width", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片的宽度是否自动撑开,设置后将不再给卡片设置固定宽度" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "自定义类名" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "custom-class", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片的class" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "高度" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "height", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片内容区域的高度" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + } + ], + "events": {}, + "slots": { + "title": { + "label": { + "zh_CN": "标题" + }, + "description": { + "zh_CN": "标题插槽" + } + }, + "footer": { + "label": { + "zh_CN": "底部" + }, + "description": { + "zh_CN": "组件底部插槽" + } + }, + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "组件默认插槽" + } + }, + "title-left": { + "label": { + "zh_CN": "标题左侧" + }, + "description": { + "zh_CN": "标题左侧插槽" + } + }, + "title-right": { + "label": { + "zh_CN": "标题右侧" + }, + "description": { + "zh_CN": "标题右侧插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "日历" + }, + "component": "TinyCalendar", + "icon": "calendar", + "description": "日历", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyCalendar", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "显示模式" + } + }, + "widget": { + "props": { + "options": [ { - "property": "filter-method", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filter-method" - } - }, - "description": { - "text": { - "zh_CN": "数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } + "label": "month", + "value": "month" }, { - "property": "filtered-value", - "type": "array", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filtered-value" - } - }, - "description": { - "text": { - "zh_CN": "选中的数据过滤项,如果需要自定义表头过滤的渲染方式,可能会需要此属性" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } + "label": "year", + "value": "year" } ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "mode", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "日历显示模式" + }, + "defaultValue": "month", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "月份" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "month", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定月份,默认当前月份" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "年份" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "year", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定年份,默认当前年份" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示选中日期" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-selected", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示选中的日期" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "事件列表" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "events", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "事件列表" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": { + "day": { + "label": { + "zh_CN": "日期单元格" + }, + "description": { + "zh_CN": "日期单元格插槽" + } + }, + "tool": { + "label": { + "zh_CN": "日历工具栏" + }, + "description": { + "zh_CN": "日历工具栏插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "标记" + }, + "component": "TinyBadge", + "icon": "badge", + "description": "标记", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyBadge", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "数据条目数" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "value", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "相关数据条目数" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "标记类型" } - ], + }, "widget": { - "component": "TableColumnsConfigurator", "props": { - "type": "object", - "textField": "label", - "language": "json", - "buttonText": "编辑列配置", - "title": "编辑列配置", - "expand": true + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "标记的类型" + }, + "defaultValue": "danger", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "文本内容" } }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "data", + "readOnly": false, + "required": true, "description": { - "zh_CN": "表格列的配置信息" + "zh_CN": "文本内容" }, - "labelPosition": "top" + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "是否隐藏" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "hidden", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否隐藏标记" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "是否小圆点" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "is-dot", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否以小圆点的形式来显示标记" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "自定义标记类名" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "badge-class", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义标记的类名" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "偏移量" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "offset", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置标记位置的偏移量" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "最大值" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "max", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定徽章显示的最大值,如果实际获取的徽章值超过该最大值,则以最大值后接一个 '+' 的形式显示徽章数,要求 value 是 number 类型" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "跳转地址" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "href", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定跳转的目标页面地址" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "max-height", + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "跳转方式" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "target", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "点击标记时链接到目标页面的跳转方式,仅在 href 属性存在时使用" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": { + "content": { + "label": { + "zh_CN": "内容" + }, + "description": { + "zh_CN": "消息提示内容" + } + }, + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "默认插槽,有data属性时,默认插槽不生效" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "标签" + }, + "component": "TinyTag", + "icon": "tag", + "description": "标签", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyTag", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "最大高度" + "zh_CN": "显示类型" } }, - "description": { - "zh_CN": "Table 的最大高度。" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "number", - "widget": { - "component": "NumberConfigurator", - "props": {} + "property": "type", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "显示类型" }, - "device": [] + "defaultValue": null, + "labelPosition": "left" }, { - "property": "height", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "表格高度" + "zh_CN": "标签内容" } }, - "description": { - "zh_CN": "Table 的高度, 默认为自动高度。 这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "value", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "配置式标签,自定义标签内容" }, - "device": [] - }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ { - "property": "stripe", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "斑马纹" + "zh_CN": "颜色" } }, - "description": { - "zh_CN": "是否为斑马纹 table" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "border", - "label": { - "text": { - "zh_CN": "纵向边框" - } + "props": {}, + "component": "ColorConfigurator" }, + "disabled": false, + "property": "color", + "readOnly": false, + "required": true, "description": { - "zh_CN": "是否带有纵向边框" + "zh_CN": "控制标签文本色和背景色,可使用 IColor 类型中的预设值,也可自定义值" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "defaultValue": null, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "表格尺寸" + "zh_CN": "主题" } }, - "description": { - "zh_CN": "Table 的尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } - }, - { - "property": "fit", - "label": { - "text": { - "zh_CN": "列宽自撑开" - } + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, + "disabled": false, + "property": "effect", + "readOnly": false, + "required": false, "description": { - "zh_CN": "列的宽度是否自撑开" + "zh_CN": "主题" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "defaultValue": "light", + "labelPosition": "left" }, { - "property": "show-header", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "显示表头" + "zh_CN": "最大宽度" } }, - "description": { - "zh_CN": "是否显示表头" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "highlight-current-row", - "label": { - "text": { - "zh_CN": "高亮当前行" - } + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, + "disabled": false, + "property": "max-width", + "readOnly": false, + "required": true, "description": { - "zh_CN": "是否要高亮当前行" + "zh_CN": "设置最大宽度" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "defaultValue": null, + "labelPosition": "left" }, { - "property": "current-row-key", - "label": { - "text": { - "zh_CN": "当前行的 key" - } - }, - "description": { - "zh_CN": "当前行的 key,只写属性" - }, - "required": true, - "readOnly": false, - "disabled": false, "cols": 12, - "labelPosition": "top", "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "device": [] - }, - { - "property": "row-class-name", "label": { "text": { - "zh_CN": "行的类名" + "zh_CN": "尺寸" } }, - "description": { - "zh_CN": "行的 className" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "size", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "尺寸" }, - "device": [] - }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "row-key", + "cols": 12, + "type": "function", "label": { "text": { - "zh_CN": "行数据的 Key" + "zh_CN": "删除前回调" } }, - "description": { - "zh_CN": "行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function" + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "top", - "widget": { - "component": "CodeConfigurator", - "props": {} + "property": "before-delete", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "删除前回调函数" }, - "device": [] + "defaultValue": null, + "labelPosition": "left" }, { - "property": "empty-text", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "空数据文本" + "zh_CN": "可关闭" } }, - "description": { - "zh_CN": "空数据时显示的文本内容" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "closable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否可关闭" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "table-layout", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "表格布局方式" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "设置表格单元、行和列的布局方式" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", - "defaultValue": "fixed", "widget": { - "component": "InputConfigurator", - "props": { - "options": [ - { - "label": "fixed", - "value": "fixed" - }, - { - "label": "auto", - "value": "auto" - } - ] - } - }, - "device": [] - }, - { - "property": "scrollbar-always-on", - "label": { - "text": { - "zh_CN": "显示滚动条" - } + "props": {}, + "component": "CheckBoxConfigurator" }, + "disabled": false, + "property": "disabled", + "readOnly": false, + "required": false, "description": { - "zh_CN": "总是显示滚动条" + "zh_CN": "是否禁用" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" }, { - "property": "flexible", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "主轴最小尺寸" + "zh_CN": "纯图标模式" } }, - "description": { - "zh_CN": "确保主轴的最小尺寸,以便不超过内容" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", + "property": "only-icon", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否为纯图标的模式" + }, "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" } } ], "events": { - "onSelect": { + "onClick": { + "type": "event", "label": { - "zh_CN": "勾选数据行的 Checkbox 时触发" + "zh_CN": "点击标签时触发" }, "description": { - "zh_CN": "当用户手动勾选数据行的 Checkbox 时触发的事件" + "zh_CN": "点击标签时触发的事件" }, - "type": "event", + "defaultValue": "", "functionInfo": { "params": [ { - "name": "selection", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中项" - } - }, - { - "name": "row", - "type": "Object", - "defaultValue": "", + "name": "event", + "type": "Event", "description": { - "zh_CN": "当前行" - } + "zh_CN": "事件对象" + }, + "defaultValue": "" } ], - "returns": {} + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } }, - "onSelectAll": { + "onClose": { + "type": "event", "label": { - "zh_CN": "勾选全选时触发" + "zh_CN": "点击关闭按钮时触发" }, "description": { - "zh_CN": "当用户手动勾选全选 Checkbox 时触发的事件" + "zh_CN": "点击关闭按钮时触发的事件" }, - "type": "event", + "defaultValue": "", "functionInfo": { "params": [ { - "name": "selection", - "type": "Object", - "defaultValue": "", + "name": "event", + "type": "Event", "description": { - "zh_CN": "当前选中项" - } + "zh_CN": "事件对象" + }, + "defaultValue": "" } ], - "returns": {} + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } - }, - "onSelectionChange": { + } + }, + "slots": { + "default": { "label": { - "zh_CN": "选择项发生变化时会触发" + "zh_CN": "默认内容" }, "description": { - "zh_CN": "当选择项发生变化时会触发该事件" + "zh_CN": "标签内容" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "统计数值" + }, + "component": "TinyStatistic", + "icon": "statistic", + "description": "统计数值", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyStatistic", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "selection", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中项" + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "值" } - } - ], - "returns": {} + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "value", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "数字显示内容" + }, + "defaultValue": "0", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "精度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "precision", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "精度值" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" } }, - "onCellMouseEnter": { + { + "name": "1", "label": { - "zh_CN": "单元格 hover 时会触发" - }, - "description": { - "zh_CN": "当单元格 hover 进入时会触发该事件" + "zh_CN": "样式属性" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" + "content": [ + { + "cols": 12, + "type": "object", + "label": { + "text": { + "zh_CN": "值样式" } }, - { - "name": "column", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前列" - } + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - { - "name": "cell", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前单元格" - } + "disabled": false, + "property": "value-style", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字样式" }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生事件 event" - } - } - ], - "returns": {} + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" } }, - "onCellMouseLeave": { + { + "name": "2", "label": { - "zh_CN": "单元格 hover 退出时会触发" - }, - "description": { - "zh_CN": "当单元格 hover 退出时会触发该事件" + "zh_CN": "高级属性" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "前缀" } }, - { - "name": "column", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前列" - } + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - { - "name": "cell", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前单元格" + "disabled": false, + "property": "prefix", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字内容前缀" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "后缀" } }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生事件 event" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "suffix", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字内容后缀" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "标题" } - } - ], - "returns": {} + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "title", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字内容标题" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } - }, + ], + "events": {}, "slots": { - "empty": { + "title": { "label": { - "zh_CN": "empty" + "zh_CN": "标题" }, "description": { - "zh_CN": "当数据为空时自定义的内容" + "zh_CN": "数字内容标题插槽" } }, - "append": { + "prefix": { "label": { - "zh_CN": "append" + "zh_CN": "前缀" }, "description": { - "zh_CN": "插入至表格最后一行之后的内容, 如果需要对表格的内容进行无限滚动操作,可能需要用到这个 slot。 若表格有合计行,该 slot 会位于合计行之上。" + "zh_CN": "数字内容前置插槽" + } + }, + "suffix": { + "label": { + "zh_CN": "后缀" + }, + "description": { + "zh_CN": "数字内容后置插槽" } } } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单" - }, - "component": "ElTableColumn", - "icon": "table", - "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElTableColumn", - "destructuring": true }, - "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -3135,31 +10163,12 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, - "schema": { - "properties": [ - { - "name": "0", - "label": { - "zh_CN": "基础属性" - }, - "content": [], - "description": { - "zh_CN": "" - } - } - ], - "events": {}, - "slots": {} + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } } }, { @@ -3285,11 +10294,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "size"] + "properties": [ + "disabled", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -3604,7 +10621,9 @@ "clickCapture": false, "isModal": false, "nestingRule": { - "childWhitelist": ["TinyCarouselItem"], + "childWhitelist": [ + "TinyCarouselItem" + ], "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -3613,11 +10632,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "size"] + "properties": [ + "disabled", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -3771,7 +10798,14 @@ "name": { "zh_CN": "标题" }, - "component": ["h1", "h2", "h3", "h4", "h5", "h6"], + "component": [ + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ], "icon": "h16", "description": "标题", "docUrl": "", @@ -3856,11 +10890,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "size"] + "properties": [ + "disabled", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -4219,11 +11261,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "size"] + "properties": [ + "disabled", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -4433,18 +11483,19 @@ "bindState": true, "label": { "text": { - "zh_CN": "资源" + "zh_CN": "资源选择" } }, "cols": 12, "rules": [], "widget": { - "component": "InputConfigurator", + "component": "SourceSelectConfigurator", "props": {} }, "description": { "zh_CN": "src路径" - } + }, + "labelPosition": "top" }, { "property": "attributes3", @@ -4471,7 +11522,9 @@ ], "events": {}, "shortcuts": { - "properties": ["src"] + "properties": [ + "src" + ] }, "contentMenu": { "actions": [] @@ -5124,11 +12177,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "size"] + "properties": [ + "disabled", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -5272,11 +12333,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": [ + "label-width", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -5369,7 +12438,10 @@ "isContainer": true, "isModal": false, "nestingRule": { - "childWhitelist": ["TinyRow", "TinyCol"], + "childWhitelist": [ + "TinyRow", + "TinyCol" + ], "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -5378,11 +12450,18 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled"] + "properties": [ + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -5730,11 +12809,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": [ + "label-width", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -5852,7 +12939,9 @@ "isModal": false, "nestingRule": { "childWhitelist": "", - "parentWhitelist": ["TinyForm"], + "parentWhitelist": [ + "TinyForm" + ], "descendantBlacklist": "", "ancestorWhitelist": "" }, @@ -5860,11 +12949,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label", "rules"] + "properties": [ + "label", + "rules" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -6136,11 +13233,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label", "rules"] + "properties": [ + "label", + "rules" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -6473,11 +13578,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["text", "size"] + "properties": [ + "text", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -6885,11 +13998,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["value", "disabled"] + "properties": [ + "value", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -7120,11 +14241,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["visible", "width"] + "properties": [ + "visible", + "width" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -7523,11 +14652,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["multiple", "options"] + "properties": [ + "multiple", + "options" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -7720,11 +14857,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "mini"] + "properties": [ + "disabled", + "mini" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -7993,11 +15138,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["clearable", "mini"] + "properties": [ + "clearable", + "mini" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -8250,11 +15403,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["border", "disabled"] + "properties": [ + "border", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -8436,11 +15597,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["text", "size"] + "properties": [ + "text", + "size" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -8645,11 +15814,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "type"] + "properties": [ + "disabled", + "type" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -8921,11 +16098,19 @@ "isLayout": false, "rootSelector": ".tiny-dialog-box", "shortcuts": { - "properties": ["visible", "width"] + "properties": [ + "visible", + "width" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -9171,7 +16356,9 @@ "clickCapture": false, "isModal": false, "nestingRule": { - "childWhitelist": ["TinyTabItem"], + "childWhitelist": [ + "TinyTabItem" + ], "parentWhitelist": [], "descendantBlacklist": [], "ancestorWhitelist": [] @@ -9180,11 +16367,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["size", "tab-style"] + "properties": [ + "size", + "tab-style" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -9279,7 +16474,9 @@ "isModal": false, "nestingRule": { "childWhitelist": "", - "parentWhitelist": ["TinyTab"], + "parentWhitelist": [ + "TinyTab" + ], "descendantBlacklist": "", "ancestorWhitelist": "" }, @@ -9287,11 +16484,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["name", "title"] + "properties": [ + "name", + "title" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -9415,7 +16620,9 @@ "clickCapture": false, "isModal": false, "nestingRule": { - "childWhitelist": ["TinyBreadcrumbItem"], + "childWhitelist": [ + "TinyBreadcrumbItem" + ], "parentWhitelist": [], "descendantBlacklist": [], "ancestorWhitelist": [] @@ -9424,11 +16631,18 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["separator"] + "properties": [ + "separator" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -9503,7 +16717,9 @@ "isModal": false, "nestingRule": { "childWhitelist": "", - "parentWhitelist": ["TinyBreadcrumb"], + "parentWhitelist": [ + "TinyBreadcrumb" + ], "descendantBlacklist": "", "ancestorWhitelist": "" }, @@ -9511,11 +16727,18 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["to"] + "properties": [ + "to" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -9636,11 +16859,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": [ + "label-width", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -9745,15 +16976,24 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["label-width", "disabled"] + "properties": [ + "label-width", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, { + "version": "3.20.0", "icon": "grid", "name": { "zh_CN": "表格" @@ -9961,7 +17201,10 @@ "widget": { "component": "JsSlotConfigurator", "props": { - "slots": ["header", "default"] + "slots": [ + "header", + "default" + ] } } }, @@ -10633,10 +17876,15 @@ } }, "shortcuts": { - "properties": ["sortable", "columns"] + "properties": [ + "sortable", + "columns" + ] }, "contentMenu": { - "actions": ["create symbol"] + "actions": [ + "create symbol" + ] }, "onBeforeMount": "console.log('table on load'); this.pager = source.pager; this.fetchData = source.fetchData; this.data = source.data ;this.columns = source.columns" }, @@ -10656,11 +17904,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["sortable", "columns"] + "properties": [ + "sortable", + "columns" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -10689,7 +17945,9 @@ "events": {}, "shortcuts": {}, "contentMenu": { - "actions": ["create symbol"] + "actions": [ + "create symbol" + ] } }, "configure": { @@ -10709,8 +17967,13 @@ "rootSelector": "", "shortcuts": {}, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -10937,11 +18200,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["currentPage", "total"] + "properties": [ + "currentPage", + "total" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -11319,11 +18590,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["modelValue", "disabled"] + "properties": [ + "modelValue", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -11652,11 +18931,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["data", "show-checkbox"] + "properties": [ + "data", + "show-checkbox" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -11828,11 +19115,19 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["active", "data"] + "properties": [ + "active", + "data" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, @@ -11855,7 +19150,234 @@ "destructuring": true }, "group": "component", - "priority": 11, + "priority": 11, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "placement", + "label": { + "text": { + "zh_CN": "提示位置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "top", + "value": "top" + }, + { + "label": "top-start", + "value": "top-start" + }, + { + "label": "top-end", + "value": "top-end" + }, + { + "label": "bottom", + "value": "bottom" + }, + { + "label": "bottom-start", + "value": "bottom-start" + }, + { + "label": "bottom-end", + "value": "bottom-end" + }, + { + "label": "left", + "value": "left" + }, + { + "label": "left-start", + "value": "left-start" + }, + { + "label": "left-end", + "value": "left-end" + }, + { + "label": "right", + "value": "right" + }, + { + "label": "right-start", + "value": "right-start" + }, + { + "label": "right-end", + "value": "right-end" + } + ] + } + }, + "description": { + "zh_CN": "Tooltip 的出现位置" + }, + "labelPosition": "left" + }, + { + "property": "content", + "label": { + "text": { + "zh_CN": "内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "defaultValue": "提示信息", + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "显示的内容,也可以通过 slot#content 传入 DOM" + }, + "labelPosition": "left" + }, + { + "property": "render-content", + "label": { + "text": { + "zh_CN": "渲染函数" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": { + "disabled": true, + "placeholder": "请使用变量绑定来绑定函数" + } + }, + "description": { + "zh_CN": "自定义渲染函数,返回需要渲染的节点内容" + } + }, + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "是否可见" + } + }, + "defaultValue": true, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "状态是否可见" + }, + "labelPosition": "left" + }, + { + "property": "manual", + "label": { + "text": { + "zh_CN": "手动控制" + } + }, + "defaultValue": true, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {}, + "slots": { + "content": { + "label": { + "zh_CN": "提示内容" + }, + "description": { + "zh_CN": "自定义提示内容" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": true, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "disabled", + "content" + ] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + }, + { + "version": "3.20.0", + "icon": "popover", + "name": { + "zh_CN": "提示框" + }, + "component": "TinyPopover", + "description": "Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "Popover", + "destructuring": true + }, + "group": "component", + "priority": 7, "schema": { "properties": [ { @@ -11866,11 +19388,31 @@ "zh_CN": "基础信息" }, "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "双向绑定,手动控制是否可见的状态值" + }, + "labelPosition": "left" + }, { "property": "placement", "label": { "text": { - "zh_CN": "提示位置" + "zh_CN": "位置" } }, "required": true, @@ -11933,100 +19475,354 @@ } }, "description": { - "zh_CN": "Tooltip 的出现位置" + "zh_CN": "提示框位置" + }, + "labelPosition": "left" + }, + { + "property": "trigger", + "label": { + "text": { + "zh_CN": "触发方式" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "click", + "value": "click" + }, + { + "label": "focus", + "value": "focus" + }, + { + "label": "hover", + "value": "hover" + }, + { + "label": "manual", + "value": "manual" + } + ] + } + }, + "description": { + "zh_CN": "触发方式,该属性的可选值为 click / focus / hover / manual,该属性的默认值为 click" + }, + "labelPosition": "left" + }, + { + "property": "popper-class", + "label": { + "text": { + "zh_CN": "自定义类" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "为 popper 添加类名" + }, + "labelPosition": "left" + }, + { + "property": "visible-arrow", + "label": { + "text": { + "zh_CN": "显示箭头" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示 Tooltip 箭头" + }, + "labelPosition": "left" + }, + { + "property": "append-to-body", + "label": { + "text": { + "zh_CN": "添加到body上" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "Popover弹窗是否添加到body上" + }, + "labelPosition": "left" + }, + { + "property": "arrow-offset", + "label": { + "text": { + "zh_CN": "箭头的位置偏移" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "箭头的位置偏移,该属性的默认值为 0" + } + }, + { + "property": "close-delay", + "label": { + "text": { + "zh_CN": "延迟隐藏" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" + }, + "labelPosition": "left" + }, + { + "property": "content", + "label": { + "text": { + "zh_CN": "显示的内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "Popover 是否可用" + }, + "labelPosition": "left" + }, + { + "property": "offset", + "label": { + "text": { + "zh_CN": "位置偏移量" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "出现位置的偏移量" + }, + "labelPosition": "left" + }, + { + "property": "open-delay", + "label": { + "text": { + "zh_CN": "显示延迟" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" + }, + "labelPosition": "left" + }, + { + "property": "popper-options", + "label": { + "text": { + "zh_CN": "弹出层参数" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": {} + }, + "description": { + "zh_CN": "popper.js 的参数" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "content", + "property": "title", "label": { "text": { - "zh_CN": "内容" + "zh_CN": "标题" } }, "required": true, "readOnly": false, "disabled": false, - "defaultValue": "提示信息", "cols": 12, "widget": { "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "显示的内容,也可以通过 slot#content 传入 DOM" + "zh_CN": "提示内容标题" }, "labelPosition": "left" }, { - "property": "render-content", + "property": "transform-origin", "label": { "text": { - "zh_CN": "渲染函数" + "zh_CN": "旋转中心点" } }, - "required": false, + "required": true, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": { - "disabled": true, - "placeholder": "请使用变量绑定来绑定函数" - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "自定义渲染函数,返回需要渲染的节点内容" - } + "zh_CN": "组件的旋转中心点,组件的旋转中心点" + }, + "labelPosition": "left" }, { - "property": "modelValue", + "property": "transition", "label": { "text": { - "zh_CN": "是否可见" + "zh_CN": "渐变动画" } }, - "defaultValue": true, + "required": true, + "readOnly": false, + "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "状态是否可见" + "zh_CN": "该属性的默认值为 fade-in-linear" }, "labelPosition": "left" }, { - "property": "manual", + "property": "width", "label": { "text": { - "zh_CN": "手动控制" + "zh_CN": "宽度" } }, - "defaultValue": true, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "手动控制模式,设置为 true 后,mouseenter 和 mouseleave 事件将不会生效" + "zh_CN": "宽度" }, "labelPosition": "left" } ] } ], - "events": {}, - "slots": { - "content": { + "events": { + "onUpdate:modelValue": { "label": { - "zh_CN": "提示内容" + "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "自定义提示内容" - } + "zh_CN": "手动控制是否可见的状态值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "boolean", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的可见状态值" + } + } + ], + "returns": {} + }, + "defaultValue": "" } } }, @@ -12047,22 +19843,30 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["disabled", "content"] + "properties": [ + "visible", + "width" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, { "version": "3.20.0", - "icon": "popover", "name": { - "zh_CN": "提示框" + "zh_CN": "日期选择" }, - "component": "TinyPopover", - "description": "Popover可通过对一个触发源操作触发弹出框,支持自定义弹出内容,延迟触发和渐变动画", + "component": "TinyDatePicker", + "icon": "datepick", + "description": "用于输入或选择日期", "docUrl": "", "screenshot": "", "tags": "", @@ -12070,176 +19874,26 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Popover", + "exportName": "DatePicker", "destructuring": true }, "group": "component", - "priority": 7, + "priority": 1, "schema": { "properties": [ { "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "modelValue", - "label": { - "text": { - "zh_CN": "绑定值" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "双向绑定,手动控制是否可见的状态值" - }, - "labelPosition": "left" - }, - { - "property": "placement", - "label": { - "text": { - "zh_CN": "位置" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "top", - "value": "top" - }, - { - "label": "top-start", - "value": "top-start" - }, - { - "label": "top-end", - "value": "top-end" - }, - { - "label": "bottom", - "value": "bottom" - }, - { - "label": "bottom-start", - "value": "bottom-start" - }, - { - "label": "bottom-end", - "value": "bottom-end" - }, - { - "label": "left", - "value": "left" - }, - { - "label": "left-start", - "value": "left-start" - }, - { - "label": "left-end", - "value": "left-end" - }, - { - "label": "right", - "value": "right" - }, - { - "label": "right-start", - "value": "right-start" - }, - { - "label": "right-end", - "value": "right-end" - } - ] - } - }, - "description": { - "zh_CN": "提示框位置" - }, - "labelPosition": "left" - }, - { - "property": "trigger", - "label": { - "text": { - "zh_CN": "触发方式" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "click", - "value": "click" - }, - { - "label": "focus", - "value": "focus" - }, - { - "label": "hover", - "value": "hover" - }, - { - "label": "manual", - "value": "manual" - } - ] - } - }, - "description": { - "zh_CN": "触发方式,该属性的可选值为 click / focus / hover / manual,该属性的默认值为 click" - }, - "labelPosition": "left" - }, - { - "property": "popper-class", - "label": { - "text": { - "zh_CN": "自定义类" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "为 popper 添加类名" - }, - "labelPosition": "left" - }, + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "visible-arrow", + "property": "modelValue", "label": { "text": { - "zh_CN": "显示箭头" + "zh_CN": "绑定值" } }, "required": true, @@ -12247,58 +19901,58 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "是否显示 Tooltip 箭头" + "zh_CN": "双向绑定值" }, "labelPosition": "left" }, { - "property": "append-to-body", + "property": "type", "label": { "text": { - "zh_CN": "添加到body上" + "zh_CN": "类型" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "日期", + "value": "date" + }, + { + "label": "日期时间", + "value": "datetime" + }, + { + "label": "周", + "value": "week" + }, + { + "label": "月份", + "value": "month" + }, + { + "label": "年份", + "value": "year" + } + ] + } }, "description": { - "zh_CN": "Popover弹窗是否添加到body上" + "zh_CN": "设置日期框的type属性" }, "labelPosition": "left" }, { - "property": "arrow-offset", - "label": { - "text": { - "zh_CN": "箭头的位置偏移" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "箭头的位置偏移,该属性的默认值为 0" - } - }, - { - "property": "close-delay", + "property": "placeholder", "label": { "text": { - "zh_CN": "延迟隐藏" + "zh_CN": "占位文本" } }, "required": true, @@ -12306,19 +19960,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" + "zh_CN": "输入框占位文本" }, "labelPosition": "left" }, { - "property": "content", + "property": "clearable", "label": { "text": { - "zh_CN": "显示的内容" + "zh_CN": "清除按钮" } }, "required": true, @@ -12326,11 +19980,11 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" + "zh_CN": "是否显示清除按钮" }, "labelPosition": "left" }, @@ -12341,7 +19995,7 @@ "zh_CN": "禁用" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, @@ -12350,35 +20004,15 @@ "props": {} }, "description": { - "zh_CN": "Popover 是否可用" - }, - "labelPosition": "left" - }, - { - "property": "offset", - "label": { - "text": { - "zh_CN": "位置偏移量" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "出现位置的偏移量" + "zh_CN": "是否禁用" }, "labelPosition": "left" }, { - "property": "open-delay", + "property": "readonly", "label": { "text": { - "zh_CN": "显示延迟" + "zh_CN": "只读" } }, "required": true, @@ -12386,39 +20020,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" + "zh_CN": "是否只读" }, "labelPosition": "left" }, { - "property": "popper-options", - "label": { - "text": { - "zh_CN": "弹出层参数" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CodeConfigurator", - "props": {} - }, - "description": { - "zh_CN": "popper.js 的参数" - }, - "labelPosition": "top" - }, - { - "property": "title", + "property": "size", "label": { "text": { - "zh_CN": "标题" + "zh_CN": "尺寸" } }, "required": true, @@ -12426,39 +20040,42 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", - "props": {} - }, - "description": { - "zh_CN": "提示内容标题" - }, - "labelPosition": "left" - }, - { - "property": "transform-origin", - "label": { - "text": { - "zh_CN": "旋转中心点" + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, "description": { - "zh_CN": "组件的旋转中心点,组件的旋转中心点" + "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" }, "labelPosition": "left" - }, + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ { - "property": "transition", + "property": "maxlength", "label": { "text": { - "zh_CN": "渐变动画" + "zh_CN": "输入最大长度" } }, "required": true, @@ -12466,19 +20083,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "该属性的默认值为 fade-in-linear" - }, - "labelPosition": "left" + "zh_CN": "设置 input 框的maxLength" + } }, { - "property": "width", + "property": "autofocus", "label": { "text": { - "zh_CN": "宽度" + "zh_CN": "聚焦" } }, "required": true, @@ -12486,40 +20102,149 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "宽度" + "zh_CN": "自动获取焦点" }, "labelPosition": "left" } - ] + ], + "description": { + "zh_CN": "" + } } ], "events": { + "onChange": { + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "在 Input 值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框改变后的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onInput": { + "label": { + "zh_CN": "输入值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框输入的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, "onUpdate:modelValue": { "label": { "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "手动控制是否可见的状态值改变时触发" + "zh_CN": "在 Input 输入值改变时触发" }, "type": "event", "functionInfo": { "params": [ { "name": "value", - "type": "boolean", + "type": "string", "defaultValue": "", "description": { - "zh_CN": "双向绑定的可见状态值" + "zh_CN": "双向绑定的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "失去焦点时触发" + }, + "description": { + "zh_CN": "在 Input 失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" } } ], "returns": {} }, "defaultValue": "" + }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" } } }, @@ -12529,7 +20254,6 @@ "styles": true, "isContainer": true, "isModal": false, - "isPopper": true, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -12540,22 +20264,30 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["visible", "width"] + "properties": [ + "value", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, { "version": "3.20.0", "name": { - "zh_CN": "日期选择" + "zh_CN": "数字输入框" }, - "component": "TinyDatePicker", - "icon": "datepick", - "description": "用于输入或选择日期", + "component": "TinyNumeric", + "icon": "numeric", + "description": "通过鼠标或键盘输入字符", "docUrl": "", "screenshot": "", "tags": "", @@ -12563,7 +20295,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "DatePicker", + "exportName": "Numeric", "destructuring": true }, "group": "component", @@ -12588,7 +20320,6 @@ "required": true, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "I18nConfigurator", "props": {} @@ -12598,45 +20329,6 @@ }, "labelPosition": "left" }, - { - "property": "type", - "label": { - "text": { - "zh_CN": "类型" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "日期", - "value": "date" - }, - { - "label": "日期时间", - "value": "datetime" - }, - { - "label": "周", - "value": "week" - }, - { - "label": "月份", - "value": "month" - }, - { - "label": "年份", - "value": "year" - } - ] - } - }, - "description": { - "zh_CN": "设置日期框的type属性" - }, - "labelPosition": "left" - }, { "property": "placeholder", "label": { @@ -12658,10 +20350,10 @@ "labelPosition": "left" }, { - "property": "clearable", + "property": "allow-empty", "label": { "text": { - "zh_CN": "清除按钮" + "zh_CN": "内容可清空" } }, "required": true, @@ -12673,7 +20365,7 @@ "props": {} }, "description": { - "zh_CN": "是否显示清除按钮" + "zh_CN": "是否内容可清空" }, "labelPosition": "left" }, @@ -12698,33 +20390,68 @@ "labelPosition": "left" }, { - "property": "readonly", + "property": "size", "label": { "text": { - "zh_CN": "只读" + "zh_CN": "尺寸" } }, "required": true, "readOnly": false, "disabled": false, "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + }, + { + "property": "controls", + "label": { + "text": { + "zh_CN": "加减按钮" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否只读" + "zh_CN": "是否使用加减按钮" }, "labelPosition": "left" }, { - "property": "size", + "property": "controls-position", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "加减按钮位置" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, @@ -12733,76 +20460,109 @@ "props": { "options": [ { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" + "label": "左右两侧", + "value": "" }, { - "label": "mini", - "value": "mini" + "label": "只在右侧", + "value": "right" } ] } }, "description": { - "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" + "zh_CN": "加减按钮位置" + } + }, + { + "property": "precision", + "label": { + "text": { + "zh_CN": "精度" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "数值精度" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + }, { - "property": "maxlength", + "property": "step", "label": { "text": { - "zh_CN": "输入最大长度" + "zh_CN": "步长" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { "component": "NumberConfigurator", - "props": {} + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "设置 input 框的maxLength" - } + "zh_CN": "步长" + }, + "labelPosition": "left" + }, + { + "property": "max", + "label": { + "text": { + "zh_CN": "最大数值" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "可输入的最大数值" + }, + "labelPosition": "left" }, { - "property": "autofocus", + "property": "min", "label": { "text": { - "zh_CN": "聚焦" + "zh_CN": "最小数值" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "自动获取焦点" + "zh_CN": "可输入的最大数值" }, "labelPosition": "left" } - ], - "description": { - "zh_CN": "" - } + ] } ], "events": { @@ -12953,22 +20713,30 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["value", "disabled"] + "properties": [ + "value", + "disabled" + ] }, "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] } } }, { "version": "3.20.0", "name": { - "zh_CN": "数字输入框" + "zh_CN": "穿梭框" }, - "component": "TinyNumeric", - "icon": "numeric", - "description": "通过鼠标或键盘输入字符", + "component": "TinyTransfer", + "icon": "transfer", + "description": "穿梭框,实现左右表格数据的双向交换的组件", "docUrl": "", "screenshot": "", "tags": "", @@ -12976,7 +20744,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Numeric", + "exportName": "TinyTransfer", "destructuring": true }, "group": "component", @@ -13011,988 +20779,1343 @@ "labelPosition": "left" }, { - "property": "placeholder", + "property": "data", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "左右列表的全量数据源" } }, "required": true, "readOnly": false, "disabled": false, - "cols": 12, "widget": { - "component": "I18nConfigurator", + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "左右列表的全量数据源" + }, + "labelPosition": "left" + }, + { + "property": "filterable", + "label": { + "text": { + "zh_CN": "是否启用搜索的功能" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "widget": { + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "输入框占位文本" + "zh_CN": "是否启用搜索的功能" }, "labelPosition": "left" }, { - "property": "allow-empty", + "property": "showAllBtn", "label": { "text": { - "zh_CN": "内容可清空" + "zh_CN": "是否显示全部移动按钮" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否内容可清空" + "zh_CN": "是否显示全部移动按钮" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "toLeftDisable", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" } }, "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" }, "labelPosition": "left" }, { - "property": "size", + "property": "toRightDisable", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" + }, + "labelPosition": "left" + }, + { + "property": "titles", + "label": { + "text": { + "zh_CN": "自定义列表的标题" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "widget": { + "component": "CodeConfigurator", "props": { - "options": [ - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] + "language": "json" + } + }, + "description": { + "zh_CN": "自定义列表的标题;不设置titles时,左右列表的标题默认显示为: 列表 1, 列表 2" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "右侧列表元素变化时触发" + }, + "description": { + "zh_CN": "右侧列表元素变化时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "右侧列表元素变化时触发" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onLeftCheckChange": { + "label": { + "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" + }, + "description": { + "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onRightCheckChange": { + "label": { + "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" + }, + "description": { + "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [ + "value", + "disabled" + ] + }, + "contextMenu": { + "actions": [ + "create symbol" + ], + "disable": [ + "copy", + "remove" + ] + } + } + } + ], + "blocks": [], + "snippets": [ + { + "group": "layout", + "label": { + "zh_CN": "布局与容器" + }, + "children": [ + { + "name": { + "zh_CN": "栅格布局" + }, + "icon": "row", + "screenshot": "", + "snippetName": "TinyLayout", + "schema": { + "componentName": "TinyLayout", + "props": {}, + "children": [ + { + "componentName": "TinyRow", + "props": { + "style": "padding: 10px;" + }, + "children": [ + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } } - }, - "description": { - "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" - }, - "labelPosition": "left" + ] }, { - "property": "controls", - "label": { - "text": { - "zh_CN": "加减按钮" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否使用加减按钮" + "componentName": "TinyRow", + "props": { + "style": "padding: 10px;" }, - "labelPosition": "left" + "children": [ + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + } + ] + } + ] + } + } + ] + }, + { + "group": "basic", + "label": { + "zh_CN": "基础元素" + }, + "children": [ + { + "name": { + "zh_CN": "段落" + }, + "icon": "paragraph", + "screenshot": "", + "snippetName": "p", + "schema": { + "componentName": "p", + "children": "TinyEngine 前端可视化设计器致力于通过友好的用户交互提升业务应用的开发效率。" + } + }, + { + "name": { + "zh_CN": "链接" + }, + "icon": "link", + "screenshot": "", + "snippetName": "a", + "schema": { + "componentName": "a", + "children": "链接" + } + }, + { + "name": { + "zh_CN": "分隔线" + }, + "icon": "hr", + "screenshot": "", + "snippetName": "hr", + "schema": {} + }, + { + "name": { + "zh_CN": "标题" + }, + "icon": "h16", + "screenshot": "", + "snippetName": "h1", + "schema": { + "componentName": "h1", + "props": {}, + "children": "Heading" + } + }, + { + "name": { + "zh_CN": "视频" + }, + "icon": "video", + "screenshot": "", + "snippetName": "video", + "schema": { + "componentName": "video", + "props": { + "src": "https://tinyengine-assets.obs.myhuaweicloud.com/files/in-action.mp4#t=1.5", + "width": "200", + "height": "100", + "style": "border:1px solid #ccc" + } + } + }, + { + "name": { + "zh_CN": "按钮" + }, + "icon": "button", + "screenshot": "", + "snippetName": "TinyButton", + "schema": { + "componentName": "TinyButton", + "props": { + "text": "按钮文案" + } + } + }, + { + "name": { + "zh_CN": "按钮组" + }, + "icon": "buttons", + "snippetName": "TinyButtons", + "screenshot": "", + "schema": { + "componentName": "div", + "props": {}, + "children": [ + { + "componentName": "TinyButton", + "props": { + "text": "提交", + "type": "primary", + "style": "margin: 0 5px 0 5px;" + } }, { - "property": "controls-position", - "label": { - "text": { - "zh_CN": "加减按钮位置" - } + "componentName": "TinyButton", + "props": { + "text": "重置", + "style": "margin: 0 5px 0 5px;" + } + }, + { + "componentName": "TinyButton", + "props": { + "text": "取消" + } + } + ] + }, + "configure": { + "isContainer": true + } + }, + { + "name": { + "zh_CN": "互斥按钮组" + }, + "icon": "MutexButtons", + "snippetName": "TinyButtonGroup", + "screenshot": "", + "schema": { + "componentName": "TinyButtonGroup", + "props": { + "data": [ + { + "text": "Button1", + "value": "1" }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "左右两侧", - "value": "" - }, - { - "label": "只在右侧", - "value": "right" - } - ] - } + { + "text": "Button2", + "value": "2" }, - "description": { - "zh_CN": "加减按钮位置" + { + "text": "Button3", + "value": "3" } - }, + ], + "modelValue": "1" + } + } + }, + { + "name": { + "zh_CN": "搜索框" + }, + "icon": "search", + "screenshot": "", + "snippetName": "TinySearch", + "schema": { + "componentName": "TinySearch", + "props": { + "modelValue": "", + "placeholder": "输入关键词" + } + } + } + ] + }, + { + "group": "form", + "label": { + "zh_CN": "表单类型" + }, + "children": [ + { + "name": { + "zh_CN": "表单" + }, + "screenshot": "", + "snippetName": "TinyForm", + "icon": "form", + "schema": { + "componentName": "TinyForm", + "props": { + "labelWidth": "80px", + "labelPosition": "top" + }, + "children": [ { - "property": "precision", - "label": { - "text": { - "zh_CN": "精度" - } + "componentName": "TinyFormItem", + "props": { + "label": "人员" }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true + "children": [ + { + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "" + } } - }, - "description": { - "zh_CN": "数值精度" - }, - "labelPosition": "left" + ] }, { - "property": "step", - "label": { - "text": { - "zh_CN": "步长" - } + "componentName": "TinyFormItem", + "props": { + "label": "密码" }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true + "children": [ + { + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "", + "type": "password" + } } - }, - "description": { - "zh_CN": "步长" - }, - "labelPosition": "left" + ] }, { - "property": "max", - "label": { - "text": { - "zh_CN": "最大数值" - } + "componentName": "TinyFormItem", + "props": { + "label": "" }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true + "children": [ + { + "componentName": "TinyButton", + "props": { + "text": "提交", + "type": "primary", + "style": "margin-right: 10px" + } + }, + { + "componentName": "TinyButton", + "props": { + "text": "重置", + "type": "primary" + } } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "下拉框" + }, + "icon": "select", + "screenshot": "", + "snippetName": "TinySelect", + "schema": { + "componentName": "TinySelect", + "props": { + "modelValue": "", + "placeholder": "请选择", + "options": [ + { + "value": "1", + "label": "黄金糕" }, - "description": { - "zh_CN": "可输入的最大数值" + { + "value": "2", + "label": "双皮奶" + } + ] + } + } + }, + { + "name": { + "zh_CN": "开关" + }, + "icon": "switch", + "screenshot": "", + "snippetName": "TinySwitch", + "schema": { + "componentName": "TinySwitch", + "props": { + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "复选框组" + }, + "icon": "checkboxs", + "screenshot": "", + "snippetName": "TinyCheckboxGroup", + "schema": { + "componentName": "TinyCheckboxGroup", + "props": { + "modelValue": [ + "name1", + "name2" + ], + "type": "checkbox", + "options": [ + { + "text": "复选框1", + "label": "name1" }, - "labelPosition": "left" - }, + { + "text": "复选框2", + "label": "name2" + }, + { + "text": "复选框3", + "label": "name3" + } + ] + } + } + }, + { + "name": { + "zh_CN": "复选框拖拽按钮组" + }, + "icon": "checkboxgroup", + "screenshot": "", + "snippetName": "TinyCheckboxbuttonGroup", + "schema": { + "componentName": "TinyCheckboxGroup", + "props": { + "modelValue": [] + }, + "children": [ { - "property": "min", - "label": { - "text": { - "zh_CN": "最小数值" + "componentName": "TinyCheckboxButton", + "children": [ + { + "componentName": "div" } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "输入框" + }, + "icon": "input", + "screenshot": "", + "snippetName": "TinyInput", + "schema": { + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "单选" + }, + "icon": "radio", + "screenshot": "", + "snippetName": "TinyRadio", + "schema": { + "componentName": "TinyRadio", + "props": { + "label": "1", + "text": "单选文本" + } + } + }, + { + "name": { + "zh_CN": "单选组" + }, + "icon": "radiogroup", + "screenshot": "", + "snippetName": "TinyRadioGroup", + "schema": { + "props": { + "type": "radio", + "modelValue": "1", + "options": [ + { "label": "1", "text": "选项一" }, + { "label": "2", "text": "选项二" } + ] + } + } + }, + { + "name": { + "zh_CN": "复选框" + }, + "icon": "checkbox", + "screenshot": "", + "snippetName": "TinyCheckbox", + "schema": { + "componentName": "TinyCheckbox", + "props": { + "text": "复选框文案" + } + } + }, + { + "name": { + "zh_CN": "日期选择" + }, + "icon": "datepick", + "screenshot": "", + "snippetName": "TinyDatePicker", + "schema": { + "componentName": "TinyDatePicker", + "props": { + "placeholder": "请输入", + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "数字输入框" + }, + "icon": "numeric", + "screenshot": "", + "snippetName": "TinyNumeric", + "schema": { + "componentName": "TinyNumeric", + "props": { + "allow-empty": true, + "placeholder": "请输入", + "controls-position": "right", + "step": 1 + } + } + }, + { + "name": { + "zh_CN": "穿梭框" + }, + "icon": "transfer", + "screenshot": "", + "snippetName": "TinyTransfer", + "schema": { + "componentName": "TinyTransfer", + "props": { + "modelValue": [ + 3 + ], + "data": [ + { + "key": 1, + "label": "备选项1", + "disabled": false }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } + { + "key": 2, + "label": "备选项2", + "disabled": false }, - "description": { - "zh_CN": "可输入的最大数值" + { + "key": 3, + "label": "备选项3", + "disabled": false }, - "labelPosition": "left" - } - ] - } - ], - "events": { - "onChange": { - "label": { - "zh_CN": "值改变时触发" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框改变后的值" - } + "key": 4, + "label": "备选项4", + "disabled": false } - ], - "returns": {} - }, - "defaultValue": "" + ] + } + } + }, + { + "icon": "rate", + "name": { + "zh_CN": "评分" }, - "onInput": { - "label": { - "zh_CN": "输入值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框输入的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" + "schema": { + "props": { + "allow-half": true, + "modelValue": 3, + "show-score": true + } }, - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定的值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" + "screenshot": "", + "snippetName": "TinyRate" + }, + { + "name": { + "zh_CN": "滑块" }, - "onBlur": { - "label": { - "zh_CN": "失去焦点时触发" - }, - "description": { - "zh_CN": "在 Input 失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" + "icon": "slider", + "screenshot": "", + "snippetName": "TinySlider", + "schema": { + "componentName": "TinySlider", + "props": { + "max": 100, + "min": 0, + "step": 1, + "modelValue": 50 + } + } + }, + { + "name": { + "zh_CN": "级联选择器" }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "icon": "cascader", + "screenshot": "", + "snippetName": "TinyCascader", + "schema": { + "componentName": "TinyCascader", + "props": { + "modelValue": "anzhuangcli", + "options": [ { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } + "value": "zhinan", + "label": "指南", + "children": [ + { + "value": "anzhuang", + "label": "安装", + "children": [ + { + "value": "xiangmudengji", + "label": "项目登记" + }, + { + "value": "huanjingzhunbei", + "label": "环境准备" + }, + { + "value": "anzhuangcli", + "label": "安装 CLI" + }, + { + "value": "chuangjianxiangmu", + "label": "创建项目" + } + ] + }, + { + "value": "kaifa", + "label": "开发", + "children": [ + { + "value": "yinruzujian", + "label": "引入组件" + }, + { + "value": "monishuju", + "label": "模拟数据" + } + ] + } + ] + }, + { + "value": "zujian", + "label": "组件", + "children": [ + { + "value": "basic", + "label": "框架风格", + "children": [ + { + "value": "layout", + "label": "Layout 布局" + }, + { + "value": "color", + "label": "Color 色彩" + }, + { + "value": "font", + "label": "Font 字体" + }, + { + "value": "icon", + "label": "Icon 图标" + } + ] + }, + { + "value": "data", + "label": "数据组件", + "children": [ + { + "value": "tree", + "label": "Tree 树形控件" + }, + { + "value": "pager", + "label": "Pager 分页" + } + ] + } + ] } ], - "returns": {} - }, - "defaultValue": "" - }, - "onClear": { - "label": { - "zh_CN": "点击清空按钮时触发" - }, - "description": { - "zh_CN": "点击清空按钮时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" + "placeholder": "请选择" + } } } - }, - "configure": { - "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"] - } - } + ] }, { - "version": "3.20.0", - "name": { - "zh_CN": "穿梭框" - }, - "component": "TinyTransfer", - "icon": "transfer", - "description": "穿梭框,实现左右表格数据的双向交换的组件", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "TinyTransfer", - "destructuring": true + "group": "table", + "label": { + "zh_CN": "表格类型" }, - "group": "component", - "priority": 1, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" - }, - "content": [ - { - "property": "modelValue", - "label": { - "text": { - "zh_CN": "绑定值" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "widget": { - "component": "I18nConfigurator", - "props": {} - }, - "description": { - "zh_CN": "双向绑定值" - }, - "labelPosition": "left" - }, - { - "property": "data", - "label": { - "text": { - "zh_CN": "左右列表的全量数据源" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - }, - "description": { - "zh_CN": "左右列表的全量数据源" - }, - "labelPosition": "left" - }, - { - "property": "filterable", - "label": { - "text": { - "zh_CN": "是否启用搜索的功能" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否启用搜索的功能" - }, - "labelPosition": "left" - }, - { - "property": "showAllBtn", - "label": { - "text": { - "zh_CN": "是否显示全部移动按钮" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否显示全部移动按钮" - }, - "labelPosition": "left" - }, - { - "property": "toLeftDisable", - "label": { - "text": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" - }, - "labelPosition": "left" + "children": [ + { + "name": { + "zh_CN": "表格" + }, + "icon": "grid", + "screenshot": "", + "snippetName": "TinyGrid", + "schema": { + "componentName": "TinyGrid", + "props": { + "editConfig": { + "trigger": "click", + "mode": "cell", + "showStatus": true }, - { - "property": "toRightDisable", - "label": { - "text": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" + "columns": [ + { + "type": "index", + "width": 60 }, - "labelPosition": "left" - }, - { - "property": "titles", - "label": { - "text": { - "zh_CN": "自定义列表的标题" - } + { + "type": "selection", + "width": 60 }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } + { + "field": "employees", + "title": "员工数" }, - "description": { - "zh_CN": "自定义列表的标题;不设置titles时,左右列表的标题默认显示为: 列表 1, 列表 2" + { + "field": "created_date", + "title": "创建日期" }, - "labelPosition": "left" - } - ] - } - ], - "events": { - "onChange": { - "label": { - "zh_CN": "右侧列表元素变化时触发" - }, - "description": { - "zh_CN": "右侧列表元素变化时触发" - }, - "type": "event", - "functionInfo": { - "params": [ { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "右侧列表元素变化时触发" - } + "field": "city", + "title": "城市" } ], - "returns": {} - }, - "defaultValue": "" - }, - "onLeftCheckChange": { - "label": { - "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" - }, - "description": { - "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" - }, - "type": "event", - "functionInfo": { - "params": [ + "data": [ { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onRightCheckChange": { - "label": { - "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" - }, - "description": { - "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "id": "1", + "name": "GFD科技有限公司", + "city": "福州", + "employees": 800, + "created_date": "2014-04-30 00:56:00", + "boole": false + }, { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" - } + "id": "2", + "name": "WWW科技有限公司", + "city": "深圳", + "employees": 300, + "created_date": "2016-07-08 12:36:22", + "boole": true } - ], - "returns": {} - }, - "defaultValue": "" + ] + } } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["value", "disabled"] }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] + { + "name": { + "zh_CN": "分页" + }, + "icon": "pager", + "screenshot": "", + "snippetName": "TinyPager", + "schema": { + "componentName": "TinyPager", + "props": { + "layout": "total, sizes, prev, pager, next", + "total": 100, + "pageSize": 10, + "currentPage": 1 + } + } } - } - } - ], - "blocks": [], - "snippets": [ + ] + }, { - "group": "layout", + "group": "data-display", "label": { - "zh_CN": "布局与容器" + "zh_CN": "数据展示类" }, "children": [ { "name": { - "zh_CN": "栅格布局" + "zh_CN": "走马灯" }, - "icon": "row", "screenshot": "", - "snippetName": "TinyLayout", + "snippetName": "TinyCarousel", + "icon": "carousel", "schema": { - "componentName": "TinyLayout", - "props": {}, + "componentName": "TinyCarousel", + "props": { + "height": "180px" + }, "children": [ { - "componentName": "TinyRow", + "componentName": "TinyCarouselItem", "props": { - "style": "padding: 10px;" + "title": "carousel-item-a" }, "children": [ { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", + "componentName": "div", "props": { - "span": 3 + "style": "margin:10px 0 0 30px" } } ] }, { - "componentName": "TinyRow", + "componentName": "TinyCarouselItem", "props": { - "style": "padding: 10px;" + "title": "carousel-item-b" }, "children": [ { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", + "componentName": "div", "props": { - "span": 3 - } - } - ] - } - ] - } - } - ] - }, - { - "group": "basic", - "label": { - "zh_CN": "基础元素" - }, - "children": [ - { - "name": { - "zh_CN": "段落" - }, - "icon": "paragraph", - "screenshot": "", - "snippetName": "p", - "schema": { - "componentName": "p", - "children": "TinyEngine 前端可视化设计器致力于通过友好的用户交互提升业务应用的开发效率。" - } - }, - { - "name": { - "zh_CN": "链接" - }, - "icon": "link", - "screenshot": "", - "snippetName": "a", - "schema": { - "componentName": "a", - "children": "链接" - } - }, - { - "name": { - "zh_CN": "分隔线" - }, - "icon": "hr", - "screenshot": "", - "snippetName": "hr", - "schema": {} - }, - { - "name": { - "zh_CN": "标题" - }, - "icon": "h16", - "screenshot": "", - "snippetName": "h1", - "schema": { - "componentName": "h1", - "props": {}, - "children": "Heading" - } - }, - { - "name": { - "zh_CN": "视频" - }, - "icon": "video", - "screenshot": "", - "snippetName": "video", - "schema": { - "componentName": "video", - "props": { - "src": "https://tinyengine-assets.obs.myhuaweicloud.com/files/in-action.mp4#t=1.5", - "width": "200", - "height": "100", - "style": "border:1px solid #ccc" - } + "style": "margin:10px 0 0 30px" + } + } + ] + } + ] } }, { "name": { - "zh_CN": "按钮" + "zh_CN": "对话框" }, - "icon": "button", "screenshot": "", - "snippetName": "TinyButton", + "snippetName": "TinyDialogBox", + "icon": "dialogbox", "schema": { - "componentName": "TinyButton", + "componentName": "TinyDialogBox", "props": { - "text": "按钮文案" - } + "visible": true, + "show-close": true, + "title": "dialogBox title" + }, + "children": [ + { + "componentName": "div" + } + ] } }, { "name": { - "zh_CN": "按钮组" + "zh_CN": "折叠面板" }, - "icon": "buttons", - "snippetName": "TinyButtons", "screenshot": "", + "snippetName": "TinyCollapse", + "icon": "collapse", "schema": { - "componentName": "div", - "props": {}, + "componentName": "TinyCollapse", + "props": { + "modelValue": "collapse1" + }, "children": [ { - "componentName": "TinyButton", + "componentName": "TinyCollapseItem", "props": { - "text": "提交", - "type": "primary", - "style": "margin: 0 5px 0 5px;" - } + "name": "collapse1", + "title": "折叠项1" + }, + "children": [ + { + "componentName": "div" + } + ] }, { - "componentName": "TinyButton", + "componentName": "TinyCollapseItem", "props": { - "text": "重置", - "style": "margin: 0 5px 0 5px;" - } + "name": "collapse2", + "title": "折叠项2" + }, + "children": [ + { + "componentName": "div" + } + ] }, { - "componentName": "TinyButton", + "componentName": "TinyCollapseItem", "props": { - "text": "取消" - } + "name": "collapse3", + "title": "折叠项3" + }, + "children": [ + { + "componentName": "div" + } + ] } ] + } + }, + { + "name": { + "zh_CN": "弹出编辑" }, - "configure": { - "isContainer": true + "icon": "popeditor", + "screenshot": "", + "snippetName": "TinyPopeditor", + "schema": { + "componentName": "TinyPopeditor", + "props": { + "modelValue": "", + "placeholder": "请选择", + "grid-op": { + "columns": [ + { + "field": "id", + "title": "ID", + "width": 40 + }, + { + "field": "name", + "title": "名称", + "showOverflow": "tooltip" + }, + { + "field": "province", + "title": "省份", + "width": 80 + }, + { + "field": "city", + "title": "城市", + "width": 80 + } + ], + "data": [ + { + "id": "1", + "name": "GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司", + "city": "福州", + "province": "福建" + }, + { + "id": "2", + "name": "WWW科技有限公司", + "city": "深圳", + "province": "广东" + }, + { + "id": "3", + "name": "RFV有限责任公司", + "city": "中山", + "province": "广东" + }, + { + "id": "4", + "name": "TGB科技有限公司", + "city": "龙岩", + "province": "福建" + }, + { + "id": "5", + "name": "YHN科技有限公司", + "city": "韶关", + "province": "广东" + }, + { + "id": "6", + "name": "WSX科技有限公司", + "city": "黄冈", + "province": "武汉" + } + ] + } + } } }, { "name": { - "zh_CN": "互斥按钮组" + "zh_CN": "树" }, - "icon": "MutexButtons", - "snippetName": "TinyButtonGroup", + "icon": "tree", "screenshot": "", + "snippetName": "TinyTree", "schema": { - "componentName": "TinyButtonGroup", + "componentName": "TinyTree", "props": { "data": [ { - "text": "Button1", - "value": "1" - }, - { - "text": "Button2", - "value": "2" + "label": "一级 1", + "children": [ + { + "label": "二级 1-1", + "children": [ + { + "label": "三级 1-1-1" + } + ] + } + ] }, { - "text": "Button3", - "value": "3" + "label": "一级 2", + "children": [ + { + "label": "二级 2-1", + "children": [ + { + "label": "三级 2-1-1" + } + ] + }, + { + "label": "二级 2-2", + "children": [ + { + "label": "三级 2-2-1" + } + ] + } + ] } - ], - "modelValue": "1" + ] } } }, { "name": { - "zh_CN": "搜索框" + "zh_CN": "文字提示框" }, - "icon": "search", + "icon": "tooltip", "screenshot": "", - "snippetName": "TinySearch", + "snippetName": "TinyTooltip", "schema": { - "componentName": "TinySearch", + "componentName": "TinyTooltip", "props": { - "modelValue": "", - "placeholder": "输入关键词" - } - } - } - ] - }, - { - "group": "form", - "label": { - "zh_CN": "表单类型" - }, - "children": [ + "content": "Top Left 提示文字", + "placement": "top-start", + "manual": true, + "modelValue": true + }, + "children": [ + { + "componentName": "span", + "children": [ + { + "componentName": "div", + "props": {} + } + ] + }, + { + "componentName": "Template", + "props": { + "slot": "content" + }, + "children": [ + { + "componentName": "span", + "children": [ + { + "componentName": "div", + "props": { + "placeholder": "提示内容" + } + } + ] + } + ] + } + ] + } + }, { "name": { - "zh_CN": "表单" + "zh_CN": "提示框" }, + "icon": "popover", "screenshot": "", - "snippetName": "tiny-form", - "icon": "form", + "snippetName": "TinyPopover", "schema": { - "componentName": "TinyForm", + "componentName": "TinyPopover", "props": { - "labelWidth": "80px", - "labelPosition": "top" + "width": 200, + "title": "弹框标题", + "trigger": "manual", + "modelValue": true }, "children": [ { - "componentName": "TinyFormItem", - "props": { - "label": "人员" - }, - "children": [ - { - "componentName": "TinyInput", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } - ] - }, - { - "componentName": "TinyFormItem", + "componentName": "Template", "props": { - "label": "密码" + "slot": "reference" }, "children": [ { - "componentName": "TinyInput", + "componentName": "div", "props": { - "placeholder": "请输入", - "modelValue": "", - "type": "password" + "placeholder": "触发源" } } ] }, { - "componentName": "TinyFormItem", + "componentName": "Template", "props": { - "label": "" + "slot": "default" }, "children": [ { - "componentName": "TinyButton", - "props": { - "text": "提交", - "type": "primary", - "style": "margin-right: 10px" - } - }, - { - "componentName": "TinyButton", + "componentName": "div", "props": { - "text": "重置", - "type": "primary" + "placeholder": "提示内容" } } ] @@ -14002,269 +22125,155 @@ }, { "name": { - "zh_CN": "下拉框" - }, - "icon": "select", - "screenshot": "", - "snippetName": "TinySelect", - "schema": { - "componentName": "TinySelect", - "props": { - "modelValue": "", - "placeholder": "请选择", - "options": [ - { - "value": "1", - "label": "黄金糕" - }, - { - "value": "2", - "label": "双皮奶" - } - ] - } - } - }, - { - "name": { - "zh_CN": "开关" - }, - "icon": "switch", - "screenshot": "", - "snippetName": "TinySwitch", - "schema": { - "componentName": "TinySwitch", - "props": { - "modelValue": "" - } - } - }, - { - "name": { - "zh_CN": "复选框组" + "zh_CN": "骨架屏" }, - "icon": "checkboxs", + "icon": "skeleton", "screenshot": "", - "snippetName": "TinyCheckboxGroup", + "snippetName": "TinySkeleton", "schema": { - "componentName": "TinyCheckboxGroup", + "componentName": "TinySkeleton", "props": { - "modelValue": ["name1", "name2"], - "type": "checkbox", - "options": [ - { - "text": "复选框1", - "label": "name1" - }, - { - "text": "复选框2", - "label": "name2" + "rows": 3, + "loading": true, + "animated": true + }, + "children": [ + { + "props": { + "text": "实际内容" }, - { - "text": "复选框3", - "label": "name3" - } - ] - } + "componentName": "Text" + } + ] } }, { "name": { - "zh_CN": "复选框拖拽按钮组" + "zh_CN": "卡片" }, - "icon": "checkboxgroup", + "icon": "card", "screenshot": "", - "snippetName": "TinyCheckboxbuttonGroup", + "snippetName": "TinyCard", "schema": { - "componentName": "TinyCheckboxGroup", + "componentName": "TinyCard", "props": { - "modelValue": [] + "type": "text", + "title": "卡片标题" }, "children": [ { - "componentName": "TinyCheckboxButton", - "children": [ - { - "componentName": "div" - } - ] + "props": { + "text": "这是一个文本卡片的示例内容。" + }, + "componentName": "Text" } ] } }, { "name": { - "zh_CN": "输入框" - }, - "icon": "input", - "screenshot": "", - "snippetName": "TinyInput", - "schema": { - "componentName": "TinyInput", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } - }, - { - "name": { - "zh_CN": "单选" + "zh_CN": "日历" }, - "icon": "radio", + "icon": "calendar", "screenshot": "", - "snippetName": "TinyRadio", + "snippetName": "TinyCalendar", "schema": { - "componentName": "TinyRadio", + "componentName": "TinyCalendar", "props": { - "label": "1", - "text": "单选文本" + "mode": "month", + "show-selected": false } } }, { "name": { - "zh_CN": "复选框" + "zh_CN": "进度条" }, - "icon": "checkbox", + "icon": "progress", "screenshot": "", - "snippetName": "TinyCheckbox", + "snippetName": "TinyProgress", "schema": { - "componentName": "TinyCheckbox", + "componentName": "TinyProgress", "props": { - "text": "复选框文案" + "type": "line", + "status": "success", + "percentage": 50 } } }, { "name": { - "zh_CN": "日期选择" + "zh_CN": "标记" }, - "icon": "datepick", + "icon": "badge", "screenshot": "", - "snippetName": "TinyDatePicker", + "snippetName": "TinyBadge", "schema": { - "componentName": "TinyDatePicker", + "componentName": "TinyBadge", "props": { - "placeholder": "请输入", - "modelValue": "" + "value": 10, + "data": "我的待办" } } }, { "name": { - "zh_CN": "数字输入框" + "zh_CN": "标签" }, - "icon": "numeric", + "icon": "tag", "screenshot": "", - "snippetName": "TinyNumeric", + "snippetName": "TinyTag", "schema": { - "componentName": "TinyNumeric", + "componentName": "TinyTag", "props": { - "allow-empty": true, - "placeholder": "请输入", - "controls-position": "right", - "step": 1 + "type": "success", + "value": "成功" } } }, { "name": { - "zh_CN": "穿梭框" + "zh_CN": "统计数值" }, - "icon": "transfer", + "icon": "statistic", "screenshot": "", - "snippetName": "TinyTransfer", + "snippetName": "TinyStatistic", "schema": { - "componentName": "TinyTransfer", + "componentName": "TinyStatistic", "props": { - "modelValue": [3], - "data": [ - { - "key": 1, - "label": "备选项1", - "disabled": false - }, - { - "key": 2, - "label": "备选项2", - "disabled": false - }, - { - "key": 3, - "label": "备选项3", - "disabled": false - }, - { - "key": 4, - "label": "备选项4", - "disabled": false - } - ] + "value": 36256.22, + "precision": 2 } } } ] }, { - "group": "table", + "group": "navigation", "label": { - "zh_CN": "表格类型" + "zh_CN": "导航类型" }, "children": [ { "name": { - "zh_CN": "表格" + "zh_CN": "时间线" }, - "icon": "grid", + "icon": "timeline", "screenshot": "", - "snippetName": "tinyGrid", + "snippetName": "TinyTimeLine", "schema": { - "componentName": "TinyGrid", + "componentName": "TinyTimeLine", "props": { - "editConfig": { - "trigger": "click", - "mode": "cell", - "showStatus": true - }, - "columns": [ - { - "type": "index", - "width": 60 - }, - { - "type": "selection", - "width": 60 - }, - { - "field": "employees", - "title": "员工数" - }, - { - "field": "created_date", - "title": "创建日期" - }, - { - "field": "city", - "title": "城市" - } - ], + "active": "2", "data": [ { - "id": "1", - "name": "GFD科技有限公司", - "city": "福州", - "employees": 800, - "created_date": "2014-04-30 00:56:00", - "boole": false + "name": "已下单" }, { - "id": "2", - "name": "WWW科技有限公司", - "city": "深圳", - "employees": 300, - "created_date": "2016-07-08 12:36:22", - "boole": true + "name": "运输中" + }, + { + "name": "已签收" } ] } @@ -14272,46 +22281,50 @@ }, { "name": { - "zh_CN": "分页" + "zh_CN": "面包屑" }, - "icon": "pager", + "icon": "breadcrumb", "screenshot": "", - "snippetName": "TinyPager", + "snippetName": "TinyBreadcrumb", "schema": { - "componentName": "TinyPager", + "componentName": "TinyBreadcrumb", "props": { - "layout": "total, sizes, prev, pager, next", - "total": 100, - "pageSize": 10, - "currentPage": 1 + "options": [ + { + "to": "{ path: '/' }", + "label": "首页" + }, + { + "to": "{ path: '/breadcrumb' }", + "label": "产品" + }, + { + "replace": "true", + "label": "软件" + } + ] } } - } - ] - }, - { - "group": "data-display", - "label": { - "zh_CN": "数据展示类" - }, - "children": [ + }, { "name": { - "zh_CN": "走马灯" + "zh_CN": "标签页" }, + "icon": "tabs", "screenshot": "", - "snippetName": "tiny-carousel", - "icon": "carousel", + "group": true, + "snippetName": "TinyTabs", "schema": { - "componentName": "TinyCarousel", + "componentName": "TinyTabs", "props": { - "height": "180px" + "modelValue": "first" }, "children": [ { - "componentName": "TinyCarouselItem", + "componentName": "TinyTabItem", "props": { - "title": "carousel-item-a" + "title": "标签页1", + "name": "first" }, "children": [ { @@ -14323,9 +22336,10 @@ ] }, { - "componentName": "TinyCarouselItem", + "componentName": "TinyTabItem", "props": { - "title": "carousel-item-b" + "title": "标签页2", + "name": "second" }, "children": [ { @@ -14341,402 +22355,730 @@ }, { "name": { - "zh_CN": "对话框" + "zh_CN": "步骤条" }, + "icon": "steps", "screenshot": "", - "snippetName": "TinyDialogBox", - "icon": "dialogbox", + "snippetName": "TinySteps", "schema": { - "componentName": "TinyDialogBox", + "componentName": "TinySteps", "props": { - "visible": true, - "show-close": true, - "title": "dialogBox title" - }, - "children": [ - { - "componentName": "div" - } - ] + "data": [ + { + "name": "步骤一", + "status": "wait" + }, + { + "name": "步骤二", + "status": "process" + }, + { + "name": "步骤三", + "status": "finish" + } + ], + "active": 1 + } } }, { "name": { - "zh_CN": "折叠面板" + "zh_CN": "树形菜单" }, + "icon": "treemenu", "screenshot": "", - "snippetName": "TinyCollapse", - "icon": "collapse", + "snippetName": "TinyTreeMenu", "schema": { - "componentName": "TinyCollapse", + "componentName": "TinyTreeMenu", "props": { - "modelValue": "collapse1" - }, - "children": [ - { - "componentName": "TinyCollapseItem", - "props": { - "name": "collapse1", - "title": "折叠项1" + "data": [ + { + "id": 1, + "label": "一级节点1", + "children": [ + { + "id": 2, + "label": "二级节点1-1" + }, + { + "id": 3, + "label": "二级节点1-2" + } + ] }, - "children": [ - { - "componentName": "div" - } - ] - }, - { - "componentName": "TinyCollapseItem", - "props": { - "name": "collapse2", - "title": "折叠项2" + { + "id": 4, + "label": "一级节点2" + } + ], + "placeholder": "输入关键字搜索", + "node-key": "id" + } + } + } + ] + }, + { + "group": "chart", + "label": { + "zh_CN": "图表类型" + }, + "children": [ + { + "name": { + "zh_CN": "折线图" + }, + "icon": "line", + "screenshot": "", + "snippetName": "TinyHuichartsLine", + "schema": { + "componentName": "TinyHuichartsLine", + "props": { + "options": { + "theme": "hdesign-light", + "padding": [ + 50, + 30, + 50, + 20 + ], + "legend": { + "show": true, + "icon": "line" }, - "children": [ + "data": [ { - "componentName": "div" - } - ] - }, - { - "componentName": "TinyCollapseItem", - "props": { - "name": "collapse3", - "title": "折叠项3" - }, - "children": [ + "Month": "Jan", + "Domestics": 33, + "Abroad": 37 + }, { - "componentName": "div" + "Month": "Feb", + "Domestics": 27, + "Abroad": 39 + }, + { + "Month": "Mar", + "Domestics": 31, + "Abroad": 20 + }, + { + "Month": "Apr", + "Domestics": 30, + "Abroad": 15 + }, + { + "Month": "May", + "Domestics": 37, + "Abroad": 13 + }, + { + "Month": "Jun", + "Domestics": 36, + "Abroad": 17 + }, + { + "Month": "Jul", + "Domestics": 42, + "Abroad": 22 + }, + { + "Month": "Aug", + "Domestics": 22, + "Abroad": 12 + }, + { + "Month": "Sep", + "Domestics": 17, + "Abroad": 30 + }, + { + "Month": "Oct", + "Domestics": 40, + "Abroad": 33 + }, + { + "Month": "Nov", + "Domestics": 42, + "Abroad": 22 + }, + { + "Month": "Dec", + "Domestics": 32, + "Abroad": 11 } - ] + ], + "xAxis": { + "data": "Month" + }, + "yAxis": { + "name": "Percentage(%)" + } } - ] + } } }, { "name": { - "zh_CN": "弹出编辑" + "zh_CN": "柱状图" }, - "icon": "popeditor", + "icon": "histogram", "screenshot": "", - "snippetName": "TinyPopeditor", + "snippetName": "TinyHuichartsHistogram", "schema": { - "componentName": "TinyPopeditor", + "componentName": "TinyHuichartsHistogram", "props": { - "modelValue": "", - "placeholder": "请选择", - "grid-op": { - "columns": [ + "options": { + "theme": "hdesign-light", + "padding": [ + 50, + 30, + 50, + 20 + ], + "data": [ { - "field": "id", - "title": "ID", - "width": 40 + "Month": "Jan", + "Domestic": 33, + "Abroad": 1 }, { - "field": "name", - "title": "名称", - "showOverflow": "tooltip" + "Month": "Feb", + "Domestic": 27, + "Abroad": 39 }, { - "field": "province", - "title": "省份", - "width": 80 + "Month": "Mar", + "Domestic": 31, + "Abroad": 20 }, { - "field": "city", - "title": "城市", - "width": 80 + "Month": "Apr", + "Domestic": 30, + "Abroad": 15 + }, + { + "Month": "May", + "Domestic": 37, + "Abroad": 1 + }, + { + "Month": "Jun", + "Domestic": 36, + "Abroad": 17 + }, + { + "Month": "Jul", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Aug", + "Domestic": 22, + "Abroad": 12 + }, + { + "Month": "Sep", + "Domestic": 17, + "Abroad": 30 + }, + { + "Month": "Oct", + "Domestic": 40, + "Abroad": 33 + }, + { + "Month": "Nov", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Dec", + "Domestic": 32, + "Abroad": 1 } ], + "xAxis": { + "data": "Month" + }, + "yAxis": { + "name": "Percentage(%)" + } + } + } + } + }, + { + "name": { + "zh_CN": "条形图" + }, + "icon": "bar", + "screenshot": "", + "snippetName": "TinyHuichartsBar", + "schema": { + "componentName": "TinyHuichartsBar", + "props": { + "options": { + "theme": "hdesign-light", + "padding": [ + 50, + 30, + 50, + 20 + ], "data": [ { - "id": "1", - "name": "GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司", - "city": "福州", - "province": "福建" + "Month": "Jan", + "Domestic": 33, + "Abroad": 1 }, { - "id": "2", - "name": "WWW科技有限公司", - "city": "深圳", - "province": "广东" + "Month": "Feb", + "Domestic": 27, + "Abroad": 39 }, { - "id": "3", - "name": "RFV有限责任公司", - "city": "中山", - "province": "广东" + "Month": "Mar", + "Domestic": 31, + "Abroad": 20 }, { - "id": "4", - "name": "TGB科技有限公司", - "city": "龙岩", - "province": "福建" + "Month": "Apr", + "Domestic": 30, + "Abroad": 15 }, { - "id": "5", - "name": "YHN科技有限公司", - "city": "韶关", - "province": "广东" + "Month": "May", + "Domestic": 37, + "Abroad": 1 }, { - "id": "6", - "name": "WSX科技有限公司", - "city": "黄冈", - "province": "武汉" + "Month": "Jun", + "Domestic": 36, + "Abroad": 17 + }, + { + "Month": "Jul", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Aug", + "Domestic": 22, + "Abroad": 12 + }, + { + "Month": "Sep", + "Domestic": 17, + "Abroad": 30 + }, + { + "Month": "Oct", + "Domestic": 40, + "Abroad": 33 + }, + { + "Month": "Nov", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Dec", + "Domestic": 32, + "Abroad": 1 } - ] + ], + "xAxis": { + "data": "Month" + }, + "yAxis": { + "name": "Percentage(%)" + }, + "direction": "horizontal" } } } }, { "name": { - "zh_CN": "树" + "zh_CN": "圆盘图" }, - "icon": "tree", + "icon": "pie", "screenshot": "", - "snippetName": "TinyTree", + "snippetName": "TinyHuichartsPie", "schema": { - "componentName": "TinyTree", + "componentName": "TinyHuichartsPie", "props": { - "data": [ - { - "label": "一级 1", - "children": [ - { - "label": "二级 1-1", - "children": [ - { - "label": "三级 1-1-1" - } - ] - } - ] - }, - { - "label": "一级 2", - "children": [ - { - "label": "二级 2-1", - "children": [ - { - "label": "三级 2-1-1" - } + "options": { + "type": "pie", + "theme": "hdesign-light", + "label": { + "show": true, + "line": true, + "labelHtml": "{a|}{b|{b}:}{c|{d}%}", + "rich": { + "a": { + "width": 12, + "height": 12, + "backgroundColor": { + "image": "./image/charts/pie/ic_jiantou_hong.svg" + } + }, + "b": { + "padding": [ + 2, + 4, + 0, + 0 ] }, - { - "label": "二级 2-2", - "children": [ - { - "label": "三级 2-2-1" - } + "c": { + "fontWeight": "bold", + "padding": [ + 2, + 0, + 0, + 0 ] } - ] - } - ] + } + }, + "data": [ + { + "value": 100, + "name": "VPC" + }, + { + "value": 90, + "name": "IM" + }, + { + "value": 49, + "name": "EIP" + }, + { + "value": 14, + "name": "SG" + } + ] + } } } }, { "name": { - "zh_CN": "文字提示框" + "zh_CN": "环形图" }, - "icon": "tooltip", + "icon": "ring", "screenshot": "", - "snippetName": "TinyTooltip", + "snippetName": "TinyHuichartsRing", "schema": { - "componentName": "TinyTooltip", + "componentName": "TinyHuichartsRing", "props": { - "content": "Top Left 提示文字", - "placement": "top-start", - "manual": true, - "modelValue": true - }, - "children": [ - { - "componentName": "span", - "children": [ + "options": { + "theme": "hdesign-light", + "type": "circle", + "data": [ { - "componentName": "div", - "props": {} - } - ] - }, - { - "componentName": "Template", - "props": { - "slot": "content" - }, - "children": [ + "value": 100, + "name": "VPC" + }, { - "componentName": "span", - "children": [ - { - "componentName": "div", - "props": { - "placeholder": "提示内容" - } - } - ] + "value": 90, + "name": "IM" + }, + { + "value": 49, + "name": "EIP" + }, + { + "value": 14, + "name": "SG" } ] } - ] + } } }, { "name": { - "zh_CN": "提示框" + "zh_CN": "雷达图" }, - "icon": "popover", + "icon": "radar", "screenshot": "", - "snippetName": "TinyPopover", + "snippetName": "TinyHuichartsRadar", "schema": { - "componentName": "TinyPopover", + "componentName": "TinyHuichartsRadar", "props": { - "width": 200, - "title": "弹框标题", - "trigger": "manual", - "modelValue": true - }, - "children": [ - { - "componentName": "Template", - "props": { - "slot": "reference" - }, - "children": [ - { - "componentName": "div", - "props": { - "placeholder": "触发源" - } - } - ] - }, - { - "componentName": "Template", - "props": { - "slot": "default" - }, - "children": [ - { - "componentName": "div", - "props": { - "placeholder": "提示内容" - } + "options": { + "theme": "hdesign-light", + "legend": { + "show": true, + "position": { + "left": "center", + "bottom": 20.1 + } + }, + "radarMax": 100, + "data": { + "Domestic": { + "Equipment": 41, + "VM": 91, + "CSP": 81, + "RD": 51, + "Markets": 71 + }, + "Abroad": { + "Equipment": 72, + "VM": 55, + "CSP": 93, + "RD": 90, + "Markets": 82 } - ] + } } - ] + } } - } - ] - }, - { - "group": "navigation", - "label": { - "zh_CN": "导航类型" - }, - "children": [ + }, { "name": { - "zh_CN": "时间线" + "zh_CN": "瀑布图" }, - "icon": "timeline", + "icon": "waterfall", "screenshot": "", - "snippetName": "TinyTimeLine", + "snippetName": "TinyHuichartsWaterfall", "schema": { - "componentName": "TinyTimeLine", + "componentName": "TinyHuichartsWaterfall", "props": { - "active": "2", - "data": [ - { - "name": "已下单" + "options": { + "padding": [ + 50, + 30, + 20, + 20 + ], + "legend": { + "show": false }, - { - "name": "运输中" + "type": "water-fall", + "data": [ + { + "Name": "NLE", + "User": 10 + }, + { + "Name": "HIN", + "User": 20 + }, + { + "Name": "FBP", + "User": 9 + }, + { + "Name": "VEDIO", + "User": 35 + }, + { + "Name": "SASS", + "User": 20 + }, + { + "Name": "RDS", + "User": 35 + }, + { + "Name": "E-SYS", + "User": 9 + } + ], + "xAxis": { + "data": "Name" }, - { - "name": "已签收" + "yAxis": { + "name": "Number" } - ] + } } } }, { "name": { - "zh_CN": "面包屑" + "zh_CN": "漏斗图" }, - "icon": "breadcrumb", + "icon": "funnel", "screenshot": "", - "snippetName": "TinyBreadcrumb", + "snippetName": "TinyHuichartsFunnel", "schema": { - "componentName": "TinyBreadcrumb", + "componentName": "TinyHuichartsFunnel", "props": { - "options": [ - { - "to": "{ path: '/' }", - "label": "首页" - }, - { - "to": "{ path: '/breadcrumb' }", - "label": "产品" - }, - { - "replace": "true", - "label": "软件" - } - ] + "options": { + "data": [ + { + "value": 100, + "name": "Show" + }, + { + "value": 75, + "name": "Click" + }, + { + "value": 50, + "name": "Visit" + }, + { + "value": 25, + "name": "Order" + } + ] + } } } }, { "name": { - "zh_CN": "标签页" + "zh_CN": "散点图" }, - "icon": "tabs", + "icon": "scatter", "screenshot": "", - "group": true, - "snippetName": "TinyTabs", + "snippetName": "TinyHuichartsScatter", "schema": { - "componentName": "TinyTabs", + "componentName": "TinyHuichartsScatter", "props": { - "modelValue": "first" - }, - "children": [ - { - "componentName": "TinyTabItem", - "props": { - "title": "标签页1", - "name": "first" - }, - "children": [ - { - "componentName": "div", - "props": { - "style": "margin:10px 0 0 30px" - } + "options": { + "padding": [ + 50, + 30, + 50, + 20 + ], + "legend": { + "orient": "horizontal", + "show": true, + "position": { + "left": "center", + "bottom": 15 } - ] - }, - { - "componentName": "TinyTabItem", - "props": { - "title": "标签页2", - "name": "second" }, - "children": [ - { - "componentName": "div", - "props": { - "style": "margin:10px 0 0 30px" - } - } - ] + "bubbleSize": [ + 20, + 100 + ], + "xAxisType": "value", + "data": { + "1990": [ + [ + 28604, + 77, + 1709866, + "Australia", + 1990 + ], + [ + 31163, + 77.4, + 27662440, + "Canada", + 1990 + ], + [ + 60001, + 68, + 1154605773, + "China", + 1990 + ], + [ + 13670, + 74.7, + 10582082, + "Cuba", + 1990 + ], + [ + 28599, + 75, + 4986705, + "Finland", + 1990 + ] + ], + "2000": [ + [ + 19349, + 69.6, + 147568552, + "Russia", + 2000 + ], + [ + 10670, + 67.3, + 53994606, + "Turkey", + 2000 + ], + [ + 26424, + 75.7, + 57110117, + "United Kingdom", + 2000 + ], + [ + 37062, + 75.4, + 252847810, + "United States", + 2000 + ], + [ + 23038, + 73.13, + 143456918, + "Russia", + 2000 + ] + ], + "2015": [ + [ + 44056, + 81.8, + 23968976, + "Australia", + 2015 + ], + [ + 43294, + 81.7, + 35939927, + "Canada", + 2015 + ], + [ + 13334, + 76.9, + 1376048943, + "Cuba", + 2015 + ], + [ + 21291, + 78.5, + 11389566, + "Finland", + 2015 + ], + [ + 38923, + 80.8, + 5503457, + "France", + 2015 + ] + ] + } } - ] + } } } ] @@ -14918,6 +23260,13 @@ } ], "packages": [ + { + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "destructuring": true, + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, { "name": "TinyVue组件库", "package": "@opentiny/vue", @@ -14937,4 +23286,4 @@ ] } } -} +} \ No newline at end of file diff --git a/designer-demo/registry.js b/designer-demo/registry.js index 23d7d0c824..bf89228632 100644 --- a/designer-demo/registry.js +++ b/designer-demo/registry.js @@ -13,6 +13,9 @@ import { META_SERVICE, META_APP } from '@opentiny/tiny-engine-meta-register' import engineConfig from './engine.config' import { HttpService } from './src/composable' +const baseURL = import.meta.env.BASE_URL || '.' +const baseURLWithoutSlash = baseURL.replace(/\/$/, '') + export default { [META_SERVICE.Http]: HttpService, 'engine.config': { @@ -43,5 +46,12 @@ export default { } } } + }, + [META_APP.Preview]: { + options: { + // 配置预览跳转的 url:根据实际业务需求进行配置 + // 文档:https://opentiny.design/tiny-engine#/help-center/course/dev/preview-api + previewUrl: ['prod', 'alpha'].includes(import.meta.env.MODE) ? `${baseURLWithoutSlash}/preview.html` : '' + } } } diff --git a/designer-demo/src/composable/http/index.js b/designer-demo/src/composable/http/index.js index f11538395a..141c885c7b 100644 --- a/designer-demo/src/composable/http/index.js +++ b/designer-demo/src/composable/http/index.js @@ -16,6 +16,7 @@ const procession = { let loginVM = null const showError = (url, message) => { + if (message === 'canceled') return // 取消请求场景不报错 globalNotify({ type: 'error', title: '接口报错', @@ -46,7 +47,7 @@ const preResponse = (res) => { return Promise.reject(res.data.error) } - return res.data?.data + return res.data?.data || res.data } const openLogin = () => { diff --git a/designer-demo/src/preview.js b/designer-demo/src/preview.js index 47c726cc88..c35f036f65 100644 --- a/designer-demo/src/preview.js +++ b/designer-demo/src/preview.js @@ -10,6 +10,7 @@ * */ import { defineEntry } from '@opentiny/tiny-engine-meta-register' +import engineConfig from '../engine.config' import 'virtual:svg-icons-register' async function startApp() { @@ -23,9 +24,7 @@ async function startApp() { const registry = { [META_SERVICE.Http]: HttpService, 'engine.config': { - id: 'engine.config', - theme: 'light', - material: ['/mock/bundle.json'] + ...engineConfig } } diff --git a/docs/README.md b/docs/README.md index 0a6c9a6fbd..ca958736c8 100644 --- a/docs/README.md +++ b/docs/README.md @@ -50,6 +50,7 @@ - [更新日志](./changelog/changelog.md) - [v2.7升级指南](./changelog/v2.7-upgrade-guide.md) - 解决方案 + - [前端及Java服务端docker部署](./solutions/front-backend-docker-deployment.md) - [Java服务端部署](./solutions/server-deployment-solution-java.md) - [Node.js服务端部署](./solutions/server-deployment-solution.md) - [区块发布方案(Node.js服务端)](./solutions/block-release-solution.md) diff --git a/docs/advanced-features/imgs/ai-assistant-chat.png b/docs/advanced-features/imgs/ai-assistant-chat.png new file mode 100644 index 0000000000..254d79e035 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-chat.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-enable-mcp-tools.png b/docs/advanced-features/imgs/ai-assistant-enable-mcp-tools.png new file mode 100644 index 0000000000..5b99aa1285 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-enable-mcp-tools.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-fullscreen.png b/docs/advanced-features/imgs/ai-assistant-fullscreen.png new file mode 100644 index 0000000000..b1109fe874 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-fullscreen.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-image-to-page.png b/docs/advanced-features/imgs/ai-assistant-image-to-page.png new file mode 100644 index 0000000000..599f571fbe Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-image-to-page.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-interface.png b/docs/advanced-features/imgs/ai-assistant-interface.png new file mode 100644 index 0000000000..bed41328b0 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-interface.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-mcp-tools-management.png b/docs/advanced-features/imgs/ai-assistant-mcp-tools-management.png new file mode 100644 index 0000000000..767db48f48 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-mcp-tools-management.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-open.png b/docs/advanced-features/imgs/ai-assistant-open.png new file mode 100644 index 0000000000..c84d4ece3a Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-open.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-prompts.png b/docs/advanced-features/imgs/ai-assistant-prompts.png new file mode 100644 index 0000000000..5ad998edbd Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-prompts.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-session-management.png b/docs/advanced-features/imgs/ai-assistant-session-management.png new file mode 100644 index 0000000000..f0f51200c5 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-session-management.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-setting-select-model.png b/docs/advanced-features/imgs/ai-assistant-setting-select-model.png new file mode 100644 index 0000000000..4dd2d5d722 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-setting-select-model.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-settings.png b/docs/advanced-features/imgs/ai-assistant-settings.png new file mode 100644 index 0000000000..be25158010 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-settings.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-text-to-page.png b/docs/advanced-features/imgs/ai-assistant-text-to-page.png new file mode 100644 index 0000000000..4979762e0b Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-text-to-page.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-tool-execution-process.png b/docs/advanced-features/imgs/ai-assistant-tool-execution-process.png new file mode 100644 index 0000000000..26256e2bb8 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-tool-execution-process.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-tool-execution1.png b/docs/advanced-features/imgs/ai-assistant-tool-execution1.png new file mode 100644 index 0000000000..68a9ed28ad Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-tool-execution1.png differ diff --git a/docs/advanced-features/imgs/ai-assistant-tool-execution2.png b/docs/advanced-features/imgs/ai-assistant-tool-execution2.png new file mode 100644 index 0000000000..d41191b125 Binary files /dev/null and b/docs/advanced-features/imgs/ai-assistant-tool-execution2.png differ diff --git a/docs/advanced-features/imgs/use-function.png b/docs/advanced-features/imgs/use-function.png new file mode 100644 index 0000000000..77e98411cb Binary files /dev/null and b/docs/advanced-features/imgs/use-function.png differ diff --git a/docs/advanced-features/loop-rendering.md b/docs/advanced-features/loop-rendering.md index d78e66d8c0..86a9a8db00 100644 --- a/docs/advanced-features/loop-rendering.md +++ b/docs/advanced-features/loop-rendering.md @@ -10,7 +10,7 @@ ![addVar-17](./imgs/addVar-17.png) 3. 选中组件,在组件属性设置面板选择“高级”。 -4. 单击“循环数据“后的![](figures/icon-code.png),进行变量绑定。 +4. 单击“循环数据“后的![](./imgs/icon-code.png),进行变量绑定。 5. 选择绑定的变量,单击“确定”。 **图 2** 绑定变量 diff --git a/docs/advanced-features/new-ai-plugin-usage.md b/docs/advanced-features/new-ai-plugin-usage.md new file mode 100644 index 0000000000..bb346270c4 --- /dev/null +++ b/docs/advanced-features/new-ai-plugin-usage.md @@ -0,0 +1,568 @@ +# TinyEngine AI 插件使用指南 + +随着 TinyEngine 低代码平台的不断升级,AI 插件迎来了全面升级。新版 AI 插件集成了现代化的聊天界面,提供 Agent 模式和 Chat 模式,支持上传图片生成页面,支持 MCP(Model Context Protocol)工具调用能力,让 AI 辅助开发更加智能、强大。 + +## 一、功能概览 + +新版 AI 插件具备以下核心功能: + +### 1.1 全新 Agent 智能搭建模式,支持模式切换 + +**Agent 模式(智能搭建)** + +- 支持上传图片或自然语言搭建页面 +- 流式页面渲染,实时看到页面效果 +- 通过对话创建组件、调整样式、修改属性 +- 适合页面搭建、界面调整等场景 + +**Chat 模式(智能对话)** + +- 传统问答式交互体验 +- 支持代码生成、文档编写、技术咨询 +- 支持调用平台 MCP 工具完成特定任务 + +### 1.2 核心特性 + +- **现代化界面**:全新的聊天界面,支持 Markdown 渲染、代码高亮 +- **智能工具调用**:可以调用平台各种工具,如创建页面、修改组件等 +- **思考模式**:支持推理模型的深度思考,提供更准确的解决方案 +- **多模型支持**:兼容各种主流 AI 模型 +- **会话管理**:支持多个对话会话,自动保存历史记录 + +## 二、界面介绍 + +### 2.1 主界面 + +在编辑器界面右上角插件栏,您可以看到 AI 助手的图标。点击图标即可打开主界面对话窗口。 + +![打开AI助手](./imgs/ai-assistant-open.png) + +主界面包含以下元素: + +- **顶部工具栏**:包含设置模型、会话管理、全屏切换等功能 +- **欢迎区域**:显示 AI 助手的欢迎信息 +- **提示项**:快速开始的常用问题示例 +- **对话区域**:显示用户与 AI 的对话历史 +- **输入区域**:用户输入问题区域、上传文件区域,同时包含模式切换、MCP 工具、深度思考等按钮 + +![AI插件主界面](./imgs/ai-assistant-interface.png) + +### 2.2 模式切换 + +新版 AI 插件支持两种工作模式: + +#### Agent 模式(默认) + +- **文件上传**:支持上传图片生成页面 +- **智能页面搭建**:AI 可以直接修改页面 Schema,实时更新画布 +- **实时预览**:修改即时生效,无需手动刷新 +- **适用场景**:页面搭建、组件配置、样式调整等 + +#### Chat 模式 + +- **对话交互**:传统的问答式对话体验 +- **工具调用**:支持调用 MCP 工具完成特定任务 +- **适用场景**:咨询问答、代码生成、文档编写等 + +可以通过底部的模式切换按钮在两种模式间切换。 + +### 2.3 MCP 工具管理 + +![MCP工具管理](./imgs/ai-assistant-mcp-tools-management.png) + +MCP 工具管理面板允许用户: + +- 查看启用的 MCP 服务器 +- 启用/禁用特定的 MCP 工具 + +### 2.4 深度思考 + +启用推理模型的深度思考功能,AI 会自动进行深度思考,提供更准确的解决方案。 + +### 2.5 模型设置面板 + +点击顶部的设置图标,可以进入设置面板,包含以下两个配置页签: + +#### 模型选择 + +- **默认助手模型**:选择 AI 对话使用的主模型,支持按服务商筛选。模型列表会标注能力标签(工具调用、视觉理解) +- **快速模型**:用于代码补全、话题命名等场景,建议选择轻量模型(如 flash 类型或 8b/14b 模型)以获得更快响应 +- 选择模型后会显示当前模型所属的服务名称及 API Key 配置状态 + ![AI设置面板](./imgs/ai-assistant-setting-select-model.png) + +#### 模型服务 + +- **查看服务列表**:展示所有已配置的模型服务,包含 Base URL、模型数量、API Key 状态 +- **配置内置服务**:为内置服务(如 OpenAI、DeepSeek 等)配置 API Key +- **添加自定义服务**:支持添加兼容 OpenAI 格式的自定义模型服务,需配置: + - **服务名称**:自定义的服务标识 + - **Base URL**:API 地址(支持末尾缺省`/chat/completions`,`#`结尾强制使用输入地址) + - **API Key**:访问认证信息 + - **模型配置**:添加一个或多个模型,设置模型名称、显示名称及能力(工具调用、视觉理解、快速模型) +- **编辑/删除服务**:可编辑自定义服务的全部配置,或删除自定义服务 + +![AI设置面板](./imgs/ai-assistant-settings.png) + +**注意**:切换 AI 模型会开启新的会话;若选择的模型未配置 API Key,会提示前往模型服务页签进行配置。 + +### 2.6 会话管理 + +![会话管理](./imgs/ai-assistant-session-management.png) +用户会话会保存到浏览器缓存中,点击顶部的会话管理图标可以查看当前会话历史 + +会话管理面板允许用户: + +- 查看当前会话历史 +- 点击会话可以切换当前会话(图标区分 Agent 与 Chat 模式) +- 删除特定的会话 + +## 三、快速开始 + +### 3.1 打开 AI 插件 + +在 TinyEngine 编辑器界面左下角插件栏,点击 AI 助手图标即可打开对话窗口。 + +### 3.2 首次配置 + +首次使用时,需要进行简单配置: + +1. **选择 AI 模型**:点击右上角设置按钮,选择合适的 AI 模型 +2. **配置 API Token**:输入对应 AI 服务的 API 密钥 +3. **选择工作模式**:根据需要选择 Agent 模式或 Chat 模式 + +### 3.3 开始使用 + +配置完成后,您可以: + +- **直接对话**:在输入框中输入问题,按回车发送 +- **使用提示**:点击界面上的快速提示开始对话 +- **上传文件**:在 Agent 模式下可以上传图片生成页面 +- **切换模式**:随时在 Agent 和 Chat 模式间切换 + +### 3.4 进阶配置(可选) + +对于开发者,可以进行更多自定义配置: +通过在注册表中添加 options 配置项,可以配置 AI 模型、上下文功能开关等。 + +```javascript +// registry.js +export default { + // ...... + [META_APP.Robot]: { + options: { + // enableResourceContext: false, // 提示词上下文携带资源插件图片,默认true + // enableRagContext: true, // 提示词上下文携带查询到的知识库内容,默认false + // customCompatibleAIModels: [] // 自定义AI模型(OpenAI兼容格式) + } + } + // ...... +} +``` + +#### 自定义 AI 模型 + +```javascript +// 在项目配置中添加OpenAI兼容格式自定义模型,也支持删除内置模型服务和模型 +customCompatibleAIModels: [ + // ==================== 示例 1:删除整个服务 ==================== + // 删除 DeepSeek 服务 + { + provider: 'deepseek', + _remove: true + }, + + // ==================== 示例 2:修改现有服务 ==================== + // 修改阿里云百炼服务:删除部分模型 + 添加新模型 + 覆盖配置 + { + provider: 'qwen', + // 可选:修改服务的显示名称 + label: '阿里云百炼 (自定义)', + // 可选:修改服务的 baseUrl + // baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1', + models: [ + // 删除不需要的模型 + { name: 'qwen-turbo', _remove: true }, + { name: 'qwen-plus', _remove: true }, + + // 添加新模型 + { + label: 'Qwen Max', + name: 'qwen-max', + capabilities: { + toolCalling: true, + vision: true, + reasoning: true + } + }, + + // 覆盖已有模型的配置 + { + label: 'Qwen2.5-72B (推荐)', + name: 'qwen2.5-72b-instruct', + capabilities: { + toolCalling: true, + vision: false, + reasoning: false, + compact: false + } + } + ] + }, + + // ==================== 示例 3:添加全新的 OpenAI 服务 ==================== + { + provider: 'openai', // AI模型提供商 + label: 'OpenAI', // AI模型名称 + baseUrl: 'https://api.openai.com/v1', // AI模型API地址 + allowEmptyApiKey: false, // 是否允许API Token为空 + models: [ + { + label: 'GPT-4o', // AI模型名称 + name: 'gpt-4o', // AI模型名称 + capabilities: { + toolCalling: true, // 是否支持工具调用 + vision: true, // 是否支持视觉理解 + reasoning: true // 是否支持推理 + } + }, + { + label: 'GPT-4o Mini', + name: 'gpt-4o-mini', + capabilities: { + toolCalling: true, + vision: true, + compact: true + } + }, + { + label: 'o1-preview', + name: 'o1-preview', + capabilities: { + toolCalling: false, + vision: false, + reasoning: true + } + } + ] + } +] +``` + +#### 自定义 Agent 模式上下文功能 + +- enableResourceContext: 该参数配置是否在提示词上下文携带资源插件图片,AI 会在生成的页面中自动匹配合适的图片资源,默认开启 +- enableRagContext: 该参数配置是否在提示词上下文携带查询到的知识库内容,可以根据场景在后端知识库中添加文档知识,以优化 AI 的生成效果,默认关闭 + +#### 其他配置 + +- encryptServiceApiKey: 该参数配置是否加密服务 API 密钥 +- modeImplementation: 该参数配置 Agent 模式/Chat 模式的实现,支持自定义 Agent 模式/Chat 模式的实现 + +#### 本地开发代理(可选) + +```javascript +// vite.config.js - 用于本地开发调试 +proxy: { + '/app-center/api/chat/completions': { + target: 'https://api.deepseek.com', + changeOrigin: true, + rewrite: path => path.replace('/app-center/api/chat/completions', '/v1/chat/completions') + }, + '/app-center/api/ai/chat': { + target: 'https://api.deepseek.com', + changeOrigin: true, + rewrite: path => path.replace('/app-center/api/ai/chat', '/v1/chat/completions') + } +} +``` + +## 四、开始对话 + +### 4.1 Agent 模式 + +图片生成页面: +首先切换到 Agent 模式,然后点击上传图片按钮,上传您想要生成页面的图片。 + +![图片生成页面](./imgs/ai-assistant-image-to-page.png) + +自然语言生成页面: +切换到 Agent 模式,然后直接在输入框中输入您想要生成页面的描述,AI 会根据您的描述生成页面。 + +![自然语言生成页面](./imgs/ai-assistant-text-to-page.png) + +### 4.2 Chat 模式 + +Chat 模式支持传统的问答式交互体验,AI 会根据您的问题提供答案。同时支持调用 MCP 工具完成特定任务。 + +![Chat模式](./imgs/ai-assistant-chat.png) + +## 五、MCP 工具使用 + +### 5.1 什么是 MCP 工具 + +MCP(Model Context Protocol)工具让 AI 能够调用平台的各种功能,实现真正的智能操作: + +- **页面管理**:创建、删除、修改页面 +- **组件操作**:添加、配置、调整组件 +- **样式设置**:修改 CSS 样式和布局 +- **数据查询**:获取项目信息、页面列表等 +- **资源管理**:处理图片、文件等资源 + +### 5.2 如何启用工具 + +1. **打开工具面板**:点击输入框旁的"MCP"按钮 +2. **查看可用工具**:浏览平台提供的各种工具 +3. **启用所需工具**:勾选您需要使用的工具 +4. **开始使用**:AI 会在需要时自动调用这些工具 + +![MCP工具管理面板](./imgs/ai-assistant-mcp-tools-management.png) + +### 5.3 工具调用示例 + +AI 会根据您的需求自动选择和调用合适的工具: + +**示例对话:** + +``` +用户:帮我查看当前项目有哪些页面 +AI:我来为您查询项目中的页面信息... +[自动调用页面查询工具] +AI:当前项目包含以下页面:首页、用户管理、设置页面... +``` + +**工具执行过程:** + +- 🔄 AI 识别需求并选择工具 +- ⚙️ 自动调用相应的平台功能 +- 📊 展示执行结果和详细信息 +- ✅ 可展开查看调用参数和返回值 + +![工具调用过程示例](./imgs/ai-assistant-tool-execution-process.png) + +## 六、典型使用场景 + +### 6.1 Agent 模式 - 智能页面搭建 + +Agent 模式让您可以通过对话直接操作页面,实时看到效果。 + +#### 创建新组件 + +``` +用户:在页面中添加一个用户信息表单,包含姓名、邮箱、手机号字段 +AI:页面正在生成中,请稍等片刻... +[实时更新页面布局] +[完成后插件界面会更新提示和状态] +``` + +#### 修改组件属性 + +``` +用户:将页面中的按钮文字改为"提交表单",颜色设为主色 +AI:页面正在生成中,请稍等片刻... +[实时更新页面布局] +[完成后插件界面会更新提示和状态] +``` + +#### 调整布局和样式 + +``` +用户:调整表单布局,让字段按两列显示,添加一些间距 +AI:页面正在生成中,请稍等片刻... +[实时更新页面布局] +[完成后插件界面会更新提示和状态] +``` + +### 6.2 Chat 模式 - 智能对话交互 + +Chat 模式适合传统的问答式交互和工具调用。 + +#### 代码生成和解释 + +``` +用户:帮我写一个 Vue3 的表单验证组件 +AI:我来为您创建一个Vue3表单验证组件... +[返回完整的Vue3组件代码和使用说明] +``` + +#### MCP 工具调用 + +``` +用户:查询当前项目的所有页面 +AI:我来查询项目中的页面信息... +[调用MCP工具获取页面列表] +AI:当前项目包含以下页面:... +``` + +### 6.3 思考模式 - 深度推理 + +对于支持推理能力的模型(如 DeepSeek Reasoner),可以启用思考模式: + +``` +用户:设计一个复杂的电商购物车页面,需要考虑用户体验和性能优化 +AI:[开始深度思考] +让我仔细分析这个需求... +首先,电商购物车页面需要考虑以下几个方面: +1. 用户体验方面... +2. 性能优化方面... +3. 功能设计方面... +[经过深度思考后提供详细的设计方案] +[最后AI会提供一个完整的页面设计,包括组件、布局、样式等] +``` + +## 七、实用功能 + +### 7.1 会话管理 + +- **多会话支持**:可以同时进行多个不同主题的对话 +- **历史记录**:自动保存所有对话内容,随时查看 +- **智能标题**:根据对话内容自动生成有意义的标题 +- **快速搜索**:在历史对话中快速找到需要的内容 + +### 7.2 工具调用 + +- **自动识别**:AI 会根据您的需求自动选择合适的工具 +- **可视化结果**:工具执行结果以易读的方式展示 +- **操作记录**:清晰记录每个工具的调用过程和参数 +- **错误重试**:当工具执行失败时,可以重新尝试 + +### 7.3 智能提示 + +- **快速开始**:提供常用场景的示例问题,点击即可使用 +- **上下文提示**:根据当前页面情况提供相关建议 +- **功能引导**:帮助新用户快速上手各项功能 + +### 7.4 界面体验 + +- **富文本支持**:支持 Markdown 格式,可以显示表格、列表、代码等 +- **代码高亮**:自动识别并高亮显示各种编程语言 +- **全屏模式**:可以将对话窗口放大到全屏,获得更好的使用体验 + +![AI插件全屏模式](./imgs/ai-assistant-fullscreen.png) + +## 八、注意事项 + +### 8.1 使用前准备 + +1. **保存提醒**:在使用 Agent 模式修改页面前,请确保当前页面已保存 +2. **网络要求**:需要稳定的网络连接支持流式数据传输 +3. **API 配置**:确保正确配置了 AI 模型的 API Token 和基础 URL +4. **浏览器兼容性**:建议使用现代浏览器,支持最新的 Web 标准 + +### 8.2 模式选择建议 + +- **Agent 模式**:适用于页面搭建、组件修改、样式调整等直接操作场景 +- **Chat 模式**:适用于咨询问答、代码生成、文档编写等对话场景 +- **思考模式**:仅在使用支持推理的模型时启用,会增加响应时间 + +### 8.3 性能优化 + +- **消息历史**:定期清理过多的对话历史以保持性能 +- **流式处理**:在网络较慢时可能出现延迟,属于正常现象 +- **工具调用**:复杂的工具调用可能需要较长时间,请耐心等待 + +## 九、故障排除 + +### 9.1 连接问题 + +**现象**:无法连接 AI 服务或请求超时 + +**解决方案**: + +- 检查网络连接是否稳定 +- 确认 API Token 和基础 URL 配置正确 +- 检查代理配置是否正确(本地开发环境) +- 查看控制台网络请求错误信息 + +### 9.2 Agent 模式问题 + +**现象**:页面更新失败或显示异常 + +**解决方案**: + +- 检查当前页面是否已保存 +- 确认页面格式正确 +- 查看控制台错误信息 +- 尝试新建会话并创建新空白页面再重试 + +### 9.3 MCP 工具问题 + +**现象**:MCP 工具无法调用或调用失败 + +**解决方案**: + +- 检查 MCP 工具管理面板中的工具状态 +- 查看控制台 MCP 服务错误信息 +- 尝试重新启用对应的工具 + +### 9.4 性能问题 + +**现象**:界面卡顿或响应缓慢 + +**解决方案**: + +- 清理过多的对话历史 +- 关闭不必要的浏览器标签页 +- 检查浏览器内存使用情况 +- 尝试刷新页面或重启浏览器 + +### 9.5 紧急恢复 + +如果遇到严重问题,可以尝试以下步骤: + +1. **清除缓存**:清除浏览器缓存和 LocalStorage +2. **重置配置**:在设置面板中重新配置 AI 模型 +3. **重启服务**:重启开发服务器(本地开发环境) +4. **联系支持**:如问题依然存在,请在[GitHub](https://github.com/opentiny/tiny-engine/issues)提交问题 + +## 十、总结 + +### 10.1 为什么选择新版 AI 插件 + +新版 AI 插件相比以往版本带来了显著改进: + +**更强大的功能** + +- 多模态支持,支持上传图片或者自然语言搭建页面 +- 双模式设计满足不同使用需求:既可以直接搭建页面,也可以进行技术咨询 +- 智能工具调用让 AI 能够实际操作平台功能,而不仅仅是对话 +- 思考模式提供更深入的分析和解决方案 + +**更好的体验** + +- 现代化的界面设计,支持富文本显示和代码高亮 +- 实时响应,无需等待,边说边看到结果 +- 完善的会话管理,不用担心丢失重要对话 + +**更简单的使用** + +- 无需复杂配置,开箱即用 +- 智能提示帮助快速上手 +- 支持多种 AI 模型,灵活选择 + +### 10.2 实际价值 + +使用新版 AI 插件,您可以: + +- **大幅提升开发效率**:原本需要手动点击多次的操作,现在只需一句话 +- **降低学习成本**:新手也能快速上手,无需深入学习复杂功能 +- **减少出错概率**:AI 辅助生成的代码更加规范和可靠 + +### 10.3 未来更新计划 + +我们正在不断改进和完善 AI 插件,即将推出: + +**后续更新** + +- 优化 AI 生成能力,生成更准确、更稳定的页面 UI 效果 +- 更好的组件支持 +- 结合模板实现更好的效果 +- 优化性能,让响应更快、体验更流畅 + +**长期愿景** + +- 应用级的代码生成 +- 更智能的代码生成和优化建议 + +--- + +新版 AI 插件不仅仅是一个工具,更是您的智能开发助手。它将帮助您在 TinyEngine 平台上实现更高效、更智能的低代码开发体验。现在就开始使用吧! diff --git a/docs/advanced-features/imgs/final-effect.gif b/docs/advanced-features/route-capabilities/imgs/final-effect.gif similarity index 100% rename from docs/advanced-features/imgs/final-effect.gif rename to docs/advanced-features/route-capabilities/imgs/final-effect.gif diff --git a/docs/advanced-features/using-utils-methods.md b/docs/advanced-features/using-utils-methods.md index 6894322a8e..fdb9a036e1 100644 --- a/docs/advanced-features/using-utils-methods.md +++ b/docs/advanced-features/using-utils-methods.md @@ -13,7 +13,7 @@ 提供输入框,直接编写函数代码 -![添加工具类教程图](not-found/zh-cn_image_0000001994511922.png) +![添加工具类教程图](./imgs/use-function.png) 如上图: - 第一步,点击添加工具类,选择 function diff --git a/docs/api/backend-api/dsl-code-generation.md b/docs/api/backend-api/dsl-code-generation.md index dd61638c0d..1dff789d74 100644 --- a/docs/api/backend-api/dsl-code-generation.md +++ b/docs/api/backend-api/dsl-code-generation.md @@ -13,6 +13,7 @@ **接口描述:**

作为npm包使用generateCode方法生成代码示例:

+
const path = require('path')
 const fs = require('fs')
 const { generateCode } = require('@opentiny/tiny-engine-dsl-ng-tiny/lib/generate-code.js')
@@ -24,6 +25,7 @@ result.forEach((item) => fs.writeFileSync(`dist/${item.filePath}/${item.panel
 

输入示例: { pageInfo, blocksData };

+
// pageInfo为页面的schema信息, 
 // pageInfo: { schema, name });
 {
diff --git a/docs/api/backend-api/material-center.md b/docs/api/backend-api/material-center.md
index 52c0049a22..222bd09b46 100644
--- a/docs/api/backend-api/material-center.md
+++ b/docs/api/backend-api/material-center.md
@@ -327,3 +327,54 @@ tenant 通过前端配置统一 x-lowcode-org 请求头传递,接口中不用
                
               
 
+## 物料同步接口
+
+ 
+
+### 基本信息
+
+**Path:** /material-center/api/component/bundle/create
+
+**Method:** POST
+
+**接口描述:**
+
+

处理物料同步上传bundle.json文件创建或更新组件

+ + +### 请求参数 + +**Headers** + +| 参数名称 | 参数值 | 是否必须 | 示例 | 备注 | +| ------------ | ---------------- | -------- | ---- | ---- | +| Content-Type | multipart/form-data | 是 | | | + +**路径参数** + +| 参数名称 | 示例 | 备注 | +| -------- | ---- | ------ | +| file | bundle.json | bundle.json文件 | + +**Body** + + + + + + + + +
名称类型是否必须默认值备注其他信息
+ + +### 返回数据 + + + + + + + + +
名称类型是否必须默认值备注其他信息
dataobject非必须
├─ insertNumnumber非必须新增组件数
├─ updateNumnumber非必须更新组件数
\ No newline at end of file diff --git a/docs/api/frontend-api/main-package-api.md b/docs/api/frontend-api/main-package-api.md index 4f3b42127f..20c62c4aac 100644 --- a/docs/api/frontend-api/main-package-api.md +++ b/docs/api/frontend-api/main-package-api.md @@ -34,6 +34,7 @@ export { default as Bridge } from '@opentiny/tiny-engine-plugin-bridge' export { default as Block, BlockService } from '@opentiny/tiny-engine-plugin-block' export { default as Datasource, DataSourceService } from '@opentiny/tiny-engine-plugin-datasource' export { default as Robot } from '@opentiny/tiny-engine-plugin-robot' +export { default as ModelManager } from '@opentiny/tiny-engine-plugin-model-manager' export { default as Props, PropertiesService, PropertyService } from '@opentiny/tiny-engine-setting-props' export { default as Events } from '@opentiny/tiny-engine-setting-events' export { default as Styles } from '@opentiny/tiny-engine-setting-styles' diff --git a/docs/api/frontend-api/material-api.md b/docs/api/frontend-api/material-api.md index 162894e7f1..2ba0892854 100644 --- a/docs/api/frontend-api/material-api.md +++ b/docs/api/frontend-api/material-api.md @@ -1,19 +1,21 @@ -# 物料模块API +# 物料模块 API + ## 物料插件元应用 ```js export default { id: 'engine.plugins.materials', // 元应用id title: '物料', // 元应用名称 - type: 'plugins', // 元应用类型 + type: 'plugins', // 元应用类型 icon: 'plugin-icon-materials', // 元应用图标 align: 'top', // 元应用在当前类型下的位置 entry, // 入口文件 layout: MaterialLayout, // 布局文件,可替换布局 options: { defaultTabId: 'engine.plugins.materials.component', // 默认激活的Tab的元应用ID - displayComponentIds: ['engine.plugins.materials.component', 'engine.plugins.materials.block'], // 需要展示的Tab组件ID列表,可以为单个,单个的时候,不展示tab,直接显示该元应用 - basePropertyOptions //基础属性配置 + displayComponentIds: ['engine.plugins.materials.component', 'engine.plugins.materials.block'], // 需要展示的Tab组件ID列表,可以为单个,单个的时候,不展示tab,直接显示该元应用 + basePropertyOptions, //基础属性配置 + hiddenBuiltinMaterials: [] // 隐藏的内置物料组件列表,配置的组件不会在物料面板中显示 }, components: { header: MaterialHeader // 公共组件,可自行提供 @@ -23,17 +25,55 @@ export default { } export { entry, ResourceService, MaterialService } - ``` -### 物料插件元应用暴露出来的API +### 物料插件配置选项详解 + +#### hiddenBuiltinMaterials 配置 + +用于隐藏不需要在物料面板中显示的内置组件,提高物料面板的整洁性和用户体验。 + +**配置示例:** + ```js - apis: { - fetchGroups: fetchGroups // 获取区块分组列表 +// registry.js +export default { + [META_APP.Materials]: { + options: { + hiddenBuiltinMaterials: [ + 'Box', // 盒子容器(普通div 容器) + 'CanvasRowColContainer', // 行列容器 + 'CanvasFlexBox', // 弹性容器 + 'CanvasSection', // 全宽居中容器 + 'Text', // 文本 + 'Icon', // 图标 + 'Img', // 图片 + 'Slot', // 插槽(区块插槽需要) + 'RouterView', // 路由视图(子页面需要,不建议隐藏) + 'RouterLink', // 路由链接 + 'CanvasNavigation', // 导航条 + 'Collection' // 数据源容器(数据源功能依赖,不建议隐藏) + ] + } } +} +``` + +**使用场景:** + +- 隐藏不常用的内置组件,简化物料面板 +- 根据项目需求定制显示的组件列表 + +### 物料插件元应用暴露出来的 API + +```js +apis: { + fetchGroups: fetchGroups // 获取区块分组列表 +} ``` ## 物料模块元服务 + ### useResource 元服务 负责全局统一的资源管理,如:国际化、大纲树、工具类、全局状态,全局数据源 @@ -47,7 +87,6 @@ const resState = reactive({ globalState: [] }) - return { resState, // 保存着整个tiny-engine的国际化、大纲树、工具类、全局状态,全局数据源数据 fetchResource, // 进行初始化,获取后端返回的资源信息 @@ -67,7 +106,7 @@ return { ```js const materialState = reactive({ components: [], // 这里存放的是物料插件面板里所有显示的组件 - blocks: [], // 这里存放的是物料插件面板里所有显示的区块 + blocks: [], // 这里存放的是物料插件面板里所有显示的区块 componentsDepsMap: { scripts: [], styles: new Set() }, // 这里存放组件依赖的映射 packages: [] // 物料依赖的包 }) @@ -75,7 +114,7 @@ const materialState = reactive({ **使用示例** -```useMaterial().materialState``` +`useMaterial().materialState` 2. 暴露出来的方法函数详情 @@ -83,37 +122,30 @@ const materialState = reactive({ { // 状态对象 materialState, // 存放着组件、物料侧区块、第三方依赖信息 - - // 初始化和请求方法 - initMaterial, // 物料模块初始化,参数: { isInit = true, appData = {} } - fetchMaterial, // 请求物料并进行处理 - refreshMaterial, // 刷新物料,清空后重新初始化和获取 - - // 物料资源获取方法 - getMaterialsRes, // 获取物料,并返回符合物料协议的bundle.json内容,返回: Promise - getMaterial, // 获取单个物料,参数: (name: string) => Material - getComponentsByGroup, // 根据组名获取指定分组组件,参数: (components: Component[], groupName: string) => Component[] - - // 物料操作方法 - generateNode, // 根据包含{ type, component }的组件信息生成组件schema节点 - setMaterial, // 设置单个物料,参数: (name: string, data: Material) => void - addMaterials, // 添加多个物料,参数: (materials: Material) => void - - // 物料清理方法 - clearMaterials, // 清空所有物料 - clearBlockResources, // 清空区块缓存,以便更新最新版区块 - - getBlockByName, // 通过区块名称获取区块 - getBlockCompileRes, // 获取区块编译结果 - addBlockResources, // 增加区块缓存,参数: (id: string, resource: BlockResource) => void - updateBlockCompileCache, // 更新区块编译缓存 - - // 依赖相关方法 - getCanvasDeps, // 组装画布依赖,包含物料和工具类的依赖 - updateCanvasDeps, // 通知画布更新依赖 - - // 配置相关方法 - getConfigureMap // 获取物料组件的配置信息,返回组件名到配置的映射 + // 初始化和请求方法 + initMaterial, // 物料模块初始化,参数: { isInit = true, appData = {} } + fetchMaterial, // 请求物料并进行处理 + refreshMaterial, // 刷新物料,清空后重新初始化和获取 + // 物料资源获取方法 + getMaterialsRes, // 获取物料,并返回符合物料协议的bundle.json内容,返回: Promise + getMaterial, // 获取单个物料,参数: (name: string) => Material + getComponentsByGroup, // 根据组名获取指定分组组件,参数: (components: Component[], groupName: string) => Component[] + // 物料操作方法 + generateNode, // 根据包含{ type, component }的组件信息生成组件schema节点 + setMaterial, // 设置单个物料,参数: (name: string, data: Material) => void + addMaterials, // 添加多个物料,参数: (materials: Material) => void + // 物料清理方法 + clearMaterials, // 清空所有物料 + clearBlockResources, // 清空区块缓存,以便更新最新版区块 + getBlockByName, // 通过区块名称获取区块 + getBlockCompileRes, // 获取区块编译结果 + addBlockResources, // 增加区块缓存,参数: (id: string, resource: BlockResource) => void + updateBlockCompileCache, // 更新区块编译缓存 + // 依赖相关方法 + getCanvasDeps, // 组装画布依赖,包含物料和工具类的依赖 + updateCanvasDeps, // 通知画布更新依赖 + // 配置相关方法 + getConfigureMap // 获取物料组件的配置信息,返回组件名到配置的映射 } ``` @@ -122,10 +154,10 @@ const materialState = reactive({ ```js // 初始化物料 useMaterial().initMaterial({ isInit: true, appData }) // appData为远程拉取的应用数据 - + // 获取单个物料 const material = useMaterial().getMaterial('ComponentName') - + // 生成组件节点 const node = useMaterial().generateNode({ type: 'component', component: 'Button' }) @@ -133,7 +165,7 @@ const node = useMaterial().generateNode({ type: 'component', component: 'Button' await useMaterial().refreshMaterial() ``` -#### 主要API详解 +#### 主要 API 详解 ##### 初始化和请求相关方法 @@ -171,7 +203,6 @@ refreshMaterial() 使用场景:二开工程中,允许用户上传物料,或者是动态更新物料后,需要刷新物料,此时可以调用该方法。 - ##### 物料资源获取方法 1. `getMaterialsRes`:获取物料资源 @@ -280,42 +311,47 @@ updateCanvasDeps() 使用场景:如果需要画布刷新 script 或者 import-map 的时候,可以调用此方法让画布重新加载。(该方法会调用 getCanvasDeps 方法,获取画布依赖,并通知画布更新依赖) #### 物料类型结构 + 主要的物料类型定义包括: -1. `Material`: 物料包定义,符合物料协议的bundle.json内容 +1. `Material`: 物料包定义,符合物料协议的 bundle.json 内容 + ```ts interface Material { - components: Component[]; // 组件列表 - blocks?: Block[]; // 区块列表 - snippets?: Snippet[]; // 物料分组列表 - packages?: Dependency[]; // 物料依赖的包 + components: Component[] // 组件列表 + blocks?: Block[] // 区块列表 + snippets?: Snippet[] // 物料分组列表 + packages?: Dependency[] // 物料依赖的包 } ``` 2. `Component`: 组件物料定义 + ```ts interface Component { - component: string; // 组件名称 - group: string; // 组件分组 - npm?: { // 组件NPM包信息 - package: string; // 包名 - script?: string; // 脚本路径 - exportName: string; // 导出名称 - css?: string; // 样式路径 - }; - schema?: Schema; // 组件配置信息 + component: string // 组件名称 + group: string // 组件分组 + npm?: { + // 组件NPM包信息 + package: string // 包名 + script?: string // 脚本路径 + exportName: string // 导出名称 + css?: string // 样式路径 + } + schema?: Schema // 组件配置信息 } ``` 3. `Block`: 区块物料定义 + ```ts interface Block { - label: string; // 区块标识 - blockName: string; // 区块名称 - version?: string; // 区块版本 - description?: string; // 区块描述 - screenshot?: string; // 区块截图 - content?: BlockResource; // 区块内容 + label: string // 区块标识 + blockName: string // 区块名称 + version?: string // 区块版本 + description?: string // 区块描述 + screenshot?: string // 区块截图 + content?: BlockResource // 区块内容 } ``` @@ -346,13 +382,13 @@ import { useMaterial, useCanvas } from '@opentiny/tiny-engine' export const addComponent = (componentName) => { const material = useMaterial() const canvas = useCanvas() - + // 生成组件节点 - const schema = material.generateNode({ - type: 'component', - component: componentName + const schema = material.generateNode({ + type: 'component', + component: componentName }) - + // 添加到画布 canvas.canvasApi.value.addComponent(schema) } @@ -365,14 +401,14 @@ import { useMaterial } from '@opentiny/tiny-engine' export const getComponentConfigure = (componentName) => { const material = useMaterial() - + // 获取单个物料信息 const componentInfo = material.getMaterial(componentName) - + // 获取组件配置 const configureMap = material.getConfigureMap() const configure = configureMap[componentName] - + return { componentInfo, configure } } ``` diff --git a/docs/api/frontend-api/preview-api.md b/docs/api/frontend-api/preview-api.md index 2d1605c609..250d326087 100644 --- a/docs/api/frontend-api/preview-api.md +++ b/docs/api/frontend-api/preview-api.md @@ -74,11 +74,14 @@ const registry = {
 
-import { Preview } from '@opentiny/tiny-engine'
+// registry.js
+import { META_APP } from '@opentiny/tiny-engine-meta-register'
 export default {
-   toolbars: [
-     [Preview, { options: { ...Preview.options,  previewUrl:  import.meta.env.MODE.includes('prod') ? 'http://tiny-engine-preview.com/customPreview' : '' } }]
-   ]
+  [META_APP.Preview]: {
+    options: {
+      previewUrl:  import.meta.env.MODE.includes('prod') ? 'http://tiny-engine-preview.com/customPreview' : '' 
+    }
+  }
 }
 
 
@@ -91,22 +94,17 @@ export default { 例如: ```javascript -import { Preview } from '@opentiny/tiny-engine' +// registry.js +import { META_APP } from '@opentiny/tiny-engine-meta-register' export default { - toolbars: [ - [ - Preview, - { - options: { - ...Preview.options, - previewUrl: (originUrl, query) => { - // 这里我们增加了自定义的 query: `test=1` - return `http://tiny-engine-preview.com/customPreview?test=1&${query}` - } - } - } - ] - ] + [META_APP.Preview]: { + options: { + previewUrl: (originUrl, query) => { + // 这里我们增加了自定义的 query: `test=1` + return `http://tiny-engine-preview.com/customPreview?test=1&${query}` + } + } + } } ``` @@ -119,7 +117,12 @@ export default { initPreview({ registry: { - config: { id: 'engine.config', theme: 'light', previewHotReload: false }, + 'engine.config': { + id: 'engine.config', + theme: 'light', + // 配置 false 关闭热更新 + previewHotReload: false + } // ... other config } }) diff --git a/docs/basic-features/internationalization.md b/docs/basic-features/internationalization.md index 323cc1debd..1c9b252159 100644 --- a/docs/basic-features/internationalization.md +++ b/docs/basic-features/internationalization.md @@ -4,7 +4,7 @@ 同一个项目,可能需要同时支持多个语言,设计器提供了中英文切换,在能够一键切换语言,提升开发效率与开发体验。 国际化是应用级别的,在任何一个页面都可以访问。 -> ![](public_sys-resources/icon-note.gif) **说明:** +> **说明:** > 注意的是国际化只针对画布中的项目,不针对设计器本身。 ## 添加国际化词条 @@ -13,7 +13,7 @@ 2. 单击“新增词条”。 3. 编辑key,中文和英文内容 - > ![](public_sys-resources/icon-note.gif) **说明:** + > **说明:** >- 创建时key会自动生成,也可以自定义输入。 >- key需为唯一值,不可与现有key重复。 >- 创建后key值不可修改。 diff --git a/docs/catalog.json b/docs/catalog.json index 3066d29117..9682235a13 100644 --- a/docs/catalog.json +++ b/docs/catalog.json @@ -41,6 +41,7 @@ { "title": "循环渲染", "name": "loop-rendering.md" }, { "title": "条件渲染", "name": "conditional-rendering.md" }, { "title": "集成ChatGPT搭建简单页面能力", "name": "integrating-chatgpt-for-simple-pages.md" }, + { "title": "新版AI插件使用", "name": "new-ai-plugin-usage.md" }, { "title": "数据源和Collection—远程字段", "name": "data-source-and-collection-remote-fields.md" }, { "title": "数据源和Collection—mock数据", "name": "data-source-and-collection-mock-data.md" }, { "title": "数据源和Collection—使用数据源", "name": "data-source-and-collection-usage.md" }, @@ -94,6 +95,7 @@ "title": "解决方案", "name": "solutions", "articles": [ + {"title": "前端及Java服务端docker部署", "name": "front-backend-docker-deployment.md"}, { "title": "Java服务端部署", "name": "server-deployment-solution-java.md" }, { "title": "Node.js服务端部署", "name": "server-deployment-solution.md" }, { "title": "区块发布方案(Node.js服务端)", "name": "block-release-solution.md" }, diff --git a/docs/changelog/changelog.md b/docs/changelog/changelog.md index 4adeda5e8f..a7a62aff27 100644 --- a/docs/changelog/changelog.md +++ b/docs/changelog/changelog.md @@ -23,8 +23,8 @@ #### 📚 Documentation - 新增 [v2.7 升级指南](./v2.7-upgrade-guide.md) -- 新增 [新注册表](../extension-capabilities-overview/new-registry.md) 文档 -- 新增 [注册表高级配置](../extension-capabilities-overview/new-registry-advanced.md) 文档 +- 新增 [新注册表](../extension-capabilities-overview/new-registry.md "dev") 文档 +- 新增 [注册表高级配置](../extension-capabilities-overview/new-registry-advanced.md "dev") 文档 #### ⚙️ Other changes diff --git a/docs/changelog/v2.7-upgrade-guide.md b/docs/changelog/v2.7-upgrade-guide.md index 5e6865e9c7..a7d795cce6 100644 --- a/docs/changelog/v2.7-upgrade-guide.md +++ b/docs/changelog/v2.7-upgrade-guide.md @@ -76,7 +76,7 @@ const register = { > **重要提示⚠️**:v2.7 开始,如果对原插件没有改动(配置、替换、删除),则不需要在注册表中进行声明,因为官方内置了全量的注册表。 -详细内容请参考 [新注册表](../extension-capabilities-overview/new-registry.md)。 +详细内容请参考 [新注册表](../extension-capabilities-overview/new-registry.md "dev")。 ## API 变更 @@ -184,7 +184,7 @@ await initHotfixRegistry({ - 使用 `getAllMergeMeta()` 获取完整注册表信息,便于调试和开发 - 使用 `initHotfixRegistry()` 实现热修复功能 -详细API请参考 [注册表 API](../api/frontend-api/registry-api.md)。 +详细API请参考 [注册表 API](../api/frontend-api/registry-api.md "dev")。 ## Vite 配置要求 @@ -266,7 +266,7 @@ export default { > **注意⚠️**:当同时配置 `layoutConfig` 和 `relativeLayoutConfig` 时,`layoutConfig` 优先级更高,`relativeLayoutConfig` 将被忽略。 -详细内容请参考 [布局配置](../api/frontend-api/global-layout-api.md)。 +详细内容请参考 [布局配置](../api/frontend-api/global-layout-api.md "dev")。 ### 3. 插件配置变更 @@ -361,6 +361,95 @@ const register = { } ``` +#### 3.3 仅支持在第一层声明(子层声明不会生效) + +自 v2.7 起,我们只读取注册表对象的“第一层”。只有第一层的键会被注册进 `metaHashMap`。 + +也就是说:把插件/配置项写在子层(无论是把唯一 ID 放到某个插件的子属性里,还是通过 `metas` 往里塞)都不会被注册,`getMergeMeta`/`getMergeMetaByType`/`getAllMergeMeta` 也就找不到它们。 + +简而言之:请把所有需要生效的插件/配置项,都放到注册表的第一层来声明。 + +错误示例(不会生效): +```javascript +import { META_APP } from '@opentiny/tiny-engine' +import testMeta from './testMeta' + +export default { + // 1) 在子层直接再次声明插件/配置项(无效,不会注册到 metaHashMap) + [META_APP.Materials]: { + 'engine.plugins.test': testMeta + }, + + // 2) 通过 metas 在子层注入(无效,不会注册到 metaHashMap) + [META_APP.Materials]: { + options: { + displayComponentIds: ['engine.plugins.test'], + metas: [testMeta] + } + } +} +``` + +正确示例(第一层声明 + 通过 ID 引用): +```javascript +import { META_APP } from '@opentiny/tiny-engine' +import testMeta from './testMeta' // testMeta.id = 'engine.plugins.test' + +export default { + // 作为第一层键单独注册 + [testMeta.id]: testMeta, + + // 在需要的插件或布局中通过 ID 引用 + [META_APP.Materials]: { + options: { + displayComponentIds: ['engine.plugins.test'] + } + } +} +``` + +适用范围:所有插件与配置项都遵循该规则。用户注册表只支持: +- 把已有的插件/配置项设为 `false`(删除默认); +- 在第一层新增插件/配置项; +- 在第一层用相同 ID 覆盖默认配置。 + +##### 物料插件(Materials 插件)迁移建议 + +如果你旧版本是在 `Materials` 插件内部(例如 `Materials.metas` 或把自定义 ID 放到 `Materials` 的子属性里)扩展物料插件,请按下面方式迁移: + +错误示例(不会生效): +```javascript +import { META_APP } from '@opentiny/tiny-engine' +import MyMaterial from './MyMaterial' // MyMaterial.id = 'engine.plugins.myMaterial' + +export default { + [META_APP.Materials]: { + // 通过 metas 向物料插件塞入物料项(无效) + options: { + metas: [MyMaterial] + } + } +} +``` + +正确示例(第一层声明 + 在物料插件中引用): +```javascript +import { META_APP } from '@opentiny/tiny-engine' +import MyMaterial from './MyMaterial' // MyMaterial.id = 'engine.plugins.myMaterial' + +export default { + // 1) 物料项作为第一层键单独注册 + [MyMaterial.id]: MyMaterial, + + // 2) 在 Materials 插件中通过 ID Tab 组件显示 + [META_APP.Materials]: { + options: { + displayComponentIds: ['engine.plugins.myMaterial'] + } + } +} +``` + ### 4. 注册表热修复功能 v2.7 版本新增了注册表热修复(hotfix)功能,可以通过覆盖官方插件的特定函数或模板,实现紧急 bug 修复,而不需要等待官方版本发布。 @@ -386,7 +475,7 @@ export default { } ``` -详细内容请参考 [注册表高级配置](../extension-capabilities-overview/new-registry-advanced.md)。 +详细内容请参考 [注册表高级配置](../extension-capabilities-overview/new-registry-advanced.md "dev")。 ## 其他改进 diff --git a/docs/development-getting-started/dev-quick-start.md b/docs/development-getting-started/dev-quick-start.md index ca05663012..05a559d459 100644 --- a/docs/development-getting-started/dev-quick-start.md +++ b/docs/development-getting-started/dev-quick-start.md @@ -88,11 +88,7 @@ import engineConfig from './engine.config' export default { // ... --- plugins: [Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, State, Schema, Help, Robot], -++ plugins: [DemoPlugin, Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, State, Schema, Help, Robot], - dsls: [{ id: 'engine.dsls.dslvue' }], - settings: [Props, Styles, Events], - canvas: Canvas +++ [DemoPlugin.id]: DemoPlugin } ``` diff --git a/docs/extension-capabilities-overview/new-registry.md b/docs/extension-capabilities-overview/new-registry.md index e75ca723cd..6232f2b560 100644 --- a/docs/extension-capabilities-overview/new-registry.md +++ b/docs/extension-capabilities-overview/new-registry.md @@ -271,6 +271,47 @@ export default { 更多高级特性,请参考 [注册表高级配置](./new-registry-advanced.md)。 +## Tailwind CSS 支持 + +TinyEngine 自 v2.9 起支持在注册表中通过 `engine.config.enableTailwindCSS` 开关启用 Tailwind CSS(默认开启)。 + +### 开关配置 + +```javascript +// registry.js +export default { + 'engine.config': { + // ...其他配置 + enableTailwindCSS: true // 开启(默认即为 true);设为 false 可关闭 + } +} +``` + +### 启用后的行为 + +- 预览态:自动按需加载 `@tailwindcss/browser`,使画布/预览中可直接使用 Tailwind 原子类。 +- 出码生成:生成的应用将自动完成以下配置(基于 Tailwind CSS v4 零配置方案): + - 在依赖中添加 `tailwindcss`,并在开发依赖中添加 `@tailwindcss/vite`; + - 在 Vite 配置中注册 `tailwindcss()` 插件; + - 生成 `src/style.css`,内容包含 `@import "tailwindcss";`; + - 在 `src/main.js` 自动引入 `./style.css`。 + +以上步骤由引擎/出码器自动完成,无需手动干预。 + +### 关闭 Tailwind + +当配置为 `enableTailwindCSS: false` 时: + +- 预览态不会加载 `@tailwindcss/browser`; +- 出码时不会注入与 Tailwind 相关的依赖、Vite 插件及样式文件导入。 + +### 注意事项 + +- 预览依赖解析:内置 import-map 已包含 `@tailwindcss/browser` 映射;如使用自定义 CDN/离线环境,请确保该映射可用。 +- 自定义样式:可在生成的 `src/style.css` 中追加自定义样式,或在项目中新增样式文件后自行引入。 +- 运行时渲染:如果您自定义了运行时渲染引擎,请确保在运行时渲染中增加对 Tailwind CSS 的支持。 + + ## Vite 配置要求 **重要说明⚠️**:为了使注册表的 tree-shaking 功能正常工作,您需要在 `vite.config.js` 中配置 `registryPath` 参数,指向您的注册表文件路径。 diff --git a/docs/extension-capabilities-tutorial/ai-plugin-configuration.md b/docs/extension-capabilities-tutorial/ai-plugin-configuration.md index 9c4c508ba8..18913de1e0 100644 --- a/docs/extension-capabilities-tutorial/ai-plugin-configuration.md +++ b/docs/extension-capabilities-tutorial/ai-plugin-configuration.md @@ -16,7 +16,7 @@ ### 前端代码改动 -在`tiny-engine/packages/plugins/robot/src/js/robotSetting.js`文件改动如下 +在`tiny-engine/packages/plugins/robot/src/composables/useRobot.ts`文件改动如下 ![](./imgs/ai-image23.png) diff --git a/docs/extension-capabilities-tutorial/customize-page-configured.md b/docs/extension-capabilities-tutorial/customize-page-configured.md index 8ba33685ae..f1f106e8dc 100644 --- a/docs/extension-capabilities-tutorial/customize-page-configured.md +++ b/docs/extension-capabilities-tutorial/customize-page-configured.md @@ -18,11 +18,11 @@ import { handleClickDelete } from './tests/utils' export default { // ... - plugins: [ - // ... - [Page, { options: { ...Page.options, customPageOperations: [{type: 'delete', label: '删除', action: handleClickDelete}] } }] - // ... - ] + [META_APP.AppManage]: { + options: { + customPageOperations: [{type: 'delete', label: '删除', action: handleClickDelete}] + } + } // ... } ``` diff --git a/docs/extension-capabilities-tutorial/customize-plugin-ui.md b/docs/extension-capabilities-tutorial/customize-plugin-ui.md index 5c7a951f26..31e4d6c3f0 100644 --- a/docs/extension-capabilities-tutorial/customize-plugin-ui.md +++ b/docs/extension-capabilities-tutorial/customize-plugin-ui.md @@ -8,24 +8,18 @@ - `title`。标题 - `icon`。图标,可以为字符串或者组件。如果是字符串,则会使用 tiny-engine 自带的 svg 图标 -- `align`。对齐位置,根据插件位置的不同可以为不同的值。如果是顶部工具栏,可以为 `left`, `center`, `right`;如果是左侧插件栏,可以为 `top`, `bottom` 比如替换 Page 插件的图标和对齐位置 ```js // registry.js +import { META_APP } from '@opentiny/tiny-engine-meta-register' export default { // ... - plugins: [ - // ... - { - ...Page, - title: '定制页面插件位置', - icon: 'box', - align: 'bottom' - } - // ... - ] + [META_APP.AppManage]: { + title: '定制页面插件位置', + icon: 'box' + } // ... } ``` @@ -40,14 +34,13 @@ export default { ```js // registry.js +import { META_APP } from '@opentiny/tiny-engine-meta-register' import CustomPage from './custom-page' export default { // ... - plugins: [ - // ... - { ...Page, entry: CustomPage } - // ... - ] + [META_APP.AppManage]: { + entry: CustomPage + } // ... } ``` diff --git a/docs/extension-capabilities-tutorial/mcpService.md b/docs/extension-capabilities-tutorial/mcpService.md new file mode 100644 index 0000000000..bb54fb0b5e --- /dev/null +++ b/docs/extension-capabilities-tutorial/mcpService.md @@ -0,0 +1,697 @@ +# MCP 服务扩展能力 + +## 概述 + +MCP (Model Context Protocol) 服务是 tiny-engine 智能化的核心扩展能力之一,它基于 [Model Context Protocol](https://modelcontextprotocol.io/introduction) 标准协议,提供了工具(Tools)的管理和执行能力。 + +关于 MCP 协议的详细介绍,请参考官方文档:[https://modelcontextprotocol.io/introduction](https://modelcontextprotocol.io/introduction) + +## 快速开始 + +### 基本使用 + +```typescript +import { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register' +import type { ToolItem } from '@opentiny/tiny-engine-common' +import { z } from 'zod' + +// 获取 MCP 服务实例 +const mcpService = getMetaApi(META_SERVICE.McpService) + +// 注册一个简单的工具 +const helloTool: ToolItem = { + name: 'hello_world', + title: 'Hello World 工具', + description: '一个简单的问候工具', + inputSchema: { + name: z.string().optional() + }, + outputSchema: { + content: z.string() + }, + annotations: { + readOnlyHint: true, + destructiveHint: false, + idempotentHint: true, + openWorldHint: false + }, + callback: async (params) => { + return { content: `Hello, ${params.name || 'World'}!` } + } +} + +// 注册工具 +mcpService.registerTool(helloTool) + +// 获取工具列表 +const toolList = mcpService.getToolList() +console.log('已注册的工具:', toolList) +``` + +### 高级配置 + +```typescript +// 配置 MCP 服务选项 +const mcpOptions = { + proxyUrl: 'https://your-agent-server.com/mcp', + connectToAgentServer: true, + reconnectAttempts: 5, + reconnectInterval: 2000 +} + +// 通过 setOptions 设置自定义配置 +const mcpService = getMetaApi('engine.service.mcp') +mcpService.setOptions(mcpOptions) +``` + +## API 参考 + +### 服务配置接口 + +```typescript +interface IOptions { + // 代理服务器 URL,用于连接远程 Agent 服务器 + proxyUrl: string | null + + // 是否连接到 Agent 服务器 + connectToAgentServer: boolean + + // 重连尝试次数(默认:3) + reconnectAttempts?: number + + // 重连间隔时间,毫秒(默认:1000) + reconnectInterval?: number +} +``` + +### 工具定义接口 + +```typescript +interface ToolItem { + // 工具唯一标识符 + name: string + + // 工具显示名称 + title?: string + + // 工具描述 + description?: string + + // 输入参数 schema(Zod) + inputSchema?: ZodRawShape + + // 输出结果 schema(Zod) + outputSchema?: ZodRawShape + + // 工具注解信息 + annotations?: ToolAnnotations + + // 工具执行回调函数 + callback: ToolCallback +} +``` + +### 连接状态类型 + +```typescript +type ServerConnectionStatus = + | 'connected' // 已连接 + | 'disconnected' // 已断开 + | 'connecting' // 连接中 + | 'disconnecting' // 断开中 + | 'error' // 连接错误 +``` + +### 主要 API 方法 + +#### 服务器管理 + +```typescript +// 获取 MCP 服务器实例 +getMcpServer(): McpServer | null + +// 获取 MCP 客户端实例 +getMcpClient(): Client | null + +// 获取远程传输实例 +getRemoteTransport(): any + +// 获取服务器连接状态 +getServerConnectionStatus(): ServerConnectionStatus +``` + +#### 连接管理 + +```typescript +// 连接到远程服务器(遥控端) +connectToRemoteServer(): Promise + +// 重新连接到远程服务器(遥控端) +reconnectToRemoteServer(): Promise + +// 关闭远程服务器连接(遥控端) +closeRemoteServer(): Promise + +// 关闭传输连接(遥控端) +closeTransport(): Promise +``` + +#### 工具管理 + +```typescript +// 注册工具 +registerTool(tool: ToolItem): void + +// 获取所有工具列表 +getToolList(): ToolItem[] + +// 根据名称获取工具 +getToolByName(name: string): ToolItem | undefined + +// 获取工具实例 +getToolInstance(name: string): RegisteredTool | undefined + +// 启用工具 +enableTool(name: string): void + +// 禁用工具 +disableTool(name: string): void + +// 移除工具 +removeTool(name: string): void + +// 更新工具配置 +updateTool(name: string, config?: UpdateToolConfig): void +``` + +## 工具管理详解 + +### 工具注册 + +工具注册是 MCP 服务的核心功能。每个工具都需要定义清晰的接口和回调函数: + +```typescript +import { z } from 'zod' +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +// 定义工具的输入 schema +const calculateInputSchema = { + operation: z.enum(['add', 'subtract', 'multiply', 'divide']), + a: z.number(), + b: z.number() +} + +// 定义工具的输出 schema +const calculateOutputSchema = { + result: z.number(), + operation: z.string() +} + +// 创建计算器工具 +const calculatorTool: ToolItem = { + name: 'calculator', + title: '数学计算器', + description: '执行基本的数学运算', + inputSchema: calculateInputSchema, + outputSchema: calculateOutputSchema, + callback: async (params) => { + const { operation, a, b } = params + + let result: number + switch (operation) { + case 'add': + result = a + b + break + case 'subtract': + result = a - b + break + case 'multiply': + result = a * b + break + case 'divide': + if (b === 0) { + throw new Error('除数不能为零') + } + result = a / b + break + default: + throw new Error('不支持的操作') + } + + return { + result, + operation: `${a} ${operation} ${b} = ${result}` + } + } +} + +// 获取 MCP 服务并注册工具 +const mcpService = getMetaApi('engine.service.mcp') +mcpService.registerTool(calculatorTool) +``` + +### 工具生命周期管理 + +```typescript +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') + +// 检查工具是否存在 +const tool = mcpService.getToolByName('calculator') +if (tool) { + console.log('工具已存在:', tool.title) +} + +// 临时禁用工具 +mcpService.disableTool('calculator') + +// 重新启用工具 +mcpService.enableTool('calculator') + +// 更新工具配置 +mcpService.updateTool('calculator', { + description: '更新后的计算器描述', + title: '高级计算器' +}) + +// 移除工具 +mcpService.removeTool('calculator') +``` + +### 批量工具注册 + +```typescript +// 从注册表中自动收集工具 +// MCP 服务会自动扫描所有注册的 meta 数据中的 mcp.tools 字段 + +// 在插件的 meta 数据中定义工具 +const pluginMeta = { + mcp: { + tools: [ + { + name: 'file_reader', + title: '文件读取器', + description: '读取文件内容', + callback: async (params) => { + // 实现文件读取逻辑 + return { content: '文件内容' } + } + }, + { + name: 'data_processor', + title: '数据处理器', + description: '处理数据', + callback: async (params) => { + // 实现数据处理逻辑 + return { processed: true } + } + } + ] + } +} + +// 工具会在服务初始化时自动注册 +``` + +## 连接管理详解 + +### 连接状态监控 + +```typescript +import { useMessage } from '@opentiny/tiny-engine-meta-register' +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +// 监听连接状态变化 +const { subscribe } = useMessage() + +subscribe({ + topic: 'serverConnectionStatusChanged', + callback: ({ status, error }) => { + console.log('连接状态变化:', status) + + switch (status) { + case 'connecting': + console.log('正在连接到服务器...') + break + case 'connected': + console.log('已成功连接到服务器') + break + case 'disconnected': + console.log('与服务器断开连接') + break + case 'error': + console.error('连接错误:', error) + break + } + } +}) + +// 获取当前连接状态 +const mcpService = getMetaApi('engine.service.mcp') +const currentStatus = mcpService.getServerConnectionStatus() +console.log('当前连接状态:', currentStatus) +``` + +### 手动连接管理 + +```typescript +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') + +// 手动连接到远程服务器 +try { + await mcpService.connectToRemoteServer() + console.log('连接成功') +} catch (error) { + console.error('连接失败:', error) +} + +// 重新连接(会先断开现有连接) +try { + await mcpService.reconnectToRemoteServer() + console.log('重连成功') +} catch (error) { + console.error('重连失败:', error) +} + +// 关闭连接 +await mcpService.closeRemoteServer() +``` + +### 会话持久化 + +MCP 服务支持会话持久化,确保页面刷新后能够恢复连接: + +```typescript +// 会话 ID 会自动保存到 sessionStorage +// 页面刷新后会尝试使用相同的会话 ID 重新连接 + +// 手动获取当前会话 ID +const sessionId = sessionStorage.getItem('mcp-session-id') +console.log('当前会话 ID:', sessionId) + +// 清除会话(强制创建新会话) +sessionStorage.removeItem('mcp-session-id') +``` + +## 配置选项详解 + +### 基本配置 + +```typescript +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') + +// 不连接远程服务器,仅使用本地模式 +mcpService.setOptions({ + connectToAgentServer: false +}) +``` + +### 远程服务器配置 + +```typescript +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') + +const remoteConfig = { + proxyUrl: 'https://api.example.com/mcp', + connectToAgentServer: true, + reconnectAttempts: 3, // 重连尝试次数 + reconnectInterval: 1000 // 重连间隔(毫秒) +} + +mcpService.setOptions(remoteConfig) +``` + +### 高级配置 + +
+
+import { getMetaApi } from '@opentiny/tiny-engine-meta-register'
+
+const mcpService = getMetaApi('engine.service.mcp')
+
+const advancedConfig = {
+  proxyUrl: process.env.MCP_PROXY_URL || 'http://localhost:3000/mcp',
+  connectToAgentServer: process.env.NODE_ENV === 'production',
+  reconnectAttempts: 5,
+  reconnectInterval: 2000
+}
+
+mcpService.setOptions(advancedConfig)
+
+
+ +## 最佳实践 + +### 1. 工具设计原则 + +```typescript +// ✅ 好的工具设计 +const goodTool: ToolItem = { + name: 'format_text', // 使用描述性的名称 + title: '文本格式化工具', // 提供清晰的标题 + description: '将文本格式化为指定的样式', // 详细的描述 + inputSchema: { // 明确的输入验证 + text: z.string().min(1), + format: z.enum(['uppercase', 'lowercase', 'capitalize']) + }, + outputSchema: { // 明确的输出结构 + formatted: z.string(), + original: z.string() + }, + callback: async (params) => { + // 实现具体的逻辑 + const { text, format } = params + + let formatted: string + switch (format) { + case 'uppercase': + formatted = text.toUpperCase() + break + case 'lowercase': + formatted = text.toLowerCase() + break + case 'capitalize': + formatted = text.charAt(0).toUpperCase() + text.slice(1) + break + default: + formatted = text + } + + return { formatted, original: text } + } +} + +// ❌ 避免的设计 +const badTool: ToolItem = { + name: 'tool1', // 名称不够描述性 + description: '处理文本', // 描述太模糊 + callback: async (params) => { + // 没有输入验证 + return params.text.toUpperCase() // 返回格式不一致 + } +} +``` + +### 2. 错误处理 + +```typescript +const robustTool: ToolItem = { + name: 'file_processor', + title: '文件处理器', + description: '处理各种格式的文件', + callback: async (params) => { + try { + // 验证输入 + if (!params.filePath) { + throw new Error('文件路径不能为空') + } + + // 执行处理逻辑 + const result = await processFile(params.filePath) + + return { + success: true, + result, + message: '文件处理成功' + } + } catch (error) { + // 统一的错误处理 + return { + success: false, + error: error.message, + message: '文件处理失败' + } + } + } +} +``` + +### 3. 异步操作处理 + +```typescript +const asyncTool: ToolItem = { + name: 'data_fetcher', + title: '数据获取器', + description: '从远程 API 获取数据', + callback: async (params) => { + const { url, timeout = 5000 } = params + + // 使用 Promise.race 实现超时控制 + const timeoutPromise = new Promise((_, reject) => { + setTimeout(() => reject(new Error('请求超时')), timeout) + }) + + const fetchPromise = fetch(url).then(res => res.json()) + + try { + const data = await Promise.race([fetchPromise, timeoutPromise]) + return { + success: true, + data, + timestamp: Date.now() + } + } catch (error) { + return { + success: false, + error: error.message, + timestamp: Date.now() + } + } + } +} +``` + +### 4. 资源管理 + +```typescript +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') + +// 在页面卸载时清理资源 +window.addEventListener('beforeunload', async () => { + await mcpService.closeTransport() +}) + +// 组件卸载时清理工具 +const cleanup = () => { + // 移除临时工具 + mcpService.removeTool('temporary_tool') + + // 关闭连接 + mcpService.closeRemoteServer() +} +``` + +## 故障排除 + +### 常见问题 + +#### 1. 工具注册失败 + +**问题**:工具注册时报错或没有生效 + +**解决方案**: +```typescript +import { getMetaApi } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') + +// 检查工具名称是否重复 +const existingTool = mcpService.getToolByName('my_tool') +if (existingTool) { + console.log('工具已存在,先移除再注册') + mcpService.removeTool('my_tool') +} + +// 确保 callback 函数正确 +const tool: ToolItem = { + name: 'my_tool', + title: '我的工具', + callback: async (params) => { // 必须是 async 函数 + return { result: 'success' } // 必须返回对象 + } +} + +mcpService.registerTool(tool) +``` + +#### 2. 连接失败 + +**问题**:无法连接到远程服务器 + +**解决方案**: +```typescript +import { getMetaApi, useMessage } from '@opentiny/tiny-engine-meta-register' + +const mcpService = getMetaApi('engine.service.mcp') +const { subscribe } = useMessage() + +// 检查配置 +mcpService.setOptions({ + proxyUrl: 'https://your-server.com/mcp', // 确保 URL 正确 + connectToAgentServer: true +}) + +// 监听连接状态 +subscribe({ + topic: 'serverConnectionStatusChanged', + callback: ({ status, error }) => { + if (status === 'error') { + console.error('连接错误详情:', error) + + // 检查网络连接 + if (error.message.includes('网络')) { + console.log('请检查网络连接') + } + + // 检查认证 + if (error.message.includes('401')) { + console.log('请检查认证配置') + } + } + } +}) +``` + +#### 3. 工具执行错误 + +**问题**:工具执行时出现异常 + +**解决方案**: +```typescript +// 添加详细的错误日志 +const debugTool: ToolItem = { + name: 'debug_tool', + callback: async (params) => { + console.log('工具执行开始,参数:', params) + + try { + const result = await yourToolLogic(params) + console.log('工具执行成功,结果:', result) + return result + } catch (error) { + console.error('工具执行失败:', error) + console.error('错误堆栈:', error.stack) + throw error // 重新抛出错误以便上层处理 + } + } +} +``` + +## 完整示例 + +### 综合示例 + +TODO + +## 总结 + +MCP 服务为 tiny-engine 智能化提供了强大的驱动。通过合理的增加工具、prompts 等 mcp 能力,它能够让 AI 理解TinyEngine,以及我们自定义的插件扩展,让 AI 为我们提供更加智能化的服务。 diff --git a/docs/solutions/front-backend-docker-deployment.md b/docs/solutions/front-backend-docker-deployment.md new file mode 100644 index 0000000000..63001571c3 --- /dev/null +++ b/docs/solutions/front-backend-docker-deployment.md @@ -0,0 +1,57 @@ +# 前端及Java服务端docker部署 + +## 1、环境准备 +- **工具安装** + + 根据自己的linux操作系统安装docker,配置国内镜像加速,编辑/etc/docker/daemon.json文件镜像地址,如图 + + ```sh + { + "registry-mirrors": [ + "https://docker.m.daocloud.io", + "https://mirror.iscas.ac.cn", + "https://docker.rainbond.cc", + "https://dockerproxy.cn", + "https://docker.udayun.com" + ] + } + ``` + + ![](./imgs/daemon.png) + + 编辑完成后重载配置重启docker + ```sh + sudo systemctl daemon-reload + sudo systemctl restart docker + ``` + docker-compose安装 + ```sh + sudo curl -L "https://ghproxy.com/https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + sudo chmod +x /usr/local/bin/docker-compose + ``` +- **拉取代码** + ```sh + git clone -b develop https://github.com/opentiny/tiny-engine.git + git clone -b develop https://github.com/opentiny/tiny-engine-backend-java.git + ``` +## 2、配置修改 +- **nginx配置修改** + + 修改 Java 项目 /tiny-engine-backend-java/docker-deploy-data/nginx.conf 文件,如图所示将ip改为自己服务器ip或域名 + ![](./imgs/nginxcof.png) + +## 3、服务启动与停止 + +- **服务启动** + + 在 Java 项目根目录 docker-compose.yml 文件同级执行命令 + ```sh + docker-compose up -d + ``` +- **服务停止** + + ```sh + docker-compose stop + ``` +## 4、视频讲解 +- [TinyEngine实操教程(4)——前后端部署](https://www.bilibili.com/video/BV1gGgcz8Eek/?spm_id_from=333.1387.homepage.video_card.click&vd_source=ea0e34d0a465d263673f7f36dcae0edf) \ No newline at end of file diff --git a/docs/solutions/imgs/bundle_upload.png b/docs/solutions/imgs/bundle_upload.png new file mode 100644 index 0000000000..886b3472d2 Binary files /dev/null and b/docs/solutions/imgs/bundle_upload.png differ diff --git a/docs/solutions/imgs/component_create_code.png b/docs/solutions/imgs/component_create_code.png new file mode 100644 index 0000000000..d78665185e Binary files /dev/null and b/docs/solutions/imgs/component_create_code.png differ diff --git a/docs/solutions/imgs/daemon.png b/docs/solutions/imgs/daemon.png new file mode 100644 index 0000000000..d4a8523621 Binary files /dev/null and b/docs/solutions/imgs/daemon.png differ diff --git a/docs/solutions/imgs/nginxcof.png b/docs/solutions/imgs/nginxcof.png new file mode 100644 index 0000000000..0db211b8c8 Binary files /dev/null and b/docs/solutions/imgs/nginxcof.png differ diff --git a/docs/solutions/material-sync-solution.md b/docs/solutions/material-sync-solution.md index 3a7cda1cc4..2e1343eb15 100644 --- a/docs/solutions/material-sync-solution.md +++ b/docs/solutions/material-sync-solution.md @@ -1,10 +1,24 @@ ## 物料同步方案 +### 方案一 (推荐使用) +通过前端脚本上传编辑好的bundle.json文件。 +```shell +pnpm uploadMaterials +``` + +#### 注意事项 +1. bundle.json文件内组件版本version字段为必须字段,缺少的需要补充不然上传接口报错 +2. bundle.json文件内组件版本version与数据库t_component内version不一致时为新增,一致为更新,也可根据自身需求更改相关代码逻辑 +3. .env.local中配置访问后端接口的路径,默认java后端路径 + +![注意事项图](./imgs/component_create_code.png '注意事项图') + +### 方案二 由于当前情况下物料无法通过页面交互维护,提供一个临时方案,由前端托管物料。 在本地运行时提供nodejs脚本维护物料,执行脚本保证mockServer工程和前端工程物料的同步。如果启动了后端服务,还可以连接数据库,保证本地json文件和数据库的一致性。 ![物料同步数据流转图](./imgs/synchronize-materials.png '物料同步数据流转图') -### 拆分脚本 +#### 拆分脚本 ```shell pnpm splitMaterials @@ -13,7 +27,7 @@ pnpm splitMaterials 之前对物料的修改要先从大文件bundle.json中找到对应组件,然后进行修改调试,很容易出现找错组件或难以对比历史的情况。 执行该脚本可以将物料资产包拆分为单个组件或区块,再结合构建的脚本,可以将修改限制在相对较小的文件中,便于维护物料和对比变更。 -### 构建脚本 +#### 构建脚本 ```shell pnpm buildMaterials @@ -26,14 +40,15 @@ pnpm buildMaterials - 连接数据库,初始化组件表,将组件数据写入数据库 - 监听组件文件变化,重新构建物料资产包和应用 mock 数据,新增或更新数据库中组件数据 -### 注意事项 +#### 注意事项 1. 本地还没有执行过拆分脚本的,先执行一次,后续可以不用再执行,只需要对单个组件进行维护 2. 单个组件文件需要遵循物料协议,更新文件后保存即可触发重新构建物料资产包,刷新页面后生效 3. 连接数据库失败,不影响构建本地物料资产包即bundle.json 4. 连接数据库需要的配置项在`.env.local`中 +5. 数据关联关系可能没有入库,如果查询不到新添加的组件,需要手动在数据库表r_material_component、r_material_history_component添加关联关系数据 -### 部署建议 +#### 部署建议 需要将设计器进行部署时,关于物料的部署方案,以下供参考: diff --git a/docs/tutorials/issue-1-2023.10.27.md b/docs/tutorials/issue-1-2023.10.27.md index 9e1e585c68..f2cb7562fe 100644 --- a/docs/tutorials/issue-1-2023.10.27.md +++ b/docs/tutorials/issue-1-2023.10.27.md @@ -34,20 +34,20 @@ 答:先简要介绍一下我们工程中主要的 package: ```js -  |_ canvas  负责中间画布渲染 -  |_ common  公共的组件以及 metaComponent  -  |_ controller  公共逻辑控制层 -  |_ design-core 总入口 -  |_ http  负责 http 相关请求 -  |_ i18n lowcode-i18n 包裹层 -  |_ plugins  左侧面板相关插件 -  |_ settings 右侧设置面板相关组件 -  |_ svgs svg 封装组件 -  |_ theme  主题相关样式 -  |_ toolbars 顶部工具栏相关 package -  |_ utils 公共utils -  |_ vue-generator 出码package -  |_ webcomponent webcomponent 封装 + |_ canvas 负责中间画布渲染 + |_ common 公共的组件以及 metaComponent + |_ controller 公共逻辑控制层 + |_ design-core 总入口 + |_ http 负责 http 相关请求 + |_ i18n lowcode-i18n 包裹层 + |_ plugins 左侧面板相关插件 + |_ settings 右侧设置面板相关组件 + |_ svgs svg 封装组件 + |_ theme 主题相关样式 + |_ toolbars 顶部工具栏相关 package + |_ utils 公共utils + |_ vue-generator 出码package + |_ webcomponent webcomponent 封装 ``` 区域大致职责划分: @@ -61,8 +61,8 @@ 1、资源请求 ```js -// packages/design-core/src/App.vue -// 这里发起请求物料、请求数据源、请求页面等相关资源请求,很关键 +// packages/design-core/src/App.vue +// 这里发起请求物料、请求数据源、请求页面等相关资源请求,很关键 useResource().fetchResource() ``` @@ -70,49 +70,49 @@ useResource().fetchResource() ```js packages -  |_ canvas -    |_ src -      |_ components -        |_ render -          |_ runner.js # 用于画布相关的资源请求,预设 -          |_ RenderMain.js # 画布渲染的入口,同时也暴露了许多 api 供修改 schema -          |_ render.js # RenderMain.js 会调用该文件的 renderer 方法,递归渲染 schema + |_ canvas + |_ src + |_ components + |_ render + |_ runner.js # 用于画布相关的资源请求,预设 + |_ RenderMain.js # 画布渲染的入口,同时也暴露了许多 api 供修改 schema + |_ render.js # RenderMain.js 会调用该文件的 renderer 方法,递归渲染 schema ``` 3、画布选中后,如何关联渲染右侧属性面板? ```js -// DesignCanvas.vue - -// 画布中节点选中后,会触发该方法 -const nodeSelected = (node, parent, type) => { -  const { toolbars } = useLayout().layoutState -  if (type !== 'clickTree') { -    useLayout().closePlugin() -  } -  // 动态计算该方法需要渲染的 属性面板 -  useProperties().getProps(node, parent) -  // 设置当前 schema -  useCanvas().setCurrentSchema(node) -  footData.value = getNodePath(node?.id) -  toolbars.visiblePopover = false +// DesignCanvas.vue + +// 画布中节点选中后,会触发该方法 +const nodeSelected = (node, parent, type) => { + const { toolbars } = useLayout().layoutState + if (type !== 'clickTree') { + useLayout().closePlugin() + } + // 动态计算该方法需要渲染的 属性面板 + useProperties().getProps(node, parent) + // 设置当前 schema + useCanvas().setCurrentSchema(node) + footData.value = getNodePath(node?.id) + toolbars.visiblePopover = false } ``` - ```js -// settings/props/src/Main.vue + ```vue +// settings/props/src/Main.vue + + + ``` @@ -130,7 +130,7 @@ const { properties } = useProperty({ pageState }) 可以拉下来源代码,按照原来静态资源图片等分类,放置进去要用的图片,在开发设计器的时候可以直接使用。 - 页面运行态: -可以通过 标签选中你要的静态资源,这部分的逻辑完全取决于用户 +可以通过 标签选中你要的静态资源,这部分的逻辑完全取决于用户 - 页面设计态: 低代码引擎在开源之前是有这样的功能的,但是为了开源的合规,屏蔽了该功能。因为在设计态想用到静态资源的话,要选中静态资源,并上传到公司的文件管理系统,然后文件系统返回静态资源地址,然后再展示在画布中。如果用户想要这样的功能,只需要开发一个文件上传按钮,并把上传的内容放置用户的文件管理系统。 @@ -141,26 +141,26 @@ const { properties } = useProperty({ pageState }) 以下为 bundle.json 这个文件的节选: ```json -{ "property": "text", -    "label": { -      "text": { -        "zh_CN": "按钮名称", -        "en_US": "Button Name" -       } -    }, -    "required": true, -     "readOnly": false, -     "disabled": false, -     "cols": 12, -     "widget": { -       "component": "MetaBindI18n", -       "props": {} -      }, -     "description": { -         "zh_CN": "按钮名称", -         "en_US": "Name of the button." -       } -   } +{ "property": "text", + "label": { + "text": { + "zh_CN": "按钮名称", + "en_US": "Button Name" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "MetaBindI18n", + "props": {} + }, + "description": { + "zh_CN": "按钮名称", + "en_US": "Name of the button." + } + } ``` ### 问题9:在使用 TinyEngine 低代码引擎后,组件之间应该如何联动? @@ -192,10 +192,10 @@ const { properties } = useProperty({ pageState }) 答:AI 能力目前已经在 TinyEngine 官网部署,当前采用的大模型是文心一言,通过 AI生成代码->生成 AST->页面 schema->展示在页面->下载源代码 ,后续会切回华为的盘古大模型。现在 AI 能力的取决于文心一言生成的代码。同时我们也通过数据和资源的不断投入在持续训练我们的 AI 能力,大家敬请期待 AI 能力的持续迭代。 -### 问题6:TinyEngine 低代码引擎是否支持 nuxt.js 作为后端的开发? +### 问题6:TinyEngine 低代码引擎是否支持 nuxt.js 作为后端的开发? 答:后端的开发与技术栈无关,是可以采用任意的技术栈的。我们提供了所有后端接口的文档,只需要按照设计器的文档来,给出对应接口的出入参即可。 ### 问题7:目前 TinyEngine 低代码引擎的物料平台是否会开源? -答:TinyEngine 目前是用到的物料是已开源的 TinyVue 组件库,欢迎大家使用~ \ No newline at end of file +答:TinyEngine 目前是用到的物料是已开源的 TinyVue 组件库,欢迎大家使用~ diff --git a/logo.svg b/logo.svg index 429ef19d5d..550ca5ac10 100644 --- a/logo.svg +++ b/logo.svg @@ -1,10 +1,15 @@ + + d="M131.8 7.32Q132.17 7.53 132.67 7.53Q133.05 7.53 133.36 7.4Q133.46 7.37 133.55 7.32Q133.73 7.22 133.87 7.08Q134.04 6.92 134.17 6.71Q134.24 6.59 134.28 6.47Q134.4 6.17 134.4 5.83Q134.4 5.4 134.22 5.06Q134.1 4.82 133.91 4.63Q133.73 4.46 133.51 4.35Q133.14 4.16 132.67 4.16Q132.16 4.16 131.77 4.38Q131.59 4.48 131.44 4.63Q131.28 4.79 131.17 4.98Q130.96 5.35 130.96 5.83Q130.96 6.31 131.16 6.67Q131.27 6.88 131.44 7.05Q131.61 7.21 131.8 7.32ZM58.92 21.16Q60.78 22.23 63.33 22.23Q65.98 22.23 67.95 21.14Q68.84 20.64 69.55 19.95Q70.39 19.13 70.97 18.03Q72.03 16.02 72.03 13.29Q72.03 10.76 71.06 8.83Q70.54 7.82 69.78 7.04Q69.11 6.35 68.23 5.85Q66.38 4.79 63.82 4.79Q61.13 4.79 59.16 5.89Q58.19 6.42 57.45 7.18Q56.67 7.96 56.13 8.99Q55.08 11 55.08 13.69Q55.08 16.24 56.07 18.17Q56.59 19.18 57.35 19.96Q58.03 20.66 58.92 21.16ZM115.59 7.48L120.85 7.48L120.85 22L123.78 22L123.78 7.48L128.78 7.48L129.05 5.03L115.85 5.03L115.59 7.48ZM66.46 19.12Q65.25 19.91 63.51 19.91Q61.76 19.91 60.57 19.1Q60.54 19.08 60.52 19.07Q60.15 18.8 59.83 18.48Q59.13 17.77 58.73 16.77Q58.14 15.32 58.14 13.48Q58.14 11.73 58.76 10.28Q59.16 9.36 59.8 8.68Q60.17 8.29 60.63 7.97Q60.71 7.91 60.8 7.86Q61.99 7.11 63.65 7.11Q65.51 7.11 66.7 7.96Q67.12 8.27 67.47 8.65Q68.08 9.32 68.42 10.24Q68.96 11.67 68.96 13.5Q68.96 15.36 68.35 16.81Q67.94 17.79 67.25 18.48Q66.91 18.81 66.51 19.08Q66.49 19.1 66.46 19.12ZM75.1 9.35Q75.19 11.04 75.19 12.44L75.19 27.28L78.09 27.03L78.09 21.81Q79.04 22.14 80.02 22.22Q80.32 22.24 80.63 22.24Q82.24 22.24 83.51 21.58Q83.64 21.51 83.77 21.43Q84.07 21.26 84.33 21.05Q85.3 20.28 85.89 19.05Q86.64 17.48 86.64 15.27Q86.64 13.15 85.98 11.77Q85.32 10.39 84.24 9.75Q83.74 9.46 83.2 9.3Q82.58 9.12 81.9 9.12Q81.25 9.12 80.65 9.28Q79.22 9.66 78.03 10.96Q77.97 10.14 77.82 9.35L75.1 9.35ZM91.5 16.04L99.77 16.04L99.77 15.27Q99.77 13.58 99.19 12.19Q98.84 11.35 98.27 10.72Q97.89 10.29 97.41 9.95Q96.21 9.12 94.41 9.12Q92.91 9.12 91.72 9.72Q91.54 9.81 91.37 9.91Q91.07 10.1 90.8 10.32Q89.88 11.06 89.32 12.22Q88.58 13.73 88.58 15.83Q88.58 17.85 89.27 19.28Q89.64 20.02 90.19 20.58Q90.69 21.1 91.35 21.47Q92.74 22.23 94.75 22.23Q97.4 22.23 99.52 21.2L98.89 19.22Q98.03 19.58 97.1 19.8Q96.17 20.01 95.28 20.01Q93.68 20.01 92.76 19.23Q91.61 18.24 91.5 16.04ZM102.49 9.35Q102.58 10.8 102.58 12.57L102.58 22L105.46 22L105.46 13.19Q106.24 12.37 107.03 11.89Q107.49 11.61 107.98 11.49Q108.35 11.4 108.75 11.4Q109.48 11.4 109.95 11.75Q110.77 12.38 110.77 14.1L110.77 22L113.64 22L113.64 13.9Q113.64 11.55 112.62 10.33Q112.33 9.99 111.98 9.74Q111.07 9.12 109.74 9.12Q108.75 9.12 107.95 9.43Q107.16 9.74 106.58 10.2Q106 10.66 105.42 11.32Q105.39 10.93 105.33 10.34Q105.27 9.75 105.19 9.35L102.49 9.35ZM137.75 9.35Q137.84 10.8 137.84 12.57L137.84 22L140.73 22L140.73 13.19Q141.5 12.37 142.3 11.89Q142.75 11.61 143.25 11.49Q143.62 11.4 144.01 11.4Q144.74 11.4 145.21 11.75Q146.03 12.38 146.03 14.1L146.03 22L148.91 22L148.91 13.9Q148.91 11.55 147.89 10.33Q147.6 9.99 147.24 9.74Q146.34 9.12 145 9.12Q144.01 9.12 143.22 9.43Q142.42 9.74 141.85 10.2Q141.27 10.66 140.68 11.32Q140.66 10.93 140.59 10.34Q140.53 9.75 140.46 9.35L137.75 9.35ZM134.12 9.35L131.23 9.35L131.23 22L134.12 22L134.12 9.35ZM151.13 27.17Q151.77 27.28 152.49 27.28Q153.96 27.28 154.99 26.74Q156.03 26.2 156.79 25.09Q157.55 23.98 158.21 22.16L162.86 9.35L159.94 9.35L157.57 16.53Q157.12 17.91 156.79 19.28Q156.63 18.3 156.05 16.48L153.71 9.35L150.6 9.35L155.27 22.1L155.08 22.57Q154.37 24.39 153.14 24.87Q152.7 25.04 152.2 25.04Q151.8 25.04 151.35 24.97Q150.91 24.89 150.62 24.81L150.09 26.92Q150.5 27.06 151.13 27.17ZM96.18 11.93Q96.86 12.69 96.94 14.2L91.58 14.2Q91.8 12.7 92.53 11.94Q92.85 11.61 93.23 11.42Q93.74 11.18 94.37 11.18Q95.12 11.18 95.68 11.51Q95.96 11.68 96.18 11.93ZM82.11 19.58Q81.34 20.1 80.23 20.1Q79.67 20.1 79.1 19.97Q78.52 19.85 78.09 19.64L78.09 12.87Q78.73 12.2 79.45 11.8Q79.72 11.65 80.01 11.55Q80.48 11.4 81.01 11.4Q81.64 11.4 82.14 11.66Q82.6 11.89 82.96 12.36Q83.69 13.31 83.69 15.43Q83.69 17.72 82.81 18.91Q82.5 19.31 82.11 19.58Z" fill-opacity="1.000000" fill-rule="evenodd" /> \ No newline at end of file diff --git a/mockServer/package.json b/mockServer/package.json index b9e3af7a4d..fc51eb47a3 100644 --- a/mockServer/package.json +++ b/mockServer/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-mock", - "version": "2.7.0", + "version": "2.9.0", "publishConfig": { "access": "public" }, diff --git a/mockServer/src/assets/json/appinfo.json b/mockServer/src/assets/json/appinfo.json index 8642dbbf1a..9aca3c9a4a 100644 --- a/mockServer/src/assets/json/appinfo.json +++ b/mockServer/src/assets/json/appinfo.json @@ -1684,21 +1684,6 @@ "created_at": "2022-07-01T03:21:19.000Z", "updated_at": "2022-07-01T03:21:19.000Z" }, - { - "id": 146, - "name": "npm", - "type": "function", - "content": { - "type": "JSFunction", - "value": "''" - }, - "app": 1, - "category": "utils", - "created_by": null, - "updated_by": null, - "created_at": "2022-08-29T06:54:02.000Z", - "updated_at": "2023-01-05T01:00:52.000Z" - }, { "id": 102, "name": "Pager", diff --git a/mockServer/src/mock/get/app-center/apps/extension/list.json b/mockServer/src/mock/get/app-center/apps/extension/list.json index 5b50e93108..87f2cbde9c 100644 --- a/mockServer/src/mock/get/app-center/apps/extension/list.json +++ b/mockServer/src/mock/get/app-center/apps/extension/list.json @@ -66,19 +66,6 @@ "created_at": "2022-07-01T03:21:19.000Z", "updated_at": "2022-07-01T03:21:19.000Z" }, - { - "id": 146, - "name": "npm", - "type": "function", - "content": { - "type": "JSFunction", - "value": "''" - }, - "app": 1, - "category": "utils", - "created_at": "2022-08-29T06:54:02.000Z", - "updated_at": "2023-01-05T01:00:52.000Z" - }, { "id": 102, "name": "Pager", diff --git a/mockServer/src/mock/get/app-center/v1/apps/schema/1.json b/mockServer/src/mock/get/app-center/v1/apps/schema/1.json index 96b7617b9b..9240b466b8 100644 --- a/mockServer/src/mock/get/app-center/v1/apps/schema/1.json +++ b/mockServer/src/mock/get/app-center/v1/apps/schema/1.json @@ -2015,6 +2015,48 @@ "destructuring": true, "version": "3.20.0" }, + { + "componentName": "TinyRate", + "package": "@opentiny/vue", + "exportName": "TinyRate", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinySlider", + "package": "@opentiny/vue", + "exportName": "TinySlider", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyCascader", + "package": "@opentiny/vue", + "exportName": "TinyCascader", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinySteps", + "package": "@opentiny/vue", + "exportName": "TinySteps", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyTreeMenu", + "package": "@opentiny/vue", + "exportName": "TinyTreeMenu", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyRadioGroup", + "package": "@opentiny/vue", + "exportName": "TinyRadioGroup", + "destructuring": true, + "version": "3.22.0" + }, { "componentName": "ElInput", "package": "element-plus", @@ -2057,6 +2099,118 @@ "destructuring": true, "version": "2.4.2" }, + { + "componentName": "TinyProgress", + "package": "@opentiny/vue", + "exportName": "TinyProgress", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinySkeleton", + "package": "@opentiny/vue", + "exportName": "TinySkeleton", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyCard", + "package": "@opentiny/vue", + "exportName": "TinyCard", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyCalendar", + "package": "@opentiny/vue", + "exportName": "TinyCalendar", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyBadge", + "package": "@opentiny/vue", + "exportName": "TinyBadge", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyTag", + "package": "@opentiny/vue", + "exportName": "TinyTag", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyStatistic", + "package": "@opentiny/vue", + "exportName": "TinyStatistic", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsFunnel", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsFunnel", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsScatter", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsScatter", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsWaterfall", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsWaterfall", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsLine", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsLine", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsHistogram", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsHistogram", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsPie", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsPie", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsBar", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsBar", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsRing", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsRing", + "destructuring": true, + "version": "3.22.0" + }, + { + "componentName": "TinyHuichartsRadar", + "package": "@opentiny/vue-huicharts", + "exportName": "TinyHuichartsRadar", + "destructuring": true, + "version": "3.22.0" + }, { "componentName": "PortalHome", "main": "common/components/home", @@ -2137,14 +2291,6 @@ "main": "" } }, - { - "name": "npm", - "type": "function", - "content": { - "type": "JSFunction", - "value": "''" - } - }, { "name": "Pager", "type": "npm", diff --git a/package.json b/package.json index 290df88e42..5e101abe25 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "setup": "node ./scripts/setup.js", "splitMaterials": "node ./scripts/splitMaterials.mjs", "buildMaterials": "node ./scripts/buildMaterials.mjs", - "updateTemplate": "node ./scripts/updateTemplate.mjs" + "updateTemplate": "node ./scripts/updateTemplate.mjs", + "uploadMaterials": "node scripts/uploadMaterials.mjs" }, "devDependencies": { "@eslint/js": "^8.57.1", @@ -55,7 +56,7 @@ }, "pnpm": { "patchedDependencies": { - "@vue/repl@2.9.0": "patches/@vue__repl@2.9.0.patch" + "@vue/repl@4.6.1": "patches/@vue__repl@4.6.1.patch" }, "overrides": { "rollup": "~4.44.0" diff --git a/packages/block-compiler/package.json b/packages/block-compiler/package.json index 6069be67e6..1dc770dd0d 100644 --- a/packages/block-compiler/package.json +++ b/packages/block-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-block-compiler", - "version": "2.7.0", + "version": "2.9.0", "publishConfig": { "access": "public" }, diff --git a/packages/build/vite-config/package.json b/packages/build/vite-config/package.json index 830e776236..0443a2e95c 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.7.0", + "version": "2.9.0", "description": "", "type": "module", "main": "./index.js", diff --git a/packages/build/vite-config/src/canvas-dev-external.js b/packages/build/vite-config/src/canvas-dev-external.js index 464f11d7f6..86db5844fc 100644 --- a/packages/build/vite-config/src/canvas-dev-external.js +++ b/packages/build/vite-config/src/canvas-dev-external.js @@ -1,37 +1,38 @@ import vitePluginExternalize from 'vite-plugin-externalize-dependencies' import { genImportMapPlugin } from './vite-plugins/genImportMapOnly.js' -export function canvasDevExternal(override = {}) { - const prefix = '/node_modules/@opentiny/tiny-engine' - // 以下内容由于区块WebComponent加载需要补充 - const blockRequire = { - externals: [/^@opentiny\/vue$/, /^@opentiny\/vue-icon$/], +export const prefix = '/node_modules/@opentiny/tiny-engine' +export const dependencies = { + base: { imports: { - '@opentiny/vue': `${prefix}/node_modules/@opentiny/vue-runtime/dist3/tiny-vue-pc.mjs`, - '@opentiny/vue-icon': `${prefix}/node_modules/@opentiny/vue-runtime/dist3/tiny-vue-icon.mjs` + vue: `${prefix}/node_modules/vue/dist/vue.runtime.esm-browser.js`, + 'vue-i18n': `${prefix}/node_modules/vue-i18n/dist/vue-i18n.esm-browser.js` }, - importStyles: [`${prefix}/node_modules/@opentiny/vue-theme/index.css`] - } - // 以下内容由于物料协议不支持声明子依赖而@opentiny/vue需要依赖所以需要补充 - const tinyVueRequire = { + externals: [/^vue$/, /^vue-i18n$/] + }, + ui: { imports: { + '@opentiny/vue': `${prefix}/node_modules/@opentiny/vue-runtime/dist3/tiny-vue-pc.mjs`, + '@opentiny/vue-icon': `${prefix}/node_modules/@opentiny/vue-runtime/dist3/tiny-vue-icon.mjs`, '@opentiny/vue-common': `${prefix}/node_modules/@opentiny/vue-runtime/dist3/tiny-vue-common.mjs`, '@opentiny/vue-locale': `${prefix}/node_modules/@opentiny/vue-runtime/dist3/tiny-vue-locale.mjs` - } + }, + externals: [/^@opentiny\/vue$/, /^@opentiny\/vue-icon$/, /^@opentiny\/vue-common$/, /^@opentiny\/vue-locale$/], + importStyles: [`${prefix}/node_modules/@opentiny/vue-theme/index.css`] } +} +export function canvasDevExternal(override = {}) { return [ - vitePluginExternalize({ externals: [/^vue$/, /^vue-i18n$/, ...blockRequire.externals] }), + vitePluginExternalize({ externals: [...dependencies.base.externals, ...dependencies.ui.externals] }), genImportMapPlugin( { imports: { - vue: `${prefix}/node_modules/vue/dist/vue.runtime.esm-browser.js`, - 'vue-i18n': `${prefix}/node_modules/vue-i18n/dist/vue-i18n.esm-browser.js`, - ...blockRequire.imports, - ...tinyVueRequire.imports, + ...dependencies.base.imports, + ...dependencies.ui.imports, ...override } }, - [...blockRequire.importStyles] + [...dependencies.ui.importStyles] ) ] } diff --git a/packages/build/vite-config/src/default-config.js b/packages/build/vite-config/src/default-config.js index d58b02cf8a..010bf4e148 100644 --- a/packages/build/vite-config/src/default-config.js +++ b/packages/build/vite-config/src/default-config.js @@ -6,15 +6,15 @@ import vueJsx from '@vitejs/plugin-vue-jsx' import nodeGlobalsPolyfillPluginCjs from '@esbuild-plugins/node-globals-polyfill' import nodeModulesPolyfillPluginCjs from '@esbuild-plugins/node-modules-polyfill' import nodePolyfill from 'rollup-plugin-polyfill-node' -import esbuildCopy from 'esbuild-plugin-copy' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' import visualizerCjs from 'rollup-plugin-visualizer' import generateComment from '@opentiny/tiny-engine-vite-plugin-meta-comments' import { getBaseUrlFromCli, copyBundleDeps, importMapLocalPlugin } from './localCdnFile/index.js' import { devAliasPlugin } from './vite-plugins/devAliasPlugin.js' import { htmlUpgradeHttpsPlugin } from './vite-plugins/upgradeHttpsPlugin.js' -import { canvasDevExternal } from './canvas-dev-external.js' import { treeShakingPlugin } from './vite-plugins/treeShakingPlugin.js' +import { canvasDevExternal } from './canvas-dev-external.js' +import { runtimeExternal } from './runtime-external.js' const monacoEditorPlugin = monacoEditorPluginCjs.default const nodeGlobalsPolyfillPlugin = nodeGlobalsPolyfillPluginCjs.default @@ -78,25 +78,21 @@ const getDefaultConfig = (engineConfig) => { vueJsx() ], optimizeDeps: { + // 避免 @vue/repl 的 monaco-editor 等依赖被优化掉 + exclude: ['@vue/repl'], esbuildOptions: { plugins: [ nodeGlobalsPolyfillPlugin({ process: true, buffer: true }), - nodeModulesPolyfillPlugin(), - esbuildCopy({ - //@vue/repl monaco编辑器需要 - resolveFrom: 'cwd', - assets: { - from: ['./node_modules/@vue/repl/dist/assets/*'], // worker.js文件以url形式引用不会被esbuild拉起,需要手动复制 - to: ['./node_modules/.vite/assets'] // 开发态,js文件被缓存在.vite/deps,请求相对路径为.vite/assets - }, - watch: true - }) + nodeModulesPolyfillPlugin() ] } }, + define: { + 'process.env': {} + }, build: { commonjsOptions: { transformMixedEsModules: true, @@ -193,5 +189,9 @@ export function useTinyEngineBaseConfig(engineConfig) { config.plugins.push(canvasDevExternal()) } + if (engineConfig.useSourceAlias && command !== 'serve') { + config.plugins.push(runtimeExternal()) + } + return config } diff --git a/packages/build/vite-config/src/runtime-external.js b/packages/build/vite-config/src/runtime-external.js new file mode 100644 index 0000000000..d051137f3a --- /dev/null +++ b/packages/build/vite-config/src/runtime-external.js @@ -0,0 +1,84 @@ +import { dependencies } from './canvas-dev-external.js' + +/** + * 嵌入 + diff --git a/packages/builtinComponent/src/components/BasePage.vue b/packages/builtinComponent/src/components/BasePage.vue new file mode 100644 index 0000000000..5c1d0ef475 --- /dev/null +++ b/packages/builtinComponent/src/components/BasePage.vue @@ -0,0 +1,533 @@ + + + diff --git a/packages/builtinComponent/src/components/BaseTable.vue b/packages/builtinComponent/src/components/BaseTable.vue new file mode 100644 index 0000000000..a9bb0e5c84 --- /dev/null +++ b/packages/builtinComponent/src/components/BaseTable.vue @@ -0,0 +1,269 @@ + + + diff --git a/packages/builtinComponent/src/components/CanvasNavigation.vue b/packages/builtinComponent/src/components/CanvasNavigation.vue new file mode 100644 index 0000000000..181c0b14d3 --- /dev/null +++ b/packages/builtinComponent/src/components/CanvasNavigation.vue @@ -0,0 +1,37 @@ + + + + + diff --git a/packages/builtinComponent/src/meta/BaseForm.json b/packages/builtinComponent/src/meta/BaseForm.json new file mode 100644 index 0000000000..b32343d0d5 --- /dev/null +++ b/packages/builtinComponent/src/meta/BaseForm.json @@ -0,0 +1,1158 @@ +{ + "component": { + "icon": "form", + "name": { + "zh_CN": "FormModel" + }, + "component": "FormModel", + "schema": { + "properties": [ + { + "label": { + "zh_CN": "选择模型" + }, + "description": { + "zh_CN": "选择模型" + }, + "content": [ + { + "property": "serviceModel", + "label": { + "text": { + "zh_CN": "选择模型" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "bindState": false, + "cols": 12, + "widget": { + "component": "ModelConfigurator", + "props": { + "expand": true + } + }, + "properties": [ + { + "label": { + "zh_CN": "默认分组", + "en_US": "Default Group" + }, + "content": [ + { + "property": "label", + "type": "string", + "label": { + "text": { + "zh_CN": "表单项标签", + "en_US": "Form Item Label" + } + }, + "required": true, + "bindState": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表单项标签", + "en_US": "Form item's label." + } + }, + { + "property": "prop", + "bindState": false, + "disabled": true, + "label": { + "text": { + "zh_CN": "字段名", + "en_US": "Field Name" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "字段名", + "en_US": "Name of the form field." + } + }, + { + "property": "required", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "必填", + "en_US": "Required" + } + }, + "required": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否必填", + "en_US": "Enable required or not." + } + }, + { + "property": "rules", + "label": { + "text": { + "zh_CN": "校验规则", + "en_US": "Verification Rules" + } + }, + "required": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "表单项校验", + "en_US": "Verification for form item." + } + }, + { + "property": "component", + "type": "string", + "required": false, + "bindState": true, + "cols": 12, + "label": { + "text": { + "zh_CN": "输入类型", + "en_US": "Input Type" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": { + "zh_CN": "输入框", + "en_US": "Input" + }, + "value": "TinyInput" + }, + { + "label": { + "zh_CN": "选择器", + "en_US": "Select" + }, + "value": "TinySelect" + }, + { + "label": { + "zh_CN": "多选框", + "en_US": "Checkbox" + }, + "value": "TinyCheckbox" + }, + { + "label": { + "zh_CN": "单选框", + "en_US": "Radio" + }, + "value": "TinyRadio" + }, + { + "label": { + "zh_CN": "日期选择器", + "en_US": "Date Picker" + }, + "value": "TinyDatePicker" + } + ] + } + }, + "description": { + "zh_CN": "输入类型", + "en_US": "Type of the input." + } + } + ] + }, + { + "componentName": "TinyInput", + "label": { + "zh_CN": "输入框", + "en_US": "Input" + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "textarea", + "value": "textarea" + }, + { + "label": "text", + "value": "text" + }, + { + "label": "password", + "value": "password" + } + ] + } + }, + "description": { + "zh_CN": "设置input框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "rows", + "label": { + "text": { + "zh_CN": "行数" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框行数,只对 type='textarea' 有效" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinySelect", + "label": { + "zh_CN": "选择器", + "en_US": "Select" + }, + "content": [ + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "searchable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "下拉可搜索" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "下拉面板是否可搜索" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "options", + "label": { + "text": { + "zh_CN": "选项数据" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "配置 Select 下拉数据项" + }, + "labelPosition": "top" + }, + { + "property": "multiple", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "多选" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否允许输入框输入或选择多个项" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyDatePicker", + "label": { + "zh_CN": "日期选择器", + "en_US": "DatePicker" + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "日期", + "value": "date" + }, + { + "label": "日期时间", + "value": "datetime" + }, + { + "label": "周", + "value": "week" + }, + { + "label": "月份", + "value": "month" + }, + { + "label": "年份", + "value": "year" + } + ] + } + }, + "description": { + "zh_CN": "设置日期框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "readonly", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "只读" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "format", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "格式化" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "valueFormat", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "绑定值格式化" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "value-format" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyRadio", + "label": { + "zh_CN": "单选框", + "en_US": "Radio" + }, + "content": [ + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "单选框文本内容" + } + }, + { + "property": "label", + "label": { + "text": { + "zh_CN": "选中值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "radio 选中时的值" + } + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyCheckbox", + "label": { + "zh_CN": "多选框", + "en_US": "Checkbox" + }, + "content": [ + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "checked", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "勾选" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "当前是否勾选" + }, + "labelPosition": "left" + }, + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "复选框的文本" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyNumeric", + "label": { + "zh_CN": "数组输入框", + "en_US": "Numeric" + }, + "content": [ + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "allow-empty", + "label": { + "text": { + "zh_CN": "内容可清空" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否内容可清空" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + }, + { + "property": "controls", + "label": { + "text": { + "zh_CN": "加减按钮" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否使用加减按钮" + }, + "labelPosition": "left" + }, + { + "property": "controls-position", + "label": { + "text": { + "zh_CN": "加减按钮位置" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "左右两侧", + "value": "" + }, + { + "label": "只在右侧", + "value": "right" + } + ] + } + }, + "description": { + "zh_CN": "加减按钮位置" + } + }, + { + "property": "precision", + "label": { + "text": { + "zh_CN": "精度" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "数值精度" + }, + "labelPosition": "left" + }, + { + "property": "step", + "label": { + "text": { + "zh_CN": "步长" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "步长" + }, + "labelPosition": "left" + } + ] + } + ], + "labelPosition": "top" + }, + { + "property": "modelApis", + "label": { + "text": { + "zh_CN": "绑定模型方法" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "bindState": false, + "cols": 12, + "widget": { + "component": "ModelApiConfigurator", + "props": {} + }, + "labelPosition": "top" + } + ] + }, + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "layout", + "label": { + "text": { + "zh_CN": "表单布局", + "en_US": "From Layout" + } + }, + "required": true, + "bindState": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": { + "zh_CN": "一列布局", + "en_US": "One-column Layout" + }, + "value": 1 + }, + { + "label": { + "zh_CN": "两列布局", + "en_US": "Two-column Layout" + }, + "value": 2 + }, + { + "label": { + "zh_CN": "三列布局", + "en_US": "Three-column Layout" + }, + "value": 3 + } + ] + } + }, + "description": { + "zh_CN": "设置表单布局", + "en_US": "Set the form layout." + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用", + "en_US": "Disabled" + } + }, + "required": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用", + "en_US": "Enable Disabled or not." + } + }, + { + "property": "viewOnly", + "label": { + "text": { + "zh_CN": "只读", + "en_US": "Readonly" + } + }, + "required": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "控制编辑态、查看态", + "en_US": "Control the editing and viewing states." + } + }, + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "表单数据绑定变量", + "en_US": "Binding Variables For Form Data" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "BindVariableConfigurator", + "props": { + "defaultValue": [] + } + }, + "description": { + "zh_CN": "为表单数据绑定变量", + "en_US": "Binding Variables For Form Data." + } + } + ] + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "绑定值改变时触发", + "en_US": "Binding changed Triggered" + }, + "description": { + "zh_CN": "绑定值改变时触发", + "en_US": "Triggered when the value of the binding changes." + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "array", + "defaultValue": [], + "description": { + "zh_CN": "双向绑定值", + "en_US": "Binding value." + } + } + ], + "returns": {} + } + } + } + }, + "configure": { + "loop": false, + "condition": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": [], + "parentWhitelist": "" + } + } + }, + "snippet": { + "name": { + "zh_CN": "表单模型", + "en_US": "FormModel" + }, + "icon": "form", + "screenshot": "", + "snippetName": "FormModel", + "schema": { + "componentName": "FormModel", + "props": {} + } + } +} diff --git a/packages/builtinComponent/src/meta/BasePage.json b/packages/builtinComponent/src/meta/BasePage.json new file mode 100644 index 0000000000..7e095e6f15 --- /dev/null +++ b/packages/builtinComponent/src/meta/BasePage.json @@ -0,0 +1,1666 @@ +{ + "component": { + "icon": "form", + "name": { + "zh_CN": "PageModel" + }, + "component": "PageModel", + "schema": { + "properties": [ + { + "label": { + "zh_CN": "选择模型" + }, + "description": { + "zh_CN": "选择模型" + }, + "content": [ + { + "property": "serviceModel", + "label": { + "text": { + "zh_CN": "选择模型" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "bindState": false, + "cols": 12, + "widget": { + "component": "ModelConfigurator", + "props": { + "expand": true + } + }, + "properties": [ + { + "label": { + "zh_CN": "默认分组", + "en_US": "Default Group" + }, + "content": [ + { + "property": "label", + "type": "string", + "label": { + "text": { + "zh_CN": "表单项标签", + "en_US": "Form Item Label" + } + }, + "required": true, + "bindState": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表单项标签", + "en_US": "Form item's label." + } + }, + { + "property": "prop", + "bindState": false, + "disabled": true, + "label": { + "text": { + "zh_CN": "字段名", + "en_US": "Field Name" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "字段名", + "en_US": "Name of the form field." + } + }, + { + "property": "required", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "必填", + "en_US": "Required" + } + }, + "required": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否必填", + "en_US": "Enable required or not." + } + }, + { + "property": "rules", + "label": { + "text": { + "zh_CN": "校验规则", + "en_US": "Verification Rules" + } + }, + "required": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "表单项校验", + "en_US": "Verification for form item." + } + }, + { + "property": "component", + "type": "string", + "required": false, + "bindState": true, + "cols": 12, + "label": { + "text": { + "zh_CN": "输入类型", + "en_US": "Input Type" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": { + "zh_CN": "输入框", + "en_US": "Input" + }, + "value": "TinyInput" + }, + { + "label": { + "zh_CN": "选择器", + "en_US": "Select" + }, + "value": "TinySelect" + }, + { + "label": { + "zh_CN": "多选框", + "en_US": "Checkbox" + }, + "value": "TinyCheckbox" + }, + { + "label": { + "zh_CN": "单选框", + "en_US": "Radio" + }, + "value": "TinyRadio" + }, + { + "label": { + "zh_CN": "日期选择器", + "en_US": "Date Picker" + }, + "value": "TinyDatePicker" + } + ] + } + }, + "description": { + "zh_CN": "输入类型", + "en_US": "Type of the input." + } + } + ] + }, + { + "componentName": "TinyInput", + "label": { + "zh_CN": "输入框", + "en_US": "Input" + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "textarea", + "value": "textarea" + }, + { + "label": "text", + "value": "text" + }, + { + "label": "password", + "value": "password" + } + ] + } + }, + "description": { + "zh_CN": "设置input框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "rows", + "label": { + "text": { + "zh_CN": "行数" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框行数,只对 type='textarea' 有效" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinySelect", + "label": { + "zh_CN": "选择器", + "en_US": "Select" + }, + "content": [ + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "searchable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "下拉可搜索" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "下拉面板是否可搜索" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "options", + "label": { + "text": { + "zh_CN": "选项数据" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "bindState": true, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "配置 Select 下拉数据项" + }, + "labelPosition": "top" + }, + { + "property": "multiple", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "多选" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否允许输入框输入或选择多个项" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyDatePicker", + "label": { + "zh_CN": "日期选择器", + "en_US": "DatePicker" + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "日期", + "value": "date" + }, + { + "label": "日期时间", + "value": "datetime" + }, + { + "label": "周", + "value": "week" + }, + { + "label": "月份", + "value": "month" + }, + { + "label": "年份", + "value": "year" + } + ] + } + }, + "description": { + "zh_CN": "设置日期框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "readonly", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "只读" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "format", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "格式化" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "valueFormat", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "绑定值格式化" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "value-format" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyRadio", + "label": { + "zh_CN": "单选框", + "en_US": "Radio" + }, + "content": [ + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "单选框文本内容" + } + }, + { + "property": "label", + "label": { + "text": { + "zh_CN": "选中值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "radio 选中时的值" + } + }, + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyCheckbox", + "label": { + "zh_CN": "多选框", + "en_US": "Checkbox" + }, + "content": [ + { + "property": "disabled", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "checked", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "勾选" + } + }, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "当前是否勾选" + }, + "labelPosition": "left" + }, + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "复选框的文本" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyNumeric", + "label": { + "zh_CN": "数组输入框", + "en_US": "Numeric" + }, + "content": [ + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "allow-empty", + "label": { + "text": { + "zh_CN": "内容可清空" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否内容可清空" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + }, + { + "property": "controls", + "label": { + "text": { + "zh_CN": "加减按钮" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否使用加减按钮" + }, + "labelPosition": "left" + }, + { + "property": "controls-position", + "label": { + "text": { + "zh_CN": "加减按钮位置" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "左右两侧", + "value": "" + }, + { + "label": "只在右侧", + "value": "right" + } + ] + } + }, + "description": { + "zh_CN": "加减按钮位置" + } + }, + { + "property": "precision", + "label": { + "text": { + "zh_CN": "精度" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "数值精度" + }, + "labelPosition": "left" + }, + { + "property": "step", + "label": { + "text": { + "zh_CN": "步长" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "步长" + }, + "labelPosition": "left" + } + ] + } + ], + "labelPosition": "top" + }, + { + "property": "modelApis", + "label": { + "text": { + "zh_CN": "绑定模型方法" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "bindState": false, + "cols": 12, + "widget": { + "component": "ModelApiConfigurator", + "props": {} + }, + "labelPosition": "top" + }, + { + "property": "searchFormData", + "label": { + "text": { + "zh_CN": "搜索表单绑定变量", + "en_US": "Binding Variables For Search Form" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "BindVariableConfigurator" + }, + "description": { + "zh_CN": "为搜索表单绑定变量", + "en_US": "Binding Variables For Search Form." + } + }, + { + "property": "tableData", + "label": { + "text": { + "zh_CN": "表格数据绑定变量", + "en_US": "Binding Variables For Table Data" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "BindVariableConfigurator", + "props": { + "defaultValue": [], + "isValueArray": true + } + }, + "description": { + "zh_CN": "为表格数据绑定变量", + "en_US": "Binding Variables For Search Form." + } + }, + { + "property": "editFormData", + "label": { + "text": { + "zh_CN": "数据表单绑定变量", + "en_US": "Binding Variables For Data Form" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "BindVariableConfigurator" + }, + "description": { + "zh_CN": "为新增数据或编辑数据表单绑定变量", + "en_US": "Binding Variables For Add or Edit Form." + } + } + ] + }, + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "layout", + "label": { + "text": { + "zh_CN": "表单布局", + "en_US": "From Layout" + } + }, + "required": true, + "bindState": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": { + "zh_CN": "一列布局", + "en_US": "One-column Layout" + }, + "value": 1 + }, + { + "label": { + "zh_CN": "两列布局", + "en_US": "Two-column Layout" + }, + "value": 2 + }, + { + "label": { + "zh_CN": "三列布局", + "en_US": "Three-column Layout" + }, + "value": 3 + } + ] + } + }, + "description": { + "zh_CN": "设置表单布局", + "en_US": "Set the form layout." + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + } + ] + }, + { + "label": { + "zh_CN": "表格信息" + }, + "description": { + "zh_CN": "表格信息" + }, + "content": [ + { + "property": "selectedEnabled", + "resetProps": true, + "label": { + "text": { + "zh_CN": "启用复选", + "en_US": "enable select data" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否允许复选框选中数据", + "en_US": "Whether to allow the check box to select data" + }, + "labelPosition": "left" + }, + { + "property": "handleSelectedRows", + "label": { + "text": { + "zh_CN": "处理选中数据方法", + "en_US": "Method of Processing Selected Data" + } + }, + "defaultValue": { + "type": "JSFunction", + "value": "/**\r\n * 获取表格勾选数据方法\r\n * tableSelection - 表格已勾选的数据\r\n */\r\nfunction handleSelectedRows(tableSelection) {\r\n // 处理方法函数体\r\n}" + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "javascript", + "dataType": "JSFunction" + } + }, + "description": { + "zh_CN": "处理选中数据方法", + "en_US": "Method of Processing Selected Data" + }, + "labelPosition": "left" + }, + { + "property": "rowOperationEnabled", + "resetProps": true, + "label": { + "text": { + "zh_CN": "启用行操作", + "en_US": "enable row operation" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否使用行操作", + "en_US": "Whether to allow the row operation" + }, + "labelPosition": "left" + }, + { + "property": "useIconOperation", + "resetProps": true, + "label": { + "text": { + "zh_CN": "使用图标", + "en_US": "use icon operation" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "行操作是否使用图标", + "en_US": "use Icon Whether to handle the row operation" + }, + "labelPosition": "left" + }, + { + "type": "configList", + "property": "rowOperations", + "label": { + "text": { + "zh_CN": "行操作", + "en_US": "Row Operation" + } + }, + "required": false, + "cols": 12, + "properties": [ + { + "label": { + "zh_CN": "默认分组", + "en_US": "Default Group" + }, + "content": [ + { + "property": "label", + "type": "string", + "label": { + "text": { + "zh_CN": "文本", + "en_US": "Text" + } + }, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "操作名称", + "en_US": "Operation's name." + } + }, + { + "property": "icon", + "type": "string", + "label": { + "text": { + "zh_CN": "图标", + "en_US": "Icon" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": { + "placeholder": "请输入图标类名" + } + }, + "description": { + "zh_CN": "图标库地址: https://tinyuidesign.cloudbu.huawei.com/tiny-vue/zh-CN/os-theme/components/icon#list", + "en_US": "Icon Library Address: https://tinyuidesign.cloudbu.huawei.com/tiny-vue/zh-CN/os-theme/components/icon#list" + } + }, + { + "property": "handler", + "label": { + "text": { + "zh_CN": "点击回调事件", + "en_US": "Click Callback Event" + } + }, + "defaultValue": { + "type": "JSFunction", + "value": "function handleRow(row, index, extendApis) {}" + }, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + }, + "description": { + "zh_CN": "操作的回调函数", + "en_US": "Callback functions for operations." + } + } + ] + } + ], + "widget": { + "component": "OperatorGroupConfigurator", + "props": { + "type": "object", + "textField": "label", + "language": "json", + "buttonText": "编辑行操作", + "title": "编辑行操作", + "enableVisibleControl": true, + "disableDelete": true, + "expand": true, + "isAbleBatchOperation": true + } + }, + "description": { + "zh_CN": "表格自定义行操作", + "en_US": "Custom operations For table's row." + }, + "labelPosition": "top" + }, + { + "property": "columnMinWidth", + "label": { + "text": { + "zh_CN": "表格列最小宽度", + "en_US": "Minimum Column Width" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表格列最小宽度", + "en_US": "Minimum width of table's column." + } + }, + { + "property": "columnWidth", + "label": { + "text": { + "zh_CN": "表格列宽度", + "en_US": "Column Width" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表格列宽度", + "en_US": "Width of table's column." + } + } + ] + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "绑定值改变时触发", + "en_US": "Binding changed Triggered" + }, + "description": { + "zh_CN": "绑定值改变时触发", + "en_US": "Triggered when the value of the binding changes." + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "array", + "defaultValue": [], + "description": { + "zh_CN": "双向绑定值", + "en_US": "Binding value." + } + } + ], + "returns": {} + } + }, + "onUpdate:searchFormData": { + "label": { + "zh_CN": "绑定值改变时触发", + "en_US": "Binding changed Triggered" + }, + "description": { + "zh_CN": "绑定值改变时触发", + "en_US": "Triggered when the value of the binding changes." + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "object", + "defaultValue": {}, + "description": { + "zh_CN": "双向绑定值", + "en_US": "Binding value." + } + } + ], + "returns": {} + } + }, + "onUpdate:tableData": { + "label": { + "zh_CN": "绑定值改变时触发", + "en_US": "Binding changed Triggered" + }, + "description": { + "zh_CN": "绑定值改变时触发", + "en_US": "Triggered when the value of the binding changes." + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "array", + "defaultValue": [], + "description": { + "zh_CN": "双向绑定值", + "en_US": "Binding value." + } + } + ], + "returns": {} + } + }, + "onUpdate:editFormData": { + "label": { + "zh_CN": "绑定值改变时触发", + "en_US": "Binding changed Triggered" + }, + "description": { + "zh_CN": "绑定值改变时触发", + "en_US": "Triggered when the value of the binding changes." + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "object", + "defaultValue": {}, + "description": { + "zh_CN": "双向绑定值", + "en_US": "Binding value." + } + } + ], + "returns": {} + } + }, + "onFilterChange": { + "label": { + "zh_CN": "筛选条件改变时触发改事件" + }, + "description": { + "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSortChange": { + "label": { + "zh_CN": "点击列头,执行数据排序前触发的事件" + }, + "description": { + "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSelectAll": { + "label": { + "zh_CN": "当手动勾选全选时触发的事件" + }, + "description": { + "zh_CN": "只对 type=selection 有效,当手动勾选全选时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 包含 table 实例对象" + } + }, + { + "name": "checked", + "type": "boolean", + "defaultValue": "", + "description": { + "zh_CN": "勾选状态" + } + }, + { + "name": "selction", + "type": "Array", + "defaultValue": "", + "description": { + "zh_CN": "选中的表格数据数组" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSelectChange": { + "label": { + "zh_CN": "手动勾选并且值发生改变时触发的事件" + }, + "description": { + "zh_CN": "只对 type=selection 有效,当手动勾选并且值发生改变时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " table 实例对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 原生 Event" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onToggleExpandChange": { + "label": { + "zh_CN": "当行展开或收起时会触发该事件" + }, + "description": { + "zh_CN": "当行展开或收起时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,row,rowIndex} 包含 table 实例对象和当前行数据的对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 原生 Event" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onCurrentChange": { + "label": { + "zh_CN": "行点击时触发" + }, + "description": { + "zh_CN": "行点击时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": false, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": [], + "parentWhitelist": "" + } + } + }, + "snippet": { + "name": { + "zh_CN": "页面模型", + "en_US": "PageModel" + }, + "icon": "page", + "screenshot": "", + "snippetName": "PageModel", + "schema": { + "componentName": "PageModel", + "props": { + "rowOperations": { + "value": [ + { + "label": "编辑", + "icon": "IconEdit", + "builtIn": true, + "itemVisible": true + }, + { + "label": "删除", + "icon": "IconDel", + "builtIn": true, + "itemVisible": true + } + ] + } + } + } + } +} diff --git a/packages/builtinComponent/src/meta/BaseTable.json b/packages/builtinComponent/src/meta/BaseTable.json new file mode 100644 index 0000000000..009d9edb37 --- /dev/null +++ b/packages/builtinComponent/src/meta/BaseTable.json @@ -0,0 +1,1792 @@ +{ + "component": { + "icon": "grid", + "name": { + "zh_CN": "TableModel" + }, + "component": "TableModel", + "schema": { + "properties": [ + { + "label": { + "zh_CN": "选择模型" + }, + "description": { + "zh_CN": "选择模型" + }, + "content": [ + { + "property": "serviceModel", + "label": { + "text": { + "zh_CN": "选择模型" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "bindState": false, + "cols": 12, + "widget": { + "component": "ModelConfigurator", + "props": { + "expand": true + } + }, + "properties": [ + { + "label": { + "zh_CN": "默认分组", + "en_US": "Default Group" + }, + "content": [ + { + "property": "label", + "type": "string", + "label": { + "text": { + "zh_CN": "列标题", + "en_US": "Column Title" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "列标题", + "en_US": "Column's title." + } + }, + { + "property": "prop", + "type": "string", + "label": { + "text": { + "zh_CN": "列字段", + "en_US": "Column Field" + } + }, + "required": false, + "readOnly": false, + "disabled": true, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "列字段", + "en_US": "Column's field." + } + }, + { + "property": "width", + "type": "string", + "label": { + "text": { + "zh_CN": "列宽", + "en_US": "Column Width" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "列宽", + "en_US": "Column's width." + } + }, + { + "property": "minWidth", + "type": "string", + "label": { + "text": { + "zh_CN": "最小列宽", + "en_US": "Minimum Width" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "最小列宽", + "en_US": "Minimum width of column." + } + }, + { + "property": "formatter", + "type": "object", + "label": { + "text": { + "zh_CN": "格式化方法", + "en_US": "Formatting Method" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + }, + "description": { + "zh_CN": "格式化方法", + "en_US": "Method to format." + } + }, + { + "property": "showOverflowTooltip", + "type": "boolean", + "defaultValue": false, + "label": { + "text": { + "zh_CN": "文本溢出显示tooltip", + "en_US": "Tooltips when Text Overflow" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "文本溢出是否显示tooltip", + "en_US": "Whether to display tooltips when text overflow?" + } + }, + { + "property": "fixed", + "type": "string", + "label": { + "text": { + "zh_CN": "列固定", + "en_US": "Column Fixed" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": { + "zh_CN": "固定左侧", + "en_US": "Fixed Left" + }, + "value": "left" + }, + { + "label": { + "zh_CN": "固定右侧", + "en_US": "Fixed Right" + }, + "value": "right" + } + ] + } + }, + "description": { + "zh_CN": "列固定", + "en_US": "Fixed table column on which side." + } + }, + { + "property": "sortable", + "type": "boolean", + "label": { + "text": { + "zh_CN": "是否排序", + "en_US": "Sortable" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否排序", + "en_US": "Enable sortable or not." + } + }, + { + "property": "tip", + "type": "boolean", + "label": { + "text": { + "zh_CN": "表头tip", + "en_US": "Table Header Tip" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表头tip", + "en_US": "Tip of table's header." + } + }, + { + "property": "tipContent", + "type": "string", + "label": { + "text": { + "zh_CN": "表头tip内容", + "en_US": "Header Tip Content" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表头tip内容", + "en_US": "Content of table header's tip." + } + }, + { + "property": "edit", + "type": "boolean", + "label": { + "text": { + "zh_CN": "是否可编辑", + "en_US": "Editable" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否可编辑", + "en_US": "Enable editable or not." + } + }, + { + "property": "required", + "type": "boolean", + "label": { + "text": { + "zh_CN": "必填", + "en_US": "Required" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "不可编辑时,默认必填不生效", + "en_US": "When it is not editable, the default requirement for mandatory filling does not take effect." + } + }, + { + "property": "component", + "defaultValue": "TinyInput", + "type": "string", + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "label": { + "text": { + "zh_CN": "控件类型", + "en_US": "Control Type" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": { + "zh_CN": "输入框", + "en_US": "Input" + }, + "value": "TinyInput" + }, + { + "label": { + "zh_CN": "选择框", + "en_US": "Select" + }, + "value": "TinySelect" + }, + { + "label": { + "zh_CN": "布尔值", + "en_US": "Boolean" + }, + "value": "TinyRadio" + }, + { + "label": { + "zh_CN": "状态标识", + "en_US": "StatusMarker" + }, + "value": "TinyModelStatus" + }, + { + "label": { + "zh_CN": "日期选择器", + "en_US": "Date Picker" + }, + "value": "TinyDatePicker" + }, + { + "label": { + "zh_CN": "计数器", + "en_US": "Input Number" + }, + "value": "TinyNumeric" + } + ], + "labelZhCN": "表格列配置" + } + }, + "description": { + "zh_CN": "控件类型", + "en_US": "Type of control." + } + } + ] + }, + { + "componentName": "TinyInput", + "label": { + "zh_CN": "输入框", + "en_US": "Input" + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "textarea", + "value": "textarea" + }, + { + "label": "text", + "value": "text" + }, + { + "label": "password", + "value": "password" + } + ] + } + }, + "description": { + "zh_CN": "设置input框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "rows", + "label": { + "text": { + "zh_CN": "行数" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框行数,只对 type='textarea' 有效" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinySelect", + "label": { + "zh_CN": "选择器", + "en_US": "Select" + }, + "content": [ + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "searchable", + "label": { + "text": { + "zh_CN": "下拉可搜索" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "下拉面板是否可搜索" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "options", + "label": { + "text": { + "zh_CN": "选项数据" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "配置 Select 下拉数据项" + }, + "labelPosition": "top" + }, + { + "property": "multiple", + "label": { + "text": { + "zh_CN": "多选" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否允许输入框输入或选择多个项" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyDatePicker", + "label": { + "zh_CN": "日期选择器", + "en_US": "DatePicker" + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "日期", + "value": "date" + }, + { + "label": "日期时间", + "value": "datetime" + }, + { + "label": "周", + "value": "week" + }, + { + "label": "月份", + "value": "month" + }, + { + "label": "年份", + "value": "year" + } + ] + } + }, + "description": { + "zh_CN": "设置日期框的type属性" + }, + "labelPosition": "left" + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "clearable", + "label": { + "text": { + "zh_CN": "清除按钮" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示清除按钮" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "readonly", + "label": { + "text": { + "zh_CN": "只读" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + }, + { + "property": "format", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "格式化" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否只读" + }, + "labelPosition": "left" + }, + { + "property": "valueFormat", + "type": "string", + "defaultValue": "", + "label": { + "text": { + "zh_CN": "绑定值格式化" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "value-format" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyRadio", + "label": { + "zh_CN": "单选框", + "en_US": "Radio" + }, + "content": [ + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "单选框文本内容" + } + }, + { + "property": "label", + "label": { + "text": { + "zh_CN": "选中值" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "radio 选中时的值" + } + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyCheckbox", + "label": { + "zh_CN": "多选框", + "en_US": "Checkbox" + }, + "content": [ + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "checked", + "label": { + "text": { + "zh_CN": "勾选" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "当前是否勾选" + }, + "labelPosition": "left" + }, + { + "property": "text", + "label": { + "text": { + "zh_CN": "文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "复选框的文本" + }, + "labelPosition": "left" + } + ] + }, + { + "componentName": "TinyNumeric", + "label": { + "zh_CN": "数组输入框", + "en_US": "Numeric" + }, + "content": [ + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "allow-empty", + "label": { + "text": { + "zh_CN": "内容可清空" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否内容可清空" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } + }, + "description": { + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + }, + "labelPosition": "left" + }, + { + "property": "controls", + "label": { + "text": { + "zh_CN": "加减按钮" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否使用加减按钮" + }, + "labelPosition": "left" + }, + { + "property": "controls-position", + "label": { + "text": { + "zh_CN": "加减按钮位置" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "左右两侧", + "value": "" + }, + { + "label": "只在右侧", + "value": "right" + } + ] + } + }, + "description": { + "zh_CN": "加减按钮位置" + } + }, + { + "property": "precision", + "label": { + "text": { + "zh_CN": "精度" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "数值精度" + }, + "labelPosition": "left" + }, + { + "property": "step", + "label": { + "text": { + "zh_CN": "步长" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } + }, + "description": { + "zh_CN": "步长" + }, + "labelPosition": "left" + } + ] + } + ], + "labelPosition": "top" + }, + { + "property": "modelApis", + "label": { + "text": { + "zh_CN": "绑定模型方法" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "bindState": false, + "cols": 12, + "widget": { + "component": "ModelApiConfigurator", + "props": {} + }, + "labelPosition": "top" + } + ] + }, + { + "label": { + "zh_CN": "基础属性", + "en_US": "Basic Attributes" + }, + "description": { + "zh_CN": "基础属性", + "en_US": "Basic attributes." + }, + "collapse": { + "number": 6, + "text": { + "zh_CN": "显示更多", + "en_US": "Show More" + } + }, + "content": [ + { + "property": "viewOnly", + "label": { + "text": { + "zh_CN": "只读", + "en_US": "Readonly" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "控制编辑态、查看态", + "en_US": "Control the editing and viewing states." + } + }, + { + "property": "selectedEnabled", + "resetProps": true, + "label": { + "text": { + "zh_CN": "启用复选", + "en_US": "enable select data" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否允许复选框选中数据", + "en_US": "Whether to allow the check box to select data" + }, + "labelPosition": "left" + }, + { + "property": "handleSelectedRows", + "label": { + "text": { + "zh_CN": "处理选中数据方法", + "en_US": "Method of Processing Selected Data" + } + }, + "defaultValue": { + "type": "JSFunction", + "value": "/**\r\n * 获取表格勾选数据方法\r\n * tableSelection - 表格已勾选的数据\r\n */\r\nfunction handleSelectedRows(tableSelection) {\r\n // 处理方法函数体\r\n}" + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "javascript", + "dataType": "JSFunction" + } + }, + "description": { + "zh_CN": "处理选中数据方法", + "en_US": "Method of Processing Selected Data" + }, + "labelPosition": "left" + } + ] + }, + { + "label": { + "zh_CN": "表格数据配置", + "en_US": "Form Data Configuration" + }, + "description": { + "zh_CN": "表格数据配置", + "en_US": "Configuration of form data." + }, + "collapse": { + "number": 6, + "text": { + "zh_CN": "显示更多", + "en_US": "Show More" + } + }, + "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "表格数据绑定变量", + "en_US": "Binding Variables For Table Data" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "BindVariableConfigurator", + "props": { + "defaultValue": [], + "isValueArray": true + } + }, + "description": { + "zh_CN": "为表格数据绑定变量", + "en_US": "Binding Variables For Search Form." + } + } + ] + }, + { + "label": { + "zh_CN": "表格列配置", + "en_US": "Columns Configuration" + }, + "description": { + "zh_CN": "表格列配置", + "en_US": "Configuration for table column." + }, + "collapse": { + "number": 6, + "text": { + "zh_CN": "显示更多", + "en_US": "Show More" + } + }, + "content": [ + { + "property": "rowOperationEnabled", + "resetProps": true, + "label": { + "text": { + "zh_CN": "启用行操作", + "en_US": "enable row operation" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否使用行操作", + "en_US": "Whether to allow the row operation" + }, + "labelPosition": "left" + }, + { + "property": "useIconOperation", + "resetProps": true, + "label": { + "text": { + "zh_CN": "使用图标", + "en_US": "use icon operation" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "SwitchConfigurator", + "props": {} + }, + "description": { + "zh_CN": "行操作是否使用图标", + "en_US": "use Icon Whether to handle the row operation" + }, + "labelPosition": "left" + }, + { + "type": "configList", + "property": "rowOperations", + "label": { + "text": { + "zh_CN": "行操作", + "en_US": "Row Operation" + } + }, + "required": false, + "cols": 12, + "properties": [ + { + "label": { + "zh_CN": "默认分组", + "en_US": "Default Group" + }, + "content": [ + { + "property": "label", + "type": "string", + "label": { + "text": { + "zh_CN": "文本", + "en_US": "Text" + } + }, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "操作名称", + "en_US": "Operation's name." + } + }, + { + "property": "icon", + "type": "string", + "label": { + "text": { + "zh_CN": "图标", + "en_US": "Icon" + } + }, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": { + "placeholder": "请输入图标类名" + } + }, + "description": { + "zh_CN": "图标库地址: https://tinyuidesign.cloudbu.huawei.com/tiny-vue/zh-CN/os-theme/components/icon#list", + "en_US": "Icon Library Address: https://tinyuidesign.cloudbu.huawei.com/tiny-vue/zh-CN/os-theme/components/icon#list" + } + }, + { + "property": "handler", + "label": { + "text": { + "zh_CN": "点击回调事件", + "en_US": "Click Callback Event" + } + }, + "defaultValue": { + "type": "JSFunction", + "value": "function handleRow(row, index, extendApis) {}" + }, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + }, + "description": { + "zh_CN": "操作的回调函数", + "en_US": "Callback functions for operations." + } + } + ] + } + ], + "widget": { + "component": "OperatorGroupConfigurator", + "props": { + "type": "object", + "textField": "label", + "language": "json", + "buttonText": "编辑行操作", + "title": "编辑行操作", + "enableVisibleControl": true, + "disableDelete": true, + "expand": true, + "isAbleBatchOperation": true + } + }, + "description": { + "zh_CN": "表格自定义行操作", + "en_US": "Custom operations For table's row." + }, + "labelPosition": "top" + }, + { + "property": "columnMinWidth", + "label": { + "text": { + "zh_CN": "表格列最小宽度", + "en_US": "Minimum Column Width" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表格列最小宽度", + "en_US": "Minimum width of table's column." + } + }, + { + "property": "columnWidth", + "label": { + "text": { + "zh_CN": "表格列宽度", + "en_US": "Column Width" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "表格列宽度", + "en_US": "Width of table's column." + } + } + ] + } + ], + "events": { + "onFilterChange": { + "label": { + "zh_CN": "筛选条件改变时触发改事件" + }, + "description": { + "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSortChange": { + "label": { + "zh_CN": "点击列头,执行数据排序前触发的事件" + }, + "description": { + "zh_CN": "配置 remote-filter 开启服务端过滤,服务端过滤会调用表格 fetch-data 进行查询,filter-change 服务端过滤后触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,filters} 包含 table 实例对象和过滤条件的对象" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSelectAll": { + "label": { + "zh_CN": "当手动勾选全选时触发的事件" + }, + "description": { + "zh_CN": "只对 type=selection 有效,当手动勾选全选时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 包含 table 实例对象" + } + }, + { + "name": "checked", + "type": "boolean", + "defaultValue": "", + "description": { + "zh_CN": "勾选状态" + } + }, + { + "name": "selction", + "type": "Array", + "defaultValue": "", + "description": { + "zh_CN": "选中的表格数据数组" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onSelectChange": { + "label": { + "zh_CN": "手动勾选并且值发生改变时触发的事件" + }, + "description": { + "zh_CN": "只对 type=selection 有效,当手动勾选并且值发生改变时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " table 实例对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 原生 Event" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onToggleExpandChange": { + "label": { + "zh_CN": "当行展开或收起时会触发该事件" + }, + "description": { + "zh_CN": "当行展开或收起时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "table", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "{$table,row,rowIndex} 包含 table 实例对象和当前行数据的对象" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": " 原生 Event" + } + } + ], + "returns": {} + }, + "defaultValue": "function onClick(e) {}" + }, + "onCurrentChange": { + "label": { + "zh_CN": "行点击时触发" + }, + "description": { + "zh_CN": "行点击时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + }, + "shortcuts": { + "properties": ["sortable", "columns"] + }, + "contentMenu": { + "actions": ["create symbol"] + }, + "onBeforeMount": "console.log('table on load'); this.pager = source.pager; this.fetchData = source.fetchData; this.data = source.data ;this.columns = source.columns" + }, + "configure": { + "loop": false, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "" + } + } + }, + "snippet": { + "name": { + "zh_CN": "表格模型", + "en_US": "TableModel" + }, + "icon": "grid", + "screenshot": "", + "snippetName": "TableModel", + "schema": { + "componentName": "TableModel", + "props": { + "editConfig": { + "trigger": "click", + "mode": "cell", + "showStatus": true + }, + "rowOperations": { + "type": "object", + "value": [] + } + } + } + } +} diff --git a/packages/builtinComponent/src/meta/CanvasNavigation.json b/packages/builtinComponent/src/meta/CanvasNavigation.json new file mode 100644 index 0000000000..b054cd9dc0 --- /dev/null +++ b/packages/builtinComponent/src/meta/CanvasNavigation.json @@ -0,0 +1,193 @@ +{ + "component": { + "icon": "navigation", + "name": { + "zh_CN": "导航条" + }, + "component": "CanvasNavigation", + "schema": { + "slots": {}, + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "collapse": { + "number": 6, + "text": { + "zh_CN": "显示更多" + } + }, + "content": [ + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "类型" + }, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "horizontal", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "horizontal", + "value": "horizontal" + }, + { + "label": "vertical", + "value": "vertical" + } + ] + } + } + }, + { + "property": "tabs", + "label": { + "text": { + "zh_CN": "选项卡" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "defaultValue": "", + "cols": 12, + "bindState": false, + "widget": { + "component": "TabBarConfigurator", + "props": {} + }, + "description": { + "zh_CN": "tabs 选项卡" + }, + "labelPosition": "none" + } + ] + } + ], + "events": { + "onClick": { + "label": { + "zh_CN": "点击事件" + }, + "description": { + "zh_CN": "点击时触发的回调函数" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + }, + "shortcuts": { + "properties": [] + }, + "contentMenu": { + "actions": [] + } + }, + "configure": { + "loop": true, + "isContainer": true, + "nestingRule": { + "childWhitelist": [], + "descendantBlacklist": [] + } + } + }, + "snippet": { + "name": { + "zh_CN": "导航条" + }, + "snippetName": "CanvasNavigation", + "icon": "navigation", + "schema": { + "componentName": "CanvasNavigation", + "props": { + "style": "text-align: center; padding: 8px 12px; box-shadow: 0 0 4px #0003;" + }, + "children": [ + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: inline-flex; gap: 8px; padding: 10px 20px; color: inherit; text-decoration: none;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconPublicHome", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "首页" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: inline-flex; gap: 8px; padding: 10px 20px; color: inherit; text-decoration: none;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconTaskCooperation", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "介绍" + } + } + ] + }, + { + "componentName": "RouterLink", + "props": { + "to": "", + "style": "display: flex; gap: 8px; padding: 10px 20px; color: inherit; text-decoration: none;" + }, + "children": [ + { + "componentName": "Icon", + "props": { + "name": "IconText", + "style": "margin-top: 3px;" + } + }, + { + "componentName": "Text", + "props": { + "text": "文档" + } + } + ] + } + ] + } + } +} diff --git a/packages/builtinComponent/src/meta/index.js b/packages/builtinComponent/src/meta/index.js index 7521af69aa..3054420082 100644 --- a/packages/builtinComponent/src/meta/index.js +++ b/packages/builtinComponent/src/meta/index.js @@ -3,6 +3,10 @@ import CanvasRow from './CanvasRow.json' import CanvasRowColContainer from './CanvasRowColContainer.json' import CanvasFlexBox from './CanvasFlexBox.json' import CanvasSection from './CanvasSection.json' +import CanvasNavigation from './CanvasNavigation.json' +import BaseForm from './BaseForm.json' +import BaseTable from './BaseTable.json' +import BasePage from './BasePage.json' export default { components: [ @@ -10,7 +14,11 @@ export default { CanvasRow.component, CanvasRowColContainer.component, CanvasFlexBox.component, - CanvasSection.component + CanvasSection.component, + CanvasNavigation.component, + BaseForm.component, + BaseTable.component, + BasePage.component ], snippets: [ { @@ -19,6 +27,20 @@ export default { zh_CN: '布局与容器' }, children: [CanvasRowColContainer.snippet, CanvasFlexBox.snippet, CanvasSection.snippet] + }, + { + group: 'advanced', + label: { + zh_CN: '高级元素' + }, + children: [CanvasNavigation.snippet] + }, + { + group: 'model', + label: { + zh_CN: '模型组件' + }, + children: [BaseForm.snippet, BaseTable.snippet, BasePage.snippet] } ] } diff --git a/packages/builtinComponent/tsconfig.json b/packages/builtinComponent/tsconfig.json new file mode 100644 index 0000000000..17484c7e9c --- /dev/null +++ b/packages/builtinComponent/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["./index.ts", "./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.vue"] +} diff --git a/packages/builtinComponent/vite.config.ts b/packages/builtinComponent/vite.config.ts index 1af413f568..081583f8af 100644 --- a/packages/builtinComponent/vite.config.ts +++ b/packages/builtinComponent/vite.config.ts @@ -14,9 +14,18 @@ import path from 'path' import vue from '@vitejs/plugin-vue' import vueJsx from '@vitejs/plugin-vue-jsx' import vitePluginCssInjectedByJs from 'vite-plugin-css-injected-by-js' +import dts from 'vite-plugin-dts' export default defineConfig({ - plugins: [vue(), vueJsx(), vitePluginCssInjectedByJs()], + plugins: [ + vue(), + vueJsx(), + vitePluginCssInjectedByJs(), + dts({ + tsconfigPath: path.resolve(__dirname, './tsconfig.json'), + rollupTypes: true + }) + ], publicDir: false, build: { sourcemap: true, @@ -28,7 +37,7 @@ export default defineConfig({ formats: ['es'] }, rollupOptions: { - external: ['vue'] + external: ['vue', '@opentiny/vue', '@opentiny/vue-icon', '@opentiny/vue-renderless'] } } }) diff --git a/packages/canvas/DesignCanvas/index.ts b/packages/canvas/DesignCanvas/index.ts index 6f439f9a58..057ff92d28 100644 --- a/packages/canvas/DesignCanvas/index.ts +++ b/packages/canvas/DesignCanvas/index.ts @@ -2,11 +2,14 @@ import { HOOK_NAME } from '@opentiny/tiny-engine-meta-register' import DesignCanvas from './src/DesignCanvas.vue' import metaData from './meta' import api from './src/api' +import mcp from './src/mcp' + export default { ...metaData, entry: DesignCanvas, apis: api(), composable: { name: HOOK_NAME.useCanvas - } + }, + mcp } diff --git a/packages/canvas/DesignCanvas/src/DesignCanvas.vue b/packages/canvas/DesignCanvas/src/DesignCanvas.vue index 99a0099fe0..8b11b4bfd8 100644 --- a/packages/canvas/DesignCanvas/src/DesignCanvas.vue +++ b/packages/canvas/DesignCanvas/src/DesignCanvas.vue @@ -76,9 +76,9 @@ export default { return } - const { importMap, importStyles } = getImportMapData(deps) + const { importMap, importStyles, importScripts } = getImportMapData(deps) - canvasSrcDoc.value = initCanvas(importMap, importStyles).html + canvasSrcDoc.value = initCanvas(importMap, importStyles, importScripts).html } }) @@ -87,6 +87,9 @@ export default { footData.value = useCanvas().getNodePath(node?.id) pageState.currentSchema = {} pageState.properties = null + // 删除节点后,重置pageState中组件的属性 + // 后续需要改造 + useProperties().getProps(null, null) } const isBlock = useCanvas().isBlock @@ -106,9 +109,9 @@ export default { empty: () => '应用下暂无页面,需新建页面后体验画布功能', release: (type) => `当前${componentType[type]}未锁定,点击右上角 “锁定” 图标后编辑${componentType[type]}`, lock: (type) => - `当前${componentType[type]}被 ${pageInfo?.username || ''} 锁定,如需编辑请先联系他解锁文件,然后再锁定该${ + `当前${componentType[type]}被 ${pageInfo?.username || ''} 锁定,您可以创建新页面,如需编辑请先联系他解锁${ componentType[type] - }后编辑!` + },然后再锁定该${componentType[type]}后编辑!` } const renderMsg = message[pageStatus.state](pageSchema.componentName) @@ -287,7 +290,8 @@ export default { getBlockByName: useMaterial().getBlockByName, useModal, useMessage, - useNotify + useNotify, + enableTailwindCSS: getMergeMeta('engine.config')?.enableTailwindCSS }, isBlock, getMoveDragBarState, diff --git a/packages/canvas/DesignCanvas/src/importMap.ts b/packages/canvas/DesignCanvas/src/importMap.ts index 499154c47d..632c2f8370 100644 --- a/packages/canvas/DesignCanvas/src/importMap.ts +++ b/packages/canvas/DesignCanvas/src/importMap.ts @@ -94,9 +94,13 @@ export function getImportMapData(canvasDeps = { scripts: [], styles: [] }) { } const importStyles = [...blockRequire.importStyles, ...canvasDeps.styles] + const customEnableTailWindCSS = getMergeMeta('engine.config')?.enableTailwindCSS + const tailwindURL = getImportUrl('@tailwindcss/browser') + const importScripts = customEnableTailWindCSS && tailwindURL ? [tailwindURL] : [] return { importMap, - importStyles + importStyles, + importScripts } } diff --git a/packages/canvas/DesignCanvas/src/mcp/index.ts b/packages/canvas/DesignCanvas/src/mcp/index.ts new file mode 100644 index 0000000000..01324bdca1 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/index.ts @@ -0,0 +1,13 @@ +import { + getCurrentSelectedNode, + getPageSchema, + queryNodeById, + delNode, + addNode, + changeNodeProps, + selectSpecificNode +} from './tools' + +export default { + tools: [getCurrentSelectedNode, getPageSchema, queryNodeById, delNode, addNode, changeNodeProps, selectSpecificNode] +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/addNode.ts b/packages/canvas/DesignCanvas/src/mcp/tools/addNode.ts new file mode 100644 index 0000000000..04e7c860e2 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/addNode.ts @@ -0,0 +1,136 @@ +import { z } from 'zod' +import { useCanvas, useMaterial } from '@opentiny/tiny-engine-meta-register' +import { utils } from '@opentiny/tiny-engine-utils' + +const { validateParams } = utils + +const inputSchema = z.object({ + parentId: z + .string() + .optional() + .describe( + 'The id of the parent node. If not provided, the new node will be added to the root. if you don\'t know the parentId, you can use the tool "get_page_schema" to get the page schema. if you want to add to page root, just don\'t provide the parentId.' + ), + newNodeData: z.object({ + componentName: z.string().describe('The name of the component.'), + props: z.record(z.string(), z.any()).describe('The props of the component.'), + children: z + .array(z.record(z.string(), z.any())) + .describe('Array of child nodes; each child has the same shape as newNodeData (recursive tree).') + }), + position: z + .enum(['before', 'after']) + .optional() + .describe( + 'The position of the new node. If not provided, the new node will be added to the end of the parent node.' + ), + referTargetNodeId: z + .string() + .optional() + .describe( + 'The id of the reference target node. If not provided, the new node will be added to the end of the parent node. if you don\'t know the referTargetNodeId, you can use the tool "get_page_schema" to get the page schema. if you dont want to refer to any node, just don\'t provide the referTargetNodeId.' + ) +}) + +export const addNode = { + name: 'add_node', + title: '添加节点', + description: + 'Add a new node to the current TinyEngine low-code application. Use this when you need to add new node to your application.', + inputSchema: inputSchema.shape, + annotations: { + title: '添加节点', + readOnlyHint: false, + destructiveHint: false, + idempotentHint: false, + openWorldHint: false + }, + callback: async (args: z.infer) => { + const { parentId, newNodeData, position, referTargetNodeId } = args + const componentName = newNodeData.componentName + const { props = {}, children = [] } = newNodeData + + const validateResult = validateParams(args, { + parentId: { + validator: (value: string) => { + const parentNode = useCanvas().getNodeById(value) + return !!parentNode + }, + message: + 'Parent node not found, please check the parentId is correct. if you don\'t know the parentId, you can use the tool "get_page_schema" to get the page schema. if you want to add to page root, just don\'t provide the parentId.' + }, + referTargetNodeId: { + validator: (value: string) => { + const referTargetNode = useCanvas().getNodeById(value) + return !!referTargetNode + }, + message: + "Refer target node not found, please check the referTargetNodeId is correct. if you don't want to refer to any node, just don't provide the referTargetNodeId." + } + }) + + if (!validateResult.isValid) { + return validateResult.error + } + + const { getMaterial } = useMaterial() + const material = getMaterial(componentName) + const isEmptyPlainObject = + material && + typeof material === 'object' && + !Array.isArray(material) && + Object.keys(material as Record).length === 0 + + if (!newNodeData.componentName || isEmptyPlainObject) { + return { + isError: true, + content: [ + { + type: 'text', + text: JSON.stringify({ + status: 'error', + errorCode: 'COMPONENT_NAME_REQUIRED', + reason: 'Component name is required', + userMessage: 'Component name is required. Fetch the available component list.', + next_action: { + type: 'tool_call', + name: 'get_component_list', + args: {} + } + }) + } + ] + } + } + + const insertData = { + componentName, + props, + children + } + + useCanvas().operateNode({ + type: 'insert', + parentId: parentId!, + // @ts-ignore + newNodeData: insertData, + position: position!, + referTargetNodeId + }) + + const res = { + status: 'success', + message: `Node added successfully`, + data: insertData + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/changeNodeProps.ts b/packages/canvas/DesignCanvas/src/mcp/tools/changeNodeProps.ts new file mode 100644 index 0000000000..29cbb8a2c3 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/changeNodeProps.ts @@ -0,0 +1,98 @@ +import { z } from 'zod' +import { useCanvas } from '@opentiny/tiny-engine-meta-register' + +const inputSchema = z.object({ + id: z + .string() + .describe( + 'The id of the node to change the props of. if you don\'t know the id, you can use the tool "get_current_selected_node" to get the current selected node. or you can use the tool "get_page_schema" to get the page schema. when get the page schema, you can find the id in the "id" field.' + ), + props: z + .record(z.string(), z.any()) + .describe( + 'The props of the component. if you don\'t know available props, you can use the "get_component_detail" tool to get component detail and available props.' + ), + overwrite: z.boolean().optional().describe('Whether to overwrite the existing props.') +}) + +export const changeNodeProps = { + name: 'change_node_props', + title: '修改节点属性', + description: + 'Change the props of a node in the current TinyEngine low-code application. Use this when you need to change the props of a node in your application.', + inputSchema: inputSchema.shape, + // 添加 annotations 配置 + annotations: { + title: '修改节点属性', // 人性化标题 + readOnlyHint: false, // 非只读操作,会修改节点属性 + destructiveHint: false, // 非破坏性操作,只是修改属性值 + idempotentHint: false, // 非幂等操作,不同的属性修改会产生不同效果 + openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作 + }, + callback: async (args: z.infer) => { + const { id, overwrite = false } = args + let props = args.props + + if (!props || typeof props !== 'object') { + props = {} + } + + const node = useCanvas().getNodeById(id) + if (!node) { + return { + content: [ + { + isError: true, + type: 'text', + text: JSON.stringify({ + errorCode: 'NODE_NOT_FOUND', + reason: `Node not found: ${id}`, + userMessage: `Node not found: ${id}. Fetch the available node list.`, + next_action: [ + { + type: 'tool_call', + name: 'get_current_selected_node', + args: {}, + when: 'you want to change the props of the current selected node' + }, + { + type: 'tool_call', + name: 'get_page_schema', + args: {}, + when: 'you want to change the props of the node with the specified id' + } + ] + }) + } + ] + } + } + + useCanvas().operateNode({ + type: 'changeProps', + id, + value: { props }, + option: { + overwrite + } + }) + + const res = { + status: 'success', + message: `Node props changed successfully`, + data: { + id, + props + } + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts b/packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts new file mode 100644 index 0000000000..810d43da36 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/delNode.ts @@ -0,0 +1,66 @@ +import { z } from 'zod' +import { useCanvas } from '@opentiny/tiny-engine-meta-register' + +const inputSchema = z.object({ + id: z + .string() + .describe( + 'The id of the node to delete. if you don\'t know the id, you can use the tool "get_current_selected_node" to get the current selected node. or you can use the tool "get_page_schema" to get the page schema. when get the page schema, you can find the id in the "id" field.' + ) +}) + +export const delNode = { + name: 'del_node', + title: '删除节点', + description: + 'Delete a node from the current TinyEngine low-code application. Use this when you need to delete a node from your application.', + inputSchema: inputSchema.shape, + // 添加 annotations 配置 + annotations: { + title: '删除节点', // 人性化标题 + readOnlyHint: false, // 非只读操作,会删除节点 + destructiveHint: true, // 破坏性操作,会永久删除节点 + idempotentHint: true, // 幂等操作,删除同一个节点多次没有额外效果 + openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作 + }, + callback: async (args: z.infer) => { + const { id } = args + const node = useCanvas().getNodeById(id) + + if (!node) { + return { + content: [ + { + type: 'json', + value: { + status: 'error', + message: 'Node not found, please check the id is correct.' + } + } + ] + } + } + + useCanvas().operateNode({ + type: 'delete', + id + }) + + const res = { + status: 'success', + message: `Node deleted successfully`, + data: { + id + } + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/getCurrentSelectedNode.ts b/packages/canvas/DesignCanvas/src/mcp/tools/getCurrentSelectedNode.ts new file mode 100644 index 0000000000..15ea5dd1a0 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/getCurrentSelectedNode.ts @@ -0,0 +1,57 @@ +import { z } from 'zod' +import { useCanvas } from '@opentiny/tiny-engine-meta-register' + +const inputSchema = z.object({}) + +export const getCurrentSelectedNode = { + name: 'get_current_selected_node', + title: '获取当前选中节点', + description: + 'Get the current selected node from the current TinyEngine low-code application. Use this when you need to get the current selected node from your application.', + inputSchema: inputSchema.shape, + // 添加 annotations 配置 + annotations: { + title: '获取当前选中节点', // 人性化标题 + readOnlyHint: true, // 只读操作,不会修改任何状态 + openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作 + }, + callback: async (_args: z.infer) => { + const currentSelectedNode = useCanvas().canvasApi.value?.getCurrent?.() + + // 安全检查,确保 currentSelectedNode 存在 + if (!currentSelectedNode) { + return { + content: [ + { + isError: true, + type: 'text', + text: JSON.stringify({ + status: 'error', + message: 'No node is currently selected' + }) + } + ] + } + } + + const { schema, parent } = currentSelectedNode + + const res = { + status: 'success', + message: `Current selected node retrieved successfully`, + data: { + currentSelectedNode: schema, + parent + } + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/getPageSchema.ts b/packages/canvas/DesignCanvas/src/mcp/tools/getPageSchema.ts new file mode 100644 index 0000000000..5b51e747c1 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/getPageSchema.ts @@ -0,0 +1,38 @@ +import { z } from 'zod' +import { useCanvas } from '@opentiny/tiny-engine-meta-register' + +const inputSchema = z.object({}) + +export const getPageSchema = { + name: 'get_page_schema', + title: '获取页面结构', + description: + 'Get current editing page schema from the current TinyEngine low-code application. Use this when you need to get current editing page schema from your application.', + inputSchema: inputSchema.shape, + // 添加 annotations 配置 + annotations: { + title: '获取页面结构', // 人性化标题 + readOnlyHint: true, // 只读操作,不会修改任何状态 + openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作 + }, + callback: async (_args: z.infer) => { + const pageSchema = useCanvas().getSchema() + + const res = { + status: 'success', + message: `Page schema retrieved successfully`, + data: { + pageSchema + } + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/index.ts b/packages/canvas/DesignCanvas/src/mcp/tools/index.ts new file mode 100644 index 0000000000..aa6beac593 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/index.ts @@ -0,0 +1,7 @@ +export { getCurrentSelectedNode } from './getCurrentSelectedNode' +export { getPageSchema } from './getPageSchema' +export { queryNodeById } from './queryNodeById' +export { delNode } from './delNode' +export { addNode } from './addNode' +export { changeNodeProps } from './changeNodeProps' +export { selectSpecificNode } from './selectSpecificNode' diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/queryNodeById.ts b/packages/canvas/DesignCanvas/src/mcp/tools/queryNodeById.ts new file mode 100644 index 0000000000..a6608ea127 --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/queryNodeById.ts @@ -0,0 +1,79 @@ +import { z } from 'zod' +import { useCanvas } from '@opentiny/tiny-engine-meta-register' + +const inputSchema = z.object({ + id: z + .string() + .describe( + 'The id of the node to query. if you don\'t know the id, you can use the tool "get_current_selected_node" to get the current selected node. or you can use the tool "get_page_schema" to get the page schema. when get the page schema, you can find the id in the "id" field.' + ) +}) + +export const queryNodeById = { + name: 'query_node_by_id', + title: '根据ID查询节点', + description: + 'Query a node by id from the current TinyEngine low-code application. Use this when you need to query a node by id from your application.', + inputSchema: inputSchema.shape, + // 添加 annotations 配置 + annotations: { + title: '根据ID查询节点', // 人性化标题 + readOnlyHint: true, // 只读操作,不会修改任何状态 + openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作 + }, + callback: async (args: z.infer) => { + const { id } = args + const result = useCanvas().getNodeWithParentById(id) + + // 安全检查,确保找到了节点 + if (!result) { + return { + content: [ + { + isError: true, + type: 'text', + text: JSON.stringify({ + errorCode: 'NODE_NOT_FOUND', + reason: `Node not found: ${id}`, + userMessage: `Node not found: ${id}. Fetch the available node list.`, + next_action: [ + { + type: 'tool_call', + name: 'get_current_selected_node', + args: {}, + when: 'you want to query the current selected node' + }, + { + type: 'tool_call', + name: 'get_page_schema', + args: {}, + when: 'you want to query the node with the specified id' + } + ] + }) + } + ] + } + } + + const { node, parent } = result + + const res = { + status: 'success', + message: `Node retrieved successfully`, + data: { + node, + parent + } + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/DesignCanvas/src/mcp/tools/selectSpecificNode.ts b/packages/canvas/DesignCanvas/src/mcp/tools/selectSpecificNode.ts new file mode 100644 index 0000000000..7e6e0d7e2c --- /dev/null +++ b/packages/canvas/DesignCanvas/src/mcp/tools/selectSpecificNode.ts @@ -0,0 +1,78 @@ +import { z } from 'zod' +import { useCanvas } from '@opentiny/tiny-engine-meta-register' + +const inputSchema = z.object({ + id: z + .string() + .describe( + 'The id of the node to select. if you don\'t know the id, you can use the tool "get_page_schema" to get the page schema. when get the page schema, you can find the id in the "id" field.' + ) +}) + +export const selectSpecificNode = { + name: 'select_specific_node', + title: '选择特定节点', + description: + 'Select a specific node from the current TinyEngine low-code application. Use this when you need to select a specific node from your application.', + inputSchema: inputSchema.shape, + // 添加 annotations 配置 + annotations: { + title: '选择特定节点', // 人性化标题 + readOnlyHint: false, // 非只读操作,会改变选择状态 + destructiveHint: false, // 非破坏性操作,只是改变选择状态 + idempotentHint: false, // 非幂等操作,重复选择可能触发不同的 UI 效果 + openWorldHint: false // 不与外部世界交互,只在 TinyEngine 内部操作 + }, + callback: async (args: z.infer) => { + const { id } = args + const node = useCanvas().getNodeById(id) + + if (!node) { + return { + content: [ + { + type: 'text', + text: JSON.stringify({ + errorCode: 'NODE_NOT_FOUND', + reason: `Node not found: ${id}`, + userMessage: `Node not found: ${id}. Fetch the available node list.`, + next_action: [ + { + type: 'tool_call', + name: 'get_current_selected_node', + args: {}, + when: 'you want to select the current selected node' + }, + { + type: 'tool_call', + name: 'get_page_schema', + args: {}, + when: 'you want to select the node with the specified id' + } + ] + }) + } + ] + } + } + + useCanvas().canvasApi.value?.selectNode?.(id, 'clickTree') + + const res = { + status: 'success', + message: `Node selected successfully`, + data: { + id + } + } + + return { + content: [ + { + type: 'text', + text: JSON.stringify(res) + } + ] + } + } +} diff --git a/packages/canvas/canvas.html b/packages/canvas/canvas.html index 42304ac0e3..e1e7a68832 100644 --- a/packages/canvas/canvas.html +++ b/packages/canvas/canvas.html @@ -78,75 +78,6 @@ animation-delay: 2s; } html, - body, - object, - iframe, - p, - blockquote, - pre, - abbr, - address, - cite, - code, - del, - dfn, - em, - img, - ins, - kbd, - q, - samp, - small, - strong, - sub, - sup, - var, - b, - i, - dl, - dt, - dd, - ol, - ul, - li, - fieldset, - form, - label, - legend, - table, - caption, - tbody, - tfoot, - thead, - tr, - th, - td, - article, - aside, - canvas, - details, - figcaption, - figure, - footer, - header, - hgroup, - menu, - nav, - section, - summary, - time, - mark, - audio, - video { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - background: transparent; - user-select: none; - } - html, body { width: 100%; height: 100%; diff --git a/packages/canvas/container/src/components/CanvasAction.vue b/packages/canvas/container/src/components/CanvasAction.vue index b06830588f..9df3bc0cac 100644 --- a/packages/canvas/container/src/components/CanvasAction.vue +++ b/packages/canvas/container/src/components/CanvasAction.vue @@ -251,7 +251,12 @@ export default { } const hide = () => { - getRenderer().setCondition(getCurrent().schema?.id, false) + if (getCurrent().schema?.id) { + const { clearSelect } = useCanvas().canvasApi.value + getRenderer().setCondition(getCurrent().schema.id, false) + useCanvas().pageState.nodesStatus[getCurrent().schema.id] = false + clearSelect() + } updateRect() } @@ -417,32 +422,128 @@ export default { } } + /** + * 检查元素在画布中的可用空间 + * @param {number} top - 选中元素顶部位置 + * @param {number} selectedHeight - 选中元素高度 + * @param {number} canvasHeight - 画布高度 + * @param {number} elementHeight - 要放置元素的高度 + * @returns {{hasTopSpace: boolean, hasBottomSpace: boolean}} + */ + const checkElementSpace = (top, selectedHeight, canvasHeight, elementHeight) => { + return { + hasTopSpace: top >= elementHeight, + hasBottomSpace: canvasHeight - top - selectedHeight >= elementHeight + } + } + + /** + * 根据策略决定元素应该放置在顶部还是底部 + * @param {number} top - 选中元素顶部位置 + * @param {number} elementHeight - 要放置元素的高度 + * @param {boolean} hasTopSpace - 顶部是否有足够空间 + * @param {boolean} hasBottomSpace - 底部是否有足够空间 + * @param {string} strategy - 放置策略 ('topFirst' | 'bottomFirst') + * @returns {boolean} 是否放置在底部 + */ + const determineElementPosition = (hasTopSpace, hasBottomSpace, strategy = 'topFirst') => { + if (strategy === 'bottomFirst') { + // Option策略:优先底部,或顶部没空间时放底部 + return hasBottomSpace || !hasTopSpace + } else { + // Label策略:顶部没空间且底部有空间才放底部 + return !hasTopSpace && hasBottomSpace + } + } + + /** + * 通用的垂直对齐计算函数 + * @param {boolean} isAtBottom - 是否放置在底部 + * @param {number} elementHeight - 元素高度 + * @param {boolean} hasTopSpace - 顶部是否有足够空间 + * @param {boolean} hasBottomSpace - 底部是否有足够空间 + * @param {boolean} bottomFirst - 是否底部优先策略(true: Option策略, false: Label策略) + * @returns {{alignTop: boolean, verticalValue: number}} + */ + const calculateVerticalAlignment = ( + isAtBottom, + elementHeight, + hasTopSpace, + hasBottomSpace, + bottomFirst = false + ) => { + const alignTop = !isAtBottom + + let verticalValue + if (bottomFirst) { + // Option策略:不在底部 OR 底部有空间时偏移 + verticalValue = !isAtBottom || hasBottomSpace ? -elementHeight : 0 + } else { + // Label策略:在底部 OR 顶部有空间时偏移 + verticalValue = isAtBottom || hasTopSpace ? -elementHeight : 0 + } + + return { alignTop, verticalValue } + } + + /** + * 一站式元素对齐计算函数(组合了空间检查、位置决策、对齐计算) + * @param {number} top - 选中元素顶部位置 + * @param {number} selectedHeight - 选中元素高度 + * @param {number} canvasHeight - 画布高度 + * @param {number} elementHeight - 要放置元素的高度 + * @param {string} strategy - 放置策略 ('topFirst' | 'bottomFirst') + * @returns {{alignTop: boolean, verticalValue: number}} + */ + const calculateElementAlignment = (top, selectedHeight, canvasHeight, elementHeight, strategy = 'topFirst') => { + const spaceInfo = checkElementSpace(top, selectedHeight, canvasHeight, elementHeight) + const isAtBottom = determineElementPosition(spaceInfo.hasTopSpace, spaceInfo.hasBottomSpace, strategy) + return calculateVerticalAlignment( + isAtBottom, + elementHeight, + spaceInfo.hasTopSpace, + spaceInfo.hasBottomSpace, + strategy === 'bottomFirst' + ) + } + const getStyleValues = (selectState, canvasSize, labelWidth, optionWidth) => { const { left, top, width, height, doc } = selectState const { width: canvasWidth, height: canvasHeight } = canvasSize // 标签宽度和工具操作条宽度之和加上间距 const fullRectWidth = labelWidth + optionWidth + OPTION_SPACE + const labelAlignment = calculateElementAlignment( + top, + height, + canvasHeight, + LABEL_HEIGHT, + 'topFirst' // Label策略:顶部优先 + ) - // 是否 将label 标签放置到底部,判断 top 距离 - const isLabelAtBottom = top < LABEL_HEIGHT const labelAlign = new Align({ alignLeft: true, horizontalValue: 0, - alignTop: !isLabelAtBottom, - verticalValue: -LABEL_HEIGHT + alignTop: labelAlignment.alignTop, + verticalValue: labelAlignment.verticalValue }) if (!doc) { return {} } - // 是否将操作栏放置到底部,判断当前选中组件底部与页面底部的距离。 - const isOptionAtBottom = canvasHeight - top - height >= OPTION_BAR_HEIGHT + const optionAlignment = calculateElementAlignment( + top, + height, + canvasHeight, + OPTION_BAR_HEIGHT, + 'bottomFirst' // Option策略:底部优先 + ) + const optionAlign = new Align({ alignLeft: false, horizontalValue: 0, - alignTop: !isOptionAtBottom, - verticalValue: -OPTION_BAR_HEIGHT + alignTop: optionAlignment.alignTop, + verticalValue: optionAlignment.verticalValue }) const scrollBarWidth = doc.documentElement.scrollHeight > doc.documentElement.clientHeight ? SCROLL_BAR_WIDTH : 0 @@ -462,7 +563,7 @@ export default { optionAlign.align(positions.LEFT) } - if (isLabelAtBottom === isOptionAtBottom) { + if (labelAlignment.alignTop === optionAlignment.alignTop) { // 标签框和工具操作框都在顶部或者都在底部 if (left + fullRectWidth < canvasWidth) { @@ -562,6 +663,12 @@ export default { pointer-events: none; border: 1px solid var(--te-canvas-container-border-color-checked); z-index: 2; + // 禁止文本选择 + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + &.absolute { pointer-events: all; } diff --git a/packages/canvas/container/src/components/CanvasResize.vue b/packages/canvas/container/src/components/CanvasResize.vue index 820a0ecf47..32b11e90a0 100644 --- a/packages/canvas/container/src/components/CanvasResize.vue +++ b/packages/canvas/container/src/components/CanvasResize.vue @@ -116,6 +116,8 @@ export default { watch(() => useLayout().rightFixedPanelsStorage.value, setScale, { flush: 'post' }) + watch(() => useLayout().layoutState.toolbars.render, setScale, { flush: 'post' }) + watch( () => useLayout().getSettingState().render, (value) => { diff --git a/packages/canvas/container/src/container.ts b/packages/canvas/container/src/container.ts index f81e18444a..fecf997f32 100644 --- a/packages/canvas/container/src/container.ts +++ b/packages/canvas/container/src/container.ts @@ -466,6 +466,34 @@ const setSelectRect = ( ) } +const getElementDurationTime = (elementId?: string) => { + const element = elementId ? querySelectById(elementId) : getDocument().body + const transitionDuration = window.getComputedStyle(element).getPropertyValue('transition-duration') + const transitionDelay = window.getComputedStyle(element).getPropertyValue('transition-delay') + let delayTime = 0 + const getMaxMillisecondNumber = (arr: string[]) => { + const millisecondNumber = arr.map((item) => { + if (item.endsWith('ms')) { + return parseFloat(item) + } else { + return parseFloat(item) * 1000 + } + }) + return millisecondNumber.length ? Math.max(...millisecondNumber) : 0 + } + if (transitionDuration) { + const transitionDurations = transitionDuration.split(',') + delayTime += getMaxMillisecondNumber(transitionDurations) + } + + if (transitionDelay) { + const transitionDelays = transitionDelay.split(',') + delayTime += getMaxMillisecondNumber(transitionDelays) + } + + return delayTime +} + export const updateRect = (id?: string) => { id = (typeof id === 'string' && id) || getCurrent().schema?.id clearHover() @@ -481,7 +509,9 @@ export const updateRect = (id?: string) => { const isBodySelected = !selectState.componentName && selectState.width > 0 if (id || isBodySelected) { - setTimeout(() => setSelectRect(id)) + // 获取元素动画持续时间 + const waitTime = getElementDurationTime(id) + setTimeout(() => setSelectRect(id), waitTime) } else { clearSelect() } @@ -816,7 +846,6 @@ export const dragMove = (event: DragEvent, isHover: boolean) => { // type == clickTree, 为点击大纲; type == loop-id=xxx ,为点击循环数据 export const selectNode = async (id: string, type?: string, isMultiple = false) => { const { node } = useCanvas().getNodeWithParentById(id) || {} - let element = querySelectById(id) if (element && node) { @@ -825,7 +854,6 @@ export const selectNode = async (id: string, type?: string, isMultiple = false) } const nodeIsSelected = setSelectRect(id, element, { isMultiple, type, schema: node }) - // 执行setSelectRect之后再去判断multiSelectedStates的长度 if (multiSelectedStates.value.length === 1) { const { schema: node, parent, type } = multiSelectedStates.value[0] @@ -851,6 +879,7 @@ export const selectNode = async (id: string, type?: string, isMultiple = false) if (multiSelectedStates.value.length === 1) { const { schema: node, parent, type, id } = multiSelectedStates.value[0] canvasState.emit('selected', node, parent, type, id) + return node } else { canvasState.emit('selected') diff --git a/packages/canvas/init-canvas/canvas.html b/packages/canvas/init-canvas/canvas.html index e9d2b2efaa..1dcefc4015 100644 --- a/packages/canvas/init-canvas/canvas.html +++ b/packages/canvas/init-canvas/canvas.html @@ -6,6 +6,7 @@ + diff --git a/packages/common/component/toolbar-built-in/ToolbarBaseIcon.vue b/packages/common/component/toolbar-built-in/ToolbarBaseIcon.vue index f669467932..489892c7a2 100644 --- a/packages/common/component/toolbar-built-in/ToolbarBaseIcon.vue +++ b/packages/common/component/toolbar-built-in/ToolbarBaseIcon.vue @@ -1,11 +1,12 @@ - diff --git a/packages/configurator/src/code-list-configurator/CodeListConfigurator.vue b/packages/configurator/src/code-list-configurator/CodeListConfigurator.vue index 66bfffa0fe..651d39252c 100644 --- a/packages/configurator/src/code-list-configurator/CodeListConfigurator.vue +++ b/packages/configurator/src/code-list-configurator/CodeListConfigurator.vue @@ -39,8 +39,9 @@ - + + diff --git a/packages/configurator/src/model-api-configurator/ParamsBindGrid.vue b/packages/configurator/src/model-api-configurator/ParamsBindGrid.vue new file mode 100644 index 0000000000..90bd238611 --- /dev/null +++ b/packages/configurator/src/model-api-configurator/ParamsBindGrid.vue @@ -0,0 +1,58 @@ + + + + + diff --git a/packages/configurator/src/model-common/ModelSelect.vue b/packages/configurator/src/model-common/ModelSelect.vue new file mode 100644 index 0000000000..8c708b6adb --- /dev/null +++ b/packages/configurator/src/model-common/ModelSelect.vue @@ -0,0 +1,147 @@ + + + + diff --git a/packages/configurator/src/model-common/constants.js b/packages/configurator/src/model-common/constants.js new file mode 100644 index 0000000000..8a095ceec8 --- /dev/null +++ b/packages/configurator/src/model-common/constants.js @@ -0,0 +1,23 @@ +export const typeComponentsMap = { + String: { component: 'TinyInput' }, + Boolean: { + component: 'TinySelect', + props: { + options: [ + { + label: '是', + value: true + }, + { + label: '否', + value: false + } + ] + } + }, + Date: { component: 'TinyDatePicker', props: { format: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd' } }, + Number: { component: 'TinyNumeric' }, + Enum: { + component: 'TinySelect' + } +} diff --git a/packages/configurator/src/model-common/http.js b/packages/configurator/src/model-common/http.js new file mode 100644 index 0000000000..f1c104b3dd --- /dev/null +++ b/packages/configurator/src/model-common/http.js @@ -0,0 +1,6 @@ +import { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register' + +export const getModelList = (currentPage, params) => + getMetaApi(META_SERVICE.Http).get(`/material-center/api/model/list?currentPage=${currentPage}&pageSize=10`, { + params: params || {} + }) diff --git a/packages/configurator/src/model-common/utils.js b/packages/configurator/src/model-common/utils.js new file mode 100644 index 0000000000..7c760f315d --- /dev/null +++ b/packages/configurator/src/model-common/utils.js @@ -0,0 +1,52 @@ +import { getModelList } from './http' +import { typeComponentsMap } from './constants' + +const handleModelParameters = (paramItem) => { + const extension = {} + if (paramItem.type === 'Enum') { + extension.options = JSON.parse(paramItem.options) || [] + } + const item = { + ...paramItem, + ...(typeComponentsMap[paramItem.type]?.props || {}), + ...extension, + originType: paramItem.type, + label: paramItem?.label ?? paramItem.prop, + isModel: paramItem.isModel, + component: typeComponentsMap[paramItem.type]?.component ?? 'TinyInput', + itemVisible: true + } + delete item.type + return item +} + +export const handleSelectedModelParameters = async (model) => { + const parameters = await Promise.all( + (model?.parameters || model).map(async (item) => { + const defaultItem = handleModelParameters(item) + // 如果是关联字段,则查询关联模型数据 + if (item?.isModel) { + const data = await getModelList(1, { id: item.defaultValue }) + return { + ...defaultItem, + defaultValue: (data.records.length > 0 ? data.records[0].parameters : []).map((insideItem) => + handleModelParameters(insideItem) + ) + } + } else { + return defaultItem + } + }) + ) + return model?.parameters + ? { + id: model.id, + name: model.nameCn, + nameEn: model.nameEn, + description: model.description, + version: model.version, + baseUrl: model.modelUrl ?? '', + parameters + } + : parameters +} diff --git a/packages/configurator/src/model-configurator/MetaListItem.vue b/packages/configurator/src/model-configurator/MetaListItem.vue new file mode 100644 index 0000000000..f75803564b --- /dev/null +++ b/packages/configurator/src/model-configurator/MetaListItem.vue @@ -0,0 +1,258 @@ + + + + + diff --git a/packages/configurator/src/model-configurator/ModelConfigurator.vue b/packages/configurator/src/model-configurator/ModelConfigurator.vue new file mode 100644 index 0000000000..49c90fb682 --- /dev/null +++ b/packages/configurator/src/model-configurator/ModelConfigurator.vue @@ -0,0 +1,513 @@ + + + + + diff --git a/packages/configurator/src/operator-group-configurator/MetaChildItem.vue b/packages/configurator/src/operator-group-configurator/MetaChildItem.vue new file mode 100644 index 0000000000..c9a18f1499 --- /dev/null +++ b/packages/configurator/src/operator-group-configurator/MetaChildItem.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/packages/configurator/src/operator-group-configurator/MetaList.vue b/packages/configurator/src/operator-group-configurator/MetaList.vue new file mode 100644 index 0000000000..fefeead3fb --- /dev/null +++ b/packages/configurator/src/operator-group-configurator/MetaList.vue @@ -0,0 +1,21 @@ + + + diff --git a/packages/configurator/src/operator-group-configurator/MetaListItem.vue b/packages/configurator/src/operator-group-configurator/MetaListItem.vue new file mode 100644 index 0000000000..c0396ab153 --- /dev/null +++ b/packages/configurator/src/operator-group-configurator/MetaListItem.vue @@ -0,0 +1,354 @@ + + + + + diff --git a/packages/configurator/src/operator-group-configurator/OperatorGroupConfigurator.vue b/packages/configurator/src/operator-group-configurator/OperatorGroupConfigurator.vue new file mode 100644 index 0000000000..d155d1fb29 --- /dev/null +++ b/packages/configurator/src/operator-group-configurator/OperatorGroupConfigurator.vue @@ -0,0 +1,210 @@ + + + + + diff --git a/packages/configurator/src/radio-configurator/RadioConfigurator.vue b/packages/configurator/src/radio-configurator/RadioConfigurator.vue index aef009fd0b..d5a6970f8a 100644 --- a/packages/configurator/src/radio-configurator/RadioConfigurator.vue +++ b/packages/configurator/src/radio-configurator/RadioConfigurator.vue @@ -20,13 +20,14 @@ - diff --git a/packages/configurator/src/select-configurator/SelectConfigurator.vue b/packages/configurator/src/select-configurator/SelectConfigurator.vue index c095ccb43d..573e0d78cb 100644 --- a/packages/configurator/src/select-configurator/SelectConfigurator.vue +++ b/packages/configurator/src/select-configurator/SelectConfigurator.vue @@ -43,8 +43,9 @@ - + diff --git a/packages/configurator/src/source-select-configurator/http.ts b/packages/configurator/src/source-select-configurator/http.ts new file mode 100644 index 0000000000..5de4688fcc --- /dev/null +++ b/packages/configurator/src/source-select-configurator/http.ts @@ -0,0 +1,25 @@ +/** + * 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 { getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register' + +const baseUrl = '/material-center/api' + +// 资源管理 -- 根据分组ID获取资源列表 +export const fetchResourceListByGroupId = (resourceGroupId: number) => + getMetaApi(META_SERVICE.Http).get(`${baseUrl}/resource/find/${resourceGroupId}`) + +// 资源管理 -- 根据appId查询资源分组列表 +export const fetchResourceGroupByAppId = (appId?: number) => + getMetaApi(META_SERVICE.Http).get( + `${baseUrl}/resource-group/${appId || getMetaApi(META_SERVICE.GlobalService).getBaseInfo().id}` + ) diff --git a/packages/configurator/src/styles/vars.less b/packages/configurator/src/styles/vars.less index bae819898c..d628d7fe0e 100644 --- a/packages/configurator/src/styles/vars.less +++ b/packages/configurator/src/styles/vars.less @@ -43,4 +43,7 @@ --te-configurator-container-bg-color: var(--te-common-bg-container); --te-configurator-container-border-color-divider: var(--te-common-border-bg-divider); + + --te-configurator-tab-bar-bg-color: var(--te-common-bg-container); + --te-configurator-tab-bar-border-color-divider: var(--te-common-border-bg-divider); } diff --git a/packages/configurator/src/tab-bar-configurator/TabBarConfigurator.vue b/packages/configurator/src/tab-bar-configurator/TabBarConfigurator.vue new file mode 100644 index 0000000000..f8bccac239 --- /dev/null +++ b/packages/configurator/src/tab-bar-configurator/TabBarConfigurator.vue @@ -0,0 +1,236 @@ + + + diff --git a/packages/configurator/src/variable-configurator/VariableConfigurator.vue b/packages/configurator/src/variable-configurator/VariableConfigurator.vue index efb5bc1b3a..dab946b29e 100644 --- a/packages/configurator/src/variable-configurator/VariableConfigurator.vue +++ b/packages/configurator/src/variable-configurator/VariableConfigurator.vue @@ -70,6 +70,7 @@ :value="state.variable" :options="editorOptions" @editorDidMount="editorDidMount" + @change="editorChange" >
-' - } - - const transformedScript = transformSync(p1, { - babelrc: false, - plugins: [[vueJsx, { pragma: 'h' }]], - sourceMaps: false, - configFile: false - }) - - const res = `' - - return `${res}${endTag}` - }) - - newFiles[panelName] = newPanelValue + newFiles[panelName] = panelValue } // 根据新的参数更新预览 @@ -371,58 +358,266 @@ export const usePreviewData = ({ setFiles, store }: IUsePreviewData) => { scripts: Record styles: string[] }) => { + const searchParams = new URLSearchParams(location.search) + const previewType = searchParams.get('previewType') const { appData, metaData, importMapData } = await getBasicData(basicFiles, params.scripts) - previewState.currentPage = params.currentPage - previewState.ancestors = params.ancestors + if (previewType === 'page') { + previewState.currentPage = params.currentPage + previewState.ancestors = params.ancestors - // importMap 发生变化才更新 importMap - if (JSON.stringify(previewState.importMap) !== JSON.stringify(importMapData)) { - store.setImportMap(importMapData) - previewState.importMap = importMapData - } + // importMap 发生变化才更新 importMap + if (JSON.stringify(previewState.importMap) !== JSON.stringify(importMapData)) { + setImportMap(importMapData) + previewState.importMap = importMapData + } - const blockSet = new Set() + const blockSet = new Set() - let blocks = [] - const { getAllNestedBlocksSchema, generatePageCode } = getMetaApi('engine.service.generateCode') + let blocks = [] + const { getAllNestedBlocksSchema, generatePageCode } = getMetaApi('engine.service.generateCode') + + if (params.ancestors?.length) { + const promises = params.ancestors.map((item) => + getAllNestedBlocksSchema(item.page_content, fetchBlockSchema, blockSet) + ) + blocks = (await Promise.all(promises)).flat() + } - if (params.ancestors?.length) { - const promises = params.ancestors.map((item) => - getAllNestedBlocksSchema(item.page_content, fetchBlockSchema, blockSet) + const currentPageBlocks = await getAllNestedBlocksSchema( + params.currentPage?.page_content || {}, + fetchBlockSchema, + blockSet ) - blocks = (await Promise.all(promises)).flat() - } + blocks = blocks.concat(currentPageBlocks) + const pageCode = [ + ...getPageAncestryFiles(appData, params), + ...(blocks || []).map((blockSchema) => { + return { + panelName: `${blockSchema.fileName}.vue`, + panelValue: generatePageCode(blockSchema, appData?.componentsMap || [], { blockRelativePath: './' }) || '', + panelType: 'vue' + } + }) + ] + + const newFiles = store.getFiles() + const enableTailwindCSS = getMergeMeta('engine.config')?.enableTailwindCSS + const appJsCode = processAppJsCode(newFiles['app.js'] || '', params.styles, enableTailwindCSS) + + newFiles['app.js'] = appJsCode + pageCode.forEach((item) => assignFiles(item, newFiles)) + + const metaFiles = generateMetaFiles(metaData) + Object.assign(newFiles, metaFiles) + setFiles(newFiles, 'App.vue') + } else if (previewType === 'app') { + const appId = searchParams.get('id') + const { getAllNestedBlocksSchema, generateAppCode } = getMetaApi('engine.service.generateCode') + + let appSchema + + const getPreGenerateInfo = async () => { + const promises = [ + getMetaApi(META_SERVICE.Http).get(`/app-center/v1/api/apps/schema/${appId}`), + fetchPageList(appId) + ] + + const [appData, pageList] = await Promise.all(promises) + const pageDetailList = pageList + + // 这里需要手动传入 blockSet 的原因是多页面可能会存在重复的区块 + const blockSet = new Set() + const list = pageDetailList.map((page) => + getAllNestedBlocksSchema(page.page_content, fetchBlockSchema, blockSet) + ) + const blocks = await Promise.allSettled(list) + + const blockSchema = [] + blocks.forEach((item) => { + if (item.status === 'fulfilled' && Array.isArray(item.value)) { + blockSchema.push(...item.value) + } + }) - const currentPageBlocks = await getAllNestedBlocksSchema( - params.currentPage?.page_content || {}, - fetchBlockSchema, - blockSet - ) - blocks = blocks.concat(currentPageBlocks) - - const pageCode = [ - ...getPageAncestryFiles(appData, params), - ...(blocks || []).map((blockSchema) => { - return { - panelName: `${blockSchema.fileName}.vue`, - panelValue: generatePageCode(blockSchema, appData?.componentsMap || [], { blockRelativePath: './' }) || '', - panelType: 'vue' + appSchema = { + dataSource: appData.dataSource, + utils: appData.utils, + i18n: appData.i18n, + globalState: appData.globalState, + // 页面 schema + pageSchema: pageDetailList.map((item) => { + const { page_content, ...meta } = item + + return { + ...page_content, + meta: { + ...meta, + router: meta.route + } + } + }), + blockSchema, + // 物料数据 + componentsMap: [...(appData.componentsMap || [])], + // 物料依赖 + packages: [...(appData.packages || [])], + meta: { + ...(appData.meta || {}) + } } - }) - ] - const newFiles = store.getFiles() - const appJsCode = processAppJsCode(newFiles['app.js'], params.styles) + const res = await generateAppCode(appSchema) + + const { genResult = [] } = res || {} + const fileRes = genResult.map(({ fileContent, fileName, path, fileType }) => { + const slash = path.endsWith('/') || path === '.' ? '' : '/' + let filePath = `${path}${slash}` + if (filePath.startsWith('./')) { + filePath = filePath.slice(2) + } + if (filePath.startsWith('.')) { + filePath = filePath.slice(1) + } + + if (filePath.startsWith('/')) { + filePath = filePath.slice(1) + } - newFiles['app.js'] = appJsCode + return { + fileContent, + filePath: `${filePath}${fileName}`, + fileType + } + }) - pageCode.map(fixScriptLang).forEach((item) => assignFiles(item, newFiles)) + return fileRes + } - const metaFiles = generateMetaFiles(metaData) - Object.assign(newFiles, metaFiles) + const buildTreeRoutes = (routes) => { + const tree = [] + const routeMap = new Map() - setFiles(newFiles) + // 首先将所有路由存入一个 Map 中,以便快速查找 + routes.forEach((route) => { + routeMap.set(route.path, route) + }) + + // 递归构建树状结构 + const buildTree = (route) => { + const children = routes.filter((childRoute) => { + return childRoute.path.startsWith(route.path) && childRoute.path !== route.path + }) + + if (children.length > 0) { + route.children = children.map((childRoute) => { + const child = { ...childRoute } + buildTree(child) + return child + }) + } + } + + // 找到所有根路由 + routes.forEach((route) => { + if (!routes.some((otherRoute) => otherRoute.path !== route.path && route.path.startsWith(otherRoute.path))) { + const root = { ...route } + buildTree(root) + tree.push(root) + } + }) + + return tree + } + + const getRoutesAndImportSet = (schema) => { + const importSet = new Set() + const pageSchema = (schema.pageSchema || []).sort((a, b) => a.meta?.router?.length - b.meta?.router?.length) + const result = [] + const home = { + path: '/' + } + let isGetHome = false + pageSchema.forEach((item) => { + if ((item.meta?.isHome || item.meta?.isDefault) && !isGetHome) { + home.redirect = { name: `${item.meta.id}` } + isGetHome = true + } + importSet.add( + `import ${item.fileName} from './views${item.path ? `/${item.path}` : ''}/${item.fileName}.vue'` + ) + const newNode = { + path: `/${item.meta.router}`, + component: item.fileName, + name: `${item.meta.id}` + } + result.push(newNode) + }) + if (!isGetHome) { + isGetHome = true + home.redirect = { name: result[0]?.name } + } + + return { routes: [home, ...buildTreeRoutes(result)], importSet } + } + + const getRouterFile = (schema) => { + const { routes, importSet } = getRoutesAndImportSet(schema) + const resultStr = JSON.stringify(routes, null, 2).replace( + /("component":\s*)"(.*?)"/g, + (match, p1, p2) => p1 + p2 + ) + + // TODO: 支持 hash 模式、history 模式 + const importSnippet = `import { createRouter, createMemoryHistory } from 'vue-router'\n${[...importSet].join( + '\n' + )}` + const exportSnippet = `export default createRouter({history: createMemoryHistory(),routes })` + + const routeSnippets = `const routes = ${resultStr}` + + return `${importSnippet}\n ${routeSnippets} \n ${exportSnippet}` + } + + const formatCode = (fileContent, fileName) => { + if (fileName === 'src/router/index.js') { + fileContent = getRouterFile(appSchema) + } else { + fileContent = fileContent.replace(/(from\s*')(@)(\/.*')/g, '$1.$3') + } + if (fileName === 'src/App.vue') { + fileContent = fileContent.replace( + '', + `\n` + ) + fileContent = fileContent.replace( + `import { provide } from 'vue'`, + `import { Select as TinySelect } from '@opentiny/vue'\nimport { ref, provide, watchEffect } from 'vue'\nimport { useRoute, useRouter } from 'vue-router'` + ) + fileContent = fileContent.replace( + `provide(I18nInjectionKey, i18n)`, + `const route = useRoute()\nconst router = useRouter()\nconst currentRoute = ref()\n\nwatchEffect(() => {\n\tcurrentRoute.value = route.path\n})\n\nconst routeChange = () => {\n\trouter.push(currentRoute.value)\n}\nprovide(I18nInjectionKey, i18n)` + ) + } + return fileContent + } + + const fileRes = await getPreGenerateInfo() + const newFileRes = fileRes.filter((item) => item.filePath.includes('src/')) + const srcFiles = newFileRes.reduce((prev, item) => { + const fileName = item.filePath + prev[fileName] = formatCode(item.fileContent, fileName) + return prev + }, {}) + srcFiles['import-map.json'] = JSON.stringify(importMapData) + const newFiles = store.getFiles() + const enableTailwindCSS = getMergeMeta('engine.config')?.enableTailwindCSS + const appJsCode = processAppJsCode(newFiles['app.js'] || '', params.styles, enableTailwindCSS) + srcFiles['app.js'] = appJsCode + srcFiles['main.js'] = `import app from './app.js' \n ${srcFiles['src/main.js']}` + srcFiles['main.js'] = srcFiles['main.js'].replace("import 'element-plus/dist/index.css'", '') + setFiles(srcFiles, 'src/main.js') + } } const loadInitialData = async () => { diff --git a/packages/design-core/src/preview/src/previewDefaultRegistry.js b/packages/design-core/src/preview/src/previewDefaultRegistry.js index bcb5a04038..d2b67b89e2 100644 --- a/packages/design-core/src/preview/src/previewDefaultRegistry.js +++ b/packages/design-core/src/preview/src/previewDefaultRegistry.js @@ -86,7 +86,8 @@ export default { icon: 'dark', oppositeTheme: 'light' } - ] + ], + enableTailwindCSS: true }, toolbars: [Breadcrumb, Media, Lang] } diff --git a/packages/engine-cli/package.json b/packages/engine-cli/package.json index 4969f83f50..3e9e77c7af 100644 --- a/packages/engine-cli/package.json +++ b/packages/engine-cli/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-cli", - "version": "2.7.0", + "version": "2.9.0", "description": "", "main": "dist/index.js", "scripts": { diff --git a/packages/engine-cli/template/designer/engine.config.js b/packages/engine-cli/template/designer/engine.config.js index fa308f9bc2..0ed7c1858a 100644 --- a/packages/engine-cli/template/designer/engine.config.js +++ b/packages/engine-cli/template/designer/engine.config.js @@ -3,5 +3,7 @@ export default { theme: 'light', material: ['/mock/bundle.json'], scripts: [], - styles: [] + styles: [], + // 是否开启 TailWindCSS 特性 + enableTailwindCSS: true } diff --git a/packages/engine-cli/template/designer/package.json b/packages/engine-cli/template/designer/package.json index 01d9c9d09f..9d07a03e07 100644 --- a/packages/engine-cli/template/designer/package.json +++ b/packages/engine-cli/template/designer/package.json @@ -11,9 +11,9 @@ "serve:mock": "node node_modules/@opentiny/tiny-engine-mock/dist/app.js" }, "dependencies": { - "@opentiny/tiny-engine": "^2.7.0", - "@opentiny/tiny-engine-meta-register": "^2.7.0", - "@opentiny/tiny-engine-utils": "^2.7.0", + "@opentiny/tiny-engine": "^2.9.0", + "@opentiny/tiny-engine-meta-register": "^2.9.0", + "@opentiny/tiny-engine-utils": "^2.9.0", "@opentiny/vue": "~3.20.0", "@opentiny/vue-design-smb": "~3.20.0", "@opentiny/vue-icon": "~3.20.0", @@ -24,8 +24,8 @@ "vue": "^3.4.21" }, "devDependencies": { - "@opentiny/tiny-engine-mock": "^2.7.0", - "@opentiny/tiny-engine-vite-config": "^2.7.0", + "@opentiny/tiny-engine-mock": "^2.9.0", + "@opentiny/tiny-engine-vite-config": "^2.9.0", "@vitejs/plugin-vue": "^5.1.2", "cross-env": "^7.0.3", "vite": "^5.4.2", diff --git a/packages/engine-cli/template/designer/public/mock/bundle.json b/packages/engine-cli/template/designer/public/mock/bundle.json index 53c0ca0d82..13b15cfc4f 100644 --- a/packages/engine-cli/template/designer/public/mock/bundle.json +++ b/packages/engine-cli/template/designer/public/mock/bundle.json @@ -4,53 +4,26 @@ "materials": { "components": [ { - "id": 1, - "version": "2.4.2", + "version": "3.22.0", "name": { - "zh_CN": "输入框" + "zh_CN": "评分" }, - "component": "ElInput", - "icon": "input", - "description": "通过鼠标或键盘输入字符", - "doc_url": "", + "component": "TinyRate", + "icon": "line", + "description": "评分", + "docUrl": "", "screenshot": "", "tags": "", "keywords": "", - "dev_mode": "proCode", + "devMode": "proCode", "npm": { - "package": "element-plus", - "exportName": "ElInput", + "package": "@opentiny/vue", + "exportName": "TinyRate", "destructuring": true }, - "group": "表单组件", - "category": "element-plus", - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "isPopper": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["type", "size"] - }, - "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, + "group": "component", + "category": "评分组件", + "priority": 2, "schema": { "properties": [ { @@ -60,721 +33,561 @@ }, "content": [ { - "property": "modelValue", + "cols": 12, + "type": "number", "label": { "text": { "zh_CN": "绑定值" } }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "modelValue", + "readOnly": false, + "required": false, "description": { "zh_CN": "绑定值" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "defaultValue": 0, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "最大分值" } }, - "description": { - "zh_CN": "尺寸" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "max", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "最大分值" + }, + "defaultValue": 5, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", + "type": "array", + "label": { + "text": { + "zh_CN": "颜色数组" + } + }, "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "colors", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "icon 的颜色数组,为 Threshold 三个分段所对应的颜色" + }, + "defaultValue": "['#FADB14', '#FADB14', '#FADB14']", + "labelPosition": "left" }, { - "property": "type", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "禁用未选中颜色" } }, - "description": { - "zh_CN": "类型" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "disabled-void-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "禁用状态下未选中 icon 的颜色" + }, + "defaultValue": "#D9D9D9", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", "type": "string", + "label": { + "text": { + "zh_CN": "禁用未选中图标类" + } + }, "widget": { - "component": "InputConfigurator", - "props": {} - } + "props": { + "placeholder": "请输入图标名称" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "disabled-void-icon-class", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "只读状态下未选中的图标样式名" + }, + "defaultValue": "icon-starActive", + "labelPosition": "left" }, { - "property": "placeholder", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "图标类数组" } }, - "description": { - "zh_CN": "输入框占位文本" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "icon-classes", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "三个分段对应的图标样式名" + }, + "defaultValue": "['icon-starActive', 'icon-starActive', 'icon-starActive']", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", "type": "string", + "label": { + "text": { + "zh_CN": "图标大小" + } + }, "widget": { - "component": "I18nConfigurator", - "props": {} + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "device": [] + "disabled": false, + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "图标字体大小" + }, + "defaultValue": "18px", + "labelPosition": "left" }, { - "property": "maxlength", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "最大长度" + "zh_CN": "图标间距" } }, - "description": { - "zh_CN": "最大输入长度" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "space", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "每个图标所占宽度" + }, + "defaultValue": "24px", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "type": "number", + "type": "string", + "label": { + "text": { + "zh_CN": "文字颜色" + } + }, "widget": { - "component": "NumberConfigurator", - "props": {} + "props": {}, + "component": "ColorConfigurator" }, - "device": [] + "disabled": false, + "property": "text-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "辅助文字的颜色" + }, + "defaultValue": "#666666", + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "是否禁用" + "zh_CN": "未选中颜色" } }, - "description": { - "zh_CN": "是否禁用" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "void-color", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "未选中 icon 的颜色" + }, + "defaultValue": "#BFBFBF", + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "string", + "label": { + "text": { + "zh_CN": "未选中图标类" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "placeholder": "请输入图标名称" + }, + "component": "InputConfigurator" }, - "device": [] + "disabled": false, + "property": "void-icon-class", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "未选中 icon 的图标样式名" + }, + "defaultValue": "icon-starDisable", + "labelPosition": "left" } ], "description": { - "zh_CN": "" - } - } - ], - "events": { - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定值改变时触发" - }, - "description": { - "zh_CN": "双向绑定值改变时触发" - } - }, - "onBlur": { - "label": { - "zh_CN": "输入框失去焦点时触发" - }, - "description": { - "zh_CN": "输入框失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - } - }, - "slots": { - "prefix": { - "label": { - "zh_CN": "头部内容" - }, - "description": { - "zh_CN": "输入框头部内容,只对非 type='textarea' 有效" - } - }, - "suffix": { - "label": { - "zh_CN": "尾部内容" - }, - "description": { - "zh_CN": "输入框尾部内容,只对非 type='textarea' 有效" - } - }, - "prepend": { - "label": { - "zh_CN": "前置内容" - }, - "description": { - "zh_CN": "输入框前置内容,只对非 type='textarea' 有效" + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" } }, - "append": { - "label": { - "zh_CN": "后置内容" - }, - "description": { - "zh_CN": "输入框后置内容,只对非 type='textarea' 有效" - } - } - } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "日期选择器" - }, - "component": "ElDatePicker", - "icon": "datepick", - "description": "日期选择器", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElDatePicker", - "destructuring": true - }, - "group": "表单组件", - "category": "element-plus", - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "isPopper": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" - }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["type", "size"] - }, - "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, - "schema": { - "properties": [ { - "name": "0", + "name": "2", "label": { - "zh_CN": "基础属性" + "zh_CN": "行为属性" }, "content": [ { - "property": "modelValue", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "绑定值" + "zh_CN": "允许半选" } }, - "description": { - "zh_CN": "绑定值" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": false, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "allow-half", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否允许半选" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "readonly", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "只读" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否只读" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否为只读" + }, "defaultValue": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "高分阈值" } }, - "description": { - "zh_CN": "是否禁用" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "defaultValue": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "high-threshold", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "高分和中等分数的界限值,值本身被划分在高分中" + }, + "defaultValue": 4, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "低分阈值" } }, - "description": { - "zh_CN": "输入框尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "", "widget": { - "component": "SelectConfigurator", "props": { - "allowClear": true, - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "low-threshold", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "低分和中等分数的界限值,值本身被划分在低分中" + }, + "defaultValue": 2, + "labelPosition": "left" }, { - "property": "editable", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "是否可编辑" + "zh_CN": "单选形态" } }, - "description": { - "zh_CN": "文本框是否可编辑" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "defaultValue": true, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "radio", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "评分其他形态单选" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "clearable", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "是否可清除" + "zh_CN": "分数模板" } }, - "description": { - "zh_CN": "是否显示清楚按钮" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "defaultValue": true, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "score-template", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "分数显示模板,用“{value}”代表分数" }, - "device": [] + "defaultValue": "{value}", + "labelPosition": "left" }, { - "property": "placeholder", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "显示分数" } }, - "description": { - "zh_CN": "非范围选择时的占位内容" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "show-score", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示当前分数,show-score 和 show-text 不能同时为真" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "start-placeholder", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "起始占位文本" + "zh_CN": "显示文字" } }, - "description": { - "zh_CN": "范围选择时开始日期的占位内容" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "show-text", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示辅助文字,若为真,则会从 texts 数组中选取当前分数对应的文字内容" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "end-placeholder", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "结束占位文本" + "zh_CN": "文字在底部" } }, - "description": { - "zh_CN": "范围选择时结束日期的占位内容" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "text-on-bottom", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否在图标下显示对应的文字" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "type", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "文字数组" } }, - "description": { - "zh_CN": "显示类型" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "date", - "type": "string", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "year", - "value": "year" - }, - { - "label": "years", - "value": "years" - }, - { - "label": "month", - "value": "month" - }, - { - "label": "months", - "value": "months" - }, - { - "label": "date", - "value": "date" - }, - { - "label": "dates", - "value": "dates" - }, - { - "label": "datetime", - "value": "datetime" - }, - { - "label": "week", - "value": "week" - }, - { - "label": "datetimerange", - "value": "datetimerange" - }, - { - "label": "daterange", - "value": "daterange" - }, - { - "label": "monthrange", - "value": "monthrange" - }, - { - "label": "yearrange", - "value": "yearrange" - } - ] - } - }, - "device": [] - }, - { - "property": "popper-class", - "label": { - "text": { - "zh_CN": "下拉框类名" - } - }, - "description": { - "zh_CN": "DatePicker 下拉框的类名" + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": "", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "texts", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "辅助文字数组,文字的数量应该与max属性一致" }, - "device": [] + "defaultValue": "['很差', '差', '一般', '好', '很好']", + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" } } ], "events": { - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定值改变时触发" - }, - "description": { - "zh_CN": "双向绑定值改变时触发" - } - }, "onChange": { - "label": { - "zh_CN": "用户确认选定的值时触发" - }, - "description": { - "zh_CN": "用户确认选定的值时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "在组件 Input 失去焦点时触发" - }, - "description": { - "zh_CN": "在组件 Input 失去焦点时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "在组件 Input 获得焦点时触发" - }, - "description": { - "zh_CN": "在组件 Input 获得焦点时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onCalendarChange": { - "label": { - "zh_CN": "在日历所选日期更改时触发" - }, - "description": { - "zh_CN": "在日历所选日期更改时触发" - }, - "type": "event", - "defaultValue": "" - }, - "onPanelChange": { - "label": { - "zh_CN": "当日期面板改变时触发。" - }, - "description": { - "zh_CN": "当日期面板改变时触发。" - }, "type": "event", - "defaultValue": "" - }, - "onVisibleChange": { "label": { - "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + "zh_CN": "分值改变时触发" }, "description": { - "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + "zh_CN": "分值改变时触发" }, - "type": "event", - "defaultValue": "" - } - }, - "slots": { - "default": { - "label": { - "zh_CN": "自定义单元格内容" - }, - "description": { - "zh_CN": "自定义单元格内容" - } - }, - "range-separator": { - "label": { - "zh_CN": "自定义范围分割符内容" - }, - "description": { - "zh_CN": "自定义范围分割符内容" + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number", + "description": { + "zh_CN": "改变后的分值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } } - } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "按钮" - }, - "component": "ElButton", - "icon": "button", - "description": "常用的操作按钮", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElButton", - "destructuring": true + }, + "slots": {} }, - "group": "基础组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -785,16 +598,35 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["type", "size"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "滑块" + }, + "component": "TinySlider", + "icon": "slider", + "description": "滑块", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinySlider", + "destructuring": true }, + "group": "component", + "category": "滑块组件", + "priority": 2, "schema": { "properties": [ { @@ -804,297 +636,465 @@ }, "content": [ { - "property": "size", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "绑定值" } }, - "description": { - "zh_CN": "尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "modelValue", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置单滑块的当前值,必需是整数或数组" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "type", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "最小值" } }, - "description": { - "zh_CN": "类型" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "min", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置最小值" + }, + "defaultValue": 0, + "labelPosition": "left" }, { - "property": "plain", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "朴素按钮" + "zh_CN": "最大值" } }, - "description": { - "zh_CN": "是否为朴素按钮" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "max", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置最大值,必需是整数,可以负数,必需大于所设置的最小值" }, - "device": [] + "defaultValue": 100, + "labelPosition": "left" }, { - "property": "text", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "文字按钮" + "zh_CN": "步长" } }, - "description": { - "zh_CN": "是否为文字按钮" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "step", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置滑块移动时,每步位移距离,必需是大于0的正整数" }, - "device": [] - }, + "defaultValue": 1, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ { - "property": "bg", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "背景颜色" + "zh_CN": "高度" } }, - "description": { - "zh_CN": "是否显示文字按钮背景颜色" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "height", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "Slider 组件的高度,当 vertical 为 true 时有效" }, - "device": [] - }, + "defaultValue": "300px", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "link", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "链接按钮" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否为链接按钮" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否禁用" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "round", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "圆角按钮" + "zh_CN": "显示输入框" } }, - "description": { - "zh_CN": "是否为圆角按钮" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "property": "show-input", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示输入框" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "circle", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "圆形按钮" + "zh_CN": "显示提示" } }, - "description": { - "zh_CN": "是否为圆形按钮" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "show-tip", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示 tooltip" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "type": "string", + "type": "boolean", + "label": { + "text": { + "zh_CN": "单位" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": {}, + "component": "CheckBoxConfigurator" }, - "device": [] + "disabled": false, + "property": "unit", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "输入框后面显示的单位,仅在输入框模式下有效" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "loading", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "加载中状态" + "zh_CN": "竖向模式" } }, - "description": { - "zh_CN": "是否为加载中状态" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "vertical", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否竖向模式" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", - "type": "string", + "type": "function", + "label": { + "text": { + "zh_CN": "格式化提示" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" }, - "device": [] + "disabled": false, + "property": "format-tooltip", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "格式化 tooltip 提示" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "刻度" } }, - "description": { - "zh_CN": "是否禁用" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "marks", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置滑杆的刻度值" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "number", + "label": { + "text": { + "zh_CN": "总步数" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "device": [] + "disabled": false, + "property": "num-pages", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置总步数,即按快捷键 PageDown/PageUp 时,每次移动的距离是 \"⌈(max-min)/num-pages⌉\"" + }, + "defaultValue": 1, + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } ], - "events": {}, - "slots": { - "default": { + "events": { + "onStop": { + "type": "event", "label": { - "zh_CN": "default" + "zh_CN": "滑动结束时触发" }, "description": { - "zh_CN": "自定义默认内容" + "zh_CN": "设置滑块滑动结束时,触发该事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number | [number, number]", + "description": { + "zh_CN": "当前值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } }, - "loading": { + "onStart": { + "type": "event", "label": { - "zh_CN": "loading" + "zh_CN": "滑动开始时触发" }, "description": { - "zh_CN": "自定义加载中组件" + "zh_CN": "设置滑块滑动开始时,触发该事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Event", + "description": { + "zh_CN": "事件对象" + }, + "defaultValue": "" + }, + { + "name": "value", + "type": "number | [number, number]", + "description": { + "zh_CN": "当前值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } + }, + "onChange": { + "type": "event", + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "值改变时触发(使用鼠标拖曳时,只在松开鼠标后触发)" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number | [number, number]", + "description": { + "zh_CN": "当前值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "显示滑块值的插槽,仅仅 v-model 是单数值时才有效" } } } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单" }, - "component": "ElForm", - "icon": "form", - "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElForm", - "destructuring": true - }, - "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { - "childWhitelist": ["ElFormItem"], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -1103,448 +1103,650 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, - "schema": { - "properties": [ - { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "级联选择器" + }, + "component": "TinyCascader", + "icon": "cascader", + "description": "级联选择器", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyCascader", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { "name": "0", "label": { "zh_CN": "基础属性" }, "content": [ { - "property": "model", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "数据对象" + "zh_CN": "绑定值" } }, - "description": { - "zh_CN": "表单数据对象" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", "widget": { - "component": "CodeConfigurator", "props": { + "height": 150, "language": "json" - } - } + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "modelValue", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "选中项绑定值, 其类型由 props.multiple、props.emitPath 共同决定" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "rules", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "验证规则" + "zh_CN": "选项数据" } }, - "description": { - "zh_CN": "表单验证规则" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "top", "widget": { - "component": "CodeConfigurator", "props": { + "height": 150, "language": "json" - } - } + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "options", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "可选项数据源,键名可通过 Props 属性配置" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "inline", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "行内模式" + "zh_CN": "占位文本" } }, - "description": { - "zh_CN": "行内表单模式" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "placeholder", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "输入框占位文本" + }, + "defaultValue": "请选择", + "labelPosition": "left" }, { - "property": "label-position", + "cols": 12, + "type": "enum", "label": { "text": { - "zh_CN": "标签位置" + "zh_CN": "尺寸" } }, - "description": { - "zh_CN": "表单域标签的位置, 当设置为 left 或 right 时,则也需要设置标签宽度属性" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "right", "widget": { - "component": "SelectConfigurator", "props": { "options": [ { - "label": "left", - "value": "left" + "label": "medium", + "value": "medium" }, { - "label": "right", - "value": "right" + "label": "small", + "value": "small" }, { - "label": "top", - "value": "top" + "label": "mini", + "value": "mini" } ] - } - } + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "尺寸" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "label-width", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "标签宽度" + "zh_CN": "分隔符" } }, - "description": { - "zh_CN": "标签的长度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 可以使用 auto。" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "separator", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "选项分隔符" }, - "device": [] + "defaultValue": "/", + "labelPosition": "left" }, { - "property": "label-suffix", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "标签后缀" + "zh_CN": "显示所有层级" } }, - "description": { - "zh_CN": "表单域标签的后缀" + "widget": { + "props": {}, + "component": "SwitchConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "show-all-levels", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "输入框中是否显示选中值的完整路径" }, - "device": [] - }, + "defaultValue": true, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "hide-required-asterisk", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "隐藏必填星号" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否隐藏必填字段标签旁边的红色星号" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否禁用" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "require-asterisk-position", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "星号位置" + "zh_CN": "可清空" } }, - "description": { - "zh_CN": "星号的位置" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "left", - "widget": { - "component": "ButtonGroupConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "property": "clearable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否支持清空选项" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "show-message", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "显示校验信息" + "zh_CN": "折叠标签" } }, - "description": { - "zh_CN": "是否显示校验错误信息" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "collapse-tags", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "多选模式下是否折叠 Tag" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": true, "type": "boolean", + "label": { + "text": { + "zh_CN": "可筛选" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "filterable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否可搜索选项" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "inline-message", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "行内显示校验信息" + "zh_CN": "去抖延迟" } }, - "description": { - "zh_CN": "是否以行内形式展示校验信息" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "debounce", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "搜索关键词输入的去抖延迟,单位毫秒" + }, + "defaultValue": 300, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "object", + "label": { + "text": { + "zh_CN": "筛选前钩子" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "before-filter", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "筛选之前的钩子,参数为输入的值,若返回 false 或者返回 Promise 且被 reject,则停止筛选" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "status-icon", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "显示校验结果图标" + "zh_CN": "筛选方法" } }, - "description": { - "zh_CN": "是否在输入框中显示校验结果反馈图标" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "filter-method", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "自定义搜索逻辑,第一个参数是节点 node,第二个参数是搜索关键词 keyword,通过返回布尔值表示是否命中" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "validate-on-rule-change", + "cols": 12, + "type": "object", "label": { "text": { - "zh_CN": "触发验证" + "zh_CN": "配置选项" } }, - "description": { - "zh_CN": "是否在 rules 属性改变后立即触发一次验证" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "props", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "配置选项,具体见 ICascaderPanelConfig 表" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "形状模式" } }, - "description": { - "zh_CN": "用于控制该表单内组件的尺寸" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "shape", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 shape='filter' 属性切换至过滤器模式" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", "type": "string", - "defaultValue": "default", + "label": { + "text": { + "zh_CN": "标签" + } + }, "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "label", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "shape='filter' 时生效,可传入 label 显示标题" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "disabled", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "提示信息" } }, - "description": { - "zh_CN": "是否禁用该表单内的所有组件。 如果设置为 true, 它将覆盖内部组件的 disabled 属性" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "tip", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "shape='filter' 时生效,可传入 tip 显示提示信息" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, "type": "boolean", + "label": { + "text": { + "zh_CN": "透明背景" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": {}, + "component": "CheckBoxConfigurator" }, - "device": [] + "disabled": false, + "property": "blank", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "shape='filter' 时生效,设置过滤器模式背景为透明" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "scroll-to-error", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "滚动到错误项" + "zh_CN": "弹出框插入 body" } }, - "description": { - "zh_CN": "当校验失败时,滚动到第一个错误表单项" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "popper-append-to-body", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否将弹出框插入至 body 元素。在弹出框的定位出现问题时,可将该属性设置为 false (可参考 select 组件)" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", + "type": "string", + "label": { + "text": { + "zh_CN": "弹出框类名" + } + }, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "device": [] + "disabled": false, + "property": "popper-class", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "为 popper 添加类名(可参考 popover 组件)" + }, + "defaultValue": null, + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } ], "events": { - "onValidate": { + "onBlur": { + "type": "event", "label": { - "zh_CN": "任一表单项被校验后触发" + "zh_CN": "当失去焦点时触发" }, "description": { - "zh_CN": "任一表单项被校验后触发" + "zh_CN": "当失去焦点时触发" }, + "defaultValue": "" + }, + "onFocus": { "type": "event", - "functionInfo": { - "params": [], - "returns": {} + "label": { + "zh_CN": "当获得焦点时触发" + }, + "description": { + "zh_CN": "当获得焦点时触发" + }, + "defaultValue": "" + }, + "onChange": { + "type": "event", + "label": { + "zh_CN": "当选中节点变化时触发" + }, + "description": { + "zh_CN": "当选中节点变化时触发" + }, + "defaultValue": "" + }, + "onRemoveTag": { + "type": "event", + "label": { + "zh_CN": "在多选模式下,移除Tag时触发" + }, + "description": { + "zh_CN": "在多选模式下,移除Tag时触发" + }, + "defaultValue": "" + }, + "onExpandChange": { + "type": "event", + "label": { + "zh_CN": "当展开节点发生变化时触发" + }, + "description": { + "zh_CN": "当展开节点发生变化时触发" + }, + "defaultValue": "" + }, + "onVisibleChange": { + "type": "event", + "label": { + "zh_CN": "下拉框出现/隐藏时触发" + }, + "description": { + "zh_CN": "下拉框出现/隐藏时触发" }, "defaultValue": "" } }, - "slots": {} - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单子项" - }, - "component": "ElFormItem", - "icon": "formItem", - "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElFormItem", - "destructuring": true + "slots": { + "empty": { + "label": { + "zh_CN": "空状态" + }, + "description": { + "zh_CN": "无匹配选项时的内容" + } + }, + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "自定义备选项的节点内容,参数为 { node: ICascaderPanelNode, data: ICascaderPanelData },分别为当前节点的 Node 对象和数据" + } + }, + "no-data": { + "label": { + "zh_CN": "无数据" + }, + "description": { + "zh_CN": "通过 no-data 插槽设置没有数据时显示的内容" + } + } + } }, - "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, - "isContainer": true, + "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -1555,16 +1757,35 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "单选组" }, + "component": "TinyRadioGroup", + "icon": "radiogroup", + "description": "单选组", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyRadioGroup", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, "schema": { "properties": [ { @@ -1574,325 +1795,324 @@ }, "content": [ { - "property": "prop", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "键名" + "zh_CN": "绑定值" } }, - "description": { - "zh_CN": "model 的键名。 它可以是一个属性的值(如 a.b.0 或 [a', 'b', '0'])。 在定义了 validate、resetFields 的方法时,该属性是必填的" + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "modelValue", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "单选组绑定值" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "label", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "标签文本" + "zh_CN": "尺寸" } }, - "description": { - "zh_CN": "标签文本" + "widget": { + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + }, + "component": "SelectConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "单选组尺寸" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "label-width", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "标签宽度" + "zh_CN": "类型" } }, - "description": { - "zh_CN": "标签宽度,例如 '50px'。 可以使用 auto" + "widget": { + "props": { + "options": [ + { + "label": "radio", + "value": "radio" + }, + { + "label": "button", + "value": "button" + } + ] + }, + "component": "SelectConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "配置式单选组的展示形式" + }, + "defaultValue": "radio", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "required", "label": { "text": { - "zh_CN": "必填项" + "zh_CN": "填充颜色" } }, - "description": { - "zh_CN": "是否为必填项,如不设置,则会根据校验规则确认" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "fill", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "按钮形式单选选中时的背景颜色" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "rules", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "验证规则" + "zh_CN": "文本颜色" } }, - "description": { - "zh_CN": "表单验证规则, 更多内容可以参考async-validator" + "widget": { + "props": {}, + "component": "ColorConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "top", - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } - }, - { - "property": "error", - "label": { - "text": { - "zh_CN": "错误信息" - } - }, - "description": { - "zh_CN": "表单域验证错误时的提示信息。设置该值会导致表单验证状态变为 error,并显示该错误信息" - }, - "required": true, + "property": "text-color", "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, - { - "property": "show-message", - "label": { - "text": { - "zh_CN": "显示错误信息" - } - }, + "required": false, "description": { - "zh_CN": "是否显示校验错误信息" + "zh_CN": "按钮形式单选激活时的文本颜色" }, - "required": true, - "readOnly": false, - "disabled": false, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { "cols": 12, - "labelPosition": "left", "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "inline-message", "label": { "text": { - "zh_CN": "行内显示错误信息" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "是否在行内显示校验信息" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否禁用单选组" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "size", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "只读" } }, - "description": { - "zh_CN": "用于控制该表单内组件的尺寸" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "property": "display-only", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否只读状态" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "for", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "for" + "zh_CN": "垂直显示" } }, - "description": { - "zh_CN": "和原生标签相同能力" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, + "property": "vertical", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "垂直显示单选组" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ { - "property": "validate-status", + "cols": 12, + "type": "array", "label": { "text": { - "zh_CN": "校验状态" + "zh_CN": "选项配置" } }, - "description": { - "zh_CN": "formItem 校验的状态" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "error", - "value": "error" - }, - { - "label": "validating", - "value": "validating" - }, - { - "label": "success", - "value": "success" - } - ] - } - } + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "options", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "配置式单选组设置列表" + }, + "defaultValue": null, + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } ], - "events": {}, - "slots": { - "label": { + "events": { + "onChange": { + "type": "event", "label": { - "zh_CN": "label" + "zh_CN": "绑定值变化时触发" }, "description": { - "zh_CN": "标签位置显示的内容" + "zh_CN": "绑定值变化时触发的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "number[] | string[]", + "description": { + "zh_CN": "变化后的值" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } } - }, - "error": { + } + }, + "slots": { + "default": { "label": { - "zh_CN": "error" + "zh_CN": "默认内容" }, "description": { - "zh_CN": "验证错误信息的显示内容" + "zh_CN": "radio-group 的默认插槽" } } } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单" - }, - "component": "ElTable", - "icon": "table", - "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElTable", - "destructuring": true }, - "group": "数据展示", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { - "childWhitelist": ["ElTableColumn"], + "childWhitelist": "", "parentWhitelist": "", "descendantBlacklist": "", "ancestorWhitelist": "" @@ -1901,109 +2121,4769 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "步骤条" }, - "schema": { - "properties": [ - { - "name": "0", - "label": { + "component": "TinySteps", + "icon": "steps", + "description": "步骤条", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinySteps", + "destructuring": true + }, + "group": "component", + "category": "步骤条", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { "zh_CN": "基础属性" }, "content": [ { - "property": "data", + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "当前步骤" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "active", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "当前步骤索引,从0开始计数" + }, + "defaultValue": -1, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "array", "label": { "text": { "zh_CN": "数据" } }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "data", + "readOnly": false, + "required": false, "description": { - "zh_CN": "显示的数据" + "zh_CN": "步骤条的数据" }, - "required": true, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "名称字段" + } + }, + "widget": { + "props": { + "placeholder": "请输入字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "name-field", "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点名称对应的字段名" + }, + "defaultValue": "", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括当前步骤、数据等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "内容居中" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, "disabled": false, + "property": "content-center", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "使步骤条内容默认居中显示" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { "cols": 12, - "labelPosition": "top", + "type": "boolean", + "label": { + "text": { + "zh_CN": "点状样式" + } + }, "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "dot", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "点状形步骤条,当值只支持垂直样式" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "自适应宽度" } - } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "flex", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点是否自适应宽度" + }, + "defaultValue": false, + "labelPosition": "left" }, { - "property": "columns", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "表格列配置" + "zh_CN": "横向单链" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "line", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 line 设置横向单链型步骤条" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "间距" } }, + "widget": { + "props": { + "placeholder": "请输入宽度值" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "space", + "readOnly": false, "required": true, + "description": { + "zh_CN": "节点宽度, 可取值数字、带长度单位数值与百分比,传数字则默认以 px 为长度单位" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "高级模式" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "advanced", "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否开启高级向导模式" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "持续时间" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, "disabled": false, + "property": "duration", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点滚动的持续时间(单位 ms),仅高级向导模式有效" + }, + "defaultValue": 300, + "labelPosition": "left" + }, + { "cols": 12, - "properties": [ - { - "label": { - "zh_CN": "默认分组" - }, - "content": [ - { - "property": "type", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "type" - } - }, - "description": { - "text": { - "zh_CN": "对应列的类型。 如果设置了selection则显示多选框; 如果设置了 index 则显示该行的索引(从 1 开始计算); 如果设置了 expand 则显示为一个可展开的按钮" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "selection", - "value": "selection" - }, - { - "label": "index", - "value": "index" - }, - { - "label": "expand", - "value": "expand" - } - ] - } - } - }, - { - "property": "index", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "index" - } - }, - "description": { - "text": { - "zh_CN": "如果设置了 type=index,可以通过传递 index 属性来自定义索引" + "type": "number", + "label": { + "text": { + "zh_CN": "可见节点数" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "visible-num", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "控制信息可见的节点数,默认可见5个" + }, + "defaultValue": 5, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "计数字段" + } + }, + "widget": { + "props": { + "placeholder": "请输入字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "count-field", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "条形步骤条里徽标计数对应的字段名" + }, + "defaultValue": "", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "状态字段" + } + }, + "widget": { + "props": { + "placeholder": "请输入字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "status-field", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "数据状态对应的字段名,用于条形步骤条" + }, + "defaultValue": "", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": { + "onClick": { + "type": "event", + "label": { + "zh_CN": "节点点击事件" + }, + "description": { + "zh_CN": "节点点击事件,参数:index: 点击节点的索引node:点击节点的数据" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "index", + "type": "number", + "description": { + "zh_CN": "点击节点的索引" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "IStepsItem", + "description": { + "zh_CN": "点击节点的数据" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } + } + } + }, + "slots": { + "item": { + "label": { + "zh_CN": "数据项" + }, + "description": { + "zh_CN": "步骤条数据项插槽,用于条形步骤条" + } + }, + "itemFooter": { + "label": { + "zh_CN": "itemFooter" + }, + "description": { + "zh_CN": "步骤条数据项底部插槽,用于条形步骤条" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "树形菜单" + }, + "component": "TinyTreeMenu", + "icon": "tree", + "description": "树形菜单", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyTreeMenu", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "数据源" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "data", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "静态数据源" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "节点键" + } + }, + "widget": { + "props": { + "placeholder": "请输入节点键字段名" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "node-key", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置每个树节点唯一标识(key)的属性,在整棵树中都是唯一的" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "object", + "label": { + "text": { + "zh_CN": "映射字段" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "props", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "映射字段" + }, + "defaultValue": { + "label": "label", + "isLeaf": "isLeaf", + "children": "children", + "disabled": "disabled" + }, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "默认勾选键" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "default-checked-keys", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "默认勾选节点的 key 的数组" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "默认展开所有" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "default-expand-all", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否默认展开所有子节点" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "默认展开键" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "default-expanded-keys", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "默认展开节点的 key 的数组" + }, + "defaultValue": [], + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "默认展开高亮键" + } + }, + "widget": { + "props": { + "placeholder": "请输入高亮节点键" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "default-expanded-keys-highlight", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置默认展开节点中的某个节点高亮,配合 default-expanded-keys 属性使用" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 data、node-key、props 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "缩进距离" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "indent", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "子级相对于父级节点的水平缩进距离,单位 px" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "节点高度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "node-height", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "节点高度" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "文字省略" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "ellipsis", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否文字超长省略显示。优先级高于 wrap" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "换行显示" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "wrap", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否换行显示" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "component", + "label": { + "text": { + "zh_CN": "自定义图标" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "customIcon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置带图标树形菜单" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "component", + "label": { + "text": { + "zh_CN": "搜索图标" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "search-icon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义搜索图标" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "component", + "label": { + "text": { + "zh_CN": "后缀图标" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "suffix-icon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "全局设置带图标树形菜单" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示数字" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "show-number", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "右侧下拉图标区域是否显示为 number 属性定义的数字内容,建议不超过 4 个字符" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "width-adapt" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "width-adapt", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 widthAdapt 属性,是否让组件宽度自适应父容器。" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 indent、node-height、ellipsis 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "手风琴效果" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "accordion", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否设置为手风琴效果(只能展开一个同级别的节点)" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "严格勾选" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "check-strictly", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否遵循父级和子级严格不相关联的做法,配合 show-checkbox 属性使用" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "可清空" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "clearable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "搜索框是否可清空" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "可收起" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "collapsible", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否允许展开后的菜单收起,未和 show-number 配套使用时,仍可以点击图标收起" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "可拖动" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "draggable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否可拖动菜单节点" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "点击节点展开" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "expand-on-click-node", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否能点击节点即展开/收起。配置为 fasle 则只能点击下拉图标展开/收起" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "highlight-query" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "highlight-query", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "通过 highlightQuery 属性,是否在匹配的节点中,高亮搜索文字。" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "懒加载" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "lazy", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否懒加载子节点,配合 load 属性使用" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "侧边折叠按钮" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "menu-collapsible", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示侧边折叠与展开按钮" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "仅子级可选" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "only-check-children", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "父级是否不可选,只能展开不能跳转" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示复选框" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-checkbox", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "节点是否可被选择" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示展开收起" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "show-expand", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否启用一键展开/收起功能。点击左下角图标可展开/收起菜单注意:配合 customIcon 属性使用,纯文本菜单不支持此功能" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示搜索框" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-filter", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示搜索框,可搜索过滤节点" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示标题提示" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-title", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示节点的 title 提示,鼠标悬浮节点之上触发" + }, + "defaultValue": true, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 accordion、draggable、show-checkbox 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "允许拖拽回调" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "allow-drag", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "拖拽开始前的回调事件,定义节点是否允许拖拽的规则,返回 true 则允许拖拽,配合 draggable 属性使用" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "允许放置回调" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "allow-drop", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "拖拽结束前的回调事件,定义节点是否允许放置到模板节点的规则,返回 true 则允许放置,配合 draggable 属性使用" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "节点过滤方法" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "filter-node-method", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义树节点过滤的方法,返回 true 表示这个节点可以显示,返回 false 则表示这个节点会被隐藏" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "获取数据方法" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "get-menu-data-sync", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义获取服务端数据源的方法,返回一个 Promise 对象" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "加载子树方法" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "load", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "加载子树数据的方法,仅当 lazy 属性为 true 时生效" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + }, + { + "name": "4", + "label": { + "zh_CN": "其他属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "空文本" + } + }, + "widget": { + "props": { + "placeholder": "请输入空文本" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "empty-text", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "内容为空时展示的文本" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "占位符" + } + }, + "widget": { + "props": { + "placeholder": "请输入占位符" + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "placeholder", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "当数据为空时的占位符" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "无法归属到 “基础/样式/行为/高级属性” 的特殊配置项,这类属性通常不具备前四类分组的明确功能共性" + } + } + ], + "events": { + "onNodeClick": { + "type": "event", + "label": { + "zh_CN": "节点点击" + }, + "description": { + "zh_CN": "监听节点被点击时的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeExpand": { + "type": "event", + "label": { + "zh_CN": "节点展开" + }, + "description": { + "zh_CN": "监听节点被点击展开时的事件;" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onCheckChange": { + "type": "event", + "label": { + "zh_CN": "勾选状态变化" + }, + "description": { + "zh_CN": "监听可勾选节点的勾选状态发生变化时的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + }, + { + "name": "checked", + "type": "boolean", + "description": { + "zh_CN": "是否勾选" + }, + "defaultValue": "" + }, + { + "name": "indeterminate", + "type": "boolean", + "description": { + "zh_CN": "是否半选" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeDragEnd": { + "type": "event", + "label": { + "zh_CN": "节点拖拽结束" + }, + "description": { + "zh_CN": "监听节点拖拽结束(可能未成功)的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "draggingNode", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "拖拽节点" + }, + "defaultValue": "" + }, + { + "name": "targetNode", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "目标节点" + }, + "defaultValue": "" + }, + { + "name": "dropType", + "type": "IDropType", + "description": { + "zh_CN": "放置类型" + }, + "defaultValue": "" + }, + { + "name": "event", + "type": "DragEvent", + "description": { + "zh_CN": "拖拽事件" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeCollapse": { + "type": "event", + "label": { + "zh_CN": "节点收起" + }, + "description": { + "zh_CN": "监听节点被点击收起时的事件;" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onCurrentChange": { + "type": "event", + "label": { + "zh_CN": "当前节点变化" + }, + "description": { + "zh_CN": "监听当前选中节点发生变化时的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "nodeData", + "type": "ITreeNodeData", + "description": { + "zh_CN": "节点数据" + }, + "defaultValue": "" + }, + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + }, + "onNodeDragStart": { + "type": "event", + "label": { + "zh_CN": "节点拖拽开始" + }, + "description": { + "zh_CN": "监听节点开始拖拽的事件" + }, + "defaultValue": "", + "functionInfo": { + "params": [ + { + "name": "node", + "type": "ITreeNodeVm", + "description": { + "zh_CN": "节点对象" + }, + "defaultValue": "" + }, + { + "name": "event", + "type": "DragEvent", + "description": { + "zh_CN": "拖拽事件" + }, + "defaultValue": "" + } + ], + "returns": { + "type": "void", + "description": { + "zh_CN": "无返回值" + }, + "defaultValue": "" + } + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "自定义树节点的内容,参数为 { node, data }" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "折线图" + }, + "component": "TinyHuichartsLine", + "icon": "line", + "description": "折线图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsLine", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "折线图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "柱状图" + }, + "component": "TinyHuichartsHistogram", + "icon": "histogram", + "description": "柱状图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsHistogram", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "柱状图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "条形图" + }, + "component": "TinyHuichartsBar", + "icon": "bar", + "description": "条形图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsBar", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "条形图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onReady": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,每次渲染都会触发一次" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + }, + "onReadyOnce": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,只会在首次渲染完成后触发" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "圆盘图" + }, + "component": "TinyHuichartsPie", + "icon": "pie", + "description": "圆盘图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsPie", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "圆盘图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "环形图" + }, + "component": "TinyHuichartsRing", + "icon": "ring", + "description": "环形图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsRing", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "环形图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onReady": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,每次渲染都会触发一次" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + }, + "onReadyOnce": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,只会在首次渲染完成后触发" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "组件默认插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "雷达图" + }, + "component": "TinyHuichartsRadar", + "icon": "radar", + "description": "雷达图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsRadar", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "雷达图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onReady": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,每次渲染都会触发一次" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + }, + "onReadyOnce": { + "type": "event", + "label": { + "zh_CN": "图表渲染完成后触发" + }, + "description": { + "zh_CN": "图表渲染完成后触发,只会在首次渲染完成后触发" + }, + "defaultValue": "", + "functionInfo": { + "params": [], + "returns": {} + } + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "组件默认插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "漏斗图" + }, + "component": "TinyHuichartsFunnel", + "icon": "funnel", + "description": "漏斗图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsFunnel", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "漏斗图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "散点图" + }, + "component": "TinyHuichartsScatter", + "icon": "scatter", + "description": "散点图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsScatter", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "散点图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "瀑布图" + }, + "component": "TinyHuichartsWaterfall", + "icon": "waterfall", + "description": "瀑布图", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "destructuring": true, + "exportName": "TinyHuichartsWaterfall", + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, + "group": "chart", + "category": "图表组件", + "priority": 2, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ + { + "property": "options", + "label": { + "text": { + "zh_CN": "图表配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + }, + "description": { + "zh_CN": "瀑布图配置" + }, + "labelPosition": "left" + } + ] + } + ], + "events": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "输入框" + }, + "component": "ElInput", + "icon": "input", + "description": "通过鼠标或键盘输入字符", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElInput", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["type", "size"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "description": { + "zh_CN": "绑定值" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "类型" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "maxlength", + "label": { + "text": { + "zh_CN": "最大长度" + } + }, + "description": { + "zh_CN": "最大输入长度" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "number", + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "是否禁用" + } + }, + "description": { + "zh_CN": "是否禁用" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定值改变时触发" + }, + "description": { + "zh_CN": "双向绑定值改变时触发" + } + }, + "onBlur": { + "label": { + "zh_CN": "输入框失去焦点时触发" + }, + "description": { + "zh_CN": "输入框失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + }, + "slots": { + "prefix": { + "label": { + "zh_CN": "头部内容" + }, + "description": { + "zh_CN": "输入框头部内容,只对非 type='textarea' 有效" + } + }, + "suffix": { + "label": { + "zh_CN": "尾部内容" + }, + "description": { + "zh_CN": "输入框尾部内容,只对非 type='textarea' 有效" + } + }, + "prepend": { + "label": { + "zh_CN": "前置内容" + }, + "description": { + "zh_CN": "输入框前置内容,只对非 type='textarea' 有效" + } + }, + "append": { + "label": { + "zh_CN": "后置内容" + }, + "description": { + "zh_CN": "输入框后置内容,只对非 type='textarea' 有效" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "日期选择器" + }, + "component": "ElDatePicker", + "icon": "datepick", + "description": "日期选择器", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElDatePicker", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["type", "size"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "modelValue", + "label": { + "text": { + "zh_CN": "绑定值" + } + }, + "description": { + "zh_CN": "绑定值" + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "readonly", + "label": { + "text": { + "zh_CN": "只读" + } + }, + "description": { + "zh_CN": "是否只读" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": false, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "description": { + "zh_CN": "是否禁用" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": false, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "输入框尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "", + "widget": { + "component": "SelectConfigurator", + "props": { + "allowClear": true, + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "editable", + "label": { + "text": { + "zh_CN": "是否可编辑" + } + }, + "description": { + "zh_CN": "文本框是否可编辑" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": true, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "clearable", + "label": { + "text": { + "zh_CN": "是否可清除" + } + }, + "description": { + "zh_CN": "是否显示清楚按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "defaultValue": true, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "placeholder", + "label": { + "text": { + "zh_CN": "占位文本" + } + }, + "description": { + "zh_CN": "非范围选择时的占位内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "start-placeholder", + "label": { + "text": { + "zh_CN": "起始占位文本" + } + }, + "description": { + "zh_CN": "范围选择时开始日期的占位内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "end-placeholder", + "label": { + "text": { + "zh_CN": "结束占位文本" + } + }, + "description": { + "zh_CN": "范围选择时结束日期的占位内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "显示类型" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "date", + "type": "string", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "year", + "value": "year" + }, + { + "label": "years", + "value": "years" + }, + { + "label": "month", + "value": "month" + }, + { + "label": "months", + "value": "months" + }, + { + "label": "date", + "value": "date" + }, + { + "label": "dates", + "value": "dates" + }, + { + "label": "datetime", + "value": "datetime" + }, + { + "label": "week", + "value": "week" + }, + { + "label": "datetimerange", + "value": "datetimerange" + }, + { + "label": "daterange", + "value": "daterange" + }, + { + "label": "monthrange", + "value": "monthrange" + }, + { + "label": "yearrange", + "value": "yearrange" + } + ] + } + }, + "device": [] + }, + { + "property": "popper-class", + "label": { + "text": { + "zh_CN": "下拉框类名" + } + }, + "description": { + "zh_CN": "DatePicker 下拉框的类名" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": "", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定值改变时触发" + }, + "description": { + "zh_CN": "双向绑定值改变时触发" + } + }, + "onChange": { + "label": { + "zh_CN": "用户确认选定的值时触发" + }, + "description": { + "zh_CN": "用户确认选定的值时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "在组件 Input 失去焦点时触发" + }, + "description": { + "zh_CN": "在组件 Input 失去焦点时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "在组件 Input 获得焦点时触发" + }, + "description": { + "zh_CN": "在组件 Input 获得焦点时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onCalendarChange": { + "label": { + "zh_CN": "在日历所选日期更改时触发" + }, + "description": { + "zh_CN": "在日历所选日期更改时触发" + }, + "type": "event", + "defaultValue": "" + }, + "onPanelChange": { + "label": { + "zh_CN": "当日期面板改变时触发。" + }, + "description": { + "zh_CN": "当日期面板改变时触发。" + }, + "type": "event", + "defaultValue": "" + }, + "onVisibleChange": { + "label": { + "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + }, + "description": { + "zh_CN": "当 DatePicker 的下拉列表出现/消失时触发" + }, + "type": "event", + "defaultValue": "" + } + }, + "slots": { + "default": { + "label": { + "zh_CN": "自定义单元格内容" + }, + "description": { + "zh_CN": "自定义单元格内容" + } + }, + "range-separator": { + "label": { + "zh_CN": "自定义范围分割符内容" + }, + "description": { + "zh_CN": "自定义范围分割符内容" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "按钮" + }, + "component": "ElButton", + "icon": "button", + "description": "常用的操作按钮", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElButton", + "destructuring": true + }, + "group": "基础组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["type", "size"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "type", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "description": { + "zh_CN": "类型" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "plain", + "label": { + "text": { + "zh_CN": "朴素按钮" + } + }, + "description": { + "zh_CN": "是否为朴素按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "text", + "label": { + "text": { + "zh_CN": "文字按钮" + } + }, + "description": { + "zh_CN": "是否为文字按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "bg", + "label": { + "text": { + "zh_CN": "背景颜色" + } + }, + "description": { + "zh_CN": "是否显示文字按钮背景颜色" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "link", + "label": { + "text": { + "zh_CN": "链接按钮" + } + }, + "description": { + "zh_CN": "是否为链接按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "round", + "label": { + "text": { + "zh_CN": "圆角按钮" + } + }, + "description": { + "zh_CN": "是否为圆角按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "circle", + "label": { + "text": { + "zh_CN": "圆形按钮" + } + }, + "description": { + "zh_CN": "是否为圆形按钮" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "loading", + "label": { + "text": { + "zh_CN": "加载中状态" + } + }, + "description": { + "zh_CN": "是否为加载中状态" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "description": { + "zh_CN": "是否禁用" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": { + "default": { + "label": { + "zh_CN": "default" + }, + "description": { + "zh_CN": "自定义默认内容" + } + }, + "loading": { + "label": { + "zh_CN": "loading" + }, + "description": { + "zh_CN": "自定义加载中组件" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElForm", + "icon": "form", + "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElForm", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": ["ElFormItem"], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["inline", "label-width"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "model", + "label": { + "text": { + "zh_CN": "数据对象" + } + }, + "description": { + "zh_CN": "表单数据对象" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "rules", + "label": { + "text": { + "zh_CN": "验证规则" + } + }, + "description": { + "zh_CN": "表单验证规则" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "inline", + "label": { + "text": { + "zh_CN": "行内模式" + } + }, + "description": { + "zh_CN": "行内表单模式" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "label-position", + "label": { + "text": { + "zh_CN": "标签位置" + } + }, + "description": { + "zh_CN": "表单域标签的位置, 当设置为 left 或 right 时,则也需要设置标签宽度属性" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "right", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + }, + { + "label": "top", + "value": "top" + } + ] + } + } + }, + { + "property": "label-width", + "label": { + "text": { + "zh_CN": "标签宽度" + } + }, + "description": { + "zh_CN": "标签的长度,例如 '50px'。 作为 Form 直接子元素的 form-item 会继承该值。 可以使用 auto。" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "label-suffix", + "label": { + "text": { + "zh_CN": "标签后缀" + } + }, + "description": { + "zh_CN": "表单域标签的后缀" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "hide-required-asterisk", + "label": { + "text": { + "zh_CN": "隐藏必填星号" + } + }, + "description": { + "zh_CN": "是否隐藏必填字段标签旁边的红色星号" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "require-asterisk-position", + "label": { + "text": { + "zh_CN": "星号位置" + } + }, + "description": { + "zh_CN": "星号的位置" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "left", + "widget": { + "component": "ButtonGroupConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "show-message", + "label": { + "text": { + "zh_CN": "显示校验信息" + } + }, + "description": { + "zh_CN": "是否显示校验错误信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "inline-message", + "label": { + "text": { + "zh_CN": "行内显示校验信息" + } + }, + "description": { + "zh_CN": "是否以行内形式展示校验信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "status-icon", + "label": { + "text": { + "zh_CN": "显示校验结果图标" + } + }, + "description": { + "zh_CN": "是否在输入框中显示校验结果反馈图标" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "validate-on-rule-change", + "label": { + "text": { + "zh_CN": "触发验证" + } + }, + "description": { + "zh_CN": "是否在 rules 属性改变后立即触发一次验证" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "用于控制该表单内组件的尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "description": { + "zh_CN": "是否禁用该表单内的所有组件。 如果设置为 true, 它将覆盖内部组件的 disabled 属性" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "scroll-to-error", + "label": { + "text": { + "zh_CN": "滚动到错误项" + } + }, + "description": { + "zh_CN": "当校验失败时,滚动到第一个错误表单项" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "device": [] + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onValidate": { + "label": { + "zh_CN": "任一表单项被校验后触发" + }, + "description": { + "zh_CN": "任一表单项被校验后触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" + } + }, + "slots": {} + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单子项" + }, + "component": "ElFormItem", + "icon": "formItem", + "description": "表单包含 输入框, 单选框, 下拉选择, 多选框 等用户输入的组件。 使用表单,您可以收集、验证和提交数据。", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElFormItem", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["inline", "label-width"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "prop", + "label": { + "text": { + "zh_CN": "键名" + } + }, + "description": { + "zh_CN": "model 的键名。 它可以是一个属性的值(如 a.b.0 或 [a', 'b', '0'])。 在定义了 validate、resetFields 的方法时,该属性是必填的" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "label", + "label": { + "text": { + "zh_CN": "标签文本" + } + }, + "description": { + "zh_CN": "标签文本" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "label-width", + "label": { + "text": { + "zh_CN": "标签宽度" + } + }, + "description": { + "zh_CN": "标签宽度,例如 '50px'。 可以使用 auto" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "required", + "label": { + "text": { + "zh_CN": "必填项" + } + }, + "description": { + "zh_CN": "是否为必填项,如不设置,则会根据校验规则确认" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "rules", + "label": { + "text": { + "zh_CN": "验证规则" + } + }, + "description": { + "zh_CN": "表单验证规则, 更多内容可以参考async-validator" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "error", + "label": { + "text": { + "zh_CN": "错误信息" + } + }, + "description": { + "zh_CN": "表单域验证错误时的提示信息。设置该值会导致表单验证状态变为 error,并显示该错误信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "show-message", + "label": { + "text": { + "zh_CN": "显示错误信息" + } + }, + "description": { + "zh_CN": "是否显示校验错误信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "inline-message", + "label": { + "text": { + "zh_CN": "行内显示错误信息" + } + }, + "description": { + "zh_CN": "是否在行内显示校验信息" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "description": { + "zh_CN": "用于控制该表单内组件的尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" + }, + { + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "for", + "label": { + "text": { + "zh_CN": "for" + } + }, + "description": { + "zh_CN": "和原生标签相同能力" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "validate-status", + "label": { + "text": { + "zh_CN": "校验状态" + } + }, + "description": { + "zh_CN": "formItem 校验的状态" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "error", + "value": "error" + }, + { + "label": "validating", + "value": "validating" + }, + { + "label": "success", + "value": "success" + } + ] + } + } + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": { + "label": { + "label": { + "zh_CN": "label" + }, + "description": { + "zh_CN": "标签位置显示的内容" + } + }, + "error": { + "label": { + "zh_CN": "error" + }, + "description": { + "zh_CN": "验证错误信息的显示内容" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElTable", + "icon": "table", + "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElTable", + "destructuring": true + }, + "group": "数据展示", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": ["ElTableColumn"], + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["inline", "label-width"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "property": "data", + "label": { + "text": { + "zh_CN": "数据" + } + }, + "description": { + "zh_CN": "显示的数据" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "columns", + "label": { + "text": { + "zh_CN": "表格列配置" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "properties": [ + { + "label": { + "zh_CN": "默认分组" + }, + "content": [ + { + "property": "type", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "type" + } + }, + "description": { + "text": { + "zh_CN": "对应列的类型。 如果设置了selection则显示多选框; 如果设置了 index 则显示该行的索引(从 1 开始计算); 如果设置了 expand 则显示为一个可展开的按钮" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "selection", + "value": "selection" + }, + { + "label": "index", + "value": "index" + }, + { + "label": "expand", + "value": "expand" + } + ] + } + } + }, + { + "property": "index", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "index" + } + }, + "description": { + "text": { + "zh_CN": "如果设置了 type=index,可以通过传递 index 属性来自定义索引" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "label", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "label" + } + }, + "description": { + "text": { + "zh_CN": "显示的标题" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "column-key", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "column-key" + } + }, + "description": { + "text": { + "zh_CN": "column 的 key, column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "prop", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "prop" + } + }, + "description": { + "text": { + "zh_CN": "字段名称 对应列内容的字段名, 也可以使用 property属性" + } + }, + "widget": { + "component": "InputConfigurator", + "props": {} + } + }, + { + "property": "width", + "type": "number", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "width" + } + }, + "description": { + "text": { + "zh_CN": "对应列的宽度" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "min-width", + "type": "number", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "min-width" + } + }, + "description": { + "text": { + "zh_CN": "对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列" + } + }, + "widget": { + "component": "NumberConfigurator", + "props": {} + } + }, + { + "property": "fixed", + "type": "string", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "fixed" + } + }, + "description": { + "text": { + "zh_CN": "列是否固定在左侧或者右侧。 true 表示固定在左侧" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "sortable", + "type": "boolean", + "labelPosition": "left", + "label": { + "text": { + "zh_CN": "sortable" + } + }, + "description": { + "text": { + "zh_CN": "对应列是否可以排序" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "sort-method", + "type": "function", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-method" + } + }, + "description": { + "text": { + "zh_CN": "指定数据按照哪个属性进行排序,仅当sortable设置为true的时候有效。 应该如同 Array.sort 那样返回一个 Number" } }, "widget": { @@ -2012,36 +6892,192 @@ } }, { - "property": "label", - "type": "string", + "property": "sort-by", + "type": "array", "labelPosition": "top", "label": { "text": { - "zh_CN": "label" + "zh_CN": "sort-by" } }, "description": { "text": { - "zh_CN": "显示的标题" + "zh_CN": "指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推" } }, "widget": { - "component": "InputConfigurator", + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "sort-orders", + "type": "array", + "labelPosition": "top", + "label": { + "text": { + "zh_CN": "sort-orders" + } + }, + "description": { + "text": { + "zh_CN": "数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "language": "json" + } + } + }, + { + "property": "resizable", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "resizable" + } + }, + "description": { + "text": { + "zh_CN": "对应列是否可以通过拖动改变宽度(需要在 el-table 上设置 border 属性为真)" + } + }, + "widget": { + "component": "CheckBoxConfigurator", "props": {} } }, { - "property": "column-key", + "property": "formatter", + "type": "function", + "labelPosition": "top", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "formatter" + } + }, + "description": { + "text": { + "zh_CN": "用来格式化内容" + } + }, + "widget": { + "component": "CodeConfigurator", + "props": { + "dataType": "JSFunction" + } + } + }, + { + "property": "show-overflow-tooltip", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "show-overflow-tooltip" + } + }, + "description": { + "text": { + "zh_CN": "当内容过长被隐藏时显示 tooltip" + } + }, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "align", "type": "string", "labelPosition": "top", + "defaultValue": "left", "label": { "text": { - "zh_CN": "column-key" + "zh_CN": "align" } }, "description": { "text": { - "zh_CN": "column 的 key, column 的 key, 如果需要使用 filter-change 事件,则需要此属性标识是哪个 column 的筛选条件" + "zh_CN": "对齐方式" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "center", + "value": "center" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "header-align", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "header-align" + } + }, + "description": { + "text": { + "zh_CN": "表头对齐方式, 若不设置该项,则使用表格的对齐方式" + } + }, + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "left", + "value": "left" + }, + { + "label": "center", + "value": "center" + }, + { + "label": "right", + "value": "right" + } + ] + } + } + }, + { + "property": "class-name", + "type": "string", + "labelPosition": "top", + "defaultValue": "left", + "label": { + "text": { + "zh_CN": "class-name" + } + }, + "description": { + "text": { + "zh_CN": "列的 className" } }, "widget": { @@ -2050,17 +7086,18 @@ } }, { - "property": "prop", + "property": "label-class-name", "type": "string", "labelPosition": "top", + "defaultValue": "left", "label": { "text": { - "zh_CN": "prop" + "zh_CN": "label-class-name" } }, "description": { "text": { - "zh_CN": "字段名称 对应列内容的字段名, 也可以使用 property属性" + "zh_CN": "当前列标题的自定义类名" } }, "widget": { @@ -2069,85 +7106,99 @@ } }, { - "property": "width", - "type": "number", + "property": "selectable", + "type": "function", "labelPosition": "top", + "defaultValue": true, "label": { "text": { - "zh_CN": "width" + "zh_CN": "selectable" } }, "description": { "text": { - "zh_CN": "对应列的宽度" + "zh_CN": "仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选" } }, "widget": { - "component": "NumberConfigurator", + "component": "CodeConfigurator", + "props": {} + } + }, + { + "property": "reserve-selection", + "type": "boolean", + "labelPosition": "left", + "defaultValue": true, + "label": { + "text": { + "zh_CN": "reserve-selection" + } + }, + "description": { + "text": { + "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" + } + }, + "widget": { + "component": "CheckBoxConfigurator", "props": {} } }, { - "property": "min-width", - "type": "number", + "property": "filters", + "type": "array", "labelPosition": "top", + "defaultValue": true, "label": { "text": { - "zh_CN": "min-width" + "zh_CN": "filters" } }, "description": { "text": { - "zh_CN": "对应列的最小宽度, 对应列的最小宽度, 与 width 的区别是 width 是固定的,min-width 会把剩余宽度按比例分配给设置了 min-width 的列" + "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" } }, "widget": { - "component": "NumberConfigurator", - "props": {} + "component": "CodeConfigurator", + "props": { + "language": "json" + } } }, { - "property": "fixed", + "property": "filter-placement", "type": "string", "labelPosition": "top", "label": { "text": { - "zh_CN": "fixed" + "zh_CN": "filter-placement" } }, "description": { "text": { - "zh_CN": "列是否固定在左侧或者右侧。 true 表示固定在左侧" + "zh_CN": "过滤弹出框的定位" } }, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "right", - "value": "right" - } - ] - } + "component": "InputConfigurator", + "props": {} } }, { - "property": "sortable", - "type": "boolean", + "property": "filter-multiple", + "type": "string", "labelPosition": "left", + "defaultValue": true, "label": { "text": { - "zh_CN": "sortable" + "zh_CN": "filter-multiple" } }, "description": { "text": { - "zh_CN": "对应列是否可以排序" + "zh_CN": "数据过滤的选项是否多选" } }, "widget": { @@ -2156,17 +7207,18 @@ } }, { - "property": "sort-method", + "property": "filter-method", "type": "function", "labelPosition": "top", + "defaultValue": true, "label": { "text": { - "zh_CN": "sort-method" + "zh_CN": "filter-method" } }, "description": { "text": { - "zh_CN": "指定数据按照哪个属性进行排序,仅当sortable设置为true的时候有效。 应该如同 Array.sort 那样返回一个 Number" + "zh_CN": "数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示" } }, "widget": { @@ -2175,17 +7227,18 @@ } }, { - "property": "sort-by", + "property": "filtered-value", "type": "array", "labelPosition": "top", + "defaultValue": true, "label": { "text": { - "zh_CN": "sort-by" + "zh_CN": "filtered-value" } }, "description": { "text": { - "zh_CN": "指定数据按照哪个属性进行排序,仅当 sortable 设置为 true 且没有设置 sort-method 的时候有效。 如果 sort-by 为数组,则先按照第 1 个属性排序,如果第 1 个相等,再按照第 2 个排序,以此类推" + "zh_CN": "选中的数据过滤项,如果需要自定义表头过滤的渲染方式,可能会需要此属性" } }, "widget": { @@ -2194,937 +7247,2779 @@ "language": "json" } } + } + ] + } + ], + "widget": { + "component": "TableColumnsConfigurator", + "props": { + "type": "object", + "textField": "label", + "language": "json", + "buttonText": "编辑列配置", + "title": "编辑列配置", + "expand": true + } + }, + "description": { + "zh_CN": "表格列的配置信息" + }, + "labelPosition": "top" + }, + { + "property": "max-height", + "label": { + "text": { + "zh_CN": "最大高度" + } + }, + "description": { + "zh_CN": "Table 的最大高度。" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "number", + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "height", + "label": { + "text": { + "zh_CN": "表格高度" + } + }, + "description": { + "zh_CN": "Table 的高度, 默认为自动高度。 这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "stripe", + "label": { + "text": { + "zh_CN": "斑马纹" + } + }, + "description": { + "zh_CN": "是否为斑马纹 table" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "border", + "label": { + "text": { + "zh_CN": "纵向边框" + } + }, + "description": { + "zh_CN": "是否带有纵向边框" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "表格尺寸" + } + }, + "description": { + "zh_CN": "Table 的尺寸" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "type": "string", + "defaultValue": "default", + "widget": { + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "large", + "value": "large" + }, + { + "label": "default", + "value": "default" }, { - "property": "sort-orders", - "type": "array", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "sort-orders" - } - }, - "description": { - "text": { - "zh_CN": "数据在排序时所使用排序策略的轮转顺序,仅当 sortable 为 true 时有效。 需传入一个数组,随着用户点击表头,该列依次按照数组中元素的顺序进行排序" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } + "label": "small", + "value": "small" + } + ] + } + } + }, + { + "property": "fit", + "label": { + "text": { + "zh_CN": "列宽自撑开" + } + }, + "description": { + "zh_CN": "列的宽度是否自撑开" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "show-header", + "label": { + "text": { + "zh_CN": "显示表头" + } + }, + "description": { + "zh_CN": "是否显示表头" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": true, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "highlight-current-row", + "label": { + "text": { + "zh_CN": "高亮当前行" + } + }, + "description": { + "zh_CN": "是否要高亮当前行" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "current-row-key", + "label": { + "text": { + "zh_CN": "当前行的 key" + } + }, + "description": { + "zh_CN": "当前行的 key,只写属性" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "type": "string", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "row-class-name", + "label": { + "text": { + "zh_CN": "行的类名" + } + }, + "description": { + "zh_CN": "行的 className" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "row-key", + "label": { + "text": { + "zh_CN": "行数据的 Key" + } + }, + "description": { + "zh_CN": "行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "widget": { + "component": "CodeConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "empty-text", + "label": { + "text": { + "zh_CN": "空数据文本" + } + }, + "description": { + "zh_CN": "空数据时显示的文本内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "device": [] + }, + { + "property": "table-layout", + "label": { + "text": { + "zh_CN": "表格布局方式" + } + }, + "description": { + "zh_CN": "设置表格单元、行和列的布局方式" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "top", + "defaultValue": "fixed", + "widget": { + "component": "InputConfigurator", + "props": { + "options": [ + { + "label": "fixed", + "value": "fixed" }, { - "property": "resizable", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "resizable" - } - }, - "description": { - "text": { - "zh_CN": "对应列是否可以通过拖动改变宽度(需要在 el-table 上设置 border 属性为真)" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "auto", + "value": "auto" + } + ] + } + }, + "device": [] + }, + { + "property": "scrollbar-always-on", + "label": { + "text": { + "zh_CN": "显示滚动条" + } + }, + "description": { + "zh_CN": "总是显示滚动条" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + }, + { + "property": "flexible", + "label": { + "text": { + "zh_CN": "主轴最小尺寸" + } + }, + "description": { + "zh_CN": "确保主轴的最小尺寸,以便不超过内容" + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "labelPosition": "left", + "defaultValue": false, + "type": "boolean", + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + } + } + ], + "description": { + "zh_CN": "" + } + } + ], + "events": { + "onSelect": { + "label": { + "zh_CN": "勾选数据行的 Checkbox 时触发" + }, + "description": { + "zh_CN": "当用户手动勾选数据行的 Checkbox 时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + }, + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + } + ], + "returns": {} + } + }, + "onSelectAll": { + "label": { + "zh_CN": "勾选全选时触发" + }, + "description": { + "zh_CN": "当用户手动勾选全选 Checkbox 时触发的事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + } + ], + "returns": {} + } + }, + "onSelectionChange": { + "label": { + "zh_CN": "选择项发生变化时会触发" + }, + "description": { + "zh_CN": "当选择项发生变化时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "selection", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前选中项" + } + } + ], + "returns": {} + } + }, + "onCellMouseEnter": { + "label": { + "zh_CN": "单元格 hover 时会触发" + }, + "description": { + "zh_CN": "当单元格 hover 进入时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + }, + { + "name": "column", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前列" + } + }, + { + "name": "cell", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前单元格" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生事件 event" + } + } + ], + "returns": {} + } + }, + "onCellMouseLeave": { + "label": { + "zh_CN": "单元格 hover 退出时会触发" + }, + "description": { + "zh_CN": "当单元格 hover 退出时会触发该事件" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "row", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前行" + } + }, + { + "name": "column", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前列" + } + }, + { + "name": "cell", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "当前单元格" + } + }, + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生事件 event" + } + } + ], + "returns": {} + } + } + }, + "slots": { + "empty": { + "label": { + "zh_CN": "empty" + }, + "description": { + "zh_CN": "当数据为空时自定义的内容" + } + }, + "append": { + "label": { + "zh_CN": "append" + }, + "description": { + "zh_CN": "插入至表格最后一行之后的内容, 如果需要对表格的内容进行无限滚动操作,可能需要用到这个 slot。 若表格有合计行,该 slot 会位于合计行之上。" + } + } + } + } + }, + { + "id": 1, + "version": "2.4.2", + "name": { + "zh_CN": "表单" + }, + "component": "ElTableColumn", + "icon": "table", + "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", + "doc_url": "", + "screenshot": "", + "tags": "", + "keywords": "", + "dev_mode": "proCode", + "npm": { + "package": "element-plus", + "exportName": "ElTableColumn", + "destructuring": true + }, + "group": "表单组件", + "category": "element-plus", + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "isPopper": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["inline", "label-width"] + }, + "contextMenu": { + "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], + "disable": [] + }, + "invalidity": [""], + "clickCapture": true, + "framework": "Vue" + }, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [], + "description": { + "zh_CN": "" + } + } + ], + "events": {}, + "slots": {} + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "进度条" + }, + "component": "TinyProgress", + "icon": "progress", + "description": "进度条", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyProgress", + "destructuring": true + }, + "group": "component", + "category": "进度条", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "百分比" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "percentage", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "百分比(必填);该属性的可选值为 0-100" + }, + "defaultValue": 0, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "line", + "value": "line" }, { - "property": "formatter", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "formatter" - } - }, - "description": { - "text": { - "zh_CN": "用来格式化内容" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "dataType": "JSFunction" - } - } + "label": "circle", + "value": "circle" }, { - "property": "show-overflow-tooltip", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "show-overflow-tooltip" - } - }, - "description": { - "text": { - "zh_CN": "当内容过长被隐藏时显示 tooltip" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "dashboard", + "value": "dashboard" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "进度条类型" + }, + "defaultValue": "line", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "状态" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "success", + "value": "success" }, { - "property": "align", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "align" - } - }, - "description": { - "text": { - "zh_CN": "对齐方式" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "center", - "value": "center" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "label": "exception", + "value": "exception" }, { - "property": "header-align", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "header-align" - } - }, - "description": { - "text": { - "zh_CN": "表头对齐方式, 若不设置该项,则使用表格的对齐方式" - } - }, - "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "left", - "value": "left" - }, - { - "label": "center", - "value": "center" - }, - { - "label": "right", - "value": "right" - } - ] - } - } + "label": "warning", + "value": "warning" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "status", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "进度条当前状态" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "颜色" + } + }, + "widget": { + "props": {}, + "component": "ColorConfigurator" + }, + "disabled": false, + "property": "color", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "进度条背景色(会覆盖 status 状态颜色)" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "线条宽度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "stroke-width", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "line 类型进度条的宽度,单位 px" + }, + "defaultValue": 6, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "宽度" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "width", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "环形进度条画布宽度(只在 type 为 circle 或 dashboard 时可用)" + }, + "defaultValue": 126, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示文字" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-text", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示进度条文字内容" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "文字内置" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "text-inside", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "进度条显示文字内置在进度条内(只在 type=line 时可用)" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "function", + "label": { + "text": { + "zh_CN": "格式" + } + }, + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "format", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义进度条的文字" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "状态图标" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "successIcon", + "value": "successIcon" }, { - "property": "class-name", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "class-name" - } - }, - "description": { - "text": { - "zh_CN": "列的 className" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } + "label": "exceptionIcon", + "value": "exceptionIcon" }, { - "property": "label-class-name", - "type": "string", - "labelPosition": "top", - "defaultValue": "left", - "label": { - "text": { - "zh_CN": "label-class-name" - } - }, - "description": { - "text": { - "zh_CN": "当前列标题的自定义类名" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } - }, + "label": "warningIcon", + "value": "warningIcon" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "statusIcon", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "状态插槽,successIcon / exceptionIcon / warningIcon" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": {} + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "骨架屏" + }, + "component": "TinySkeleton", + "icon": "skeleton", + "description": "骨架屏", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinySkeleton", + "destructuring": true + }, + "group": "component", + "category": "骨架屏", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示头像" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "avatar", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示头像" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "行数" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "rows", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "默认样式,可配置段落显示行数" + }, + "defaultValue": 3, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "形态" + } + }, + "widget": { + "props": { + "options": [ { - "property": "selectable", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "selectable" - } - }, - "description": { - "text": { - "zh_CN": "仅对 type=selection 的列有效,类型为 Function,Function 的返回值用来决定这一行的 CheckBox 是否可以勾选" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } + "label": "image", + "value": "image" }, { - "property": "reserve-selection", - "type": "boolean", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "reserve-selection" - } - }, - "description": { - "text": { - "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "circle", + "value": "circle" }, { - "property": "filters", - "type": "array", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filters" - } - }, - "description": { - "text": { - "zh_CN": "数据刷新后是否保留选项,仅对 type=selection 的列有效, 请注意, 需指定 row-key 来让这个功能生效。" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } + "label": "square", + "value": "square" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "variant", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "骨架屏形态" + }, + "defaultValue": "square", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "尺寸" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "large", + "value": "large" }, { - "property": "filter-placement", - "type": "string", - "labelPosition": "top", - "label": { - "text": { - "zh_CN": "filter-placement" - } - }, - "description": { - "text": { - "zh_CN": "过滤弹出框的定位" - } - }, - "widget": { - "component": "InputConfigurator", - "props": {} - } + "label": "medium", + "value": "medium" }, { - "property": "filter-multiple", - "type": "string", - "labelPosition": "left", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filter-multiple" - } - }, - "description": { - "text": { - "zh_CN": "数据过滤的选项是否多选" - } - }, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "label": "small", + "value": "small" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "size", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "针对 image 和 circle 形态,内置三种大小" + }, + "defaultValue": "medium", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "开启动画" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "animated", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否开启动画" + }, + "defaultValue": true, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示骨架屏" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "loading", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示骨架屏,传 false 时会展示加载完成后的内容" + }, + "defaultValue": true, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "行宽度" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "rows-width", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "自定义段落每一行的宽度,数组中的每一项可以为 number 或 string ,当为 number 时,组件会自动增加 px 单位" + }, + "defaultValue": [], + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": { + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "加载完成后显示的内容" + } + }, + "placeholder": { + "label": { + "zh_CN": "占位符" + }, + "description": { + "zh_CN": "自定义骨架屏结构" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "卡片" + }, + "component": "TinyCard", + "icon": "card", + "description": "卡片", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyCard", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "源地址" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "src", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "图片或者视频的地址" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "标题" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "title", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片的标题" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "类型" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "text", + "value": "text" }, { - "property": "filter-method", - "type": "function", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filter-method" - } - }, - "description": { - "text": { - "zh_CN": "数据过滤使用的方法, 如果是多选的筛选项,对每一条数据会执行多次,任意一次返回 true 就会显示" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": {} - } + "label": "image", + "value": "image" }, { - "property": "filtered-value", - "type": "array", - "labelPosition": "top", - "defaultValue": true, - "label": { - "text": { - "zh_CN": "filtered-value" - } - }, - "description": { - "text": { - "zh_CN": "选中的数据过滤项,如果需要自定义表头过滤的渲染方式,可能会需要此属性" - } - }, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" - } - } + "label": "video", + "value": "video" + }, + { + "label": "logo", + "value": "logo" + } + ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "设置卡片类型" + }, + "defaultValue": "text", + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "自动宽度" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "auto-width", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片的宽度是否自动撑开,设置后将不再给卡片设置固定宽度" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "自定义类名" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "custom-class", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片的class" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "高度" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "height", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "卡片内容区域的高度" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + } + ], + "events": {}, + "slots": { + "title": { + "label": { + "zh_CN": "标题" + }, + "description": { + "zh_CN": "标题插槽" + } + }, + "footer": { + "label": { + "zh_CN": "底部" + }, + "description": { + "zh_CN": "组件底部插槽" + } + }, + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "组件默认插槽" + } + }, + "title-left": { + "label": { + "zh_CN": "标题左侧" + }, + "description": { + "zh_CN": "标题左侧插槽" + } + }, + "title-right": { + "label": { + "zh_CN": "标题右侧" + }, + "description": { + "zh_CN": "标题右侧插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "日历" + }, + "component": "TinyCalendar", + "icon": "calendar", + "description": "日历", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyCalendar", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "enum", + "label": { + "text": { + "zh_CN": "显示模式" + } + }, + "widget": { + "props": { + "options": [ + { + "label": "month", + "value": "month" + }, + { + "label": "year", + "value": "year" } ] + }, + "component": "SelectConfigurator" + }, + "disabled": false, + "property": "mode", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "日历显示模式" + }, + "defaultValue": "month", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "月份" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "month", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定月份,默认当前月份" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "年份" + } + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "year", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定年份,默认当前年份" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "显示选中日期" } - ], + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "show-selected", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否显示选中的日期" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ + { + "cols": 12, + "type": "array", + "label": { + "text": { + "zh_CN": "事件列表" + } + }, "widget": { - "component": "TableColumnsConfigurator", "props": { - "type": "object", - "textField": "label", - "language": "json", - "buttonText": "编辑列配置", - "title": "编辑列配置", - "expand": true + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "events", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "事件列表" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": { + "day": { + "label": { + "zh_CN": "日期单元格" + }, + "description": { + "zh_CN": "日期单元格插槽" + } + }, + "tool": { + "label": { + "zh_CN": "日历工具栏" + }, + "description": { + "zh_CN": "日历工具栏插槽" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "标记" + }, + "component": "TinyBadge", + "icon": "badge", + "description": "标记", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyBadge", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "数据条目数" } }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "value", + "readOnly": false, + "required": true, "description": { - "zh_CN": "表格列的配置信息" + "zh_CN": "相关数据条目数" }, - "labelPosition": "top" + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "标记类型" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "标记的类型" + }, + "defaultValue": "danger", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "文本内容" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "data", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "文本内容" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "行为属性" + }, + "content": [ + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "是否隐藏" + } + }, + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" + }, + "disabled": false, + "property": "hidden", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否隐藏标记" + }, + "defaultValue": false, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "boolean", + "label": { + "text": { + "zh_CN": "是否小圆点" + } + }, + "widget": { + "props": {}, + "component": "SwitchConfigurator" + }, + "disabled": false, + "property": "is-dot", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否以小圆点的形式来显示标记" + }, + "defaultValue": false, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "样式属性" + }, + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "自定义标记类名" + } + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "badge-class", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "自定义标记的类名" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "max-height", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "最大高度" + "zh_CN": "偏移量" } }, - "description": { - "zh_CN": "Table 的最大高度。" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "number", - "widget": { - "component": "NumberConfigurator", - "props": {} + "property": "offset", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置标记位置的偏移量" }, - "device": [] - }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "3", + "label": { + "zh_CN": "高级属性" + }, + "content": [ { - "property": "height", + "cols": 12, + "type": "number", "label": { "text": { - "zh_CN": "表格高度" + "zh_CN": "最大值" } }, - "description": { - "zh_CN": "Table 的高度, 默认为自动高度。 这个高度会设置为 Table 的 style.height 的值,Table 的高度会受控于外部样式。" + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "max", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定徽章显示的最大值,如果实际获取的徽章值超过该最大值,则以最大值后接一个 '+' 的形式显示徽章数,要求 value 是 number 类型" }, - "device": [] + "defaultValue": null, + "labelPosition": "left" }, { - "property": "stripe", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "斑马纹" + "zh_CN": "跳转地址" } }, - "description": { - "zh_CN": "是否为斑马纹 table" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "property": "href", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "指定跳转的目标页面地址" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "border", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "纵向边框" + "zh_CN": "跳转方式" } }, - "description": { - "zh_CN": "是否带有纵向边框" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, + "property": "target", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "点击标记时链接到目标页面的跳转方式,仅在 href 属性存在时使用" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" + } + } + ], + "events": {}, + "slots": { + "content": { + "label": { + "zh_CN": "内容" + }, + "description": { + "zh_CN": "消息提示内容" + } + }, + "default": { + "label": { + "zh_CN": "默认内容" + }, + "description": { + "zh_CN": "默认插槽,有data属性时,默认插槽不生效" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "标签" + }, + "component": "TinyTag", + "icon": "tag", + "description": "标签", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyTag", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" + }, + "content": [ { - "property": "size", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "表格尺寸" + "zh_CN": "显示类型" } }, - "description": { - "zh_CN": "Table 的尺寸" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "type": "string", - "defaultValue": "default", "widget": { - "component": "SelectConfigurator", "props": { - "options": [ - { - "label": "large", - "value": "large" - }, - { - "label": "default", - "value": "default" - }, - { - "label": "small", - "value": "small" - } - ] - } - } + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "type", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "显示类型" + }, + "defaultValue": null, + "labelPosition": "left" }, { - "property": "fit", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "列宽自撑开" + "zh_CN": "标签内容" } }, - "description": { - "zh_CN": "列的宽度是否自撑开" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, + "property": "value", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "配置式标签,自定义标签内容" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" + } + }, + { + "name": "1", + "label": { + "zh_CN": "样式属性" + }, + "content": [ { - "property": "show-header", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "显示表头" + "zh_CN": "颜色" } }, - "description": { - "zh_CN": "是否显示表头" - }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": true, - "type": "boolean", "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } - }, - { - "property": "highlight-current-row", - "label": { - "text": { - "zh_CN": "高亮当前行" - } + "props": {}, + "component": "ColorConfigurator" }, + "disabled": false, + "property": "color", + "readOnly": false, + "required": true, "description": { - "zh_CN": "是否要高亮当前行" + "zh_CN": "控制标签文本色和背景色,可使用 IColor 类型中的预设值,也可自定义值" }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "labelPosition": "left", - "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "defaultValue": null, + "labelPosition": "left" }, { - "property": "current-row-key", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "当前行的 key" + "zh_CN": "主题" } }, - "description": { - "zh_CN": "当前行的 key,只写属性" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "top", - "type": "string", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "effect", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "主题" }, - "device": [] + "defaultValue": "light", + "labelPosition": "left" }, { - "property": "row-class-name", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "行的类名" + "zh_CN": "最大宽度" } }, - "description": { - "zh_CN": "行的 className" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "max-width", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置最大宽度" }, - "device": [] + "defaultValue": null, + "labelPosition": "left" }, { - "property": "row-key", + "cols": 12, + "type": "string", "label": { "text": { - "zh_CN": "行数据的 Key" + "zh_CN": "尺寸" } }, - "description": { - "zh_CN": "行数据的 Key,用来优化 Table 的渲染; 在使用reserve-selection功能与显示树形数据时,该属性是必填的。 类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "top", - "widget": { - "component": "CodeConfigurator", - "props": {} + "property": "size", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "尺寸" }, - "device": [] - }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "行为属性" + }, + "content": [ { - "property": "empty-text", + "cols": 12, + "type": "function", "label": { "text": { - "zh_CN": "空数据文本" + "zh_CN": "删除前回调" } }, - "description": { - "zh_CN": "空数据时显示的文本内容" + "widget": { + "props": { + "height": 150, + "language": "javascript" + }, + "component": "CodeConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", - "widget": { - "component": "InputConfigurator", - "props": {} + "property": "before-delete", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "删除前回调函数" }, - "device": [] + "defaultValue": null, + "labelPosition": "left" }, { - "property": "table-layout", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "表格布局方式" + "zh_CN": "可关闭" } }, - "description": { - "zh_CN": "设置表格单元、行和列的布局方式" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "top", - "defaultValue": "fixed", - "widget": { - "component": "InputConfigurator", - "props": { - "options": [ - { - "label": "fixed", - "value": "fixed" - }, - { - "label": "auto", - "value": "auto" - } - ] - } + "property": "closable", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否可关闭" }, - "device": [] + "defaultValue": false, + "labelPosition": "left" }, { - "property": "scrollbar-always-on", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "显示滚动条" + "zh_CN": "禁用" } }, - "description": { - "zh_CN": "总是显示滚动条" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", + "property": "disabled", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否禁用" + }, "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" }, { - "property": "flexible", + "cols": 12, + "type": "boolean", "label": { "text": { - "zh_CN": "主轴最小尺寸" + "zh_CN": "纯图标模式" } }, - "description": { - "zh_CN": "确保主轴的最小尺寸,以便不超过内容" + "widget": { + "props": {}, + "component": "CheckBoxConfigurator" }, - "required": true, - "readOnly": false, "disabled": false, - "cols": 12, - "labelPosition": "left", + "property": "only-icon", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "是否为纯图标的模式" + }, "defaultValue": false, - "type": "boolean", - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - } + "labelPosition": "left" } ], "description": { - "zh_CN": "" + "zh_CN": "组件交互、事件、状态相关的配置,包括 disabled、loading、onClick 等与用户操作和状态相关的属性" } } ], "events": { - "onSelect": { - "label": { - "zh_CN": "勾选数据行的 Checkbox 时触发" - }, - "description": { - "zh_CN": "当用户手动勾选数据行的 Checkbox 时触发的事件" - }, + "onClick": { "type": "event", - "functionInfo": { - "params": [ - { - "name": "selection", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前选中项" - } - }, - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" - } - } - ], - "returns": {} - } - }, - "onSelectAll": { "label": { - "zh_CN": "勾选全选时触发" + "zh_CN": "点击标签时触发" }, "description": { - "zh_CN": "当用户手动勾选全选 Checkbox 时触发的事件" + "zh_CN": "点击标签时触发的事件" }, - "type": "event", + "defaultValue": "", "functionInfo": { "params": [ { - "name": "selection", - "type": "Object", - "defaultValue": "", + "name": "event", + "type": "Event", "description": { - "zh_CN": "当前选中项" - } + "zh_CN": "事件对象" + }, + "defaultValue": "" } ], - "returns": {} + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } }, - "onSelectionChange": { + "onClose": { + "type": "event", "label": { - "zh_CN": "选择项发生变化时会触发" + "zh_CN": "点击关闭按钮时触发" }, "description": { - "zh_CN": "当选择项发生变化时会触发该事件" + "zh_CN": "点击关闭按钮时触发的事件" }, - "type": "event", + "defaultValue": "", "functionInfo": { "params": [ { - "name": "selection", - "type": "Object", - "defaultValue": "", + "name": "event", + "type": "Event", "description": { - "zh_CN": "当前选中项" - } + "zh_CN": "事件对象" + }, + "defaultValue": "" } ], - "returns": {} + "returns": { + "type": "", + "description": { + "zh_CN": "" + }, + "defaultValue": "" + } } - }, - "onCellMouseEnter": { + } + }, + "slots": { + "default": { "label": { - "zh_CN": "单元格 hover 时会触发" + "zh_CN": "默认内容" }, "description": { - "zh_CN": "当单元格 hover 进入时会触发该事件" + "zh_CN": "标签内容" + } + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": [] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.22.0", + "name": { + "zh_CN": "统计数值" + }, + "component": "TinyStatistic", + "icon": "statistic", + "description": "统计数值", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "TinyStatistic", + "destructuring": true + }, + "group": "component", + "category": "组件", + "priority": 2, + "schema": { + "properties": [ + { + "name": "0", + "label": { + "zh_CN": "基础属性" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "值" } }, - { - "name": "column", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前列" - } + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - { - "name": "cell", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前单元格" - } + "disabled": false, + "property": "value", + "readOnly": false, + "required": false, + "description": { + "zh_CN": "数字显示内容" }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生事件 event" + "defaultValue": "0", + "labelPosition": "left" + }, + { + "cols": 12, + "type": "number", + "label": { + "text": { + "zh_CN": "精度" } - } - ], - "returns": {} + }, + "widget": { + "props": { + "step": 1 + }, + "component": "NumberConfigurator" + }, + "disabled": false, + "property": "precision", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "精度值" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件核心功能相关的配置,包括 name、size、type 等核心属性" } }, - "onCellMouseLeave": { + { + "name": "1", "label": { - "zh_CN": "单元格 hover 退出时会触发" + "zh_CN": "样式属性" }, + "content": [ + { + "cols": 12, + "type": "object", + "label": { + "text": { + "zh_CN": "值样式" + } + }, + "widget": { + "props": { + "height": 150, + "language": "json" + }, + "component": "CodeConfigurator" + }, + "disabled": false, + "property": "value-style", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字样式" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], "description": { - "zh_CN": "当单元格 hover 退出时会触发该事件" + "zh_CN": "组件外观、颜色、尺寸相关的配置,包括 width、height、backgroundColor、color 等与视觉呈现相关的属性" + } + }, + { + "name": "2", + "label": { + "zh_CN": "高级属性" }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "row", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前行" + "content": [ + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "前缀" } }, - { - "name": "column", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前列" - } + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" }, - { - "name": "cell", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "当前单元格" + "disabled": false, + "property": "prefix", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字内容前缀" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "后缀" } }, - { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生事件 event" + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "suffix", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字内容后缀" + }, + "defaultValue": null, + "labelPosition": "left" + }, + { + "cols": 12, + "type": "string", + "label": { + "text": { + "zh_CN": "标题" } - } - ], - "returns": {} + }, + "widget": { + "props": { + "placeholder": "请输入..." + }, + "component": "InputConfigurator" + }, + "disabled": false, + "property": "title", + "readOnly": false, + "required": true, + "description": { + "zh_CN": "设置数字内容标题" + }, + "defaultValue": null, + "labelPosition": "left" + } + ], + "description": { + "zh_CN": "组件可选的专业配置项,包括复杂对象配置、高级功能选项等不常用的特殊配置" } } - }, + ], + "events": {}, "slots": { - "empty": { + "title": { "label": { - "zh_CN": "empty" + "zh_CN": "标题" }, "description": { - "zh_CN": "当数据为空时自定义的内容" + "zh_CN": "数字内容标题插槽" } }, - "append": { + "prefix": { "label": { - "zh_CN": "append" + "zh_CN": "前缀" }, "description": { - "zh_CN": "插入至表格最后一行之后的内容, 如果需要对表格的内容进行无限滚动操作,可能需要用到这个 slot。 若表格有合计行,该 slot 会位于合计行之上。" + "zh_CN": "数字内容前置插槽" + } + }, + "suffix": { + "label": { + "zh_CN": "后缀" + }, + "description": { + "zh_CN": "数字内容后置插槽" } } } - } - }, - { - "id": 1, - "version": "2.4.2", - "name": { - "zh_CN": "表单" - }, - "component": "ElTableColumn", - "icon": "table", - "description": "用于展示多条结构类似的数据, 可对数据进行排序、筛选、对比或其他自定义操作", - "doc_url": "", - "screenshot": "", - "tags": "", - "keywords": "", - "dev_mode": "proCode", - "npm": { - "package": "element-plus", - "exportName": "ElTableColumn", - "destructuring": true }, - "group": "表单组件", - "category": "element-plus", "configure": { "loop": true, "condition": true, "styles": true, "isContainer": false, "isModal": false, - "isPopper": false, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -3135,31 +10030,12 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["inline", "label-width"] + "properties": [] }, "contextMenu": { - "actions": ["copy", "remove", "insert", "updateAttr", "bindEvent", "createBlock"], - "disable": [] - }, - "invalidity": [""], - "clickCapture": true, - "framework": "Vue" - }, - "schema": { - "properties": [ - { - "name": "0", - "label": { - "zh_CN": "基础属性" - }, - "content": [], - "description": { - "zh_CN": "" - } - } - ], - "events": {}, - "slots": {} + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } } }, { @@ -4433,18 +11309,19 @@ "bindState": true, "label": { "text": { - "zh_CN": "资源" + "zh_CN": "资源选择" } }, "cols": 12, "rules": [], "widget": { - "component": "InputConfigurator", + "component": "SourceSelectConfigurator", "props": {} }, "description": { "zh_CN": "src路径" - } + }, + "labelPosition": "top" }, { "property": "attributes3", @@ -9754,6 +16631,7 @@ } }, { + "version": "3.20.0", "icon": "grid", "name": { "zh_CN": "表格" @@ -12231,15 +19109,194 @@ "props": {} }, "description": { - "zh_CN": "为 popper 添加类名" + "zh_CN": "为 popper 添加类名" + }, + "labelPosition": "left" + }, + { + "property": "visible-arrow", + "label": { + "text": { + "zh_CN": "显示箭头" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否显示 Tooltip 箭头" + }, + "labelPosition": "left" + }, + { + "property": "append-to-body", + "label": { + "text": { + "zh_CN": "添加到body上" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "Popover弹窗是否添加到body上" + }, + "labelPosition": "left" + }, + { + "property": "arrow-offset", + "label": { + "text": { + "zh_CN": "箭头的位置偏移" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "箭头的位置偏移,该属性的默认值为 0" + } + }, + { + "property": "close-delay", + "label": { + "text": { + "zh_CN": "延迟隐藏" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" + }, + "labelPosition": "left" + }, + { + "property": "content", + "label": { + "text": { + "zh_CN": "显示的内容" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "InputConfigurator", + "props": {} + }, + "description": { + "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "Popover 是否可用" + }, + "labelPosition": "left" + }, + { + "property": "offset", + "label": { + "text": { + "zh_CN": "位置偏移量" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "出现位置的偏移量" + }, + "labelPosition": "left" + }, + { + "property": "open-delay", + "label": { + "text": { + "zh_CN": "显示延迟" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "NumberConfigurator", + "props": {} + }, + "description": { + "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" + }, + "labelPosition": "left" + }, + { + "property": "popper-options", + "label": { + "text": { + "zh_CN": "弹出层参数" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CodeConfigurator", + "props": {} + }, + "description": { + "zh_CN": "popper.js 的参数" }, - "labelPosition": "left" + "labelPosition": "top" }, { - "property": "visible-arrow", + "property": "title", "label": { "text": { - "zh_CN": "显示箭头" + "zh_CN": "标题" } }, "required": true, @@ -12247,19 +19304,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "是否显示 Tooltip 箭头" + "zh_CN": "提示内容标题" }, "labelPosition": "left" }, { - "property": "append-to-body", + "property": "transform-origin", "label": { "text": { - "zh_CN": "添加到body上" + "zh_CN": "旋转中心点" } }, "required": true, @@ -12271,15 +19328,15 @@ "props": {} }, "description": { - "zh_CN": "Popover弹窗是否添加到body上" + "zh_CN": "组件的旋转中心点,组件的旋转中心点" }, "labelPosition": "left" }, { - "property": "arrow-offset", + "property": "transition", "label": { "text": { - "zh_CN": "箭头的位置偏移" + "zh_CN": "渐变动画" } }, "required": true, @@ -12287,18 +19344,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "InputConfigurator", "props": {} }, "description": { - "zh_CN": "箭头的位置偏移,该属性的默认值为 0" - } + "zh_CN": "该属性的默认值为 fade-in-linear" + }, + "labelPosition": "left" }, { - "property": "close-delay", + "property": "width", "label": { "text": { - "zh_CN": "延迟隐藏" + "zh_CN": "宽度" } }, "required": true, @@ -12310,15 +19368,99 @@ "props": {} }, "description": { - "zh_CN": "触发方式为 hover 时的隐藏延迟,单位为毫秒" + "zh_CN": "宽度" }, "labelPosition": "left" - }, + } + ] + } + ], + "events": { + "onUpdate:modelValue": { + "label": { + "zh_CN": "双向绑定的值改变时触发" + }, + "description": { + "zh_CN": "手动控制是否可见的状态值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "boolean", + "defaultValue": "", + "description": { + "zh_CN": "双向绑定的可见状态值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": true, + "isModal": false, + "isPopper": true, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["visible", "width"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + }, + { + "version": "3.20.0", + "name": { + "zh_CN": "日期选择" + }, + "component": "TinyDatePicker", + "icon": "datepick", + "description": "用于输入或选择日期", + "docUrl": "", + "screenshot": "", + "tags": "", + "keywords": "", + "devMode": "proCode", + "npm": { + "package": "@opentiny/vue", + "exportName": "DatePicker", + "destructuring": true + }, + "group": "component", + "priority": 1, + "schema": { + "properties": [ + { + "label": { + "zh_CN": "基础信息" + }, + "description": { + "zh_CN": "基础信息" + }, + "content": [ { - "property": "content", + "property": "modelValue", "label": { "text": { - "zh_CN": "显示的内容" + "zh_CN": "绑定值" } }, "required": true, @@ -12326,39 +19468,58 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "显示的内容,也可以通过 slot 传入 DOM" + "zh_CN": "双向绑定值" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "type", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "类型" } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "日期", + "value": "date" + }, + { + "label": "日期时间", + "value": "datetime" + }, + { + "label": "周", + "value": "week" + }, + { + "label": "月份", + "value": "month" + }, + { + "label": "年份", + "value": "year" + } + ] + } }, "description": { - "zh_CN": "Popover 是否可用" + "zh_CN": "设置日期框的type属性" }, "labelPosition": "left" }, { - "property": "offset", + "property": "placeholder", "label": { "text": { - "zh_CN": "位置偏移量" + "zh_CN": "占位文本" } }, "required": true, @@ -12366,19 +19527,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "I18nConfigurator", "props": {} }, "description": { - "zh_CN": "出现位置的偏移量" + "zh_CN": "输入框占位文本" }, "labelPosition": "left" }, { - "property": "open-delay", + "property": "clearable", "label": { "text": { - "zh_CN": "显示延迟" + "zh_CN": "清除按钮" } }, "required": true, @@ -12386,39 +19547,39 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "触发方式为 hover 时的显示延迟,单位为毫秒" + "zh_CN": "是否显示清除按钮" }, "labelPosition": "left" }, { - "property": "popper-options", + "property": "disabled", "label": { "text": { - "zh_CN": "弹出层参数" + "zh_CN": "禁用" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CodeConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "popper.js 的参数" + "zh_CN": "是否禁用" }, - "labelPosition": "top" + "labelPosition": "left" }, { - "property": "title", + "property": "readonly", "label": { "text": { - "zh_CN": "标题" + "zh_CN": "只读" } }, "required": true, @@ -12426,19 +19587,19 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "提示内容标题" + "zh_CN": "是否只读" }, "labelPosition": "left" }, { - "property": "transform-origin", + "property": "size", "label": { "text": { - "zh_CN": "旋转中心点" + "zh_CN": "尺寸" } }, "required": true, @@ -12446,19 +19607,42 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "medium", + "value": "medium" + }, + { + "label": "small", + "value": "small" + }, + { + "label": "mini", + "value": "mini" + } + ] + } }, "description": { - "zh_CN": "组件的旋转中心点,组件的旋转中心点" + "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" }, "labelPosition": "left" - }, + } + ] + }, + { + "name": "1", + "label": { + "zh_CN": "其他" + }, + "content": [ { - "property": "transition", + "property": "maxlength", "label": { "text": { - "zh_CN": "渐变动画" + "zh_CN": "输入最大长度" } }, "required": true, @@ -12466,19 +19650,18 @@ "disabled": false, "cols": 12, "widget": { - "component": "InputConfigurator", + "component": "NumberConfigurator", "props": {} }, "description": { - "zh_CN": "该属性的默认值为 fade-in-linear" - }, - "labelPosition": "left" + "zh_CN": "设置 input 框的maxLength" + } }, { - "property": "width", + "property": "autofocus", "label": { "text": { - "zh_CN": "宽度" + "zh_CN": "聚焦" } }, "required": true, @@ -12486,40 +19669,149 @@ "disabled": false, "cols": 12, "widget": { - "component": "NumberConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "宽度" + "zh_CN": "自动获取焦点" }, "labelPosition": "left" } - ] + ], + "description": { + "zh_CN": "" + } } ], "events": { + "onChange": { + "label": { + "zh_CN": "值改变时触发" + }, + "description": { + "zh_CN": "在 Input 值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框改变后的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onInput": { + "label": { + "zh_CN": "输入值改变时触发" + }, + "description": { + "zh_CN": "在 Input 输入值改变时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "输入框输入的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, "onUpdate:modelValue": { "label": { "zh_CN": "双向绑定的值改变时触发" }, "description": { - "zh_CN": "手动控制是否可见的状态值改变时触发" + "zh_CN": "在 Input 输入值改变时触发" }, "type": "event", "functionInfo": { "params": [ { "name": "value", - "type": "boolean", + "type": "string", "defaultValue": "", "description": { - "zh_CN": "双向绑定的可见状态值" + "zh_CN": "双向绑定的值" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onBlur": { + "label": { + "zh_CN": "失去焦点时触发" + }, + "description": { + "zh_CN": "在 Input 失去焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onFocus": { + "label": { + "zh_CN": "获取焦点时触发" + }, + "description": { + "zh_CN": "在 Input 获取焦点时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "event", + "type": "Object", + "defaultValue": "", + "description": { + "zh_CN": "原生 event" } } ], "returns": {} }, "defaultValue": "" + }, + "onClear": { + "label": { + "zh_CN": "点击清空按钮时触发" + }, + "description": { + "zh_CN": "点击清空按钮时触发" + }, + "type": "event", + "functionInfo": { + "params": [], + "returns": {} + }, + "defaultValue": "" } } }, @@ -12529,7 +19821,6 @@ "styles": true, "isContainer": true, "isModal": false, - "isPopper": true, "nestingRule": { "childWhitelist": "", "parentWhitelist": "", @@ -12540,7 +19831,7 @@ "isLayout": false, "rootSelector": "", "shortcuts": { - "properties": ["visible", "width"] + "properties": ["value", "disabled"] }, "contextMenu": { "actions": ["create symbol"], @@ -12551,11 +19842,11 @@ { "version": "3.20.0", "name": { - "zh_CN": "日期选择" + "zh_CN": "数字输入框" }, - "component": "TinyDatePicker", - "icon": "datepick", - "description": "用于输入或选择日期", + "component": "TinyNumeric", + "icon": "numeric", + "description": "通过鼠标或键盘输入字符", "docUrl": "", "screenshot": "", "tags": "", @@ -12563,7 +19854,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "DatePicker", + "exportName": "Numeric", "destructuring": true }, "group": "component", @@ -12588,7 +19879,6 @@ "required": true, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "I18nConfigurator", "props": {} @@ -12599,89 +19889,155 @@ "labelPosition": "left" }, { - "property": "type", + "property": "placeholder", "label": { "text": { - "zh_CN": "类型" + "zh_CN": "占位文本" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "I18nConfigurator", + "props": {} + }, + "description": { + "zh_CN": "输入框占位文本" + }, + "labelPosition": "left" + }, + { + "property": "allow-empty", + "label": { + "text": { + "zh_CN": "内容可清空" + } + }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否内容可清空" + }, + "labelPosition": "left" + }, + { + "property": "disabled", + "label": { + "text": { + "zh_CN": "禁用" + } + }, + "required": false, + "readOnly": false, + "disabled": false, + "cols": 12, + "widget": { + "component": "CheckBoxConfigurator", + "props": {} + }, + "description": { + "zh_CN": "是否禁用" + }, + "labelPosition": "left" + }, + { + "property": "size", + "label": { + "text": { + "zh_CN": "尺寸" } }, + "required": true, + "readOnly": false, + "disabled": false, + "cols": 12, "widget": { "component": "SelectConfigurator", "props": { "options": [ { - "label": "日期", - "value": "date" - }, - { - "label": "日期时间", - "value": "datetime" - }, - { - "label": "周", - "value": "week" + "label": "medium", + "value": "medium" }, { - "label": "月份", - "value": "month" + "label": "small", + "value": "small" }, { - "label": "年份", - "value": "year" + "label": "mini", + "value": "mini" } ] } }, "description": { - "zh_CN": "设置日期框的type属性" + "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" }, "labelPosition": "left" }, { - "property": "placeholder", + "property": "controls", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "加减按钮" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "I18nConfigurator", + "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "输入框占位文本" + "zh_CN": "是否使用加减按钮" }, "labelPosition": "left" }, { - "property": "clearable", + "property": "controls-position", "label": { "text": { - "zh_CN": "清除按钮" + "zh_CN": "加减按钮位置" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "SelectConfigurator", + "props": { + "options": [ + { + "label": "左右两侧", + "value": "" + }, + { + "label": "只在右侧", + "value": "right" + } + ] + } }, "description": { - "zh_CN": "是否显示清除按钮" - }, - "labelPosition": "left" + "zh_CN": "加减按钮位置" + } }, { - "property": "disabled", + "property": "precision", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "精度" } }, "required": false, @@ -12689,120 +20045,83 @@ "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "数值精度" }, "labelPosition": "left" }, { - "property": "readonly", + "property": "step", "label": { "text": { - "zh_CN": "只读" + "zh_CN": "步长" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "CheckBoxConfigurator", - "props": {} + "component": "NumberConfigurator", + "props": { + "allowEmpty": true + } }, "description": { - "zh_CN": "是否只读" + "zh_CN": "步长" }, "labelPosition": "left" }, { - "property": "size", + "property": "max", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "最大数值" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "NumberConfigurator", "props": { - "options": [ - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] + "allowEmpty": true } }, "description": { - "zh_CN": "日期框尺寸。该属性的可选值为 medium / small / mini" + "zh_CN": "可输入的最大数值" }, "labelPosition": "left" - } - ] - }, - { - "name": "1", - "label": { - "zh_CN": "其他" - }, - "content": [ + }, { - "property": "maxlength", + "property": "min", "label": { "text": { - "zh_CN": "输入最大长度" + "zh_CN": "最小数值" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, "cols": 12, "widget": { "component": "NumberConfigurator", - "props": {} - }, - "description": { - "zh_CN": "设置 input 框的maxLength" - } - }, - { - "property": "autofocus", - "label": { - "text": { - "zh_CN": "聚焦" + "props": { + "allowEmpty": true } }, - "required": true, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, "description": { - "zh_CN": "自动获取焦点" + "zh_CN": "可输入的最大数值" }, "labelPosition": "left" } - ], - "description": { - "zh_CN": "" - } + ] } ], "events": { @@ -12964,11 +20283,11 @@ { "version": "3.20.0", "name": { - "zh_CN": "数字输入框" + "zh_CN": "穿梭框" }, - "component": "TinyNumeric", - "icon": "numeric", - "description": "通过鼠标或键盘输入字符", + "component": "TinyTransfer", + "icon": "transfer", + "description": "穿梭框,实现左右表格数据的双向交换的组件", "docUrl": "", "screenshot": "", "tags": "", @@ -12976,7 +20295,7 @@ "devMode": "proCode", "npm": { "package": "@opentiny/vue", - "exportName": "Numeric", + "exportName": "TinyTransfer", "destructuring": true }, "group": "component", @@ -13011,988 +20330,1330 @@ "labelPosition": "left" }, { - "property": "placeholder", + "property": "data", "label": { "text": { - "zh_CN": "占位文本" + "zh_CN": "左右列表的全量数据源" } }, "required": true, "readOnly": false, "disabled": false, - "cols": 12, "widget": { - "component": "I18nConfigurator", - "props": {} + "component": "CodeConfigurator", + "props": { + "language": "json" + } }, "description": { - "zh_CN": "输入框占位文本" + "zh_CN": "左右列表的全量数据源" }, "labelPosition": "left" }, { - "property": "allow-empty", + "property": "filterable", "label": { "text": { - "zh_CN": "内容可清空" + "zh_CN": "是否启用搜索的功能" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否内容可清空" + "zh_CN": "是否启用搜索的功能" }, "labelPosition": "left" }, { - "property": "disabled", + "property": "showAllBtn", "label": { "text": { - "zh_CN": "禁用" + "zh_CN": "是否显示全部移动按钮" } }, "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否禁用" + "zh_CN": "是否显示全部移动按钮" }, "labelPosition": "left" }, { - "property": "size", + "property": "toLeftDisable", "label": { "text": { - "zh_CN": "尺寸" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" } }, - "required": true, + "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { - "component": "SelectConfigurator", - "props": { - "options": [ - { - "label": "medium", - "value": "medium" - }, - { - "label": "small", - "value": "small" - }, - { - "label": "mini", - "value": "mini" - } - ] - } + "component": "CheckBoxConfigurator", + "props": {} }, "description": { - "zh_CN": "输入框尺寸。该属性的可选值为 medium / small / mini" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" }, "labelPosition": "left" }, { - "property": "controls", + "property": "toRightDisable", "label": { "text": { - "zh_CN": "加减按钮" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" } }, "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { "component": "CheckBoxConfigurator", "props": {} }, "description": { - "zh_CN": "是否使用加减按钮" + "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" }, "labelPosition": "left" }, { - "property": "controls-position", + "property": "titles", "label": { "text": { - "zh_CN": "加减按钮位置" + "zh_CN": "自定义列表的标题" } }, "required": false, "readOnly": false, "disabled": false, - "cols": 12, "widget": { - "component": "SelectConfigurator", + "component": "CodeConfigurator", "props": { - "options": [ - { - "label": "左右两侧", - "value": "" - }, - { - "label": "只在右侧", - "value": "right" - } - ] + "language": "json" + } + }, + "description": { + "zh_CN": "自定义列表的标题;不设置titles时,左右列表的标题默认显示为: 列表 1, 列表 2" + }, + "labelPosition": "left" + } + ] + } + ], + "events": { + "onChange": { + "label": { + "zh_CN": "右侧列表元素变化时触发" + }, + "description": { + "zh_CN": "右侧列表元素变化时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "右侧列表元素变化时触发" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onLeftCheckChange": { + "label": { + "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" + }, + "description": { + "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" + } + } + ], + "returns": {} + }, + "defaultValue": "" + }, + "onRightCheckChange": { + "label": { + "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" + }, + "description": { + "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" + }, + "type": "event", + "functionInfo": { + "params": [ + { + "name": "value", + "type": "string", + "defaultValue": "", + "description": { + "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" } - }, - "description": { - "zh_CN": "加减按钮位置" } - }, + ], + "returns": {} + }, + "defaultValue": "" + } + } + }, + "configure": { + "loop": true, + "condition": true, + "styles": true, + "isContainer": false, + "isModal": false, + "nestingRule": { + "childWhitelist": "", + "parentWhitelist": "", + "descendantBlacklist": "", + "ancestorWhitelist": "" + }, + "isNullNode": false, + "isLayout": false, + "rootSelector": "", + "shortcuts": { + "properties": ["value", "disabled"] + }, + "contextMenu": { + "actions": ["create symbol"], + "disable": ["copy", "remove"] + } + } + } + ], + "blocks": [], + "snippets": [ + { + "group": "layout", + "label": { + "zh_CN": "布局与容器" + }, + "children": [ + { + "name": { + "zh_CN": "栅格布局" + }, + "icon": "row", + "screenshot": "", + "snippetName": "TinyLayout", + "schema": { + "componentName": "TinyLayout", + "props": {}, + "children": [ { - "property": "precision", - "label": { - "text": { - "zh_CN": "精度" - } + "componentName": "TinyRow", + "props": { + "style": "padding: 10px;" }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true + "children": [ + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } } - }, - "description": { - "zh_CN": "数值精度" - }, - "labelPosition": "left" + ] }, { - "property": "step", - "label": { - "text": { - "zh_CN": "步长" - } + "componentName": "TinyRow", + "props": { + "style": "padding: 10px;" }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true + "children": [ + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } + }, + { + "componentName": "TinyCol", + "props": { + "span": 3 + } } - }, - "description": { - "zh_CN": "步长" - }, - "labelPosition": "left" + ] + } + ] + } + } + ] + }, + { + "group": "basic", + "label": { + "zh_CN": "基础元素" + }, + "children": [ + { + "name": { + "zh_CN": "段落" + }, + "icon": "paragraph", + "screenshot": "", + "snippetName": "p", + "schema": { + "componentName": "p", + "children": "TinyEngine 前端可视化设计器致力于通过友好的用户交互提升业务应用的开发效率。" + } + }, + { + "name": { + "zh_CN": "链接" + }, + "icon": "link", + "screenshot": "", + "snippetName": "a", + "schema": { + "componentName": "a", + "children": "链接" + } + }, + { + "name": { + "zh_CN": "分隔线" + }, + "icon": "hr", + "screenshot": "", + "snippetName": "hr", + "schema": {} + }, + { + "name": { + "zh_CN": "标题" + }, + "icon": "h16", + "screenshot": "", + "snippetName": "h1", + "schema": { + "componentName": "h1", + "props": {}, + "children": "Heading" + } + }, + { + "name": { + "zh_CN": "视频" + }, + "icon": "video", + "screenshot": "", + "snippetName": "video", + "schema": { + "componentName": "video", + "props": { + "src": "https://tinyengine-assets.obs.myhuaweicloud.com/files/in-action.mp4#t=1.5", + "width": "200", + "height": "100", + "style": "border:1px solid #ccc" + } + } + }, + { + "name": { + "zh_CN": "按钮" + }, + "icon": "button", + "screenshot": "", + "snippetName": "TinyButton", + "schema": { + "componentName": "TinyButton", + "props": { + "text": "按钮文案" + } + } + }, + { + "name": { + "zh_CN": "按钮组" + }, + "icon": "buttons", + "snippetName": "TinyButtons", + "screenshot": "", + "schema": { + "componentName": "div", + "props": {}, + "children": [ + { + "componentName": "TinyButton", + "props": { + "text": "提交", + "type": "primary", + "style": "margin: 0 5px 0 5px;" + } }, { - "property": "max", - "label": { - "text": { - "zh_CN": "最大数值" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } - }, - "description": { - "zh_CN": "可输入的最大数值" - }, - "labelPosition": "left" + "componentName": "TinyButton", + "props": { + "text": "重置", + "style": "margin: 0 5px 0 5px;" + } }, { - "property": "min", - "label": { - "text": { - "zh_CN": "最小数值" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "cols": 12, - "widget": { - "component": "NumberConfigurator", - "props": { - "allowEmpty": true - } - }, - "description": { - "zh_CN": "可输入的最大数值" - }, - "labelPosition": "left" + "componentName": "TinyButton", + "props": { + "text": "取消" + } } ] - } - ], - "events": { - "onChange": { - "label": { - "zh_CN": "值改变时触发" - }, - "description": { - "zh_CN": "在 Input 值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框改变后的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" }, - "onInput": { - "label": { - "zh_CN": "输入值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "输入框输入的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" + "configure": { + "isContainer": true + } + }, + { + "name": { + "zh_CN": "互斥按钮组" }, - "onUpdate:modelValue": { - "label": { - "zh_CN": "双向绑定的值改变时触发" - }, - "description": { - "zh_CN": "在 Input 输入值改变时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "icon": "MutexButtons", + "snippetName": "TinyButtonGroup", + "screenshot": "", + "schema": { + "componentName": "TinyButtonGroup", + "props": { + "data": [ { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "双向绑定的值" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onBlur": { - "label": { - "zh_CN": "失去焦点时触发" - }, - "description": { - "zh_CN": "在 Input 失去焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "text": "Button1", + "value": "1" + }, { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } - } - ], - "returns": {} - }, - "defaultValue": "" - }, - "onFocus": { - "label": { - "zh_CN": "获取焦点时触发" - }, - "description": { - "zh_CN": "在 Input 获取焦点时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "text": "Button2", + "value": "2" + }, { - "name": "event", - "type": "Object", - "defaultValue": "", - "description": { - "zh_CN": "原生 event" - } + "text": "Button3", + "value": "3" } ], - "returns": {} - }, - "defaultValue": "" - }, - "onClear": { - "label": { - "zh_CN": "点击清空按钮时触发" - }, - "description": { - "zh_CN": "点击清空按钮时触发" - }, - "type": "event", - "functionInfo": { - "params": [], - "returns": {} - }, - "defaultValue": "" + "modelValue": "1" + } } - } - }, - "configure": { - "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"] - } - } - }, - { - "version": "3.20.0", - "name": { - "zh_CN": "穿梭框" - }, - "component": "TinyTransfer", - "icon": "transfer", - "description": "穿梭框,实现左右表格数据的双向交换的组件", - "docUrl": "", - "screenshot": "", - "tags": "", - "keywords": "", - "devMode": "proCode", - "npm": { - "package": "@opentiny/vue", - "exportName": "TinyTransfer", - "destructuring": true + { + "name": { + "zh_CN": "搜索框" + }, + "icon": "search", + "screenshot": "", + "snippetName": "TinySearch", + "schema": { + "componentName": "TinySearch", + "props": { + "modelValue": "", + "placeholder": "输入关键词" + } + } + } + ] + }, + { + "group": "form", + "label": { + "zh_CN": "表单类型" }, - "group": "component", - "priority": 1, - "schema": { - "properties": [ - { - "label": { - "zh_CN": "基础信息" - }, - "description": { - "zh_CN": "基础信息" + "children": [ + { + "name": { + "zh_CN": "表单" + }, + "screenshot": "", + "snippetName": "TinyForm", + "icon": "form", + "schema": { + "componentName": "TinyForm", + "props": { + "labelWidth": "80px", + "labelPosition": "top" }, - "content": [ - { - "property": "modelValue", - "label": { - "text": { - "zh_CN": "绑定值" - } - }, - "required": true, - "readOnly": false, - "disabled": false, - "widget": { - "component": "I18nConfigurator", - "props": {} - }, - "description": { - "zh_CN": "双向绑定值" - }, - "labelPosition": "left" - }, + "children": [ { - "property": "data", - "label": { - "text": { - "zh_CN": "左右列表的全量数据源" - } + "componentName": "TinyFormItem", + "props": { + "label": "人员" }, - "required": true, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" + "children": [ + { + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "" + } } - }, - "description": { - "zh_CN": "左右列表的全量数据源" - }, - "labelPosition": "left" + ] }, { - "property": "filterable", - "label": { - "text": { - "zh_CN": "是否启用搜索的功能" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否启用搜索的功能" + "componentName": "TinyFormItem", + "props": { + "label": "密码" }, - "labelPosition": "left" - }, - { - "property": "showAllBtn", - "label": { - "text": { - "zh_CN": "是否显示全部移动按钮" + "children": [ + { + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "", + "type": "password" + } } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "是否显示全部移动按钮" - }, - "labelPosition": "left" + ] }, { - "property": "toLeftDisable", - "label": { - "text": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} - }, - "description": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" + "componentName": "TinyFormItem", + "props": { + "label": "" }, - "labelPosition": "left" - }, - { - "property": "toRightDisable", - "label": { - "text": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" + "children": [ + { + "componentName": "TinyButton", + "props": { + "text": "提交", + "type": "primary", + "style": "margin-right: 10px" + } + }, + { + "componentName": "TinyButton", + "props": { + "text": "重置", + "type": "primary" + } } + ] + } + ] + } + }, + { + "name": { + "zh_CN": "下拉框" + }, + "icon": "select", + "screenshot": "", + "snippetName": "TinySelect", + "schema": { + "componentName": "TinySelect", + "props": { + "modelValue": "", + "placeholder": "请选择", + "options": [ + { + "value": "1", + "label": "黄金糕" }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CheckBoxConfigurator", - "props": {} + { + "value": "2", + "label": "双皮奶" + } + ] + } + } + }, + { + "name": { + "zh_CN": "开关" + }, + "icon": "switch", + "screenshot": "", + "snippetName": "TinySwitch", + "schema": { + "componentName": "TinySwitch", + "props": { + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "复选框组" + }, + "icon": "checkboxs", + "screenshot": "", + "snippetName": "TinyCheckboxGroup", + "schema": { + "componentName": "TinyCheckboxGroup", + "props": { + "modelValue": ["name1", "name2"], + "type": "checkbox", + "options": [ + { + "text": "复选框1", + "label": "name1" }, - "description": { - "zh_CN": "组件初始化状态下未选中时,默认按钮显示禁用状态" + { + "text": "复选框2", + "label": "name2" }, - "labelPosition": "left" - }, + { + "text": "复选框3", + "label": "name3" + } + ] + } + } + }, + { + "name": { + "zh_CN": "复选框拖拽按钮组" + }, + "icon": "checkboxgroup", + "screenshot": "", + "snippetName": "TinyCheckboxbuttonGroup", + "schema": { + "componentName": "TinyCheckboxGroup", + "props": { + "modelValue": [] + }, + "children": [ { - "property": "titles", - "label": { - "text": { - "zh_CN": "自定义列表的标题" - } - }, - "required": false, - "readOnly": false, - "disabled": false, - "widget": { - "component": "CodeConfigurator", - "props": { - "language": "json" + "componentName": "TinyCheckboxButton", + "children": [ + { + "componentName": "div" } - }, - "description": { - "zh_CN": "自定义列表的标题;不设置titles时,左右列表的标题默认显示为: 列表 1, 列表 2" - }, - "labelPosition": "left" + ] } ] } - ], - "events": { - "onChange": { - "label": { - "zh_CN": "右侧列表元素变化时触发" - }, - "description": { - "zh_CN": "右侧列表元素变化时触发" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "右侧列表元素变化时触发" - } - } - ], - "returns": {} - }, - "defaultValue": "" + }, + { + "name": { + "zh_CN": "输入框" }, - "onLeftCheckChange": { - "label": { - "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" - }, - "description": { - "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" - }, - "type": "event", - "functionInfo": { - "params": [ - { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "左侧列表元素被用户选中 / 取消选中时触发;" - } - } - ], - "returns": {} - }, - "defaultValue": "" + "icon": "input", + "screenshot": "", + "snippetName": "TinyInput", + "schema": { + "componentName": "TinyInput", + "props": { + "placeholder": "请输入", + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "单选" }, - "onRightCheckChange": { - "label": { - "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" - }, - "description": { - "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" - }, - "type": "event", - "functionInfo": { - "params": [ + "icon": "radio", + "screenshot": "", + "snippetName": "TinyRadio", + "schema": { + "componentName": "TinyRadio", + "props": { + "label": "1", + "text": "单选文本" + } + } + }, + { + "name": { + "zh_CN": "单选组" + }, + "icon": "radiogroup", + "screenshot": "", + "snippetName": "TinyRadioGroup", + "schema": { + "props": { + "type": "radio", + "modelValue": "1", + "options": [ + { "label": "1", "text": "选项一" }, + { "label": "2", "text": "选项二" } + ] + } + } + }, + { + "name": { + "zh_CN": "复选框" + }, + "icon": "checkbox", + "screenshot": "", + "snippetName": "TinyCheckbox", + "schema": { + "componentName": "TinyCheckbox", + "props": { + "text": "复选框文案" + } + } + }, + { + "name": { + "zh_CN": "日期选择" + }, + "icon": "datepick", + "screenshot": "", + "snippetName": "TinyDatePicker", + "schema": { + "componentName": "TinyDatePicker", + "props": { + "placeholder": "请输入", + "modelValue": "" + } + } + }, + { + "name": { + "zh_CN": "数字输入框" + }, + "icon": "numeric", + "screenshot": "", + "snippetName": "TinyNumeric", + "schema": { + "componentName": "TinyNumeric", + "props": { + "allow-empty": true, + "placeholder": "请输入", + "controls-position": "right", + "step": 1 + } + } + }, + { + "name": { + "zh_CN": "穿梭框" + }, + "icon": "transfer", + "screenshot": "", + "snippetName": "TinyTransfer", + "schema": { + "componentName": "TinyTransfer", + "props": { + "modelValue": [3], + "data": [ { - "name": "value", - "type": "string", - "defaultValue": "", - "description": { - "zh_CN": "右侧列表元素被用户选中 / 取消选中时触发" - } + "key": 1, + "label": "备选项1", + "disabled": false + }, + { + "key": 2, + "label": "备选项2", + "disabled": false + }, + { + "key": 3, + "label": "备选项3", + "disabled": false + }, + { + "key": 4, + "label": "备选项4", + "disabled": false } - ], - "returns": {} - }, - "defaultValue": "" + ] + } } - } - }, - "configure": { - "loop": true, - "condition": true, - "styles": true, - "isContainer": false, - "isModal": false, - "nestingRule": { - "childWhitelist": "", - "parentWhitelist": "", - "descendantBlacklist": "", - "ancestorWhitelist": "" }, - "isNullNode": false, - "isLayout": false, - "rootSelector": "", - "shortcuts": { - "properties": ["value", "disabled"] + { + "icon": "rate", + "name": { + "zh_CN": "评分" + }, + "schema": { + "props": { + "allow-half": true, + "modelValue": 3, + "show-score": true + } + }, + "screenshot": "", + "snippetName": "TinyRate" + }, + { + "name": { + "zh_CN": "滑块" + }, + "icon": "slider", + "screenshot": "", + "snippetName": "TinySlider", + "schema": { + "componentName": "TinySlider", + "props": { + "max": 100, + "min": 0, + "step": 1, + "modelValue": 50 + } + } }, - "contextMenu": { - "actions": ["create symbol"], - "disable": ["copy", "remove"] - } - } - } - ], - "blocks": [], - "snippets": [ - { - "group": "layout", - "label": { - "zh_CN": "布局与容器" - }, - "children": [ { "name": { - "zh_CN": "栅格布局" + "zh_CN": "级联选择器" }, - "icon": "row", + "icon": "cascader", "screenshot": "", - "snippetName": "TinyLayout", + "snippetName": "TinyCascader", "schema": { - "componentName": "TinyLayout", - "props": {}, - "children": [ - { - "componentName": "TinyRow", - "props": { - "style": "padding: 10px;" - }, - "children": [ - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 + "componentName": "TinyCascader", + "props": { + "modelValue": "anzhuangcli", + "options": [ + { + "value": "zhinan", + "label": "指南", + "children": [ + { + "value": "anzhuang", + "label": "安装", + "children": [ + { + "value": "xiangmudengji", + "label": "项目登记" + }, + { + "value": "huanjingzhunbei", + "label": "环境准备" + }, + { + "value": "anzhuangcli", + "label": "安装 CLI" + }, + { + "value": "chuangjianxiangmu", + "label": "创建项目" + } + ] + }, + { + "value": "kaifa", + "label": "开发", + "children": [ + { + "value": "yinruzujian", + "label": "引入组件" + }, + { + "value": "monishuju", + "label": "模拟数据" + } + ] } - } - ] - }, - { - "componentName": "TinyRow", - "props": { - "style": "padding: 10px;" + ] }, - "children": [ - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 - } - }, - { - "componentName": "TinyCol", - "props": { - "span": 3 + { + "value": "zujian", + "label": "组件", + "children": [ + { + "value": "basic", + "label": "框架风格", + "children": [ + { + "value": "layout", + "label": "Layout 布局" + }, + { + "value": "color", + "label": "Color 色彩" + }, + { + "value": "font", + "label": "Font 字体" + }, + { + "value": "icon", + "label": "Icon 图标" + } + ] + }, + { + "value": "data", + "label": "数据组件", + "children": [ + { + "value": "tree", + "label": "Tree 树形控件" + }, + { + "value": "pager", + "label": "Pager 分页" + } + ] } - } - ] - } - ] + ] + } + ], + "placeholder": "请选择" + } } } ] }, { - "group": "basic", + "group": "table", "label": { - "zh_CN": "基础元素" + "zh_CN": "表格类型" }, "children": [ { "name": { - "zh_CN": "段落" - }, - "icon": "paragraph", - "screenshot": "", - "snippetName": "p", - "schema": { - "componentName": "p", - "children": "TinyEngine 前端可视化设计器致力于通过友好的用户交互提升业务应用的开发效率。" - } - }, - { - "name": { - "zh_CN": "链接" + "zh_CN": "表格" }, - "icon": "link", + "icon": "grid", "screenshot": "", - "snippetName": "a", + "snippetName": "TinyGrid", "schema": { - "componentName": "a", - "children": "链接" + "componentName": "TinyGrid", + "props": { + "editConfig": { + "trigger": "click", + "mode": "cell", + "showStatus": true + }, + "columns": [ + { + "type": "index", + "width": 60 + }, + { + "type": "selection", + "width": 60 + }, + { + "field": "employees", + "title": "员工数" + }, + { + "field": "created_date", + "title": "创建日期" + }, + { + "field": "city", + "title": "城市" + } + ], + "data": [ + { + "id": "1", + "name": "GFD科技有限公司", + "city": "福州", + "employees": 800, + "created_date": "2014-04-30 00:56:00", + "boole": false + }, + { + "id": "2", + "name": "WWW科技有限公司", + "city": "深圳", + "employees": 300, + "created_date": "2016-07-08 12:36:22", + "boole": true + } + ] + } } }, { "name": { - "zh_CN": "分隔线" - }, - "icon": "hr", - "screenshot": "", - "snippetName": "hr", - "schema": {} - }, - { - "name": { - "zh_CN": "标题" + "zh_CN": "分页" }, - "icon": "h16", + "icon": "pager", "screenshot": "", - "snippetName": "h1", + "snippetName": "TinyPager", "schema": { - "componentName": "h1", - "props": {}, - "children": "Heading" + "componentName": "TinyPager", + "props": { + "layout": "total, sizes, prev, pager, next", + "total": 100, + "pageSize": 10, + "currentPage": 1 + } } - }, + } + ] + }, + { + "group": "data-display", + "label": { + "zh_CN": "数据展示类" + }, + "children": [ { "name": { - "zh_CN": "视频" + "zh_CN": "走马灯" }, - "icon": "video", "screenshot": "", - "snippetName": "video", + "snippetName": "TinyCarousel", + "icon": "carousel", "schema": { - "componentName": "video", + "componentName": "TinyCarousel", "props": { - "src": "https://tinyengine-assets.obs.myhuaweicloud.com/files/in-action.mp4#t=1.5", - "width": "200", - "height": "100", - "style": "border:1px solid #ccc" - } + "height": "180px" + }, + "children": [ + { + "componentName": "TinyCarouselItem", + "props": { + "title": "carousel-item-a" + }, + "children": [ + { + "componentName": "div", + "props": { + "style": "margin:10px 0 0 30px" + } + } + ] + }, + { + "componentName": "TinyCarouselItem", + "props": { + "title": "carousel-item-b" + }, + "children": [ + { + "componentName": "div", + "props": { + "style": "margin:10px 0 0 30px" + } + } + ] + } + ] } }, { "name": { - "zh_CN": "按钮" + "zh_CN": "对话框" }, - "icon": "button", "screenshot": "", - "snippetName": "TinyButton", + "snippetName": "TinyDialogBox", + "icon": "dialogbox", "schema": { - "componentName": "TinyButton", + "componentName": "TinyDialogBox", "props": { - "text": "按钮文案" - } + "visible": true, + "show-close": true, + "title": "dialogBox title" + }, + "children": [ + { + "componentName": "div" + } + ] } }, { "name": { - "zh_CN": "按钮组" + "zh_CN": "折叠面板" }, - "icon": "buttons", - "snippetName": "TinyButtons", "screenshot": "", + "snippetName": "TinyCollapse", + "icon": "collapse", "schema": { - "componentName": "div", - "props": {}, + "componentName": "TinyCollapse", + "props": { + "modelValue": "collapse1" + }, "children": [ { - "componentName": "TinyButton", + "componentName": "TinyCollapseItem", "props": { - "text": "提交", - "type": "primary", - "style": "margin: 0 5px 0 5px;" - } + "name": "collapse1", + "title": "折叠项1" + }, + "children": [ + { + "componentName": "div" + } + ] }, { - "componentName": "TinyButton", + "componentName": "TinyCollapseItem", "props": { - "text": "重置", - "style": "margin: 0 5px 0 5px;" - } + "name": "collapse2", + "title": "折叠项2" + }, + "children": [ + { + "componentName": "div" + } + ] }, { - "componentName": "TinyButton", + "componentName": "TinyCollapseItem", "props": { - "text": "取消" - } + "name": "collapse3", + "title": "折叠项3" + }, + "children": [ + { + "componentName": "div" + } + ] } ] + } + }, + { + "name": { + "zh_CN": "弹出编辑" }, - "configure": { - "isContainer": true + "icon": "popeditor", + "screenshot": "", + "snippetName": "TinyPopeditor", + "schema": { + "componentName": "TinyPopeditor", + "props": { + "modelValue": "", + "placeholder": "请选择", + "grid-op": { + "columns": [ + { + "field": "id", + "title": "ID", + "width": 40 + }, + { + "field": "name", + "title": "名称", + "showOverflow": "tooltip" + }, + { + "field": "province", + "title": "省份", + "width": 80 + }, + { + "field": "city", + "title": "城市", + "width": 80 + } + ], + "data": [ + { + "id": "1", + "name": "GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司", + "city": "福州", + "province": "福建" + }, + { + "id": "2", + "name": "WWW科技有限公司", + "city": "深圳", + "province": "广东" + }, + { + "id": "3", + "name": "RFV有限责任公司", + "city": "中山", + "province": "广东" + }, + { + "id": "4", + "name": "TGB科技有限公司", + "city": "龙岩", + "province": "福建" + }, + { + "id": "5", + "name": "YHN科技有限公司", + "city": "韶关", + "province": "广东" + }, + { + "id": "6", + "name": "WSX科技有限公司", + "city": "黄冈", + "province": "武汉" + } + ] + } + } } }, { "name": { - "zh_CN": "互斥按钮组" + "zh_CN": "树" }, - "icon": "MutexButtons", - "snippetName": "TinyButtonGroup", + "icon": "tree", "screenshot": "", + "snippetName": "TinyTree", "schema": { - "componentName": "TinyButtonGroup", + "componentName": "TinyTree", "props": { "data": [ { - "text": "Button1", - "value": "1" - }, - { - "text": "Button2", - "value": "2" + "label": "一级 1", + "children": [ + { + "label": "二级 1-1", + "children": [ + { + "label": "三级 1-1-1" + } + ] + } + ] }, { - "text": "Button3", - "value": "3" + "label": "一级 2", + "children": [ + { + "label": "二级 2-1", + "children": [ + { + "label": "三级 2-1-1" + } + ] + }, + { + "label": "二级 2-2", + "children": [ + { + "label": "三级 2-2-1" + } + ] + } + ] } - ], - "modelValue": "1" + ] } } }, { "name": { - "zh_CN": "搜索框" + "zh_CN": "文字提示框" }, - "icon": "search", + "icon": "tooltip", "screenshot": "", - "snippetName": "TinySearch", + "snippetName": "TinyTooltip", "schema": { - "componentName": "TinySearch", + "componentName": "TinyTooltip", "props": { - "modelValue": "", - "placeholder": "输入关键词" - } + "content": "Top Left 提示文字", + "placement": "top-start", + "manual": true, + "modelValue": true + }, + "children": [ + { + "componentName": "span", + "children": [ + { + "componentName": "div", + "props": {} + } + ] + }, + { + "componentName": "Template", + "props": { + "slot": "content" + }, + "children": [ + { + "componentName": "span", + "children": [ + { + "componentName": "div", + "props": { + "placeholder": "提示内容" + } + } + ] + } + ] + } + ] } - } - ] - }, - { - "group": "form", - "label": { - "zh_CN": "表单类型" - }, - "children": [ + }, { "name": { - "zh_CN": "表单" + "zh_CN": "提示框" }, + "icon": "popover", "screenshot": "", - "snippetName": "tiny-form", - "icon": "form", + "snippetName": "TinyPopover", "schema": { - "componentName": "TinyForm", + "componentName": "TinyPopover", "props": { - "labelWidth": "80px", - "labelPosition": "top" + "width": 200, + "title": "弹框标题", + "trigger": "manual", + "modelValue": true }, "children": [ { - "componentName": "TinyFormItem", - "props": { - "label": "人员" - }, - "children": [ - { - "componentName": "TinyInput", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } - ] - }, - { - "componentName": "TinyFormItem", + "componentName": "Template", "props": { - "label": "密码" + "slot": "reference" }, "children": [ { - "componentName": "TinyInput", + "componentName": "div", "props": { - "placeholder": "请输入", - "modelValue": "", - "type": "password" + "placeholder": "触发源" } } ] }, { - "componentName": "TinyFormItem", + "componentName": "Template", "props": { - "label": "" + "slot": "default" }, "children": [ { - "componentName": "TinyButton", - "props": { - "text": "提交", - "type": "primary", - "style": "margin-right: 10px" - } - }, - { - "componentName": "TinyButton", + "componentName": "div", "props": { - "text": "重置", - "type": "primary" + "placeholder": "提示内容" } } ] @@ -14002,269 +21663,155 @@ }, { "name": { - "zh_CN": "下拉框" - }, - "icon": "select", - "screenshot": "", - "snippetName": "TinySelect", - "schema": { - "componentName": "TinySelect", - "props": { - "modelValue": "", - "placeholder": "请选择", - "options": [ - { - "value": "1", - "label": "黄金糕" - }, - { - "value": "2", - "label": "双皮奶" - } - ] - } - } - }, - { - "name": { - "zh_CN": "开关" - }, - "icon": "switch", - "screenshot": "", - "snippetName": "TinySwitch", - "schema": { - "componentName": "TinySwitch", - "props": { - "modelValue": "" - } - } - }, - { - "name": { - "zh_CN": "复选框组" + "zh_CN": "骨架屏" }, - "icon": "checkboxs", + "icon": "skeleton", "screenshot": "", - "snippetName": "TinyCheckboxGroup", + "snippetName": "TinySkeleton", "schema": { - "componentName": "TinyCheckboxGroup", + "componentName": "TinySkeleton", "props": { - "modelValue": ["name1", "name2"], - "type": "checkbox", - "options": [ - { - "text": "复选框1", - "label": "name1" - }, - { - "text": "复选框2", - "label": "name2" + "rows": 3, + "loading": true, + "animated": true + }, + "children": [ + { + "props": { + "text": "实际内容" }, - { - "text": "复选框3", - "label": "name3" - } - ] - } + "componentName": "Text" + } + ] } }, { "name": { - "zh_CN": "复选框拖拽按钮组" + "zh_CN": "卡片" }, - "icon": "checkboxgroup", + "icon": "card", "screenshot": "", - "snippetName": "TinyCheckboxbuttonGroup", + "snippetName": "TinyCard", "schema": { - "componentName": "TinyCheckboxGroup", + "componentName": "TinyCard", "props": { - "modelValue": [] + "type": "text", + "title": "卡片标题" }, "children": [ { - "componentName": "TinyCheckboxButton", - "children": [ - { - "componentName": "div" - } - ] + "props": { + "text": "这是一个文本卡片的示例内容。" + }, + "componentName": "Text" } ] } }, { "name": { - "zh_CN": "输入框" - }, - "icon": "input", - "screenshot": "", - "snippetName": "TinyInput", - "schema": { - "componentName": "TinyInput", - "props": { - "placeholder": "请输入", - "modelValue": "" - } - } - }, - { - "name": { - "zh_CN": "单选" + "zh_CN": "日历" }, - "icon": "radio", + "icon": "calendar", "screenshot": "", - "snippetName": "TinyRadio", + "snippetName": "TinyCalendar", "schema": { - "componentName": "TinyRadio", + "componentName": "TinyCalendar", "props": { - "label": "1", - "text": "单选文本" + "mode": "month", + "show-selected": false } } }, { "name": { - "zh_CN": "复选框" + "zh_CN": "进度条" }, - "icon": "checkbox", + "icon": "progress", "screenshot": "", - "snippetName": "TinyCheckbox", + "snippetName": "TinyProgress", "schema": { - "componentName": "TinyCheckbox", + "componentName": "TinyProgress", "props": { - "text": "复选框文案" + "type": "line", + "status": "success", + "percentage": 50 } } }, { "name": { - "zh_CN": "日期选择" + "zh_CN": "标记" }, - "icon": "datepick", + "icon": "badge", "screenshot": "", - "snippetName": "TinyDatePicker", + "snippetName": "TinyBadge", "schema": { - "componentName": "TinyDatePicker", + "componentName": "TinyBadge", "props": { - "placeholder": "请输入", - "modelValue": "" + "value": 10, + "data": "我的待办" } } }, { "name": { - "zh_CN": "数字输入框" + "zh_CN": "标签" }, - "icon": "numeric", + "icon": "tag", "screenshot": "", - "snippetName": "TinyNumeric", + "snippetName": "TinyTag", "schema": { - "componentName": "TinyNumeric", + "componentName": "TinyTag", "props": { - "allow-empty": true, - "placeholder": "请输入", - "controls-position": "right", - "step": 1 + "type": "success", + "value": "成功" } } }, { "name": { - "zh_CN": "穿梭框" + "zh_CN": "统计数值" }, - "icon": "transfer", + "icon": "statistic", "screenshot": "", - "snippetName": "TinyTransfer", + "snippetName": "TinyStatistic", "schema": { - "componentName": "TinyTransfer", + "componentName": "TinyStatistic", "props": { - "modelValue": [3], - "data": [ - { - "key": 1, - "label": "备选项1", - "disabled": false - }, - { - "key": 2, - "label": "备选项2", - "disabled": false - }, - { - "key": 3, - "label": "备选项3", - "disabled": false - }, - { - "key": 4, - "label": "备选项4", - "disabled": false - } - ] + "value": 36256.22, + "precision": 2 } } } ] }, { - "group": "table", + "group": "navigation", "label": { - "zh_CN": "表格类型" + "zh_CN": "导航类型" }, "children": [ { "name": { - "zh_CN": "表格" + "zh_CN": "时间线" }, - "icon": "grid", + "icon": "timeline", "screenshot": "", - "snippetName": "tinyGrid", + "snippetName": "TinyTimeLine", "schema": { - "componentName": "TinyGrid", + "componentName": "TinyTimeLine", "props": { - "editConfig": { - "trigger": "click", - "mode": "cell", - "showStatus": true - }, - "columns": [ - { - "type": "index", - "width": 60 - }, - { - "type": "selection", - "width": 60 - }, - { - "field": "employees", - "title": "员工数" - }, + "active": "2", + "data": [ { - "field": "created_date", - "title": "创建日期" + "name": "已下单" }, { - "field": "city", - "title": "城市" - } - ], - "data": [ - { - "id": "1", - "name": "GFD科技有限公司", - "city": "福州", - "employees": 800, - "created_date": "2014-04-30 00:56:00", - "boole": false + "name": "运输中" }, { - "id": "2", - "name": "WWW科技有限公司", - "city": "深圳", - "employees": 300, - "created_date": "2016-07-08 12:36:22", - "boole": true + "name": "已签收" } ] } @@ -14272,46 +21819,50 @@ }, { "name": { - "zh_CN": "分页" + "zh_CN": "面包屑" }, - "icon": "pager", + "icon": "breadcrumb", "screenshot": "", - "snippetName": "TinyPager", + "snippetName": "TinyBreadcrumb", "schema": { - "componentName": "TinyPager", + "componentName": "TinyBreadcrumb", "props": { - "layout": "total, sizes, prev, pager, next", - "total": 100, - "pageSize": 10, - "currentPage": 1 + "options": [ + { + "to": "{ path: '/' }", + "label": "首页" + }, + { + "to": "{ path: '/breadcrumb' }", + "label": "产品" + }, + { + "replace": "true", + "label": "软件" + } + ] } } - } - ] - }, - { - "group": "data-display", - "label": { - "zh_CN": "数据展示类" - }, - "children": [ + }, { "name": { - "zh_CN": "走马灯" + "zh_CN": "标签页" }, + "icon": "tabs", "screenshot": "", - "snippetName": "tiny-carousel", - "icon": "carousel", + "group": true, + "snippetName": "TinyTabs", "schema": { - "componentName": "TinyCarousel", + "componentName": "TinyTabs", "props": { - "height": "180px" + "modelValue": "first" }, "children": [ { - "componentName": "TinyCarouselItem", + "componentName": "TinyTabItem", "props": { - "title": "carousel-item-a" + "title": "标签页1", + "name": "first" }, "children": [ { @@ -14323,9 +21874,10 @@ ] }, { - "componentName": "TinyCarouselItem", + "componentName": "TinyTabItem", "props": { - "title": "carousel-item-b" + "title": "标签页2", + "name": "second" }, "children": [ { @@ -14341,402 +21893,602 @@ }, { "name": { - "zh_CN": "对话框" + "zh_CN": "步骤条" }, + "icon": "steps", "screenshot": "", - "snippetName": "TinyDialogBox", - "icon": "dialogbox", + "snippetName": "TinySteps", "schema": { - "componentName": "TinyDialogBox", + "componentName": "TinySteps", "props": { - "visible": true, - "show-close": true, - "title": "dialogBox title" - }, - "children": [ - { - "componentName": "div" - } - ] + "data": [ + { + "name": "步骤一", + "status": "wait" + }, + { + "name": "步骤二", + "status": "process" + }, + { + "name": "步骤三", + "status": "finish" + } + ], + "active": 1 + } } }, { "name": { - "zh_CN": "折叠面板" + "zh_CN": "树形菜单" }, + "icon": "treemenu", "screenshot": "", - "snippetName": "TinyCollapse", - "icon": "collapse", + "snippetName": "TinyTreeMenu", "schema": { - "componentName": "TinyCollapse", + "componentName": "TinyTreeMenu", "props": { - "modelValue": "collapse1" - }, - "children": [ - { - "componentName": "TinyCollapseItem", - "props": { - "name": "collapse1", - "title": "折叠项1" + "data": [ + { + "id": 1, + "label": "一级节点1", + "children": [ + { + "id": 2, + "label": "二级节点1-1" + }, + { + "id": 3, + "label": "二级节点1-2" + } + ] }, - "children": [ - { - "componentName": "div" - } - ] - }, - { - "componentName": "TinyCollapseItem", - "props": { - "name": "collapse2", - "title": "折叠项2" + { + "id": 4, + "label": "一级节点2" + } + ], + "placeholder": "输入关键字搜索", + "node-key": "id" + } + } + } + ] + }, + { + "group": "chart", + "label": { + "zh_CN": "图表类型" + }, + "children": [ + { + "name": { + "zh_CN": "折线图" + }, + "icon": "line", + "screenshot": "", + "snippetName": "TinyHuichartsLine", + "schema": { + "componentName": "TinyHuichartsLine", + "props": { + "options": { + "theme": "hdesign-light", + "padding": [50, 30, 50, 20], + "legend": { + "show": true, + "icon": "line" }, - "children": [ + "data": [ { - "componentName": "div" - } - ] - }, - { - "componentName": "TinyCollapseItem", - "props": { - "name": "collapse3", - "title": "折叠项3" - }, - "children": [ + "Month": "Jan", + "Domestics": 33, + "Abroad": 37 + }, { - "componentName": "div" + "Month": "Feb", + "Domestics": 27, + "Abroad": 39 + }, + { + "Month": "Mar", + "Domestics": 31, + "Abroad": 20 + }, + { + "Month": "Apr", + "Domestics": 30, + "Abroad": 15 + }, + { + "Month": "May", + "Domestics": 37, + "Abroad": 13 + }, + { + "Month": "Jun", + "Domestics": 36, + "Abroad": 17 + }, + { + "Month": "Jul", + "Domestics": 42, + "Abroad": 22 + }, + { + "Month": "Aug", + "Domestics": 22, + "Abroad": 12 + }, + { + "Month": "Sep", + "Domestics": 17, + "Abroad": 30 + }, + { + "Month": "Oct", + "Domestics": 40, + "Abroad": 33 + }, + { + "Month": "Nov", + "Domestics": 42, + "Abroad": 22 + }, + { + "Month": "Dec", + "Domestics": 32, + "Abroad": 11 } - ] + ], + "xAxis": { + "data": "Month" + }, + "yAxis": { + "name": "Percentage(%)" + } } - ] + } } }, { "name": { - "zh_CN": "弹出编辑" + "zh_CN": "柱状图" }, - "icon": "popeditor", + "icon": "histogram", "screenshot": "", - "snippetName": "TinyPopeditor", + "snippetName": "TinyHuichartsHistogram", "schema": { - "componentName": "TinyPopeditor", + "componentName": "TinyHuichartsHistogram", "props": { - "modelValue": "", - "placeholder": "请选择", - "grid-op": { - "columns": [ + "options": { + "theme": "hdesign-light", + "padding": [50, 30, 50, 20], + "data": [ { - "field": "id", - "title": "ID", - "width": 40 + "Month": "Jan", + "Domestic": 33, + "Abroad": 1 }, { - "field": "name", - "title": "名称", - "showOverflow": "tooltip" + "Month": "Feb", + "Domestic": 27, + "Abroad": 39 }, { - "field": "province", - "title": "省份", - "width": 80 + "Month": "Mar", + "Domestic": 31, + "Abroad": 20 }, { - "field": "city", - "title": "城市", - "width": 80 + "Month": "Apr", + "Domestic": 30, + "Abroad": 15 + }, + { + "Month": "May", + "Domestic": 37, + "Abroad": 1 + }, + { + "Month": "Jun", + "Domestic": 36, + "Abroad": 17 + }, + { + "Month": "Jul", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Aug", + "Domestic": 22, + "Abroad": 12 + }, + { + "Month": "Sep", + "Domestic": 17, + "Abroad": 30 + }, + { + "Month": "Oct", + "Domestic": 40, + "Abroad": 33 + }, + { + "Month": "Nov", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Dec", + "Domestic": 32, + "Abroad": 1 } ], + "xAxis": { + "data": "Month" + }, + "yAxis": { + "name": "Percentage(%)" + } + } + } + } + }, + { + "name": { + "zh_CN": "条形图" + }, + "icon": "bar", + "screenshot": "", + "snippetName": "TinyHuichartsBar", + "schema": { + "componentName": "TinyHuichartsBar", + "props": { + "options": { + "theme": "hdesign-light", + "padding": [50, 30, 50, 20], "data": [ { - "id": "1", - "name": "GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司GFD科技有限公司", - "city": "福州", - "province": "福建" + "Month": "Jan", + "Domestic": 33, + "Abroad": 1 }, { - "id": "2", - "name": "WWW科技有限公司", - "city": "深圳", - "province": "广东" + "Month": "Feb", + "Domestic": 27, + "Abroad": 39 }, { - "id": "3", - "name": "RFV有限责任公司", - "city": "中山", - "province": "广东" + "Month": "Mar", + "Domestic": 31, + "Abroad": 20 }, { - "id": "4", - "name": "TGB科技有限公司", - "city": "龙岩", - "province": "福建" + "Month": "Apr", + "Domestic": 30, + "Abroad": 15 }, { - "id": "5", - "name": "YHN科技有限公司", - "city": "韶关", - "province": "广东" + "Month": "May", + "Domestic": 37, + "Abroad": 1 + }, + { + "Month": "Jun", + "Domestic": 36, + "Abroad": 17 + }, + { + "Month": "Jul", + "Domestic": 42, + "Abroad": 22 + }, + { + "Month": "Aug", + "Domestic": 22, + "Abroad": 12 + }, + { + "Month": "Sep", + "Domestic": 17, + "Abroad": 30 + }, + { + "Month": "Oct", + "Domestic": 40, + "Abroad": 33 + }, + { + "Month": "Nov", + "Domestic": 42, + "Abroad": 22 }, { - "id": "6", - "name": "WSX科技有限公司", - "city": "黄冈", - "province": "武汉" + "Month": "Dec", + "Domestic": 32, + "Abroad": 1 } - ] + ], + "xAxis": { + "data": "Month" + }, + "yAxis": { + "name": "Percentage(%)" + }, + "direction": "horizontal" } } } }, { "name": { - "zh_CN": "树" + "zh_CN": "圆盘图" }, - "icon": "tree", + "icon": "pie", "screenshot": "", - "snippetName": "TinyTree", + "snippetName": "TinyHuichartsPie", "schema": { - "componentName": "TinyTree", + "componentName": "TinyHuichartsPie", "props": { - "data": [ - { - "label": "一级 1", - "children": [ - { - "label": "二级 1-1", - "children": [ - { - "label": "三级 1-1-1" - } - ] - } - ] - }, - { - "label": "一级 2", - "children": [ - { - "label": "二级 2-1", - "children": [ - { - "label": "三级 2-1-1" - } - ] + "options": { + "type": "pie", + "theme": "hdesign-light", + "label": { + "show": true, + "line": true, + "labelHtml": "{a|}{b|{b}:}{c|{d}%}", + "rich": { + "a": { + "width": 12, + "height": 12, + "backgroundColor": { + "image": "./image/charts/pie/ic_jiantou_hong.svg" + } }, - { - "label": "二级 2-2", - "children": [ - { - "label": "三级 2-2-1" - } - ] + "b": { + "padding": [2, 4, 0, 0] + }, + "c": { + "fontWeight": "bold", + "padding": [2, 0, 0, 0] } - ] - } - ] - } - } - }, - { - "name": { - "zh_CN": "文字提示框" - }, - "icon": "tooltip", - "screenshot": "", - "snippetName": "TinyTooltip", - "schema": { - "componentName": "TinyTooltip", - "props": { - "content": "Top Left 提示文字", - "placement": "top-start", - "manual": true, - "modelValue": true - }, - "children": [ - { - "componentName": "span", - "children": [ - { - "componentName": "div", - "props": {} } - ] - }, - { - "componentName": "Template", - "props": { - "slot": "content" }, - "children": [ + "data": [ { - "componentName": "span", - "children": [ - { - "componentName": "div", - "props": { - "placeholder": "提示内容" - } - } - ] + "value": 100, + "name": "VPC" + }, + { + "value": 90, + "name": "IM" + }, + { + "value": 49, + "name": "EIP" + }, + { + "value": 14, + "name": "SG" } ] } - ] + } } }, { "name": { - "zh_CN": "提示框" + "zh_CN": "环形图" }, - "icon": "popover", + "icon": "ring", "screenshot": "", - "snippetName": "TinyPopover", + "snippetName": "TinyHuichartsRing", "schema": { - "componentName": "TinyPopover", + "componentName": "TinyHuichartsRing", "props": { - "width": 200, - "title": "弹框标题", - "trigger": "manual", - "modelValue": true - }, - "children": [ - { - "componentName": "Template", - "props": { - "slot": "reference" - }, - "children": [ + "options": { + "theme": "hdesign-light", + "type": "circle", + "data": [ { - "componentName": "div", - "props": { - "placeholder": "触发源" - } - } - ] - }, - { - "componentName": "Template", - "props": { - "slot": "default" - }, - "children": [ + "value": 100, + "name": "VPC" + }, { - "componentName": "div", - "props": { - "placeholder": "提示内容" - } + "value": 90, + "name": "IM" + }, + { + "value": 49, + "name": "EIP" + }, + { + "value": 14, + "name": "SG" } ] } - ] + } } - } - ] - }, - { - "group": "navigation", - "label": { - "zh_CN": "导航类型" - }, - "children": [ + }, { "name": { - "zh_CN": "时间线" + "zh_CN": "雷达图" }, - "icon": "timeline", + "icon": "radar", "screenshot": "", - "snippetName": "TinyTimeLine", + "snippetName": "TinyHuichartsRadar", "schema": { - "componentName": "TinyTimeLine", + "componentName": "TinyHuichartsRadar", "props": { - "active": "2", - "data": [ - { - "name": "已下单" - }, - { - "name": "运输中" - }, - { - "name": "已签收" + "options": { + "theme": "hdesign-light", + "legend": { + "show": true, + "position": { + "left": "center", + "bottom": 20.1 + } + }, + "radarMax": 100, + "data": { + "Domestic": { + "Equipment": 41, + "VM": 91, + "CSP": 81, + "RD": 51, + "Markets": 71 + }, + "Abroad": { + "Equipment": 72, + "VM": 55, + "CSP": 93, + "RD": 90, + "Markets": 82 + } } - ] + } } } }, { "name": { - "zh_CN": "面包屑" + "zh_CN": "瀑布图" }, - "icon": "breadcrumb", + "icon": "waterfall", "screenshot": "", - "snippetName": "TinyBreadcrumb", + "snippetName": "TinyHuichartsWaterfall", "schema": { - "componentName": "TinyBreadcrumb", + "componentName": "TinyHuichartsWaterfall", "props": { - "options": [ - { - "to": "{ path: '/' }", - "label": "首页" + "options": { + "padding": [50, 30, 20, 20], + "legend": { + "show": false }, - { - "to": "{ path: '/breadcrumb' }", - "label": "产品" + "type": "water-fall", + "data": [ + { + "Name": "NLE", + "User": 10 + }, + { + "Name": "HIN", + "User": 20 + }, + { + "Name": "FBP", + "User": 9 + }, + { + "Name": "VEDIO", + "User": 35 + }, + { + "Name": "SASS", + "User": 20 + }, + { + "Name": "RDS", + "User": 35 + }, + { + "Name": "E-SYS", + "User": 9 + } + ], + "xAxis": { + "data": "Name" }, - { - "replace": "true", - "label": "软件" + "yAxis": { + "name": "Number" } - ] + } } } }, { "name": { - "zh_CN": "标签页" + "zh_CN": "漏斗图" }, - "icon": "tabs", + "icon": "funnel", "screenshot": "", - "group": true, - "snippetName": "TinyTabs", + "snippetName": "TinyHuichartsFunnel", "schema": { - "componentName": "TinyTabs", + "componentName": "TinyHuichartsFunnel", "props": { - "modelValue": "first" - }, - "children": [ - { - "componentName": "TinyTabItem", - "props": { - "title": "标签页1", - "name": "first" - }, - "children": [ + "options": { + "data": [ { - "componentName": "div", - "props": { - "style": "margin:10px 0 0 30px" - } - } - ] - }, - { - "componentName": "TinyTabItem", - "props": { - "title": "标签页2", - "name": "second" - }, - "children": [ + "value": 100, + "name": "Show" + }, { - "componentName": "div", - "props": { - "style": "margin:10px 0 0 30px" - } + "value": 75, + "name": "Click" + }, + { + "value": 50, + "name": "Visit" + }, + { + "value": 25, + "name": "Order" } ] } - ] + } + } + }, + { + "name": { + "zh_CN": "散点图" + }, + "icon": "scatter", + "screenshot": "", + "snippetName": "TinyHuichartsScatter", + "schema": { + "componentName": "TinyHuichartsScatter", + "props": { + "options": { + "padding": [50, 30, 50, 20], + "legend": { + "orient": "horizontal", + "show": true, + "position": { + "left": "center", + "bottom": 15 + } + }, + "bubbleSize": [20, 100], + "xAxisType": "value", + "data": { + "1990": [ + [28604, 77, 1709866, "Australia", 1990], + [31163, 77.4, 27662440, "Canada", 1990], + [60001, 68, 1154605773, "China", 1990], + [13670, 74.7, 10582082, "Cuba", 1990], + [28599, 75, 4986705, "Finland", 1990] + ], + "2000": [ + [19349, 69.6, 147568552, "Russia", 2000], + [10670, 67.3, 53994606, "Turkey", 2000], + [26424, 75.7, 57110117, "United Kingdom", 2000], + [37062, 75.4, 252847810, "United States", 2000], + [23038, 73.13, 143456918, "Russia", 2000] + ], + "2015": [ + [44056, 81.8, 23968976, "Australia", 2015], + [43294, 81.7, 35939927, "Canada", 2015], + [13334, 76.9, 1376048943, "Cuba", 2015], + [21291, 78.5, 11389566, "Finland", 2015], + [38923, 80.8, 5503457, "France", 2015] + ] + } + } + } } } ] @@ -14918,6 +22670,13 @@ } ], "packages": [ + { + "name": "TinyVueHuicharts组件库", + "package": "@opentiny/vue-huicharts", + "version": "3.22.0", + "destructuring": true, + "script": "https://registry.npmmirror.com/@opentiny/vue-runtime/3.22/files/dist3/tiny-vue-huicharts.mjs" + }, { "name": "TinyVue组件库", "package": "@opentiny/vue", diff --git a/packages/engine-cli/template/designer/registry.js b/packages/engine-cli/template/designer/registry.js index 23d7d0c824..af0a653289 100644 --- a/packages/engine-cli/template/designer/registry.js +++ b/packages/engine-cli/template/designer/registry.js @@ -13,6 +13,9 @@ import { META_SERVICE, META_APP } from '@opentiny/tiny-engine-meta-register' import engineConfig from './engine.config' import { HttpService } from './src/composable' +const baseURL = import.meta.env.BASE_URL || '.' +const baseURLWithoutSlash = baseURL.replace(/\/$/, '') + export default { [META_SERVICE.Http]: HttpService, 'engine.config': { @@ -43,5 +46,12 @@ export default { } } } + }, + [META_APP.Preview]: { + options: { + // 配置预览跳转的 url:根据实际业务需求进行配置 + // 文档:https://opentiny.design/tiny-engine#/help-center/course/dev/preview-api + previewUrl: ['prod', 'alpha'].includes(import.meta.env.MODE) ? `${baseURLWithoutSlash}/preview.html` : '' + } } } diff --git a/packages/engine-cli/template/designer/src/composable/http/index.js b/packages/engine-cli/template/designer/src/composable/http/index.js index f11538395a..141c885c7b 100644 --- a/packages/engine-cli/template/designer/src/composable/http/index.js +++ b/packages/engine-cli/template/designer/src/composable/http/index.js @@ -16,6 +16,7 @@ const procession = { let loginVM = null const showError = (url, message) => { + if (message === 'canceled') return // 取消请求场景不报错 globalNotify({ type: 'error', title: '接口报错', @@ -46,7 +47,7 @@ const preResponse = (res) => { return Promise.reject(res.data.error) } - return res.data?.data + return res.data?.data || res.data } const openLogin = () => { diff --git a/packages/engine-cli/template/designer/src/preview.js b/packages/engine-cli/template/designer/src/preview.js index 47c726cc88..c35f036f65 100644 --- a/packages/engine-cli/template/designer/src/preview.js +++ b/packages/engine-cli/template/designer/src/preview.js @@ -10,6 +10,7 @@ * */ import { defineEntry } from '@opentiny/tiny-engine-meta-register' +import engineConfig from '../engine.config' import 'virtual:svg-icons-register' async function startApp() { @@ -23,9 +24,7 @@ async function startApp() { const registry = { [META_SERVICE.Http]: HttpService, 'engine.config': { - id: 'engine.config', - theme: 'light', - material: ['/mock/bundle.json'] + ...engineConfig } } diff --git a/packages/i18n/package.json b/packages/i18n/package.json index 9e35c766ba..44c4637b0b 100644 --- a/packages/i18n/package.json +++ b/packages/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-i18n-host", - "version": "2.7.0", + "version": "2.9.0", "publishConfig": { "access": "public" }, @@ -15,6 +15,7 @@ "type": "module", "main": "dist/lowcode-design-i18n-host.umd.js", "module": "dist/lowcode-design-i18n-host.es.js", + "types": "dist/lowcode-design-i18n-host.d.ts", "repository": { "type": "git", "url": "https://github.com/opentiny/tiny-engine", @@ -28,7 +29,8 @@ "homepage": "https://opentiny.design/tiny-engine", "devDependencies": { "@vitejs/plugin-vue": "^5.1.2", - "vite": "^5.4.2" + "vite": "^5.4.2", + "vite-plugin-dts": "^4.5.4" }, "peerDependencies": { "vue": "^3.4.15", diff --git a/packages/i18n/tsconfig.json b/packages/i18n/tsconfig.json new file mode 100644 index 0000000000..d2e0afe6ff --- /dev/null +++ b/packages/i18n/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../tsconfig.base.json", + "include": ["./src/**/*.ts", "./src/**/*.tsx", "./src/**/*.vue"], + "exclude": ["./src/test"] +} diff --git a/packages/i18n/vite.config.ts b/packages/i18n/vite.config.ts index 04ebb813d3..1acdc12608 100644 --- a/packages/i18n/vite.config.ts +++ b/packages/i18n/vite.config.ts @@ -12,9 +12,14 @@ import vue from '@vitejs/plugin-vue' import path from 'path' +import dts from 'vite-plugin-dts' export default { plugins: [ + dts({ + tsconfigPath: path.resolve(__dirname, './tsconfig.json'), + rollupTypes: true + }), vue({ template: { compilerOptions: { diff --git a/packages/layout/index.ts b/packages/layout/index.ts index 448649a7f2..cf2dda4b8f 100644 --- a/packages/layout/index.ts +++ b/packages/layout/index.ts @@ -4,6 +4,7 @@ import { LayoutService } from './src/composable' import designSmbConfig from '@opentiny/vue-design-smb' import { ConfigProvider as TinyConfigProvider } from '@opentiny/vue' import './src/styles/vars.less' +import mcp from './src/mcp' export default { ...metaData, @@ -12,9 +13,11 @@ export default { configProvider: TinyConfigProvider, configProviderDesign: designSmbConfig, isShowLine: true, - isShowCollapse: true + isShowCollapse: true, + isShowWorkspace: true }, - metas: [LayoutService] + metas: [LayoutService], + mcp } export { LayoutService } diff --git a/packages/layout/package.json b/packages/layout/package.json index 3e9d904693..2aca7f86fe 100644 --- a/packages/layout/package.json +++ b/packages/layout/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/tiny-engine-layout", - "version": "2.7.0", + "version": "2.9.0", "scripts": { "build": "vite build" }, @@ -27,7 +27,8 @@ "@opentiny/tiny-engine-meta-register": "workspace:*", "@opentiny/tiny-engine-utils": "workspace:*", "@vueuse/core": "^9.6.0", - "vue-draggable-next": "2.2.1" + "vue-draggable-next": "2.2.1", + "zod": "^3.25.76" }, "devDependencies": { "@opentiny/tiny-engine-vite-plugin-meta-comments": "workspace:*", diff --git a/packages/layout/src/DesignPlugins.vue b/packages/layout/src/DesignPlugins.vue index 763a0ca348..f79a3dcd97 100644 --- a/packages/layout/src/DesignPlugins.vue +++ b/packages/layout/src/DesignPlugins.vue @@ -106,6 +106,7 @@ + + diff --git a/packages/layout/src/Main.vue b/packages/layout/src/Main.vue index 90905caa80..c4f07bee7d 100644 --- a/packages/layout/src/Main.vue +++ b/packages/layout/src/Main.vue @@ -1,7 +1,18 @@