Skip to content

Commit

Permalink
Merge pull request #30 from xinnian999/v4.4
Browse files Browse the repository at this point in the history
V4.4
  • Loading branch information
xinnian999 authored Nov 5, 2024
2 parents f59ac27 + 41722a8 commit 804978b
Show file tree
Hide file tree
Showing 272 changed files with 5,071 additions and 3,304 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
14 changes: 7 additions & 7 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ export default defineConfig({
description: '基于vue3的一个开箱即用低代码表单方案',
base: '/vue-form-craft/',
vite: {
resolve: {
alias: {
'@vue-form-craft': fileURLToPath(new URL('../../src/', import.meta.url)),
'vue-form-craft': fileURLToPath(new URL('../../src/release', import.meta.url))
}
},
// resolve: {
// alias: {
// '@vue-form-craft': fileURLToPath(new URL('../../src/', import.meta.url)),
// 'vue-form-craft': fileURLToPath(new URL('../../src/release', import.meta.url))
// }
// },
server: {
port: 9999,
// host:'172.20.72.37'
Expand All @@ -26,7 +26,7 @@ export default defineConfig({
head: [['link', { rel: 'icon', href: '/vue-form-craft/favicon.svg' }]],
markdown: {
config: (md) => {
md.use(mdVueDemoPlugin)
md.use(mdVueDemoPlugin,{root:'./'})
}
},
themeConfig: {
Expand Down
15 changes: 6 additions & 9 deletions docs/.vitepress/theme/extendElements/Transfer/attrSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export default {
}
},



{
component: 'Divider',
props: {
Expand All @@ -65,22 +63,21 @@ export default {
props: {
placeholder: '请输入...'
},
designKey: 'form-LnGh'
designKey: 'form-LnGh',
initialValue: '{{ "选项" + ($index + 1) }}'
},
{
label: '选项值',
name: 'key',
component: 'Input',
props: {},
designKey: 'form-HYtW'
designKey: 'form-HYtW',
initialValue: '{{ "value" + ($index + 1) }}'
}
],
designKey: 'form-Iwpd',
props: {
mode: 'table',
newItemDefaults:
'{{ (index) => ({ label: `选项${index + 1}`, key: `value${index + 1}` }) }}'
mode: 'table'
}
},
}
]
} satisfies FormSchema
7 changes: 7 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @vue-form-craft/docs

## 4.4.0

### Minor Changes

- feat pnpm workspace
19 changes: 19 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@vue-form-craft/docs",
"version": "4.4.0",
"private": false,
"type": "module",
"scripts": {
"dev": "vitepress",
"build": "vitepress build",
"preview": "vitepress preview"
},
"devDependencies": {
"vitepress-vue-demo": "^1.0.10",
"@arco-design/web-vue": "^2.56.2",
"axios": "^1.6.2",
"vitepress": "^1.2.3",
"postcss": "^8.4.47",
"md-editor-v3": "^4.20.1"
}
}
10 changes: 5 additions & 5 deletions docs/zh/extendTransfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,21 @@ export default {
props: {
placeholder: '请输入...'
},
designKey: 'form-LnGh'
designKey: 'form-LnGh',
initialValue: '{{ "选项" + ($index + 1) }}'
},
{
label: '选项值',
name: 'key',
component: 'Input',
props: {},
designKey: 'form-HYtW'
designKey: 'form-HYtW',
initialValue: '{{ "value" + ($index + 1) }}'
}
],
designKey: 'form-Iwpd',
props: {
mode: 'table',
newItemDefaults:
'{{ (index) => ({ label: `选项${index + 1}`, key: `value${index + 1}` }) }}'
mode: 'table'
}
},
]
Expand Down
5 changes: 0 additions & 5 deletions docs/zh/form-render-doc.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
<script setup>
import FormRender from '../demo/FormRender.vue'

</script>

# FormRender 表单渲染器

## 简介
Expand Down
67 changes: 22 additions & 45 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,47 @@
{
"name": "vue-form-craft",
"version": "4.3.2",
"private": false,
"private": true,
"type": "module",
"scripts": {
"dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"preview": "vitepress preview docs",
"build": "vite build",
"release": "pnpm build && npm version patch && npm publish"
"dev": "pnpm -C play dev",
"build": "pnpm -C packages/vue-form-craft build",
"release": "pnpm -C packages/vue-form-craft release",
"docs:dev": "pnpm -C docs dev",
"docs:build": "pnpm -C docs build",
"docs:preview": "pnpm -C docs preview"
},
"dependencies": {
"element-plus": "^2.8.3",
"json-editor-vue3": "^1.0.9",
"lodash": "^4.17.21",
"vue": "^3.5.8",
"vuedraggable-es": "^4.1.1"
"vue": "^3.5.8"
},
"devDependencies": {
"@arco-design/web-vue": "^2.56.2",
"@originjs/vite-plugin-commonjs": "^1.0.3",
"@changesets/cli": "^2.27.9",
"@rushstack/eslint-patch": "^1.3.3",
"@tsconfig/node20": "^20.1.2",
"@types/lodash": "^4.14.202",
"@types/node": "^20.10.5",
"@vitejs/plugin-vue": "^4.5.2",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue-form-craft/components": "workspace:*",
"@vue-form-craft/config": "workspace:*",
"@vue-form-craft/elements": "workspace:*",
"@vue-form-craft/entry": "workspace:*",
"@vue-form-craft/form-design": "workspace:*",
"@vue-form-craft/form-render": "workspace:*",
"@vue-form-craft/hooks": "workspace:*",
"@vue-form-craft/icons": "workspace:*",
"@vue-form-craft/styles": "workspace:*",
"@vue-form-craft/types": "workspace:*",
"@vue-form-craft/utils": "workspace:*",
"@vue/eslint-config-prettier": "^8.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/shared": "^3.4.38",
"@vue/tsconfig": "^0.5.1",
"axios": "^1.6.2",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"md-editor-v3": "^4.20.1",
"npm-run-all2": "^6.1.1",
"postcss": "^8.4.47",
"prettier": "^3.0.3",
"sass": "~1.32.6",
"shiki": "^1.21.0",
"typescript": "~5.3.0",
"vite": "^5.0.10",
"vite-plugin-dts": "^3.7.3",
"vite-plugin-libcss": "^1.1.1",
"vitepress": "^1.2.3",
"vitepress-vue-demo": "^1.0.8",
"vue-tsc": "^1.8.27"
},
"files": [
"dist",
"global.d.ts"
],
"main": "./dist/vue-form-craft.umd.cjs",
"module": "./dist/vue-form-craft.js",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/vue-form-craft.js",
"require": "./dist/vue-form-craft.umd.cjs",
"types": "./dist/index.d.ts"
}
},
"keywords": [
"component",
"vue",
"form",
"element-ui"
]
"vue-form-craft": "^4.4.1"
}
}
7 changes: 7 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @vue-form-craft/components

