diff --git a/src/views/login/index.vue b/src/views/login/index.vue new file mode 100644 index 0000000..eea07f8 --- /dev/null +++ b/src/views/login/index.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/src/views/protocol/config/config.ts b/src/views/protocol/config/config.ts new file mode 100644 index 0000000..5836a64 --- /dev/null +++ b/src/views/protocol/config/config.ts @@ -0,0 +1,21 @@ +const configData = ref() +export const initConfig = () => { + configData.value = pageConfig({ + search: { + comTitle: { label: '标题', clearable: true }, + comCategoryId: { label: '类目', option: [], clearable: true } + }, + table: { + id: { label: '产品ID' }, + comTitle: { label: '标题' }, + sales: { label: '销量' }, + price: { label: '价格' }, + btn: { + types: ['primary', 'info', 'warning', 'success', 'danger'], + names: ['编辑', '复制', '加入首页', '上下架', '删除'], + width: 230 + } + } + }) + return configData +} diff --git a/src/views/protocol/config/index.vue b/src/views/protocol/config/index.vue new file mode 100644 index 0000000..9ccf76e --- /dev/null +++ b/src/views/protocol/config/index.vue @@ -0,0 +1,53 @@ + + + diff --git a/src/views/supplier/config/use-method.ts b/src/views/supplier/config/use-method.ts index 161eb36..d714d92 100644 --- a/src/views/supplier/config/use-method.ts +++ b/src/views/supplier/config/use-method.ts @@ -1,6 +1,8 @@ +type TCommodityType = 'online' | 'quit' | 'edit' | 'delete' + export const useCommodityType = (search: any, table: any) => { let beforeValue = 'online' - const commodityType = ref('online') + const commodityType = ref('online') const commodityTypeOptions = [ { label: '在线商品', value: 'online' }, { label: '下架商品', value: 'quit' }, diff --git a/src/views/supplier/xsSwitch/index.vue b/src/views/supplier/xsSwitch/index.vue new file mode 100644 index 0000000..6590afe --- /dev/null +++ b/src/views/supplier/xsSwitch/index.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/src/views/supplier/xsSwitch/mock.ts b/src/views/supplier/xsSwitch/mock.ts new file mode 100644 index 0000000..f169cfb --- /dev/null +++ b/src/views/supplier/xsSwitch/mock.ts @@ -0,0 +1,56 @@ +interface Tree { + id: number + label: string + children?: Tree[] +} + +export const dataSource = ref([ + { + id: 1, + label: 'Level one 1', + children: [ + { + id: 4, + label: 'Level two 1-1', + children: [ + { + id: 9, + label: 'Level three 1-1-1' + }, + { + id: 10, + label: 'Level three 1-1-2' + } + ] + } + ] + }, + { + id: 2, + label: 'Level one 2', + children: [ + { + id: 5, + label: 'Level two 2-1' + }, + { + id: 6, + label: 'Level two 2-2' + } + ] + }, + { + id: 3, + label: 'Level one 3', + children: [ + { + id: 7, + label: 'Level two 3-1' + }, + { + id: 8, + label: 'Level two 3-2' + } + ] + } +]) diff --git a/src/views/supplier/xsSwitch/use-drag.ts b/src/views/supplier/xsSwitch/use-drag.ts new file mode 100644 index 0000000..1c0ad62 --- /dev/null +++ b/src/views/supplier/xsSwitch/use-drag.ts @@ -0,0 +1,39 @@ +import type { DragEvents } from 'element-plus/es/components/tree/src/model/useDragNode' +import type { NodeDropType, RenderContentContext } from 'element-plus' + +type Node = RenderContentContext['node'] + +// 开始拖拽 +export const handleDragStart = (node: Node, ev: DragEvents) => { + console.log('drag start', node) +} +// 拖拽进入其他节点时触发的事件 +export const handleDragEnter = (draggingNode: Node, dropNode: Node, ev: DragEvents) => { + console.log('tree drag enter:', dropNode.label) +} +// 拖拽离开某个节点时触发的事件 +export const handleDragLeave = (draggingNode: Node, dropNode: Node, ev: DragEvents) => { + console.log('tree drag leave:', dropNode.label) +} +// 在拖拽节点时触发的事件(类似浏览器的 mouseover 事件) +export const handleDragOver = (draggingNode: Node, dropNode: Node, ev: DragEvents) => { + console.log('tree drag over:', dropNode.label) +} +// 拖拽结束时(可能未成功)触发的事件 +export const handleDragEnd = ( + draggingNode: Node, + dropNode: Node, + dropType: NodeDropType, + ev: DragEvents +) => { + console.log('tree drag end:', dropNode && dropNode.label, dropType) +} +// 拖拽成功完成时触发的事件 +export const handleDrop = ( + draggingNode: Node, + dropNode: Node, + dropType: NodeDropType, + ev: DragEvents +) => { + console.log('tree drop:', dropNode.label, dropType) +} diff --git a/src/views/supplier/xsWhitelist/category-config.vue b/src/views/supplier/xsWhitelist/category-config.vue index 649fc8a..d7d565a 100644 --- a/src/views/supplier/xsWhitelist/category-config.vue +++ b/src/views/supplier/xsWhitelist/category-config.vue @@ -24,5 +24,5 @@ diff --git a/src/views/supplier/xsWhitelist/editor.vue b/src/views/supplier/xsWhitelist/editor.vue new file mode 100644 index 0000000..5d66e05 --- /dev/null +++ b/src/views/supplier/xsWhitelist/editor.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/views/supplier/xsWhitelist/index.vue b/src/views/supplier/xsWhitelist/index.vue index 40006e0..aa18a7b 100644 --- a/src/views/supplier/xsWhitelist/index.vue +++ b/src/views/supplier/xsWhitelist/index.vue @@ -19,33 +19,35 @@

SKU信息:

-
-
{{ item.typeName }}:
-
-
- {{ - child.name - }} -
- - - + 新增 - -
-
+
+
+
{{ item.typeName }}:
+
+
+ {{ + child.name + }} +
+ + + + 新增 + +
+
+

价格配置:

-

SKU信息:

+

内容编辑:

+
+ 提交