pd改名mb

This commit is contained in:
吕金泽
2022-01-28 16:02:34 +08:00
parent 8b7a73d452
commit 6fbf5978ff
27 changed files with 77 additions and 78 deletions
@@ -11,7 +11,7 @@
import { getToken } from '@/scripts/auth'
export default {
name: 'PdButton',
name: 'MbButton',
props: {
el: {
type: Object,
@@ -16,7 +16,7 @@
<script>
export default {
name: 'PdDialog',
name: 'MbDialog',
props: {
title: {
type: String,
@@ -3,19 +3,19 @@
<el-row style="margin-bottom: 6px">
<el-button type="primary" @click="tableOptions.data.push({})">添加一行</el-button>
</el-row>
<pd-table v-bind="tableOptions">
<mb-table v-bind="tableOptions">
<template v-for="col in cols" #[col.field]="{ index }">
<el-input v-if="col.type === 'input'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" />
<pd-select v-else-if="col.type === 'select'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" />
<mb-select v-else-if="col.type === 'select'" v-bind="col.properties" v-model="tableOptions.data[index][col.field]" @change="dataChange" />
</template>
</pd-table>
</mb-table>
</div>
</template>
<script>
export default {
name: 'PdEditorTable',
name: 'MbEditorTable',
model: {
prop: 'value',
event: 'change'
@@ -1,6 +1,6 @@
<template>
<div>
<el-select v-if="pdType === 'select'" v-model="selectValue" v-bind="el" :style="{ width }" placeholder="请选择" filterable clearable>
<el-select v-if="mbType === 'select'" v-model="selectValue" v-bind="el" :style="{ width }" placeholder="请选择" filterable clearable>
<el-option
v-for="item in selectList"
:key="item.value"
@@ -8,7 +8,7 @@
:value="item.value"
/>
</el-select>
<el-radio-group v-if="pdType === 'radio'" v-model="selectValue">
<el-radio-group v-if="mbType === 'radio'" v-model="selectValue">
<el-radio v-for="item in selectList" :key="item.value" :label="item.value">
{{ item.label }}
</el-radio>
@@ -19,7 +19,7 @@
<script>
export default {
name: 'PdSelect',
name: 'MbSelect',
model: {
prop: 'value',
event: 'change'
@@ -61,7 +61,7 @@ export default {
type: String,
default: 'value'
},
pdType: {
mbType: {
type: String,
default: 'select'
},
@@ -35,18 +35,18 @@
</span>
<span v-else-if="col.field">{{ scope.row[col.field] }}</span>
</template>
<pd-table-column v-for="(col2, j) in col.cols" :key="j" :col="col2">
<mb-table-column v-for="(col2, j) in col.cols" :key="j" :col="col2">
<template v-for="(value, key) in $scopedSlots" #[key]="{ row, index }">
<slot :row="row" :index="index" :name="key" />
</template>
</pd-table-column>
</mb-table-column>
</el-table-column>
</template>
<script>
export default {
name: 'PdTableColumn',
name: 'MbTableColumn',
props: {
col: {
type: Object,
@@ -21,11 +21,11 @@
</template>
</el-table-column>
<pd-table-column v-for="(col, i) in cols" :key="i" :col="col">
<mb-table-column v-for="(col, i) in cols" :key="i" :col="col">
<template v-for="(value, key) in $scopedSlots" #[key]="{ row, index }">
<slot :row="row" :index="index" :name="key" />
</template>
</pd-table-column>
</mb-table-column>
<el-empty :description="emptyText" slot="empty" />
@@ -37,11 +37,11 @@
<script>
import request from '@/scripts/request'
import Pagination from '@/components/Pagination'
import PdTableColumn from './pd-table-column.vue'
import MbTableColumn from './mb-table-column.vue'
export default {
name: 'PdTable',
components: { Pagination, PdTableColumn },
name: 'MbTable',
components: { Pagination, MbTableColumn },
props: {
el: {
type: Object,
@@ -25,7 +25,7 @@
<script>
export default {
name: 'PdTree',
name: 'MbTree',
props: {
url: {
type: String,
@@ -1,12 +1,12 @@
<template>
<vue-ueditor-wrap v-model="content" :config="editorConfig" editor-id="pd-ueditor" />
<vue-ueditor-wrap v-model="content" :config="editorConfig" editor-id="mb-ueditor" />
</template>
<script>
import VueUeditorWrap from 'vue-ueditor-wrap'
export default {
name: 'PdUeditor',
name: 'MbUeditor',
components: {
VueUeditorWrap
},
@@ -22,7 +22,7 @@
<script>
import { getToken } from '@/scripts/auth'
export default {
name: 'PdUploadFile',
name: 'MbUploadFile',
model: {
prop: 'value',
event: 'change'
@@ -51,7 +51,7 @@
</i>
</el-upload>
</vuedraggable>
<pd-dialog :visible.sync="cropperDialogVisible" @confirm-click="cropper">
<mb-dialog :visible.sync="cropperDialogVisible" @confirm-click="cropper">
<template #content>
<div class="cropper-content">
<div class="cropper" style="text-align:center">
@@ -68,7 +68,7 @@
</div>
</div>
</template>
</pd-dialog>
</mb-dialog>
</div>
</template>
@@ -78,7 +78,7 @@ import vuedraggable from 'vuedraggable'
import { getToken } from '@/scripts/auth'
export default {
name: 'PdUploadImage',
name: 'MbUploadImage',
components: { vuedraggable, VueCropper },
model: {
prop: 'value',