feat: 添加结果表达式修改;添加tiptap编辑器;
This commit is contained in:
parent
35b77f225f
commit
f0a1b687b7
@ -5,10 +5,14 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"dev-test": "vite --host --mode=test",
|
||||
"build": "vue-tsc && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/core": "^2.10.4",
|
||||
"@tiptap/pm": "^2.10.4",
|
||||
"@tiptap/vue-3": "^2.10.4",
|
||||
"ant-design-vue": "^4.2.6",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"axios": "^1.7.9",
|
||||
|
49
src/components/editor/tiptap.vue
Normal file
49
src/components/editor/tiptap.vue
Normal file
@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<EditorContent :editor="editor" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { Editor, EditorContent } from '@tiptap/vue-3'
|
||||
import { extensions, Placeholder } from './tiptap'
|
||||
import { watch, onMounted, onUnmounted } from 'vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'Tiptap',
|
||||
})
|
||||
const props = defineProps<{
|
||||
placeholder?: string
|
||||
}>()
|
||||
const model = defineModel<string>()
|
||||
const editor = new Editor({
|
||||
content: ``,
|
||||
// extensions: [StarterKit],
|
||||
extensions: [
|
||||
...extensions,
|
||||
Placeholder.configure({
|
||||
placeholder: props.placeholder || '请输入内容',
|
||||
})
|
||||
]
|
||||
})
|
||||
onMounted(() => {
|
||||
if (model.value) editor.commands.setContent(model.value)
|
||||
editor.on('update', () => {
|
||||
model.value = editor.getText()
|
||||
})
|
||||
})
|
||||
watch(model, (newValue) => {
|
||||
editor.commands.setContent(newValue || '')
|
||||
})
|
||||
|
||||
onUnmounted(() => {
|
||||
editor.destroy()
|
||||
})
|
||||
</script>
|
||||
<style>
|
||||
.tiptap p.is-editor-empty:first-child::before {
|
||||
color: #adb5bd;
|
||||
content: attr(data-placeholder);
|
||||
float: left;
|
||||
height: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
</style>
|
7
src/components/editor/tiptap/ext-document.ts
Normal file
7
src/components/editor/tiptap/ext-document.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Node } from '@tiptap/core'
|
||||
|
||||
export const Document = Node.create({
|
||||
name: 'doc',
|
||||
topNode: true,
|
||||
content: 'block+',
|
||||
})
|
66
src/components/editor/tiptap/ext-paragraph.ts
Normal file
66
src/components/editor/tiptap/ext-paragraph.ts
Normal file
@ -0,0 +1,66 @@
|
||||
import { mergeAttributes, Node } from '@tiptap/core'
|
||||
|
||||
export interface ParagraphOptions {
|
||||
/**
|
||||
* The HTML attributes for a paragraph node.
|
||||
* @default {}
|
||||
* @example { class: 'foo' }
|
||||
*/
|
||||
HTMLAttributes: Record<string, any>,
|
||||
}
|
||||
|
||||
declare module '@tiptap/core' {
|
||||
interface Commands<ReturnType> {
|
||||
paragraph: {
|
||||
/**
|
||||
* Toggle a paragraph
|
||||
* @example editor.commands.toggleParagraph()
|
||||
*/
|
||||
setParagraph: () => ReturnType,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This extension allows you to create paragraphs.
|
||||
* @see https://www.tiptap.dev/api/nodes/paragraph
|
||||
*/
|
||||
export const Paragraph = Node.create<ParagraphOptions>({
|
||||
name: 'paragraph',
|
||||
|
||||
priority: 1000,
|
||||
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {},
|
||||
}
|
||||
},
|
||||
|
||||
group: 'block',
|
||||
|
||||
content: 'inline*',
|
||||
|
||||
parseHTML() {
|
||||
return [
|
||||
{ tag: 'p' },
|
||||
]
|
||||
},
|
||||
|
||||
renderHTML({ HTMLAttributes }) {
|
||||
return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
|
||||
},
|
||||
|
||||
addCommands() {
|
||||
return {
|
||||
setParagraph: () => ({ commands }) => {
|
||||
return commands.setNode(this.name)
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
'Mod-Alt-0': () => this.editor.commands.setParagraph(),
|
||||
}
|
||||
},
|
||||
})
|
139
src/components/editor/tiptap/ext-placeholder.ts
Normal file
139
src/components/editor/tiptap/ext-placeholder.ts
Normal file
@ -0,0 +1,139 @@
|
||||
import { Editor, Extension, isNodeEmpty } from '@tiptap/core'
|
||||
import { Node as ProsemirrorNode } from '@tiptap/pm/model'
|
||||
import { Plugin, PluginKey } from '@tiptap/pm/state'
|
||||
import { Decoration, DecorationSet } from '@tiptap/pm/view'
|
||||
|
||||
export interface PlaceholderOptions {
|
||||
/**
|
||||
* **The class name for the empty editor**
|
||||
* @default 'is-editor-empty'
|
||||
*/
|
||||
emptyEditorClass: string
|
||||
|
||||
/**
|
||||
* **The class name for empty nodes**
|
||||
* @default 'is-empty'
|
||||
*/
|
||||
emptyNodeClass: string
|
||||
|
||||
/**
|
||||
* **The placeholder content**
|
||||
*
|
||||
* You can use a function to return a dynamic placeholder or a string.
|
||||
* @default 'Write something …'
|
||||
*/
|
||||
placeholder:
|
||||
| ((PlaceholderProps: {
|
||||
editor: Editor
|
||||
node: ProsemirrorNode
|
||||
pos: number
|
||||
hasAnchor: boolean
|
||||
}) => string)
|
||||
| string
|
||||
|
||||
/**
|
||||
* See https://github.com/ueberdosis/tiptap/pull/5278 for more information.
|
||||
* @deprecated This option is no longer respected and this type will be removed in the next major version.
|
||||
*/
|
||||
considerAnyAsEmpty?: boolean
|
||||
|
||||
/**
|
||||
* **Checks if the placeholder should be only shown when the editor is editable.**
|
||||
*
|
||||
* If true, the placeholder will only be shown when the editor is editable.
|
||||
* If false, the placeholder will always be shown.
|
||||
* @default true
|
||||
*/
|
||||
showOnlyWhenEditable: boolean
|
||||
|
||||
/**
|
||||
* **Checks if the placeholder should be only shown when the current node is empty.**
|
||||
*
|
||||
* If true, the placeholder will only be shown when the current node is empty.
|
||||
* If false, the placeholder will be shown when any node is empty.
|
||||
* @default true
|
||||
*/
|
||||
showOnlyCurrent: boolean
|
||||
|
||||
/**
|
||||
* **Controls if the placeholder should be shown for all descendents.**
|
||||
*
|
||||
* If true, the placeholder will be shown for all descendents.
|
||||
* If false, the placeholder will only be shown for the current node.
|
||||
* @default false
|
||||
*/
|
||||
includeChildren: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* This extension allows you to add a placeholder to your editor.
|
||||
* A placeholder is a text that appears when the editor or a node is empty.
|
||||
* @see https://www.tiptap.dev/api/extensions/placeholder
|
||||
*/
|
||||
export const Placeholder = Extension.create<PlaceholderOptions>({
|
||||
name: 'placeholder',
|
||||
|
||||
addOptions() {
|
||||
return {
|
||||
emptyEditorClass: 'is-editor-empty',
|
||||
emptyNodeClass: 'is-empty',
|
||||
placeholder: 'Write something …',
|
||||
showOnlyWhenEditable: true,
|
||||
showOnlyCurrent: true,
|
||||
includeChildren: false,
|
||||
}
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
return [
|
||||
new Plugin({
|
||||
key: new PluginKey('placeholder'),
|
||||
props: {
|
||||
decorations: ({ doc, selection }) => {
|
||||
const active = this.editor.isEditable || !this.options.showOnlyWhenEditable
|
||||
const { anchor } = selection
|
||||
const decorations: Decoration[] = []
|
||||
|
||||
if (!active) {
|
||||
return null
|
||||
}
|
||||
|
||||
const isEmptyDoc = this.editor.isEmpty
|
||||
|
||||
doc.descendants((node, pos) => {
|
||||
const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize
|
||||
const isEmpty = !node.isLeaf && isNodeEmpty(node)
|
||||
|
||||
if ((hasAnchor || !this.options.showOnlyCurrent) && isEmpty) {
|
||||
const classes = [this.options.emptyNodeClass]
|
||||
|
||||
if (isEmptyDoc) {
|
||||
classes.push(this.options.emptyEditorClass)
|
||||
}
|
||||
|
||||
const decoration = Decoration.node(pos, pos + node.nodeSize, {
|
||||
class: classes.join(' '),
|
||||
'data-placeholder':
|
||||
typeof this.options.placeholder === 'function'
|
||||
? this.options.placeholder({
|
||||
editor: this.editor,
|
||||
node,
|
||||
pos,
|
||||
hasAnchor,
|
||||
})
|
||||
: this.options.placeholder,
|
||||
})
|
||||
|
||||
decorations.push(decoration)
|
||||
}
|
||||
|
||||
return this.options.includeChildren
|
||||
})
|
||||
|
||||
return DecorationSet.create(doc, decorations)
|
||||
},
|
||||
},
|
||||
}),
|
||||
]
|
||||
},
|
||||
})
|
7
src/components/editor/tiptap/ext-text.ts
Normal file
7
src/components/editor/tiptap/ext-text.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { Node } from '@tiptap/core'
|
||||
|
||||
|
||||
export const Text = Node.create({
|
||||
name: 'text',
|
||||
group: 'inline'
|
||||
})
|
267
src/components/editor/tiptap/ext-vars.ts
Normal file
267
src/components/editor/tiptap/ext-vars.ts
Normal file
@ -0,0 +1,267 @@
|
||||
import { mergeAttributes, Node } from '@tiptap/core'
|
||||
import { DOMOutputSpec, Node as ProseMirrorNode } from '@tiptap/pm/model'
|
||||
import { PluginKey } from '@tiptap/pm/state'
|
||||
import Suggestion, { SuggestionOptions } from '@tiptap/suggestion'
|
||||
|
||||
// See `addAttributes` below
|
||||
export interface MentionNodeAttrs {
|
||||
/**
|
||||
* The identifier for the selected item that was mentioned, stored as a `data-id`
|
||||
* attribute.
|
||||
*/
|
||||
id: string | null;
|
||||
/**
|
||||
* The label to be rendered by the editor as the displayed text for this mentioned
|
||||
* item, if provided. Stored as a `data-label` attribute. See `renderLabel`.
|
||||
*/
|
||||
label?: string | null;
|
||||
}
|
||||
|
||||
export type MentionOptions<SuggestionItem = any, Attrs extends Record<string, any> = MentionNodeAttrs> = {
|
||||
/**
|
||||
* The HTML attributes for a mention node.
|
||||
* @default {}
|
||||
* @example { class: 'foo' }
|
||||
*/
|
||||
HTMLAttributes: Record<string, any>
|
||||
|
||||
/**
|
||||
* A function to render the label of a mention.
|
||||
* @deprecated use renderText and renderHTML instead
|
||||
* @param props The render props
|
||||
* @returns The label
|
||||
* @example ({ options, node }) => `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`
|
||||
*/
|
||||
renderLabel?: (props: { options: MentionOptions<SuggestionItem, Attrs>; node: ProseMirrorNode }) => string
|
||||
|
||||
/**
|
||||
* A function to render the text of a mention.
|
||||
* @param props The render props
|
||||
* @returns The text
|
||||
* @example ({ options, node }) => `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`
|
||||
*/
|
||||
renderText: (props: { options: MentionOptions<SuggestionItem, Attrs>; node: ProseMirrorNode }) => string
|
||||
|
||||
/**
|
||||
* A function to render the HTML of a mention.
|
||||
* @param props The render props
|
||||
* @returns The HTML as a ProseMirror DOM Output Spec
|
||||
* @example ({ options, node }) => ['span', { 'data-type': 'mention' }, `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`]
|
||||
*/
|
||||
renderHTML: (props: { options: MentionOptions<SuggestionItem, Attrs>; node: ProseMirrorNode }) => DOMOutputSpec
|
||||
|
||||
/**
|
||||
* Whether to delete the trigger character with backspace.
|
||||
* @default false
|
||||
*/
|
||||
deleteTriggerWithBackspace: boolean
|
||||
|
||||
/**
|
||||
* The suggestion options.
|
||||
* @default {}
|
||||
* @example { char: '@', pluginKey: MentionPluginKey, command: ({ editor, range, props }) => { ... } }
|
||||
*/
|
||||
suggestion: Omit<SuggestionOptions<SuggestionItem, Attrs>, 'editor'>
|
||||
}
|
||||
|
||||
/**
|
||||
* The plugin key for the mention plugin.
|
||||
* @default 'mention'
|
||||
*/
|
||||
export const MentionPluginKey = new PluginKey('mention')
|
||||
|
||||
/**
|
||||
* This extension allows you to insert mentions into the editor.
|
||||
* @see https://www.tiptap.dev/api/extensions/mention
|
||||
*/
|
||||
export const Mention = Node.create<MentionOptions>({
|
||||
name: 'mention',
|
||||
|
||||
priority: 101,
|
||||
|
||||
addOptions() {
|
||||
return {
|
||||
HTMLAttributes: {},
|
||||
renderText({ options, node }) {
|
||||
return `${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`
|
||||
},
|
||||
deleteTriggerWithBackspace: false,
|
||||
renderHTML({ options, node }) {
|
||||
return [
|
||||
'span',
|
||||
mergeAttributes(this.HTMLAttributes, options.HTMLAttributes),
|
||||
`${options.suggestion.char}${node.attrs.label ?? node.attrs.id}`,
|
||||
]
|
||||
},
|
||||
suggestion: {
|
||||
char: '@',
|
||||
pluginKey: MentionPluginKey,
|
||||
command: ({ editor, range, props }) => {
|
||||
// increase range.to by one when the next node is of type "text"
|
||||
// and starts with a space character
|
||||
const nodeAfter = editor.view.state.selection.$to.nodeAfter
|
||||
const overrideSpace = nodeAfter?.text?.startsWith(' ')
|
||||
|
||||
if (overrideSpace) {
|
||||
range.to += 1
|
||||
}
|
||||
|
||||
editor
|
||||
.chain()
|
||||
.focus()
|
||||
.insertContentAt(range, [
|
||||
{
|
||||
type: this.name,
|
||||
attrs: props,
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
text: ' ',
|
||||
},
|
||||
])
|
||||
.run()
|
||||
|
||||
// get reference to `window` object from editor element, to support cross-frame JS usage
|
||||
editor.view.dom.ownerDocument.defaultView?.getSelection()?.collapseToEnd()
|
||||
},
|
||||
allow: ({ state, range }) => {
|
||||
const $from = state.doc.resolve(range.from)
|
||||
const type = state.schema.nodes[this.name]
|
||||
const allow = !!$from.parent.type.contentMatch.matchType(type)
|
||||
|
||||
return allow
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
group: 'inline',
|
||||
|
||||
inline: true,
|
||||
|
||||
selectable: false,
|
||||
|
||||
atom: true,
|
||||
|
||||
addAttributes() {
|
||||
return {
|
||||
id: {
|
||||
default: null,
|
||||
parseHTML: element => element.getAttribute('data-id'),
|
||||
renderHTML: attributes => {
|
||||
if (!attributes.id) {
|
||||
return {}
|
||||
}
|
||||
|
||||
return {
|
||||
'data-id': attributes.id,
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
label: {
|
||||
default: null,
|
||||
parseHTML: element => element.getAttribute('data-label'),
|
||||
renderHTML: attributes => {
|
||||
if (!attributes.label) {
|
||||
return {}
|
||||
}
|
||||
|
||||
return {
|
||||
'data-label': attributes.label,
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
parseHTML() {
|
||||
return [
|
||||
{
|
||||
tag: `span[data-type="${this.name}"]`,
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
renderHTML({ node, HTMLAttributes }) {
|
||||
if (this.options.renderLabel !== undefined) {
|
||||
console.warn('renderLabel is deprecated use renderText and renderHTML instead')
|
||||
return [
|
||||
'span',
|
||||
mergeAttributes({ 'data-type': this.name }, this.options.HTMLAttributes, HTMLAttributes),
|
||||
this.options.renderLabel({
|
||||
options: this.options,
|
||||
node,
|
||||
}),
|
||||
]
|
||||
}
|
||||
const mergedOptions = { ...this.options }
|
||||
|
||||
mergedOptions.HTMLAttributes = mergeAttributes({ 'data-type': this.name }, this.options.HTMLAttributes, HTMLAttributes)
|
||||
const html = this.options.renderHTML({
|
||||
options: mergedOptions,
|
||||
node,
|
||||
})
|
||||
|
||||
if (typeof html === 'string') {
|
||||
return [
|
||||
'span',
|
||||
mergeAttributes({ 'data-type': this.name }, this.options.HTMLAttributes, HTMLAttributes),
|
||||
html,
|
||||
]
|
||||
}
|
||||
return html
|
||||
},
|
||||
|
||||
renderText({ node }) {
|
||||
if (this.options.renderLabel !== undefined) {
|
||||
console.warn('renderLabel is deprecated use renderText and renderHTML instead')
|
||||
return this.options.renderLabel({
|
||||
options: this.options,
|
||||
node,
|
||||
})
|
||||
}
|
||||
return this.options.renderText({
|
||||
options: this.options,
|
||||
node,
|
||||
})
|
||||
},
|
||||
|
||||
addKeyboardShortcuts() {
|
||||
return {
|
||||
Backspace: () => this.editor.commands.command(({ tr, state }) => {
|
||||
let isMention = false
|
||||
const { selection } = state
|
||||
const { empty, anchor } = selection
|
||||
|
||||
if (!empty) {
|
||||
return false
|
||||
}
|
||||
|
||||
state.doc.nodesBetween(anchor - 1, anchor, (node, pos) => {
|
||||
if (node.type.name === this.name) {
|
||||
isMention = true
|
||||
tr.insertText(
|
||||
this.options.deleteTriggerWithBackspace ? '' : this.options.suggestion.char || '',
|
||||
pos,
|
||||
pos + node.nodeSize,
|
||||
)
|
||||
|
||||
return false
|
||||
}
|
||||
})
|
||||
|
||||
return isMention
|
||||
}),
|
||||
}
|
||||
},
|
||||
|
||||
addProseMirrorPlugins() {
|
||||
return [
|
||||
Suggestion({
|
||||
editor: this.editor,
|
||||
...this.options.suggestion,
|
||||
}),
|
||||
]
|
||||
},
|
||||
})
|
12
src/components/editor/tiptap/index.ts
Normal file
12
src/components/editor/tiptap/index.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { Text } from './ext-text.ts'
|
||||
import { Paragraph } from './ext-paragraph.ts'
|
||||
import { Document } from './ext-document.ts'
|
||||
export {Placeholder } from './ext-placeholder.ts'
|
||||
|
||||
|
||||
// export
|
||||
export const extensions = [
|
||||
Text,
|
||||
Paragraph,
|
||||
Document,
|
||||
]
|
@ -1,104 +1,63 @@
|
||||
<template>
|
||||
<div class="result-container">
|
||||
<PageHeader title="输出指标编辑" description="*输出指标: 使用输入参数进行计算,可对指标进行编辑操作。">
|
||||
<Button type="primary">保存</Button>
|
||||
<Button :loading="loading" type="primary" @click="save">保存</Button>
|
||||
</PageHeader>
|
||||
</div>
|
||||
<div class="result-calc-expression-list-container overflow-auto grid grid-cols-2 gap-4"
|
||||
style="max-height: calc(100vh - 240px);margin-right:-5px;padding-right:5px;">
|
||||
|
||||
<div class="result-item bg-gray-100 p-3 rounded" v-for="item in ResultExpressionList" :key="item.key">
|
||||
<div class="result-item-title text-base font-bold">{{ item.title }}</div>
|
||||
<div class="result-item-expression mt-3">
|
||||
<textarea class="w-full h-[66px] rounded outline-none p-3 bg-none resize-none" v-model="item.expression"
|
||||
:placeholder="`请输入${item.title}计算公式`" />
|
||||
<Tiptap v-model="item.expression" class="w-full bg-white rounded outline-none p-3 bg-none resize-none"
|
||||
:placeholder="`请输入 ${item.title} 的计算公式`" />
|
||||
<!-- <textarea class="w-full h-[66px] rounded outline-none p-3 bg-none resize-none" v-model="item.expression"
|
||||
:placeholder="`请输入${item.title}计算公式`" /> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hidden">
|
||||
<!-- <DataField /> -->
|
||||
<!-- <div class="hidden">
|
||||
<DataField />
|
||||
<Button type="primary" @click="showMessage">test</Button>
|
||||
<p>输出计算</p>
|
||||
</div>
|
||||
</div> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import PageHeader from "@/components/page-header.vue";
|
||||
// import DataField from "@/components/data-fields/index.vue"
|
||||
import Button from "@/components/button/button.vue";
|
||||
import { message } from "@/components/message";
|
||||
|
||||
import { message } from "ant-design-vue";
|
||||
import { ref } from "vue";
|
||||
|
||||
const dataList = [
|
||||
{ title: "总入液量(ml)", expression: "", key: "total" },
|
||||
{ title: "Pro(g)不含白蛋白", expression: "", key: "danbai" },
|
||||
{ title: "Pro(g)含白蛋白", expression: "", key: "danbai_baidanbai" },
|
||||
{ title: "Glu(g)", expression: "", key: "glu" },
|
||||
{ title: "Fat(g)", expression: "", key: "fat" },
|
||||
{ title: "纤维素(g)", expression: "", key: "cellulose" },
|
||||
{ title: "Na(g)", expression: "", key: "na" },
|
||||
{ title: "K(g)", expression: "", key: "k" },
|
||||
{ title: "Ca(g)", expression: "", key: "ca" },
|
||||
{ title: "P(g)", expression: "", key: "p" },
|
||||
{ title: "Mg(g)", expression: "", key: "mg" },
|
||||
{ title: "实际热卡(Kcal)", expression: "", key: "shijireka" },
|
||||
{ title: "热量/体重(Kcal/kg)", expression: "", key: "reliang_tizhong" },
|
||||
{ title: "蛋白/体重(不含白蛋白)", expression: "", key: "danbai_tizhong" },
|
||||
{
|
||||
title: "蛋白/体重(含白蛋白)",
|
||||
expression: "",
|
||||
key: "danbai_tizhong_baidanbai",
|
||||
},
|
||||
{ title: "蛋白热卡比(不含白蛋白)", expression: "", key: "danbai_rekabi" },
|
||||
{
|
||||
title: "蛋白热卡比(含白蛋白)",
|
||||
expression: "",
|
||||
key: "danbai_rekabi_baidanbai",
|
||||
},
|
||||
{ title: "糖热卡比", expression: "", key: "tang_rekabi" },
|
||||
{ title: "脂肪热卡比", expression: "", key: "zhifang_rekabi" },
|
||||
{ title: "氮平衡(不含白蛋白)", expression: "", key: "danpingheng" },
|
||||
{ title: "氮平衡(含白蛋白)", expression: "", key: "danpingheng_baidanbai" },
|
||||
{ title: "肠内热卡百分比", expression: "", key: "changneibi" },
|
||||
{ title: "肠外热卡百分比", expression: "", key: "changwaibi" },
|
||||
];
|
||||
const ResultExpressionList = ref(dataList);
|
||||
import { expressionList, saveExpression } from "@/service/api/result";
|
||||
|
||||
// const list = [
|
||||
// { name: '总入液量(ml)', value: '', key: 'total' },
|
||||
// { name: 'Pro(g)不含白蛋白', value: '', key: 'danbai' },
|
||||
// { name: 'Pro(g)含白蛋白', value: '', key: 'danbai_baidanbai' },
|
||||
// { name: 'Glu(g)', value: '', key: 'glu' },
|
||||
// { name: 'Fat(g)', value: '', key: 'fat' },
|
||||
// { name: '纤维素(g)', value: '', key: 'cellulose' },
|
||||
// { name: 'Na(g)', value: '', key: 'na' },
|
||||
// { name: 'K(g)', value: '', key: 'k' },
|
||||
// { name: 'Ca(g)', value: '', key: 'ca' },
|
||||
// { name: 'P(g)', value: '', key: 'p' },
|
||||
// { name: 'Mg(g)', value: '', key: 'mg' },
|
||||
// { name: '实际热卡(Kcal)', value: '', key: 'shijireka' },
|
||||
// { name: '热量/体重(Kcal/kg)', value: '', key: 'reliang_tizhong' },
|
||||
// { name: '蛋白/体重(不含白蛋白)', value: '', key: 'danbai_tizhong' },
|
||||
// { name: '蛋白/体重(含白蛋白)', value: '', key: 'danbai_tizhong_baidanbai' },
|
||||
// { name: '蛋白热卡比(不含白蛋白)', value: '', key: 'danbai_rekabi' },
|
||||
// { name: '蛋白热卡比(含白蛋白)', value: '', key: 'danbai_rekabi_baidanbai' },
|
||||
// { name: '糖热卡比', value: '', key: 'tang_rekabi' },
|
||||
// { name: '脂肪热卡比', value: '', key: 'zhifang_rekabi' },
|
||||
// { name: '氮平衡(不含白蛋白)', value: '', key: 'danpingheng' },
|
||||
// { name: '氮平衡(含白蛋白)', value: '', key: 'danpingheng_baidanbai' },
|
||||
// { name: '肠内热卡百分比', value: '', key: 'changneibi' },
|
||||
// { name: '肠外热卡百分比', value: '', key: 'changwaibi' }
|
||||
// ].map(it => ({ title: it.name, expression: '', key: it.key }));
|
||||
// console.log(JSON.stringify(list))
|
||||
import PageHeader from "@/components/page-header.vue";
|
||||
import Tiptap from "@/components/editor/tiptap.vue";
|
||||
import Button from "@/components/button/button.vue";
|
||||
import useRequest from "@/service/useRequest";
|
||||
|
||||
const showMessage = () => {
|
||||
message.show(
|
||||
"This notification does not automatically close, and you need to click the close button to close.",
|
||||
"Notification title",
|
||||
0
|
||||
);
|
||||
};
|
||||
const ResultExpressionList = ref<ResultExpression[]>([]);
|
||||
expressionList().then((res) => {
|
||||
ResultExpressionList.value = res.list;
|
||||
});
|
||||
const {loading,run:save} = useRequest(()=> saveExpression(ResultExpressionList.value),{
|
||||
manual: true,
|
||||
onSuccess() {
|
||||
message.success("保存成功");
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
<style lang="scss">
|
||||
.result-item-expression {
|
||||
.tiptap {
|
||||
@apply outline-none h-[40px];
|
||||
|
||||
:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// .result-calc-expression-list-container {}
|
||||
|
||||
// .result-item {
|
||||
|
31
src/service/api/result.ts
Normal file
31
src/service/api/result.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import { sleep } from "@/core/sleep";
|
||||
import { post } from "./request";
|
||||
|
||||
export const ProductCols = [
|
||||
{ id: 1, name: "能量密度", alias: "power" },
|
||||
{ id: 2, name: "蛋白Pro", alias: "protein" },
|
||||
{ id: 3, name: "Glu", alias: "glu" },
|
||||
{ id: 4, name: "Fat", alias: "fat" },
|
||||
{ id: 5, name: "纤维素", alias: "cellulose" },
|
||||
{ id: 6, name: "Na", alias: "na" },
|
||||
{ id: 7, name: "K", alias: "k" },
|
||||
{ id: 8, name: "Ca", alias: "ca" },
|
||||
{ id: 9, name: "P", alias: "p" },
|
||||
{ id: 10, name: "Mg", alias: "mg" },
|
||||
];
|
||||
|
||||
export async function expressionList() {
|
||||
await sleep(200);
|
||||
return await post<DataList<ResultExpression>>(`/result/expression/all`);
|
||||
}
|
||||
|
||||
export async function saveExpression(data: Partial<ResultExpression>[]) {
|
||||
await sleep(200);
|
||||
const list: Partial<ResultExpression>[] = data.map(item => {
|
||||
return {
|
||||
key: item.key,
|
||||
expression: item.expression,
|
||||
}
|
||||
});
|
||||
return await post(`/result/expression/save`, { list });
|
||||
}
|
@ -16,6 +16,8 @@ export default function useRequest<T = any, P extends any[] = any[]>(
|
||||
defaultParams?: P;
|
||||
manual?: boolean;
|
||||
refreshDeps?: any[];
|
||||
onSuccess?: (res: T, params: P) => void;
|
||||
onError?: (e: Error, params: P) => void;
|
||||
}
|
||||
): UseRequestResult<T, P> {
|
||||
const params = ref<P>((options?.defaultParams || []) as P) as Ref<P>;
|
||||
@ -28,9 +30,11 @@ export default function useRequest<T = any, P extends any[] = any[]>(
|
||||
return service(...args)
|
||||
.then((res) => {
|
||||
data.value = res
|
||||
options?.onSuccess?.(res, args)
|
||||
})
|
||||
.catch((e: Error) => {
|
||||
error.value = e
|
||||
options?.onError?.(e, args)
|
||||
})
|
||||
.finally(() => {
|
||||
loading.value = false
|
||||
|
10
src/types/product.d.ts
vendored
10
src/types/product.d.ts
vendored
@ -24,4 +24,14 @@ declare type ProductInfoModel = {
|
||||
created_at: Date | string;
|
||||
updated_at: Date | string;
|
||||
status: number;
|
||||
}
|
||||
|
||||
declare type ResultExpression = {
|
||||
id: number;
|
||||
key: string;
|
||||
title: string;
|
||||
expression: string;
|
||||
created_at: Date | string;
|
||||
updated_at: Date | string;
|
||||
status: number;
|
||||
}
|
@ -2,41 +2,52 @@ import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [vue()],
|
||||
build: {
|
||||
// 小于10kb直接base64
|
||||
assetsInlineLimit: 10240,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
// console.log('chunk id',id)
|
||||
if (id.includes('ant-design')) {
|
||||
return 'ui-libs'
|
||||
console.log(
|
||||
['NODE', 'NODE_ENV', 'npm_execpath', 'OS'].map(key => (process.env[key]))
|
||||
)
|
||||
const devServer = {
|
||||
default: 'http://localhost:3001',
|
||||
test: 'http://43.136.175.109:50001'
|
||||
}
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const devServerTarget = devServer[mode] || devServer.default
|
||||
console.log(`server run in ${mode} target is ${devServerTarget}`)
|
||||
return {
|
||||
plugins: [vue()],
|
||||
build: {
|
||||
// 小于10kb直接base64
|
||||
assetsInlineLimit: 10240,
|
||||
rollupOptions: {
|
||||
output: {
|
||||
manualChunks(id) {
|
||||
// console.log('chunk id',id)
|
||||
// if (id.includes('ant-design')) {
|
||||
// return 'ui-libs'
|
||||
// }
|
||||
// if (id.includes('vue')) {
|
||||
// if (id.includes('node_modules')) {
|
||||
// return 'vue'
|
||||
// }
|
||||
// return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
||||
// }
|
||||
}
|
||||
// if (id.includes('vue')) {
|
||||
// if (id.includes('node_modules')) {
|
||||
// return 'vue'
|
||||
// }
|
||||
// return id.toString().split('node_modules/')[1].split('/')[0].toString();
|
||||
// }
|
||||
}
|
||||
},
|
||||
},
|
||||
base: './',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src')
|
||||
}
|
||||
},
|
||||
},
|
||||
base: './',
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src')
|
||||
}
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://43.136.175.109:50001',
|
||||
changeOrigin: true,
|
||||
// rewrite: path => path.replace(/^\/api/, '')
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: devServerTarget,
|
||||
changeOrigin: true,
|
||||
// rewrite: path => path.replace(/^\/api/, '')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
308
yarn.lock
308
yarn.lock
@ -353,6 +353,16 @@
|
||||
resolved "https://registry.npmmirror.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
|
||||
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
|
||||
|
||||
"@popperjs/core@^2.9.0":
|
||||
version "2.11.8"
|
||||
resolved "https://registry.npmmirror.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
|
||||
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==
|
||||
|
||||
"@remirror/core-constants@3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmmirror.com/@remirror/core-constants/-/core-constants-3.0.0.tgz#96fdb89d25c62e7b6a5d08caf0ce5114370e3b8f"
|
||||
integrity sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==
|
||||
|
||||
"@rollup/rollup-android-arm-eabi@4.28.1":
|
||||
version "4.28.1"
|
||||
resolved "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz#7f4c4d8cd5ccab6e95d6750dbe00321c1f30791e"
|
||||
@ -456,11 +466,80 @@
|
||||
core-js "^3.15.1"
|
||||
nanopop "^2.1.0"
|
||||
|
||||
"@tiptap/core@^2.10.4":
|
||||
version "2.10.4"
|
||||
resolved "https://registry.npmmirror.com/@tiptap/core/-/core-2.10.4.tgz#0b3ad822d71f5834b281590809f430e6fd41523c"
|
||||
integrity sha512-fExFRTRgb6MSpg2VvR5qO2dPTQAZWuUoU4UsBCurIVcPWcyVv4FG1YzgMyoLDKy44rebFtwUGJbfU9NzX7Q/bA==
|
||||
|
||||
"@tiptap/extension-bubble-menu@^2.10.4":
|
||||
version "2.10.4"
|
||||
resolved "https://registry.npmmirror.com/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.10.4.tgz#6d2611fd3dd4c6b848b5f028ba96567aec5bd1e3"
|
||||
integrity sha512-GVtZwJaQyLBptMsmDtYl5GEobd1Uu7C9sc9Z+PdXwMuxmFfg+j07bCKCj5JJj/tjgXCSLVxWdTlDHxNrgzQHjw==
|
||||
dependencies:
|
||||
tippy.js "^6.3.7"
|
||||
|
||||
"@tiptap/extension-floating-menu@^2.10.4":
|
||||
version "2.10.4"
|
||||
resolved "https://registry.npmmirror.com/@tiptap/extension-floating-menu/-/extension-floating-menu-2.10.4.tgz#e00bbeba8b67ce2511464b9b5203a399fc7b4311"
|
||||
integrity sha512-K2MDiu6CwQ7+Jr6g1Lh3Tuxm1L6SefSHMpQO0UW3aRGwgEV5pjlrztnBFX4K9b7MNuQ4dJGCUK9u8Cv7Xss0qg==
|
||||
dependencies:
|
||||
tippy.js "^6.3.7"
|
||||
|
||||
"@tiptap/pm@^2.10.4":
|
||||
version "2.10.4"
|
||||
resolved "https://registry.npmmirror.com/@tiptap/pm/-/pm-2.10.4.tgz#28909a528a3ac59e4f62055d5b9b2890f6f386fc"
|
||||
integrity sha512-pZ4NEkRtYoDLe0spARvXZ1N3hNv/5u6vfPdPtEbmNpoOSjSNqDC1kVM+qJY0iaCYpxbxcv7cxn3kBumcFLQpJQ==
|
||||
dependencies:
|
||||
prosemirror-changeset "^2.2.1"
|
||||
prosemirror-collab "^1.3.1"
|
||||
prosemirror-commands "^1.6.2"
|
||||
prosemirror-dropcursor "^1.8.1"
|
||||
prosemirror-gapcursor "^1.3.2"
|
||||
prosemirror-history "^1.4.1"
|
||||
prosemirror-inputrules "^1.4.0"
|
||||
prosemirror-keymap "^1.2.2"
|
||||
prosemirror-markdown "^1.13.1"
|
||||
prosemirror-menu "^1.2.4"
|
||||
prosemirror-model "^1.23.0"
|
||||
prosemirror-schema-basic "^1.2.3"
|
||||
prosemirror-schema-list "^1.4.1"
|
||||
prosemirror-state "^1.4.3"
|
||||
prosemirror-tables "^1.6.1"
|
||||
prosemirror-trailing-node "^3.0.0"
|
||||
prosemirror-transform "^1.10.2"
|
||||
prosemirror-view "^1.37.0"
|
||||
|
||||
"@tiptap/vue-3@^2.10.4":
|
||||
version "2.10.4"
|
||||
resolved "https://registry.npmmirror.com/@tiptap/vue-3/-/vue-3-2.10.4.tgz#9d44e4191d6e512673e44f760aceb909dd568132"
|
||||
integrity sha512-kFxamhq5Nln+/tNPtNLyXWPv12bWrGh+DZlOiyheRWx7Occ8L4Z3FGMIvI2BUdUsU+CziRl14IzBax6XJRjqsw==
|
||||
dependencies:
|
||||
"@tiptap/extension-bubble-menu" "^2.10.4"
|
||||
"@tiptap/extension-floating-menu" "^2.10.4"
|
||||
|
||||
"@types/estree@1.0.6":
|
||||
version "1.0.6"
|
||||
resolved "https://registry.npmmirror.com/@types/estree/-/estree-1.0.6.tgz#628effeeae2064a1b4e79f78e81d87b7e5fc7b50"
|
||||
integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==
|
||||
|
||||
"@types/linkify-it@^5":
|
||||
version "5.0.0"
|
||||
resolved "https://registry.npmmirror.com/@types/linkify-it/-/linkify-it-5.0.0.tgz#21413001973106cda1c3a9b91eedd4ccd5469d76"
|
||||
integrity sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==
|
||||
|
||||
"@types/markdown-it@^14.0.0":
|
||||
version "14.1.2"
|
||||
resolved "https://registry.npmmirror.com/@types/markdown-it/-/markdown-it-14.1.2.tgz#57f2532a0800067d9b934f3521429a2e8bfb4c61"
|
||||
integrity sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==
|
||||
dependencies:
|
||||
"@types/linkify-it" "^5"
|
||||
"@types/mdurl" "^2"
|
||||
|
||||
"@types/mdurl@^2":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmmirror.com/@types/mdurl/-/mdurl-2.0.0.tgz#d43878b5b20222682163ae6f897b20447233bdfd"
|
||||
integrity sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==
|
||||
|
||||
"@types/node@^22.10.2":
|
||||
version "22.10.2"
|
||||
resolved "https://registry.npmmirror.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9"
|
||||
@ -674,6 +753,11 @@ arg@^5.0.2:
|
||||
resolved "https://registry.npmmirror.com/arg/-/arg-5.0.2.tgz#c81433cc427c92c4dcf4865142dbca6f15acd59c"
|
||||
integrity sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==
|
||||
|
||||
argparse@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
|
||||
integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==
|
||||
|
||||
array-tree-filter@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmmirror.com/array-tree-filter/-/array-tree-filter-2.1.0.tgz#873ac00fec83749f255ac8dd083814b4f6329190"
|
||||
@ -810,6 +894,11 @@ core-js@^3.15.1:
|
||||
resolved "https://registry.npmmirror.com/core-js/-/core-js-3.35.0.tgz#58e651688484f83c34196ca13f099574ee53d6b4"
|
||||
integrity sha512-ntakECeqg81KqMueeGJ79Q5ZgQNR+6eaE8sxGCx62zMbAIj65q+uYvatToew3m6eAGdU4gNZwpZ34NMe4GYswg==
|
||||
|
||||
crelt@^1.0.0:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.npmmirror.com/crelt/-/crelt-1.0.6.tgz#7cc898ea74e190fb6ef9dae57f8f81cf7302df72"
|
||||
integrity sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==
|
||||
|
||||
cross-spawn@^7.0.0:
|
||||
version "7.0.6"
|
||||
resolved "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
|
||||
@ -889,7 +978,7 @@ emoji-regex@^9.2.2:
|
||||
resolved "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72"
|
||||
integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==
|
||||
|
||||
entities@^4.5.0:
|
||||
entities@^4.4.0, entities@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.npmmirror.com/entities/-/entities-4.5.0.tgz"
|
||||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
||||
@ -929,6 +1018,11 @@ escalade@^3.2.0:
|
||||
resolved "https://registry.npmmirror.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5"
|
||||
integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==
|
||||
|
||||
escape-string-regexp@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||
|
||||
estree-walker@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.npmmirror.com/estree-walker/-/estree-walker-2.0.2.tgz"
|
||||
@ -1119,6 +1213,13 @@ lines-and-columns@^1.1.6:
|
||||
resolved "https://registry.npmmirror.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632"
|
||||
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
||||
|
||||
linkify-it@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.npmmirror.com/linkify-it/-/linkify-it-5.0.0.tgz#9ef238bfa6dc70bd8e7f9572b52d369af569b421"
|
||||
integrity sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==
|
||||
dependencies:
|
||||
uc.micro "^2.0.0"
|
||||
|
||||
lodash-es@^4.17.15:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee"
|
||||
@ -1155,6 +1256,23 @@ magic-string@^0.30.11:
|
||||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.5.0"
|
||||
|
||||
markdown-it@^14.0.0:
|
||||
version "14.1.0"
|
||||
resolved "https://registry.npmmirror.com/markdown-it/-/markdown-it-14.1.0.tgz#3c3c5992883c633db4714ccb4d7b5935d98b7d45"
|
||||
integrity sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==
|
||||
dependencies:
|
||||
argparse "^2.0.1"
|
||||
entities "^4.4.0"
|
||||
linkify-it "^5.0.0"
|
||||
mdurl "^2.0.0"
|
||||
punycode.js "^2.3.1"
|
||||
uc.micro "^2.1.0"
|
||||
|
||||
mdurl@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmmirror.com/mdurl/-/mdurl-2.0.0.tgz#80676ec0433025dd3e17ee983d0fe8de5a2237e0"
|
||||
integrity sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==
|
||||
|
||||
merge2@^1.3.0:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
|
||||
@ -1253,6 +1371,11 @@ object-hash@^3.0.0:
|
||||
resolved "https://registry.npmmirror.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
|
||||
integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==
|
||||
|
||||
orderedmap@^2.0.0:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.npmmirror.com/orderedmap/-/orderedmap-2.1.1.tgz#61481269c44031c449915497bf5a4ad273c512d2"
|
||||
integrity sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==
|
||||
|
||||
package-json-from-dist@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmmirror.com/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz#4f1471a010827a86f94cfd9b0727e36d267de505"
|
||||
@ -1362,11 +1485,170 @@ postcss@^8.4.47, postcss@^8.4.48, postcss@^8.4.49:
|
||||
picocolors "^1.1.1"
|
||||
source-map-js "^1.2.1"
|
||||
|
||||
prosemirror-changeset@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-changeset/-/prosemirror-changeset-2.2.1.tgz#dae94b63aec618fac7bb9061648e6e2a79988383"
|
||||
integrity sha512-J7msc6wbxB4ekDFj+n9gTW/jav/p53kdlivvuppHsrZXCaQdVgRghoZbSS3kwrRyAstRVQ4/+u5k7YfLgkkQvQ==
|
||||
dependencies:
|
||||
prosemirror-transform "^1.0.0"
|
||||
|
||||
prosemirror-collab@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz#0e8c91e76e009b53457eb3b3051fb68dad029a33"
|
||||
integrity sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
|
||||
prosemirror-commands@^1.0.0, prosemirror-commands@^1.6.2:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-commands/-/prosemirror-commands-1.6.2.tgz#d9cf6654912442cff47daa1677eb43ebd0b1f117"
|
||||
integrity sha512-0nDHH++qcf/BuPLYvmqZTUUsPJUCPBUXt0J1ErTcDIS369CTp773itzLGIgIXG4LJXOlwYCr44+Mh4ii6MP1QA==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.10.2"
|
||||
|
||||
prosemirror-dropcursor@^1.8.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.1.tgz#49b9fb2f583e0d0f4021ff87db825faa2be2832d"
|
||||
integrity sha512-M30WJdJZLyXHi3N8vxN6Zh5O8ZBbQCz0gURTfPmTIBNQ5pxrdU7A58QkNqfa98YEjSAL1HUyyU34f6Pm5xBSGw==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.1.0"
|
||||
prosemirror-view "^1.1.0"
|
||||
|
||||
prosemirror-gapcursor@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.2.tgz#5fa336b83789c6199a7341c9493587e249215cb4"
|
||||
integrity sha512-wtjswVBd2vaQRrnYZaBCbyDqr232Ed4p2QPtRIUK5FuqHYKGWkEwl08oQM4Tw7DOR0FsasARV5uJFvMZWxdNxQ==
|
||||
dependencies:
|
||||
prosemirror-keymap "^1.0.0"
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-view "^1.0.0"
|
||||
|
||||
prosemirror-history@^1.0.0, prosemirror-history@^1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-history/-/prosemirror-history-1.4.1.tgz#cc370a46fb629e83a33946a0e12612e934ab8b98"
|
||||
integrity sha512-2JZD8z2JviJrboD9cPuX/Sv/1ChFng+xh2tChQ2X4bB2HeK+rra/bmJ3xGntCcjhOqIzSDG6Id7e8RJ9QPXLEQ==
|
||||
dependencies:
|
||||
prosemirror-state "^1.2.2"
|
||||
prosemirror-transform "^1.0.0"
|
||||
prosemirror-view "^1.31.0"
|
||||
rope-sequence "^1.3.0"
|
||||
|
||||
prosemirror-inputrules@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-inputrules/-/prosemirror-inputrules-1.4.0.tgz#ef1519bb2cb0d1e0cec74bad1a97f1c1555068bb"
|
||||
integrity sha512-6ygpPRuTJ2lcOXs9JkefieMst63wVJBgHZGl5QOytN7oSZs3Co/BYbc3Yx9zm9H37Bxw8kVzCnDsihsVsL4yEg==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.0.0"
|
||||
|
||||
prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-keymap/-/prosemirror-keymap-1.2.2.tgz#14a54763a29c7b2704f561088ccf3384d14eb77e"
|
||||
integrity sha512-EAlXoksqC6Vbocqc0GtzCruZEzYgrn+iiGnNjsJsH4mrnIGex4qbLdWWNza3AW5W36ZRrlBID0eM6bdKH4OStQ==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
w3c-keyname "^2.2.0"
|
||||
|
||||
prosemirror-markdown@^1.13.1:
|
||||
version "1.13.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-markdown/-/prosemirror-markdown-1.13.1.tgz#23feb6652dacb3dd78ffd8f131da37c20e4e4cf8"
|
||||
integrity sha512-Sl+oMfMtAjWtlcZoj/5L/Q39MpEnVZ840Xo330WJWUvgyhNmLBLN7MsHn07s53nG/KImevWHSE6fEj4q/GihHw==
|
||||
dependencies:
|
||||
"@types/markdown-it" "^14.0.0"
|
||||
markdown-it "^14.0.0"
|
||||
prosemirror-model "^1.20.0"
|
||||
|
||||
prosemirror-menu@^1.2.4:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-menu/-/prosemirror-menu-1.2.4.tgz#3cfdc7c06d10f9fbd1bce29082c498bd11a0a79a"
|
||||
integrity sha512-S/bXlc0ODQup6aiBbWVsX/eM+xJgCTAfMq/nLqaO5ID/am4wS0tTCIkzwytmao7ypEtjj39i7YbJjAgO20mIqA==
|
||||
dependencies:
|
||||
crelt "^1.0.0"
|
||||
prosemirror-commands "^1.0.0"
|
||||
prosemirror-history "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
|
||||
prosemirror-model@^1.0.0, prosemirror-model@^1.19.0, prosemirror-model@^1.20.0, prosemirror-model@^1.21.0, prosemirror-model@^1.23.0, prosemirror-model@^1.24.1:
|
||||
version "1.24.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-model/-/prosemirror-model-1.24.1.tgz#b445e4f9b9cfc8c1a699215057b506842ebff1a9"
|
||||
integrity sha512-YM053N+vTThzlWJ/AtPtF1j0ebO36nvbmDy4U7qA2XQB8JVaQp1FmB9Jhrps8s+z+uxhhVTny4m20ptUvhk0Mg==
|
||||
dependencies:
|
||||
orderedmap "^2.0.0"
|
||||
|
||||
prosemirror-schema-basic@^1.2.3:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.3.tgz#649c349bb21c61a56febf9deb71ac68fca4cedf2"
|
||||
integrity sha512-h+H0OQwZVqMon1PNn0AG9cTfx513zgIG2DY00eJ00Yvgb3UD+GQ/VlWW5rcaxacpCGT1Yx8nuhwXk4+QbXUfJA==
|
||||
dependencies:
|
||||
prosemirror-model "^1.19.0"
|
||||
|
||||
prosemirror-schema-list@^1.4.1:
|
||||
version "1.5.0"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-schema-list/-/prosemirror-schema-list-1.5.0.tgz#f05ddbe2e71efc9157a0dbedf80761c08bda5192"
|
||||
integrity sha512-gg1tAfH1sqpECdhIHOA/aLg2VH3ROKBWQ4m8Qp9mBKrOxQRW61zc+gMCI8nh22gnBzd1t2u1/NPLmO3nAa3ssg==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.7.3"
|
||||
|
||||
prosemirror-state@^1.0.0, prosemirror-state@^1.2.2, prosemirror-state@^1.4.3:
|
||||
version "1.4.3"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-state/-/prosemirror-state-1.4.3.tgz#94aecf3ffd54ec37e87aa7179d13508da181a080"
|
||||
integrity sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-transform "^1.0.0"
|
||||
prosemirror-view "^1.27.0"
|
||||
|
||||
prosemirror-tables@^1.6.1:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-tables/-/prosemirror-tables-1.6.2.tgz#cec9e9ac6ecf81d67147c19ab39125d56c8351ae"
|
||||
integrity sha512-97dKocVLrEVTQjZ4GBLdrrMw7Gv3no8H8yMwf5IRM9OoHrzbWpcH5jJxYgNQIRCtdIqwDctT1HdMHrGTiwp1dQ==
|
||||
dependencies:
|
||||
prosemirror-keymap "^1.2.2"
|
||||
prosemirror-model "^1.24.1"
|
||||
prosemirror-state "^1.4.3"
|
||||
prosemirror-transform "^1.10.2"
|
||||
prosemirror-view "^1.37.1"
|
||||
|
||||
prosemirror-trailing-node@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-trailing-node/-/prosemirror-trailing-node-3.0.0.tgz#5bc223d4fc1e8d9145e4079ec77a932b54e19e04"
|
||||
integrity sha512-xiun5/3q0w5eRnGYfNlW1uU9W6x5MoFKWwq/0TIRgt09lv7Hcser2QYV8t4muXbEr+Fwo0geYn79Xs4GKywrRQ==
|
||||
dependencies:
|
||||
"@remirror/core-constants" "3.0.0"
|
||||
escape-string-regexp "^4.0.0"
|
||||
|
||||
prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.10.2, prosemirror-transform@^1.7.3:
|
||||
version "1.10.2"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-transform/-/prosemirror-transform-1.10.2.tgz#8ebac4e305b586cd96595aa028118c9191bbf052"
|
||||
integrity sha512-2iUq0wv2iRoJO/zj5mv8uDUriOHWzXRnOTVgCzSXnktS/2iQRa3UUQwVlkBlYZFtygw6Nh1+X4mGqoYBINn5KQ==
|
||||
dependencies:
|
||||
prosemirror-model "^1.21.0"
|
||||
|
||||
prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.27.0, prosemirror-view@^1.31.0, prosemirror-view@^1.37.0, prosemirror-view@^1.37.1:
|
||||
version "1.37.1"
|
||||
resolved "https://registry.npmmirror.com/prosemirror-view/-/prosemirror-view-1.37.1.tgz#3ccd67cd3d831eb37a2505dd34151932462172fb"
|
||||
integrity sha512-MEAnjOdXU1InxEmhjgmEzQAikaS6lF3hD64MveTPpjOGNTl87iRLA1HupC/DEV6YuK7m4Q9DHFNTjwIVtqz5NA==
|
||||
dependencies:
|
||||
prosemirror-model "^1.20.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.1.0"
|
||||
|
||||
proxy-from-env@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
|
||||
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==
|
||||
|
||||
punycode.js@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.npmmirror.com/punycode.js/-/punycode.js-2.3.1.tgz#6b53e56ad75588234e79f4affa90972c7dd8cdb7"
|
||||
integrity sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==
|
||||
|
||||
queue-microtask@^1.2.2:
|
||||
version "1.2.3"
|
||||
resolved "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
|
||||
@ -1443,6 +1725,11 @@ rollup@^4.23.0:
|
||||
"@rollup/rollup-win32-x64-msvc" "4.28.1"
|
||||
fsevents "~2.3.2"
|
||||
|
||||
rope-sequence@^1.3.0:
|
||||
version "1.3.4"
|
||||
resolved "https://registry.npmmirror.com/rope-sequence/-/rope-sequence-1.3.4.tgz#df85711aaecd32f1e756f76e43a415171235d425"
|
||||
integrity sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==
|
||||
|
||||
run-parallel@^1.1.9:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
|
||||
@ -1508,6 +1795,7 @@ source-map-js@^1.2.0, source-map-js@^1.2.1:
|
||||
integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==
|
||||
|
||||
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
|
||||
name string-width-cjs
|
||||
version "4.2.3"
|
||||
resolved "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
@ -1526,6 +1814,7 @@ string-width@^5.0.1, string-width@^5.1.2:
|
||||
strip-ansi "^7.0.1"
|
||||
|
||||
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
|
||||
name strip-ansi-cjs
|
||||
version "6.0.1"
|
||||
resolved "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
|
||||
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
|
||||
@ -1609,6 +1898,13 @@ throttle-debounce@^5.0.0:
|
||||
resolved "https://registry.npmmirror.com/throttle-debounce/-/throttle-debounce-5.0.0.tgz#a17a4039e82a2ed38a5e7268e4132d6960d41933"
|
||||
integrity sha512-2iQTSgkkc1Zyk0MeVrt/3BvuOXYPl/R8Z0U2xxo9rjwNciaHDG3R+Lm6dh4EeUci49DanvBnuqI6jshoQQRGEg==
|
||||
|
||||
tippy.js@^6.3.7:
|
||||
version "6.3.7"
|
||||
resolved "https://registry.npmmirror.com/tippy.js/-/tippy.js-6.3.7.tgz#8ccfb651d642010ed9a32ff29b0e9e19c5b8c61c"
|
||||
integrity sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==
|
||||
dependencies:
|
||||
"@popperjs/core" "^2.9.0"
|
||||
|
||||
to-regex-range@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz"
|
||||
@ -1626,6 +1922,11 @@ typescript@^5.7.2:
|
||||
resolved "https://registry.npmmirror.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6"
|
||||
integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==
|
||||
|
||||
uc.micro@^2.0.0, uc.micro@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmmirror.com/uc.micro/-/uc.micro-2.1.0.tgz#f8d3f7d0ec4c3dea35a7e3c8efa4cb8b45c9e7ee"
|
||||
integrity sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==
|
||||
|
||||
undici-types@~6.20.0:
|
||||
version "6.20.0"
|
||||
resolved "https://registry.npmmirror.com/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
|
||||
@ -1699,6 +2000,11 @@ vue@^3.5.13:
|
||||
"@vue/server-renderer" "3.5.13"
|
||||
"@vue/shared" "3.5.13"
|
||||
|
||||
w3c-keyname@^2.2.0:
|
||||
version "2.2.8"
|
||||
resolved "https://registry.npmmirror.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz#7b17c8c6883d4e8b86ac8aba79d39e880f8869c5"
|
||||
integrity sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==
|
||||
|
||||
warning@^4.0.0:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.npmmirror.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3"
|
||||
|
Loading…
x
Reference in New Issue
Block a user