## 4.4.0

### Minor Changes

- feat pnpm workspace
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div class="vfc-codeHighLight">
<div class="vfc-codeHighLight-copy" @click="handleCopy">
<icon-render name="copy" />
<Icon name="copy" />
</div>
<div class="vfc-codeHighLight-content" v-html="html" />
</div>
</template>

<script setup lang="ts">
import { IconRender } from '@vue-form-craft/components'
import Icon from '@vue-form-craft/icons'
import { ElMessage } from 'element-plus'
import { onMounted, ref } from 'vue'
import { createHighlighterCore } from 'shiki/core'
Expand All @@ -30,12 +30,22 @@ const props = withDefaults(
)
const handleCopy = async () => {
try {
await navigator.clipboard.writeText(props.code)
// 创建一个隐藏的 textarea 元素
const textarea = document.createElement('textarea');
textarea.value = props.code;
document.body.appendChild(textarea);
// 选择文本
textarea.select();
textarea.setSelectionRange(0, 99999); // 对于移动设备的支持
// 执行复制
document.execCommand('copy');
// 移除 textarea 元素
document.body.removeChild(textarea);
ElMessage.success('已成功复制到剪贴板')
} catch (error) {
ElMessage.error('复制文本到剪贴板时出错')
}
}
const html = ref('')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</template>

<script setup lang="ts">
import { CanvasWrapper } from '@vue-form-craft/components'
import type { FormItemType } from '@vue-form-craft/release';
import { CanvasWrapper } from '@vue-form-craft/form-design'
import type { FormItemType } from '@vue-form-craft/types';
defineProps<{
name: string,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<div :style="formInstance.schema.labelBold && 'font-weight: bold'">{{ label }}</div>
<div :class="ns('form-item-label-ico')" v-if="help">
<el-tooltip effect="dark" :content="help">
<div><icon-render name="help" /></div>
<div><Icon name="help" /></div>
</el-tooltip>
</div>
<div :class="ns('form-item-label-suffix')" v-if="formInstance.schema.labelSuffix">
Expand Down Expand Up @@ -64,9 +64,9 @@
<script setup lang="ts">
import { computed, onMounted, reactive } from 'vue'
import { isRegexString, getDataByPath, setDataByPath, ns } from '@vue-form-craft/utils'
import type { FormItemType } from '@vue-form-craft/config/commonType'
import { IconRender } from '@vue-form-craft/components'
import { useFormInstance } from '@vue-form-craft/release'
import type { FormItemType } from '@vue-form-craft/types'
import Icon from '@vue-form-craft/icons'
import { useFormInstance } from '@vue-form-craft/hooks'
import { useElements } from '@vue-form-craft/hooks'
const thisProps = defineProps<FormItemType>()
Expand Down
4 changes: 4 additions & 0 deletions packages/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as FormItem } from './FormItem.vue'
export { default as Disabled } from './Disabled.vue'
export { default as CodeHighLight } from './CodeHighLight.vue'
export { default as DefaultCanvasWrapper } from './DefaultCanvasWrapper.vue'
11 changes: 11 additions & 0 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@vue-form-craft/components",
"version": "4.4.0",
"description": "",
"main": "index.ts",
"author": "",
"license": "ISC",
"dependencies": {
"shiki": "^1.21.0"
}
}
7 changes: 7 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# @vue-form-craft/config

## 4.4.0

### Minor Changes

- feat pnpm workspace
4 changes: 4 additions & 0 deletions packages/config/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export * from './symbol'
export { default as locales } from './locales'
export { default as optionConfig } from './optionConfig'
export { default as template } from './template'
2 changes: 1 addition & 1 deletion src/config/locales/en.ts → packages/config/locales/en.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Locale } from '../commonType'
import type { Locale } from '@vue-form-craft/types'

export default {
menus: {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/config/locales/zh.ts → packages/config/locales/zh.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Locale } from '../commonType'
import type { Locale } from '@vue-form-craft/types'

export default {
menus: {
Expand Down
Loading

0 comments on commit 804978b

Please sign in to comment.