mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2025-12-19 01:15:53 +08:00
refactor(ui): 替换iView为TDesign组件库并优化相关代码
feat(coupon): 新增优惠券详情页面 feat(api): 添加会员评价状态更新和删除接口 perf(pagination): 统一分页大小选项为[20, 50, 100] style(theme): 移除旧主题文件并更新样式类名 fix(menu): 修复菜单组件兼容性问题 chore(deps): 更新package.json依赖项 docs(modal): 添加全局Modal组件兼容层
This commit is contained in:
@@ -72,9 +72,10 @@ Vue.component('t-icon', TIcon)
|
||||
Vue.component('Page', TdPage)
|
||||
|
||||
Vue.prototype.$Message = MessagePlugin
|
||||
let __lastDialog = null
|
||||
Vue.prototype.$Modal = {
|
||||
confirm: function (opts) {
|
||||
return DialogPlugin.confirm({
|
||||
const d = DialogPlugin.confirm({
|
||||
header: opts && (opts.title || opts.header),
|
||||
content: opts && (opts.content || opts.desc),
|
||||
theme: opts && opts.theme ? opts.theme : 'default',
|
||||
@@ -82,38 +83,56 @@ Vue.prototype.$Modal = {
|
||||
onCancel: opts && opts.onCancel,
|
||||
onClose: opts && opts.onClose
|
||||
})
|
||||
__lastDialog = d
|
||||
return d
|
||||
},
|
||||
info: function (opts) {
|
||||
return DialogPlugin.alert({
|
||||
const d = DialogPlugin.alert({
|
||||
header: opts && (opts.title || '提示'),
|
||||
content: opts && (opts.content || opts.desc),
|
||||
theme: 'info',
|
||||
onClose: opts && (opts.onOk || opts.onClose)
|
||||
})
|
||||
__lastDialog = d
|
||||
return d
|
||||
},
|
||||
success: function (opts) {
|
||||
return DialogPlugin.alert({
|
||||
const d = DialogPlugin.alert({
|
||||
header: opts && (opts.title || '成功'),
|
||||
content: opts && (opts.content || opts.desc),
|
||||
theme: 'success',
|
||||
onClose: opts && (opts.onOk || opts.onClose)
|
||||
})
|
||||
__lastDialog = d
|
||||
return d
|
||||
},
|
||||
warning: function (opts) {
|
||||
return DialogPlugin.alert({
|
||||
const d = DialogPlugin.alert({
|
||||
header: opts && (opts.title || '警告'),
|
||||
content: opts && (opts.content || opts.desc),
|
||||
theme: 'warning',
|
||||
onClose: opts && (opts.onOk || opts.onClose)
|
||||
})
|
||||
__lastDialog = d
|
||||
return d
|
||||
},
|
||||
error: function (opts) {
|
||||
return DialogPlugin.alert({
|
||||
const d = DialogPlugin.alert({
|
||||
header: opts && (opts.title || '错误'),
|
||||
content: opts && (opts.content || opts.desc),
|
||||
theme: 'danger',
|
||||
onClose: opts && (opts.onOk || opts.onClose)
|
||||
})
|
||||
__lastDialog = d
|
||||
return d
|
||||
},
|
||||
remove: function () {
|
||||
if (__lastDialog && typeof __lastDialog.hide === 'function') {
|
||||
__lastDialog.hide()
|
||||
} else if (__lastDialog && typeof __lastDialog.destroy === 'function') {
|
||||
__lastDialog.destroy()
|
||||
}
|
||||
__lastDialog = null
|
||||
}
|
||||
}
|
||||
Vue.prototype.$Notice = {
|
||||
|
||||
Reference in New Issue
Block a user