diff --git a/example/pages/radio.vue b/example/pages/radio.vue index cbe11760..d45c023a 100644 --- a/example/pages/radio.vue +++ b/example/pages/radio.vue @@ -26,6 +26,16 @@ title="右对齐" v-model="value3" :options="options3" /> + + +
+ {{ value4 }} +
@@ -37,13 +47,15 @@ export default { return { value1: '', value2: '值A', - value3: '' + value3: '', + value4: '' }; }, created() { this.options1 = ['选项A', '选项B', '选项C']; this.options3 = ['选项A', '选项B', '选项C']; + this.options4 = [' <- icon 😁', ' <- icon 😁', ' <- icon 😁']; this.options2 = [ { label: '被禁用', diff --git a/packages/radio/src/radio.vue b/packages/radio/src/radio.vue index 324c3bd0..19ba50f5 100644 --- a/packages/radio/src/radio.vue +++ b/packages/radio/src/radio.vue @@ -14,7 +14,8 @@ :value="option.value || option"> - + + @@ -34,6 +35,7 @@ if (process.env.NODE_ENV === 'component') { * @param {string} value - 选中值 * @param {string} title - 标题 * @param {string} [align=left] - checkbox 对齐位置,`left`, `right` + * @param {boolean} renderAsHtml - 是否渲染为html * * @example * @@ -48,6 +50,10 @@ export default { type: Array, required: true }, + renderAsHtml: { + type: Boolean, + default: false + }, value: String },