12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <template>
- <div>
- <a-form-model-item label="star总数">
- <a-input-number v-model="component.attrFD.formItemProps.inputProps.count"></a-input-number>
- </a-form-model-item>
- <a-form-model-item label="默认值">
- <a-input-number
- v-model="component.attr.defaultValue"
- @change="component.key = component.key + 1"
- />
- </a-form-model-item>
- </div>
- </template>
- <script>
- import { Rate } from 'ant-design-vue'
- import components from './_import-components/xm-rate-import'
- export const metaInfo = {
- caption: '评分',
- component: {
- props: ['designerData'],
- render() {
- const { count } = this.designerData.attrFD.formItemProps.inputProps
- return (
- <Rate
- vModel={this.designerData.attr.defaultValue}
- count={count || 0}
- key={this.designerData.key}
- />
- )
- },
- },
- icon: 'star',
- order: 700,
- }
- export const fieldProps = {
- dataType: 'number',
- attrFD: { formItemProps: { inputProps: { count: 5 } } },
- key: 1,
- }
- export default {
- name: 'XmRate',
- components,
- data() {
- return {}
- },
- }
- </script>
- <style module lang="scss">
- @use '@/common/design' as *;
- </style>
|