From 3bd77a3fa84f6c152d716a3499c6a9a5a900cc2e Mon Sep 17 00:00:00 2001 From: Cloyd Lau <31238760+cloydlau@users.noreply.github.com> Date: Mon, 8 Apr 2024 09:50:49 +0800 Subject: [PATCH] feat(FaFormDialog)!: rename event 'fullscreen-change' to 'fullscreenChange' --- .vscode/settings.json | 4 +- README.md | 23 +- demo/App.vue | 4 +- demo/RichText/globalConfig.js | 7 +- demo/RichText/langs/zh-Hans.js | 2 +- demo/RichText/plugins/InsertFile.vue | 3 +- demo/RichText/plugins/InsertWord.js | 15 +- demo/Upload/upload.js | 18 +- eslint.config.ts | 6 +- index.html | 24 +- package.json | 58 +- pnpm-lock.yaml | 3579 ++++++++++--------- scripts/dev.mts | 3 +- scripts/postinstall.mjs | 6 +- scripts/release.mts | 9 +- src/components/FormDialog/highlightError.ts | 3 +- src/components/FormDialog/index.vue | 22 +- src/components/Image/index.vue | 30 +- src/components/ImageUpload/ImageEditor.vue | 77 +- src/components/ImageUpload/index.vue | 44 +- src/components/PopButton/index.vue | 2 +- src/components/PopSwitch/index.vue | 2 +- src/components/RichText/index.ts | 3 +- src/components/Select/index.vue | 26 +- src/components/Upload/index.vue | 128 +- src/utils.ts | 42 +- 26 files changed, 2289 insertions(+), 1851 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index eae23ff..98606bf 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -38,6 +38,8 @@ "json", "jsonc", "yaml", - "toml" + "toml", + "gql", + "graphql" ] } diff --git a/README.md b/README.md index 83f4ff2..dd391aa 100644 --- a/README.md +++ b/README.md @@ -576,10 +576,10 @@ new Vue({ ### Events -| 名称 | 说明 | 回调参数 | -| ----------------- | ----------------------------- | --------------------- | -| fullscreen-change | 切换全屏状态时触发 | (fullscreen: boolean) | -| ... | `el-dialog`、`el-form` 的事件 | | +| 名称 | 说明 | 回调参数 | +| ---------------- | ----------------------------- | --------------------- | +| fullscreenChange | 切换全屏状态时触发 | (fullscreen: boolean) | +| ... | `el-dialog`、`el-form` 的事件 | | ### Slots @@ -702,7 +702,7 @@ const faImageRef = ref() const value = ref([]) const loadCount = ref(0) function onLoad() { - if (++loadCount === value.length) { + if (++loadCount.value === value.value.length) { faImageRef.value.hydrate() } } @@ -1049,7 +1049,8 @@ FaMessageBox.confirm('Are You Sure?').then(() => { }).catch((e) => { if (e.isDenied) { // onDenied - } else if (e.isDismissed) { + } + else if (e.isDismissed) { // onDismissed } }) @@ -1105,7 +1106,8 @@ FaMessageBox.confirm({ }).catch((e) => { alert('Deny Failed') }) - } else { + } + else { FaMessageBox.showValidationMessage('Please fill in the remark') return false } @@ -1115,7 +1117,8 @@ FaMessageBox.confirm({ }).catch((e) => { if (e.isDenied) { alert('Denied') - } else if (e.isDismissed) { + } + else if (e.isDismissed) { alert('Dismissed') } }) @@ -1224,6 +1227,7 @@ import FaMessageBox from 'faim/dist/components/MessageBox/index' - 可离线使用,零网络延迟 - 无[域名检测](#域名检测),无弹窗困扰 +- 使用 tinymce@6 (MIT),无许可证风险 - 插件全家桶开箱即用 - 提供常用自定义插件示例 - 插入本地图片 @@ -1366,7 +1370,8 @@ app.use(FaRichText, { }).then((res) => { if (typeof res.data?.data === 'string') { success(res.data.data) - } else { + } + else { failure(res.data?.message) } }).catch((err) => { diff --git a/demo/App.vue b/demo/App.vue index 4047b07..be926d8 100644 --- a/demo/App.vue +++ b/demo/App.vue @@ -164,7 +164,7 @@ function loading() { @input="() => { // console.log('input') }" - @update:model-value="() => { + @update:modelValue="() => { console.log('update:modelValue') }" /> @@ -580,7 +580,7 @@ function loading() {