Compare commits
3
Commits
v1.5.0
...
86da3d44d8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
86da3d44d8 | ||
|
|
71fca76412 | ||
|
|
3f4c98fbf3 |
@@ -72,8 +72,8 @@ jobs:
|
|||||||
- name: Ensure version not published
|
- name: Ensure version not published
|
||||||
if: ${{ steps.version.outputs.publish == 'true' }}
|
if: ${{ steps.version.outputs.publish == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
if npm view "timi-tdesign-mobile@${{ steps.version.outputs.version }}" version > /dev/null 2>&1; then
|
if npm view "@timi/tdesign-mobile@${{ steps.version.outputs.version }}" version > /dev/null 2>&1; then
|
||||||
echo "FAIL: timi-tdesign-mobile@${{ steps.version.outputs.version }} 已存在于 nexus,请提升 package.json 版本"
|
echo "FAIL: @timi/tdesign-mobile@${{ steps.version.outputs.version }} 已存在于 nexus,请提升 package.json 版本"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
echo "OK: 版本未占用"
|
echo "OK: 版本未占用"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# timi-tdesign-mobile
|
# @timi/tdesign-mobile
|
||||||
|
|
||||||
Vue 3 移动端通用组件库,依赖 `timi-web` 提供基础组件和编辑器能力。
|
Vue 3 移动端通用组件库,依赖 `@timi/web` 提供基础组件和编辑器能力。
|
||||||
|
|
||||||
本包不依赖 `timi-web-api`。业务项目可以只安装本包使用通用组件;需要业务接口、领域类型或用户状态时,再单独安装 `timi-web-api`。
|
本包不绑定业务 API 包。业务项目可以只安装本包使用通用组件;业务接口、领域类型和用户状态由应用层自行提供。
|
||||||
|
|
||||||
## 文章和通知组件
|
## 文章和通知组件
|
||||||
|
|
||||||
`ArticleEditor`、`ArticleView`、`NotifyEditor`、`NotifyView` 只约束对象的最小字段。`Article`、`Attachment` 和 `NotifyDetail` 支持携带业务自定义字段,不要求对象来自 `timi-web-api`。
|
`ArticleEditor`、`ArticleView`、`NotifyEditor`、`NotifyView` 只约束对象的最小字段。`Article`、`Attachment` 和 `NotifyDetail` 支持携带业务自定义字段,不要求对象来自特定 API 包。
|
||||||
|
|
||||||
上传和附件地址由业务项目通过回调注入:
|
上传和附件地址由业务项目通过回调注入:
|
||||||
|
|
||||||
|
|||||||
Vendored
+3
@@ -22,8 +22,10 @@ declare module 'vue' {
|
|||||||
BottomPopup: typeof import('./src/components/bottom-popup/index.vue')['default']
|
BottomPopup: typeof import('./src/components/bottom-popup/index.vue')['default']
|
||||||
CardContainer: typeof import('./src/components/card-container/index.vue')['default']
|
CardContainer: typeof import('./src/components/card-container/index.vue')['default']
|
||||||
CodeEditor: typeof import('./src/components/code-editor/index.vue')['default']
|
CodeEditor: typeof import('./src/components/code-editor/index.vue')['default']
|
||||||
|
DropdownFilter: typeof import('./src/components/dropdown-filter/index.vue')['default']
|
||||||
DurationPicker: typeof import('./src/components/duration-picker/index.vue')['default']
|
DurationPicker: typeof import('./src/components/duration-picker/index.vue')['default']
|
||||||
EditorSearch: typeof import('./src/components/editor-search/index.vue')['default']
|
EditorSearch: typeof import('./src/components/editor-search/index.vue')['default']
|
||||||
|
Item: typeof import('./src/components/timeline/item.vue')['default']
|
||||||
MasterDetail: typeof import('./src/components/master-detail/index.vue')['default']
|
MasterDetail: typeof import('./src/components/master-detail/index.vue')['default']
|
||||||
MasterDetailPage: typeof import('./src/components/master-detail-page/index.vue')['default']
|
MasterDetailPage: typeof import('./src/components/master-detail-page/index.vue')['default']
|
||||||
NotifyEditor: typeof import('./src/components/notify-editor/index.vue')['default']
|
NotifyEditor: typeof import('./src/components/notify-editor/index.vue')['default']
|
||||||
@@ -44,6 +46,7 @@ declare module 'vue' {
|
|||||||
TIcon: typeof import('tdesign-mobile-vue')['Icon']
|
TIcon: typeof import('tdesign-mobile-vue')['Icon']
|
||||||
TImage: typeof import('tdesign-mobile-vue')['Image']
|
TImage: typeof import('tdesign-mobile-vue')['Image']
|
||||||
TImageViewer: typeof import('tdesign-mobile-vue')['ImageViewer']
|
TImageViewer: typeof import('tdesign-mobile-vue')['ImageViewer']
|
||||||
|
Timeline: typeof import('./src/components/timeline/index.vue')['default']
|
||||||
TInput: typeof import('tdesign-mobile-vue')['Input']
|
TInput: typeof import('tdesign-mobile-vue')['Input']
|
||||||
TiptapCodeBlockButton: typeof import('./src/components/tiptap-editor/TiptapCodeBlockButton.vue')['default']
|
TiptapCodeBlockButton: typeof import('./src/components/tiptap-editor/TiptapCodeBlockButton.vue')['default']
|
||||||
TiptapEditor: typeof import('./src/components/tiptap-editor/index.vue')['default']
|
TiptapEditor: typeof import('./src/components/tiptap-editor/index.vue')['default']
|
||||||
|
|||||||
+27
-8
@@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "timi-tdesign-mobile",
|
"name": "@timi/tdesign-mobile",
|
||||||
"main": "./dist/timi-tdesign-mobile.umd.js",
|
"type": "module",
|
||||||
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"module": "./dist/timi-tdesign-mobile.mjs",
|
"module": "./dist/index.js",
|
||||||
"style": "./dist/timi-tdesign-mobile.css",
|
"style": "./dist/timi-tdesign-mobile.css",
|
||||||
|
"sideEffects": [
|
||||||
|
"**/*.css"
|
||||||
|
],
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.5.0",
|
"version": "2.1.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "pnpm run -C docs dev",
|
"dev": "pnpm run -C docs dev",
|
||||||
@@ -25,8 +29,23 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
"import": "./dist/timi-tdesign-mobile.mjs",
|
"import": "./dist/index.js"
|
||||||
"require": "./dist/timi-tdesign-mobile.umd.js"
|
},
|
||||||
|
"./components": {
|
||||||
|
"types": "./dist/components/index.d.ts",
|
||||||
|
"import": "./dist/components/index.js"
|
||||||
|
},
|
||||||
|
"./components/*": {
|
||||||
|
"types": "./dist/components/*/index.d.ts",
|
||||||
|
"import": "./dist/components/*/index.js"
|
||||||
|
},
|
||||||
|
"./directives": {
|
||||||
|
"types": "./dist/directives/index.d.ts",
|
||||||
|
"import": "./dist/directives/index.js"
|
||||||
|
},
|
||||||
|
"./utils/message": {
|
||||||
|
"types": "./dist/utils/message.d.ts",
|
||||||
|
"import": "./dist/utils/message.js"
|
||||||
},
|
},
|
||||||
"./style.css": "./dist/timi-tdesign-mobile.css",
|
"./style.css": "./dist/timi-tdesign-mobile.css",
|
||||||
"./src/*": "./src/*"
|
"./src/*": "./src/*"
|
||||||
@@ -35,8 +54,8 @@
|
|||||||
"node": ">=20.0.0"
|
"node": ">=20.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"tdesign-mobile-vue": "^1.17.1",
|
"tdesign-mobile-vue": "^1.17.2",
|
||||||
"timi-web": "^1.0.2"
|
"@timi/web": "^2.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"vue": "^3.5.0",
|
"vue": "^3.5.0",
|
||||||
|
|||||||
Generated
+61
-54
@@ -8,12 +8,12 @@ importers:
|
|||||||
|
|
||||||
.:
|
.:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@timi/web':
|
||||||
|
specifier: ^2.0.0
|
||||||
|
version: 2.0.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.26(typescript@5.8.3))
|
||||||
tdesign-mobile-vue:
|
tdesign-mobile-vue:
|
||||||
specifier: ^1.17.1
|
specifier: ^1.17.2
|
||||||
version: 1.17.1(vue@3.5.26(typescript@5.8.3))
|
version: 1.17.2(vue@3.5.26(typescript@5.8.3))
|
||||||
timi-web:
|
|
||||||
specifier: ^1.0.2
|
|
||||||
version: 1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.26(typescript@5.8.3))
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@types/node':
|
'@types/node':
|
||||||
specifier: ^22.13.5
|
specifier: ^22.13.5
|
||||||
@@ -1152,6 +1152,14 @@ packages:
|
|||||||
'@soda/get-current-script@1.0.2':
|
'@soda/get-current-script@1.0.2':
|
||||||
resolution: {integrity: sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==}
|
resolution: {integrity: sha512-T7VNNlYVM1SgQ+VsMYhnDkcGmWhQdL0bDyGm5TlQ3GBXnJscEClUUOKduWTmm2zCnvNLC1hc3JpuXjs/nFOc5w==}
|
||||||
|
|
||||||
|
'@timi/ts@1.0.0':
|
||||||
|
resolution: {integrity: sha512-0NFi1+CnonZTcf73IeDdcd5Qoqnt/EdESI448wHfdbd5mk6gRqJNzb82z03SHOCJlIOiLUPvBgctAVLbB58V1A==}
|
||||||
|
engines: {node: '>=20.0.0'}
|
||||||
|
|
||||||
|
'@timi/web@2.0.0':
|
||||||
|
resolution: {integrity: sha512-Qp/jvLpRbmPCK6jO70cHuefHdw8qw4l90GjPRFpo0ZB8CpIYmwcqHffcDS61p59z1GqsDP6BGT1kEPHDGxDsGg==}
|
||||||
|
engines: {node: '>=20.0.0'}
|
||||||
|
|
||||||
'@tiptap/core@3.33.0':
|
'@tiptap/core@3.33.0':
|
||||||
resolution: {integrity: sha512-sZjBCwK9+h0kbc/CZvkepX6RTJ2jOfeWY1aId9O3YnG0CAiOs/4DbqFmpcmv5BQAGPA6gC96gqdafa/9Dpg0tw==}
|
resolution: {integrity: sha512-sZjBCwK9+h0kbc/CZvkepX6RTJ2jOfeWY1aId9O3YnG0CAiOs/4DbqFmpcmv5BQAGPA6gC96gqdafa/9Dpg0tw==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
@@ -3271,6 +3279,7 @@ packages:
|
|||||||
image-size@0.5.5:
|
image-size@0.5.5:
|
||||||
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
|
resolution: {integrity: sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
|
deprecated: Please migrate to image-size@2.x
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
import-fresh@3.3.1:
|
import-fresh@3.3.1:
|
||||||
@@ -4675,6 +4684,9 @@ packages:
|
|||||||
sockjs@0.3.24:
|
sockjs@0.3.24:
|
||||||
resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==}
|
resolution: {integrity: sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==}
|
||||||
|
|
||||||
|
sortablejs@1.15.7:
|
||||||
|
resolution: {integrity: sha512-Kk8wLQPlS+yi1ZEf48a4+fzHa4yxjC30M/Sr2AnQu+f/MPwvvX9XjZ6OWejiz8crBsLwSq8GHqaxaET7u6ux0A==}
|
||||||
|
|
||||||
source-map-js@1.2.1:
|
source-map-js@1.2.1:
|
||||||
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==}
|
||||||
engines: {node: '>=0.10.0'}
|
engines: {node: '>=0.10.0'}
|
||||||
@@ -4822,8 +4834,8 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.0.0
|
vue: ^3.0.0
|
||||||
|
|
||||||
tdesign-mobile-vue@1.17.1:
|
tdesign-mobile-vue@1.17.2:
|
||||||
resolution: {integrity: sha512-gCmhaNCc2xhSkbITHiXnE/UGs6GHLe9LTE7T26ELOENC5Cqpa+j4KYU9wz6uqFV+Ro10RkG3DFikYHnq0gNN0A==}
|
resolution: {integrity: sha512-/MH+eNnySvMlEMwIlG0sMPOuwUuhWyOHn6HdS79ct9/+ZP+gCDzGH/usgcahZHM1l0ulY2NTlUp32opimlSZkQ==}
|
||||||
engines: {node: '>=18.0.0'}
|
engines: {node: '>=18.0.0'}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
vue: ^3.2.6
|
vue: ^3.2.6
|
||||||
@@ -4865,14 +4877,6 @@ packages:
|
|||||||
thunky@1.1.0:
|
thunky@1.1.0:
|
||||||
resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==}
|
resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==}
|
||||||
|
|
||||||
timi-ts@1.0.0:
|
|
||||||
resolution: {integrity: sha512-MR9LJGH4/UEgzzrc1yVdxypTcoQRASt8xns2z5xNyoXr2e0kdXv8sjnuRshp3uZnOCU/pSks1LeLi9OvC2U/7g==}
|
|
||||||
engines: {node: '>=20.0.0'}
|
|
||||||
|
|
||||||
timi-web@1.0.2:
|
|
||||||
resolution: {integrity: sha512-CXyWEeGTjrExnrAwstdWPc3qK5Lfyp7ipD8p7+WYcm4mcnJOS48k6SkVnrAIADAImeJAr/1e5JEV8wk+8AcvxQ==}
|
|
||||||
engines: {node: '>=20.0.0'}
|
|
||||||
|
|
||||||
tinycolor2@1.6.0:
|
tinycolor2@1.6.0:
|
||||||
resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==}
|
resolution: {integrity: sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==}
|
||||||
|
|
||||||
@@ -6556,6 +6560,44 @@ snapshots:
|
|||||||
|
|
||||||
'@soda/get-current-script@1.0.2': {}
|
'@soda/get-current-script@1.0.2': {}
|
||||||
|
|
||||||
|
'@timi/ts@1.0.0': {}
|
||||||
|
|
||||||
|
'@timi/web@2.0.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.26(typescript@5.8.3))':
|
||||||
|
dependencies:
|
||||||
|
'@marsio/vue-split-pane': 1.0.0(typescript@5.8.3)
|
||||||
|
'@timi/ts': 1.0.0
|
||||||
|
'@tiptap/extension-code-block': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
||||||
|
'@tiptap/extension-color': 3.33.0(@tiptap/extension-text-style@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0)))
|
||||||
|
'@tiptap/extension-image': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-link': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
||||||
|
'@tiptap/extension-placeholder': 3.33.0(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-subscript': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
||||||
|
'@tiptap/extension-superscript': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
||||||
|
'@tiptap/extension-table': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
||||||
|
'@tiptap/extension-table-cell': 3.33.0(@tiptap/extension-table@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-table-header': 3.33.0(@tiptap/extension-table@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-table-row': 3.33.0(@tiptap/extension-table@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-text-align': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-text-style': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/extension-underline': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
||||||
|
'@tiptap/pm': 3.33.0
|
||||||
|
'@tiptap/starter-kit': 3.33.0
|
||||||
|
'@tiptap/vue-3': 3.33.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)(vue@3.5.26(typescript@5.8.3))
|
||||||
|
less: 4.5.1
|
||||||
|
marked: 17.0.6
|
||||||
|
marked-gfm-heading-id: 4.1.4(marked@17.0.6)
|
||||||
|
marked-highlight: 2.2.4(marked@17.0.6)
|
||||||
|
marked-mangle: 1.1.14(marked@17.0.6)
|
||||||
|
prismjs: 1.30.0
|
||||||
|
terser: 5.46.0
|
||||||
|
transitivePeerDependencies:
|
||||||
|
- '@floating-ui/dom'
|
||||||
|
- '@tiptap/core'
|
||||||
|
- '@tiptap/extensions'
|
||||||
|
- supports-color
|
||||||
|
- typescript
|
||||||
|
- vue
|
||||||
|
|
||||||
'@tiptap/core@3.33.0(@tiptap/pm@3.33.0)':
|
'@tiptap/core@3.33.0(@tiptap/pm@3.33.0)':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@tiptap/pm': 3.33.0
|
'@tiptap/pm': 3.33.0
|
||||||
@@ -10443,6 +10485,8 @@ snapshots:
|
|||||||
uuid: 8.3.2
|
uuid: 8.3.2
|
||||||
websocket-driver: 0.7.4
|
websocket-driver: 0.7.4
|
||||||
|
|
||||||
|
sortablejs@1.15.7: {}
|
||||||
|
|
||||||
source-map-js@1.2.1: {}
|
source-map-js@1.2.1: {}
|
||||||
|
|
||||||
source-map-support@0.5.21:
|
source-map-support@0.5.21:
|
||||||
@@ -10590,13 +10634,14 @@ snapshots:
|
|||||||
'@babel/runtime': 7.26.9
|
'@babel/runtime': 7.26.9
|
||||||
vue: 3.5.26(typescript@5.8.3)
|
vue: 3.5.26(typescript@5.8.3)
|
||||||
|
|
||||||
tdesign-mobile-vue@1.17.1(vue@3.5.26(typescript@5.8.3)):
|
tdesign-mobile-vue@1.17.2(vue@3.5.26(typescript@5.8.3)):
|
||||||
dependencies:
|
dependencies:
|
||||||
'@babel/runtime': 7.26.9
|
'@babel/runtime': 7.26.9
|
||||||
'@use-gesture/vanilla': 10.3.1
|
'@use-gesture/vanilla': 10.3.1
|
||||||
'@vueuse/core': 10.7.0(vue@3.5.26(typescript@5.8.3))
|
'@vueuse/core': 10.7.0(vue@3.5.26(typescript@5.8.3))
|
||||||
dayjs: 1.11.13
|
dayjs: 1.11.13
|
||||||
lodash-es: 4.17.21
|
lodash-es: 4.17.21
|
||||||
|
sortablejs: 1.15.7
|
||||||
tdesign-icons-vue-next: 0.4.11(vue@3.5.26(typescript@5.8.3))
|
tdesign-icons-vue-next: 0.4.11(vue@3.5.26(typescript@5.8.3))
|
||||||
tinycolor2: 1.6.0
|
tinycolor2: 1.6.0
|
||||||
validator: 13.12.0
|
validator: 13.12.0
|
||||||
@@ -10639,44 +10684,6 @@ snapshots:
|
|||||||
|
|
||||||
thunky@1.1.0: {}
|
thunky@1.1.0: {}
|
||||||
|
|
||||||
timi-ts@1.0.0: {}
|
|
||||||
|
|
||||||
timi-web@1.0.2(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))(typescript@5.8.3)(vue@3.5.26(typescript@5.8.3)):
|
|
||||||
dependencies:
|
|
||||||
'@marsio/vue-split-pane': 1.0.0(typescript@5.8.3)
|
|
||||||
'@tiptap/extension-code-block': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
|
||||||
'@tiptap/extension-color': 3.33.0(@tiptap/extension-text-style@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0)))
|
|
||||||
'@tiptap/extension-image': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-link': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
|
||||||
'@tiptap/extension-placeholder': 3.33.0(@tiptap/extensions@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-subscript': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
|
||||||
'@tiptap/extension-superscript': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
|
||||||
'@tiptap/extension-table': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)
|
|
||||||
'@tiptap/extension-table-cell': 3.33.0(@tiptap/extension-table@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-table-header': 3.33.0(@tiptap/extension-table@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-table-row': 3.33.0(@tiptap/extension-table@3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-text-align': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-text-style': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/extension-underline': 3.33.0(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))
|
|
||||||
'@tiptap/pm': 3.33.0
|
|
||||||
'@tiptap/starter-kit': 3.33.0
|
|
||||||
'@tiptap/vue-3': 3.33.0(@floating-ui/dom@1.8.0)(@tiptap/core@3.33.0(@tiptap/pm@3.33.0))(@tiptap/pm@3.33.0)(vue@3.5.26(typescript@5.8.3))
|
|
||||||
less: 4.5.1
|
|
||||||
marked: 17.0.6
|
|
||||||
marked-gfm-heading-id: 4.1.4(marked@17.0.6)
|
|
||||||
marked-highlight: 2.2.4(marked@17.0.6)
|
|
||||||
marked-mangle: 1.1.14(marked@17.0.6)
|
|
||||||
prismjs: 1.30.0
|
|
||||||
terser: 5.46.0
|
|
||||||
timi-ts: 1.0.0
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- '@floating-ui/dom'
|
|
||||||
- '@tiptap/core'
|
|
||||||
- '@tiptap/extensions'
|
|
||||||
- supports-color
|
|
||||||
- typescript
|
|
||||||
- vue
|
|
||||||
|
|
||||||
tinycolor2@1.6.0: {}
|
tinycolor2@1.6.0: {}
|
||||||
|
|
||||||
tinyglobby@0.2.12:
|
tinyglobby@0.2.12:
|
||||||
|
|||||||
@@ -13,14 +13,35 @@
|
|||||||
</slot>
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
<t-form class="form glass-white" @submit="submitMessage">
|
<t-form class="form glass-white" @submit="submitMessage">
|
||||||
<t-textarea
|
<div class="input-wrap">
|
||||||
v-model="draft"
|
<t-textarea
|
||||||
class="input"
|
ref="textareaRef"
|
||||||
:autosize="{ minRows: 3, maxRows: 6 }"
|
v-model="draft"
|
||||||
:disabled="props.isGenerating || props.disabled"
|
class="input"
|
||||||
:maxlength="props.maxLength"
|
:autosize="{ minRows: 3, maxRows: 6 }"
|
||||||
:placeholder="props.placeholder"
|
:disabled="props.isGenerating || props.disabled"
|
||||||
/>
|
:maxlength="props.maxLength"
|
||||||
|
:placeholder="props.placeholder"
|
||||||
|
@focus="inputFocused = true"
|
||||||
|
@blur="inputFocused = false"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
v-if="voiceHitVisible"
|
||||||
|
class="voice-hit"
|
||||||
|
@pointerdown="handleVoicePointerDown"
|
||||||
|
@pointermove="handleVoicePointerMove"
|
||||||
|
@pointerup="handleVoicePointerUp"
|
||||||
|
@pointercancel="handleVoicePointerCancel"
|
||||||
|
@contextmenu.prevent
|
||||||
|
/>
|
||||||
|
<div v-if="voicePanelVisible" class="voice-panel" :class="{ cancel: willCancel }">
|
||||||
|
<div class="voice-wave" aria-hidden="true">
|
||||||
|
<span v-for="index in 5" :key="index" :style="`--i: ${index}`" />
|
||||||
|
</div>
|
||||||
|
<p class="voice-text" v-text="voicePanelText" />
|
||||||
|
<p class="voice-hint" v-text="willCancel ? props.voiceCancelHint : props.voiceSendHint" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<t-button
|
<t-button
|
||||||
@@ -89,6 +110,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { computed, onBeforeUnmount, ref, useTemplateRef } from "vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "AiChatComposer"
|
name: "AiChatComposer"
|
||||||
});
|
});
|
||||||
@@ -103,6 +126,20 @@ export interface Props {
|
|||||||
stopText?: string;
|
stopText?: string;
|
||||||
retryText?: string;
|
retryText?: string;
|
||||||
maxLength?: number;
|
maxLength?: number;
|
||||||
|
/** 是否启用长按输入框语音输入 */
|
||||||
|
voiceEnabled?: boolean;
|
||||||
|
/** 语音识别状态,由业务侧驱动 */
|
||||||
|
voiceState?: "idle" | "listening" | "processing";
|
||||||
|
/** 语音中间结果 */
|
||||||
|
voiceText?: string;
|
||||||
|
/** 松开发送提示 */
|
||||||
|
voiceSendHint?: string;
|
||||||
|
/** 上滑取消提示 */
|
||||||
|
voiceCancelHint?: string;
|
||||||
|
/** 正在聆听提示 */
|
||||||
|
voiceListeningText?: string;
|
||||||
|
/** 正在识别提示 */
|
||||||
|
voiceProcessingText?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
@@ -113,7 +150,14 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
sendText: "发送",
|
sendText: "发送",
|
||||||
stopText: "停止",
|
stopText: "停止",
|
||||||
retryText: "重试",
|
retryText: "重试",
|
||||||
maxLength: 2000
|
maxLength: 2000,
|
||||||
|
voiceEnabled: false,
|
||||||
|
voiceState: "idle",
|
||||||
|
voiceText: "",
|
||||||
|
voiceSendHint: "松开发送",
|
||||||
|
voiceCancelHint: "松开取消",
|
||||||
|
voiceListeningText: "正在听你说…",
|
||||||
|
voiceProcessingText: "正在识别…"
|
||||||
});
|
});
|
||||||
|
|
||||||
const draft = defineModel<string>({ required: true });
|
const draft = defineModel<string>({ required: true });
|
||||||
@@ -123,8 +167,44 @@ const emit = defineEmits<{
|
|||||||
retry: [];
|
retry: [];
|
||||||
"new-conversation": [];
|
"new-conversation": [];
|
||||||
"add-attachment": [];
|
"add-attachment": [];
|
||||||
|
"voice-start": [];
|
||||||
|
"voice-stop": [];
|
||||||
|
"voice-cancel": [];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
/** 长按触发语音的阈值,短按仍然聚焦输入 */
|
||||||
|
const VOICE_HOLD_DELAY = 300;
|
||||||
|
/** 上滑取消的位移阈值 */
|
||||||
|
const VOICE_CANCEL_DISTANCE = 48;
|
||||||
|
/** 未触发语音时,手指移动超过该距离视为滑动 */
|
||||||
|
const VOICE_MOVE_TOLERANCE = 12;
|
||||||
|
|
||||||
|
const textareaRef = useTemplateRef<{ focus: () => void }>("textareaRef");
|
||||||
|
const inputFocused = ref(false);
|
||||||
|
const voicePressing = ref(false);
|
||||||
|
const voiceTriggered = ref(false);
|
||||||
|
const willCancel = ref(false);
|
||||||
|
let voiceTimer: number | undefined;
|
||||||
|
let voiceStartY = 0;
|
||||||
|
let voicePointerId: number | undefined;
|
||||||
|
|
||||||
|
/** 输入框为空且未聚焦时才接管长按,避免影响选择和编辑 */
|
||||||
|
const voiceHitVisible = computed(() => props.voiceEnabled
|
||||||
|
&& !props.disabled
|
||||||
|
&& !props.isGenerating
|
||||||
|
&& !draft.value.trim()
|
||||||
|
&& !inputFocused.value
|
||||||
|
&& (props.voiceState === "idle" || voicePressing.value));
|
||||||
|
|
||||||
|
const voicePanelVisible = computed(() => props.voiceEnabled && (voiceTriggered.value || props.voiceState !== "idle"));
|
||||||
|
|
||||||
|
const voicePanelText = computed(() => {
|
||||||
|
if (props.voiceText) {
|
||||||
|
return props.voiceText;
|
||||||
|
}
|
||||||
|
return props.voiceState === "processing" ? props.voiceProcessingText : props.voiceListeningText;
|
||||||
|
});
|
||||||
|
|
||||||
function startNewConversation(): void {
|
function startNewConversation(): void {
|
||||||
if (props.disabled || props.isGenerating) {
|
if (props.disabled || props.isGenerating) {
|
||||||
return;
|
return;
|
||||||
@@ -151,6 +231,90 @@ function submitMessage(): void {
|
|||||||
draft.value = "";
|
draft.value = "";
|
||||||
emit("send", message);
|
emit("send", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleVoicePointerDown(event: PointerEvent): void {
|
||||||
|
if (!props.voiceEnabled || props.disabled || props.isGenerating || props.voiceState !== "idle" || draft.value.trim()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
voicePressing.value = true;
|
||||||
|
voiceTriggered.value = false;
|
||||||
|
willCancel.value = false;
|
||||||
|
voiceStartY = event.clientY;
|
||||||
|
voicePointerId = event.pointerId;
|
||||||
|
event.preventDefault();
|
||||||
|
try {
|
||||||
|
(event.currentTarget as HTMLElement).setPointerCapture(event.pointerId);
|
||||||
|
} catch {
|
||||||
|
// 指针捕获失败时仍可依赖冒泡事件,忽略
|
||||||
|
}
|
||||||
|
voiceTimer = window.setTimeout(() => {
|
||||||
|
if (!voicePressing.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
voiceTriggered.value = true;
|
||||||
|
navigator.vibrate?.(15);
|
||||||
|
emit("voice-start");
|
||||||
|
}, VOICE_HOLD_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleVoicePointerMove(event: PointerEvent): void {
|
||||||
|
if (!voicePressing.value || event.pointerId !== voicePointerId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!voiceTriggered.value) {
|
||||||
|
if (Math.abs(event.clientY - voiceStartY) > VOICE_MOVE_TOLERANCE) {
|
||||||
|
resetVoicePress();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
willCancel.value = voiceStartY - event.clientY > VOICE_CANCEL_DISTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleVoicePointerUp(event: PointerEvent): void {
|
||||||
|
if (!voicePressing.value || event.pointerId !== voicePointerId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const triggered = voiceTriggered.value;
|
||||||
|
const cancel = willCancel.value;
|
||||||
|
resetVoicePress();
|
||||||
|
if (!triggered) {
|
||||||
|
textareaRef.value?.focus();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (cancel) {
|
||||||
|
emit("voice-cancel");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
emit("voice-stop");
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleVoicePointerCancel(): void {
|
||||||
|
if (!voicePressing.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const triggered = voiceTriggered.value;
|
||||||
|
resetVoicePress();
|
||||||
|
if (triggered) {
|
||||||
|
emit("voice-cancel");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetVoicePress(): void {
|
||||||
|
if (voiceTimer !== undefined) {
|
||||||
|
window.clearTimeout(voiceTimer);
|
||||||
|
voiceTimer = undefined;
|
||||||
|
}
|
||||||
|
voicePressing.value = false;
|
||||||
|
voiceTriggered.value = false;
|
||||||
|
willCancel.value = false;
|
||||||
|
voicePointerId = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
if (voiceTimer !== undefined) {
|
||||||
|
window.clearTimeout(voiceTimer);
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@@ -193,6 +357,12 @@ function submitMessage(): void {
|
|||||||
border-radius: 1.25rem;
|
border-radius: 1.25rem;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
|
.input-wrap {
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -200,6 +370,74 @@ function submitMessage(): void {
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.voice-hit {
|
||||||
|
inset: 0;
|
||||||
|
z-index: 1;
|
||||||
|
position: absolute;
|
||||||
|
touch-action: none;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.voice-panel {
|
||||||
|
inset: 0;
|
||||||
|
gap: .25rem;
|
||||||
|
display: flex;
|
||||||
|
z-index: 2;
|
||||||
|
padding: .5rem .75rem;
|
||||||
|
position: absolute;
|
||||||
|
user-select: none;
|
||||||
|
border-radius: .75rem;
|
||||||
|
pointer-events: none;
|
||||||
|
background: var(--td-bg-color-container);
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.voice-wave {
|
||||||
|
gap: .1875rem;
|
||||||
|
height: 1.25rem;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
span {
|
||||||
|
width: .1875rem;
|
||||||
|
height: 30%;
|
||||||
|
border-radius: .125rem;
|
||||||
|
background: var(--td-brand-color);
|
||||||
|
animation: voice-wave .9s ease-in-out infinite;
|
||||||
|
animation-delay: calc(var(--i) * .1s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.voice-text {
|
||||||
|
overflow: hidden;
|
||||||
|
margin: .375rem 0 0;
|
||||||
|
font-size: .8125rem;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 1.4;
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.voice-hint {
|
||||||
|
margin: .25rem 0 0;
|
||||||
|
color: var(--td-text-color-secondary);
|
||||||
|
font-size: .6875rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.cancel {
|
||||||
|
.voice-text,
|
||||||
|
.voice-hint {
|
||||||
|
color: var(--td-error-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.voice-wave span {
|
||||||
|
background: var(--td-error-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
--td-button-border-radius: .75rem;
|
--td-button-border-radius: .75rem;
|
||||||
|
|
||||||
@@ -222,6 +460,19 @@ function submitMessage(): void {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes voice-wave {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
height: 25%;
|
||||||
|
opacity: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
50% {
|
||||||
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:global(html.theme-dark) {
|
:global(html.theme-dark) {
|
||||||
.error-bar {
|
.error-bar {
|
||||||
color: var(--ai-chat-error-color-dark, #fda29b);
|
color: var(--ai-chat-error-color-dark, #fda29b);
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, useTemplateRef } from "vue";
|
import { nextTick, useTemplateRef } from "vue";
|
||||||
import { MarkdownView } from "timi-web";
|
import { MarkdownView } from "@timi/web/components/markdown-view";
|
||||||
import AiChatThinking from "./AiChatThinking.vue";
|
import AiChatThinking from "./AiChatThinking.vue";
|
||||||
import type {
|
import type {
|
||||||
AiChatMessage,
|
AiChatMessage,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
import AiChatComposerView from "./AiChatComposer.vue";
|
import AiChatComposerView from "./AiChatComposer.vue";
|
||||||
import AiChatMessageListView from "./AiChatMessageList.vue";
|
import AiChatMessageListView from "./AiChatMessageList.vue";
|
||||||
import AiChatPanelView from "./AiChatPanel.vue";
|
import AiChatPanelView from "./AiChatPanel.vue";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const AppShell = WebToolkit.withInstall(view);
|
export const AppShell = WebToolkit.withInstall(view);
|
||||||
export default AppShell;
|
export default AppShell;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
TEMP_FILE_ID_ATTR,
|
TEMP_FILE_ID_ATTR,
|
||||||
isLocalMediaId,
|
isLocalMediaId,
|
||||||
normalizeContent
|
normalizeContent
|
||||||
} from "timi-web/editor";
|
} from "@timi/web/editor";
|
||||||
import type { ArticleContentType, Attachment } from "./types";
|
import type { ArticleContentType, Attachment } from "./types";
|
||||||
|
|
||||||
/** 文章内容中附件和临时文件的标识前缀。 */
|
/** 文章内容中附件和临时文件的标识前缀。 */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
import type { Article } from "./types";
|
import type { Article } from "./types";
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Article, ArticleContentType, Attachment, UploadResult } from "./types";
|
import type { Article, ArticleContentType, Attachment, UploadResult } from "./types";
|
||||||
import { MarkdownEditor } from "timi-web";
|
import { MarkdownEditor } from "@timi/web/components/markdown-editor";
|
||||||
import { TiptapEditor } from "../tiptap-editor";
|
import { TiptapEditor } from "../tiptap-editor";
|
||||||
import type { TiptapEditorExpose } from "../tiptap-editor";
|
import type { TiptapEditorExpose } from "../tiptap-editor";
|
||||||
import {
|
import {
|
||||||
@@ -41,7 +41,7 @@ import {
|
|||||||
ATTACHMENT_ID_ATTR,
|
ATTACHMENT_ID_ATTR,
|
||||||
TEMP_FILE_ID_ATTR,
|
TEMP_FILE_ID_ATTR,
|
||||||
normalizeContent
|
normalizeContent
|
||||||
} from "timi-web/editor";
|
} from "@timi/web/editor";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "ArticleEditor"
|
name: "ArticleEditor"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { UploadResult as EditorUploadResult } from "timi-web/editor";
|
import type { UploadResult as EditorUploadResult } from "@timi/web/editor";
|
||||||
|
|
||||||
/** 文章编辑器支持的正文类型。 */
|
/** 文章编辑器支持的正文类型。 */
|
||||||
export type ArticleContentType = "TEXT" | "MARKDOWN" | "TIP_TAP";
|
export type ArticleContentType = "TEXT" | "MARKDOWN" | "TIP_TAP";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const ArticleView = WebToolkit.withInstall(view);
|
export const ArticleView = WebToolkit.withInstall(view);
|
||||||
export default ArticleView;
|
export default ArticleView;
|
||||||
|
|||||||
@@ -14,14 +14,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Article, Attachment } from "../article-editor/types";
|
import type { Article, Attachment } from "../article-editor/types";
|
||||||
import { MarkdownView } from "timi-web";
|
import { MarkdownView } from "@timi/web/components/markdown-view";
|
||||||
import { TiptapView } from "../tiptap-view";
|
import { TiptapView } from "../tiptap-view";
|
||||||
import {
|
import {
|
||||||
getAttachmentIdFromSrc,
|
getAttachmentIdFromSrc,
|
||||||
normalizeArticleContentType,
|
normalizeArticleContentType,
|
||||||
normalizeRawArticleContent
|
normalizeRawArticleContent
|
||||||
} from "../article-editor/content";
|
} from "../article-editor/content";
|
||||||
import { ATTACHMENT_ID_ATTR, normalizeContent } from "timi-web/editor";
|
import { ATTACHMENT_ID_ATTR, normalizeContent } from "@timi/web/editor";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "ArticleView"
|
name: "ArticleView"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
AttachmentSelectorItem,
|
AttachmentSelectorItem,
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ import type {
|
|||||||
AttachmentSelectorViewerItem
|
AttachmentSelectorViewerItem
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import { getMediaKind, getMediaPreviewURL } from "./utils";
|
import { getMediaKind, getMediaPreviewURL } from "./utils";
|
||||||
import { CenterTips } from "timi-web";
|
import { CenterTips } from "@timi/web/components/center-tips";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "AttachmentSelector",
|
name: "AttachmentSelector",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const BottomPopup = WebToolkit.withInstall(view);
|
export const BottomPopup = WebToolkit.withInstall(view);
|
||||||
export default BottomPopup;
|
export default BottomPopup;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const CardContainer = WebToolkit.withInstall(view);
|
export const CardContainer = WebToolkit.withInstall(view);
|
||||||
export default CardContainer;
|
export default CardContainer;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
import "./style.less";
|
import "./style.less";
|
||||||
|
|
||||||
export type CodeEditorScrollState = {
|
export type CodeEditorScrollState = {
|
||||||
|
|||||||
@@ -65,8 +65,8 @@ import {
|
|||||||
replaceMatchText,
|
replaceMatchText,
|
||||||
type TextSearchMatch,
|
type TextSearchMatch,
|
||||||
type TextSearchOptions
|
type TextSearchOptions
|
||||||
} from "timi-web/editor";
|
} from "@timi/web/editor";
|
||||||
import { highlightCode, resolveCodeEditorKeydown, resolvePrismLanguage } from "timi-web/editor";
|
import { highlightCode, resolveCodeEditorKeydown, resolvePrismLanguage } from "@timi/web/editor";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CodeEditor"
|
name: "CodeEditor"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const DropdownFilter = WebToolkit.withInstall(view);
|
export const DropdownFilter = WebToolkit.withInstall(view);
|
||||||
export default DropdownFilter;
|
export default DropdownFilter;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const DurationPicker = WebToolkit.withInstall(view);
|
export const DurationPicker = WebToolkit.withInstall(view);
|
||||||
export default DurationPicker;
|
export default DurationPicker;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const MasterDetailPage = WebToolkit.withInstall(view);
|
export const MasterDetailPage = WebToolkit.withInstall(view);
|
||||||
export default MasterDetailPage;
|
export default MasterDetailPage;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const MasterDetail = WebToolkit.withInstall(view);
|
export const MasterDetail = WebToolkit.withInstall(view);
|
||||||
export default MasterDetail;
|
export default MasterDetail;
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, type StyleValue } from "vue";
|
import { computed, type StyleValue } from "vue";
|
||||||
import { CenterTips } from "timi-web";
|
import { CenterTips } from "@timi/web/components/center-tips";
|
||||||
import { useLayout } from "../../composables/use-layout";
|
import { useLayout } from "../../composables/use-layout";
|
||||||
import type { MasterDetailProps } from "./type";
|
import type { MasterDetailProps } from "./type";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
import type { NotifyDetail } from "./types";
|
import type { NotifyDetail } from "./types";
|
||||||
|
|
||||||
export type { NotifyContentType, NotifyDetail } from "./types";
|
export type { NotifyContentType, NotifyDetail } from "./types";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const NotifyView = WebToolkit.withInstall(view);
|
export const NotifyView = WebToolkit.withInstall(view);
|
||||||
export default NotifyView;
|
export default NotifyView;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
PageTransitionBackground,
|
PageTransitionBackground,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const PaneTransition = WebToolkit.withInstall(view);
|
export const PaneTransition = WebToolkit.withInstall(view);
|
||||||
export default PaneTransition;
|
export default PaneTransition;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const RootLayout = WebToolkit.withInstall(view);
|
export const RootLayout = WebToolkit.withInstall(view);
|
||||||
export default RootLayout;
|
export default RootLayout;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { Copyright } from "timi-web";
|
import { Copyright } from "@timi/web/components/copyright";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "RootLayout"
|
name: "RootLayout"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export type {
|
export type {
|
||||||
SpaceAlign,
|
SpaceAlign,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
import timeline from "./index.vue";
|
import timeline from "./index.vue";
|
||||||
import item from "./item.vue";
|
import item from "./item.vue";
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { PickerValue } from "tdesign-mobile-vue";
|
import type { PickerValue } from "tdesign-mobile-vue";
|
||||||
import { supportedCodeLanguages } from "timi-web/editor";
|
import { supportedCodeLanguages } from "@timi/web/editor";
|
||||||
import type { TiptapEditorInstance } from "timi-web/editor";
|
import type { TiptapEditorInstance } from "@timi/web/editor";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "TiptapCodeBlockButton"
|
name: "TiptapCodeBlockButton"
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { showPlatformMessage } from "../message";
|
import { showPlatformMessage } from "../message";
|
||||||
import type { TiptapEditorInstance } from "timi-web/editor";
|
import type { TiptapEditorInstance } from "@timi/web/editor";
|
||||||
import BottomPopup from "../bottom-popup/index.vue";
|
import BottomPopup from "../bottom-popup/index.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { TiptapEditorInstance } from "timi-web/editor";
|
import type { TiptapEditorInstance } from "@timi/web/editor";
|
||||||
import BottomPopup from "../bottom-popup/index.vue";
|
import BottomPopup from "../bottom-popup/index.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { showPlatformMessage } from "../message";
|
import { showPlatformMessage } from "../message";
|
||||||
import type { TiptapEditorInstance, UploadResult } from "timi-web/editor";
|
import type { TiptapEditorInstance, UploadResult } from "@timi/web/editor";
|
||||||
import BottomPopup from "../bottom-popup/index.vue";
|
import BottomPopup from "../bottom-popup/index.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
|||||||
@@ -61,8 +61,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { TABLE_PICKER_SIZE } from "timi-web/editor";
|
import { TABLE_PICKER_SIZE } from "@timi/web/editor";
|
||||||
import type { TiptapEditorInstance } from "timi-web/editor";
|
import type { TiptapEditorInstance } from "@timi/web/editor";
|
||||||
import BottomPopup from "../bottom-popup/index.vue";
|
import BottomPopup from "../bottom-popup/index.vue";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
|
|||||||
@@ -151,8 +151,8 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { ColorObject } from "tdesign-mobile-vue";
|
import type { ColorObject } from "tdesign-mobile-vue";
|
||||||
import type { AlignType, UploadResult, TiptapEditorInstance } from "timi-web/editor";
|
import type { AlignType, UploadResult, TiptapEditorInstance } from "@timi/web/editor";
|
||||||
import { headingMeta } from "timi-web/editor";
|
import { headingMeta } from "@timi/web/editor";
|
||||||
import TiptapCodeBlockButton from "./TiptapCodeBlockButton.vue";
|
import TiptapCodeBlockButton from "./TiptapCodeBlockButton.vue";
|
||||||
import TiptapIframeButton from "./TiptapIframeButton.vue";
|
import TiptapIframeButton from "./TiptapIframeButton.vue";
|
||||||
import TiptapLinkButton from "./TiptapLinkButton.vue";
|
import TiptapLinkButton from "./TiptapLinkButton.vue";
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
import type { TiptapEditorInstance } from "timi-web/editor";
|
import type { TiptapEditorInstance } from "@timi/web/editor";
|
||||||
|
|
||||||
export * from "timi-web/editor";
|
export * from "@timi/web/editor";
|
||||||
export type TiptapEditorExpose = {
|
export type TiptapEditorExpose = {
|
||||||
submit: () => Promise<string>;
|
submit: () => Promise<string>;
|
||||||
getPendingMediaCount: () => number;
|
getPendingMediaCount: () => number;
|
||||||
|
|||||||
@@ -58,18 +58,18 @@ import {
|
|||||||
buildSearchRegex,
|
buildSearchRegex,
|
||||||
replaceMatchText,
|
replaceMatchText,
|
||||||
type TextSearchOptions
|
type TextSearchOptions
|
||||||
} from "timi-web/editor";
|
} from "@timi/web/editor";
|
||||||
import { Toolkit } from "timi-web";
|
import { Toolkit } from "@timi/web/utils";
|
||||||
import type { PendingMediaItem, UploadMediaType, UploadResult } from "timi-web/editor";
|
import type { PendingMediaItem, UploadMediaType, UploadResult } from "@timi/web/editor";
|
||||||
import TiptapToolbar from "./TiptapToolbar.vue";
|
import TiptapToolbar from "./TiptapToolbar.vue";
|
||||||
import { useTiptapEditor } from "timi-web/editor";
|
import { useTiptapEditor } from "@timi/web/editor";
|
||||||
import {
|
import {
|
||||||
ATTACHMENT_ID_ATTR,
|
ATTACHMENT_ID_ATTR,
|
||||||
LOCAL_MEDIA_ID_PREFIX,
|
LOCAL_MEDIA_ID_PREFIX,
|
||||||
TEMP_FILE_ID_ATTR,
|
TEMP_FILE_ID_ATTR,
|
||||||
isLocalMediaId,
|
isLocalMediaId,
|
||||||
normalizeContent
|
normalizeContent
|
||||||
} from "timi-web/editor";
|
} from "@timi/web/editor";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "TiptapEditor"
|
name: "TiptapEditor"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import view from "./index.vue";
|
import view from "./index.vue";
|
||||||
import { WebToolkit } from "timi-web";
|
import { WebToolkit } from "@timi/web/utils";
|
||||||
|
|
||||||
export const TiptapView = WebToolkit.withInstall(view);
|
export const TiptapView = WebToolkit.withInstall(view);
|
||||||
export default TiptapView;
|
export default TiptapView;
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { normalizeContent, useTiptapView } from "timi-web/editor";
|
import { normalizeContent, useTiptapView } from "@timi/web/editor";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "TiptapView"
|
name: "TiptapView"
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import "./assets/style/tdesign-custom.less";
|
|||||||
import "./assets/style/entrance-transition.less";
|
import "./assets/style/entrance-transition.less";
|
||||||
import "./assets/style/page-layout.less";
|
import "./assets/style/page-layout.less";
|
||||||
import "./components/tiptap-content.less";
|
import "./components/tiptap-content.less";
|
||||||
import "timi-web/style.css";
|
|
||||||
|
|
||||||
export * from "./components";
|
export * from "./components";
|
||||||
export * from "./directives";
|
export * from "./directives";
|
||||||
|
|||||||
+52
-17
@@ -1,3 +1,4 @@
|
|||||||
|
import { existsSync, readdirSync, statSync } from "fs";
|
||||||
import { resolve } from "path";
|
import { resolve } from "path";
|
||||||
import { Alias, defineConfig } from "vite";
|
import { Alias, defineConfig } from "vite";
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
@@ -8,11 +9,44 @@ import dts from "vite-plugin-dts";
|
|||||||
|
|
||||||
const alias: Alias[] = [
|
const alias: Alias[] = [
|
||||||
{
|
{
|
||||||
find: /^timi-tdesign-mobile(\/(es|lib))?$/,
|
find: /^@timi\/tdesign-mobile(\/(es|lib))?$/,
|
||||||
replacement: resolve(__dirname, "./src/index.ts")
|
replacement: resolve(__dirname, "./src/index.ts")
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归收集组件入口,组件目录下存在 index.ts 时即视为一个可独立导出的组件
|
||||||
|
*/
|
||||||
|
function collectComponentEntries(
|
||||||
|
dir: string,
|
||||||
|
prefix: string,
|
||||||
|
entries: Record<string, string>
|
||||||
|
) {
|
||||||
|
for (const name of readdirSync(dir)) {
|
||||||
|
const fullPath = resolve(dir, name);
|
||||||
|
if (!statSync(fullPath).isDirectory()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const entry = resolve(fullPath, "index.ts");
|
||||||
|
if (existsSync(entry)) {
|
||||||
|
entries[`${prefix}/${name}/index`] = entry;
|
||||||
|
}
|
||||||
|
collectComponentEntries(fullPath, `${prefix}/${name}`, entries);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const entries: Record<string, string> = {
|
||||||
|
index: resolve(__dirname, "./src/index.ts"),
|
||||||
|
"components/index": resolve(__dirname, "./src/components/index.ts"),
|
||||||
|
"directives/index": resolve(__dirname, "./src/directives/index.ts"),
|
||||||
|
"utils/message": resolve(__dirname, "./src/utils/message.ts")
|
||||||
|
};
|
||||||
|
collectComponentEntries(
|
||||||
|
resolve(__dirname, "./src/components"),
|
||||||
|
"components",
|
||||||
|
entries
|
||||||
|
);
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
server: {
|
server: {
|
||||||
port: 3004,
|
port: 3004,
|
||||||
@@ -24,33 +58,34 @@ export default defineConfig({
|
|||||||
build: {
|
build: {
|
||||||
outDir: "dist",
|
outDir: "dist",
|
||||||
lib: {
|
lib: {
|
||||||
entry: resolve(__dirname, "./src/index.ts"),
|
entry: entries,
|
||||||
name: "TimiTDesignMobile",
|
formats: ["es"],
|
||||||
fileName: "timi-tdesign-mobile"
|
fileName: (_format, entryName) => `${entryName}.js`,
|
||||||
|
cssFileName: "timi-tdesign-mobile"
|
||||||
},
|
},
|
||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
external: [
|
external: (id) =>
|
||||||
"vue",
|
id === "vue" ||
|
||||||
"vue-router",
|
id === "vue-router" ||
|
||||||
"timi-web",
|
id === "@timi/web" ||
|
||||||
"tdesign-mobile-vue"
|
id.startsWith("@timi/web/") ||
|
||||||
],
|
id === "tdesign-mobile-vue" ||
|
||||||
|
id.startsWith("tdesign-mobile-vue/"),
|
||||||
output: {
|
output: {
|
||||||
globals: {
|
chunkFileNames: "chunks/[name]-[hash].js"
|
||||||
vue: "Vue",
|
|
||||||
"timi-web": "TimiWeb"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
minify: "terser"
|
cssCodeSplit: false,
|
||||||
|
minify: "terser",
|
||||||
|
target: "es2017"
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
vue({
|
vue({
|
||||||
include: [/\.vue$/, /\.md$/]
|
include: [/\.vue$/, /\.md$/]
|
||||||
}),
|
}),
|
||||||
dts({
|
dts({
|
||||||
pathsToAliases: false,
|
entryRoot: "src",
|
||||||
aliasesExclude: [/^timi-web\/editor$/]
|
pathsToAliases: false
|
||||||
}),
|
}),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
imports: [
|
imports: [
|
||||||
|
|||||||
Reference in New Issue
Block a user