|
@@ -7,7 +7,8 @@
|
|
|
</view>
|
|
|
<view class="card-content">
|
|
|
<template v-if="goodsInfo.userHtml">
|
|
|
- <view style="padding: 10px;" v-html="goodsInfo.userHtml"></view>
|
|
|
+ <rich-text style="padding: 10px;" :nodes="goodsInfo.userHtml" :preview-img="true" :selectable="true"
|
|
|
+ :use-anchor="true"></rich-text>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
<view style="padding: 10px;" v-html="content"></view>
|
|
@@ -31,6 +32,14 @@ const props = defineProps({
|
|
|
default: {},
|
|
|
},
|
|
|
});
|
|
|
+const htmlContent = `
|
|
|
+ <div class="article">
|
|
|
+ <h2>焰小厨餐厅介绍</h2>
|
|
|
+ <p>位于苏州平江路...</p>
|
|
|
+ <img src="https://example.com/logo.png" alt="餐厅Logo">
|
|
|
+ </div>
|
|
|
+ `
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|