diff --git a/package.json b/package.json
index 6db1260..c38f222 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"localforage": "^1.10.0",
"lodash": "^4.17.21",
"lunar-typescript": "^1.7.5",
+ "milkdown-plugin-placeholder": "^0.2.1",
"oh-vue-icons": "^1.0.0-rc3",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.3",
diff --git a/src/layout/header/search/SearchConfig.tsx b/src/layout/header/search/SearchConfig.tsx
index 099e46a..78064e8 100644
--- a/src/layout/header/search/SearchConfig.tsx
+++ b/src/layout/header/search/SearchConfig.tsx
@@ -30,7 +30,7 @@ export default defineComponent({
'w-full rounded-lg overflow-hidden flex justify-center items-center p-2 hover:scale-110 transition-all cursor-pointer ' +
(searchConfig.current.name === item.name
? 'bg-white'
- : 'bg-white/40 hover:bg-white/60')
+ : 'bg-white ')
}
onClick={() => {
searchConfig.current = { ...item }
@@ -45,9 +45,10 @@ export default defineComponent({
}}
>
@@ -56,7 +57,7 @@ export default defineComponent({
))}
-
+ {/*
{
@@ -66,7 +67,7 @@ export default defineComponent({
>
-
+
*/}
)
}
diff --git a/src/widgets/discount/Modal.tsx b/src/widgets/discount/Modal.tsx
index 9f75a35..b29640f 100644
--- a/src/widgets/discount/Modal.tsx
+++ b/src/widgets/discount/Modal.tsx
@@ -4,6 +4,7 @@ import { addIcons, OhVueIcon } from 'oh-vue-icons'
import { IoCloseCircleOutline, RiCloseCircleLine } from 'oh-vue-icons/icons'
import useDiscountStore from './useDiscountStore'
import { debounce } from 'lodash'
+import jump from '@/utils/jump'
addIcons(RiTimeLine, IoCloseCircleOutline, RiCloseCircleLine)
export default defineComponent(() => {
const store = useDiscountStore()
@@ -13,7 +14,7 @@ export default defineComponent(() => {
const container = containerRef.value
if (store.loading) return
if (container.scrollTop + container.clientHeight >= container.scrollHeight - 15) {
- store.state.pageIndex += 1;
+ store.state.pageIndex += 1
store.getNews()
}
@@ -25,7 +26,7 @@ export default defineComponent(() => {
store.state.pageIndex = 1
store.noMoreData = false
store.getNews()
- }, 500) //
+ }, 500) //
watch(searchText, (newValue) => {
debouncedHandler(newValue)
})
@@ -57,7 +58,11 @@ export default defineComponent(() => {
}
}}
>
-
@@ -69,56 +74,61 @@ export default defineComponent(() => {
ref={containerRef}
>
- {
- (store.state.find ? store.searchList :
- store.list).map((item, index) => {
- return (
-
{ }}
- key={index}
- >
-

-
-
-
{item.name}
-
-
- {item.typename}
-
-
-
-
- -13%
-
-
- ¥{item.commdity[0]?.price}
-
-
- ¥{item.commdity[0]?.oldprice}
-
-
- 剩余{1}天
-
-
+ {(store.state.find ? store.searchList : store.list).map((item, index) => {
+ return (
+
{
+ // jump(item.commdity[0]?.url)
+ window.open(item.commdity[0]?.url)
+ }}
+ key={index}
+ >
+

+
+
+
{item.name}
+
+
+ {item.typename}
+
+
+
+
+ -13%
+
+ ¥{item.commdity[0]?.price}
+
+
+ ¥{item.commdity[0]?.oldprice}
+
+
剩余{1}天
- )
- })}
+
+
+ )
+ })}
{store.loading && (
-
加载中...
+
+ 加载中...
+
)}
{store.noMoreData && (
无更多数据
diff --git a/src/widgets/notepad/Modal.tsx b/src/widgets/notepad/Modal.tsx
index 963eca9..e063366 100644
--- a/src/widgets/notepad/Modal.tsx
+++ b/src/widgets/notepad/Modal.tsx
@@ -114,6 +114,7 @@ export default defineComponent(() => {
trriger.value &&
{
if (store.state.list[currentIndex.value]) {
diff --git a/src/widgets/notepad/editor.tsx b/src/widgets/notepad/editor.tsx
index a54869a..f1ed045 100644
--- a/src/widgets/notepad/editor.tsx
+++ b/src/widgets/notepad/editor.tsx
@@ -1,72 +1,63 @@
-import { Milkdown, useEditor } from '@milkdown/vue';
-import { defaultValueCtx, Editor, rootCtx } from '@milkdown/kit/core';
+import { Milkdown, useEditor } from '@milkdown/vue'
+import { defaultValueCtx, Editor, rootCtx } from '@milkdown/kit/core'
import { nord } from '@milkdown/theme-nord'
import { commonmark } from '@milkdown/kit/preset/commonmark'
-import { gfm } from '@milkdown/kit/preset/gfm';
-import { defineComponent, watch} from 'vue';
+import { gfm } from '@milkdown/kit/preset/gfm'
+import { defineComponent } from 'vue'
import { menu, menuConfigCtx, type MenuConfigItem } from '@milkdown-lab/plugin-menu'
-import { listener, listenerCtx } from '@milkdown/kit/plugin/listener';
-
-
+import { listener, listenerCtx } from '@milkdown/kit/plugin/listener'
const menuItems: MenuConfigItem[][] = [
- [
- {
- type: 'button',
- content: 'B',
- // commandKey
- key: 'ToggleStrong',
- },
- {
- type: 'button',
- content: 'I',
- key: 'ToggleEmphasis',
- },
- {
- type: 'button',
- content: 'S',
- key: 'ToggleStrikeThrough',
- },
- ],
+ [
+ {
+ type: 'button',
+ content: 'B',
+ // commandKey
+ key: 'ToggleStrong'
+ },
+ {
+ type: 'button',
+ content: 'I',
+ key: 'ToggleEmphasis'
+ },
+ {
+ type: 'button',
+ content: 'S',
+ key: 'ToggleStrikeThrough'
+ }
+ ]
]
export default defineComponent({
- props: {
- modelValue: {
- type: String,
- default: '',
- }
- },
- emits: ['update:modelValue'],
- setup: (props, ct) => {
-
- useEditor((root) => {
- return Editor.make()
- .config(nord)
- .config((ctx) => {
- const listener = ctx.get(listenerCtx);
- ctx.set(menuConfigCtx.key, {
- attributes: { class: 'milkdown-menu', 'data-menu': 'true' },
- items: menuItems,
- })
- ctx.set(rootCtx, document.querySelector('#app'))
- listener.markdownUpdated((ctx, markdown, prevMarkdown) => {
- if (markdown !== prevMarkdown) {
- ct.emit('update:modelValue', markdown)
- }
- })
- ctx.set(rootCtx, root)
- ctx.set(defaultValueCtx, props.modelValue || ' ')
- })
- .use(listener)
- .use(commonmark)
- .use(gfm)
- .use(menu)
-
-
- })
- return () => (
-
-
- )
+ props: {
+ modelValue: {
+ type: String,
+ default: ''
}
+ },
+ emits: ['update:modelValue'],
+ setup: (props, ct) => {
+ useEditor((root) => {
+ return Editor.make()
+ .config(nord)
+ .config((ctx) => {
+ const listener = ctx.get(listenerCtx)
+ ctx.set(menuConfigCtx.key, {
+ attributes: { class: 'milkdown-menu', 'data-menu': 'true' },
+ items: menuItems
+ })
+ ctx.set(rootCtx, document.querySelector('#app'))
+ listener.markdownUpdated((ctx, markdown, prevMarkdown) => {
+ if (markdown !== prevMarkdown) {
+ ct.emit('update:modelValue', markdown)
+ }
+ })
+ ctx.set(rootCtx, root)
+ ctx.set(defaultValueCtx, props.modelValue || ' ')
+ })
+ .use(listener)
+ .use(commonmark)
+ .use(gfm)
+ .use(menu)
+ })
+ return () =>
+ }
})
-