@yeez-tech/user-my-order 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/user-my-order.cjs +1 -1
- package/dist/user-my-order.css +1 -1
- package/dist/user-my-order.js +313 -187
- package/package.json +7 -4
- package/typings/index.d.ts +50 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yeez-tech/user-my-order",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.10",
|
|
5
5
|
"description": "\u6211\u7684\u8ba2\u5355\u9875\u9762\uff08Vue 3\uff09\uff1a\u6570\u636e\u603b\u89c8 + \u8ba2\u5355\u5217\u8868/\u8be6\u60c5\uff1b\u53d7\u63a7\u6570\u636e + \u56de\u8c03\u63a5\u5165\u4e1a\u52a1\u3002",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/user-my-order.cjs",
|
|
@@ -22,14 +22,16 @@
|
|
|
22
22
|
],
|
|
23
23
|
"sideEffects": [
|
|
24
24
|
"**/*.css",
|
|
25
|
-
"dist/*.js"
|
|
25
|
+
"dist/*.js",
|
|
26
|
+
"dist/*.cjs"
|
|
26
27
|
],
|
|
27
28
|
"scripts": {
|
|
28
29
|
"dev": "vite --port 5176",
|
|
29
30
|
"build": "vite build",
|
|
30
31
|
"build:lib": "vite build --config vite.lib.config.ts",
|
|
31
32
|
"preview": "vite preview",
|
|
32
|
-
"prepublishOnly": "npm run build:lib"
|
|
33
|
+
"prepublishOnly": "npm run build:lib",
|
|
34
|
+
"pack:check": "npm run build:lib && npm pack --dry-run"
|
|
33
35
|
},
|
|
34
36
|
"peerDependencies": {
|
|
35
37
|
"@arco-design/web-vue": "^2.50.0",
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"vue": "^3.5.30"
|
|
47
49
|
},
|
|
48
50
|
"publishConfig": {
|
|
49
|
-
"access": "public"
|
|
51
|
+
"access": "public",
|
|
52
|
+
"registry": "https://registry.npmjs.org/"
|
|
50
53
|
}
|
|
51
54
|
}
|
package/typings/index.d.ts
CHANGED
|
@@ -102,6 +102,40 @@ export type ContactSellerButtonVisibleMap = Record<string, boolean>
|
|
|
102
102
|
/** 仅显式 `true` 时展示「取消下载」,默认不展示 */
|
|
103
103
|
export type CancelDownloadButtonVisibleMap = Record<string, boolean>
|
|
104
104
|
|
|
105
|
+
/** 评价记录状态:0 待审核 / 1 审核通过 / 2 审核不通过 / 3 已删除 */
|
|
106
|
+
export type ReviewRecordStatus = 0 | 1 | 2 | 3
|
|
107
|
+
|
|
108
|
+
export declare const REVIEW_UI_STATUS: {
|
|
109
|
+
readonly PENDING: 0
|
|
110
|
+
readonly PASSED: 1
|
|
111
|
+
readonly REJECTED: 2
|
|
112
|
+
readonly DELETED: 3
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface OrderReviewUiState {
|
|
116
|
+
canReview: boolean
|
|
117
|
+
status: ReviewRecordStatus | null
|
|
118
|
+
loaded?: boolean
|
|
119
|
+
canAppend?: boolean
|
|
120
|
+
reviewed?: boolean
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type ReviewStatesMap = Record<string, OrderReviewUiState>
|
|
124
|
+
|
|
125
|
+
export interface ReviewActionPayload {
|
|
126
|
+
productId: string
|
|
127
|
+
orderId: string
|
|
128
|
+
productName: string
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export declare const EMPTY_REVIEW_UI_STATE: OrderReviewUiState
|
|
132
|
+
|
|
133
|
+
export declare function pickReviewUiState(
|
|
134
|
+
states: ReviewStatesMap | null | undefined,
|
|
135
|
+
orderId: string,
|
|
136
|
+
productId: string,
|
|
137
|
+
): OrderReviewUiState
|
|
138
|
+
|
|
105
139
|
export interface OrderManagementProps {
|
|
106
140
|
orders: Order[]
|
|
107
141
|
currentOrderPage?: number
|
|
@@ -126,6 +160,14 @@ export interface OrderManagementProps {
|
|
|
126
160
|
cancelDownloadButtonVisible?: CancelDownloadButtonVisibleMap
|
|
127
161
|
refundStates?: RefundStatesMap
|
|
128
162
|
controllableDeliveryTag?: ControllableDeliveryTagOptions | null
|
|
163
|
+
/** 是否展示「联系售后」;默认 true */
|
|
164
|
+
afterSalesEnabled?: boolean
|
|
165
|
+
/** 是否展示评价入口;默认 false */
|
|
166
|
+
reviewEnabled?: boolean
|
|
167
|
+
reviewStates?: ReviewStatesMap | null
|
|
168
|
+
onReview?: (payload: ReviewActionPayload) => void
|
|
169
|
+
onViewReview?: (payload: ReviewActionPayload) => void
|
|
170
|
+
onAppendReview?: (payload: ReviewActionPayload) => void
|
|
129
171
|
}
|
|
130
172
|
|
|
131
173
|
export interface OrderDetailPanelProps {
|
|
@@ -137,6 +179,14 @@ export interface OrderDetailPanelProps {
|
|
|
137
179
|
onRequestRefund?: (productId: string) => void
|
|
138
180
|
onRequestAfterSales?: (productId: string) => void
|
|
139
181
|
controllableDeliveryTag?: ControllableDeliveryTagOptions | null
|
|
182
|
+
/** 是否展示「联系售后」;默认 true */
|
|
183
|
+
afterSalesEnabled?: boolean
|
|
184
|
+
/** 是否展示评价入口;默认 false */
|
|
185
|
+
reviewEnabled?: boolean
|
|
186
|
+
reviewStates?: ReviewStatesMap | null
|
|
187
|
+
onReview?: (payload: ReviewActionPayload) => void
|
|
188
|
+
onViewReview?: (payload: ReviewActionPayload) => void
|
|
189
|
+
onAppendReview?: (payload: ReviewActionPayload) => void
|
|
140
190
|
}
|
|
141
191
|
|
|
142
192
|
export declare const OrderManagement: DefineComponent<OrderManagementProps>
|